#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 r15527 = c;
        float r15528 = cos(r15527);
        float r15529 = sqrt(r15527);
        float r15530 = r15528 + r15529;
        return r15530;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15531 = c;
        double r15532 = cos(r15531);
        double r15533 = sqrt(r15531);
        double r15534 = r15532 + r15533;
        return r15534;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15535 = c;
        float r15536 = cos(r15535);
        float r15537 = sqrt(r15535);
        float r15538 = r15536 + r15537;
        return r15538;
}

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

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 r15543, r15544, r15545, r15546;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15543);
        mpfr_init(r15544);
        mpfr_init(r15545);
        mpfr_init(r15546);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15543, c, MPFR_RNDN);
        mpfr_cos(r15544, r15543, MPFR_RNDN);
        mpfr_sqrt(r15545, r15543, MPFR_RNDN);
        mpfr_add(r15546, r15544, r15545, MPFR_RNDN);
        return mpfr_get_d(r15546, MPFR_RNDN);
}

static mpfr_t r15547, r15548, r15549, r15550;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15547);
        mpfr_init(r15548);
        mpfr_init(r15549);
        mpfr_init(r15550);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15547, c, MPFR_RNDN);
        mpfr_cos(r15548, r15547, MPFR_RNDN);
        mpfr_sqrt(r15549, r15547, MPFR_RNDN);
        mpfr_add(r15550, r15548, r15549, MPFR_RNDN);
        return mpfr_get_d(r15550, MPFR_RNDN);
}

static mpfr_t r15551, r15552, r15553, r15554;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15551);
        mpfr_init(r15552);
        mpfr_init(r15553);
        mpfr_init(r15554);
}

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

