#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 r15596 = a;
        float r15597 = c;
        float r15598 = atan2(r15596, r15597);
        float r15599 = atan2(r15598, r15596);
        float r15600 = log(r15596);
        float r15601 = r15599 - r15600;
        return r15601;
}

double f_id(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15602 = a;
        double r15603 = c;
        double r15604 = atan2(r15602, r15603);
        double r15605 = atan2(r15604, r15602);
        double r15606 = log(r15602);
        double r15607 = r15605 - r15606;
        return r15607;
}


double f_of(float a, float __attribute__((unused)) b, float c, float __attribute__((unused)) d) {
        float r15608 = a;
        float r15609 = c;
        float r15610 = atan2(r15608, r15609);
        float r15611 = atan2(r15610, r15608);
        float r15612 = exp(r15611);
        float r15613 = r15612 / r15608;
        float r15614 = log(r15613);
        return r15614;
}

double f_od(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15615 = a;
        double r15616 = c;
        double r15617 = atan2(r15615, r15616);
        double r15618 = atan2(r15617, r15615);
        double r15619 = exp(r15618);
        double r15620 = r15619 / r15615;
        double r15621 = log(r15620);
        return r15621;
}

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 r15622, r15623, r15624, r15625, r15626, r15627;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15622);
        mpfr_init(r15623);
        mpfr_init(r15624);
        mpfr_init(r15625);
        mpfr_init(r15626);
        mpfr_init(r15627);
}

double f_im(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15622, a, MPFR_RNDN);
        mpfr_set_d(r15623, c, MPFR_RNDN);
        mpfr_atan2(r15624, r15622, r15623, MPFR_RNDN);
        mpfr_atan2(r15625, r15624, r15622, MPFR_RNDN);
        mpfr_log(r15626, r15622, MPFR_RNDN);
        mpfr_sub(r15627, r15625, r15626, MPFR_RNDN);
        return mpfr_get_d(r15627, MPFR_RNDN);
}

static mpfr_t r15628, r15629, r15630, r15631, r15632, r15633, r15634;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15628);
        mpfr_init(r15629);
        mpfr_init(r15630);
        mpfr_init(r15631);
        mpfr_init(r15632);
        mpfr_init(r15633);
        mpfr_init(r15634);
}

double f_fm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15628, a, MPFR_RNDN);
        mpfr_set_d(r15629, c, MPFR_RNDN);
        mpfr_atan2(r15630, r15628, r15629, MPFR_RNDN);
        mpfr_atan2(r15631, r15630, r15628, MPFR_RNDN);
        mpfr_exp(r15632, r15631, MPFR_RNDN);
        mpfr_div(r15633, r15632, r15628, MPFR_RNDN);
        mpfr_log(r15634, r15633, MPFR_RNDN);
        return mpfr_get_d(r15634, MPFR_RNDN);
}

static mpfr_t r15635, r15636, r15637, r15638, r15639, r15640, r15641;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15635);
        mpfr_init(r15636);
        mpfr_init(r15637);
        mpfr_init(r15638);
        mpfr_init(r15639);
        mpfr_init(r15640);
        mpfr_init(r15641);
}

double f_dm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15635, a, MPFR_RNDN);
        mpfr_set_d(r15636, c, MPFR_RNDN);
        mpfr_atan2(r15637, r15635, r15636, MPFR_RNDN);
        mpfr_atan2(r15638, r15637, r15635, MPFR_RNDN);
        mpfr_exp(r15639, r15638, MPFR_RNDN);
        mpfr_div(r15640, r15639, r15635, MPFR_RNDN);
        mpfr_log(r15641, r15640, MPFR_RNDN);
        return mpfr_get_d(r15641, MPFR_RNDN);
}

