#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 r15660 = c;
        float r15661 = cos(r15660);
        float r15662 = sqrt(r15660);
        float r15663 = r15661 + r15662;
        return r15663;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15664 = c;
        double r15665 = cos(r15664);
        double r15666 = sqrt(r15664);
        double r15667 = r15665 + r15666;
        return r15667;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15668 = c;
        float r15669 = cos(r15668);
        float r15670 = sqrt(r15668);
        float r15671 = r15669 + r15670;
        return r15671;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15672 = c;
        double r15673 = cos(r15672);
        double r15674 = sqrt(r15672);
        double r15675 = r15673 + r15674;
        return r15675;
}

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 r15676, r15677, r15678, r15679;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15676);
        mpfr_init(r15677);
        mpfr_init(r15678);
        mpfr_init(r15679);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15676, c, MPFR_RNDN);
        mpfr_cos(r15677, r15676, MPFR_RNDN);
        mpfr_sqrt(r15678, r15676, MPFR_RNDN);
        mpfr_add(r15679, r15677, r15678, MPFR_RNDN);
        return mpfr_get_d(r15679, MPFR_RNDN);
}

static mpfr_t r15680, r15681, r15682, r15683;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15680);
        mpfr_init(r15681);
        mpfr_init(r15682);
        mpfr_init(r15683);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15680, c, MPFR_RNDN);
        mpfr_cos(r15681, r15680, MPFR_RNDN);
        mpfr_sqrt(r15682, r15680, MPFR_RNDN);
        mpfr_add(r15683, r15681, r15682, MPFR_RNDN);
        return mpfr_get_d(r15683, MPFR_RNDN);
}

static mpfr_t r15684, r15685, r15686, r15687;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15684);
        mpfr_init(r15685);
        mpfr_init(r15686);
        mpfr_init(r15687);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15684, c, MPFR_RNDN);
        mpfr_cos(r15685, r15684, MPFR_RNDN);
        mpfr_sqrt(r15686, r15684, MPFR_RNDN);
        mpfr_add(r15687, r15685, r15686, MPFR_RNDN);
        return mpfr_get_d(r15687, MPFR_RNDN);
}

