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

char *name = "(- (atan2 (atan2 a c) a) (log a))";

double f_if(float a, float __attribute__((unused)) b, float c, float __attribute__((unused)) d) {
        float r15525 = a;
        float r15526 = c;
        float r15527 = atan2(r15525, r15526);
        float r15528 = atan2(r15527, r15525);
        float r15529 = log(r15525);
        float r15530 = r15528 - r15529;
        return r15530;
}

double f_id(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15531 = a;
        double r15532 = c;
        double r15533 = atan2(r15531, r15532);
        double r15534 = atan2(r15533, r15531);
        double r15535 = log(r15531);
        double r15536 = r15534 - r15535;
        return r15536;
}


double f_of(float a, float __attribute__((unused)) b, float c, float __attribute__((unused)) d) {
        float r15537 = a;
        float r15538 = c;
        float r15539 = atan2(r15537, r15538);
        float r15540 = atan2(r15539, r15537);
        float r15541 = log(r15537);
        float r15542 = r15540 - r15541;
        float r15543 = r15542 * (r15542 * r15542);
        float r15544 = cbrt(r15543);
        return r15544;
}

double f_od(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15545 = a;
        double r15546 = c;
        double r15547 = atan2(r15545, r15546);
        double r15548 = atan2(r15547, r15545);
        double r15549 = log(r15545);
        double r15550 = r15548 - r15549;
        double r15551 = r15550 * (r15550 * r15550);
        double r15552 = cbrt(r15551);
        return r15552;
}

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 r15553, r15554, r15555, r15556, r15557, r15558;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15553);
        mpfr_init(r15554);
        mpfr_init(r15555);
        mpfr_init(r15556);
        mpfr_init(r15557);
        mpfr_init(r15558);
}

double f_im(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15553, a, MPFR_RNDN);
        mpfr_set_d(r15554, c, MPFR_RNDN);
        mpfr_atan2(r15555, r15553, r15554, MPFR_RNDN);
        mpfr_atan2(r15556, r15555, r15553, MPFR_RNDN);
        mpfr_log(r15557, r15553, MPFR_RNDN);
        mpfr_sub(r15558, r15556, r15557, MPFR_RNDN);
        return mpfr_get_d(r15558, MPFR_RNDN);
}

static mpfr_t r15559, r15560, r15561, r15562, r15563, r15564, r15565, r15566;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15559);
        mpfr_init(r15560);
        mpfr_init(r15561);
        mpfr_init(r15562);
        mpfr_init(r15563);
        mpfr_init(r15564);
        mpfr_init(r15565);
        mpfr_init(r15566);
}

double f_fm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15559, a, MPFR_RNDN);
        mpfr_set_d(r15560, c, MPFR_RNDN);
        mpfr_atan2(r15561, r15559, r15560, MPFR_RNDN);
        mpfr_atan2(r15562, r15561, r15559, MPFR_RNDN);
        mpfr_log(r15563, r15559, MPFR_RNDN);
        mpfr_sub(r15564, r15562, r15563, MPFR_RNDN);
        mpfr_mul(r15565, r15564, r15564, MPFR_RNDN); mpfr_mul(r15565, r15565, r15564, MPFR_RNDN);
        mpfr_cbrt(r15566, r15565, MPFR_RNDN);
        return mpfr_get_d(r15566, MPFR_RNDN);
}

static mpfr_t r15567, r15568, r15569, r15570, r15571, r15572, r15573, r15574;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15567);
        mpfr_init(r15568);
        mpfr_init(r15569);
        mpfr_init(r15570);
        mpfr_init(r15571);
        mpfr_init(r15572);
        mpfr_init(r15573);
        mpfr_init(r15574);
}

double f_dm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15567, a, MPFR_RNDN);
        mpfr_set_d(r15568, c, MPFR_RNDN);
        mpfr_atan2(r15569, r15567, r15568, MPFR_RNDN);
        mpfr_atan2(r15570, r15569, r15567, MPFR_RNDN);
        mpfr_log(r15571, r15567, MPFR_RNDN);
        mpfr_sub(r15572, r15570, r15571, MPFR_RNDN);
        mpfr_mul(r15573, r15572, r15572, MPFR_RNDN); mpfr_mul(r15573, r15573, r15572, MPFR_RNDN);
        mpfr_cbrt(r15574, r15573, MPFR_RNDN);
        return mpfr_get_d(r15574, MPFR_RNDN);
}

