#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 r15575 = c;
        float r15576 = cos(r15575);
        float r15577 = sqrt(r15575);
        float r15578 = r15576 + r15577;
        return r15578;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15579 = c;
        double r15580 = cos(r15579);
        double r15581 = sqrt(r15579);
        double r15582 = r15580 + r15581;
        return r15582;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15583 = c;
        float r15584 = cos(r15583);
        float r15585 = sqrt(r15583);
        float r15586 = r15584 + r15585;
        return r15586;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15587 = c;
        double r15588 = cos(r15587);
        double r15589 = sqrt(r15587);
        double r15590 = r15588 + r15589;
        return r15590;
}

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 r15591, r15592, r15593, r15594;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15591);
        mpfr_init(r15592);
        mpfr_init(r15593);
        mpfr_init(r15594);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15591, c, MPFR_RNDN);
        mpfr_cos(r15592, r15591, MPFR_RNDN);
        mpfr_sqrt(r15593, r15591, MPFR_RNDN);
        mpfr_add(r15594, r15592, r15593, MPFR_RNDN);
        return mpfr_get_d(r15594, MPFR_RNDN);
}

static mpfr_t r15595, r15596, r15597, r15598;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15595);
        mpfr_init(r15596);
        mpfr_init(r15597);
        mpfr_init(r15598);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15595, c, MPFR_RNDN);
        mpfr_cos(r15596, r15595, MPFR_RNDN);
        mpfr_sqrt(r15597, r15595, MPFR_RNDN);
        mpfr_add(r15598, r15596, r15597, MPFR_RNDN);
        return mpfr_get_d(r15598, MPFR_RNDN);
}

static mpfr_t r15599, r15600, r15601, r15602;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15599);
        mpfr_init(r15600);
        mpfr_init(r15601);
        mpfr_init(r15602);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15599, c, MPFR_RNDN);
        mpfr_cos(r15600, r15599, MPFR_RNDN);
        mpfr_sqrt(r15601, r15599, MPFR_RNDN);
        mpfr_add(r15602, r15600, r15601, MPFR_RNDN);
        return mpfr_get_d(r15602, MPFR_RNDN);
}

