#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 r15467 = c;
        float r15468 = cos(r15467);
        float r15469 = sqrt(r15467);
        float r15470 = r15468 + r15469;
        return r15470;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15471 = c;
        double r15472 = cos(r15471);
        double r15473 = sqrt(r15471);
        double r15474 = r15472 + r15473;
        return r15474;
}


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

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

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 r15483, r15484, r15485, r15486;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15483);
        mpfr_init(r15484);
        mpfr_init(r15485);
        mpfr_init(r15486);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15483, c, MPFR_RNDN);
        mpfr_cos(r15484, r15483, MPFR_RNDN);
        mpfr_sqrt(r15485, r15483, MPFR_RNDN);
        mpfr_add(r15486, r15484, r15485, MPFR_RNDN);
        return mpfr_get_d(r15486, MPFR_RNDN);
}

static mpfr_t r15487, r15488, r15489, r15490;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15487);
        mpfr_init(r15488);
        mpfr_init(r15489);
        mpfr_init(r15490);
}

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

static mpfr_t r15491, r15492, r15493, r15494;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15491);
        mpfr_init(r15492);
        mpfr_init(r15493);
        mpfr_init(r15494);
}

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

