#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 r15491 = c;
        float r15492 = cos(r15491);
        float r15493 = sqrt(r15491);
        float r15494 = r15492 + r15493;
        return r15494;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15495 = c;
        double r15496 = cos(r15495);
        double r15497 = sqrt(r15495);
        double r15498 = r15496 + r15497;
        return r15498;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15499 = c;
        float r15500 = cos(r15499);
        float r15501 = sqrt(r15499);
        float r15502 = r15500 + r15501;
        return r15502;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15503 = c;
        double r15504 = cos(r15503);
        double r15505 = sqrt(r15503);
        double r15506 = r15504 + r15505;
        return r15506;
}

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 r15507, r15508, r15509, r15510;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15507);
        mpfr_init(r15508);
        mpfr_init(r15509);
        mpfr_init(r15510);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15507, c, MPFR_RNDN);
        mpfr_cos(r15508, r15507, MPFR_RNDN);
        mpfr_sqrt(r15509, r15507, MPFR_RNDN);
        mpfr_add(r15510, r15508, r15509, MPFR_RNDN);
        return mpfr_get_d(r15510, MPFR_RNDN);
}

static mpfr_t r15511, r15512, r15513, r15514;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15511);
        mpfr_init(r15512);
        mpfr_init(r15513);
        mpfr_init(r15514);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15511, c, MPFR_RNDN);
        mpfr_cos(r15512, r15511, MPFR_RNDN);
        mpfr_sqrt(r15513, r15511, MPFR_RNDN);
        mpfr_add(r15514, r15512, r15513, MPFR_RNDN);
        return mpfr_get_d(r15514, MPFR_RNDN);
}

static mpfr_t r15515, r15516, r15517, r15518;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15515);
        mpfr_init(r15516);
        mpfr_init(r15517);
        mpfr_init(r15518);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15515, c, MPFR_RNDN);
        mpfr_cos(r15516, r15515, MPFR_RNDN);
        mpfr_sqrt(r15517, r15515, MPFR_RNDN);
        mpfr_add(r15518, r15516, r15517, MPFR_RNDN);
        return mpfr_get_d(r15518, MPFR_RNDN);
}

