#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 r15359 = a;
        float r15360 = c;
        float r15361 = atan2(r15359, r15360);
        float r15362 = atan2(r15361, r15359);
        float r15363 = log(r15359);
        float r15364 = r15362 - r15363;
        return r15364;
}

double f_id(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15365 = a;
        double r15366 = c;
        double r15367 = atan2(r15365, r15366);
        double r15368 = atan2(r15367, r15365);
        double r15369 = log(r15365);
        double r15370 = r15368 - r15369;
        return r15370;
}


double f_of(float a, float __attribute__((unused)) b, float c, float __attribute__((unused)) d) {
        float r15371 = a;
        float r15372 = c;
        float r15373 = atan2(r15371, r15372);
        float r15374 = atan2(r15373, r15371);
        float r15375 = exp(r15374);
        float r15376 = r15375 / r15371;
        float r15377 = log(r15376);
        return r15377;
}

double f_od(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15378 = a;
        double r15379 = c;
        double r15380 = atan2(r15378, r15379);
        double r15381 = atan2(r15380, r15378);
        double r15382 = exp(r15381);
        double r15383 = r15382 / r15378;
        double r15384 = log(r15383);
        return r15384;
}

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 r15385, r15386, r15387, r15388, r15389, r15390;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15385);
        mpfr_init(r15386);
        mpfr_init(r15387);
        mpfr_init(r15388);
        mpfr_init(r15389);
        mpfr_init(r15390);
}

double f_im(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15385, a, MPFR_RNDN);
        mpfr_set_d(r15386, c, MPFR_RNDN);
        mpfr_atan2(r15387, r15385, r15386, MPFR_RNDN);
        mpfr_atan2(r15388, r15387, r15385, MPFR_RNDN);
        mpfr_log(r15389, r15385, MPFR_RNDN);
        mpfr_sub(r15390, r15388, r15389, MPFR_RNDN);
        return mpfr_get_d(r15390, MPFR_RNDN);
}

static mpfr_t r15391, r15392, r15393, r15394, r15395, r15396, r15397;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15391);
        mpfr_init(r15392);
        mpfr_init(r15393);
        mpfr_init(r15394);
        mpfr_init(r15395);
        mpfr_init(r15396);
        mpfr_init(r15397);
}

double f_fm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15391, a, MPFR_RNDN);
        mpfr_set_d(r15392, c, MPFR_RNDN);
        mpfr_atan2(r15393, r15391, r15392, MPFR_RNDN);
        mpfr_atan2(r15394, r15393, r15391, MPFR_RNDN);
        mpfr_exp(r15395, r15394, MPFR_RNDN);
        mpfr_div(r15396, r15395, r15391, MPFR_RNDN);
        mpfr_log(r15397, r15396, MPFR_RNDN);
        return mpfr_get_d(r15397, MPFR_RNDN);
}

static mpfr_t r15398, r15399, r15400, r15401, r15402, r15403, r15404;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15398);
        mpfr_init(r15399);
        mpfr_init(r15400);
        mpfr_init(r15401);
        mpfr_init(r15402);
        mpfr_init(r15403);
        mpfr_init(r15404);
}

double f_dm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15398, a, MPFR_RNDN);
        mpfr_set_d(r15399, c, MPFR_RNDN);
        mpfr_atan2(r15400, r15398, r15399, MPFR_RNDN);
        mpfr_atan2(r15401, r15400, r15398, MPFR_RNDN);
        mpfr_exp(r15402, r15401, MPFR_RNDN);
        mpfr_div(r15403, r15402, r15398, MPFR_RNDN);
        mpfr_log(r15404, r15403, MPFR_RNDN);
        return mpfr_get_d(r15404, MPFR_RNDN);
}

