#include <tgmath.h>
#include <gmp.h>
#include <mpfr.h>
#include <stdio.h>
#include <stdbool.h>

char *name = "(fmod (* (expm1 d) c) (atan2 8.61318337292339e-131 d))";

double f_if(float __attribute__((unused)) a, float __attribute__((unused)) b, float c, float d) {
        float r14988 = d;
        float r14989 = expm1(r14988);
        float r14990 = c;
        float r14991 = r14989 * r14990;
        float r14992 = 8.61318337292339e-131f;
        float r14993 = atan2(r14992, r14988);
        float r14994 = fmod(r14991, r14993);
        return r14994;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r14995 = d;
        double r14996 = expm1(r14995);
        double r14997 = c;
        double r14998 = r14996 * r14997;
        double r14999 = 8.61318337292339e-131;
        double r15000 = atan2(r14999, r14995);
        double r15001 = fmod(r14998, r15000);
        return r15001;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c, float d) {
        float r15002 = d;
        float r15003 = expm1(r15002);
        float r15004 = c;
        float r15005 = r15003 * r15004;
        float r15006 = sqrt(r15005);
        float r15007 = sqrt(r15006);
        float r15008 = r15007 * r15007;
        float r15009 = r15008 * r15008;
        float r15010 = 8.61318337292339e-131f;
        float r15011 = atan2(r15010, r15002);
        float r15012 = fmod(r15009, r15011);
        return r15012;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r15013 = d;
        double r15014 = expm1(r15013);
        double r15015 = c;
        double r15016 = r15014 * r15015;
        double r15017 = sqrt(r15016);
        double r15018 = sqrt(r15017);
        double r15019 = r15018 * r15018;
        double r15020 = r15019 * r15019;
        double r15021 = 8.61318337292339e-131;
        double r15022 = atan2(r15021, r15013);
        double r15023 = fmod(r15020, r15022);
        return r15023;
}

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 r15024, r15025, r15026, r15027, r15028, r15029, r15030;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15024);
        mpfr_init(r15025);
        mpfr_init(r15026);
        mpfr_init(r15027);
        mpfr_init_set_str(r15028, "8.61318337292339e-131", 10, MPFR_RNDN);
        mpfr_init(r15029);
        mpfr_init(r15030);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15024, d, MPFR_RNDN);
        mpfr_expm1(r15025, r15024, MPFR_RNDN);
        mpfr_set_d(r15026, c, MPFR_RNDN);
        mpfr_mul(r15027, r15025, r15026, MPFR_RNDN);
        ;
        mpfr_atan2(r15029, r15028, r15024, MPFR_RNDN);
        mpfr_fmod(r15030, r15027, r15029, MPFR_RNDN);
        return mpfr_get_d(r15030, MPFR_RNDN);
}

static mpfr_t r15031, r15032, r15033, r15034, r15035, r15036, r15037, r15038, r15039, r15040, r15041;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15031);
        mpfr_init(r15032);
        mpfr_init(r15033);
        mpfr_init(r15034);
        mpfr_init(r15035);
        mpfr_init(r15036);
        mpfr_init(r15037);
        mpfr_init(r15038);
        mpfr_init_set_str(r15039, "8.61318337292339e-131", 10, MPFR_RNDN);
        mpfr_init(r15040);
        mpfr_init(r15041);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15031, d, MPFR_RNDN);
        mpfr_expm1(r15032, r15031, MPFR_RNDN);
        mpfr_set_d(r15033, c, MPFR_RNDN);
        mpfr_mul(r15034, r15032, r15033, MPFR_RNDN);
        mpfr_sqrt(r15035, r15034, MPFR_RNDN);
        mpfr_sqrt(r15036, r15035, MPFR_RNDN);
        mpfr_sqr(r15037, r15036, MPFR_RNDN);
        mpfr_sqr(r15038, r15037, MPFR_RNDN);
        ;
        mpfr_atan2(r15040, r15039, r15031, MPFR_RNDN);
        mpfr_fmod(r15041, r15038, r15040, MPFR_RNDN);
        return mpfr_get_d(r15041, MPFR_RNDN);
}

static mpfr_t r15042, r15043, r15044, r15045, r15046, r15047, r15048, r15049, r15050, r15051, r15052;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15042);
        mpfr_init(r15043);
        mpfr_init(r15044);
        mpfr_init(r15045);
        mpfr_init(r15046);
        mpfr_init(r15047);
        mpfr_init(r15048);
        mpfr_init(r15049);
        mpfr_init_set_str(r15050, "8.61318337292339e-131", 10, MPFR_RNDN);
        mpfr_init(r15051);
        mpfr_init(r15052);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15042, d, MPFR_RNDN);
        mpfr_expm1(r15043, r15042, MPFR_RNDN);
        mpfr_set_d(r15044, c, MPFR_RNDN);
        mpfr_mul(r15045, r15043, r15044, MPFR_RNDN);
        mpfr_sqrt(r15046, r15045, MPFR_RNDN);
        mpfr_sqrt(r15047, r15046, MPFR_RNDN);
        mpfr_sqr(r15048, r15047, MPFR_RNDN);
        mpfr_sqr(r15049, r15048, MPFR_RNDN);
        ;
        mpfr_atan2(r15051, r15050, r15042, MPFR_RNDN);
        mpfr_fmod(r15052, r15049, r15051, MPFR_RNDN);
        return mpfr_get_d(r15052, MPFR_RNDN);
}

