#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 r15344 = a;
        float r15345 = c;
        float r15346 = atan2(r15344, r15345);
        float r15347 = atan2(r15346, r15344);
        float r15348 = log(r15344);
        float r15349 = r15347 - r15348;
        return r15349;
}

double f_id(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15350 = a;
        double r15351 = c;
        double r15352 = atan2(r15350, r15351);
        double r15353 = atan2(r15352, r15350);
        double r15354 = log(r15350);
        double r15355 = r15353 - r15354;
        return r15355;
}


double f_of(float a, float __attribute__((unused)) b, float c, float __attribute__((unused)) d) {
        float r15356 = a;
        float r15357 = c;
        float r15358 = atan2(r15356, r15357);
        float r15359 = atan2(r15358, r15356);
        float r15360 = sqrt(r15359);
        float r15361 = sqrt(r15360);
        float r15362 = r15361 * r15361;
        float r15363 = r15362 * r15362;
        float r15364 = log(r15356);
        float r15365 = r15363 - r15364;
        return r15365;
}

double f_od(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15366 = a;
        double r15367 = c;
        double r15368 = atan2(r15366, r15367);
        double r15369 = atan2(r15368, r15366);
        double r15370 = sqrt(r15369);
        double r15371 = sqrt(r15370);
        double r15372 = r15371 * r15371;
        double r15373 = r15372 * r15372;
        double r15374 = log(r15366);
        double r15375 = r15373 - r15374;
        return r15375;
}

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 r15376, r15377, r15378, r15379, r15380, r15381;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15376);
        mpfr_init(r15377);
        mpfr_init(r15378);
        mpfr_init(r15379);
        mpfr_init(r15380);
        mpfr_init(r15381);
}

double f_im(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15376, a, MPFR_RNDN);
        mpfr_set_d(r15377, c, MPFR_RNDN);
        mpfr_atan2(r15378, r15376, r15377, MPFR_RNDN);
        mpfr_atan2(r15379, r15378, r15376, MPFR_RNDN);
        mpfr_log(r15380, r15376, MPFR_RNDN);
        mpfr_sub(r15381, r15379, r15380, MPFR_RNDN);
        return mpfr_get_d(r15381, MPFR_RNDN);
}

static mpfr_t r15382, r15383, r15384, r15385, r15386, r15387, r15388, r15389, r15390, r15391;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15382);
        mpfr_init(r15383);
        mpfr_init(r15384);
        mpfr_init(r15385);
        mpfr_init(r15386);
        mpfr_init(r15387);
        mpfr_init(r15388);
        mpfr_init(r15389);
        mpfr_init(r15390);
        mpfr_init(r15391);
}

double f_fm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15382, a, MPFR_RNDN);
        mpfr_set_d(r15383, c, MPFR_RNDN);
        mpfr_atan2(r15384, r15382, r15383, MPFR_RNDN);
        mpfr_atan2(r15385, r15384, r15382, MPFR_RNDN);
        mpfr_sqrt(r15386, r15385, MPFR_RNDN);
        mpfr_sqrt(r15387, r15386, MPFR_RNDN);
        mpfr_sqr(r15388, r15387, MPFR_RNDN);
        mpfr_sqr(r15389, r15388, MPFR_RNDN);
        mpfr_log(r15390, r15382, MPFR_RNDN);
        mpfr_sub(r15391, r15389, r15390, MPFR_RNDN);
        return mpfr_get_d(r15391, MPFR_RNDN);
}

static mpfr_t r15392, r15393, r15394, r15395, r15396, r15397, r15398, r15399, r15400, r15401;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15392);
        mpfr_init(r15393);
        mpfr_init(r15394);
        mpfr_init(r15395);
        mpfr_init(r15396);
        mpfr_init(r15397);
        mpfr_init(r15398);
        mpfr_init(r15399);
        mpfr_init(r15400);
        mpfr_init(r15401);
}

double f_dm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15392, a, MPFR_RNDN);
        mpfr_set_d(r15393, c, MPFR_RNDN);
        mpfr_atan2(r15394, r15392, r15393, MPFR_RNDN);
        mpfr_atan2(r15395, r15394, r15392, MPFR_RNDN);
        mpfr_sqrt(r15396, r15395, MPFR_RNDN);
        mpfr_sqrt(r15397, r15396, MPFR_RNDN);
        mpfr_sqr(r15398, r15397, MPFR_RNDN);
        mpfr_sqr(r15399, r15398, MPFR_RNDN);
        mpfr_log(r15400, r15392, MPFR_RNDN);
        mpfr_sub(r15401, r15399, r15400, MPFR_RNDN);
        return mpfr_get_d(r15401, MPFR_RNDN);
}

