#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 r15496 = c;
        float r15497 = cos(r15496);
        float r15498 = sqrt(r15496);
        float r15499 = r15497 + r15498;
        return r15499;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15500 = c;
        double r15501 = cos(r15500);
        double r15502 = sqrt(r15500);
        double r15503 = r15501 + r15502;
        return r15503;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15504 = c;
        float r15505 = cos(r15504);
        float r15506 = sqrt(r15504);
        float r15507 = r15505 + r15506;
        return r15507;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15508 = c;
        double r15509 = cos(r15508);
        double r15510 = sqrt(r15508);
        double r15511 = r15509 + r15510;
        return r15511;
}

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 r15512, r15513, r15514, r15515;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15512);
        mpfr_init(r15513);
        mpfr_init(r15514);
        mpfr_init(r15515);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15512, c, MPFR_RNDN);
        mpfr_cos(r15513, r15512, MPFR_RNDN);
        mpfr_sqrt(r15514, r15512, MPFR_RNDN);
        mpfr_add(r15515, r15513, r15514, MPFR_RNDN);
        return mpfr_get_d(r15515, MPFR_RNDN);
}

static mpfr_t r15516, r15517, r15518, r15519;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15516);
        mpfr_init(r15517);
        mpfr_init(r15518);
        mpfr_init(r15519);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15516, c, MPFR_RNDN);
        mpfr_cos(r15517, r15516, MPFR_RNDN);
        mpfr_sqrt(r15518, r15516, MPFR_RNDN);
        mpfr_add(r15519, r15517, r15518, MPFR_RNDN);
        return mpfr_get_d(r15519, MPFR_RNDN);
}

static mpfr_t r15520, r15521, r15522, r15523;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15520);
        mpfr_init(r15521);
        mpfr_init(r15522);
        mpfr_init(r15523);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15520, c, MPFR_RNDN);
        mpfr_cos(r15521, r15520, MPFR_RNDN);
        mpfr_sqrt(r15522, r15520, MPFR_RNDN);
        mpfr_add(r15523, r15521, r15522, MPFR_RNDN);
        return mpfr_get_d(r15523, MPFR_RNDN);
}

