#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 r15340 = a;
        float r15341 = c;
        float r15342 = atan2(r15340, r15341);
        float r15343 = atan2(r15342, r15340);
        float r15344 = log(r15340);
        float r15345 = r15343 - r15344;
        return r15345;
}

double f_id(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15346 = a;
        double r15347 = c;
        double r15348 = atan2(r15346, r15347);
        double r15349 = atan2(r15348, r15346);
        double r15350 = log(r15346);
        double r15351 = r15349 - r15350;
        return r15351;
}


double f_of(float a, float __attribute__((unused)) b, float c, float __attribute__((unused)) d) {
        float r15352 = a;
        float r15353 = c;
        float r15354 = atan2(r15352, r15353);
        float r15355 = atan2(r15354, r15352);
        float r15356 = sqrt(r15355);
        float r15357 = r15356 * r15356;
        float r15358 = log(r15352);
        float r15359 = r15357 - r15358;
        return r15359;
}

double f_od(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15360 = a;
        double r15361 = c;
        double r15362 = atan2(r15360, r15361);
        double r15363 = atan2(r15362, r15360);
        double r15364 = sqrt(r15363);
        double r15365 = r15364 * r15364;
        double r15366 = log(r15360);
        double r15367 = r15365 - r15366;
        return r15367;
}

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 r15368, r15369, r15370, r15371, r15372, r15373;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15368);
        mpfr_init(r15369);
        mpfr_init(r15370);
        mpfr_init(r15371);
        mpfr_init(r15372);
        mpfr_init(r15373);
}

double f_im(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15368, a, MPFR_RNDN);
        mpfr_set_d(r15369, c, MPFR_RNDN);
        mpfr_atan2(r15370, r15368, r15369, MPFR_RNDN);
        mpfr_atan2(r15371, r15370, r15368, MPFR_RNDN);
        mpfr_log(r15372, r15368, MPFR_RNDN);
        mpfr_sub(r15373, r15371, r15372, MPFR_RNDN);
        return mpfr_get_d(r15373, MPFR_RNDN);
}

static mpfr_t r15374, r15375, r15376, r15377, r15378, r15379, r15380, r15381;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15374);
        mpfr_init(r15375);
        mpfr_init(r15376);
        mpfr_init(r15377);
        mpfr_init(r15378);
        mpfr_init(r15379);
        mpfr_init(r15380);
        mpfr_init(r15381);
}

double f_fm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15374, a, MPFR_RNDN);
        mpfr_set_d(r15375, c, MPFR_RNDN);
        mpfr_atan2(r15376, r15374, r15375, MPFR_RNDN);
        mpfr_atan2(r15377, r15376, r15374, MPFR_RNDN);
        mpfr_sqrt(r15378, r15377, MPFR_RNDN);
        mpfr_sqr(r15379, r15378, MPFR_RNDN);
        mpfr_log(r15380, r15374, 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;

void setup_mpfr_f_dm() {
        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);
}

double f_dm(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_sqr(r15387, r15386, MPFR_RNDN);
        mpfr_log(r15388, r15382, MPFR_RNDN);
        mpfr_sub(r15389, r15387, r15388, MPFR_RNDN);
        return mpfr_get_d(r15389, MPFR_RNDN);
}

