#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 r15555 = c;
        float r15556 = cos(r15555);
        float r15557 = sqrt(r15555);
        float r15558 = r15556 + r15557;
        return r15558;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15559 = c;
        double r15560 = cos(r15559);
        double r15561 = sqrt(r15559);
        double r15562 = r15560 + r15561;
        return r15562;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15563 = c;
        float r15564 = cos(r15563);
        float r15565 = sqrt(r15563);
        float r15566 = r15564 + r15565;
        return r15566;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15567 = c;
        double r15568 = cos(r15567);
        double r15569 = sqrt(r15567);
        double r15570 = r15568 + r15569;
        return r15570;
}

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 r15571, r15572, r15573, r15574;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15571);
        mpfr_init(r15572);
        mpfr_init(r15573);
        mpfr_init(r15574);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15571, c, MPFR_RNDN);
        mpfr_cos(r15572, r15571, MPFR_RNDN);
        mpfr_sqrt(r15573, r15571, MPFR_RNDN);
        mpfr_add(r15574, r15572, r15573, MPFR_RNDN);
        return mpfr_get_d(r15574, MPFR_RNDN);
}

static mpfr_t r15575, r15576, r15577, r15578;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15575);
        mpfr_init(r15576);
        mpfr_init(r15577);
        mpfr_init(r15578);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15575, c, MPFR_RNDN);
        mpfr_cos(r15576, r15575, MPFR_RNDN);
        mpfr_sqrt(r15577, r15575, MPFR_RNDN);
        mpfr_add(r15578, r15576, r15577, MPFR_RNDN);
        return mpfr_get_d(r15578, MPFR_RNDN);
}

static mpfr_t r15579, r15580, r15581, r15582;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15579);
        mpfr_init(r15580);
        mpfr_init(r15581);
        mpfr_init(r15582);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15579, c, MPFR_RNDN);
        mpfr_cos(r15580, r15579, MPFR_RNDN);
        mpfr_sqrt(r15581, r15579, MPFR_RNDN);
        mpfr_add(r15582, r15580, r15581, MPFR_RNDN);
        return mpfr_get_d(r15582, MPFR_RNDN);
}

