#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 r14984 = d;
        float r14985 = expm1(r14984);
        float r14986 = c;
        float r14987 = r14985 * r14986;
        float r14988 = 0.0f;
        float r14989 = atan2(r14988, r14984);
        float r14990 = fmod(r14987, r14989);
        return r14990;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r14991 = d;
        double r14992 = expm1(r14991);
        double r14993 = c;
        double r14994 = r14992 * r14993;
        double r14995 = 0.0;
        double r14996 = atan2(r14995, r14991);
        double r14997 = fmod(r14994, r14996);
        return r14997;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float __attribute__((unused)) c, float d) {
        float r14998 = 0.0f;
        float r14999 = 0.0f;
        float r15000 = -1.0f;
        float r15001 = d;
        float r15002 = r15000 / r15001;
        float r15003 = atan2(r14999, r15002);
        float r15004 = fmod(r14998, r15003);
        return r15004;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double __attribute__((unused)) c, double d) {
        double r15005 = 0.0;
        double r15006 = 0.0;
        double r15007 = -1.0;
        double r15008 = d;
        double r15009 = r15007 / r15008;
        double r15010 = atan2(r15006, r15009);
        double r15011 = fmod(r15005, r15010);
        return r15011;
}

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 r15012, r15013, r15014, r15015, r15016, r15017, r15018;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15012);
        mpfr_init(r15013);
        mpfr_init(r15014);
        mpfr_init(r15015);
        mpfr_init_set_str(r15016, "8.61318337292339e-131", 10, MPFR_RNDN);
        mpfr_init(r15017);
        mpfr_init(r15018);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15012, d, MPFR_RNDN);
        mpfr_expm1(r15013, r15012, MPFR_RNDN);
        mpfr_set_d(r15014, c, MPFR_RNDN);
        mpfr_mul(r15015, r15013, r15014, MPFR_RNDN);
        ;
        mpfr_atan2(r15017, r15016, r15012, MPFR_RNDN);
        mpfr_fmod(r15018, r15015, r15017, MPFR_RNDN);
        return mpfr_get_d(r15018, MPFR_RNDN);
}

static mpfr_t r15019, r15020, r15021, r15022, r15023, r15024, r15025;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init_set_str(r15019, "0", 10, MPFR_RNDN);
        mpfr_init_set_str(r15020, "8.61318337292339e-131", 10, MPFR_RNDN);
        mpfr_init_set_str(r15021, "-1", 10, MPFR_RNDN);
        mpfr_init(r15022);
        mpfr_init(r15023);
        mpfr_init(r15024);
        mpfr_init(r15025);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double __attribute__((unused)) c, double d) {
        ;
        ;
        ;
        mpfr_set_d(r15022, d, MPFR_RNDN);
        mpfr_div(r15023, r15021, r15022, MPFR_RNDN);
        mpfr_atan2(r15024, r15020, r15023, MPFR_RNDN);
        mpfr_fmod(r15025, r15019, r15024, MPFR_RNDN);
        return mpfr_get_d(r15025, MPFR_RNDN);
}

static mpfr_t r15026, r15027, r15028, r15029, r15030, r15031, r15032;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init_set_str(r15026, "0", 10, MPFR_RNDN);
        mpfr_init_set_str(r15027, "8.61318337292339e-131", 10, MPFR_RNDN);
        mpfr_init_set_str(r15028, "-1", 10, MPFR_RNDN);
        mpfr_init(r15029);
        mpfr_init(r15030);
        mpfr_init(r15031);
        mpfr_init(r15032);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double __attribute__((unused)) c, double d) {
        ;
        ;
        ;
        mpfr_set_d(r15029, d, MPFR_RNDN);
        mpfr_div(r15030, r15028, r15029, MPFR_RNDN);
        mpfr_atan2(r15031, r15027, r15030, MPFR_RNDN);
        mpfr_fmod(r15032, r15026, r15031, MPFR_RNDN);
        return mpfr_get_d(r15032, MPFR_RNDN);
}

