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

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


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

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

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

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

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

static mpfr_t r15687, r15688, r15689, r15690;

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

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

static mpfr_t r15691, r15692, r15693, r15694;

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

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

