#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 r15530 = c;
        float r15531 = cos(r15530);
        float r15532 = sqrt(r15530);
        float r15533 = r15531 + r15532;
        return r15533;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15534 = c;
        double r15535 = cos(r15534);
        double r15536 = sqrt(r15534);
        double r15537 = r15535 + r15536;
        return r15537;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15538 = c;
        float r15539 = cos(r15538);
        float r15540 = sqrt(r15538);
        float r15541 = r15539 + r15540;
        return r15541;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15542 = c;
        double r15543 = cos(r15542);
        double r15544 = sqrt(r15542);
        double r15545 = r15543 + r15544;
        return r15545;
}

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 r15546, r15547, r15548, r15549;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15546);
        mpfr_init(r15547);
        mpfr_init(r15548);
        mpfr_init(r15549);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15546, c, MPFR_RNDN);
        mpfr_cos(r15547, r15546, MPFR_RNDN);
        mpfr_sqrt(r15548, r15546, MPFR_RNDN);
        mpfr_add(r15549, r15547, r15548, MPFR_RNDN);
        return mpfr_get_d(r15549, MPFR_RNDN);
}

static mpfr_t r15550, r15551, r15552, r15553;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15550);
        mpfr_init(r15551);
        mpfr_init(r15552);
        mpfr_init(r15553);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15550, c, MPFR_RNDN);
        mpfr_cos(r15551, r15550, MPFR_RNDN);
        mpfr_sqrt(r15552, r15550, MPFR_RNDN);
        mpfr_add(r15553, r15551, r15552, MPFR_RNDN);
        return mpfr_get_d(r15553, MPFR_RNDN);
}

static mpfr_t r15554, r15555, r15556, r15557;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15554);
        mpfr_init(r15555);
        mpfr_init(r15556);
        mpfr_init(r15557);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15554, c, MPFR_RNDN);
        mpfr_cos(r15555, r15554, MPFR_RNDN);
        mpfr_sqrt(r15556, r15554, MPFR_RNDN);
        mpfr_add(r15557, r15555, r15556, MPFR_RNDN);
        return mpfr_get_d(r15557, MPFR_RNDN);
}

