#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 r15533 = a;
        float r15534 = c;
        float r15535 = atan2(r15533, r15534);
        float r15536 = atan2(r15535, r15533);
        float r15537 = log(r15533);
        float r15538 = r15536 - r15537;
        return r15538;
}

double f_id(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15539 = a;
        double r15540 = c;
        double r15541 = atan2(r15539, r15540);
        double r15542 = atan2(r15541, r15539);
        double r15543 = log(r15539);
        double r15544 = r15542 - r15543;
        return r15544;
}


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

double f_od(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15553 = a;
        double r15554 = c;
        double r15555 = atan2(r15553, r15554);
        double r15556 = atan2(r15555, r15553);
        double r15557 = sqrt(r15556);
        double r15558 = r15557 * r15557;
        double r15559 = log(r15553);
        double r15560 = r15558 - r15559;
        return r15560;
}

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 r15561, r15562, r15563, r15564, r15565, r15566;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15561);
        mpfr_init(r15562);
        mpfr_init(r15563);
        mpfr_init(r15564);
        mpfr_init(r15565);
        mpfr_init(r15566);
}

double f_im(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15561, a, MPFR_RNDN);
        mpfr_set_d(r15562, c, MPFR_RNDN);
        mpfr_atan2(r15563, r15561, r15562, MPFR_RNDN);
        mpfr_atan2(r15564, r15563, r15561, MPFR_RNDN);
        mpfr_log(r15565, r15561, MPFR_RNDN);
        mpfr_sub(r15566, r15564, 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_fm() {
        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_fm(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_sqrt(r15571, r15570, MPFR_RNDN);
        mpfr_sqr(r15572, r15571, MPFR_RNDN);
        mpfr_log(r15573, r15567, MPFR_RNDN);
        mpfr_sub(r15574, r15572, r15573, MPFR_RNDN);
        return mpfr_get_d(r15574, MPFR_RNDN);
}

static mpfr_t r15575, r15576, r15577, r15578, r15579, r15580, r15581, r15582;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15575);
        mpfr_init(r15576);
        mpfr_init(r15577);
        mpfr_init(r15578);
        mpfr_init(r15579);
        mpfr_init(r15580);
        mpfr_init(r15581);
        mpfr_init(r15582);
}

double f_dm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15575, a, MPFR_RNDN);
        mpfr_set_d(r15576, c, MPFR_RNDN);
        mpfr_atan2(r15577, r15575, r15576, MPFR_RNDN);
        mpfr_atan2(r15578, r15577, r15575, MPFR_RNDN);
        mpfr_sqrt(r15579, r15578, MPFR_RNDN);
        mpfr_sqr(r15580, r15579, MPFR_RNDN);
        mpfr_log(r15581, r15575, MPFR_RNDN);
        mpfr_sub(r15582, r15580, r15581, MPFR_RNDN);
        return mpfr_get_d(r15582, MPFR_RNDN);
}

