#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 r15524 = a;
        float r15525 = c;
        float r15526 = atan2(r15524, r15525);
        float r15527 = atan2(r15526, r15524);
        float r15528 = log(r15524);
        float r15529 = r15527 - r15528;
        return r15529;
}

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


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

double f_od(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15543 = a;
        double r15544 = c;
        double r15545 = atan2(r15543, r15544);
        double r15546 = atan2(r15545, r15543);
        double r15547 = exp(r15546);
        double r15548 = r15547 / r15543;
        double r15549 = log(r15548);
        return r15549;
}

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 r15550, r15551, r15552, r15553, r15554, r15555;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15550);
        mpfr_init(r15551);
        mpfr_init(r15552);
        mpfr_init(r15553);
        mpfr_init(r15554);
        mpfr_init(r15555);
}

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

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

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15556);
        mpfr_init(r15557);
        mpfr_init(r15558);
        mpfr_init(r15559);
        mpfr_init(r15560);
        mpfr_init(r15561);
        mpfr_init(r15562);
}

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

static mpfr_t r15563, r15564, r15565, r15566, r15567, r15568, r15569;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15563);
        mpfr_init(r15564);
        mpfr_init(r15565);
        mpfr_init(r15566);
        mpfr_init(r15567);
        mpfr_init(r15568);
        mpfr_init(r15569);
}

double f_dm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15563, a, MPFR_RNDN);
        mpfr_set_d(r15564, c, MPFR_RNDN);
        mpfr_atan2(r15565, r15563, r15564, MPFR_RNDN);
        mpfr_atan2(r15566, r15565, r15563, MPFR_RNDN);
        mpfr_exp(r15567, r15566, MPFR_RNDN);
        mpfr_div(r15568, r15567, r15563, MPFR_RNDN);
        mpfr_log(r15569, r15568, MPFR_RNDN);
        return mpfr_get_d(r15569, MPFR_RNDN);
}

