#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 r15474 = c;
        float r15475 = cos(r15474);
        float r15476 = sqrt(r15474);
        float r15477 = r15475 + r15476;
        return r15477;
}

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


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

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15486 = c;
        double r15487 = cos(r15486);
        double r15488 = sqrt(r15486);
        double r15489 = r15487 + r15488;
        return r15489;
}

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 r15490, r15491, r15492, r15493;

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

double f_im(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_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15494);
        mpfr_init(r15495);
        mpfr_init(r15496);
        mpfr_init(r15497);
}

double f_fm(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);
}

static mpfr_t r15498, r15499, r15500, r15501;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15498);
        mpfr_init(r15499);
        mpfr_init(r15500);
        mpfr_init(r15501);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15498, c, MPFR_RNDN);
        mpfr_cos(r15499, r15498, MPFR_RNDN);
        mpfr_sqrt(r15500, r15498, MPFR_RNDN);
        mpfr_add(r15501, r15499, r15500, MPFR_RNDN);
        return mpfr_get_d(r15501, MPFR_RNDN);
}

