#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 r15518 = c;
        float r15519 = cos(r15518);
        float r15520 = sqrt(r15518);
        float r15521 = r15519 + r15520;
        return r15521;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15522 = c;
        double r15523 = cos(r15522);
        double r15524 = sqrt(r15522);
        double r15525 = r15523 + r15524;
        return r15525;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15526 = c;
        float r15527 = cos(r15526);
        float r15528 = sqrt(r15526);
        float r15529 = r15527 + r15528;
        return r15529;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15530 = c;
        double r15531 = cos(r15530);
        double r15532 = sqrt(r15530);
        double r15533 = r15531 + r15532;
        return r15533;
}

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 r15534, r15535, r15536, r15537;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15534);
        mpfr_init(r15535);
        mpfr_init(r15536);
        mpfr_init(r15537);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15534, c, MPFR_RNDN);
        mpfr_cos(r15535, r15534, MPFR_RNDN);
        mpfr_sqrt(r15536, r15534, MPFR_RNDN);
        mpfr_add(r15537, r15535, r15536, MPFR_RNDN);
        return mpfr_get_d(r15537, MPFR_RNDN);
}

static mpfr_t r15538, r15539, r15540, r15541;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15538);
        mpfr_init(r15539);
        mpfr_init(r15540);
        mpfr_init(r15541);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15538, c, MPFR_RNDN);
        mpfr_cos(r15539, r15538, MPFR_RNDN);
        mpfr_sqrt(r15540, r15538, MPFR_RNDN);
        mpfr_add(r15541, r15539, r15540, MPFR_RNDN);
        return mpfr_get_d(r15541, MPFR_RNDN);
}

static mpfr_t r15542, r15543, r15544, r15545;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15542);
        mpfr_init(r15543);
        mpfr_init(r15544);
        mpfr_init(r15545);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15542, c, MPFR_RNDN);
        mpfr_cos(r15543, r15542, MPFR_RNDN);
        mpfr_sqrt(r15544, r15542, MPFR_RNDN);
        mpfr_add(r15545, r15543, r15544, MPFR_RNDN);
        return mpfr_get_d(r15545, MPFR_RNDN);
}

