#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 r15036 = d;
        float r15037 = expm1(r15036);
        float r15038 = c;
        float r15039 = r15037 * r15038;
        float r15040 = 8.61318337292339e-131f;
        float r15041 = atan2(r15040, r15036);
        float r15042 = fmod(r15039, r15041);
        return r15042;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r15043 = d;
        double r15044 = expm1(r15043);
        double r15045 = c;
        double r15046 = r15044 * r15045;
        double r15047 = 8.61318337292339e-131;
        double r15048 = atan2(r15047, r15043);
        double r15049 = fmod(r15046, r15048);
        return r15049;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c, float d) {
        float r15050 = d;
        float r15051 = expm1(r15050);
        float r15052 = c;
        float r15053 = r15051 * r15052;
        float r15054 = sqrt(r15053);
        float r15055 = r15054 * r15054;
        float r15056 = 8.61318337292339e-131f;
        float r15057 = atan2(r15056, r15050);
        float r15058 = fmod(r15055, r15057);
        return r15058;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r15059 = d;
        double r15060 = expm1(r15059);
        double r15061 = c;
        double r15062 = r15060 * r15061;
        double r15063 = sqrt(r15062);
        double r15064 = r15063 * r15063;
        double r15065 = 8.61318337292339e-131;
        double r15066 = atan2(r15065, r15059);
        double r15067 = fmod(r15064, r15066);
        return r15067;
}

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 r15068, r15069, r15070, r15071, r15072, r15073, r15074;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15068);
        mpfr_init(r15069);
        mpfr_init(r15070);
        mpfr_init(r15071);
        mpfr_init_set_str(r15072, "8.61318337292339e-131", 10, MPFR_RNDN);
        mpfr_init(r15073);
        mpfr_init(r15074);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15068, d, MPFR_RNDN);
        mpfr_expm1(r15069, r15068, MPFR_RNDN);
        mpfr_set_d(r15070, c, MPFR_RNDN);
        mpfr_mul(r15071, r15069, r15070, MPFR_RNDN);
        ;
        mpfr_atan2(r15073, r15072, r15068, MPFR_RNDN);
        mpfr_fmod(r15074, r15071, r15073, MPFR_RNDN);
        return mpfr_get_d(r15074, MPFR_RNDN);
}

static mpfr_t r15075, r15076, r15077, r15078, r15079, r15080, r15081, r15082, r15083;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15075);
        mpfr_init(r15076);
        mpfr_init(r15077);
        mpfr_init(r15078);
        mpfr_init(r15079);
        mpfr_init(r15080);
        mpfr_init_set_str(r15081, "8.61318337292339e-131", 10, MPFR_RNDN);
        mpfr_init(r15082);
        mpfr_init(r15083);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15075, d, MPFR_RNDN);
        mpfr_expm1(r15076, r15075, MPFR_RNDN);
        mpfr_set_d(r15077, c, MPFR_RNDN);
        mpfr_mul(r15078, r15076, r15077, MPFR_RNDN);
        mpfr_sqrt(r15079, r15078, MPFR_RNDN);
        mpfr_sqr(r15080, r15079, MPFR_RNDN);
        ;
        mpfr_atan2(r15082, r15081, r15075, MPFR_RNDN);
        mpfr_fmod(r15083, r15080, r15082, MPFR_RNDN);
        return mpfr_get_d(r15083, MPFR_RNDN);
}

static mpfr_t r15084, r15085, r15086, r15087, r15088, r15089, r15090, r15091, r15092;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15084);
        mpfr_init(r15085);
        mpfr_init(r15086);
        mpfr_init(r15087);
        mpfr_init(r15088);
        mpfr_init(r15089);
        mpfr_init_set_str(r15090, "8.61318337292339e-131", 10, MPFR_RNDN);
        mpfr_init(r15091);
        mpfr_init(r15092);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15084, d, MPFR_RNDN);
        mpfr_expm1(r15085, r15084, MPFR_RNDN);
        mpfr_set_d(r15086, c, MPFR_RNDN);
        mpfr_mul(r15087, r15085, r15086, MPFR_RNDN);
        mpfr_sqrt(r15088, r15087, MPFR_RNDN);
        mpfr_sqr(r15089, r15088, MPFR_RNDN);
        ;
        mpfr_atan2(r15091, r15090, r15084, MPFR_RNDN);
        mpfr_fmod(r15092, r15089, r15091, MPFR_RNDN);
        return mpfr_get_d(r15092, MPFR_RNDN);
}

