#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 r14996 = d;
        float r14997 = expm1(r14996);
        float r14998 = c;
        float r14999 = r14997 * r14998;
        float r15000 = 8.61318337292339e-131f;
        float r15001 = atan2(r15000, r14996);
        float r15002 = fmod(r14999, r15001);
        return r15002;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r15003 = d;
        double r15004 = expm1(r15003);
        double r15005 = c;
        double r15006 = r15004 * r15005;
        double r15007 = 8.61318337292339e-131;
        double r15008 = atan2(r15007, r15003);
        double r15009 = fmod(r15006, r15008);
        return r15009;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c, float d) {
        float r15010 = d;
        float r15011 = expm1(r15010);
        float r15012 = c;
        float r15013 = r15011 * r15012;
        float r15014 = sqrt(r15013);
        float r15015 = sqrt(r15014);
        float r15016 = r15015 * r15015;
        float r15017 = r15016 * r15016;
        float r15018 = 8.61318337292339e-131f;
        float r15019 = atan2(r15018, r15010);
        float r15020 = fmod(r15017, r15019);
        return r15020;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r15021 = d;
        double r15022 = expm1(r15021);
        double r15023 = c;
        double r15024 = r15022 * r15023;
        double r15025 = sqrt(r15024);
        double r15026 = sqrt(r15025);
        double r15027 = r15026 * r15026;
        double r15028 = r15027 * r15027;
        double r15029 = 8.61318337292339e-131;
        double r15030 = atan2(r15029, r15021);
        double r15031 = fmod(r15028, r15030);
        return r15031;
}

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 r15032, r15033, r15034, r15035, r15036, r15037, r15038;

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

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15032, d, MPFR_RNDN);
        mpfr_expm1(r15033, r15032, MPFR_RNDN);
        mpfr_set_d(r15034, c, MPFR_RNDN);
        mpfr_mul(r15035, r15033, r15034, MPFR_RNDN);
        ;
        mpfr_atan2(r15037, r15036, r15032, MPFR_RNDN);
        mpfr_fmod(r15038, r15035, r15037, MPFR_RNDN);
        return mpfr_get_d(r15038, MPFR_RNDN);
}

static mpfr_t r15039, r15040, r15041, r15042, r15043, r15044, r15045, r15046, r15047, r15048, r15049;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15039);
        mpfr_init(r15040);
        mpfr_init(r15041);
        mpfr_init(r15042);
        mpfr_init(r15043);
        mpfr_init(r15044);
        mpfr_init(r15045);
        mpfr_init(r15046);
        mpfr_init_set_str(r15047, "8.61318337292339e-131", 10, MPFR_RNDN);
        mpfr_init(r15048);
        mpfr_init(r15049);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15039, d, MPFR_RNDN);
        mpfr_expm1(r15040, r15039, MPFR_RNDN);
        mpfr_set_d(r15041, c, MPFR_RNDN);
        mpfr_mul(r15042, r15040, r15041, MPFR_RNDN);
        mpfr_sqrt(r15043, r15042, MPFR_RNDN);
        mpfr_sqrt(r15044, r15043, MPFR_RNDN);
        mpfr_sqr(r15045, r15044, MPFR_RNDN);
        mpfr_sqr(r15046, r15045, MPFR_RNDN);
        ;
        mpfr_atan2(r15048, r15047, r15039, MPFR_RNDN);
        mpfr_fmod(r15049, r15046, r15048, MPFR_RNDN);
        return mpfr_get_d(r15049, MPFR_RNDN);
}

static mpfr_t r15050, r15051, r15052, r15053, r15054, r15055, r15056, r15057, r15058, r15059, r15060;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15050);
        mpfr_init(r15051);
        mpfr_init(r15052);
        mpfr_init(r15053);
        mpfr_init(r15054);
        mpfr_init(r15055);
        mpfr_init(r15056);
        mpfr_init(r15057);
        mpfr_init_set_str(r15058, "8.61318337292339e-131", 10, MPFR_RNDN);
        mpfr_init(r15059);
        mpfr_init(r15060);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15050, d, MPFR_RNDN);
        mpfr_expm1(r15051, r15050, MPFR_RNDN);
        mpfr_set_d(r15052, c, MPFR_RNDN);
        mpfr_mul(r15053, r15051, r15052, MPFR_RNDN);
        mpfr_sqrt(r15054, r15053, MPFR_RNDN);
        mpfr_sqrt(r15055, r15054, MPFR_RNDN);
        mpfr_sqr(r15056, r15055, MPFR_RNDN);
        mpfr_sqr(r15057, r15056, MPFR_RNDN);
        ;
        mpfr_atan2(r15059, r15058, r15050, MPFR_RNDN);
        mpfr_fmod(r15060, r15057, r15059, MPFR_RNDN);
        return mpfr_get_d(r15060, MPFR_RNDN);
}

