#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 r15512 = c;
        float r15513 = cos(r15512);
        float r15514 = sqrt(r15512);
        float r15515 = r15513 + r15514;
        return r15515;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15516 = c;
        double r15517 = cos(r15516);
        double r15518 = sqrt(r15516);
        double r15519 = r15517 + r15518;
        return r15519;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15520 = c;
        float r15521 = cos(r15520);
        float r15522 = sqrt(r15520);
        float r15523 = r15521 + r15522;
        return r15523;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15524 = c;
        double r15525 = cos(r15524);
        double r15526 = sqrt(r15524);
        double r15527 = r15525 + r15526;
        return r15527;
}

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 r15528, r15529, r15530, r15531;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15528);
        mpfr_init(r15529);
        mpfr_init(r15530);
        mpfr_init(r15531);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15528, c, MPFR_RNDN);
        mpfr_cos(r15529, r15528, MPFR_RNDN);
        mpfr_sqrt(r15530, r15528, MPFR_RNDN);
        mpfr_add(r15531, r15529, r15530, MPFR_RNDN);
        return mpfr_get_d(r15531, MPFR_RNDN);
}

static mpfr_t r15532, r15533, r15534, r15535;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15532);
        mpfr_init(r15533);
        mpfr_init(r15534);
        mpfr_init(r15535);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15532, c, MPFR_RNDN);
        mpfr_cos(r15533, r15532, MPFR_RNDN);
        mpfr_sqrt(r15534, r15532, MPFR_RNDN);
        mpfr_add(r15535, r15533, r15534, MPFR_RNDN);
        return mpfr_get_d(r15535, MPFR_RNDN);
}

static mpfr_t r15536, r15537, r15538, r15539;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15536);
        mpfr_init(r15537);
        mpfr_init(r15538);
        mpfr_init(r15539);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15536, c, MPFR_RNDN);
        mpfr_cos(r15537, r15536, MPFR_RNDN);
        mpfr_sqrt(r15538, r15536, MPFR_RNDN);
        mpfr_add(r15539, r15537, r15538, MPFR_RNDN);
        return mpfr_get_d(r15539, MPFR_RNDN);
}

