#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 r15399 = a;
        float r15400 = c;
        float r15401 = atan2(r15399, r15400);
        float r15402 = atan2(r15401, r15399);
        float r15403 = log(r15399);
        float r15404 = r15402 - r15403;
        return r15404;
}

double f_id(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15405 = a;
        double r15406 = c;
        double r15407 = atan2(r15405, r15406);
        double r15408 = atan2(r15407, r15405);
        double r15409 = log(r15405);
        double r15410 = r15408 - r15409;
        return r15410;
}


double f_of(float a, float __attribute__((unused)) b, float c, float __attribute__((unused)) d) {
        float r15411 = a;
        float r15412 = c;
        float r15413 = atan2(r15411, r15412);
        float r15414 = atan2(r15413, r15411);
        float r15415 = exp(r15414);
        float r15416 = r15415 / r15411;
        float r15417 = log(r15416);
        return r15417;
}

double f_od(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15418 = a;
        double r15419 = c;
        double r15420 = atan2(r15418, r15419);
        double r15421 = atan2(r15420, r15418);
        double r15422 = exp(r15421);
        double r15423 = r15422 / r15418;
        double r15424 = log(r15423);
        return r15424;
}

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 r15425, r15426, r15427, r15428, r15429, r15430;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15425);
        mpfr_init(r15426);
        mpfr_init(r15427);
        mpfr_init(r15428);
        mpfr_init(r15429);
        mpfr_init(r15430);
}

double f_im(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15425, a, MPFR_RNDN);
        mpfr_set_d(r15426, c, MPFR_RNDN);
        mpfr_atan2(r15427, r15425, r15426, MPFR_RNDN);
        mpfr_atan2(r15428, r15427, r15425, MPFR_RNDN);
        mpfr_log(r15429, r15425, MPFR_RNDN);
        mpfr_sub(r15430, r15428, r15429, MPFR_RNDN);
        return mpfr_get_d(r15430, MPFR_RNDN);
}

static mpfr_t r15431, r15432, r15433, r15434, r15435, r15436, r15437;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15431);
        mpfr_init(r15432);
        mpfr_init(r15433);
        mpfr_init(r15434);
        mpfr_init(r15435);
        mpfr_init(r15436);
        mpfr_init(r15437);
}

double f_fm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15431, a, MPFR_RNDN);
        mpfr_set_d(r15432, c, MPFR_RNDN);
        mpfr_atan2(r15433, r15431, r15432, MPFR_RNDN);
        mpfr_atan2(r15434, r15433, r15431, MPFR_RNDN);
        mpfr_exp(r15435, r15434, MPFR_RNDN);
        mpfr_div(r15436, r15435, r15431, MPFR_RNDN);
        mpfr_log(r15437, r15436, MPFR_RNDN);
        return mpfr_get_d(r15437, MPFR_RNDN);
}

static mpfr_t r15438, r15439, r15440, r15441, r15442, r15443, r15444;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15438);
        mpfr_init(r15439);
        mpfr_init(r15440);
        mpfr_init(r15441);
        mpfr_init(r15442);
        mpfr_init(r15443);
        mpfr_init(r15444);
}

double f_dm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15438, a, MPFR_RNDN);
        mpfr_set_d(r15439, c, MPFR_RNDN);
        mpfr_atan2(r15440, r15438, r15439, MPFR_RNDN);
        mpfr_atan2(r15441, r15440, r15438, MPFR_RNDN);
        mpfr_exp(r15442, r15441, MPFR_RNDN);
        mpfr_div(r15443, r15442, r15438, MPFR_RNDN);
        mpfr_log(r15444, r15443, MPFR_RNDN);
        return mpfr_get_d(r15444, MPFR_RNDN);
}

