#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 r15012 = d;
        float r15013 = expm1(r15012);
        float r15014 = c;
        float r15015 = r15013 * r15014;
        float r15016 = 0.0f;
        float r15017 = atan2(r15016, r15012);
        float r15018 = fmod(r15015, r15017);
        return r15018;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r15019 = d;
        double r15020 = expm1(r15019);
        double r15021 = c;
        double r15022 = r15020 * r15021;
        double r15023 = 0.0;
        double r15024 = atan2(r15023, r15019);
        double r15025 = fmod(r15022, r15024);
        return r15025;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float __attribute__((unused)) c, float d) {
        float r15026 = 0.0f;
        float r15027 = 0.0f;
        float r15028 = -1.0f;
        float r15029 = d;
        float r15030 = r15028 / r15029;
        float r15031 = atan2(r15027, r15030);
        float r15032 = fmod(r15026, r15031);
        return r15032;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double __attribute__((unused)) c, double d) {
        double r15033 = 0.0;
        double r15034 = 0.0;
        double r15035 = -1.0;
        double r15036 = d;
        double r15037 = r15035 / r15036;
        double r15038 = atan2(r15034, r15037);
        double r15039 = fmod(r15033, r15038);
        return r15039;
}

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 r15040, r15041, r15042, r15043, r15044, r15045, r15046;

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

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15040, d, MPFR_RNDN);
        mpfr_expm1(r15041, r15040, MPFR_RNDN);
        mpfr_set_d(r15042, c, MPFR_RNDN);
        mpfr_mul(r15043, r15041, r15042, MPFR_RNDN);
        ;
        mpfr_atan2(r15045, r15044, r15040, MPFR_RNDN);
        mpfr_fmod(r15046, r15043, r15045, MPFR_RNDN);
        return mpfr_get_d(r15046, MPFR_RNDN);
}

static mpfr_t r15047, r15048, r15049, r15050, r15051, r15052, r15053;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init_set_str(r15047, "0", 10, MPFR_RNDN);
        mpfr_init_set_str(r15048, "8.61318337292339e-131", 10, MPFR_RNDN);
        mpfr_init_set_str(r15049, "-1", 10, MPFR_RNDN);
        mpfr_init(r15050);
        mpfr_init(r15051);
        mpfr_init(r15052);
        mpfr_init(r15053);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double __attribute__((unused)) c, double d) {
        ;
        ;
        ;
        mpfr_set_d(r15050, d, MPFR_RNDN);
        mpfr_div(r15051, r15049, r15050, MPFR_RNDN);
        mpfr_atan2(r15052, r15048, r15051, MPFR_RNDN);
        mpfr_fmod(r15053, r15047, r15052, MPFR_RNDN);
        return mpfr_get_d(r15053, MPFR_RNDN);
}

static mpfr_t r15054, r15055, r15056, r15057, r15058, r15059, r15060;

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

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double __attribute__((unused)) c, double d) {
        ;
        ;
        ;
        mpfr_set_d(r15057, d, MPFR_RNDN);
        mpfr_div(r15058, r15056, r15057, MPFR_RNDN);
        mpfr_atan2(r15059, r15055, r15058, MPFR_RNDN);
        mpfr_fmod(r15060, r15054, r15059, MPFR_RNDN);
        return mpfr_get_d(r15060, MPFR_RNDN);
}

