#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 r15590 = c;
        float r15591 = cos(r15590);
        float r15592 = sqrt(r15590);
        float r15593 = r15591 + r15592;
        return r15593;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15594 = c;
        double r15595 = cos(r15594);
        double r15596 = sqrt(r15594);
        double r15597 = r15595 + r15596;
        return r15597;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15598 = c;
        float r15599 = cos(r15598);
        float r15600 = sqrt(r15598);
        float r15601 = r15599 + r15600;
        return r15601;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15602 = c;
        double r15603 = cos(r15602);
        double r15604 = sqrt(r15602);
        double r15605 = r15603 + r15604;
        return r15605;
}

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 r15606, r15607, r15608, r15609;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15606);
        mpfr_init(r15607);
        mpfr_init(r15608);
        mpfr_init(r15609);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15606, c, MPFR_RNDN);
        mpfr_cos(r15607, r15606, MPFR_RNDN);
        mpfr_sqrt(r15608, r15606, MPFR_RNDN);
        mpfr_add(r15609, r15607, r15608, MPFR_RNDN);
        return mpfr_get_d(r15609, MPFR_RNDN);
}

static mpfr_t r15610, r15611, r15612, r15613;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15610);
        mpfr_init(r15611);
        mpfr_init(r15612);
        mpfr_init(r15613);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15610, c, MPFR_RNDN);
        mpfr_cos(r15611, r15610, MPFR_RNDN);
        mpfr_sqrt(r15612, r15610, MPFR_RNDN);
        mpfr_add(r15613, r15611, r15612, MPFR_RNDN);
        return mpfr_get_d(r15613, MPFR_RNDN);
}

static mpfr_t r15614, r15615, r15616, r15617;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15614);
        mpfr_init(r15615);
        mpfr_init(r15616);
        mpfr_init(r15617);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15614, c, MPFR_RNDN);
        mpfr_cos(r15615, r15614, MPFR_RNDN);
        mpfr_sqrt(r15616, r15614, MPFR_RNDN);
        mpfr_add(r15617, r15615, r15616, MPFR_RNDN);
        return mpfr_get_d(r15617, MPFR_RNDN);
}

