#include <tgmath.h>
#include <gmp.h>
#include <mpfr.h>
#include <stdio.h>
#include <stdbool.h>

char *name = "Commute and associate";

double f_if(float x, float y, float z) {
        float r19562 = x;
        float r19563 = y;
        float r19564 = r19562 + r19563;
        float r19565 = z;
        float r19566 = r19564 + r19565;
        float r19567 = r19563 + r19565;
        float r19568 = r19562 + r19567;
        float r19569 = r19566 - r19568;
        return r19569;
}

double f_id(double x, double y, double z) {
        double r19570 = x;
        double r19571 = y;
        double r19572 = r19570 + r19571;
        double r19573 = z;
        double r19574 = r19572 + r19573;
        double r19575 = r19571 + r19573;
        double r19576 = r19570 + r19575;
        double r19577 = r19574 - r19576;
        return r19577;
}


double f_of(float __attribute__((unused)) x, float __attribute__((unused)) y, float __attribute__((unused)) z) {
        float r19578 = 0;
        return r19578;
}

double f_od(double __attribute__((unused)) x, double __attribute__((unused)) y, double __attribute__((unused)) z) {
        double r19579 = 0;
        return r19579;
}

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 r19580, r19581, r19582, r19583, r19584, r19585, r19586, r19587;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r19580);
        mpfr_init(r19581);
        mpfr_init(r19582);
        mpfr_init(r19583);
        mpfr_init(r19584);
        mpfr_init(r19585);
        mpfr_init(r19586);
        mpfr_init(r19587);
}

double f_im(double x, double y, double z) {
        mpfr_set_d(r19580, x, MPFR_RNDN);
        mpfr_set_d(r19581, y, MPFR_RNDN);
        mpfr_add(r19582, r19580, r19581, MPFR_RNDN);
        mpfr_set_d(r19583, z, MPFR_RNDN);
        mpfr_add(r19584, r19582, r19583, MPFR_RNDN);
        mpfr_add(r19585, r19581, r19583, MPFR_RNDN);
        mpfr_add(r19586, r19580, r19585, MPFR_RNDN);
        mpfr_sub(r19587, r19584, r19586, MPFR_RNDN);
        return mpfr_get_d(r19587, MPFR_RNDN);
}

static mpfr_t r19588;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init_set_str(r19588, "0", 10, MPFR_RNDN);
}

double f_fm(double __attribute__((unused)) x, double __attribute__((unused)) y, double __attribute__((unused)) z) {
        ;
        return mpfr_get_d(r19588, MPFR_RNDN);
}

static mpfr_t r19589;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init_set_str(r19589, "0", 10, MPFR_RNDN);
}

double f_dm(double __attribute__((unused)) x, double __attribute__((unused)) y, double __attribute__((unused)) z) {
        ;
        return mpfr_get_d(r19589, MPFR_RNDN);
}

