#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 r15324 = a;
        float r15325 = c;
        float r15326 = atan2(r15324, r15325);
        float r15327 = atan2(r15326, r15324);
        float r15328 = log(r15324);
        float r15329 = r15327 - r15328;
        return r15329;
}

double f_id(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15330 = a;
        double r15331 = c;
        double r15332 = atan2(r15330, r15331);
        double r15333 = atan2(r15332, r15330);
        double r15334 = log(r15330);
        double r15335 = r15333 - r15334;
        return r15335;
}


double f_of(float a, float __attribute__((unused)) b, float c, float __attribute__((unused)) d) {
        float r15336 = a;
        float r15337 = c;
        float r15338 = atan2(r15336, r15337);
        float r15339 = atan2(r15338, r15336);
        float r15340 = log1p(r15339);
        float r15341 = expm1(r15340);
        float r15342 = log(r15336);
        float r15343 = r15341 - r15342;
        return r15343;
}

double f_od(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15344 = a;
        double r15345 = c;
        double r15346 = atan2(r15344, r15345);
        double r15347 = atan2(r15346, r15344);
        double r15348 = log1p(r15347);
        double r15349 = expm1(r15348);
        double r15350 = log(r15344);
        double r15351 = r15349 - r15350;
        return r15351;
}

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 r15352, r15353, r15354, r15355, r15356, r15357;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15352);
        mpfr_init(r15353);
        mpfr_init(r15354);
        mpfr_init(r15355);
        mpfr_init(r15356);
        mpfr_init(r15357);
}

double f_im(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15352, a, MPFR_RNDN);
        mpfr_set_d(r15353, c, MPFR_RNDN);
        mpfr_atan2(r15354, r15352, r15353, MPFR_RNDN);
        mpfr_atan2(r15355, r15354, r15352, MPFR_RNDN);
        mpfr_log(r15356, r15352, MPFR_RNDN);
        mpfr_sub(r15357, r15355, r15356, MPFR_RNDN);
        return mpfr_get_d(r15357, MPFR_RNDN);
}

static mpfr_t r15358, r15359, r15360, r15361, r15362, r15363, r15364, r15365;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15358);
        mpfr_init(r15359);
        mpfr_init(r15360);
        mpfr_init(r15361);
        mpfr_init(r15362);
        mpfr_init(r15363);
        mpfr_init(r15364);
        mpfr_init(r15365);
}

double f_fm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15358, a, MPFR_RNDN);
        mpfr_set_d(r15359, c, MPFR_RNDN);
        mpfr_atan2(r15360, r15358, r15359, MPFR_RNDN);
        mpfr_atan2(r15361, r15360, r15358, MPFR_RNDN);
        mpfr_log1p(r15362, r15361, MPFR_RNDN);
        mpfr_expm1(r15363, r15362, MPFR_RNDN);
        mpfr_log(r15364, r15358, MPFR_RNDN);
        mpfr_sub(r15365, r15363, r15364, MPFR_RNDN);
        return mpfr_get_d(r15365, MPFR_RNDN);
}

static mpfr_t r15366, r15367, r15368, r15369, r15370, r15371, r15372, r15373;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15366);
        mpfr_init(r15367);
        mpfr_init(r15368);
        mpfr_init(r15369);
        mpfr_init(r15370);
        mpfr_init(r15371);
        mpfr_init(r15372);
        mpfr_init(r15373);
}

double f_dm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15366, a, MPFR_RNDN);
        mpfr_set_d(r15367, c, MPFR_RNDN);
        mpfr_atan2(r15368, r15366, r15367, MPFR_RNDN);
        mpfr_atan2(r15369, r15368, r15366, MPFR_RNDN);
        mpfr_log1p(r15370, r15369, MPFR_RNDN);
        mpfr_expm1(r15371, r15370, MPFR_RNDN);
        mpfr_log(r15372, r15366, MPFR_RNDN);
        mpfr_sub(r15373, r15371, r15372, MPFR_RNDN);
        return mpfr_get_d(r15373, MPFR_RNDN);
}

