#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 r15651 = c;
        float r15652 = cos(r15651);
        float r15653 = sqrt(r15651);
        float r15654 = r15652 + r15653;
        return r15654;
}

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


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15659 = c;
        float r15660 = cos(r15659);
        float r15661 = sqrt(r15659);
        float r15662 = r15660 + r15661;
        return r15662;
}

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

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 r15667, r15668, r15669, r15670;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15667);
        mpfr_init(r15668);
        mpfr_init(r15669);
        mpfr_init(r15670);
}

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

static mpfr_t r15671, r15672, r15673, r15674;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15671);
        mpfr_init(r15672);
        mpfr_init(r15673);
        mpfr_init(r15674);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15671, c, MPFR_RNDN);
        mpfr_cos(r15672, r15671, MPFR_RNDN);
        mpfr_sqrt(r15673, r15671, MPFR_RNDN);
        mpfr_add(r15674, r15672, r15673, MPFR_RNDN);
        return mpfr_get_d(r15674, MPFR_RNDN);
}

static mpfr_t r15675, r15676, r15677, r15678;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15675);
        mpfr_init(r15676);
        mpfr_init(r15677);
        mpfr_init(r15678);
}

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

