#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 r15612 = c;
        float r15613 = cos(r15612);
        float r15614 = sqrt(r15612);
        float r15615 = r15613 + r15614;
        return r15615;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15616 = c;
        double r15617 = cos(r15616);
        double r15618 = sqrt(r15616);
        double r15619 = r15617 + r15618;
        return r15619;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15620 = c;
        float r15621 = cos(r15620);
        float r15622 = sqrt(r15620);
        float r15623 = r15621 + r15622;
        return r15623;
}

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

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 r15628, r15629, r15630, r15631;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15628);
        mpfr_init(r15629);
        mpfr_init(r15630);
        mpfr_init(r15631);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15628, c, MPFR_RNDN);
        mpfr_cos(r15629, r15628, MPFR_RNDN);
        mpfr_sqrt(r15630, r15628, MPFR_RNDN);
        mpfr_add(r15631, r15629, r15630, MPFR_RNDN);
        return mpfr_get_d(r15631, MPFR_RNDN);
}

static mpfr_t r15632, r15633, r15634, r15635;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15632);
        mpfr_init(r15633);
        mpfr_init(r15634);
        mpfr_init(r15635);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15632, c, MPFR_RNDN);
        mpfr_cos(r15633, r15632, MPFR_RNDN);
        mpfr_sqrt(r15634, r15632, MPFR_RNDN);
        mpfr_add(r15635, r15633, r15634, MPFR_RNDN);
        return mpfr_get_d(r15635, MPFR_RNDN);
}

static mpfr_t r15636, r15637, r15638, r15639;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15636);
        mpfr_init(r15637);
        mpfr_init(r15638);
        mpfr_init(r15639);
}

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

