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

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


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

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

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

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

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

static mpfr_t r15510, r15511, r15512, r15513;

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

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

static mpfr_t r15514, r15515, r15516, r15517;

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

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

