#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 r15596 = c;
        float r15597 = cos(r15596);
        float r15598 = sqrt(r15596);
        float r15599 = r15597 + r15598;
        return r15599;
}

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


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

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15608 = c;
        double r15609 = cos(r15608);
        double r15610 = sqrt(r15608);
        double r15611 = r15609 + r15610;
        return r15611;
}

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 r15612, r15613, r15614, r15615;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15612);
        mpfr_init(r15613);
        mpfr_init(r15614);
        mpfr_init(r15615);
}

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

static mpfr_t r15616, r15617, r15618, r15619;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15616);
        mpfr_init(r15617);
        mpfr_init(r15618);
        mpfr_init(r15619);
}

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

static mpfr_t r15620, r15621, r15622, r15623;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15620);
        mpfr_init(r15621);
        mpfr_init(r15622);
        mpfr_init(r15623);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15620, c, MPFR_RNDN);
        mpfr_cos(r15621, r15620, MPFR_RNDN);
        mpfr_sqrt(r15622, r15620, MPFR_RNDN);
        mpfr_add(r15623, r15621, r15622, MPFR_RNDN);
        return mpfr_get_d(r15623, MPFR_RNDN);
}

