#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 r15619 = c;
        float r15620 = cos(r15619);
        float r15621 = sqrt(r15619);
        float r15622 = r15620 + r15621;
        return r15622;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15623 = c;
        double r15624 = cos(r15623);
        double r15625 = sqrt(r15623);
        double r15626 = r15624 + r15625;
        return r15626;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15627 = c;
        float r15628 = cos(r15627);
        float r15629 = sqrt(r15627);
        float r15630 = r15628 + r15629;
        return r15630;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15631 = c;
        double r15632 = cos(r15631);
        double r15633 = sqrt(r15631);
        double r15634 = r15632 + r15633;
        return r15634;
}

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 r15635, r15636, r15637, r15638;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15635);
        mpfr_init(r15636);
        mpfr_init(r15637);
        mpfr_init(r15638);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15635, c, MPFR_RNDN);
        mpfr_cos(r15636, r15635, MPFR_RNDN);
        mpfr_sqrt(r15637, r15635, MPFR_RNDN);
        mpfr_add(r15638, r15636, r15637, MPFR_RNDN);
        return mpfr_get_d(r15638, MPFR_RNDN);
}

static mpfr_t r15639, r15640, r15641, r15642;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15639);
        mpfr_init(r15640);
        mpfr_init(r15641);
        mpfr_init(r15642);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15639, c, MPFR_RNDN);
        mpfr_cos(r15640, r15639, MPFR_RNDN);
        mpfr_sqrt(r15641, r15639, MPFR_RNDN);
        mpfr_add(r15642, r15640, r15641, MPFR_RNDN);
        return mpfr_get_d(r15642, MPFR_RNDN);
}

static mpfr_t r15643, r15644, r15645, r15646;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15643);
        mpfr_init(r15644);
        mpfr_init(r15645);
        mpfr_init(r15646);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15643, c, MPFR_RNDN);
        mpfr_cos(r15644, r15643, MPFR_RNDN);
        mpfr_sqrt(r15645, r15643, MPFR_RNDN);
        mpfr_add(r15646, r15644, r15645, MPFR_RNDN);
        return mpfr_get_d(r15646, MPFR_RNDN);
}

