#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 r15623 = c;
        float r15624 = cos(r15623);
        float r15625 = sqrt(r15623);
        float r15626 = r15624 + r15625;
        return r15626;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15627 = c;
        double r15628 = cos(r15627);
        double r15629 = sqrt(r15627);
        double r15630 = r15628 + r15629;
        return r15630;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15631 = c;
        float r15632 = cos(r15631);
        float r15633 = sqrt(r15631);
        float r15634 = r15632 + r15633;
        return r15634;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15635 = c;
        double r15636 = cos(r15635);
        double r15637 = sqrt(r15635);
        double r15638 = r15636 + r15637;
        return r15638;
}

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 r15639, r15640, r15641, r15642;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15639);
        mpfr_init(r15640);
        mpfr_init(r15641);
        mpfr_init(r15642);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15639, c, MPFR_RNDN);
        mpfr_cos(r15640, r15639, MPFR_RNDN);
        mpfr_sqrt(r15641, r15639, MPFR_RNDN);
        mpfr_add(r15642, r15640, r15641, MPFR_RNDN);
        return mpfr_get_d(r15642, MPFR_RNDN);
}

static mpfr_t r15643, r15644, r15645, r15646;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15643);
        mpfr_init(r15644);
        mpfr_init(r15645);
        mpfr_init(r15646);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15643, c, MPFR_RNDN);
        mpfr_cos(r15644, r15643, MPFR_RNDN);
        mpfr_sqrt(r15645, r15643, MPFR_RNDN);
        mpfr_add(r15646, r15644, r15645, MPFR_RNDN);
        return mpfr_get_d(r15646, MPFR_RNDN);
}

static mpfr_t r15647, r15648, r15649, r15650;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15647);
        mpfr_init(r15648);
        mpfr_init(r15649);
        mpfr_init(r15650);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15647, c, MPFR_RNDN);
        mpfr_cos(r15648, r15647, MPFR_RNDN);
        mpfr_sqrt(r15649, r15647, MPFR_RNDN);
        mpfr_add(r15650, r15648, r15649, MPFR_RNDN);
        return mpfr_get_d(r15650, MPFR_RNDN);
}

