#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 r15501 = a;
        float r15502 = c;
        float r15503 = atan2(r15501, r15502);
        float r15504 = atan2(r15503, r15501);
        float r15505 = log(r15501);
        float r15506 = r15504 - r15505;
        return r15506;
}

double f_id(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15507 = a;
        double r15508 = c;
        double r15509 = atan2(r15507, r15508);
        double r15510 = atan2(r15509, r15507);
        double r15511 = log(r15507);
        double r15512 = r15510 - r15511;
        return r15512;
}


double f_of(float a, float __attribute__((unused)) b, float c, float __attribute__((unused)) d) {
        float r15513 = a;
        float r15514 = c;
        float r15515 = atan2(r15513, r15514);
        float r15516 = atan2(r15515, r15513);
        float r15517 = log(r15513);
        float r15518 = r15516 - r15517;
        float r15519 = r15518 * (r15518 * r15518);
        float r15520 = cbrt(r15519);
        return r15520;
}

double f_od(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15521 = a;
        double r15522 = c;
        double r15523 = atan2(r15521, r15522);
        double r15524 = atan2(r15523, r15521);
        double r15525 = log(r15521);
        double r15526 = r15524 - r15525;
        double r15527 = r15526 * (r15526 * r15526);
        double r15528 = cbrt(r15527);
        return r15528;
}

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 r15529, r15530, r15531, r15532, r15533, r15534;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15529);
        mpfr_init(r15530);
        mpfr_init(r15531);
        mpfr_init(r15532);
        mpfr_init(r15533);
        mpfr_init(r15534);
}

double f_im(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15529, a, MPFR_RNDN);
        mpfr_set_d(r15530, c, MPFR_RNDN);
        mpfr_atan2(r15531, r15529, r15530, MPFR_RNDN);
        mpfr_atan2(r15532, r15531, r15529, MPFR_RNDN);
        mpfr_log(r15533, r15529, MPFR_RNDN);
        mpfr_sub(r15534, r15532, r15533, MPFR_RNDN);
        return mpfr_get_d(r15534, MPFR_RNDN);
}

static mpfr_t r15535, r15536, r15537, r15538, r15539, r15540, r15541, r15542;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15535);
        mpfr_init(r15536);
        mpfr_init(r15537);
        mpfr_init(r15538);
        mpfr_init(r15539);
        mpfr_init(r15540);
        mpfr_init(r15541);
        mpfr_init(r15542);
}

double f_fm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15535, a, MPFR_RNDN);
        mpfr_set_d(r15536, c, MPFR_RNDN);
        mpfr_atan2(r15537, r15535, r15536, MPFR_RNDN);
        mpfr_atan2(r15538, r15537, r15535, MPFR_RNDN);
        mpfr_log(r15539, r15535, MPFR_RNDN);
        mpfr_sub(r15540, r15538, r15539, MPFR_RNDN);
        mpfr_mul(r15541, r15540, r15540, MPFR_RNDN); mpfr_mul(r15541, r15541, r15540, MPFR_RNDN);
        mpfr_cbrt(r15542, r15541, MPFR_RNDN);
        return mpfr_get_d(r15542, MPFR_RNDN);
}

static mpfr_t r15543, r15544, r15545, r15546, r15547, r15548, r15549, r15550;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15543);
        mpfr_init(r15544);
        mpfr_init(r15545);
        mpfr_init(r15546);
        mpfr_init(r15547);
        mpfr_init(r15548);
        mpfr_init(r15549);
        mpfr_init(r15550);
}

double f_dm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15543, a, MPFR_RNDN);
        mpfr_set_d(r15544, c, MPFR_RNDN);
        mpfr_atan2(r15545, r15543, r15544, MPFR_RNDN);
        mpfr_atan2(r15546, r15545, r15543, MPFR_RNDN);
        mpfr_log(r15547, r15543, MPFR_RNDN);
        mpfr_sub(r15548, r15546, r15547, MPFR_RNDN);
        mpfr_mul(r15549, r15548, r15548, MPFR_RNDN); mpfr_mul(r15549, r15549, r15548, MPFR_RNDN);
        mpfr_cbrt(r15550, r15549, MPFR_RNDN);
        return mpfr_get_d(r15550, MPFR_RNDN);
}

