#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 r15735 = c;
        float r15736 = cos(r15735);
        float r15737 = sqrt(r15735);
        float r15738 = r15736 + r15737;
        return r15738;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15739 = c;
        double r15740 = cos(r15739);
        double r15741 = sqrt(r15739);
        double r15742 = r15740 + r15741;
        return r15742;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15743 = c;
        float r15744 = cos(r15743);
        float r15745 = sqrt(r15743);
        float r15746 = r15744 + r15745;
        return r15746;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15747 = c;
        double r15748 = cos(r15747);
        double r15749 = sqrt(r15747);
        double r15750 = r15748 + r15749;
        return r15750;
}

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 r15751, r15752, r15753, r15754;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15751);
        mpfr_init(r15752);
        mpfr_init(r15753);
        mpfr_init(r15754);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15751, c, MPFR_RNDN);
        mpfr_cos(r15752, r15751, MPFR_RNDN);
        mpfr_sqrt(r15753, r15751, MPFR_RNDN);
        mpfr_add(r15754, r15752, r15753, MPFR_RNDN);
        return mpfr_get_d(r15754, MPFR_RNDN);
}

static mpfr_t r15755, r15756, r15757, r15758;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15755);
        mpfr_init(r15756);
        mpfr_init(r15757);
        mpfr_init(r15758);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15755, c, MPFR_RNDN);
        mpfr_cos(r15756, r15755, MPFR_RNDN);
        mpfr_sqrt(r15757, r15755, MPFR_RNDN);
        mpfr_add(r15758, r15756, r15757, MPFR_RNDN);
        return mpfr_get_d(r15758, MPFR_RNDN);
}

static mpfr_t r15759, r15760, r15761, r15762;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15759);
        mpfr_init(r15760);
        mpfr_init(r15761);
        mpfr_init(r15762);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15759, c, MPFR_RNDN);
        mpfr_cos(r15760, r15759, MPFR_RNDN);
        mpfr_sqrt(r15761, r15759, MPFR_RNDN);
        mpfr_add(r15762, r15760, r15761, MPFR_RNDN);
        return mpfr_get_d(r15762, MPFR_RNDN);
}

