#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 r15644 = c;
        float r15645 = cos(r15644);
        float r15646 = sqrt(r15644);
        float r15647 = r15645 + r15646;
        return r15647;
}

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


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15652 = c;
        float r15653 = cos(r15652);
        float r15654 = sqrt(r15652);
        float r15655 = r15653 + r15654;
        return r15655;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15656 = c;
        double r15657 = cos(r15656);
        double r15658 = sqrt(r15656);
        double r15659 = r15657 + r15658;
        return r15659;
}

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 r15660, r15661, r15662, r15663;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15660);
        mpfr_init(r15661);
        mpfr_init(r15662);
        mpfr_init(r15663);
}

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

static mpfr_t r15664, r15665, r15666, r15667;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15664);
        mpfr_init(r15665);
        mpfr_init(r15666);
        mpfr_init(r15667);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15664, c, MPFR_RNDN);
        mpfr_cos(r15665, r15664, MPFR_RNDN);
        mpfr_sqrt(r15666, r15664, MPFR_RNDN);
        mpfr_add(r15667, r15665, r15666, MPFR_RNDN);
        return mpfr_get_d(r15667, MPFR_RNDN);
}

static mpfr_t r15668, r15669, r15670, r15671;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15668);
        mpfr_init(r15669);
        mpfr_init(r15670);
        mpfr_init(r15671);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15668, c, MPFR_RNDN);
        mpfr_cos(r15669, r15668, MPFR_RNDN);
        mpfr_sqrt(r15670, r15668, MPFR_RNDN);
        mpfr_add(r15671, r15669, r15670, MPFR_RNDN);
        return mpfr_get_d(r15671, MPFR_RNDN);
}

