#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ mpfr_t;

/* Variables and functions */
int /*<<< orphan*/ CFUNC(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ GMP_RNDN;
int /*<<< orphan*/ TARGET(int /*<<< orphan*/, int /*<<< orphan*/);
int atof(char *);
int atoi(char *);
void *calloc(int, int);
double countULP(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ isfinite(double);
char *mpfrToStr(int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_add(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/, int /*<<< orphan*/);
scalar_t__ mpfr_cmp_d(int /*<<< orphan*/, int /*<<< orphan*/);
double mpfr_get_d(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_init2(int /*<<< orphan*/, int);
int /*<<< orphan*/ mpfr_inits(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/ *);
int /*<<< orphan*/ mpfr_mul(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_nextabove(int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_nextbelow(int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_pow(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_set(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_set_d(int /*<<< orphan*/, double, int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_set_default_prec(int);
int /*<<< orphan*/ mpfr_set_prec(int /*<<< orphan*/, int);
int /*<<< orphan*/ mpfr_zinit(int /*<<< orphan*/);
double pow(double, double);
int /*<<< orphan*/ printf(char *, ...);
int random();
int /*<<< orphan*/ regressMinRelError_fr(int, int, int /*<<< orphan*/ **,
                                         int /*<<< orphan*/ *);
int /*<<< orphan*/ srandom(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  int i, j;
  int n, m;
  double p;
  mpfr_set_default_prec(4096);
  m = 12 + 1;
  n = argc >= 2 ? atoi(argv[1]) : 50;
  p = argc >= 3 ? atof(argv[2]) : 1;
  mpfr_t **x, *result;
  x = calloc(sizeof(mpfr_t *), m);
  result = calloc(sizeof(mpfr_t), m);
  for (i = 0; i < m; i++) {
    x[i] = calloc(sizeof(mpfr_t), n);
    for (j = 0; j < n; j++)
      mpfr_zinit(x[i][j]);
    mpfr_zinit(result[i]);
  }
  mpfr_t fra, frb, frc, frd, fre;
  mpfr_zinit(fra);
  mpfr_zinit(frb);
  mpfr_zinit(frc);
  mpfr_zinit(frd);
  mpfr_zinit(fre);
  for (i = 0; i < n; i++) {
    double b = 1.0 - pow((double)i / (n - 1), p);
    double a = ((double)0.347 - -0.347) * b + -0.347;
    mpfr_set_d(fra, a, GMP_RNDN);
    CFUNC(frd, fra);
    for (j = 0; j < m - 1; j++) {
      mpfr_set_d(frb, (double)j * 1 + 0, GMP_RNDN);
      mpfr_pow(x[j][i], frd, frb, GMP_RNDN);
    }
    TARGET(x[m - 1][i], fra);
  }
  for (i = 0; i < m - 1; i++)
    mpfr_set_d(result[i], 0, GMP_RNDN);
  regressMinRelError_fr(n, m - 1, x, result);
  for (i = m - 2; i >= 0; i--) {
    mpfr_set_prec(fra, 53 + 4);
    mpfr_set(fra, result[i], GMP_RNDN);
    char *s;
    printf("%s, \n", s = mpfrToStr(fra));
    free(s);
  }
  printf("\n");
  mpfr_set_prec(fra, 4096);
  double emax = 0;
  for (i = 0; i <= n * 10; i++) {
    double a = i * (double)(0.347 - -0.347) / (n * 10.0) + -0.347;
    mpfr_set_d(fra, a, GMP_RNDN);
    CFUNC(frd, fra);
    mpfr_set_d(frb, 0, GMP_RNDN);
    for (j = m - 1; j >= 0; j--) {
      mpfr_set_d(frc, (double)j * 1 + 0, GMP_RNDN);
      mpfr_pow(frc, frd, frc, GMP_RNDN);
      mpfr_mul(frc, frc, result[j], GMP_RNDN);
      mpfr_add(frb, frb, frc, GMP_RNDN);
    }
    TARGET(frc, fra);
    double u = countULP(frb, frc);
    if (u > emax)
      emax = u;
  }
  printf("Phase 1 : Max error = %g ULP\n\n", emax);
  fflush(stdout);
  mpfr_t bestcoef[12], curcoef[12];
  for (i = 0; i < 12; i++) {
    mpfr_init2(bestcoef[i], i >= 2 ? 53 : (53 * 4));
    mpfr_set(bestcoef[i], result[i], GMP_RNDN);
    mpfr_init2(curcoef[i], i >= 2 ? 53 : (53 * 4));
    mpfr_set(curcoef[i], result[i], GMP_RNDN);
  }
  srandom(time(NULL));
  mpfr_set_default_prec((53 * 4));
  static mpfr_t a[10000], v[10000], am[10000], aa[10000];
  for (i = 0; i < 10000; i++) {
    mpfr_inits(a[i], v[i], am[i], aa[i], NULL);
    mpfr_set_d(fra,
               ((double)0.347 - (double)-0.347) * i / (double)(10000 - 1) +
                   (double)-0.347,
               GMP_RNDN);
    TARGET(v[i], fra);
    CFUNC(a[i], fra);
    mpfr_set_d(frb, 1, GMP_RNDN);
    mpfr_pow(am[i], a[i], frb, GMP_RNDN);
    mpfr_set_d(frb, 0, GMP_RNDN);
    mpfr_pow(aa[i], a[i], frb, GMP_RNDN);
  }
  double best = 1e+100, bestsum = 1e+100, bestworstx;
  for (int k = 0; k < 10000; k++) {
    double emax = 0, esum = 0, worstx = 0;
    mpfr_set_d(curcoef[0], 1.0, GMP_RNDN);
    mpfr_set_d(curcoef[1], 1.0, GMP_RNDN);
    for (i = 0; i < 10000; i++) {
      if (mpfr_cmp_d(v[i], 0) == 0)
        continue;
      mpfr_set_d(frb, 0, GMP_RNDN);
      for (j = 12 - 1; j >= 0; j--) {
        mpfr_set_d(frc, (double)j * 1 + 0, GMP_RNDN);
        mpfr_pow(frc, a[i], frc, GMP_RNDN);
        mpfr_mul(frc, frc, curcoef[j], GMP_RNDN);
        mpfr_add(frb, frb, frc, GMP_RNDN);
      }
      double e = countULP(frb, v[i]);
      if (!isfinite(e))
        continue;
      if (e > emax) {
        emax = e;
        worstx = mpfr_get_d(a[i], GMP_RNDN);
      }
      esum += e;
    }
    mpfr_set_prec(frb, 4096);
    if (emax < best || (emax == best && esum < bestsum)) {
      for (i = 0; i < 12; i++) {
        mpfr_set(bestcoef[i], curcoef[i], GMP_RNDN);
      }
      if (best == 1e+100 || k > 10)
        printf("Max error = %g ULP, Sum error = %g (Max error at %g)\n", emax,
               esum, worstx);
      if ((best - emax) / best > 0.0001)
        k = 0;
      best = emax;
      bestsum = esum;
      bestworstx = worstx;
    }
    for (i = 0; i < 12; i++) {
      mpfr_set(curcoef[i], bestcoef[i], GMP_RNDN);
    }
    for (i = 0; i < 12; i++) {
      static int tab[] = {0, 0, 0, 0, 0, 0, 1, -1};
      int r = tab[random() & 7];
      if (r > 0) {
        for (int j = 0; j < r; j++)
          mpfr_nextabove(curcoef[i]);
      } else if (r < 0) {
        for (int j = 0; j > r; j--)
          mpfr_nextbelow(curcoef[i]);
      }
    }
  }
  printf("\n");
  for (i = 12 - 1; i >= 0; i--) {
    mpfr_set_prec(fra, i >= 2 ? 53 + 4 : (53 * 4));
    mpfr_set(fra, bestcoef[i], GMP_RNDN);
    char *s;
    printf("%s, \n", s = mpfrToStr(fra));
    free(s);
  }
  printf("\nPhase 2 : max error = %g ULP at %g\n", best, bestworstx);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1000,%edi
call   11d0 <mpfr_set_default_prec@plt>
movl   $0xd,-0x20(%rbp)
cmpl   $0x2,-0x8(%rbp)
jl     133c <main+0x4c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   11f0 <atoi@plt>
mov    %eax,-0x13c(%rbp)
jmp    134c <main+0x5c>
mov    $0x32,%eax
mov    %eax,-0x13c(%rbp)
jmp    134c <main+0x5c>
mov    -0x13c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x3,-0x8(%rbp)
jl     1377 <main+0x87>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <atof@plt>
mov    %eax,-0x140(%rbp)
jmp    1387 <main+0x97>
mov    $0x1,%eax
mov    %eax,-0x140(%rbp)
jmp    1387 <main+0x97>
mov    -0x140(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x20(%rbp),%esi
mov    $0x8,%edi
call   1140 <calloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%esi
mov    $0x4,%edi
call   1140 <calloc@plt>
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    143e <main+0x14e>
mov    -0x1c(%rbp),%esi
mov    $0x4,%edi
call   1140 <calloc@plt>
mov    %rax,%rdx
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1420 <main+0x130>
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   10e0 <mpfr_zinit@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    13ee <main+0xfe>
mov    -0x38(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   10e0 <mpfr_zinit@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13bf <main+0xcf>
mov    -0x3c(%rbp),%edi
call   10e0 <mpfr_zinit@plt>
mov    -0x40(%rbp),%edi
call   10e0 <mpfr_zinit@plt>
mov    -0x44(%rbp),%edi
call   10e0 <mpfr_zinit@plt>
mov    -0x48(%rbp),%edi
call   10e0 <mpfr_zinit@plt>
mov    -0x4c(%rbp),%edi
call   10e0 <mpfr_zinit@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1585 <main+0x295>
cvtsi2sdl -0x14(%rbp),%xmm0
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
call   11e0 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xb67(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xb71(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb55(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x3c(%rbp),%edi
movsd  -0x60(%rbp),%xmm0
mov    0x2b05(%rip),%rax
mov    (%rax),%esi
call   10c0 <mpfr_set_d@plt>
mov    -0x48(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   1090 <CFUNC@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1557 <main+0x267>
mov    -0x40(%rbp),%edi
cvtsi2sdl -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
addsd  %xmm1,%xmm0
mov    0x2ac5(%rip),%rax
mov    (%rax),%esi
call   10c0 <mpfr_set_d@plt>
mov    -0x30(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x48(%rbp),%esi
mov    -0x40(%rbp),%edx
mov    0x2a9e(%rip),%rax
mov    (%rax),%ecx
call   10a0 <mpfr_pow@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    14f4 <main+0x204>
mov    -0x30(%rbp),%rax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x3c(%rbp),%esi
call   11a0 <TARGET@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    146d <main+0x17d>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    15c7 <main+0x2d7>
mov    -0x38(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    0x2a31(%rip),%rax
mov    (%rax),%esi
xorps  %xmm0,%xmm0
call   10c0 <mpfr_set_d@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    158c <main+0x29c>
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
sub    $0x1,%esi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
call   11b0 <regressMinRelError_fr@plt>
mov    -0x20(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     164d <main+0x35d>
mov    -0x3c(%rbp),%edi
mov    $0x39,%esi
call   10d0 <mpfr_set_prec@plt>
mov    -0x3c(%rbp),%edi
mov    -0x38(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    0x29ce(%rip),%rax
mov    (%rax),%edx
call   1130 <mpfr_set@plt>
mov    -0x3c(%rbp),%edi
call   1150 <mpfrToStr@plt>
mov    %rax,%rsi
mov    %rsi,-0x68(%rbp)
lea    0xa09(%rip),%rdi
mov    $0x0,%al
call   10f0 <printf@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    15e6 <main+0x2f6>
lea    0xa07(%rip),%rdi
mov    $0x0,%al
call   10f0 <printf@plt>
mov    -0x3c(%rbp),%edi
mov    $0x1000,%esi
call   10d0 <mpfr_set_prec@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
imul   $0xa,-0x1c(%rbp),%ecx
cmp    %ecx,%eax
jg     17c5 <main+0x4d5>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0x995(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
movsd  0x98c(%rip),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  0x964(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x3c(%rbp),%edi
movsd  -0x78(%rbp),%xmm0
mov    0x2914(%rip),%rax
mov    (%rax),%esi
call   10c0 <mpfr_set_d@plt>
mov    -0x48(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   1090 <CFUNC@plt>
mov    -0x40(%rbp),%edi
mov    0x28f8(%rip),%rax
mov    (%rax),%esi
xorps  %xmm0,%xmm0
call   10c0 <mpfr_set_d@plt>
mov    -0x20(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     177d <main+0x48d>
mov    -0x44(%rbp),%edi
cvtsi2sdl -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
addsd  %xmm1,%xmm0
mov    0x28c5(%rip),%rax
mov    (%rax),%esi
call   10c0 <mpfr_set_d@plt>
mov    -0x44(%rbp),%edi
mov    -0x48(%rbp),%esi
mov    -0x44(%rbp),%edx
mov    0x28ae(%rip),%rax
mov    (%rax),%ecx
call   10a0 <mpfr_pow@plt>
mov    -0x44(%rbp),%edi
mov    -0x44(%rbp),%esi
mov    -0x38(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    0x288f(%rip),%rax
mov    (%rax),%ecx
call   1080 <mpfr_mul@plt>
mov    -0x40(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x44(%rbp),%edx
mov    0x2878(%rip),%rax
mov    (%rax),%ecx
call   1120 <mpfr_add@plt>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    16fb <main+0x40b>
mov    -0x44(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   11a0 <TARGET@plt>
mov    -0x40(%rbp),%edi
mov    -0x44(%rbp),%esi
call   1100 <countULP@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
ucomisd -0x70(%rbp),%xmm0
jbe    17b2 <main+0x4c2>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    17b7 <main+0x4c7>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1677 <main+0x387>
movsd  -0x70(%rbp),%xmm0
lea    0x86d(%rip),%rdi
mov    $0x1,%al
call   10f0 <printf@plt>
mov    0x27f9(%rip),%rax
mov    (%rax),%edi
call   1190 <fflush@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0xc,-0x14(%rbp)
jge    1893 <main+0x5a3>
movslq -0x14(%rbp),%rax
mov    -0xb0(%rbp,%rax,4),%edi
mov    -0x14(%rbp),%ecx
mov    $0xd4,%esi
mov    $0x35,%eax
cmp    $0x2,%ecx
cmovge %eax,%esi
call   1200 <mpfr_init2@plt>
movslq -0x14(%rbp),%rax
mov    -0xb0(%rbp,%rax,4),%edi
mov    -0x38(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    0x27a9(%rip),%rax
mov    (%rax),%edx
call   1130 <mpfr_set@plt>
movslq -0x14(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%edi
mov    -0x14(%rbp),%ecx
mov    $0xd4,%esi
mov    $0x35,%eax
cmp    $0x2,%ecx
cmovge %eax,%esi
call   1200 <mpfr_init2@plt>
movslq -0x14(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%edi
mov    -0x38(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    0x2762(%rip),%rax
mov    (%rax),%edx
call   1130 <mpfr_set@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    17ed <main+0x4fd>
xor    %eax,%eax
mov    %eax,%edi
call   1160 <time@plt>
mov    %eax,%edi
call   1040 <srandom@plt>
mov    $0xd4,%edi
call   11d0 <mpfr_set_default_prec@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x2710,-0x14(%rbp)
jge    19fe <main+0x70e>
movslq -0x14(%rbp),%rcx
lea    0x2894(%rip),%rax
mov    (%rax,%rcx,4),%edi
movslq -0x14(%rbp),%rcx
lea    0xc4c6(%rip),%rax
mov    (%rax,%rcx,4),%esi
movslq -0x14(%rbp),%rcx
lea    0x160f8(%rip),%rax
mov    (%rax,%rcx,4),%edx
movslq -0x14(%rbp),%rcx
lea    0x1fd2a(%rip),%rax
mov    (%rax,%rcx,4),%ecx
xor    %eax,%eax
mov    %eax,%r8d
call   11c0 <mpfr_inits@plt>
mov    -0x3c(%rbp),%edi
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  0x715(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0x701(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0x6ed(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    0x26aa(%rip),%rax
mov    (%rax),%esi
call   10c0 <mpfr_set_d@plt>
movslq -0x14(%rbp),%rcx
lea    0xc458(%rip),%rax
mov    (%rax,%rcx,4),%edi
mov    -0x3c(%rbp),%esi
call   11a0 <TARGET@plt>
movslq -0x14(%rbp),%rcx
lea    0x2802(%rip),%rax
mov    (%rax,%rcx,4),%edi
mov    -0x3c(%rbp),%esi
call   1090 <CFUNC@plt>
mov    -0x40(%rbp),%edi
mov    0x266d(%rip),%rax
mov    (%rax),%esi
movsd  0x68b(%rip),%xmm0
call   10c0 <mpfr_set_d@plt>
movslq -0x14(%rbp),%rcx
lea    0x16053(%rip),%rax
mov    (%rax,%rcx,4),%edi
movslq -0x14(%rbp),%rcx
lea    0x27c5(%rip),%rax
mov    (%rax,%rcx,4),%esi
mov    -0x40(%rbp),%edx
mov    0x2638(%rip),%rax
mov    (%rax),%ecx
call   10a0 <mpfr_pow@plt>
mov    -0x40(%rbp),%edi
mov    0x2627(%rip),%rax
mov    (%rax),%esi
xorps  %xmm0,%xmm0
call   10c0 <mpfr_set_d@plt>
movslq -0x14(%rbp),%rcx
lea    0x1fc52(%rip),%rax
mov    (%rax,%rcx,4),%edi
movslq -0x14(%rbp),%rcx
lea    0x2784(%rip),%rax
mov    (%rax,%rcx,4),%esi
mov    -0x40(%rbp),%edx
mov    0x25f7(%rip),%rax
mov    (%rax),%ecx
call   10a0 <mpfr_pow@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    18b4 <main+0x5c4>
movsd  0x5fa(%rip),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  0x5ea(%rip),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movl   $0x0,-0xfc(%rbp)
cmpl   $0x2710,-0xfc(%rbp)
jge    1ebc <main+0xbcc>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
mov    -0xe0(%rbp),%edi
mov    0x257a(%rip),%rax
mov    (%rax),%esi
movsd  0x598(%rip),%xmm0
call   10c0 <mpfr_set_d@plt>
mov    -0xdc(%rbp),%edi
mov    0x255e(%rip),%rax
mov    (%rax),%esi
movsd  0x57c(%rip),%xmm0
call   10c0 <mpfr_set_d@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x2710,-0x14(%rbp)
jge    1c1a <main+0x92a>
movslq -0x14(%rbp),%rcx
lea    0xc2f0(%rip),%rax
mov    (%rax,%rcx,4),%edi
xor    %esi,%esi
call   1060 <mpfr_cmp_d@plt>
cmp    $0x0,%rax
jne    1ac9 <main+0x7d9>
jmp    1c0c <main+0x91c>
mov    -0x40(%rbp),%edi
mov    0x250d(%rip),%rax
mov    (%rax),%esi
xorps  %xmm0,%xmm0
call   10c0 <mpfr_set_d@plt>
movl   $0xb,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     1b71 <main+0x881>
mov    -0x44(%rbp),%edi
cvtsi2sdl -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
addsd  %xmm1,%xmm0
mov    0x24dc(%rip),%rax
mov    (%rax),%esi
call   10c0 <mpfr_set_d@plt>
mov    -0x44(%rbp),%edi
movslq -0x14(%rbp),%rcx
lea    0x2647(%rip),%rax
mov    (%rax,%rcx,4),%esi
mov    -0x44(%rbp),%edx
mov    0x24ba(%rip),%rax
mov    (%rax),%ecx
call   10a0 <mpfr_pow@plt>
mov    -0x44(%rbp),%edi
mov    -0x44(%rbp),%esi
movslq -0x18(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%edx
mov    0x249b(%rip),%rax
mov    (%rax),%ecx
call   1080 <mpfr_mul@plt>
mov    -0x40(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x44(%rbp),%edx
mov    0x2484(%rip),%rax
mov    (%rax),%ecx
call   1120 <mpfr_add@plt>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    1ae4 <main+0x7f4>
mov    -0x40(%rbp),%edi
movslq -0x14(%rbp),%rcx
lea    0xc221(%rip),%rax
mov    (%rax,%rcx,4),%esi
call   1100 <countULP@plt>
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x120(%rbp),%xmm0
ff
call   1170 <isfinite@plt>
cmp    $0x0,%eax
jne    1baa <main+0x8ba>
jmp    1c0c <main+0x91c>
movsd  -0x120(%rbp),%xmm0
ff
ucomisd -0x108(%rbp),%xmm0
ff
jbe    1bf4 <main+0x904>
movsd  -0x120(%rbp),%xmm0
ff
movsd  %xmm0,-0x108(%rbp)
ff
movslq -0x14(%rbp),%rcx
lea    0x2585(%rip),%rax
mov    (%rax,%rcx,4),%edi
mov    0x23fb(%rip),%rax
mov    (%rax),%esi
call   1070 <mpfr_get_d@plt>
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x120(%rbp),%xmm0
ff
addsd  -0x110(%rbp),%xmm0
ff
movsd  %xmm0,-0x110(%rbp)
ff
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1a98 <main+0x7a8>
mov    -0x40(%rbp),%edi
mov    $0x1000,%esi
call   10d0 <mpfr_set_prec@plt>
movsd  -0x108(%rbp),%xmm1
ff
movsd  -0xe8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
ja     1c77 <main+0x987>
movsd  -0x108(%rbp),%xmm0
ff
ucomisd -0xe8(%rbp),%xmm0
ff
jne    1d76 <main+0xa86>
jp     1d76 <main+0xa86>
movsd  -0x110(%rbp),%xmm1
ff
movsd  -0xf0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1d76 <main+0xa86>
movl   $0x0,-0x14(%rbp)
cmpl   $0xc,-0x14(%rbp)
jge    1cba <main+0x9ca>
movslq -0x14(%rbp),%rax
mov    -0xb0(%rbp,%rax,4),%edi
movslq -0x14(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%esi
mov    0x233b(%rip),%rax
mov    (%rax),%edx
call   1130 <mpfr_set@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1c7e <main+0x98e>
movsd  -0xe8(%rbp),%xmm0
ff
movsd  0x336(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1cdf <main+0x9ef>
jp     1cdf <main+0x9ef>
jmp    1cec <main+0x9fc>
cmpl   $0xa,-0xfc(%rbp)
jle    1d12 <main+0xa22>
movsd  -0x108(%rbp),%xmm0
ff
movsd  -0x110(%rbp),%xmm1
ff
movsd  -0x118(%rbp),%xmm2
ff
lea    0x352(%rip),%rdi
mov    $0x3,%al
call   10f0 <printf@plt>
movsd  -0xe8(%rbp),%xmm0
ff
subsd  -0x108(%rbp),%xmm0
ff
divsd  -0xe8(%rbp),%xmm0
ff
movsd  0x2de(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1d46 <main+0xa56>
movl   $0x0,-0xfc(%rbp)
movsd  -0x108(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x110(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x118(%rbp),%xmm0
ff
movsd  %xmm0,-0xf8(%rbp)
ff
movl   $0x0,-0x14(%rbp)
cmpl   $0xc,-0x14(%rbp)
jge    1db9 <main+0xac9>
movslq -0x14(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%edi
movslq -0x14(%rbp),%rax
mov    -0xb0(%rbp,%rax,4),%esi
mov    0x223c(%rip),%rax
mov    (%rax),%edx
call   1130 <mpfr_set@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1d7d <main+0xa8d>
movl   $0x0,-0x14(%rbp)
cmpl   $0xc,-0x14(%rbp)
jge    1ea3 <main+0xbb3>
mov    $0x0,%al
call   1180 <random@plt>
and    $0x7,%eax
movslq %eax,%rcx
lea    0x2342(%rip),%rax
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x124(%rbp)
cmpl   $0x0,-0x124(%rbp)
jle    1e39 <main+0xb49>
movl   $0x0,-0x128(%rbp)
mov    -0x128(%rbp),%eax
cmp    -0x124(%rbp),%eax
jge    1e34 <main+0xb44>
movslq -0x14(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%edi
call   1110 <mpfr_nextabove@plt>
mov    -0x128(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x128(%rbp)
jmp    1dfe <main+0xb0e>
jmp    1e90 <main+0xba0>
cmpl   $0x0,-0x124(%rbp)
jge    1e8b <main+0xb9b>
movl   $0x0,-0x12c(%rbp)
mov    -0x12c(%rbp),%eax
cmp    -0x124(%rbp),%eax
jle    1e86 <main+0xb96>
movslq -0x14(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%edi
call   10b0 <mpfr_nextbelow@plt>
mov    -0x12c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x12c(%rbp)
jmp    1e50 <main+0xb60>
jmp    1e8b <main+0xb9b>
jmp    1e90 <main+0xba0>
jmp    1e95 <main+0xba5>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1dc0 <main+0xad0>
jmp    1ea8 <main+0xbb8>
mov    -0xfc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xfc(%rbp)
jmp    1a28 <main+0x738>
lea    0x198(%rip),%rdi
mov    $0x0,%al
call   10f0 <printf@plt>
movl   $0xb,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1f4c <main+0xc5c>
mov    -0x3c(%rbp),%edi
mov    -0x14(%rbp),%ecx
mov    $0xd4,%esi
mov    $0x39,%eax
cmp    $0x2,%ecx
cmovge %eax,%esi
call   10d0 <mpfr_set_prec@plt>
mov    -0x3c(%rbp),%edi
movslq -0x14(%rbp),%rax
mov    -0xb0(%rbp,%rax,4),%esi
mov    0x20d5(%rip),%rax
mov    (%rax),%edx
call   1130 <mpfr_set@plt>
mov    -0x3c(%rbp),%edi
call   1150 <mpfrToStr@plt>
mov    %rax,%rsi
mov    %rsi,-0x138(%rbp)
lea    0x10d(%rip),%rdi
mov    $0x0,%al
call   10f0 <printf@plt>
mov    -0x138(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1ed1 <main+0xbe1>
movsd  -0xe8(%rbp),%xmm0
ff
movsd  -0xf8(%rbp),%xmm1
ff
lea    0x130(%rip),%rdi
mov    $0x2,%al
call   10f0 <printf@plt>
xor    %edi,%edi
call   1210 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
mov    $0x1000,%edi
call   1150 <mpfr_set_default_prec@plt>
movsd  0xd8b(%rip),%xmm0
movsd  %xmm0,(%rsp)
mov    $0x32,%r14d
cmp    $0x2,%ebp
jl     12ab <main+0x5b>
mov    0x8(%rbx),%rdi
call   1170 <atoi@plt>
mov    %eax,%r14d
cmp    $0x2,%ebp
je     12ab <main+0x5b>
mov    0x10(%rbx),%rdi
call   1050 <atof@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rsp)
mov    $0x8,%edi
mov    $0xd,%esi
call   1100 <calloc@plt>
mov    %rax,%r12
mov    $0x4,%edi
mov    $0xd,%esi
call   1100 <calloc@plt>
mov    %rax,%r15
mov    %r14d,%r14d
xor    %ebx,%ebx
jmp    12f3 <main+0xa3>
cs nopw 0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%edi
call   10b0 <mpfr_zinit@plt>
add    $0x1,%rbx
cmp    $0xd,%rbx
je     1337 <main+0xe7>
mov    $0x4,%edi
mov    %r14d,%esi
call   1100 <calloc@plt>
mov    %rax,(%r12,%rbx,8)
test   %r14d,%r14d
jle    12e0 <main+0x90>
xor    %edi,%edi
call   10b0 <mpfr_zinit@plt>
cmp    $0x1,%r14d
je     12e0 <main+0x90>
mov    $0x1,%ebp
nopl   0x0(%rax,%rax,1)
mov    (%r12,%rbx,8),%rax
mov    (%rax,%rbp,4),%edi
call   10b0 <mpfr_zinit@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1320 <main+0xd0>
jmp    12e0 <main+0x90>
call   10b0 <mpfr_zinit@plt>
call   10b0 <mpfr_zinit@plt>
call   10b0 <mpfr_zinit@plt>
call   10b0 <mpfr_zinit@plt>
call   10b0 <mpfr_zinit@plt>
test   %r14d,%r14d
jle    1414 <main+0x1c4>
lea    -0x1(%r14),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %ebp,%ebp
mov    0x2c6d(%rip),%r13
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
divsd  0x8(%rsp),%xmm0
movsd  (%rsp),%xmm1
call   1160 <pow@plt>
movsd  0xc61(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xc5d(%rip),%xmm1
addsd  0xc5d(%rip),%xmm1
mov    0x0(%r13),%esi
movapd %xmm1,%xmm0
call   1090 <mpfr_set_d@plt>
call   1070 <CFUNC@plt>
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mov    0x0(%r13),%esi
call   1090 <mpfr_set_d@plt>
mov    (%r12,%rbx,8),%rax
mov    (%rax,%rbp,4),%edi
mov    0x0(%r13),%ecx
call   1080 <mpfr_pow@plt>
add    $0x1,%rbx
cmp    $0xc,%rbx
jne    13d0 <main+0x180>
mov    0x60(%r12),%rax
mov    (%rax,%rbp,4),%edi
call   1130 <TARGET@plt>
add    $0x1,%rbp
cmp    %r14,%rbp
jne    1380 <main+0x130>
mov    (%r15),%edi
mov    0x2bc2(%rip),%rbp
mov    0x0(%rbp),%esi
xorpd  %xmm0,%xmm0
call   1090 <mpfr_set_d@plt>
mov    0x4(%r15),%edi
mov    0x0(%rbp),%esi
xorpd  %xmm0,%xmm0
call   1090 <mpfr_set_d@plt>
mov    0x8(%r15),%edi
mov    0x0(%rbp),%esi
xorpd  %xmm0,%xmm0
call   1090 <mpfr_set_d@plt>
mov    0xc(%r15),%edi
mov    0x0(%rbp),%esi
xorpd  %xmm0,%xmm0
call   1090 <mpfr_set_d@plt>
mov    0x10(%r15),%edi
mov    0x0(%rbp),%esi
xorpd  %xmm0,%xmm0
call   1090 <mpfr_set_d@plt>
mov    0x14(%r15),%edi
mov    0x0(%rbp),%esi
xorpd  %xmm0,%xmm0
call   1090 <mpfr_set_d@plt>
mov    0x18(%r15),%edi
mov    0x0(%rbp),%esi
xorpd  %xmm0,%xmm0
call   1090 <mpfr_set_d@plt>
mov    0x1c(%r15),%edi
mov    0x0(%rbp),%esi
xorpd  %xmm0,%xmm0
call   1090 <mpfr_set_d@plt>
mov    0x20(%r15),%edi
mov    0x0(%rbp),%esi
xorpd  %xmm0,%xmm0
call   1090 <mpfr_set_d@plt>
mov    0x24(%r15),%edi
mov    0x0(%rbp),%esi
xorpd  %xmm0,%xmm0
call   1090 <mpfr_set_d@plt>
mov    0x28(%r15),%edi
mov    0x0(%rbp),%esi
xorpd  %xmm0,%xmm0
call   1090 <mpfr_set_d@plt>
mov    0x2c(%r15),%edi
mov    0x0(%rbp),%esi
xorpd  %xmm0,%xmm0
call   1090 <mpfr_set_d@plt>
mov    %r14d,%edi
mov    $0xc,%esi
mov    %r12,%rdx
mov    %r15,%rcx
call   1140 <regressMinRelError_fr@plt>
mov    $0xb,%ebx
lea    0xb27(%rip),%r12
nopl   0x0(%rax)
mov    $0x39,%esi
call   10a0 <mpfr_set_prec@plt>
mov    (%r15,%rbx,4),%esi
mov    0x0(%rbp),%edx
call   10f0 <mpfr_set@plt>
call   1110 <mpfrToStr@plt>
mov    %rax,%r13
mov    %r12,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   10c0 <printf@plt>
mov    %r13,%rdi
call   1030 <free@plt>
add    $0xffffffffffffffff,%rbx
jb     1500 <main+0x2b0>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    $0x1000,%esi
call   10a0 <mpfr_set_prec@plt>
test   %r14d,%r14d
js     1641 <main+0x3f1>
lea    (%r14,%r14,1),%eax
lea    (%rax,%rax,4),%r12d
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
mulsd  0xaaa(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
xor    %r14d,%r14d
test   %r12d,%r12d
cmovle %r14d,%r12d
or     $0x1,%r12d
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
nopw   0x0(%rax,%rax,1)
movsd  %xmm2,0x8(%rsp)
movsd  %xmm1,(%rsp)
movapd %xmm1,%xmm0
mulsd  0xa61(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
addsd  0xa5b(%rip),%xmm0
mov    0x0(%rbp),%esi
call   1090 <mpfr_set_d@plt>
call   1070 <CFUNC@plt>
mov    0x0(%rbp),%esi
xorpd  %xmm0,%xmm0
call   1090 <mpfr_set_d@plt>
mov    $0xc,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mov    0x0(%rbp),%esi
call   1090 <mpfr_set_d@plt>
mov    0x0(%rbp),%ecx
call   1080 <mpfr_pow@plt>
mov    (%r15,%rbx,4),%edx
mov    0x0(%rbp),%ecx
call   1060 <mpfr_mul@plt>
mov    0x0(%rbp),%ecx
call   10e0 <mpfr_add@plt>
add    $0xffffffffffffffff,%rbx
jb     15e0 <main+0x390>
call   1130 <TARGET@plt>
call   10d0 <countULP@plt>
maxsd  0x8(%rsp),%xmm0
movsd  (%rsp),%xmm1
addsd  0x9d2(%rip),%xmm1
add    $0x1,%r14d
movapd %xmm0,%xmm2
cmp    %r12d,%r14d
jne    1590 <main+0x340>
jmp    1645 <main+0x3f5>
xorpd  %xmm0,%xmm0
lea    0x9da(%rip),%rdi
mov    $0x1,%al
call   10c0 <printf@plt>
mov    0x297e(%rip),%rax
mov    (%rax),%edi
call   1120 <fflush@plt>

LLVM IR (-O0):
@GMP_RNDN = global i32 0
@.str = [6 x i8] c"%s, \0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [31 x i8] c"Phase 1 : Max error = %g ULP\0A\0A\00"
@stdout = global i32 0
@main.a = internal global [10000 x i32] zeroinitializer
@main.v = internal global [10000 x i32] zeroinitializer
@main.am = internal global [10000 x i32] zeroinitializer
@main.aa = internal global [10000 x i32] zeroinitializer
@.str.3 = [54 x i8] c"Max error = %g ULP, Sum error = %g (Max error at %g)\0A\00"
@main.tab = internal global [8 x i32] [i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 -1]
@.str.4 = [37 x i8] c"\0APhase 2 : max error = %g ULP at %g\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca double
%11 = alloca i32**
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca double
%19 = alloca double
%20 = alloca i8*
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca [12 x i32]
%25 = alloca [12 x i32]
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca i32
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%38 = call i32 @mpfr_set_default_prec(i32 4096)
store i32 13, i32* %9
%39 = load i32, i32* %4
%40 = icmp sge i32 %39, 2
br i1 %40, label %41, label %46
41: ; preds = %2
%42 = load i8**, i8*** %5
%43 = getelementptr inbounds i8*, i8** %42, i64 1
%44 = load i8*, i8** %43
%45 = call i32 @atoi(i8* %44)
br label %47
46: ; preds = %2
br label %47
47: ; preds = %46, %41
%48 = phi i32 [ %45, %41 ], [ 50, %46 ]
store i32 %48, i32* %8
%49 = load i32, i32* %4
%50 = icmp sge i32 %49, 3
br i1 %50, label %51, label %56
51: ; preds = %47
%52 = load i8**, i8*** %5
%53 = getelementptr inbounds i8*, i8** %52, i64 2
%54 = load i8*, i8** %53
%55 = call i32 @atof(i8* %54)
br label %57
56: ; preds = %47
br label %57
57: ; preds = %56, %51
%58 = phi i32 [ %55, %51 ], [ 1, %56 ]
%59 = sitofp i32 %58 to double
store double %59, double* %10
%60 = load i32, i32* %9
%61 = call i8* @calloc(i32 8, i32 %60)
%62 = bitcast i8* %61 to i32**
store i32** %62, i32*** %11
%63 = load i32, i32* %9
%64 = call i8* @calloc(i32 4, i32 %63)
%65 = bitcast i8* %64 to i32*
store i32* %65, i32** %12
store i32 0, i32* %6
br label %66
66: ; preds = %103, %57
%67 = load i32, i32* %6
%68 = load i32, i32* %9
%69 = icmp slt i32 %67, %68
br i1 %69, label %70, label %106
70: ; preds = %66
%71 = load i32, i32* %8
%72 = call i8* @calloc(i32 4, i32 %71)
%73 = bitcast i8* %72 to i32*
%74 = load i32**, i32*** %11
%75 = load i32, i32* %6
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds i32*, i32** %74, i64 %76
store i32* %73, i32** %77
store i32 0, i32* %7
br label %78
78: ; preds = %93, %70
%79 = load i32, i32* %7
%80 = load i32, i32* %8
%81 = icmp slt i32 %79, %80
br i1 %81, label %82, label %96
82: ; preds = %78
%83 = load i32**, i32*** %11
%84 = load i32, i32* %6
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds i32*, i32** %83, i64 %85
%87 = load i32*, i32** %86
%88 = load i32, i32* %7
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds i32, i32* %87, i64 %89
%91 = load i32, i32* %90
%92 = call i32 @mpfr_zinit(i32 %91)
br label %93
93: ; preds = %82
%94 = load i32, i32* %7
%95 = add nsw i32 %94, 1
store i32 %95, i32* %7
br label %78
96: ; preds = %78
%97 = load i32*, i32** %12
%98 = load i32, i32* %6
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds i32, i32* %97, i64 %99
%101 = load i32, i32* %100
%102 = call i32 @mpfr_zinit(i32 %101)
br label %103
103: ; preds = %96
%104 = load i32, i32* %6
%105 = add nsw i32 %104, 1
store i32 %105, i32* %6
br label %66
106: ; preds = %66
%107 = load i32, i32* %13
%108 = call i32 @mpfr_zinit(i32 %107)
%109 = load i32, i32* %14
%110 = call i32 @mpfr_zinit(i32 %109)
%111 = load i32, i32* %15
%112 = call i32 @mpfr_zinit(i32 %111)
%113 = load i32, i32* %16
%114 = call i32 @mpfr_zinit(i32 %113)
%115 = load i32, i32* %17
%116 = call i32 @mpfr_zinit(i32 %115)
store i32 0, i32* %6
br label %117
117: ; preds = %181, %106
%118 = load i32, i32* %6
%119 = load i32, i32* %8
%120 = icmp slt i32 %118, %119
br i1 %120, label %121, label %184
121: ; preds = %117
%122 = load i32, i32* %6
%123 = sitofp i32 %122 to double
%124 = load i32, i32* %8
%125 = sub nsw i32 %124, 1
%126 = sitofp i32 %125 to double
%127 = fdiv double %123, %126
%128 = load double, double* %10
%129 = call double @pow(double %127, double %128)
%130 = fsub double 1.000000e+00, %129
store double %130, double* %18
%131 = load double, double* %18
%132 = call double @llvm.fmuladd.f64(double 6.940000e-01, double %131, double -3.470000e-01)
store double %132, double* %19
%133 = load i32, i32* %13
%134 = load double, double* %19
%135 = load i32, i32* @GMP_RNDN
%136 = call i32 @mpfr_set_d(i32 %133, double %134, i32 %135)
%137 = load i32, i32* %16
%138 = load i32, i32* %13
%139 = call i32 @CFUNC(i32 %137, i32 %138)
store i32 0, i32* %7
br label %140
140: ; preds = %165, %121
%141 = load i32, i32* %7
%142 = load i32, i32* %9
%143 = sub nsw i32 %142, 1
%144 = icmp slt i32 %141, %143
br i1 %144, label %145, label %168
145: ; preds = %140
%146 = load i32, i32* %14
%147 = load i32, i32* %7
%148 = sitofp i32 %147 to double
%149 = call double @llvm.fmuladd.f64(double %148, double 1.000000e+00, double 0.000000e+00)
%150 = load i32, i32* @GMP_RNDN
%151 = call i32 @mpfr_set_d(i32 %146, double %149, i32 %150)
%152 = load i32**, i32*** %11
%153 = load i32, i32* %7
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds i32*, i32** %152, i64 %154
%156 = load i32*, i32** %155
%157 = load i32, i32* %6
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds i32, i32* %156, i64 %158
%160 = load i32, i32* %159
%161 = load i32, i32* %16
%162 = load i32, i32* %14
%163 = load i32, i32* @GMP_RNDN
%164 = call i32 @mpfr_pow(i32 %160, i32 %161, i32 %162, i32 %163)
br label %165
165: ; preds = %145
%166 = load i32, i32* %7
%167 = add nsw i32 %166, 1
store i32 %167, i32* %7
br label %140
168: ; preds = %140
%169 = load i32**, i32*** %11
%170 = load i32, i32* %9
%171 = sub nsw i32 %170, 1
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds i32*, i32** %169, i64 %172
%174 = load i32*, i32** %173
%175 = load i32, i32* %6
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds i32, i32* %174, i64 %176
%178 = load i32, i32* %177
%179 = load i32, i32* %13
%180 = call i32 @TARGET(i32 %178, i32 %179)
br label %181
181: ; preds = %168
%182 = load i32, i32* %6
%183 = add nsw i32 %182, 1
store i32 %183, i32* %6
br label %117
184: ; preds = %117
store i32 0, i32* %6
br label %185
185: ; preds = %198, %184
%186 = load i32, i32* %6
%187 = load i32, i32* %9
%188 = sub nsw i32 %187, 1
%189 = icmp slt i32 %186, %188
br i1 %189, label %190, label %201
190: ; preds = %185
%191 = load i32*, i32** %12
%192 = load i32, i32* %6
%193 = sext i32 %192 to i64
%194 = getelementptr inbounds i32, i32* %191, i64 %193
%195 = load i32, i32* %194
%196 = load i32, i32* @GMP_RNDN
%197 = call i32 @mpfr_set_d(i32 %195, double 0.000000e+00, i32 %196)
br label %198
198: ; preds = %190
%199 = load i32, i32* %6
%200 = add nsw i32 %199, 1
store i32 %200, i32* %6
br label %185
201: ; preds = %185
%202 = load i32, i32* %8
%203 = load i32, i32* %9
%204 = sub nsw i32 %203, 1
%205 = load i32**, i32*** %11
%206 = load i32*, i32** %12
%207 = call i32 @regressMinRelError_fr(i32 %202, i32 %204, i32** %205, i32* %206)
%208 = load i32, i32* %9
%209 = sub nsw i32 %208, 2
store i32 %209, i32* %6
br label %210
210: ; preds = %229, %201
%211 = load i32, i32* %6
%212 = icmp sge i32 %211, 0
br i1 %212, label %213, label %232
213: ; preds = %210
%214 = load i32, i32* %13
%215 = call i32 @mpfr_set_prec(i32 %214, i32 57)
%216 = load i32, i32* %13
%217 = load i32*, i32** %12
%218 = load i32, i32* %6
%219 = sext i32 %218 to i64
%220 = getelementptr inbounds i32, i32* %217, i64 %219
%221 = load i32, i32* %220
%222 = load i32, i32* @GMP_RNDN
%223 = call i32 @mpfr_set(i32 %216, i32 %221, i32 %222)
%224 = load i32, i32* %13
%225 = call i8* @mpfrToStr(i32 %224)
store i8* %225, i8** %20
%226 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %225)
%227 = load i8*, i8** %20
%228 = call i32 @free(i8* %227)
br label %229
229: ; preds = %213
%230 = load i32, i32* %6
%231 = add nsw i32 %230, -1
store i32 %231, i32* %6
br label %210
232: ; preds = %210
%233 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%234 = load i32, i32* %13
%235 = call i32 @mpfr_set_prec(i32 %234, i32 4096)
store double 0.000000e+00, double* %21
store i32 0, i32* %6
br label %236
236: ; preds = %307, %232
%237 = load i32, i32* %6
%238 = load i32, i32* %8
%239 = mul nsw i32 %238, 10
%240 = icmp sle i32 %237, %239
br i1 %240, label %241, label %310
241: ; preds = %236
%242 = load i32, i32* %6
%243 = sitofp i32 %242 to double
%244 = fmul double %243, 6.940000e-01
%245 = load i32, i32* %8
%246 = sitofp i32 %245 to double
%247 = fmul double %246, 1.000000e+01
%248 = fdiv double %244, %247
%249 = fadd double %248, -3.470000e-01
store double %249, double* %22
%250 = load i32, i32* %13
%251 = load double, double* %22
%252 = load i32, i32* @GMP_RNDN
%253 = call i32 @mpfr_set_d(i32 %250, double %251, i32 %252)
%254 = load i32, i32* %16
%255 = load i32, i32* %13
%256 = call i32 @CFUNC(i32 %254, i32 %255)
%257 = load i32, i32* %14
%258 = load i32, i32* @GMP_RNDN
%259 = call i32 @mpfr_set_d(i32 %257, double 0.000000e+00, i32 %258)
%260 = load i32, i32* %9
%261 = sub nsw i32 %260, 1
store i32 %261, i32* %7
br label %262
262: ; preds = %291, %241
%263 = load i32, i32* %7
%264 = icmp sge i32 %263, 0
br i1 %264, label %265, label %294
265: ; preds = %262
%266 = load i32, i32* %15
%267 = load i32, i32* %7
%268 = sitofp i32 %267 to double
%269 = call double @llvm.fmuladd.f64(double %268, double 1.000000e+00, double 0.000000e+00)
%270 = load i32, i32* @GMP_RNDN
%271 = call i32 @mpfr_set_d(i32 %266, double %269, i32 %270)
%272 = load i32, i32* %15
%273 = load i32, i32* %16
%274 = load i32, i32* %15
%275 = load i32, i32* @GMP_RNDN
%276 = call i32 @mpfr_pow(i32 %272, i32 %273, i32 %274, i32 %275)
%277 = load i32, i32* %15
%278 = load i32, i32* %15
%279 = load i32*, i32** %12
%280 = load i32, i32* %7
%281 = sext i32 %280 to i64
%282 = getelementptr inbounds i32, i32* %279, i64 %281
%283 = load i32, i32* %282
%284 = load i32, i32* @GMP_RNDN
%285 = call i32 @mpfr_mul(i32 %277, i32 %278, i32 %283, i32 %284)
%286 = load i32, i32* %14
%287 = load i32, i32* %14
%288 = load i32, i32* %15
%289 = load i32, i32* @GMP_RNDN
%290 = call i32 @mpfr_add(i32 %286, i32 %287, i32 %288, i32 %289)
br label %291
291: ; preds = %265
%292 = load i32, i32* %7
%293 = add nsw i32 %292, -1
store i32 %293, i32* %7
br label %262
294: ; preds = %262
%295 = load i32, i32* %15
%296 = load i32, i32* %13
%297 = call i32 @TARGET(i32 %295, i32 %296)
%298 = load i32, i32* %14
%299 = load i32, i32* %15
%300 = call double @countULP(i32 %298, i32 %299)
store double %300, double* %23
%301 = load double, double* %23
%302 = load double, double* %21
%303 = fcmp ogt double %301, %302
br i1 %303, label %304, label %306
304: ; preds = %294
%305 = load double, double* %23
store double %305, double* %21
br label %306
306: ; preds = %304, %294
br label %307
307: ; preds = %306
%308 = load i32, i32* %6
%309 = add nsw i32 %308, 1
store i32 %309, i32* %6
br label %236
310: ; preds = %236
%311 = load double, double* %21
%312 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), double %311)
%313 = load i32, i32* @stdout
%314 = call i32 @fflush(i32 %313)
store i32 0, i32* %6
br label %315
315: ; preds = %359, %310
%316 = load i32, i32* %6
%317 = icmp slt i32 %316, 12
br i1 %317, label %318, label %362
318: ; preds = %315
%319 = load i32, i32* %6
%320 = sext i32 %319 to i64
%321 = getelementptr inbounds [12 x i32], [12 x i32]* %24, i64 0, i64 %320
%322 = load i32, i32* %321
%323 = load i32, i32* %6
%324 = icmp sge i32 %323, 2
%325 = zext i1 %324 to i64
%326 = select i1 %324, i32 53, i32 212
%327 = call i32 @mpfr_init2(i32 %322, i32 %326)
%328 = load i32, i32* %6
%329 = sext i32 %328 to i64
%330 = getelementptr inbounds [12 x i32], [12 x i32]* %24, i64 0, i64 %329
%331 = load i32, i32* %330
%332 = load i32*, i32** %12
%333 = load i32, i32* %6
%334 = sext i32 %333 to i64
%335 = getelementptr inbounds i32, i32* %332, i64 %334
%336 = load i32, i32* %335
%337 = load i32, i32* @GMP_RNDN
%338 = call i32 @mpfr_set(i32 %331, i32 %336, i32 %337)
%339 = load i32, i32* %6
%340 = sext i32 %339 to i64
%341 = getelementptr inbounds [12 x i32], [12 x i32]* %25, i64 0, i64 %340
%342 = load i32, i32* %341
%343 = load i32, i32* %6
%344 = icmp sge i32 %343, 2
%345 = zext i1 %344 to i64
%346 = select i1 %344, i32 53, i32 212
%347 = call i32 @mpfr_init2(i32 %342, i32 %346)
%348 = load i32, i32* %6
%349 = sext i32 %348 to i64
%350 = getelementptr inbounds [12 x i32], [12 x i32]* %25, i64 0, i64 %349
%351 = load i32, i32* %350
%352 = load i32*, i32** %12
%353 = load i32, i32* %6
%354 = sext i32 %353 to i64
%355 = getelementptr inbounds i32, i32* %352, i64 %354
%356 = load i32, i32* %355
%357 = load i32, i32* @GMP_RNDN
%358 = call i32 @mpfr_set(i32 %351, i32 %356, i32 %357)
br label %359
359: ; preds = %318
%360 = load i32, i32* %6
%361 = add nsw i32 %360, 1
store i32 %361, i32* %6
br label %315
362: ; preds = %315
%363 = call i32 @time(i32* null)
%364 = call i32 @srandom(i32 %363)
%365 = call i32 @mpfr_set_default_prec(i32 212)
store i32 0, i32* %6
br label %366
366: ; preds = %435, %362
%367 = load i32, i32* %6
%368 = icmp slt i32 %367, 10000
br i1 %368, label %369, label %438
369: ; preds = %366
%370 = load i32, i32* %6
%371 = sext i32 %370 to i64
%372 = getelementptr inbounds [10000 x i32], [10000 x i32]* @main.a, i64 0, i64 %371
%373 = load i32, i32* %372
%374 = load i32, i32* %6
%375 = sext i32 %374 to i64
%376 = getelementptr inbounds [10000 x i32], [10000 x i32]* @main.v, i64 0, i64 %375
%377 = load i32, i32* %376
%378 = load i32, i32* %6
%379 = sext i32 %378 to i64
%380 = getelementptr inbounds [10000 x i32], [10000 x i32]* @main.am, i64 0, i64 %379
%381 = load i32, i32* %380
%382 = load i32, i32* %6
%383 = sext i32 %382 to i64
%384 = getelementptr inbounds [10000 x i32], [10000 x i32]* @main.aa, i64 0, i64 %383
%385 = load i32, i32* %384
%386 = call i32 @mpfr_inits(i32 %373, i32 %377, i32 %381, i32 %385, i32* null)
%387 = load i32, i32* %13
%388 = load i32, i32* %6
%389 = sitofp i32 %388 to double
%390 = fmul double 6.940000e-01, %389
%391 = fdiv double %390, 9.999000e+03
%392 = fadd double %391, -3.470000e-01
%393 = load i32, i32* @GMP_RNDN
%394 = call i32 @mpfr_set_d(i32 %387, double %392, i32 %393)
%395 = load i32, i32* %6
%396 = sext i32 %395 to i64
%397 = getelementptr inbounds [10000 x i32], [10000 x i32]* @main.v, i64 0, i64 %396
%398 = load i32, i32* %397
%399 = load i32, i32* %13
%400 = call i32 @TARGET(i32 %398, i32 %399)
%401 = load i32, i32* %6
%402 = sext i32 %401 to i64
%403 = getelementptr inbounds [10000 x i32], [10000 x i32]* @main.a, i64 0, i64 %402
%404 = load i32, i32* %403
%405 = load i32, i32* %13
%406 = call i32 @CFUNC(i32 %404, i32 %405)
%407 = load i32, i32* %14
%408 = load i32, i32* @GMP_RNDN
%409 = call i32 @mpfr_set_d(i32 %407, double 1.000000e+00, i32 %408)
%410 = load i32, i32* %6
%411 = sext i32 %410 to i64
%412 = getelementptr inbounds [10000 x i32], [10000 x i32]* @main.am, i64 0, i64 %411
%413 = load i32, i32* %412
%414 = load i32, i32* %6
%415 = sext i32 %414 to i64
%416 = getelementptr inbounds [10000 x i32], [10000 x i32]* @main.a, i64 0, i64 %415
%417 = load i32, i32* %416
%418 = load i32, i32* %14
%419 = load i32, i32* @GMP_RNDN
%420 = call i32 @mpfr_pow(i32 %413, i32 %417, i32 %418, i32 %419)
%421 = load i32, i32* %14
%422 = load i32, i32* @GMP_RNDN
%423 = call i32 @mpfr_set_d(i32 %421, double 0.000000e+00, i32 %422)
%424 = load i32, i32* %6
%425 = sext i32 %424 to i64
%426 = getelementptr inbounds [10000 x i32], [10000 x i32]* @main.aa, i64 0, i64 %425
%427 = load i32, i32* %426
%428 = load i32, i32* %6
%429 = sext i32 %428 to i64
%430 = getelementptr inbounds [10000 x i32], [10000 x i32]* @main.a, i64 0, i64 %429
%431 = load i32, i32* %430
%432 = load i32, i32* %14
%433 = load i32, i32* @GMP_RNDN
%434 = call i32 @mpfr_pow(i32 %427, i32 %431, i32 %432, i32 %433)
br label %435
435: ; preds = %369
%436 = load i32, i32* %6
%437 = add nsw i32 %436, 1
store i32 %437, i32* %6
br label %366
438: ; preds = %366
store double 1.000000e+100, double* %26
store double 1.000000e+100, double* %27
store i32 0, i32* %29
br label %439
439: ; preds = %654, %438
%440 = load i32, i32* %29
%441 = icmp slt i32 %440, 10000
br i1 %441, label %442, label %657
442: ; preds = %439
store double 0.000000e+00, double* %30
store double 0.000000e+00, double* %31
store double 0.000000e+00, double* %32
%443 = getelementptr inbounds [12 x i32], [12 x i32]* %25, i64 0, i64 0
%444 = load i32, i32* %443
%445 = load i32, i32* @GMP_RNDN
%446 = call i32 @mpfr_set_d(i32 %444, double 1.000000e+00, i32 %445)
%447 = getelementptr inbounds [12 x i32], [12 x i32]* %25, i64 0, i64 1
%448 = load i32, i32* %447
%449 = load i32, i32* @GMP_RNDN
%450 = call i32 @mpfr_set_d(i32 %448, double 1.000000e+00, i32 %449)
store i32 0, i32* %6
br label %451
451: ; preds = %527, %442
%452 = load i32, i32* %6
%453 = icmp slt i32 %452, 10000
br i1 %453, label %454, label %530
454: ; preds = %451
%455 = load i32, i32* %6
%456 = sext i32 %455 to i64
%457 = getelementptr inbounds [10000 x i32], [10000 x i32]* @main.v, i64 0, i64 %456
%458 = load i32, i32* %457
%459 = call i64 @mpfr_cmp_d(i32 %458, i32 0)
%460 = icmp eq i64 %459, 0
br i1 %460, label %461, label %462
461: ; preds = %454
br label %527
462: ; preds = %454
%463 = load i32, i32* %14
%464 = load i32, i32* @GMP_RNDN
%465 = call i32 @mpfr_set_d(i32 %463, double 0.000000e+00, i32 %464)
store i32 11, i32* %7
br label %466
466: ; preds = %497, %462
%467 = load i32, i32* %7
%468 = icmp sge i32 %467, 0
br i1 %468, label %469, label %500
469: ; preds = %466
%470 = load i32, i32* %15
%471 = load i32, i32* %7
%472 = sitofp i32 %471 to double
%473 = call double @llvm.fmuladd.f64(double %472, double 1.000000e+00, double 0.000000e+00)
%474 = load i32, i32* @GMP_RNDN
%475 = call i32 @mpfr_set_d(i32 %470, double %473, i32 %474)
%476 = load i32, i32* %15
%477 = load i32, i32* %6
%478 = sext i32 %477 to i64
%479 = getelementptr inbounds [10000 x i32], [10000 x i32]* @main.a, i64 0, i64 %478
%480 = load i32, i32* %479
%481 = load i32, i32* %15
%482 = load i32, i32* @GMP_RNDN
%483 = call i32 @mpfr_pow(i32 %476, i32 %480, i32 %481, i32 %482)
%484 = load i32, i32* %15
%485 = load i32, i32* %15
%486 = load i32, i32* %7
%487 = sext i32 %486 to i64
%488 = getelementptr inbounds [12 x i32], [12 x i32]* %25, i64 0, i64 %487
%489 = load i32, i32* %488
%490 = load i32, i32* @GMP_RNDN
%491 = call i32 @mpfr_mul(i32 %484, i32 %485, i32 %489, i32 %490)
%492 = load i32, i32* %14
%493 = load i32, i32* %14
%494 = load i32, i32* %15
%495 = load i32, i32* @GMP_RNDN
%496 = call i32 @mpfr_add(i32 %492, i32 %493, i32 %494, i32 %495)
br label %497
497: ; preds = %469
%498 = load i32, i32* %7
%499 = add nsw i32 %498, -1
store i32 %499, i32* %7
br label %466
500: ; preds = %466
%501 = load i32, i32* %14
%502 = load i32, i32* %6
%503 = sext i32 %502 to i64
%504 = getelementptr inbounds [10000 x i32], [10000 x i32]* @main.v, i64 0, i64 %503
%505 = load i32, i32* %504
%506 = call double @countULP(i32 %501, i32 %505)
store double %506, double* %33
%507 = load double, double* %33
%508 = call i32 @isfinite(double %507)
%509 = icmp ne i32 %508, 0
br i1 %509, label %511, label %510
510: ; preds = %500
br label %527
511: ; preds = %500
%512 = load double, double* %33
%513 = load double, double* %30
%514 = fcmp ogt double %512, %513
br i1 %514, label %515, label %523
515: ; preds = %511
%516 = load double, double* %33
store double %516, double* %30
%517 = load i32, i32* %6
%518 = sext i32 %517 to i64
%519 = getelementptr inbounds [10000 x i32], [10000 x i32]* @main.a, i64 0, i64 %518
%520 = load i32, i32* %519
%521 = load i32, i32* @GMP_RNDN
%522 = call double @mpfr_get_d(i32 %520, i32 %521)
store double %522, double* %32
br label %523
523: ; preds = %515, %511
%524 = load double, double* %33
%525 = load double, double* %31
%526 = fadd double %525, %524
store double %526, double* %31
br label %527
527: ; preds = %523, %510, %461
%528 = load i32, i32* %6
%529 = add nsw i32 %528, 1
store i32 %529, i32* %6
br label %451
530: ; preds = %451
%531 = load i32, i32* %14
%532 = call i32 @mpfr_set_prec(i32 %531, i32 4096)
%533 = load double, double* %30
%534 = load double, double* %26
%535 = fcmp olt double %533, %534
br i1 %535, label %544, label %536
536: ; preds = %530
%537 = load double, double* %30
%538 = load double, double* %26
%539 = fcmp oeq double %537, %538
br i1 %539, label %540, label %585
540: ; preds = %536
%541 = load double, double* %31
%542 = load double, double* %27
%543 = fcmp olt double %541, %542
br i1 %543, label %544, label %585
544: ; preds = %540, %530
store i32 0, i32* %6
br label %545
545: ; preds = %559, %544
%546 = load i32, i32* %6
%547 = icmp slt i32 %546, 12
br i1 %547, label %548, label %562
548: ; preds = %545
%549 = load i32, i32* %6
%550 = sext i32 %549 to i64
%551 = getelementptr inbounds [12 x i32], [12 x i32]* %24, i64 0, i64 %550
%552 = load i32, i32* %551
%553 = load i32, i32* %6
%554 = sext i32 %553 to i64
%555 = getelementptr inbounds [12 x i32], [12 x i32]* %25, i64 0, i64 %554
%556 = load i32, i32* %555
%557 = load i32, i32* @GMP_RNDN
%558 = call i32 @mpfr_set(i32 %552, i32 %556, i32 %557)
br label %559
559: ; preds = %548
%560 = load i32, i32* %6
%561 = add nsw i32 %560, 1
store i32 %561, i32* %6
br label %545
562: ; preds = %545
%563 = load double, double* %26
%564 = fcmp oeq double %563, 1.000000e+100
br i1 %564, label %568, label %565
565: ; preds = %562
%566 = load i32, i32* %29
%567 = icmp sgt i32 %566, 10
br i1 %567, label %568, label %573
568: ; preds = %565, %562
%569 = load double, double* %30
%570 = load double, double* %31
%571 = load double, double* %32
%572 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.3, i64 0, i64 0), double %569, double %570, double %571)
br label %573
573: ; preds = %568, %565
%574 = load double, double* %26
%575 = load double, double* %30
%576 = fsub double %574, %575
%577 = load double, double* %26
%578 = fdiv double %576, %577
%579 = fcmp ogt double %578, 1.000000e-04
br i1 %579, label %580, label %581
580: ; preds = %573
store i32 0, i32* %29
br label %581
581: ; preds = %580, %573
%582 = load double, double* %30
store double %582, double* %26
%583 = load double, double* %31
store double %583, double* %27
%584 = load double, double* %32
store double %584, double* %28
br label %585
585: ; preds = %581, %540, %536
store i32 0, i32* %6
br label %586
586: ; preds = %600, %585
%587 = load i32, i32* %6
%588 = icmp slt i32 %587, 12
br i1 %588, label %589, label %603
589: ; preds = %586
%590 = load i32, i32* %6
%591 = sext i32 %590 to i64
%592 = getelementptr inbounds [12 x i32], [12 x i32]* %25, i64 0, i64 %591
%593 = load i32, i32* %592
%594 = load i32, i32* %6
%595 = sext i32 %594 to i64
%596 = getelementptr inbounds [12 x i32], [12 x i32]* %24, i64 0, i64 %595
%597 = load i32, i32* %596
%598 = load i32, i32* @GMP_RNDN
%599 = call i32 @mpfr_set(i32 %593, i32 %597, i32 %598)
br label %600
600: ; preds = %589
%601 = load i32, i32* %6
%602 = add nsw i32 %601, 1
store i32 %602, i32* %6
br label %586
603: ; preds = %586
store i32 0, i32* %6
br label %604
604: ; preds = %650, %603
%605 = load i32, i32* %6
%606 = icmp slt i32 %605, 12
br i1 %606, label %607, label %653
607: ; preds = %604
%608 = call i32 (...) @random()
%609 = and i32 %608, 7
%610 = sext i32 %609 to i64
%611 = getelementptr inbounds [8 x i32], [8 x i32]* @main.tab, i64 0, i64 %610
%612 = load i32, i32* %611
store i32 %612, i32* %34
%613 = load i32, i32* %34
%614 = icmp sgt i32 %613, 0
br i1 %614, label %615, label %630
615: ; preds = %607
store i32 0, i32* %35
br label %616
616: ; preds = %626, %615
%617 = load i32, i32* %35
%618 = load i32, i32* %34
%619 = icmp slt i32 %617, %618
br i1 %619, label %620, label %629
620: ; preds = %616
%621 = load i32, i32* %6
%622 = sext i32 %621 to i64
%623 = getelementptr inbounds [12 x i32], [12 x i32]* %25, i64 0, i64 %622
%624 = load i32, i32* %623
%625 = call i32 @mpfr_nextabove(i32 %624)
br label %626
626: ; preds = %620
%627 = load i32, i32* %35
%628 = add nsw i32 %627, 1
store i32 %628, i32* %35
br label %616
629: ; preds = %616
br label %649
630: ; preds = %607
%631 = load i32, i32* %34
%632 = icmp slt i32 %631, 0
br i1 %632, label %633, label %648
633: ; preds = %630
store i32 0, i32* %36
br label %634
634: ; preds = %644, %633
%635 = load i32, i32* %36
%636 = load i32, i32* %34
%637 = icmp sgt i32 %635, %636
br i1 %637, label %638, label %647
638: ; preds = %634
%639 = load i32, i32* %6
%640 = sext i32 %639 to i64
%641 = getelementptr inbounds [12 x i32], [12 x i32]* %25, i64 0, i64 %640
%642 = load i32, i32* %641
%643 = call i32 @mpfr_nextbelow(i32 %642)
br label %644
644: ; preds = %638
%645 = load i32, i32* %36
%646 = add nsw i32 %645, -1
store i32 %646, i32* %36
br label %634
647: ; preds = %634
br label %648
648: ; preds = %647, %630
br label %649
649: ; preds = %648, %629
br label %650
650: ; preds = %649
%651 = load i32, i32* %6
%652 = add nsw i32 %651, 1
store i32 %652, i32* %6
br label %604
653: ; preds = %604
br label %654
654: ; preds = %653
%655 = load i32, i32* %29
%656 = add nsw i32 %655, 1
store i32 %656, i32* %29
br label %439
657: ; preds = %439
%658 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 11, i32* %6
br label %659
659: ; preds = %681, %657
%660 = load i32, i32* %6
%661 = icmp sge i32 %660, 0
br i1 %661, label %662, label %684
662: ; preds = %659
%663 = load i32, i32* %13
%664 = load i32, i32* %6
%665 = icmp sge i32 %664, 2
%666 = zext i1 %665 to i64
%667 = select i1 %665, i32 57, i32 212
%668 = call i32 @mpfr_set_prec(i32 %663, i32 %667)
%669 = load i32, i32* %13
%670 = load i32, i32* %6
%671 = sext i32 %670 to i64
%672 = getelementptr inbounds [12 x i32], [12 x i32]* %24, i64 0, i64 %671
%673 = load i32, i32* %672
%674 = load i32, i32* @GMP_RNDN
%675 = call i32 @mpfr_set(i32 %669, i32 %673, i32 %674)
%676 = load i32, i32* %13
%677 = call i8* @mpfrToStr(i32 %676)
store i8* %677, i8** %37
%678 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %677)
%679 = load i8*, i8** %37
%680 = call i32 @free(i8* %679)
br label %681
681: ; preds = %662
%682 = load i32, i32* %6
%683 = add nsw i32 %682, -1
store i32 %683, i32* %6
br label %659
684: ; preds = %659
%685 = load double, double* %26
%686 = load double, double* %28
%687 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), double %685, double %686)
%688 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@GMP_RNDN = global i32 0
@.str = [6 x i8] c"%s, \0A\00"
@.str.2 = [31 x i8] c"Phase 1 : Max error = %g ULP\0A\0A\00"
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @mpfr_set_default_prec(i32 4096)
%4 = icmp sgt i32 %0, 1
br i1 %4, label %5, label %15
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
%9 = icmp eq i32 %0, 2
br i1 %9, label %15, label %10
10: ; preds = %5
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = load i8*, i8** %11
%13 = tail call i32 @atof(i8* %12)
%14 = sitofp i32 %13 to double
br label %15
15: ; preds = %2, %5, %10
%16 = phi i32 [ %8, %10 ], [ %8, %5 ], [ 50, %2 ]
%17 = phi double [ %14, %10 ], [ 1.000000e+00, %5 ], [ 1.000000e+00, %2 ]
%18 = tail call dereferenceable_or_null(104) i8* @calloc(i32 8, i32 13)
%19 = bitcast i8* %18 to i32**
%20 = tail call dereferenceable_or_null(52) i8* @calloc(i32 4, i32 13)
%21 = bitcast i8* %20 to i32*
%22 = icmp sgt i32 %16, 0
%23 = zext i32 %16 to i64
%24 = icmp eq i32 %16, 1
br label %25
25: ; preds = %15, %40
%26 = phi i64 [ 0, %15 ], [ %44, %40 ]
%27 = tail call i8* @calloc(i32 4, i32 %16)
%28 = getelementptr inbounds i32*, i32** %19, i64 %26
%29 = bitcast i32** %28 to i8**
store i8* %27, i8** %29
br i1 %22, label %30, label %40
30: ; preds = %25
%31 = tail call i32 @mpfr_zinit(i32 0)
br i1 %24, label %40, label %32
32: ; preds = %30, %32
%33 = phi i64 [ %38, %32 ], [ 1, %30 ]
%34 = load i32*, i32** %28
%35 = getelementptr inbounds i32, i32* %34, i64 %33
%36 = load i32, i32* %35
%37 = tail call i32 @mpfr_zinit(i32 %36)
%38 = add nuw nsw i64 %33, 1
%39 = icmp eq i64 %38, %23
br i1 %39, label %40, label %32
40: ; preds = %32, %30, %25
%41 = getelementptr inbounds i32, i32* %21, i64 %26
%42 = load i32, i32* %41
%43 = tail call i32 @mpfr_zinit(i32 %42)
%44 = add nuw nsw i64 %26, 1
%45 = icmp eq i64 %44, 13
br i1 %45, label %46, label %25
46: ; preds = %40
%47 = tail call i32 @mpfr_zinit(i32 undef)
%48 = tail call i32 @mpfr_zinit(i32 undef)
%49 = tail call i32 @mpfr_zinit(i32 undef)
%50 = tail call i32 @mpfr_zinit(i32 undef)
%51 = tail call i32 @mpfr_zinit(i32 undef)
br i1 %22, label %52, label %57
52: ; preds = %46
%53 = add nsw i32 %16, -1
%54 = sitofp i32 %53 to double
%55 = getelementptr inbounds i32*, i32** %19, i64 12
%56 = zext i32 %16 to i64
br label %106
57: ; preds = %131, %46
%58 = load i32, i32* %21
%59 = load i32, i32* @GMP_RNDN
%60 = tail call i32 @mpfr_set_d(i32 %58, double 0.000000e+00, i32 %59)
%61 = getelementptr inbounds i32, i32* %21, i64 1
%62 = load i32, i32* %61
%63 = load i32, i32* @GMP_RNDN
%64 = tail call i32 @mpfr_set_d(i32 %62, double 0.000000e+00, i32 %63)
%65 = getelementptr inbounds i32, i32* %21, i64 2
%66 = load i32, i32* %65
%67 = load i32, i32* @GMP_RNDN
%68 = tail call i32 @mpfr_set_d(i32 %66, double 0.000000e+00, i32 %67)
%69 = getelementptr inbounds i32, i32* %21, i64 3
%70 = load i32, i32* %69
%71 = load i32, i32* @GMP_RNDN
%72 = tail call i32 @mpfr_set_d(i32 %70, double 0.000000e+00, i32 %71)
%73 = getelementptr inbounds i32, i32* %21, i64 4
%74 = load i32, i32* %73
%75 = load i32, i32* @GMP_RNDN
%76 = tail call i32 @mpfr_set_d(i32 %74, double 0.000000e+00, i32 %75)
%77 = getelementptr inbounds i32, i32* %21, i64 5
%78 = load i32, i32* %77
%79 = load i32, i32* @GMP_RNDN
%80 = tail call i32 @mpfr_set_d(i32 %78, double 0.000000e+00, i32 %79)
%81 = getelementptr inbounds i32, i32* %21, i64 6
%82 = load i32, i32* %81
%83 = load i32, i32* @GMP_RNDN
%84 = tail call i32 @mpfr_set_d(i32 %82, double 0.000000e+00, i32 %83)
%85 = getelementptr inbounds i32, i32* %21, i64 7
%86 = load i32, i32* %85
%87 = load i32, i32* @GMP_RNDN
%88 = tail call i32 @mpfr_set_d(i32 %86, double 0.000000e+00, i32 %87)
%89 = getelementptr inbounds i32, i32* %21, i64 8
%90 = load i32, i32* %89
%91 = load i32, i32* @GMP_RNDN
%92 = tail call i32 @mpfr_set_d(i32 %90, double 0.000000e+00, i32 %91)
%93 = getelementptr inbounds i32, i32* %21, i64 9
%94 = load i32, i32* %93
%95 = load i32, i32* @GMP_RNDN
%96 = tail call i32 @mpfr_set_d(i32 %94, double 0.000000e+00, i32 %95)
%97 = getelementptr inbounds i32, i32* %21, i64 10
%98 = load i32, i32* %97
%99 = load i32, i32* @GMP_RNDN
%100 = tail call i32 @mpfr_set_d(i32 %98, double 0.000000e+00, i32 %99)
%101 = getelementptr inbounds i32, i32* %21, i64 11
%102 = load i32, i32* %101
%103 = load i32, i32* @GMP_RNDN
%104 = tail call i32 @mpfr_set_d(i32 %102, double 0.000000e+00, i32 %103)
%105 = tail call i32 @regressMinRelError_fr(i32 %16, i32 12, i32** %19, i32* %21)
br label %138
106: ; preds = %52, %131
%107 = phi i64 [ 0, %52 ], [ %136, %131 ]
%108 = trunc i64 %107 to i32
%109 = sitofp i32 %108 to double
%110 = fdiv double %109, %54
%111 = tail call double @pow(double %110, double %17)
%112 = fsub double 1.000000e+00, %111
%113 = tail call double @llvm.fmuladd.f64(double %112, double 6.940000e-01, double -3.470000e-01)
%114 = load i32, i32* @GMP_RNDN
%115 = tail call i32 @mpfr_set_d(i32 undef, double %113, i32 %114)
%116 = tail call i32 @CFUNC(i32 undef, i32 undef)
br label %117
117: ; preds = %106, %117
%118 = phi i64 [ 0, %106 ], [ %129, %117 ]
%119 = trunc i64 %118 to i32
%120 = sitofp i32 %119 to double
%121 = load i32, i32* @GMP_RNDN
%122 = tail call i32 @mpfr_set_d(i32 undef, double %120, i32 %121)
%123 = getelementptr inbounds i32*, i32** %19, i64 %118
%124 = load i32*, i32** %123
%125 = getelementptr inbounds i32, i32* %124, i64 %107
%126 = load i32, i32* %125
%127 = load i32, i32* @GMP_RNDN
%128 = tail call i32 @mpfr_pow(i32 %126, i32 undef, i32 undef, i32 %127)
%129 = add nuw nsw i64 %118, 1
%130 = icmp eq i64 %129, 12
br i1 %130, label %131, label %117
131: ; preds = %117
%132 = load i32*, i32** %55
%133 = getelementptr inbounds i32, i32* %132, i64 %107
%134 = load i32, i32* %133
%135 = tail call i32 @TARGET(i32 %134, i32 undef)
%136 = add nuw nsw i64 %107, 1
%137 = icmp eq i64 %136, %56
br i1 %137, label %57, label %106
138: ; preds = %57, %138
%139 = phi i64 [ 11, %57 ], [ %148, %138 ]
%140 = tail call i32 @mpfr_set_prec(i32 undef, i32 57)
%141 = getelementptr inbounds i32, i32* %21, i64 %139
%142 = load i32, i32* %141
%143 = load i32, i32* @GMP_RNDN
%144 = tail call i32 @mpfr_set(i32 undef, i32 %142, i32 %143)
%145 = tail call i8* @mpfrToStr(i32 undef)
%146 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %145)
%147 = tail call i32 @free(i8* %145)
%148 = add nsw i64 %139, -1
%149 = icmp eq i64 %139, 0
br i1 %149, label %150, label %138
150: ; preds = %138
%151 = tail call i32 @putchar(i32 10)
%152 = tail call i32 @mpfr_set_prec(i32 undef, i32 4096)
%153 = icmp slt i32 %16, 0
br i1 %153, label %195, label %154
154: ; preds = %150
%155 = mul i32 %16, 10
%156 = sitofp i32 %16 to double
%157 = fmul double %156, 1.000000e+01
%158 = call i32 @llvm.smax.i32(i32 %155, i32 0)
%159 = or i32 %158, 1
br label %160
160: ; preds = %154, %188
%161 = phi i32 [ 0, %154 ], [ %193, %188 ]
%162 = phi double [ 0.000000e+00, %154 ], [ %192, %188 ]
%163 = sitofp i32 %161 to double
%164 = fmul double %163, 6.940000e-01
%165 = fdiv double %164, %157
%166 = fadd double %165, -3.470000e-01
%167 = load i32, i32* @GMP_RNDN
%168 = tail call i32 @mpfr_set_d(i32 undef, double %166, i32 %167)
%169 = tail call i32 @CFUNC(i32 undef, i32 undef)
%170 = load i32, i32* @GMP_RNDN
%171 = tail call i32 @mpfr_set_d(i32 undef, double 0.000000e+00, i32 %170)
br label %172
172: ; preds = %160, %172
%173 = phi i64 [ 12, %160 ], [ %186, %172 ]
%174 = trunc i64 %173 to i32
%175 = sitofp i32 %174 to double
%176 = load i32, i32* @GMP_RNDN
%177 = tail call i32 @mpfr_set_d(i32 undef, double %175, i32 %176)
%178 = load i32, i32* @GMP_RNDN
%179 = tail call i32 @mpfr_pow(i32 undef, i32 undef, i32 undef, i32 %178)
%180 = getelementptr inbounds i32, i32* %21, i64 %173
%181 = load i32, i32* %180
%182 = load i32, i32* @GMP_RNDN
%183 = tail call i32 @mpfr_mul(i32 undef, i32 undef, i32 %181, i32 %182)
%184 = load i32, i32* @GMP_RNDN
%185 = tail call i32 @mpfr_add(i32 undef, i32 undef, i32 undef, i32 %184)
%186 = add nsw i64 %173, -1
%187 = icmp eq i64 %173, 0
br i1 %187, label %188, label %172
188: ; preds = %172
%189 = tail call i32 @TARGET(i32 undef, i32 undef)
%190 = tail call double @countULP(i32 undef, i32 undef)
%191 = fcmp ogt double %190, %162
%192 = select i1 %191, double %190, double %162
%193 = add nuw nsw i32 %161, 1
%194 = icmp eq i32 %193, %159
br i1 %194, label %195, label %160
195: ; preds = %188, %150
%196 = phi double [ 0.000000e+00, %150 ], [ %192, %188 ]
%197 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), double %196)
%198 = load i32, i32* @stdout
%199 = tail call i32 @fflush(i32 %198)
unreachable
}