#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 r15624 = c;
        float r15625 = cos(r15624);
        float r15626 = sqrt(r15624);
        float r15627 = r15625 + r15626;
        return r15627;
}

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


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

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15636 = c;
        double r15637 = cos(r15636);
        double r15638 = sqrt(r15636);
        double r15639 = r15637 + r15638;
        return r15639;
}

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 r15640, r15641, r15642, r15643;

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

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

static mpfr_t r15644, r15645, r15646, r15647;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15644);
        mpfr_init(r15645);
        mpfr_init(r15646);
        mpfr_init(r15647);
}

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

static mpfr_t r15648, r15649, r15650, r15651;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15648);
        mpfr_init(r15649);
        mpfr_init(r15650);
        mpfr_init(r15651);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15648, c, MPFR_RNDN);
        mpfr_cos(r15649, r15648, MPFR_RNDN);
        mpfr_sqrt(r15650, r15648, MPFR_RNDN);
        mpfr_add(r15651, r15649, r15650, MPFR_RNDN);
        return mpfr_get_d(r15651, MPFR_RNDN);
}

