#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 r15455 = c;
        float r15456 = cos(r15455);
        float r15457 = sqrt(r15455);
        float r15458 = r15456 + r15457;
        return r15458;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15459 = c;
        double r15460 = cos(r15459);
        double r15461 = sqrt(r15459);
        double r15462 = r15460 + r15461;
        return r15462;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15463 = c;
        float r15464 = cos(r15463);
        float r15465 = sqrt(r15463);
        float r15466 = r15464 + r15465;
        return r15466;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15467 = c;
        double r15468 = cos(r15467);
        double r15469 = sqrt(r15467);
        double r15470 = r15468 + r15469;
        return r15470;
}

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 r15471, r15472, r15473, r15474;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15471);
        mpfr_init(r15472);
        mpfr_init(r15473);
        mpfr_init(r15474);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15471, c, MPFR_RNDN);
        mpfr_cos(r15472, r15471, MPFR_RNDN);
        mpfr_sqrt(r15473, r15471, MPFR_RNDN);
        mpfr_add(r15474, r15472, r15473, MPFR_RNDN);
        return mpfr_get_d(r15474, MPFR_RNDN);
}

static mpfr_t r15475, r15476, r15477, r15478;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15475);
        mpfr_init(r15476);
        mpfr_init(r15477);
        mpfr_init(r15478);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15475, c, MPFR_RNDN);
        mpfr_cos(r15476, r15475, MPFR_RNDN);
        mpfr_sqrt(r15477, r15475, MPFR_RNDN);
        mpfr_add(r15478, r15476, r15477, MPFR_RNDN);
        return mpfr_get_d(r15478, MPFR_RNDN);
}

static mpfr_t r15479, r15480, r15481, r15482;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15479);
        mpfr_init(r15480);
        mpfr_init(r15481);
        mpfr_init(r15482);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15479, c, MPFR_RNDN);
        mpfr_cos(r15480, r15479, MPFR_RNDN);
        mpfr_sqrt(r15481, r15479, MPFR_RNDN);
        mpfr_add(r15482, r15480, r15481, MPFR_RNDN);
        return mpfr_get_d(r15482, MPFR_RNDN);
}

