#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 r15506 = c;
        float r15507 = cos(r15506);
        float r15508 = sqrt(r15506);
        float r15509 = r15507 + r15508;
        return r15509;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15510 = c;
        double r15511 = cos(r15510);
        double r15512 = sqrt(r15510);
        double r15513 = r15511 + r15512;
        return r15513;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15514 = c;
        float r15515 = cos(r15514);
        float r15516 = sqrt(r15514);
        float r15517 = r15515 + r15516;
        return r15517;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15518 = c;
        double r15519 = cos(r15518);
        double r15520 = sqrt(r15518);
        double r15521 = r15519 + r15520;
        return r15521;
}

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 r15522, r15523, r15524, r15525;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15522);
        mpfr_init(r15523);
        mpfr_init(r15524);
        mpfr_init(r15525);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15522, c, MPFR_RNDN);
        mpfr_cos(r15523, r15522, MPFR_RNDN);
        mpfr_sqrt(r15524, r15522, MPFR_RNDN);
        mpfr_add(r15525, r15523, r15524, MPFR_RNDN);
        return mpfr_get_d(r15525, MPFR_RNDN);
}

static mpfr_t r15526, r15527, r15528, r15529;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15526);
        mpfr_init(r15527);
        mpfr_init(r15528);
        mpfr_init(r15529);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15526, c, MPFR_RNDN);
        mpfr_cos(r15527, r15526, MPFR_RNDN);
        mpfr_sqrt(r15528, r15526, MPFR_RNDN);
        mpfr_add(r15529, r15527, r15528, MPFR_RNDN);
        return mpfr_get_d(r15529, MPFR_RNDN);
}

static mpfr_t r15530, r15531, r15532, r15533;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15530);
        mpfr_init(r15531);
        mpfr_init(r15532);
        mpfr_init(r15533);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15530, c, MPFR_RNDN);
        mpfr_cos(r15531, r15530, MPFR_RNDN);
        mpfr_sqrt(r15532, r15530, MPFR_RNDN);
        mpfr_add(r15533, r15531, r15532, MPFR_RNDN);
        return mpfr_get_d(r15533, MPFR_RNDN);
}

