#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 */

/* Variables and functions */
scalar_t__ fabs(double);
int g(double, double, double, double);
int rootByBisection(double i, double j, double *x, double *y, double k1,
                    double k2, double maxx, double maxy, double tol) {
  double xh, yh;
  double xl, yl;
  int maxN = 1000;
  int k;
  double p;
  if (i == 0 && j == 0) {
    *x = *y = 0;
    return 0;
  } else if (i == 0) {
    *x = 0;
    k = 0;
    yl = -maxy;
    yh = maxy;
    while (k < maxN) {
      p = 0.5 * (yh + yl);
      if (g(j, p, k1, k2) == 0 || 0.5 * (yh - yl) < tol) {
        *y = p;
        return k;
      }
      k++;
      if (g(j, yl, k1, k2) * g(j, p, k1, k2) > 0)
        yl = p;
      else
        yh = p;
    }
    *y = maxy;
    return -1;
  } else if (j == 0) {
    *y = 0;
    k = 0;
    xl = -maxx;
    xh = maxx;
    while (k < maxN) {
      p = xl + 0.5 * (xh - xl);
      if (g(i, p, k1, k2) == 0 || 0.5 * (xh - xl) < tol) {
        *x = p;
        return k;
      }
      k++;
      if (g(i, xl, k1, k2) * g(i, p, k1, k2) > 0)
        xl = p;
      else
        xh = p;
    }
    *x = maxx;
    return -1;
  } else {
    double frac;
    if (fabs(i) > fabs(j)) {
      frac = (1 + (j / i) * (j / i));
      k = 0;
      xl = -maxx;
      xh = maxx;
      while (k < maxN) {
        p = 0.5 * (xh + xl);
        if (g(i, p, frac * k1, frac * frac * k2) == 0 ||
            0.5 * (xh - xl) < tol) {
          *x = p;
          *y = (j / i) * p;
          return k;
        }
        k++;
        if (g(i, xl, frac * k1, frac * frac * k2) *
                g(i, p, frac * k1, frac * frac * k2) >
            0)
          xl = p;
        else
          xh = p;
      }
    } else {
      frac = (1 + (i / j) * (i / j));
      k = 0;
      yl = -maxy;
      yh = maxy;
      while (k < maxN) {
        p = yl + 0.5 * (yh - yl);
        if (g(j, p, frac * k1, frac * frac * k2) == 0 ||
            0.5 * (yh - yl) < tol) {
          *y = p;
          *x = (i / j) * p;
          return k;
        }
        k++;
        if (g(j, yl, frac * k1, frac * frac * k2) *
                g(j, p, frac * k1, frac * frac * k2) >
            0)
          yl = p;
        else
          yh = p;
      }
    }
    *x = maxx;
    *y = maxy;
    return -1;
  }
}


x86 assembly (clang, -O0):
<rootByBisection>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
movsd  %xmm3,-0x38(%rbp)
movsd  %xmm4,-0x40(%rbp)
movsd  %xmm5,-0x48(%rbp)
movsd  %xmm6,-0x50(%rbp)
movl   $0x3e8,-0x74(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11af <rootByBisection+0x8f>
jp     11af <rootByBisection+0x8f>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11af <rootByBisection+0x8f>
jp     11af <rootByBisection+0x8f>
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    1854 <rootByBisection+0x734>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1316 <rootByBisection+0x1f6>
jp     1316 <rootByBisection+0x1f6>
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    12fd <rootByBisection+0x1dd>
movsd  -0x60(%rbp),%xmm1
addsd  -0x70(%rbp),%xmm1
movsd  0xde6(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
call   1040 <g@plt>
cmp    $0x0,%eax
je     1272 <rootByBisection+0x152>
movsd  -0x60(%rbp),%xmm0
subsd  -0x70(%rbp),%xmm0
movsd  0xda9(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    128a <rootByBisection+0x16a>
movsd  -0x80(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x78(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1854 <rootByBisection+0x734>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
call   1040 <g@plt>
mov    %eax,-0x8c(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
call   1040 <g@plt>
mov    %eax,%ecx
mov    -0x8c(%rbp),%eax
imul   %ecx,%eax
cmp    $0x0,%eax
jle    12ee <rootByBisection+0x1ce>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    12f8 <rootByBisection+0x1d8>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    1204 <rootByBisection+0xe4>
movsd  -0x48(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    1854 <rootByBisection+0x734>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1486 <rootByBisection+0x366>
jp     1486 <rootByBisection+0x366>
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x78(%rbp)
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    146d <rootByBisection+0x34d>
movsd  -0x68(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  0xc7a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
call   1040 <g@plt>
cmp    $0x0,%eax
je     13e2 <rootByBisection+0x2c2>
movsd  -0x58(%rbp),%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  0xc39(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    13fa <rootByBisection+0x2da>
movsd  -0x80(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x78(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1854 <rootByBisection+0x734>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
call   1040 <g@plt>
mov    %eax,-0x90(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
call   1040 <g@plt>
mov    %eax,%ecx
mov    -0x90(%rbp),%eax
imul   %ecx,%eax
cmp    $0x0,%eax
jle    145e <rootByBisection+0x33e>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    1468 <rootByBisection+0x348>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    136b <rootByBisection+0x24b>
movsd  -0x40(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    1854 <rootByBisection+0x734>
movsd  -0x10(%rbp),%xmm0
call   1030 <fabs@plt>
mov    %rax,-0x98(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <fabs@plt>
mov    %rax,%rcx
mov    -0x98(%rbp),%rax
cmp    %rcx,%rax
jle    166f <rootByBisection+0x54f>
movsd  -0x18(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
divsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb2c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x0,-0x78(%rbp)
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    166a <rootByBisection+0x54a>
movsd  -0x58(%rbp),%xmm1
addsd  -0x68(%rbp),%xmm1
movsd  0xad8(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm2
ff
mulsd  -0x30(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm3
ff
mulsd  -0x88(%rbp),%xmm3
ff
mulsd  -0x38(%rbp),%xmm3
call   1040 <g@plt>
cmp    $0x0,%eax
je     1598 <rootByBisection+0x478>
movsd  -0x58(%rbp),%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  0xa83(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    15c7 <rootByBisection+0x4a7>
movsd  -0x80(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x78(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1854 <rootByBisection+0x734>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm2
ff
mulsd  -0x30(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm3
ff
mulsd  -0x88(%rbp),%xmm3
ff
mulsd  -0x38(%rbp),%xmm3
call   1040 <g@plt>
mov    %eax,-0x9c(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm2
ff
mulsd  -0x30(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm3
ff
mulsd  -0x88(%rbp),%xmm3
ff
mulsd  -0x38(%rbp),%xmm3
call   1040 <g@plt>
mov    %eax,%ecx
mov    -0x9c(%rbp),%eax
imul   %ecx,%eax
cmp    $0x0,%eax
jle    165b <rootByBisection+0x53b>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    1665 <rootByBisection+0x545>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1512 <rootByBisection+0x3f2>
jmp    1833 <rootByBisection+0x713>
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
divsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x971(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    182e <rootByBisection+0x70e>
movsd  -0x70(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
subsd  -0x70(%rbp),%xmm0
movsd  0x918(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm2
ff
mulsd  -0x30(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm3
ff
mulsd  -0x88(%rbp),%xmm3
ff
mulsd  -0x38(%rbp),%xmm3
call   1040 <g@plt>
cmp    $0x0,%eax
je     175c <rootByBisection+0x63c>
movsd  -0x60(%rbp),%xmm0
subsd  -0x70(%rbp),%xmm0
movsd  0x8bf(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    178b <rootByBisection+0x66b>
movsd  -0x80(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x78(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1854 <rootByBisection+0x734>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm2
ff
mulsd  -0x30(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm3
ff
mulsd  -0x88(%rbp),%xmm3
ff
mulsd  -0x38(%rbp),%xmm3
call   1040 <g@plt>
mov    %eax,-0xa0(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm2
ff
mulsd  -0x30(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm3
ff
mulsd  -0x88(%rbp),%xmm3
ff
mulsd  -0x38(%rbp),%xmm3
call   1040 <g@plt>
mov    %eax,%ecx
mov    -0xa0(%rbp),%eax
imul   %ecx,%eax
cmp    $0x0,%eax
jle    181f <rootByBisection+0x6ff>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    1829 <rootByBisection+0x709>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    16cd <rootByBisection+0x5ad>
jmp    1833 <rootByBisection+0x713>
movsd  -0x40(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rootByBisection>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x78,%rsp
movsd  %xmm6,0x48(%rsp)
movaps %xmm5,0x50(%rsp)
movaps %xmm4,0x60(%rsp)
movsd  %xmm3,0x8(%rsp)
movsd  %xmm2,0x10(%rsp)
mov    %rsi,%r14
mov    %rdi,%r15
movapd %xmm1,%xmm4
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jne    1179 <rootByBisection+0x59>
jp     1179 <rootByBisection+0x59>
ucomisd %xmm2,%xmm4
jne    1179 <rootByBisection+0x59>
jp     1179 <rootByBisection+0x59>
movq   $0x0,(%r14)
movq   $0x0,(%r15)
xor    %ebx,%ebx
jmp    1682 <rootByBisection+0x562>
ucomisd %xmm2,%xmm0
movsd  %xmm4,(%rsp)
jne    12a7 <rootByBisection+0x187>
jp     12a7 <rootByBisection+0x187>
movq   $0x0,(%r15)
movapd 0xe73(%rip),%xmm2
movapd 0x50(%rsp),%xmm0
xorpd  %xmm0,%xmm2
xor    %ebx,%ebx
movsd  0xe57(%rip),%xmm3
jmp    11e5 <rootByBisection+0xc5>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  0x18(%rsp),%xmm0
movapd 0x20(%rsp),%xmm2
cmp    $0x3e8,%ebx
movsd  (%rsp),%xmm4
movsd  0xe29(%rip),%xmm3
je     1672 <rootByBisection+0x552>
movsd  %xmm0,0x30(%rsp)
movapd %xmm2,0x20(%rsp)
movapd %xmm0,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm3,%xmm1
movapd %xmm4,%xmm0
movsd  %xmm1,0x18(%rsp)
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
call   1040 <g@plt>
movsd  0x30(%rsp),%xmm0
movapd 0x20(%rsp),%xmm2
test   %eax,%eax
je     1297 <rootByBisection+0x177>
subsd  %xmm2,%xmm0
mulsd  0xdd4(%rip),%xmm0
movsd  0x48(%rsp),%xmm1
ucomisd %xmm0,%xmm1
ja     1297 <rootByBisection+0x177>
add    $0x1,%ebx
movsd  (%rsp),%xmm0
movapd %xmm2,%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
call   1040 <g@plt>
mov    %eax,%ebp
movsd  (%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
call   1040 <g@plt>
imul   %ebp,%eax
test   %eax,%eax
jle    11c0 <rootByBisection+0xa0>
movsd  0x18(%rsp),%xmm2
movsd  0x30(%rsp),%xmm0
jmp    11cc <rootByBisection+0xac>
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,(%r14)
jmp    1682 <rootByBisection+0x562>
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm4
movsd  %xmm0,0x18(%rsp)
jne    13b6 <rootByBisection+0x296>
jp     13b6 <rootByBisection+0x296>
movq   $0x0,(%r14)
movapd 0xd40(%rip),%xmm2
movapd 0x60(%rsp),%xmm1
xorpd  %xmm1,%xmm2
movapd %xmm2,0x20(%rsp)
xor    %ebx,%ebx
jmp    1307 <rootByBisection+0x1e7>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rsp),%xmm1
cmp    $0x3e8,%ebx
movsd  0x18(%rsp),%xmm0
je     1524 <rootByBisection+0x404>
movsd  %xmm1,0x50(%rsp)
movapd 0x20(%rsp),%xmm2
subsd  %xmm2,%xmm1
mulsd  0xce9(%rip),%xmm1
movsd  %xmm1,0x30(%rsp)
addsd  %xmm2,%xmm1
movsd  %xmm1,(%rsp)
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
call   1040 <g@plt>
test   %eax,%eax
je     1515 <rootByBisection+0x3f5>
movsd  0x48(%rsp),%xmm0
ucomisd 0x30(%rsp),%xmm0
ja     1515 <rootByBisection+0x3f5>
add    $0x1,%ebx
movsd  0x18(%rsp),%xmm0
movaps 0x20(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
call   1040 <g@plt>
mov    %eax,%ebp
movsd  0x18(%rsp),%xmm0
movsd  (%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
call   1040 <g@plt>
imul   %ebp,%eax
test   %eax,%eax
jle    12f0 <rootByBisection+0x1d0>
movsd  (%rsp),%xmm0
movaps %xmm0,0x20(%rsp)
movsd  0x50(%rsp),%xmm1
jmp    12f5 <rootByBisection+0x1d5>
call   1030 <fabs@plt>
mov    %rax,%rbx
movsd  (%rsp),%xmm0
call   1030 <fabs@plt>
cmp    %rax,%rbx
jle    1534 <rootByBisection+0x414>
movsd  (%rsp),%xmm4
divsd  0x18(%rsp),%xmm4
movapd %xmm4,%xmm2
mulsd  %xmm4,%xmm2
addsd  0xc14(%rip),%xmm2
movapd 0xc1c(%rip),%xmm3
movapd 0x60(%rsp),%xmm1
xorpd  %xmm1,%xmm3
movsd  0x10(%rsp),%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x10(%rsp)
mulsd  %xmm2,%xmm2
mulsd  0x8(%rsp),%xmm2
movsd  %xmm2,0x8(%rsp)
xor    %ebx,%ebx
movsd  0xbe0(%rip),%xmm2
movapd %xmm4,%xmm0
movsd  %xmm4,(%rsp)
jmp    1453 <rootByBisection+0x333>
movsd  0x20(%rsp),%xmm1
movapd 0x30(%rsp),%xmm3
movsd  0xbc1(%rip),%xmm2
cmp    $0x3e8,%ebx
je     1667 <rootByBisection+0x547>
movsd  %xmm1,0x40(%rsp)
movapd %xmm3,0x30(%rsp)
addsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm1
movsd  0x18(%rsp),%xmm0
movsd  %xmm1,0x20(%rsp)
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
call   1040 <g@plt>
movsd  0x40(%rsp),%xmm0
movapd 0x30(%rsp),%xmm2
test   %eax,%eax
je     168f <rootByBisection+0x56f>
subsd  %xmm2,%xmm0
mulsd  0xb64(%rip),%xmm0
movsd  0x48(%rsp),%xmm1
ucomisd %xmm0,%xmm1
ja     168f <rootByBisection+0x56f>
add    $0x1,%ebx
movsd  0x18(%rsp),%xmm0
movapd %xmm2,%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
call   1040 <g@plt>
mov    %eax,%ebp
movsd  0x18(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
call   1040 <g@plt>
imul   %ebp,%eax
test   %eax,%eax
jle    1433 <rootByBisection+0x313>
movsd  0x20(%rsp),%xmm3
movsd  0xafe(%rip),%xmm2
movsd  0x40(%rsp),%xmm1
jmp    1447 <rootByBisection+0x327>
movsd  (%rsp),%xmm0
movsd  %xmm0,(%r15)
jmp    1682 <rootByBisection+0x562>
movapd 0x60(%rsp),%xmm0
movsd  %xmm0,(%r15)
jmp    167d <rootByBisection+0x55d>
movsd  (%rsp),%xmm3
movsd  0x18(%rsp),%xmm2
divsd  %xmm3,%xmm2
movsd  %xmm2,0x18(%rsp)
mulsd  %xmm2,%xmm2
addsd  0xaab(%rip),%xmm2
movapd 0xab3(%rip),%xmm0
movapd 0x50(%rsp),%xmm1
xorpd  %xmm1,%xmm0
movapd %xmm0,0x30(%rsp)
movsd  0x10(%rsp),%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x10(%rsp)
mulsd  %xmm2,%xmm2
mulsd  0x8(%rsp),%xmm2
movsd  %xmm2,0x8(%rsp)
xor    %ebx,%ebx
movapd %xmm3,%xmm0
jmp    15b7 <rootByBisection+0x497>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  0x20(%rsp),%xmm1
cmp    $0x3e8,%ebx
movsd  (%rsp),%xmm0
je     1667 <rootByBisection+0x547>
movsd  %xmm1,0x70(%rsp)
movapd 0x30(%rsp),%xmm2
subsd  %xmm2,%xmm1
mulsd  0xa39(%rip),%xmm1
movsd  %xmm1,0x40(%rsp)
addsd  %xmm2,%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
call   1040 <g@plt>
test   %eax,%eax
je     16aa <rootByBisection+0x58a>
movsd  0x48(%rsp),%xmm0
ucomisd 0x40(%rsp),%xmm0
ja     16aa <rootByBisection+0x58a>
add    $0x1,%ebx
movsd  (%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
call   1040 <g@plt>
mov    %eax,%ebp
movsd  (%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
call   1040 <g@plt>
imul   %ebp,%eax
test   %eax,%eax
jle    15a0 <rootByBisection+0x480>
movsd  0x20(%rsp),%xmm0
movaps %xmm0,0x30(%rsp)
movsd  0x70(%rsp),%xmm1
jmp    15a6 <rootByBisection+0x486>
movapd 0x60(%rsp),%xmm0
movsd  %xmm0,(%r15)
movapd 0x50(%rsp),%xmm0
movsd  %xmm0,(%r14)
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
movsd  0x20(%rsp),%xmm1
movsd  %xmm1,(%r15)
movsd  (%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%r14)
jmp    1682 <rootByBisection+0x562>
movsd  0x20(%rsp),%xmm1
movsd  %xmm1,(%r14)
movsd  0x18(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%r15)
jmp    1682 <rootByBisection+0x562>

LLVM IR (-O0):
define i32 @rootByBisection(double %0, double %1, double* %2, double* %3, double %4, double %5, double %6, double %7, double %8) {
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca double*
%14 = alloca double*
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca i32
%25 = alloca i32
%26 = alloca double
%27 = alloca double
store double %0, double* %11
store double %1, double* %12
store double* %2, double** %13
store double* %3, double** %14
store double %4, double* %15
store double %5, double* %16
store double %6, double* %17
store double %7, double* %18
store double %8, double* %19
store i32 1000, i32* %24
%28 = load double, double* %11
%29 = fcmp oeq double %28, 0.000000e+00
br i1 %29, label %30, label %36
30: ; preds = %9
%31 = load double, double* %12
%32 = fcmp oeq double %31, 0.000000e+00
br i1 %32, label %33, label %36
33: ; preds = %30
%34 = load double*, double** %14
store double 0.000000e+00, double* %34
%35 = load double*, double** %13
store double 0.000000e+00, double* %35
store i32 0, i32* %10
br label %327
36: ; preds = %30, %9
%37 = load double, double* %11
%38 = fcmp oeq double %37, 0.000000e+00
br i1 %38, label %39, label %93
39: ; preds = %36
%40 = load double*, double** %13
store double 0.000000e+00, double* %40
store i32 0, i32* %25
%41 = load double, double* %18
%42 = fneg double %41
store double %42, double* %23
%43 = load double, double* %18
store double %43, double* %21
br label %44
44: ; preds = %89, %39
%45 = load i32, i32* %25
%46 = load i32, i32* %24
%47 = icmp slt i32 %45, %46
br i1 %47, label %48, label %90
48: ; preds = %44
%49 = load double, double* %21
%50 = load double, double* %23
%51 = fadd double %49, %50
%52 = fmul double 5.000000e-01, %51
store double %52, double* %26
%53 = load double, double* %12
%54 = load double, double* %26
%55 = load double, double* %15
%56 = load double, double* %16
%57 = call i32 @g(double %53, double %54, double %55, double %56)
%58 = icmp eq i32 %57, 0
br i1 %58, label %66, label %59
59: ; preds = %48
%60 = load double, double* %21
%61 = load double, double* %23
%62 = fsub double %60, %61
%63 = fmul double 5.000000e-01, %62
%64 = load double, double* %19
%65 = fcmp olt double %63, %64
br i1 %65, label %66, label %70
66: ; preds = %59, %48
%67 = load double, double* %26
%68 = load double*, double** %14
store double %67, double* %68
%69 = load i32, i32* %25
store i32 %69, i32* %10
br label %327
70: ; preds = %59
%71 = load i32, i32* %25
%72 = add nsw i32 %71, 1
store i32 %72, i32* %25
%73 = load double, double* %12
%74 = load double, double* %23
%75 = load double, double* %15
%76 = load double, double* %16
%77 = call i32 @g(double %73, double %74, double %75, double %76)
%78 = load double, double* %12
%79 = load double, double* %26
%80 = load double, double* %15
%81 = load double, double* %16
%82 = call i32 @g(double %78, double %79, double %80, double %81)
%83 = mul nsw i32 %77, %82
%84 = icmp sgt i32 %83, 0
br i1 %84, label %85, label %87
85: ; preds = %70
%86 = load double, double* %26
store double %86, double* %23
br label %89
87: ; preds = %70
%88 = load double, double* %26
store double %88, double* %21
br label %89
89: ; preds = %87, %85
br label %44
90: ; preds = %44
%91 = load double, double* %18
%92 = load double*, double** %14
store double %91, double* %92
store i32 -1, i32* %10
br label %327
93: ; preds = %36
%94 = load double, double* %12
%95 = fcmp oeq double %94, 0.000000e+00
br i1 %95, label %96, label %151
96: ; preds = %93
%97 = load double*, double** %14
store double 0.000000e+00, double* %97
store i32 0, i32* %25
%98 = load double, double* %17
%99 = fneg double %98
store double %99, double* %22
%100 = load double, double* %17
store double %100, double* %20
br label %101
101: ; preds = %147, %96
%102 = load i32, i32* %25
%103 = load i32, i32* %24
%104 = icmp slt i32 %102, %103
br i1 %104, label %105, label %148
105: ; preds = %101
%106 = load double, double* %22
%107 = load double, double* %20
%108 = load double, double* %22
%109 = fsub double %107, %108
%110 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %109, double %106)
store double %110, double* %26
%111 = load double, double* %11
%112 = load double, double* %26
%113 = load double, double* %15
%114 = load double, double* %16
%115 = call i32 @g(double %111, double %112, double %113, double %114)
%116 = icmp eq i32 %115, 0
br i1 %116, label %124, label %117
117: ; preds = %105
%118 = load double, double* %20
%119 = load double, double* %22
%120 = fsub double %118, %119
%121 = fmul double 5.000000e-01, %120
%122 = load double, double* %19
%123 = fcmp olt double %121, %122
br i1 %123, label %124, label %128
124: ; preds = %117, %105
%125 = load double, double* %26
%126 = load double*, double** %13
store double %125, double* %126
%127 = load i32, i32* %25
store i32 %127, i32* %10
br label %327
128: ; preds = %117
%129 = load i32, i32* %25
%130 = add nsw i32 %129, 1
store i32 %130, i32* %25
%131 = load double, double* %11
%132 = load double, double* %22
%133 = load double, double* %15
%134 = load double, double* %16
%135 = call i32 @g(double %131, double %132, double %133, double %134)
%136 = load double, double* %11
%137 = load double, double* %26
%138 = load double, double* %15
%139 = load double, double* %16
%140 = call i32 @g(double %136, double %137, double %138, double %139)
%141 = mul nsw i32 %135, %140
%142 = icmp sgt i32 %141, 0
br i1 %142, label %143, label %145
143: ; preds = %128
%144 = load double, double* %26
store double %144, double* %22
br label %147
145: ; preds = %128
%146 = load double, double* %26
store double %146, double* %20
br label %147
147: ; preds = %145, %143
br label %101
148: ; preds = %101
%149 = load double, double* %17
%150 = load double*, double** %13
store double %149, double* %150
store i32 -1, i32* %10
br label %327
151: ; preds = %93
%152 = load double, double* %11
%153 = call i64 @fabs(double %152)
%154 = load double, double* %12
%155 = call i64 @fabs(double %154)
%156 = icmp sgt i64 %153, %155
br i1 %156, label %157, label %239
157: ; preds = %151
%158 = load double, double* %12
%159 = load double, double* %11
%160 = fdiv double %158, %159
%161 = load double, double* %12
%162 = load double, double* %11
%163 = fdiv double %161, %162
%164 = call double @llvm.fmuladd.f64(double %160, double %163, double 1.000000e+00)
store double %164, double* %27
store i32 0, i32* %25
%165 = load double, double* %17
%166 = fneg double %165
store double %166, double* %22
%167 = load double, double* %17
store double %167, double* %20
br label %168
168: ; preds = %237, %157
%169 = load i32, i32* %25
%170 = load i32, i32* %24
%171 = icmp slt i32 %169, %170
br i1 %171, label %172, label %238
172: ; preds = %168
%173 = load double, double* %20
%174 = load double, double* %22
%175 = fadd double %173, %174
%176 = fmul double 5.000000e-01, %175
store double %176, double* %26
%177 = load double, double* %11
%178 = load double, double* %26
%179 = load double, double* %27
%180 = load double, double* %15
%181 = fmul double %179, %180
%182 = load double, double* %27
%183 = load double, double* %27
%184 = fmul double %182, %183
%185 = load double, double* %16
%186 = fmul double %184, %185
%187 = call i32 @g(double %177, double %178, double %181, double %186)
%188 = icmp eq i32 %187, 0
br i1 %188, label %196, label %189
189: ; preds = %172
%190 = load double, double* %20
%191 = load double, double* %22
%192 = fsub double %190, %191
%193 = fmul double 5.000000e-01, %192
%194 = load double, double* %19
%195 = fcmp olt double %193, %194
br i1 %195, label %196, label %206
196: ; preds = %189, %172
%197 = load double, double* %26
%198 = load double*, double** %13
store double %197, double* %198
%199 = load double, double* %12
%200 = load double, double* %11
%201 = fdiv double %199, %200
%202 = load double, double* %26
%203 = fmul double %201, %202
%204 = load double*, double** %14
store double %203, double* %204
%205 = load i32, i32* %25
store i32 %205, i32* %10
br label %327
206: ; preds = %189
%207 = load i32, i32* %25
%208 = add nsw i32 %207, 1
store i32 %208, i32* %25
%209 = load double, double* %11
%210 = load double, double* %22
%211 = load double, double* %27
%212 = load double, double* %15
%213 = fmul double %211, %212
%214 = load double, double* %27
%215 = load double, double* %27
%216 = fmul double %214, %215
%217 = load double, double* %16
%218 = fmul double %216, %217
%219 = call i32 @g(double %209, double %210, double %213, double %218)
%220 = load double, double* %11
%221 = load double, double* %26
%222 = load double, double* %27
%223 = load double, double* %15
%224 = fmul double %222, %223
%225 = load double, double* %27
%226 = load double, double* %27
%227 = fmul double %225, %226
%228 = load double, double* %16
%229 = fmul double %227, %228
%230 = call i32 @g(double %220, double %221, double %224, double %229)
%231 = mul nsw i32 %219, %230
%232 = icmp sgt i32 %231, 0
br i1 %232, label %233, label %235
233: ; preds = %206
%234 = load double, double* %26
store double %234, double* %22
br label %237
235: ; preds = %206
%236 = load double, double* %26
store double %236, double* %20
br label %237
237: ; preds = %235, %233
br label %168
238: ; preds = %168
br label %322
239: ; preds = %151
%240 = load double, double* %11
%241 = load double, double* %12
%242 = fdiv double %240, %241
%243 = load double, double* %11
%244 = load double, double* %12
%245 = fdiv double %243, %244
%246 = call double @llvm.fmuladd.f64(double %242, double %245, double 1.000000e+00)
store double %246, double* %27
store i32 0, i32* %25
%247 = load double, double* %18
%248 = fneg double %247
store double %248, double* %23
%249 = load double, double* %18
store double %249, double* %21
br label %250
250: ; preds = %320, %239
%251 = load i32, i32* %25
%252 = load i32, i32* %24
%253 = icmp slt i32 %251, %252
br i1 %253, label %254, label %321
254: ; preds = %250
%255 = load double, double* %23
%256 = load double, double* %21
%257 = load double, double* %23
%258 = fsub double %256, %257
%259 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %258, double %255)
store double %259, double* %26
%260 = load double, double* %12
%261 = load double, double* %26
%262 = load double, double* %27
%263 = load double, double* %15
%264 = fmul double %262, %263
%265 = load double, double* %27
%266 = load double, double* %27
%267 = fmul double %265, %266
%268 = load double, double* %16
%269 = fmul double %267, %268
%270 = call i32 @g(double %260, double %261, double %264, double %269)
%271 = icmp eq i32 %270, 0
br i1 %271, label %279, label %272
272: ; preds = %254
%273 = load double, double* %21
%274 = load double, double* %23
%275 = fsub double %273, %274
%276 = fmul double 5.000000e-01, %275
%277 = load double, double* %19
%278 = fcmp olt double %276, %277
br i1 %278, label %279, label %289
279: ; preds = %272, %254
%280 = load double, double* %26
%281 = load double*, double** %14
store double %280, double* %281
%282 = load double, double* %11
%283 = load double, double* %12
%284 = fdiv double %282, %283
%285 = load double, double* %26
%286 = fmul double %284, %285
%287 = load double*, double** %13
store double %286, double* %287
%288 = load i32, i32* %25
store i32 %288, i32* %10
br label %327
289: ; preds = %272
%290 = load i32, i32* %25
%291 = add nsw i32 %290, 1
store i32 %291, i32* %25
%292 = load double, double* %12
%293 = load double, double* %23
%294 = load double, double* %27
%295 = load double, double* %15
%296 = fmul double %294, %295
%297 = load double, double* %27
%298 = load double, double* %27
%299 = fmul double %297, %298
%300 = load double, double* %16
%301 = fmul double %299, %300
%302 = call i32 @g(double %292, double %293, double %296, double %301)
%303 = load double, double* %12
%304 = load double, double* %26
%305 = load double, double* %27
%306 = load double, double* %15
%307 = fmul double %305, %306
%308 = load double, double* %27
%309 = load double, double* %27
%310 = fmul double %308, %309
%311 = load double, double* %16
%312 = fmul double %310, %311
%313 = call i32 @g(double %303, double %304, double %307, double %312)
%314 = mul nsw i32 %302, %313
%315 = icmp sgt i32 %314, 0
br i1 %315, label %316, label %318
316: ; preds = %289
%317 = load double, double* %26
store double %317, double* %23
br label %320
318: ; preds = %289
%319 = load double, double* %26
store double %319, double* %21
br label %320
320: ; preds = %318, %316
br label %250
321: ; preds = %250
br label %322
322: ; preds = %321, %238
%323 = load double, double* %17
%324 = load double*, double** %13
store double %323, double* %324
%325 = load double, double* %18
%326 = load double*, double** %14
store double %325, double* %326
store i32 -1, i32* %10
br label %327
327: ; preds = %322, %279, %196, %148, %124, %90, %66, %33
%328 = load i32, i32* %10
ret i32 %328
}

LLVM IR (-O2):
define i32 @rootByBisection(double %0, double %1, double* nocapture writeonly %2, double* nocapture writeonly %3, double %4, double %5, double %6, double %7, double %8) {
%10 = fcmp oeq double %0, 0.000000e+00
%11 = fcmp oeq double %1, 0.000000e+00
%12 = and i1 %10, %11
br i1 %12, label %13, label %14
13: ; preds = %9
store double 0.000000e+00, double* %3
store double 0.000000e+00, double* %2
br label %129
14: ; preds = %9
br i1 %10, label %15, label %40
15: ; preds = %14
store double 0.000000e+00, double* %2
%16 = fneg double %7
br label %17
17: ; preds = %15, %30
%18 = phi i32 [ 0, %15 ], [ %31, %30 ]
%19 = phi double [ %16, %15 ], [ %37, %30 ]
%20 = phi double [ %7, %15 ], [ %36, %30 ]
%21 = fadd double %20, %19
%22 = fmul double %21, 5.000000e-01
%23 = tail call i32 @g(double %1, double %22, double %4, double %5)
%24 = icmp eq i32 %23, 0
br i1 %24, label %29, label %25
25: ; preds = %17
%26 = fsub double %20, %19
%27 = fmul double %26, 5.000000e-01
%28 = fcmp olt double %27, %8
br i1 %28, label %29, label %30
29: ; preds = %25, %17
store double %22, double* %3
br label %129
30: ; preds = %25
%31 = add nuw nsw i32 %18, 1
%32 = tail call i32 @g(double %1, double %19, double %4, double %5)
%33 = tail call i32 @g(double %1, double %22, double %4, double %5)
%34 = mul nsw i32 %33, %32
%35 = icmp sgt i32 %34, 0
%36 = select i1 %35, double %20, double %22
%37 = select i1 %35, double %22, double %19
%38 = icmp eq i32 %31, 1000
br i1 %38, label %39, label %17
39: ; preds = %30
store double %7, double* %3
br label %129
40: ; preds = %14
br i1 %11, label %41, label %65
41: ; preds = %40
store double 0.000000e+00, double* %3
%42 = fneg double %6
br label %43
43: ; preds = %41, %55
%44 = phi i32 [ 0, %41 ], [ %56, %55 ]
%45 = phi double [ %42, %41 ], [ %62, %55 ]
%46 = phi double [ %6, %41 ], [ %61, %55 ]
%47 = fsub double %46, %45
%48 = tail call double @llvm.fmuladd.f64(double %47, double 5.000000e-01, double %45)
%49 = tail call i32 @g(double %0, double %48, double %4, double %5)
%50 = icmp eq i32 %49, 0
%51 = fmul double %47, 5.000000e-01
%52 = fcmp olt double %51, %8
%53 = select i1 %50, i1 true, i1 %52
br i1 %53, label %54, label %55
54: ; preds = %43
store double %48, double* %2
br label %129
55: ; preds = %43
%56 = add nuw nsw i32 %44, 1
%57 = tail call i32 @g(double %0, double %45, double %4, double %5)
%58 = tail call i32 @g(double %0, double %48, double %4, double %5)
%59 = mul nsw i32 %58, %57
%60 = icmp sgt i32 %59, 0
%61 = select i1 %60, double %46, double %48
%62 = select i1 %60, double %48, double %45
%63 = icmp eq i32 %56, 1000
br i1 %63, label %64, label %43
64: ; preds = %55
store double %6, double* %2
br label %129
65: ; preds = %40
%66 = tail call i64 @fabs(double %0)
%67 = tail call i64 @fabs(double %1)
%68 = icmp sgt i64 %66, %67
br i1 %68, label %69, label %99
69: ; preds = %65
%70 = fdiv double %1, %0
%71 = tail call double @llvm.fmuladd.f64(double %70, double %70, double 1.000000e+00)
%72 = fneg double %6
%73 = fmul double %71, %4
%74 = fmul double %71, %71
%75 = fmul double %74, %5
br label %76
76: ; preds = %69, %90
%77 = phi i32 [ 0, %69 ], [ %91, %90 ]
%78 = phi double [ %72, %69 ], [ %97, %90 ]
%79 = phi double [ %6, %69 ], [ %96, %90 ]
%80 = fadd double %79, %78
%81 = fmul double %80, 5.000000e-01
%82 = tail call i32 @g(double %0, double %81, double %73, double %75)
%83 = icmp eq i32 %82, 0
br i1 %83, label %88, label %84
84: ; preds = %76
%85 = fsub double %79, %78
%86 = fmul double %85, 5.000000e-01
%87 = fcmp olt double %86, %8
br i1 %87, label %88, label %90
88: ; preds = %84, %76
store double %81, double* %2
%89 = fmul double %70, %81
store double %89, double* %3
br label %129
90: ; preds = %84
%91 = add nuw nsw i32 %77, 1
%92 = tail call i32 @g(double %0, double %78, double %73, double %75)
%93 = tail call i32 @g(double %0, double %81, double %73, double %75)
%94 = mul nsw i32 %93, %92
%95 = icmp sgt i32 %94, 0
%96 = select i1 %95, double %79, double %81
%97 = select i1 %95, double %81, double %78
%98 = icmp eq i32 %91, 1000
br i1 %98, label %128, label %76
99: ; preds = %65
%100 = fdiv double %0, %1
%101 = tail call double @llvm.fmuladd.f64(double %100, double %100, double 1.000000e+00)
%102 = fneg double %7
%103 = fmul double %101, %4
%104 = fmul double %101, %101
%105 = fmul double %104, %5
br label %106
106: ; preds = %99, %119
%107 = phi i32 [ 0, %99 ], [ %120, %119 ]
%108 = phi double [ %102, %99 ], [ %126, %119 ]
%109 = phi double [ %7, %99 ], [ %125, %119 ]
%110 = fsub double %109, %108
%111 = tail call double @llvm.fmuladd.f64(double %110, double 5.000000e-01, double %108)
%112 = tail call i32 @g(double %1, double %111, double %103, double %105)
%113 = icmp eq i32 %112, 0
%114 = fmul double %110, 5.000000e-01
%115 = fcmp olt double %114, %8
%116 = select i1 %113, i1 true, i1 %115
br i1 %116, label %117, label %119
117: ; preds = %106
store double %111, double* %3
%118 = fmul double %100, %111
store double %118, double* %2
br label %129
119: ; preds = %106
%120 = add nuw nsw i32 %107, 1
%121 = tail call i32 @g(double %1, double %108, double %103, double %105)
%122 = tail call i32 @g(double %1, double %111, double %103, double %105)
%123 = mul nsw i32 %122, %121
%124 = icmp sgt i32 %123, 0
%125 = select i1 %124, double %109, double %111
%126 = select i1 %124, double %111, double %108
%127 = icmp eq i32 %120, 1000
br i1 %127, label %128, label %106
128: ; preds = %119, %90
store double %6, double* %2
store double %7, double* %3
br label %129
129: ; preds = %88, %117, %128, %64, %54, %39, %29, %13
%130 = phi i32 [ 0, %13 ], [ %18, %29 ], [ -1, %39 ], [ %44, %54 ], [ -1, %64 ], [ %77, %88 ], [ -1, %128 ], [ %107, %117 ]
ret i32 %130
}