#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 r15376 = a;
        float r15377 = c;
        float r15378 = atan2(r15376, r15377);
        float r15379 = atan2(r15378, r15376);
        float r15380 = log(r15376);
        float r15381 = r15379 - r15380;
        return r15381;
}

double f_id(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15382 = a;
        double r15383 = c;
        double r15384 = atan2(r15382, r15383);
        double r15385 = atan2(r15384, r15382);
        double r15386 = log(r15382);
        double r15387 = r15385 - r15386;
        return r15387;
}


double f_of(float a, float __attribute__((unused)) b, float c, float __attribute__((unused)) d) {
        float r15388 = a;
        float r15389 = c;
        float r15390 = atan2(r15388, r15389);
        float r15391 = atan2(r15390, r15388);
        float r15392 = exp(r15391);
        float r15393 = r15392 / r15388;
        float r15394 = log(r15393);
        return r15394;
}

double f_od(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15395 = a;
        double r15396 = c;
        double r15397 = atan2(r15395, r15396);
        double r15398 = atan2(r15397, r15395);
        double r15399 = exp(r15398);
        double r15400 = r15399 / r15395;
        double r15401 = log(r15400);
        return r15401;
}

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 r15402, r15403, r15404, r15405, r15406, r15407;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15402);
        mpfr_init(r15403);
        mpfr_init(r15404);
        mpfr_init(r15405);
        mpfr_init(r15406);
        mpfr_init(r15407);
}

double f_im(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15402, a, MPFR_RNDN);
        mpfr_set_d(r15403, c, MPFR_RNDN);
        mpfr_atan2(r15404, r15402, r15403, MPFR_RNDN);
        mpfr_atan2(r15405, r15404, r15402, MPFR_RNDN);
        mpfr_log(r15406, r15402, MPFR_RNDN);
        mpfr_sub(r15407, r15405, r15406, MPFR_RNDN);
        return mpfr_get_d(r15407, MPFR_RNDN);
}

static mpfr_t r15408, r15409, r15410, r15411, r15412, r15413, r15414;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15408);
        mpfr_init(r15409);
        mpfr_init(r15410);
        mpfr_init(r15411);
        mpfr_init(r15412);
        mpfr_init(r15413);
        mpfr_init(r15414);
}

double f_fm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15408, a, MPFR_RNDN);
        mpfr_set_d(r15409, c, MPFR_RNDN);
        mpfr_atan2(r15410, r15408, r15409, MPFR_RNDN);
        mpfr_atan2(r15411, r15410, r15408, MPFR_RNDN);
        mpfr_exp(r15412, r15411, MPFR_RNDN);
        mpfr_div(r15413, r15412, r15408, MPFR_RNDN);
        mpfr_log(r15414, r15413, MPFR_RNDN);
        return mpfr_get_d(r15414, MPFR_RNDN);
}

static mpfr_t r15415, r15416, r15417, r15418, r15419, r15420, r15421;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15415);
        mpfr_init(r15416);
        mpfr_init(r15417);
        mpfr_init(r15418);
        mpfr_init(r15419);
        mpfr_init(r15420);
        mpfr_init(r15421);
}

double f_dm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15415, a, MPFR_RNDN);
        mpfr_set_d(r15416, c, MPFR_RNDN);
        mpfr_atan2(r15417, r15415, r15416, MPFR_RNDN);
        mpfr_atan2(r15418, r15417, r15415, MPFR_RNDN);
        mpfr_exp(r15419, r15418, MPFR_RNDN);
        mpfr_div(r15420, r15419, r15415, MPFR_RNDN);
        mpfr_log(r15421, r15420, MPFR_RNDN);
        return mpfr_get_d(r15421, MPFR_RNDN);
}

