#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 r15470 = c;
        float r15471 = cos(r15470);
        float r15472 = sqrt(r15470);
        float r15473 = r15471 + r15472;
        return r15473;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15474 = c;
        double r15475 = cos(r15474);
        double r15476 = sqrt(r15474);
        double r15477 = r15475 + r15476;
        return r15477;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15478 = c;
        float r15479 = cos(r15478);
        float r15480 = sqrt(r15478);
        float r15481 = r15479 + r15480;
        return r15481;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15482 = c;
        double r15483 = cos(r15482);
        double r15484 = sqrt(r15482);
        double r15485 = r15483 + r15484;
        return r15485;
}

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 r15486, r15487, r15488, r15489;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15486);
        mpfr_init(r15487);
        mpfr_init(r15488);
        mpfr_init(r15489);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15486, c, MPFR_RNDN);
        mpfr_cos(r15487, r15486, MPFR_RNDN);
        mpfr_sqrt(r15488, r15486, MPFR_RNDN);
        mpfr_add(r15489, r15487, r15488, MPFR_RNDN);
        return mpfr_get_d(r15489, MPFR_RNDN);
}

static mpfr_t r15490, r15491, r15492, r15493;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15490);
        mpfr_init(r15491);
        mpfr_init(r15492);
        mpfr_init(r15493);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15490, c, MPFR_RNDN);
        mpfr_cos(r15491, r15490, MPFR_RNDN);
        mpfr_sqrt(r15492, r15490, MPFR_RNDN);
        mpfr_add(r15493, r15491, r15492, MPFR_RNDN);
        return mpfr_get_d(r15493, MPFR_RNDN);
}

static mpfr_t r15494, r15495, r15496, r15497;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15494);
        mpfr_init(r15495);
        mpfr_init(r15496);
        mpfr_init(r15497);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15494, c, MPFR_RNDN);
        mpfr_cos(r15495, r15494, MPFR_RNDN);
        mpfr_sqrt(r15496, r15494, MPFR_RNDN);
        mpfr_add(r15497, r15495, r15496, MPFR_RNDN);
        return mpfr_get_d(r15497, MPFR_RNDN);
}

