#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 r15566 = c;
        float r15567 = cos(r15566);
        float r15568 = sqrt(r15566);
        float r15569 = r15567 + r15568;
        return r15569;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15570 = c;
        double r15571 = cos(r15570);
        double r15572 = sqrt(r15570);
        double r15573 = r15571 + r15572;
        return r15573;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15574 = c;
        float r15575 = cos(r15574);
        float r15576 = sqrt(r15574);
        float r15577 = r15575 + r15576;
        return r15577;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15578 = c;
        double r15579 = cos(r15578);
        double r15580 = sqrt(r15578);
        double r15581 = r15579 + r15580;
        return r15581;
}

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 r15582, r15583, r15584, r15585;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15582);
        mpfr_init(r15583);
        mpfr_init(r15584);
        mpfr_init(r15585);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15582, c, MPFR_RNDN);
        mpfr_cos(r15583, r15582, MPFR_RNDN);
        mpfr_sqrt(r15584, r15582, MPFR_RNDN);
        mpfr_add(r15585, r15583, r15584, MPFR_RNDN);
        return mpfr_get_d(r15585, MPFR_RNDN);
}

static mpfr_t r15586, r15587, r15588, r15589;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15586);
        mpfr_init(r15587);
        mpfr_init(r15588);
        mpfr_init(r15589);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15586, c, MPFR_RNDN);
        mpfr_cos(r15587, r15586, MPFR_RNDN);
        mpfr_sqrt(r15588, r15586, MPFR_RNDN);
        mpfr_add(r15589, r15587, r15588, MPFR_RNDN);
        return mpfr_get_d(r15589, MPFR_RNDN);
}

static mpfr_t r15590, r15591, r15592, r15593;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15590);
        mpfr_init(r15591);
        mpfr_init(r15592);
        mpfr_init(r15593);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15590, c, MPFR_RNDN);
        mpfr_cos(r15591, r15590, MPFR_RNDN);
        mpfr_sqrt(r15592, r15590, MPFR_RNDN);
        mpfr_add(r15593, r15591, r15592, MPFR_RNDN);
        return mpfr_get_d(r15593, MPFR_RNDN);
}

