#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 r15478 = c;
        float r15479 = cos(r15478);
        float r15480 = sqrt(r15478);
        float r15481 = r15479 + r15480;
        return r15481;
}

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


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

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15490 = c;
        double r15491 = cos(r15490);
        double r15492 = sqrt(r15490);
        double r15493 = r15491 + r15492;
        return r15493;
}

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 r15494, r15495, r15496, r15497;

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

double f_im(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_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15498);
        mpfr_init(r15499);
        mpfr_init(r15500);
        mpfr_init(r15501);
}

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

static mpfr_t r15502, r15503, r15504, r15505;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15502);
        mpfr_init(r15503);
        mpfr_init(r15504);
        mpfr_init(r15505);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15502, c, MPFR_RNDN);
        mpfr_cos(r15503, r15502, MPFR_RNDN);
        mpfr_sqrt(r15504, r15502, MPFR_RNDN);
        mpfr_add(r15505, r15503, r15504, MPFR_RNDN);
        return mpfr_get_d(r15505, MPFR_RNDN);
}

