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

char *name = "Random Jason Timeout Test 012";

double f_if(float a, float __attribute__((unused)) b, float __attribute__((unused)) c) {
        float r15957 = a;
        float r15958 = cosh(r15957);
        float r15959 = r15957 * r15957;
        float r15960 = fmod(r15958, r15959);
        float r15961 = log1p(r15957);
        float r15962 = pow(r15960, r15961);
        float r15963 = acos(r15962);
        return r15963;
}

double f_id(double a, double __attribute__((unused)) b, double __attribute__((unused)) c) {
        double r15964 = a;
        double r15965 = cosh(r15964);
        double r15966 = r15964 * r15964;
        double r15967 = fmod(r15965, r15966);
        double r15968 = log1p(r15964);
        double r15969 = pow(r15967, r15968);
        double r15970 = acos(r15969);
        return r15970;
}


double f_of(float a, float __attribute__((unused)) b, float __attribute__((unused)) c) {
        float r15971 = a;
        float r15972 = 2228.170166015625f;
        bool r15973 = r15971 <= r15972;
        float r15974 = cosh(r15971);
        float r15975 = r15971 * r15971;
        float r15976 = fmod(r15974, r15975);
        float r15977 = log1p(r15971);
        float r15978 = pow(r15976, r15977);
        float r15979 = acos(r15978);
        float r15980 = cbrt(r15979);
        float r15981 = r15980 * (r15980 * r15980);
        float r15982 = sqrt(r15981);
        float r15983 = r15982 * r15982;
        float r15984 = cbrt(r15983);
        float r15985 = r15984 * (r15984 * r15984);
        float r15986 = 1.0f;
        float r15987 = r15986 / r15971;
        float r15988 = cosh(r15987);
        float r15989 = r15986 / r15975;
        float r15990 = fmod(r15988, r15989);
        float r15991 = pow(r15990, r15977);
        float r15992 = acos(r15991);
        float r15993 = r15973 ? r15985 : r15992;
        return r15993;
}

double f_od(double a, double __attribute__((unused)) b, double __attribute__((unused)) c) {
        double r15994 = a;
        double r15995 = 2228.170166015625;
        bool r15996 = r15994 <= r15995;
        double r15997 = cosh(r15994);
        double r15998 = r15994 * r15994;
        double r15999 = fmod(r15997, r15998);
        double r16000 = log1p(r15994);
        double r16001 = pow(r15999, r16000);
        double r16002 = acos(r16001);
        double r16003 = cbrt(r16002);
        double r16004 = r16003 * (r16003 * r16003);
        double r16005 = sqrt(r16004);
        double r16006 = r16005 * r16005;
        double r16007 = cbrt(r16006);
        double r16008 = r16007 * (r16007 * r16007);
        double r16009 = 1.0;
        double r16010 = r16009 / r15994;
        double r16011 = cosh(r16010);
        double r16012 = r16009 / r15998;
        double r16013 = fmod(r16011, r16012);
        double r16014 = pow(r16013, r16000);
        double r16015 = acos(r16014);
        double r16016 = r15996 ? r16008 : r16015;
        return r16016;
}

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 r16017, r16018, r16019, r16020, r16021, r16022, r16023;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r16017);
        mpfr_init(r16018);
        mpfr_init(r16019);
        mpfr_init(r16020);
        mpfr_init(r16021);
        mpfr_init(r16022);
        mpfr_init(r16023);
}

double f_im(double a, double __attribute__((unused)) b, double __attribute__((unused)) c) {
        mpfr_set_d(r16017, a, MPFR_RNDN);
        mpfr_cosh(r16018, r16017, MPFR_RNDN);
        mpfr_mul(r16019, r16017, r16017, MPFR_RNDN);
        mpfr_fmod(r16020, r16018, r16019, MPFR_RNDN);
        mpfr_log1p(r16021, r16017, MPFR_RNDN);
        mpfr_pow(r16022, r16020, r16021, MPFR_RNDN);
        mpfr_acos(r16023, r16022, MPFR_RNDN);
        return mpfr_get_d(r16023, MPFR_RNDN);
}

static mpfr_t r16024, r16025, r16026, r16027, r16028, r16029, r16030, r16031, r16032, r16033, r16034, r16035, r16036, r16037, r16038, r16039, r16040, r16041, r16042, r16043, r16044, r16045, r16046;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r16024);
        mpfr_init_set_str(r16025, "2228.1702f0", 10, MPFR_RNDN);
        mpfr_init(r16026);
        mpfr_init(r16027);
        mpfr_init(r16028);
        mpfr_init(r16029);
        mpfr_init(r16030);
        mpfr_init(r16031);
        mpfr_init(r16032);
        mpfr_init(r16033);
        mpfr_init(r16034);
        mpfr_init(r16035);
        mpfr_init(r16036);
        mpfr_init(r16037);
        mpfr_init(r16038);
        mpfr_init_set_str(r16039, "1", 10, MPFR_RNDN);
        mpfr_init(r16040);
        mpfr_init(r16041);
        mpfr_init(r16042);
        mpfr_init(r16043);
        mpfr_init(r16044);
        mpfr_init(r16045);
        mpfr_init(r16046);
}

double f_fm(double a, double __attribute__((unused)) b, double __attribute__((unused)) c) {
        mpfr_set_d(r16024, a, MPFR_RNDN);
        ;
        mpfr_set_si(r16026, mpfr_cmp(r16024, r16025) <= 0, MPFR_RNDN);
        mpfr_cosh(r16027, r16024, MPFR_RNDN);
        mpfr_sqr(r16028, r16024, MPFR_RNDN);
        mpfr_fmod(r16029, r16027, r16028, MPFR_RNDN);
        mpfr_log1p(r16030, r16024, MPFR_RNDN);
        mpfr_pow(r16031, r16029, r16030, MPFR_RNDN);
        mpfr_acos(r16032, r16031, MPFR_RNDN);
        mpfr_cbrt(r16033, r16032, MPFR_RNDN);
        mpfr_mul(r16034, r16033, r16033, MPFR_RNDN); mpfr_mul(r16034, r16034, r16033, MPFR_RNDN);
        mpfr_sqrt(r16035, r16034, MPFR_RNDN);
        mpfr_sqr(r16036, r16035, MPFR_RNDN);
        mpfr_cbrt(r16037, r16036, MPFR_RNDN);
        mpfr_mul(r16038, r16037, r16037, MPFR_RNDN); mpfr_mul(r16038, r16038, r16037, MPFR_RNDN);
        ;
        mpfr_div(r16040, r16039, r16024, MPFR_RNDN);
        mpfr_cosh(r16041, r16040, MPFR_RNDN);
        mpfr_div(r16042, r16039, r16028, MPFR_RNDN);
        mpfr_fmod(r16043, r16041, r16042, MPFR_RNDN);
        mpfr_pow(r16044, r16043, r16030, MPFR_RNDN);
        mpfr_acos(r16045, r16044, MPFR_RNDN);
        if (mpfr_get_si(r16026, MPFR_RNDN)) { mpfr_set(r16046, r16038, MPFR_RNDN); } else { mpfr_set(r16046, r16045, MPFR_RNDN); };
        return mpfr_get_d(r16046, MPFR_RNDN);
}

static mpfr_t r16047, r16048, r16049, r16050, r16051, r16052, r16053, r16054, r16055, r16056, r16057, r16058, r16059, r16060, r16061, r16062, r16063, r16064, r16065, r16066, r16067, r16068, r16069;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r16047);
        mpfr_init_set_str(r16048, "2228.1702f0", 10, MPFR_RNDN);
        mpfr_init(r16049);
        mpfr_init(r16050);
        mpfr_init(r16051);
        mpfr_init(r16052);
        mpfr_init(r16053);
        mpfr_init(r16054);
        mpfr_init(r16055);
        mpfr_init(r16056);
        mpfr_init(r16057);
        mpfr_init(r16058);
        mpfr_init(r16059);
        mpfr_init(r16060);
        mpfr_init(r16061);
        mpfr_init_set_str(r16062, "1", 10, MPFR_RNDN);
        mpfr_init(r16063);
        mpfr_init(r16064);
        mpfr_init(r16065);
        mpfr_init(r16066);
        mpfr_init(r16067);
        mpfr_init(r16068);
        mpfr_init(r16069);
}

double f_dm(double a, double __attribute__((unused)) b, double __attribute__((unused)) c) {
        mpfr_set_d(r16047, a, MPFR_RNDN);
        ;
        mpfr_set_si(r16049, mpfr_cmp(r16047, r16048) <= 0, MPFR_RNDN);
        mpfr_cosh(r16050, r16047, MPFR_RNDN);
        mpfr_sqr(r16051, r16047, MPFR_RNDN);
        mpfr_fmod(r16052, r16050, r16051, MPFR_RNDN);
        mpfr_log1p(r16053, r16047, MPFR_RNDN);
        mpfr_pow(r16054, r16052, r16053, MPFR_RNDN);
        mpfr_acos(r16055, r16054, MPFR_RNDN);
        mpfr_cbrt(r16056, r16055, MPFR_RNDN);
        mpfr_mul(r16057, r16056, r16056, MPFR_RNDN); mpfr_mul(r16057, r16057, r16056, MPFR_RNDN);
        mpfr_sqrt(r16058, r16057, MPFR_RNDN);
        mpfr_sqr(r16059, r16058, MPFR_RNDN);
        mpfr_cbrt(r16060, r16059, MPFR_RNDN);
        mpfr_mul(r16061, r16060, r16060, MPFR_RNDN); mpfr_mul(r16061, r16061, r16060, MPFR_RNDN);
        ;
        mpfr_div(r16063, r16062, r16047, MPFR_RNDN);
        mpfr_cosh(r16064, r16063, MPFR_RNDN);
        mpfr_div(r16065, r16062, r16051, MPFR_RNDN);
        mpfr_fmod(r16066, r16064, r16065, MPFR_RNDN);
        mpfr_pow(r16067, r16066, r16053, MPFR_RNDN);
        mpfr_acos(r16068, r16067, MPFR_RNDN);
        if (mpfr_get_si(r16049, MPFR_RNDN)) { mpfr_set(r16069, r16061, MPFR_RNDN); } else { mpfr_set(r16069, r16068, MPFR_RNDN); };
        return mpfr_get_d(r16069, MPFR_RNDN);
}

