#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 r15539 = c;
        float r15540 = cos(r15539);
        float r15541 = sqrt(r15539);
        float r15542 = r15540 + r15541;
        return r15542;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15543 = c;
        double r15544 = cos(r15543);
        double r15545 = sqrt(r15543);
        double r15546 = r15544 + r15545;
        return r15546;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15547 = c;
        float r15548 = cos(r15547);
        float r15549 = sqrt(r15547);
        float r15550 = r15548 + r15549;
        return r15550;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15551 = c;
        double r15552 = cos(r15551);
        double r15553 = sqrt(r15551);
        double r15554 = r15552 + r15553;
        return r15554;
}

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 r15555, r15556, r15557, r15558;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15555);
        mpfr_init(r15556);
        mpfr_init(r15557);
        mpfr_init(r15558);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15555, c, MPFR_RNDN);
        mpfr_cos(r15556, r15555, MPFR_RNDN);
        mpfr_sqrt(r15557, r15555, MPFR_RNDN);
        mpfr_add(r15558, r15556, r15557, MPFR_RNDN);
        return mpfr_get_d(r15558, MPFR_RNDN);
}

static mpfr_t r15559, r15560, r15561, r15562;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15559);
        mpfr_init(r15560);
        mpfr_init(r15561);
        mpfr_init(r15562);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15559, c, MPFR_RNDN);
        mpfr_cos(r15560, r15559, MPFR_RNDN);
        mpfr_sqrt(r15561, r15559, MPFR_RNDN);
        mpfr_add(r15562, r15560, r15561, MPFR_RNDN);
        return mpfr_get_d(r15562, MPFR_RNDN);
}

static mpfr_t r15563, r15564, r15565, r15566;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15563);
        mpfr_init(r15564);
        mpfr_init(r15565);
        mpfr_init(r15566);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15563, c, MPFR_RNDN);
        mpfr_cos(r15564, r15563, MPFR_RNDN);
        mpfr_sqrt(r15565, r15563, MPFR_RNDN);
        mpfr_add(r15566, r15564, r15565, MPFR_RNDN);
        return mpfr_get_d(r15566, MPFR_RNDN);
}

