#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 r15536 = c;
        float r15537 = cos(r15536);
        float r15538 = sqrt(r15536);
        float r15539 = r15537 + r15538;
        return r15539;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15540 = c;
        double r15541 = cos(r15540);
        double r15542 = sqrt(r15540);
        double r15543 = r15541 + r15542;
        return r15543;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15544 = c;
        float r15545 = cos(r15544);
        float r15546 = sqrt(r15544);
        float r15547 = r15545 + r15546;
        return r15547;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15548 = c;
        double r15549 = cos(r15548);
        double r15550 = sqrt(r15548);
        double r15551 = r15549 + r15550;
        return r15551;
}

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 r15552, r15553, r15554, r15555;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15552);
        mpfr_init(r15553);
        mpfr_init(r15554);
        mpfr_init(r15555);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15552, c, MPFR_RNDN);
        mpfr_cos(r15553, r15552, MPFR_RNDN);
        mpfr_sqrt(r15554, r15552, MPFR_RNDN);
        mpfr_add(r15555, r15553, r15554, MPFR_RNDN);
        return mpfr_get_d(r15555, MPFR_RNDN);
}

static mpfr_t r15556, r15557, r15558, r15559;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15556);
        mpfr_init(r15557);
        mpfr_init(r15558);
        mpfr_init(r15559);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15556, c, MPFR_RNDN);
        mpfr_cos(r15557, r15556, MPFR_RNDN);
        mpfr_sqrt(r15558, r15556, MPFR_RNDN);
        mpfr_add(r15559, r15557, r15558, MPFR_RNDN);
        return mpfr_get_d(r15559, MPFR_RNDN);
}

static mpfr_t r15560, r15561, r15562, r15563;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15560);
        mpfr_init(r15561);
        mpfr_init(r15562);
        mpfr_init(r15563);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15560, c, MPFR_RNDN);
        mpfr_cos(r15561, r15560, MPFR_RNDN);
        mpfr_sqrt(r15562, r15560, MPFR_RNDN);
        mpfr_add(r15563, r15561, r15562, MPFR_RNDN);
        return mpfr_get_d(r15563, MPFR_RNDN);
}

