#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 r15668 = c;
        float r15669 = cos(r15668);
        float r15670 = sqrt(r15668);
        float r15671 = r15669 + r15670;
        return r15671;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15672 = c;
        double r15673 = cos(r15672);
        double r15674 = sqrt(r15672);
        double r15675 = r15673 + r15674;
        return r15675;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15676 = c;
        float r15677 = cos(r15676);
        float r15678 = sqrt(r15676);
        float r15679 = r15677 + r15678;
        return r15679;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15680 = c;
        double r15681 = cos(r15680);
        double r15682 = sqrt(r15680);
        double r15683 = r15681 + r15682;
        return r15683;
}

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 r15684, r15685, r15686, r15687;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15684);
        mpfr_init(r15685);
        mpfr_init(r15686);
        mpfr_init(r15687);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15684, c, MPFR_RNDN);
        mpfr_cos(r15685, r15684, MPFR_RNDN);
        mpfr_sqrt(r15686, r15684, MPFR_RNDN);
        mpfr_add(r15687, r15685, r15686, MPFR_RNDN);
        return mpfr_get_d(r15687, MPFR_RNDN);
}

static mpfr_t r15688, r15689, r15690, r15691;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15688);
        mpfr_init(r15689);
        mpfr_init(r15690);
        mpfr_init(r15691);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15688, c, MPFR_RNDN);
        mpfr_cos(r15689, r15688, MPFR_RNDN);
        mpfr_sqrt(r15690, r15688, MPFR_RNDN);
        mpfr_add(r15691, r15689, r15690, MPFR_RNDN);
        return mpfr_get_d(r15691, MPFR_RNDN);
}

static mpfr_t r15692, r15693, r15694, r15695;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15692);
        mpfr_init(r15693);
        mpfr_init(r15694);
        mpfr_init(r15695);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15692, c, MPFR_RNDN);
        mpfr_cos(r15693, r15692, MPFR_RNDN);
        mpfr_sqrt(r15694, r15692, MPFR_RNDN);
        mpfr_add(r15695, r15693, r15694, MPFR_RNDN);
        return mpfr_get_d(r15695, MPFR_RNDN);
}

