#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 r15460 = a;
        float r15461 = c;
        float r15462 = atan2(r15460, r15461);
        float r15463 = atan2(r15462, r15460);
        float r15464 = log(r15460);
        float r15465 = r15463 - r15464;
        return r15465;
}

double f_id(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15466 = a;
        double r15467 = c;
        double r15468 = atan2(r15466, r15467);
        double r15469 = atan2(r15468, r15466);
        double r15470 = log(r15466);
        double r15471 = r15469 - r15470;
        return r15471;
}


double f_of(float a, float __attribute__((unused)) b, float c, float __attribute__((unused)) d) {
        float r15472 = a;
        float r15473 = c;
        float r15474 = atan2(r15472, r15473);
        float r15475 = atan2(r15474, r15472);
        float r15476 = exp(r15475);
        float r15477 = r15476 / r15472;
        float r15478 = log(r15477);
        return r15478;
}

double f_od(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15479 = a;
        double r15480 = c;
        double r15481 = atan2(r15479, r15480);
        double r15482 = atan2(r15481, r15479);
        double r15483 = exp(r15482);
        double r15484 = r15483 / r15479;
        double r15485 = log(r15484);
        return r15485;
}

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 r15486, r15487, r15488, r15489, r15490, r15491;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15486);
        mpfr_init(r15487);
        mpfr_init(r15488);
        mpfr_init(r15489);
        mpfr_init(r15490);
        mpfr_init(r15491);
}

double f_im(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15486, a, MPFR_RNDN);
        mpfr_set_d(r15487, c, MPFR_RNDN);
        mpfr_atan2(r15488, r15486, r15487, MPFR_RNDN);
        mpfr_atan2(r15489, r15488, r15486, MPFR_RNDN);
        mpfr_log(r15490, r15486, MPFR_RNDN);
        mpfr_sub(r15491, r15489, r15490, MPFR_RNDN);
        return mpfr_get_d(r15491, MPFR_RNDN);
}

static mpfr_t r15492, r15493, r15494, r15495, r15496, r15497, r15498;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15492);
        mpfr_init(r15493);
        mpfr_init(r15494);
        mpfr_init(r15495);
        mpfr_init(r15496);
        mpfr_init(r15497);
        mpfr_init(r15498);
}

double f_fm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15492, a, MPFR_RNDN);
        mpfr_set_d(r15493, c, MPFR_RNDN);
        mpfr_atan2(r15494, r15492, r15493, MPFR_RNDN);
        mpfr_atan2(r15495, r15494, r15492, MPFR_RNDN);
        mpfr_exp(r15496, r15495, MPFR_RNDN);
        mpfr_div(r15497, r15496, r15492, MPFR_RNDN);
        mpfr_log(r15498, r15497, MPFR_RNDN);
        return mpfr_get_d(r15498, MPFR_RNDN);
}

static mpfr_t r15499, r15500, r15501, r15502, r15503, r15504, r15505;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15499);
        mpfr_init(r15500);
        mpfr_init(r15501);
        mpfr_init(r15502);
        mpfr_init(r15503);
        mpfr_init(r15504);
        mpfr_init(r15505);
}

double f_dm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15499, a, MPFR_RNDN);
        mpfr_set_d(r15500, c, MPFR_RNDN);
        mpfr_atan2(r15501, r15499, r15500, MPFR_RNDN);
        mpfr_atan2(r15502, r15501, r15499, MPFR_RNDN);
        mpfr_exp(r15503, r15502, MPFR_RNDN);
        mpfr_div(r15504, r15503, r15499, MPFR_RNDN);
        mpfr_log(r15505, r15504, MPFR_RNDN);
        return mpfr_get_d(r15505, MPFR_RNDN);
}

