#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 r15550 = c;
        float r15551 = cos(r15550);
        float r15552 = sqrt(r15550);
        float r15553 = r15551 + r15552;
        return r15553;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15554 = c;
        double r15555 = cos(r15554);
        double r15556 = sqrt(r15554);
        double r15557 = r15555 + r15556;
        return r15557;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15558 = c;
        float r15559 = cos(r15558);
        float r15560 = sqrt(r15558);
        float r15561 = r15559 + r15560;
        return r15561;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15562 = c;
        double r15563 = cos(r15562);
        double r15564 = sqrt(r15562);
        double r15565 = r15563 + r15564;
        return r15565;
}

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 r15566, r15567, r15568, r15569;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15566);
        mpfr_init(r15567);
        mpfr_init(r15568);
        mpfr_init(r15569);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15566, c, MPFR_RNDN);
        mpfr_cos(r15567, r15566, MPFR_RNDN);
        mpfr_sqrt(r15568, r15566, MPFR_RNDN);
        mpfr_add(r15569, r15567, r15568, MPFR_RNDN);
        return mpfr_get_d(r15569, MPFR_RNDN);
}

static mpfr_t r15570, r15571, r15572, r15573;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15570);
        mpfr_init(r15571);
        mpfr_init(r15572);
        mpfr_init(r15573);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15570, c, MPFR_RNDN);
        mpfr_cos(r15571, r15570, MPFR_RNDN);
        mpfr_sqrt(r15572, r15570, MPFR_RNDN);
        mpfr_add(r15573, r15571, r15572, MPFR_RNDN);
        return mpfr_get_d(r15573, MPFR_RNDN);
}

static mpfr_t r15574, r15575, r15576, r15577;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15574);
        mpfr_init(r15575);
        mpfr_init(r15576);
        mpfr_init(r15577);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15574, c, MPFR_RNDN);
        mpfr_cos(r15575, r15574, MPFR_RNDN);
        mpfr_sqrt(r15576, r15574, MPFR_RNDN);
        mpfr_add(r15577, r15575, r15576, MPFR_RNDN);
        return mpfr_get_d(r15577, MPFR_RNDN);
}

