#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 r15387 = a;
        float r15388 = c;
        float r15389 = atan2(r15387, r15388);
        float r15390 = atan2(r15389, r15387);
        float r15391 = log(r15387);
        float r15392 = r15390 - r15391;
        return r15392;
}

double f_id(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15393 = a;
        double r15394 = c;
        double r15395 = atan2(r15393, r15394);
        double r15396 = atan2(r15395, r15393);
        double r15397 = log(r15393);
        double r15398 = r15396 - r15397;
        return r15398;
}


double f_of(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 = exp(r15402);
        float r15404 = r15403 / r15399;
        float r15405 = log(r15404);
        return r15405;
}

double f_od(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15406 = a;
        double r15407 = c;
        double r15408 = atan2(r15406, r15407);
        double r15409 = atan2(r15408, r15406);
        double r15410 = exp(r15409);
        double r15411 = r15410 / r15406;
        double r15412 = log(r15411);
        return r15412;
}

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 r15413, r15414, r15415, r15416, r15417, r15418;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15413);
        mpfr_init(r15414);
        mpfr_init(r15415);
        mpfr_init(r15416);
        mpfr_init(r15417);
        mpfr_init(r15418);
}

double f_im(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15413, a, MPFR_RNDN);
        mpfr_set_d(r15414, c, MPFR_RNDN);
        mpfr_atan2(r15415, r15413, r15414, MPFR_RNDN);
        mpfr_atan2(r15416, r15415, r15413, MPFR_RNDN);
        mpfr_log(r15417, r15413, MPFR_RNDN);
        mpfr_sub(r15418, r15416, r15417, MPFR_RNDN);
        return mpfr_get_d(r15418, MPFR_RNDN);
}

static mpfr_t r15419, r15420, r15421, r15422, r15423, r15424, r15425;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15419);
        mpfr_init(r15420);
        mpfr_init(r15421);
        mpfr_init(r15422);
        mpfr_init(r15423);
        mpfr_init(r15424);
        mpfr_init(r15425);
}

double f_fm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15419, a, MPFR_RNDN);
        mpfr_set_d(r15420, c, MPFR_RNDN);
        mpfr_atan2(r15421, r15419, r15420, MPFR_RNDN);
        mpfr_atan2(r15422, r15421, r15419, MPFR_RNDN);
        mpfr_exp(r15423, r15422, MPFR_RNDN);
        mpfr_div(r15424, r15423, r15419, MPFR_RNDN);
        mpfr_log(r15425, r15424, MPFR_RNDN);
        return mpfr_get_d(r15425, MPFR_RNDN);
}

static mpfr_t r15426, r15427, r15428, r15429, r15430, r15431, r15432;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15426);
        mpfr_init(r15427);
        mpfr_init(r15428);
        mpfr_init(r15429);
        mpfr_init(r15430);
        mpfr_init(r15431);
        mpfr_init(r15432);
}

double f_dm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15426, a, MPFR_RNDN);
        mpfr_set_d(r15427, c, MPFR_RNDN);
        mpfr_atan2(r15428, r15426, r15427, MPFR_RNDN);
        mpfr_atan2(r15429, r15428, r15426, MPFR_RNDN);
        mpfr_exp(r15430, r15429, MPFR_RNDN);
        mpfr_div(r15431, r15430, r15426, MPFR_RNDN);
        mpfr_log(r15432, r15431, MPFR_RNDN);
        return mpfr_get_d(r15432, MPFR_RNDN);
}

