#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 r15635 = c;
        float r15636 = cos(r15635);
        float r15637 = sqrt(r15635);
        float r15638 = r15636 + r15637;
        return r15638;
}

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


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

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15647 = c;
        double r15648 = cos(r15647);
        double r15649 = sqrt(r15647);
        double r15650 = r15648 + r15649;
        return r15650;
}

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 r15651, r15652, r15653, r15654;

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

double f_im(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_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15655);
        mpfr_init(r15656);
        mpfr_init(r15657);
        mpfr_init(r15658);
}

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

static mpfr_t r15659, r15660, r15661, r15662;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15659);
        mpfr_init(r15660);
        mpfr_init(r15661);
        mpfr_init(r15662);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15659, c, MPFR_RNDN);
        mpfr_cos(r15660, r15659, MPFR_RNDN);
        mpfr_sqrt(r15661, r15659, MPFR_RNDN);
        mpfr_add(r15662, r15660, r15661, MPFR_RNDN);
        return mpfr_get_d(r15662, MPFR_RNDN);
}

