#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 r15616 = c;
        float r15617 = cos(r15616);
        float r15618 = sqrt(r15616);
        float r15619 = r15617 + r15618;
        return r15619;
}

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


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

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

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 r15632, r15633, r15634, r15635;

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

double f_im(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_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15636);
        mpfr_init(r15637);
        mpfr_init(r15638);
        mpfr_init(r15639);
}

double f_fm(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);
}

static mpfr_t r15640, r15641, r15642, r15643;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15640);
        mpfr_init(r15641);
        mpfr_init(r15642);
        mpfr_init(r15643);
}

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

