#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 r15580 = c;
        float r15581 = cos(r15580);
        float r15582 = sqrt(r15580);
        float r15583 = r15581 + r15582;
        return r15583;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15584 = c;
        double r15585 = cos(r15584);
        double r15586 = sqrt(r15584);
        double r15587 = r15585 + r15586;
        return r15587;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15588 = c;
        float r15589 = cos(r15588);
        float r15590 = sqrt(r15588);
        float r15591 = r15589 + r15590;
        return r15591;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15592 = c;
        double r15593 = cos(r15592);
        double r15594 = sqrt(r15592);
        double r15595 = r15593 + r15594;
        return r15595;
}

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 r15596, r15597, r15598, r15599;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15596);
        mpfr_init(r15597);
        mpfr_init(r15598);
        mpfr_init(r15599);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15596, c, MPFR_RNDN);
        mpfr_cos(r15597, r15596, MPFR_RNDN);
        mpfr_sqrt(r15598, r15596, MPFR_RNDN);
        mpfr_add(r15599, r15597, r15598, MPFR_RNDN);
        return mpfr_get_d(r15599, MPFR_RNDN);
}

static mpfr_t r15600, r15601, r15602, r15603;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15600);
        mpfr_init(r15601);
        mpfr_init(r15602);
        mpfr_init(r15603);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15600, c, MPFR_RNDN);
        mpfr_cos(r15601, r15600, MPFR_RNDN);
        mpfr_sqrt(r15602, r15600, MPFR_RNDN);
        mpfr_add(r15603, r15601, r15602, MPFR_RNDN);
        return mpfr_get_d(r15603, MPFR_RNDN);
}

static mpfr_t r15604, r15605, r15606, r15607;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15604);
        mpfr_init(r15605);
        mpfr_init(r15606);
        mpfr_init(r15607);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15604, c, MPFR_RNDN);
        mpfr_cos(r15605, r15604, MPFR_RNDN);
        mpfr_sqrt(r15606, r15604, MPFR_RNDN);
        mpfr_add(r15607, r15605, r15606, MPFR_RNDN);
        return mpfr_get_d(r15607, MPFR_RNDN);
}

