#include <tgmath.h>
#include <gmp.h>
#include <mpfr.h>
#include <stdio.h>
#include <stdbool.h>

char *name = "(+ (cos c) (sqrt c))";

double f_if(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15591 = c;
        float r15592 = cos(r15591);
        float r15593 = sqrt(r15591);
        float r15594 = r15592 + r15593;
        return r15594;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15595 = c;
        double r15596 = cos(r15595);
        double r15597 = sqrt(r15595);
        double r15598 = r15596 + r15597;
        return r15598;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15599 = c;
        float r15600 = cos(r15599);
        float r15601 = sqrt(r15599);
        float r15602 = r15600 + r15601;
        return r15602;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15603 = c;
        double r15604 = cos(r15603);
        double r15605 = sqrt(r15603);
        double r15606 = r15604 + r15605;
        return r15606;
}

void mpfr_fmod2(mpfr_t r, mpfr_t n, mpfr_t d, mpfr_rnd_t rmd) {
        mpfr_fmod(r, n, d, rmd);
        if (mpfr_cmp_ui(r, 0) < 0) mpfr_add(r, r, d, rmd);
}


static mpfr_t r15607, r15608, r15609, r15610;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15607);
        mpfr_init(r15608);
        mpfr_init(r15609);
        mpfr_init(r15610);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15607, c, MPFR_RNDN);
        mpfr_cos(r15608, r15607, MPFR_RNDN);
        mpfr_sqrt(r15609, r15607, MPFR_RNDN);
        mpfr_add(r15610, r15608, r15609, MPFR_RNDN);
        return mpfr_get_d(r15610, MPFR_RNDN);
}

static mpfr_t r15611, r15612, r15613, r15614;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15611);
        mpfr_init(r15612);
        mpfr_init(r15613);
        mpfr_init(r15614);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15611, c, MPFR_RNDN);
        mpfr_cos(r15612, r15611, MPFR_RNDN);
        mpfr_sqrt(r15613, r15611, MPFR_RNDN);
        mpfr_add(r15614, r15612, r15613, MPFR_RNDN);
        return mpfr_get_d(r15614, MPFR_RNDN);
}

static mpfr_t r15615, r15616, r15617, r15618;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15615);
        mpfr_init(r15616);
        mpfr_init(r15617);
        mpfr_init(r15618);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15615, c, MPFR_RNDN);
        mpfr_cos(r15616, r15615, MPFR_RNDN);
        mpfr_sqrt(r15617, r15615, MPFR_RNDN);
        mpfr_add(r15618, r15616, r15617, MPFR_RNDN);
        return mpfr_get_d(r15618, MPFR_RNDN);
}

