#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 r15751 = c;
        float r15752 = cos(r15751);
        float r15753 = sqrt(r15751);
        float r15754 = r15752 + r15753;
        return r15754;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15755 = c;
        double r15756 = cos(r15755);
        double r15757 = sqrt(r15755);
        double r15758 = r15756 + r15757;
        return r15758;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15759 = c;
        float r15760 = cos(r15759);
        float r15761 = sqrt(r15759);
        float r15762 = r15760 + r15761;
        return r15762;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15763 = c;
        double r15764 = cos(r15763);
        double r15765 = sqrt(r15763);
        double r15766 = r15764 + r15765;
        return r15766;
}

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 r15767, r15768, r15769, r15770;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15767);
        mpfr_init(r15768);
        mpfr_init(r15769);
        mpfr_init(r15770);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15767, c, MPFR_RNDN);
        mpfr_cos(r15768, r15767, MPFR_RNDN);
        mpfr_sqrt(r15769, r15767, MPFR_RNDN);
        mpfr_add(r15770, r15768, r15769, MPFR_RNDN);
        return mpfr_get_d(r15770, MPFR_RNDN);
}

static mpfr_t r15771, r15772, r15773, r15774;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15771);
        mpfr_init(r15772);
        mpfr_init(r15773);
        mpfr_init(r15774);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15771, c, MPFR_RNDN);
        mpfr_cos(r15772, r15771, MPFR_RNDN);
        mpfr_sqrt(r15773, r15771, MPFR_RNDN);
        mpfr_add(r15774, r15772, r15773, MPFR_RNDN);
        return mpfr_get_d(r15774, MPFR_RNDN);
}

static mpfr_t r15775, r15776, r15777, r15778;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15775);
        mpfr_init(r15776);
        mpfr_init(r15777);
        mpfr_init(r15778);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15775, c, MPFR_RNDN);
        mpfr_cos(r15776, r15775, MPFR_RNDN);
        mpfr_sqrt(r15777, r15775, MPFR_RNDN);
        mpfr_add(r15778, r15776, r15777, MPFR_RNDN);
        return mpfr_get_d(r15778, MPFR_RNDN);
}

