#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 r15516 = a;
        float r15517 = c;
        float r15518 = atan2(r15516, r15517);
        float r15519 = atan2(r15518, r15516);
        float r15520 = log(r15516);
        float r15521 = r15519 - r15520;
        return r15521;
}

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


double f_of(float a, float __attribute__((unused)) b, float c, float __attribute__((unused)) d) {
        float r15528 = a;
        float r15529 = c;
        float r15530 = atan2(r15528, r15529);
        float r15531 = atan2(r15530, r15528);
        float r15532 = exp(r15531);
        float r15533 = r15532 / r15528;
        float r15534 = log(r15533);
        return r15534;
}

double f_od(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15535 = a;
        double r15536 = c;
        double r15537 = atan2(r15535, r15536);
        double r15538 = atan2(r15537, r15535);
        double r15539 = exp(r15538);
        double r15540 = r15539 / r15535;
        double r15541 = log(r15540);
        return r15541;
}

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 r15542, r15543, r15544, r15545, r15546, r15547;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15542);
        mpfr_init(r15543);
        mpfr_init(r15544);
        mpfr_init(r15545);
        mpfr_init(r15546);
        mpfr_init(r15547);
}

double f_im(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15542, a, MPFR_RNDN);
        mpfr_set_d(r15543, c, MPFR_RNDN);
        mpfr_atan2(r15544, r15542, r15543, MPFR_RNDN);
        mpfr_atan2(r15545, r15544, r15542, MPFR_RNDN);
        mpfr_log(r15546, r15542, MPFR_RNDN);
        mpfr_sub(r15547, r15545, r15546, MPFR_RNDN);
        return mpfr_get_d(r15547, MPFR_RNDN);
}

static mpfr_t r15548, r15549, r15550, r15551, r15552, r15553, r15554;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15548);
        mpfr_init(r15549);
        mpfr_init(r15550);
        mpfr_init(r15551);
        mpfr_init(r15552);
        mpfr_init(r15553);
        mpfr_init(r15554);
}

double f_fm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15548, a, MPFR_RNDN);
        mpfr_set_d(r15549, c, MPFR_RNDN);
        mpfr_atan2(r15550, r15548, r15549, MPFR_RNDN);
        mpfr_atan2(r15551, r15550, r15548, MPFR_RNDN);
        mpfr_exp(r15552, r15551, MPFR_RNDN);
        mpfr_div(r15553, r15552, r15548, MPFR_RNDN);
        mpfr_log(r15554, r15553, MPFR_RNDN);
        return mpfr_get_d(r15554, MPFR_RNDN);
}

static mpfr_t r15555, r15556, r15557, r15558, r15559, r15560, r15561;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15555);
        mpfr_init(r15556);
        mpfr_init(r15557);
        mpfr_init(r15558);
        mpfr_init(r15559);
        mpfr_init(r15560);
        mpfr_init(r15561);
}

double f_dm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15555, a, MPFR_RNDN);
        mpfr_set_d(r15556, c, MPFR_RNDN);
        mpfr_atan2(r15557, r15555, r15556, MPFR_RNDN);
        mpfr_atan2(r15558, r15557, r15555, MPFR_RNDN);
        mpfr_exp(r15559, r15558, MPFR_RNDN);
        mpfr_div(r15560, r15559, r15555, MPFR_RNDN);
        mpfr_log(r15561, r15560, MPFR_RNDN);
        return mpfr_get_d(r15561, MPFR_RNDN);
}

