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

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


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

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

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

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

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

static mpfr_t r15499, r15500, r15501, r15502;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15499);
        mpfr_init(r15500);
        mpfr_init(r15501);
        mpfr_init(r15502);
}

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

static mpfr_t r15503, r15504, r15505, r15506;

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

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

