#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 r15631 = c;
        float r15632 = cos(r15631);
        float r15633 = sqrt(r15631);
        float r15634 = r15632 + r15633;
        return r15634;
}

double f_id(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;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15639 = c;
        float r15640 = cos(r15639);
        float r15641 = sqrt(r15639);
        float r15642 = r15640 + r15641;
        return r15642;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15643 = c;
        double r15644 = cos(r15643);
        double r15645 = sqrt(r15643);
        double r15646 = r15644 + r15645;
        return r15646;
}

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 r15647, r15648, r15649, r15650;

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

double f_im(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);
}

static mpfr_t r15651, r15652, r15653, r15654;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15651);
        mpfr_init(r15652);
        mpfr_init(r15653);
        mpfr_init(r15654);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15651, c, MPFR_RNDN);
        mpfr_cos(r15652, r15651, MPFR_RNDN);
        mpfr_sqrt(r15653, r15651, MPFR_RNDN);
        mpfr_add(r15654, r15652, r15653, MPFR_RNDN);
        return mpfr_get_d(r15654, MPFR_RNDN);
}

static mpfr_t r15655, r15656, r15657, r15658;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15655);
        mpfr_init(r15656);
        mpfr_init(r15657);
        mpfr_init(r15658);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15655, c, MPFR_RNDN);
        mpfr_cos(r15656, r15655, MPFR_RNDN);
        mpfr_sqrt(r15657, r15655, MPFR_RNDN);
        mpfr_add(r15658, r15656, r15657, MPFR_RNDN);
        return mpfr_get_d(r15658, MPFR_RNDN);
}

