#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 r15407 = a;
        float r15408 = c;
        float r15409 = atan2(r15407, r15408);
        float r15410 = atan2(r15409, r15407);
        float r15411 = log(r15407);
        float r15412 = r15410 - r15411;
        return r15412;
}

double f_id(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15413 = a;
        double r15414 = c;
        double r15415 = atan2(r15413, r15414);
        double r15416 = atan2(r15415, r15413);
        double r15417 = log(r15413);
        double r15418 = r15416 - r15417;
        return r15418;
}


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

double f_od(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15426 = a;
        double r15427 = c;
        double r15428 = atan2(r15426, r15427);
        double r15429 = atan2(r15428, r15426);
        double r15430 = exp(r15429);
        double r15431 = r15430 / r15426;
        double r15432 = log(r15431);
        return r15432;
}

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 r15433, r15434, r15435, r15436, r15437, r15438;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15433);
        mpfr_init(r15434);
        mpfr_init(r15435);
        mpfr_init(r15436);
        mpfr_init(r15437);
        mpfr_init(r15438);
}

double f_im(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15433, a, MPFR_RNDN);
        mpfr_set_d(r15434, c, MPFR_RNDN);
        mpfr_atan2(r15435, r15433, r15434, MPFR_RNDN);
        mpfr_atan2(r15436, r15435, r15433, MPFR_RNDN);
        mpfr_log(r15437, r15433, MPFR_RNDN);
        mpfr_sub(r15438, r15436, r15437, MPFR_RNDN);
        return mpfr_get_d(r15438, MPFR_RNDN);
}

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

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15439);
        mpfr_init(r15440);
        mpfr_init(r15441);
        mpfr_init(r15442);
        mpfr_init(r15443);
        mpfr_init(r15444);
        mpfr_init(r15445);
}

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

static mpfr_t r15446, r15447, r15448, r15449, r15450, r15451, r15452;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15446);
        mpfr_init(r15447);
        mpfr_init(r15448);
        mpfr_init(r15449);
        mpfr_init(r15450);
        mpfr_init(r15451);
        mpfr_init(r15452);
}

double f_dm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15446, a, MPFR_RNDN);
        mpfr_set_d(r15447, c, MPFR_RNDN);
        mpfr_atan2(r15448, r15446, r15447, MPFR_RNDN);
        mpfr_atan2(r15449, r15448, r15446, MPFR_RNDN);
        mpfr_exp(r15450, r15449, MPFR_RNDN);
        mpfr_div(r15451, r15450, r15446, MPFR_RNDN);
        mpfr_log(r15452, r15451, MPFR_RNDN);
        return mpfr_get_d(r15452, MPFR_RNDN);
}

