#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 r15811 = c;
        float r15812 = cos(r15811);
        float r15813 = sqrt(r15811);
        float r15814 = r15812 + r15813;
        return r15814;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15815 = c;
        double r15816 = cos(r15815);
        double r15817 = sqrt(r15815);
        double r15818 = r15816 + r15817;
        return r15818;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c) {
        float r15819 = c;
        float r15820 = cos(r15819);
        float r15821 = sqrt(r15819);
        float r15822 = r15820 + r15821;
        return r15822;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        double r15823 = c;
        double r15824 = cos(r15823);
        double r15825 = sqrt(r15823);
        double r15826 = r15824 + r15825;
        return r15826;
}

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 r15827, r15828, r15829, r15830;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15827);
        mpfr_init(r15828);
        mpfr_init(r15829);
        mpfr_init(r15830);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15827, c, MPFR_RNDN);
        mpfr_cos(r15828, r15827, MPFR_RNDN);
        mpfr_sqrt(r15829, r15827, MPFR_RNDN);
        mpfr_add(r15830, r15828, r15829, MPFR_RNDN);
        return mpfr_get_d(r15830, MPFR_RNDN);
}

static mpfr_t r15831, r15832, r15833, r15834;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15831);
        mpfr_init(r15832);
        mpfr_init(r15833);
        mpfr_init(r15834);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15831, c, MPFR_RNDN);
        mpfr_cos(r15832, r15831, MPFR_RNDN);
        mpfr_sqrt(r15833, r15831, MPFR_RNDN);
        mpfr_add(r15834, r15832, r15833, MPFR_RNDN);
        return mpfr_get_d(r15834, MPFR_RNDN);
}

static mpfr_t r15835, r15836, r15837, r15838;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15835);
        mpfr_init(r15836);
        mpfr_init(r15837);
        mpfr_init(r15838);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c) {
        mpfr_set_d(r15835, c, MPFR_RNDN);
        mpfr_cos(r15836, r15835, MPFR_RNDN);
        mpfr_sqrt(r15837, r15835, MPFR_RNDN);
        mpfr_add(r15838, r15836, r15837, MPFR_RNDN);
        return mpfr_get_d(r15838, MPFR_RNDN);
}

