#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 */
double fabs(double);
double sqrt(double);
int qrbdi(double *dm, double *em, int m) {
  int i, j, k, n;
  double u, x, y, a, b, c, s, t;
  for (j = 1, t = fabs(dm[0]); j < m; ++j)
    if ((s = fabs(dm[j]) + fabs(em[j - 1])) > t)
      t = s;
  t *= 1.e-15;
  n = 100 * m;
  for (j = 0; m > 1 && j < n; ++j) {
    for (k = m - 1; k > 0; --k) {
      if (fabs(em[k - 1]) < t)
        break;
      if (fabs(dm[k - 1]) < t) {
        for (i = k, s = 1., c = 0.; i < m; ++i) {
          a = s * em[i - 1];
          b = dm[i];
          em[i - 1] *= c;
          dm[i] = u = sqrt(a * a + b * b);
          s = -a / u;
          c = b / u;
        }
        break;
      }
    }
    y = dm[k];
    x = dm[m - 1];
    u = em[m - 2];
    a = (y + x) * (y - x) - u * u;
    s = y * em[k];
    b = s + s;
    u = sqrt(a * a + b * b);
    if (u > 0.) {
      c = sqrt((u + a) / (u + u));
      if (c != 0.)
        s /= (c * u);
      else
        s = 1.;
      for (i = k; i < m - 1; ++i) {
        b = em[i];
        if (i > k) {
          a = s * em[i];
          b *= c;
          em[i - 1] = u = sqrt(x * x + a * a);
          c = x / u;
          s = a / u;
        }
        a = c * y + s * b;
        b = c * b - s * y;
        s *= dm[i + 1];
        dm[i] = u = sqrt(a * a + s * s);
        y = c * dm[i + 1];
        c = a / u;
        s /= u;
        x = c * b + s * y;
        y = c * y - s * b;
      }
    }
    em[m - 2] = x;
    dm[m - 1] = y;
    if (fabs(x) < t)
      --m;
    if (m == k + 1)
      --m;
  }
  return j;
}


x86 assembly (clang, -O0):
<qrbdi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movaps 0xec7(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11b4 <qrbdi+0xa4>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xe9e(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0xe81(%rip),%xmm2
pand   %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
ucomisd -0x68(%rbp),%xmm0
jbe    11a1 <qrbdi+0x91>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    11a6 <qrbdi+0x96>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1142 <qrbdi+0x32>
movsd  0xe54(%rip),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
imul   $0x64,-0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x1c(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0x14(%rbp)
mov    %al,-0x69(%rbp)
jle    11ef <qrbdi+0xdf>
mov    -0x1c(%rbp),%eax
cmp    -0x24(%rbp),%eax
setl   %al
mov    %al,-0x69(%rbp)
mov    -0x69(%rbp),%al
test   $0x1,%al
jne    11ff <qrbdi+0xef>
jmp    173d <qrbdi+0x62d>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jle    136e <qrbdi+0x25e>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0xdd5(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1243 <qrbdi+0x133>
jmp    136e <qrbdi+0x25e>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0xda4(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    135b <qrbdi+0x24b>
mov    -0x20(%rbp),%eax
mov    %eax,-0x18(%rbp)
movsd  0xd9b(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1356 <qrbdi+0x246>
movsd  -0x60(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x48(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x50(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    128a <qrbdi+0x17a>
jmp    136e <qrbdi+0x25e>
jmp    1360 <qrbdi+0x250>
mov    -0x20(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
jmp    1208 <qrbdi+0xf8>
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x40(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
subsd  -0x38(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    16ba <qrbdi+0x5aa>
movsd  -0x30(%rbp),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
addsd  -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    148d <qrbdi+0x37d>
jp     148d <qrbdi+0x37d>
jmp    14aa <qrbdi+0x39a>
movsd  -0x58(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    14b7 <qrbdi+0x3a7>
movsd  0xb66(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    16b5 <qrbdi+0x5a5>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    1568 <qrbdi+0x458>
movsd  -0x60(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x38(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x58(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x48(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x30(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    14bd <qrbdi+0x3ad>
jmp    16ba <qrbdi+0x5aa>
movsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x40(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x38(%rbp),%xmm1
movaps 0x90c(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1710 <qrbdi+0x600>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jne    172a <qrbdi+0x61a>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    172f <qrbdi+0x61f>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11d4 <qrbdi+0xc4>
mov    -0x1c(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qrbdi>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
xor    %eax,%eax
cmp    $0x2,%edx
jl     18cc <qrbdi+0x7bc>
mov    %edx,%r12d
mov    %rsi,%r13
mov    %rdi,%r15
movsd  (%rdi),%xmm1
andpd  0xebf(%rip),%xmm1
mov    %edx,%edi
add    $0xffffffffffffffff,%rdi
cmp    $0x2,%edx
jne    1157 <qrbdi+0x47>
mov    $0x1,%ecx
movapd %xmm1,%xmm5
jmp    11c1 <qrbdi+0xb1>
mov    %rdi,%rdx
and    $0xfffffffffffffffe,%rdx
neg    %rdx
mov    $0x1,%ecx
movapd 0xe92(%rip),%xmm0
xchg   %ax,%ax
movsd  (%r15,%rcx,8),%xmm2
movsd  0x8(%r15,%rcx,8),%xmm3
andpd  %xmm0,%xmm2
movsd  -0x8(%r13,%rcx,8),%xmm4
movsd  0x0(%r13,%rcx,8),%xmm5
andpd  %xmm0,%xmm4
addsd  %xmm2,%xmm4
maxsd  %xmm1,%xmm4
andpd  %xmm0,%xmm3
andpd  %xmm0,%xmm5
addsd  %xmm3,%xmm5
maxsd  %xmm4,%xmm5
lea    (%rdx,%rcx,1),%rsi
add    $0x2,%rsi
add    $0x2,%rcx
movapd %xmm5,%xmm1
cmp    $0x1,%rsi
jne    1170 <qrbdi+0x60>
test   $0x1,%dil
je     11f0 <qrbdi+0xe0>
movsd  (%r15,%rcx,8),%xmm0
movapd 0xe2b(%rip),%xmm1
andpd  %xmm1,%xmm0
movsd  -0x8(%r13,%rcx,8),%xmm2
andpd  %xmm1,%xmm2
addsd  %xmm0,%xmm2
maxsd  %xmm5,%xmm2
movapd %xmm2,%xmm5
cmp    $0x2,%r12d
jl     18cc <qrbdi+0x7bc>
movapd %xmm5,%xmm1
imul   $0x64,%r12d,%eax
mov    %eax,0x5c(%rsp)
mulsd  0xe12(%rip),%xmm1
lea    -0x8(%r15),%rax
mov    %rax,0xb0(%rsp)
lea    -0x8(%r13),%rax
mov    %rax,0xa8(%rsp)
xor    %eax,%eax
movapd 0xdd0(%rip),%xmm2
xorpd  %xmm9,%xmm9
movapd %xmm1,0x60(%rsp)
mov    %r13,0x50(%rsp)
mov    %rax,0xb8(%rsp)
mov    %r12d,%r14d
mov    %r12d,%r12d
add    $0xffffffff,%r14d
mov    0xb0(%rsp),%rax
lea    (%rax,%r14,8),%rax
mov    0xa8(%rsp),%rcx
lea    (%rcx,%r14,8),%rcx
movslq %r14d,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,0xc0(%rsp)
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %rdx,%rbx
lea    (%r14,%rbp,1),%edx
test   %edx,%edx
jle    1390 <qrbdi+0x280>
movsd  (%rcx,%rbp,8),%xmm0
andpd  %xmm2,%xmm0
ucomisd %xmm0,%xmm1
ja     13a0 <qrbdi+0x290>
movsd  (%rax,%rbp,8),%xmm0
andpd  %xmm2,%xmm0
add    $0xffffffffffffffff,%rbp
lea    -0x1(%rbx),%rdx
ucomisd %xmm0,%xmm1
jbe    1280 <qrbdi+0x170>
add    %r12,%rbp
cmp    %ebp,%r12d
jle    13b0 <qrbdi+0x2a0>
mov    %r12,0x40(%rsp)
movslq %r12d,%r12
add    $0xffffffffffffffff,%r12
movsd  0xd4f(%rip),%xmm0
movapd %xmm0,%xmm4
jmp    1330 <qrbdi+0x220>
nop
movapd %xmm4,(%rsp)
movapd %xmm3,0x30(%rsp)
call   1030 <sqrt@plt>
movapd 0x30(%rsp),%xmm3
movapd (%rsp),%xmm4
xorpd  %xmm9,%xmm9
movapd 0xcf8(%rip),%xmm2
movsd  %xmm0,0x8(%r15,%rbx,8)
xorpd  0xcf9(%rip),%xmm4
unpcklpd %xmm3,%xmm4
unpcklpd %xmm0,%xmm0
divpd  %xmm0,%xmm4
add    $0x1,%rbx
movapd %xmm4,%xmm0
cmp    %rbx,%r12
je     13a5 <qrbdi+0x295>
movabs $0x100000000,%rax
add    %ebx,%eax
movsd  0x0(%r13,%rax,8),%xmm1
mulsd  %xmm1,%xmm4
movsd  0x8(%r15,%rbx,8),%xmm3
unpckhpd %xmm0,%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x0(%r13,%rax,8)
movapd %xmm3,%xmm1
mulsd  %xmm3,%xmm1
movapd %xmm4,%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm9,%xmm0
jb     12e0 <qrbdi+0x1d0>
sqrtsd %xmm0,%xmm0
jmp    1308 <qrbdi+0x1f8>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %ebp,%ebp
jmp    13b0 <qrbdi+0x2a0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    %r14d,%ebp
jmp    13b0 <qrbdi+0x2a0>
mov    0x40(%rsp),%r12
nopw   0x0(%rax,%rax,1)
mov    %ebp,%eax
movsd  (%r15,%rax,8),%xmm6
movsd  (%r15,%r14,8),%xmm5
lea    -0x2(%r12),%ebx
movsd  0x0(%r13,%rbx,8),%xmm0
movapd %xmm6,%xmm1
addsd  %xmm5,%xmm1
movapd %xmm6,%xmm7
subsd  %xmm5,%xmm7
mulsd  %xmm1,%xmm7
mulsd  %xmm0,%xmm0
subsd  %xmm0,%xmm7
movsd  0x0(%r13,%rax,8),%xmm4
mulsd  %xmm6,%xmm4
movapd %xmm4,%xmm1
addsd  %xmm4,%xmm1
mulsd  %xmm1,%xmm1
movapd %xmm7,%xmm0
mulsd  %xmm7,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm9,%xmm0
movsd  %xmm4,0x30(%rsp)
jb     1420 <qrbdi+0x310>
xorps  %xmm3,%xmm3
sqrtsd %xmm0,%xmm3
jmp    1458 <qrbdi+0x348>
nop
movsd  %xmm6,0x20(%rsp)
movapd %xmm5,(%rsp)
movsd  %xmm7,0x10(%rsp)
call   1030 <sqrt@plt>
movsd  0x10(%rsp),%xmm7
movapd (%rsp),%xmm5
movsd  0x20(%rsp),%xmm6
xorpd  %xmm9,%xmm9
movapd 0xbac(%rip),%xmm2
movapd %xmm0,%xmm3
movapd 0x60(%rsp),%xmm1
ucomisd %xmm9,%xmm3
jbe    188a <qrbdi+0x77a>
addsd  %xmm3,%xmm7
movapd %xmm3,%xmm0
addsd  %xmm3,%xmm0
divsd  %xmm0,%xmm7
ucomisd %xmm9,%xmm7
jb     1490 <qrbdi+0x380>
xorps  %xmm4,%xmm4
sqrtsd %xmm7,%xmm4
jmp    14cc <qrbdi+0x3bc>
nopl   0x0(%rax)
movapd %xmm7,%xmm0
movsd  %xmm6,0x20(%rsp)
movapd %xmm5,(%rsp)
movsd  %xmm3,0x10(%rsp)
call   1030 <sqrt@plt>
movsd  0x10(%rsp),%xmm3
movapd (%rsp),%xmm5
movsd  0x20(%rsp),%xmm6
xorpd  %xmm9,%xmm9
movapd 0xb38(%rip),%xmm2
movapd %xmm0,%xmm4
ucomisd %xmm9,%xmm4
movsd  0xb4e(%rip),%xmm8
jne    14de <qrbdi+0x3ce>
jnp    14f1 <qrbdi+0x3e1>
mulsd  %xmm4,%xmm3
movsd  0x30(%rsp),%xmm0
divsd  %xmm3,%xmm0
movapd %xmm0,%xmm8
cmp    %r14d,%ebp
jge    1560 <qrbdi+0x450>
mov    %rbx,0x88(%rsp)
mov    %r12,0x40(%rsp)
movslq %ebp,%rdx
movsd  0x0(%r13,%rdx,8),%xmm7
movapd %xmm7,%xmm0
mulsd  %xmm8,%xmm0
movapd %xmm4,%xmm10
mulsd  %xmm6,%xmm10
addsd  %xmm0,%xmm10
lea    0x1(%rdx),%r12
mov    %r12d,%ebx
movsd  (%r15,%rbx,8),%xmm3
mulsd  %xmm8,%xmm3
movapd %xmm3,%xmm1
mulsd  %xmm3,%xmm1
movapd %xmm10,%xmm0
mulsd  %xmm10,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm9,%xmm0
mov    %rdx,0x48(%rsp)
jb     156b <qrbdi+0x45b>
sqrtsd %xmm0,%xmm0
jmp    15d2 <qrbdi+0x4c2>
nop
movapd 0x60(%rsp),%xmm1
jmp    188a <qrbdi+0x77a>
movapd %xmm4,(%rsp)
movapd %xmm10,0x30(%rsp)
movsd  %xmm6,0x20(%rsp)
movapd %xmm7,0x10(%rsp)
movsd  %xmm8,0x70(%rsp)
movapd %xmm3,0x90(%rsp)
call   1030 <sqrt@plt>
movapd 0x90(%rsp),%xmm3
movsd  0x70(%rsp),%xmm8
movapd 0x10(%rsp),%xmm7
movsd  0x20(%rsp),%xmm6
movapd 0x30(%rsp),%xmm10
mov    0x48(%rsp),%rdx
movapd (%rsp),%xmm4
xorpd  %xmm9,%xmm9
movapd 0xa2e(%rip),%xmm2
movslq %r14d,%rax
mulsd  %xmm8,%xmm6
mulsd  %xmm4,%xmm7
subsd  %xmm6,%xmm7
movsd  %xmm0,(%r15,%rdx,8)
mulsd  (%r15,%rbx,8),%xmm4
unpcklpd %xmm3,%xmm10
unpcklpd %xmm0,%xmm0
divpd  %xmm0,%xmm10
movapd %xmm10,%xmm0
unpckhpd %xmm10,%xmm0
xorpd  0xa02(%rip),%xmm0
movapd %xmm10,%xmm1
movsd  %xmm7,%xmm1
unpcklpd %xmm4,%xmm0
mulpd  %xmm1,%xmm0
movapd %xmm10,%xmm1
unpcklpd %xmm10,%xmm1
unpcklpd %xmm7,%xmm4
mulpd  %xmm1,%xmm4
addpd  %xmm0,%xmm4
cmp    %rax,%r12
jne    164b <qrbdi+0x53b>
movapd %xmm4,%xmm5
unpckhpd %xmm4,%xmm5
movapd %xmm4,%xmm6
jmp    1877 <qrbdi+0x767>
mov    %rdx,%r12
jmp    173a <qrbdi+0x62a>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movapd %xmm4,(%rsp)
movapd %xmm10,0x30(%rsp)
movapd %xmm6,0x20(%rsp)
movapd %xmm7,0x10(%rsp)
movapd %xmm3,0x70(%rsp)
movapd %xmm5,0x90(%rsp)
call   1030 <sqrt@plt>
movapd 0x90(%rsp),%xmm5
movapd 0x70(%rsp),%xmm3
movapd 0x10(%rsp),%xmm7
movapd 0x20(%rsp),%xmm6
movapd 0x30(%rsp),%xmm10
mov    0x48(%rsp),%rdx
movapd (%rsp),%xmm4
xorpd  %xmm9,%xmm9
movapd 0x93b(%rip),%xmm2
mulsd  %xmm3,%xmm4
mulsd  %xmm10,%xmm6
subsd  %xmm4,%xmm6
movsd  %xmm0,0x8(%r15,%r12,8)
movsd  (%r15,%rbx,8),%xmm4
mulsd  %xmm10,%xmm4
unpcklpd %xmm5,%xmm7
unpcklpd %xmm0,%xmm0
divpd  %xmm0,%xmm7
movapd %xmm7,%xmm0
unpckhpd %xmm7,%xmm0
xorpd  0x910(%rip),%xmm0
movapd %xmm7,%xmm1
movsd  %xmm6,%xmm1
unpcklpd %xmm4,%xmm0
mulpd  %xmm1,%xmm0
movapd %xmm7,%xmm1
unpcklpd %xmm7,%xmm1
unpcklpd %xmm6,%xmm4
mulpd  %xmm1,%xmm4
addpd  %xmm0,%xmm4
mov    %r13,%r12
movapd %xmm7,%xmm10
cmp    %r13,0xc0(%rsp)
je     1866 <qrbdi+0x756>
lea    0x1(%r12),%r13
mov    0x50(%rsp),%rax
movsd  0x8(%rax,%r12,8),%xmm6
cmp    %rdx,%r13
jle    1810 <qrbdi+0x700>
movapd %xmm10,%xmm3
unpckhpd %xmm10,%xmm3
mulsd  %xmm6,%xmm3
movapd %xmm3,%xmm1
mulsd  %xmm3,%xmm1
movapd %xmm4,%xmm7
unpckhpd %xmm4,%xmm7
movapd %xmm7,%xmm0
mulsd  %xmm7,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm9,%xmm0
jb     1790 <qrbdi+0x680>
sqrtsd %xmm0,%xmm0
jmp    17e3 <qrbdi+0x6d3>
nopl   0x0(%rax,%rax,1)
movapd %xmm4,(%rsp)
movapd %xmm10,0x30(%rsp)
movapd %xmm6,0x20(%rsp)
movapd %xmm3,0x10(%rsp)
movapd %xmm7,0x70(%rsp)
call   1030 <sqrt@plt>
movapd 0x70(%rsp),%xmm7
movapd 0x10(%rsp),%xmm3
movapd 0x20(%rsp),%xmm6
movapd 0x30(%rsp),%xmm10
mov    0x48(%rsp),%rdx
movapd (%rsp),%xmm4
xorpd  %xmm9,%xmm9
movapd 0x81d(%rip),%xmm2
mulsd  %xmm10,%xmm6
movabs $0x100000000,%rax
add    %r12d,%eax
mov    0x50(%rsp),%rcx
movsd  %xmm0,(%rcx,%rax,8)
unpcklpd %xmm3,%xmm7
unpcklpd %xmm0,%xmm0
divpd  %xmm0,%xmm7
movapd %xmm7,%xmm10
movapd %xmm10,%xmm3
unpckhpd %xmm10,%xmm3
movapd %xmm6,%xmm0
mulsd  %xmm3,%xmm0
movapd %xmm10,%xmm7
mulsd  %xmm4,%xmm7
addsd  %xmm0,%xmm7
lea    0x2(%r12),%ebx
movsd  (%r15,%rbx,8),%xmm5
mulsd  %xmm3,%xmm5
movapd %xmm5,%xmm1
mulsd  %xmm5,%xmm1
movapd %xmm7,%xmm0
mulsd  %xmm7,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm9,%xmm0
jb     1660 <qrbdi+0x550>
sqrtsd %xmm0,%xmm0
jmp    16c5 <qrbdi+0x5b5>
movapd %xmm4,%xmm5
unpckhpd %xmm4,%xmm5
movapd %xmm4,%xmm6
mov    0x50(%rsp),%r13
mov    0x40(%rsp),%r12
movapd 0x60(%rsp),%xmm1
mov    0x88(%rsp),%rbx
movsd  %xmm5,0x0(%r13,%rbx,8)
andpd  %xmm2,%xmm5
ucomisd %xmm5,%xmm1
cmova  %r14d,%r12d
movsd  %xmm6,(%r15,%r14,8)
add    $0x1,%ebp
xor    %eax,%eax
cmp    %ebp,%r12d
sete   %al
sub    %eax,%r12d
mov    0xb8(%rsp),%rax
add    $0x1,%eax
cmp    $0x2,%r12d
jl     18cc <qrbdi+0x7bc>
cmp    0x5c(%rsp),%eax
jl     1240 <qrbdi+0x130>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @qrbdi(double* nocapture %0, double* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 1
br i1 %4, label %5, label %268
5: ; preds = %3
%6 = load double, double* %0
%7 = tail call double @llvm.fabs.f64(double %6)
%8 = zext i32 %2 to i64
%9 = add nsw i64 %8, -1
%10 = and i64 %9, 1
%11 = icmp eq i32 %2, 2
br i1 %11, label %41, label %12
12: ; preds = %5
%13 = and i64 %9, -2
br label %14
14: ; preds = %14, %12
%15 = phi i64 [ 1, %12 ], [ %38, %14 ]
%16 = phi double [ %7, %12 ], [ %37, %14 ]
%17 = phi i64 [ 0, %12 ], [ %39, %14 ]
%18 = getelementptr inbounds double, double* %0, i64 %15
%19 = load double, double* %18
%20 = tail call double @llvm.fabs.f64(double %19)
%21 = add nsw i64 %15, -1
%22 = getelementptr inbounds double, double* %1, i64 %21
%23 = load double, double* %22
%24 = tail call double @llvm.fabs.f64(double %23)
%25 = fadd double %20, %24
%26 = fcmp ogt double %25, %16
%27 = select i1 %26, double %25, double %16
%28 = add nuw nsw i64 %15, 1
%29 = getelementptr inbounds double, double* %0, i64 %28
%30 = load double, double* %29
%31 = tail call double @llvm.fabs.f64(double %30)
%32 = getelementptr inbounds double, double* %1, i64 %15
%33 = load double, double* %32
%34 = tail call double @llvm.fabs.f64(double %33)
%35 = fadd double %31, %34
%36 = fcmp ogt double %35, %27
%37 = select i1 %36, double %35, double %27
%38 = add nuw nsw i64 %15, 2
%39 = add i64 %17, 2
%40 = icmp eq i64 %39, %13
br i1 %40, label %41, label %14
41: ; preds = %14, %5
%42 = phi double [ undef, %5 ], [ %37, %14 ]
%43 = phi i64 [ 1, %5 ], [ %38, %14 ]
%44 = phi double [ %7, %5 ], [ %37, %14 ]
%45 = icmp eq i64 %10, 0
br i1 %45, label %57, label %46
46: ; preds = %41
%47 = getelementptr inbounds double, double* %0, i64 %43
%48 = load double, double* %47
%49 = tail call double @llvm.fabs.f64(double %48)
%50 = add nsw i64 %43, -1
%51 = getelementptr inbounds double, double* %1, i64 %50
%52 = load double, double* %51
%53 = tail call double @llvm.fabs.f64(double %52)
%54 = fadd double %49, %53
%55 = fcmp ogt double %54, %44
%56 = select i1 %55, double %54, double %44
br label %57
57: ; preds = %41, %46
%58 = phi double [ %42, %41 ], [ %56, %46 ]
%59 = fmul double %58, 1.000000e-15
%60 = mul nsw i32 %2, 100
br i1 %4, label %61, label %268
61: ; preds = %57, %254
%62 = phi i32 [ %263, %254 ], [ %2, %57 ]
%63 = phi i32 [ %264, %254 ], [ 0, %57 ]
%64 = add nsw i32 %62, -1
%65 = zext i32 %64 to i64
br label %66
66: ; preds = %76, %61
%67 = phi i64 [ %71, %76 ], [ %65, %61 ]
%68 = trunc i64 %67 to i32
%69 = icmp sgt i32 %68, 0
br i1 %69, label %70, label %114
70: ; preds = %66
%71 = add nsw i64 %67, -1
%72 = getelementptr inbounds double, double* %1, i64 %71
%73 = load double, double* %72
%74 = tail call double @llvm.fabs.f64(double %73)
%75 = fcmp olt double %74, %59
br i1 %75, label %112, label %76
76: ; preds = %70
%77 = getelementptr inbounds double, double* %0, i64 %71
%78 = load double, double* %77
%79 = tail call double @llvm.fabs.f64(double %78)
%80 = fcmp olt double %79, %59
br i1 %80, label %81, label %66
81: ; preds = %76
%82 = trunc i64 %67 to i32
%83 = icmp sgt i32 %62, %82
br i1 %83, label %84, label %114
84: ; preds = %81
%85 = shl i64 %67, 32
%86 = ashr exact i64 %85, 32
%87 = sext i32 %62 to i64
br label %88
88: ; preds = %84, %88
%89 = phi i64 [ %86, %84 ], [ %110, %88 ]
%90 = phi <2 x double> [ <double 1.000000e+00, double 0.000000e+00>, %84 ], [ %109, %88 ]
%91 = add i64 %89, 4294967295
%92 = and i64 %91, 4294967295
%93 = getelementptr inbounds double, double* %1, i64 %92
%94 = load double, double* %93
%95 = extractelement <2 x double> %90, i64 0
%96 = fmul double %95, %94
%97 = getelementptr inbounds double, double* %0, i64 %89
%98 = load double, double* %97
%99 = extractelement <2 x double> %90, i64 1
%100 = fmul double %99, %94
store double %100, double* %93
%101 = fmul double %98, %98
%102 = tail call double @llvm.fmuladd.f64(double %96, double %96, double %101)
%103 = tail call double @sqrt(double %102)
store double %103, double* %97
%104 = fneg double %96
%105 = insertelement <2 x double> poison, double %104, i64 0
%106 = insertelement <2 x double> %105, double %98, i64 1
%107 = insertelement <2 x double> poison, double %103, i64 0
%108 = shufflevector <2 x double> %107, <2 x double> poison, <2 x i32> zeroinitializer
%109 = fdiv <2 x double> %106, %108
%110 = add nsw i64 %89, 1
%111 = icmp eq i64 %110, %87
br i1 %111, label %114, label %88
112: ; preds = %70
%113 = trunc i64 %67 to i32
br label %114
114: ; preds = %66, %88, %112, %81
%115 = phi i32 [ %82, %81 ], [ %113, %112 ], [ %82, %88 ], [ 0, %66 ]
%116 = zext i32 %115 to i64
%117 = getelementptr inbounds double, double* %0, i64 %116
%118 = load double, double* %117
%119 = getelementptr inbounds double, double* %0, i64 %65
%120 = load double, double* %119
%121 = add nsw i32 %62, -2
%122 = zext i32 %121 to i64
%123 = getelementptr inbounds double, double* %1, i64 %122
%124 = load double, double* %123
%125 = fadd double %118, %120
%126 = fsub double %118, %120
%127 = fneg double %124
%128 = fmul double %124, %127
%129 = tail call double @llvm.fmuladd.f64(double %125, double %126, double %128)
%130 = getelementptr inbounds double, double* %1, i64 %116
%131 = load double, double* %130
%132 = fmul double %118, %131
%133 = fadd double %132, %132
%134 = fmul double %133, %133
%135 = tail call double @llvm.fmuladd.f64(double %129, double %129, double %134)
%136 = tail call double @sqrt(double %135)
%137 = fcmp ogt double %136, 0.000000e+00
br i1 %137, label %138, label %254
138: ; preds = %114
%139 = fadd double %136, %129
%140 = fadd double %136, %136
%141 = fdiv double %139, %140
%142 = tail call double @sqrt(double %141)
%143 = fcmp une double %142, 0.000000e+00
br i1 %143, label %144, label %147
144: ; preds = %138
%145 = fmul double %136, %142
%146 = fdiv double %132, %145
br label %147
147: ; preds = %138, %144
%148 = phi double [ %146, %144 ], [ 1.000000e+00, %138 ]
%149 = icmp slt i32 %115, %64
br i1 %149, label %150, label %254
150: ; preds = %147
%151 = sext i32 %115 to i64
%152 = sext i32 %64 to i64
%153 = getelementptr inbounds double, double* %1, i64 %151
%154 = load double, double* %153
%155 = fmul double %154, %148
%156 = tail call double @llvm.fmuladd.f64(double %142, double %118, double %155)
%157 = fneg double %148
%158 = fmul double %118, %157
%159 = tail call double @llvm.fmuladd.f64(double %142, double %154, double %158)
%160 = add nsw i64 %151, 1
%161 = and i64 %160, 4294967295
%162 = getelementptr inbounds double, double* %0, i64 %161
%163 = load double, double* %162
%164 = fmul double %148, %163
%165 = fmul double %164, %164
%166 = tail call double @llvm.fmuladd.f64(double %156, double %156, double %165)
%167 = tail call double @sqrt(double %166)
%168 = getelementptr inbounds double, double* %0, i64 %151
store double %167, double* %168
%169 = load double, double* %162
%170 = fmul double %142, %169
%171 = insertelement <2 x double> poison, double %156, i64 0
%172 = insertelement <2 x double> %171, double %164, i64 1
%173 = insertelement <2 x double> poison, double %167, i64 0
%174 = shufflevector <2 x double> %173, <2 x double> poison, <2 x i32> zeroinitializer
%175 = fdiv <2 x double> %172, %174
%176 = extractelement <2 x double> %175, i64 1
%177 = fneg double %176
%178 = insertelement <2 x double> %175, double %159, i64 0
%179 = insertelement <2 x double> poison, double %177, i64 0
%180 = insertelement <2 x double> %179, double %170, i64 1
%181 = fmul <2 x double> %178, %180
%182 = shufflevector <2 x double> %175, <2 x double> undef, <2 x i32> zeroinitializer
%183 = insertelement <2 x double> poison, double %170, i64 0
%184 = insertelement <2 x double> %183, double %159, i64 1
%185 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %182, <2 x double> %184, <2 x double> %181)
%186 = icmp eq i64 %160, %152
%187 = extractelement <2 x double> %185, i64 0
%188 = extractelement <2 x double> %185, i64 1
br i1 %186, label %254, label %189
189: ; preds = %150, %213
%190 = phi i64 [ %224, %213 ], [ %160, %150 ]
%191 = phi <2 x double> [ %239, %213 ], [ %175, %150 ]
%192 = phi <2 x double> [ %249, %213 ], [ %185, %150 ]
%193 = getelementptr inbounds double, double* %1, i64 %190
%194 = load double, double* %193
%195 = icmp sgt i64 %190, %151
br i1 %195, label %196, label %213
196: ; preds = %189
%197 = extractelement <2 x double> %191, i64 1
%198 = fmul double %197, %194
%199 = extractelement <2 x double> %191, i64 0
%200 = fmul double %199, %194
%201 = fmul double %198, %198
%202 = extractelement <2 x double> %192, i64 1
%203 = tail call double @llvm.fmuladd.f64(double %202, double %202, double %201)
%204 = tail call double @sqrt(double %203)
%205 = add i64 %190, 4294967295
%206 = and i64 %205, 4294967295
%207 = getelementptr inbounds double, double* %1, i64 %206
store double %204, double* %207
%208 = insertelement <2 x double> poison, double %202, i64 0
%209 = insertelement <2 x double> %208, double %198, i64 1
%210 = insertelement <2 x double> poison, double %204, i64 0
%211 = shufflevector <2 x double> %210, <2 x double> poison, <2 x i32> zeroinitializer
%212 = fdiv <2 x double> %209, %211
br label %213
213: ; preds = %196, %189
%214 = phi double [ %200, %196 ], [ %194, %189 ]
%215 = phi <2 x double> [ %212, %196 ], [ %191, %189 ]
%216 = extractelement <2 x double> %215, i64 1
%217 = fmul double %214, %216
%218 = extractelement <2 x double> %215, i64 0
%219 = extractelement <2 x double> %192, i64 0
%220 = tail call double @llvm.fmuladd.f64(double %218, double %219, double %217)
%221 = fneg double %216
%222 = fmul double %219, %221
%223 = tail call double @llvm.fmuladd.f64(double %218, double %214, double %222)
%224 = add nsw i64 %190, 1
%225 = and i64 %224, 4294967295
%226 = getelementptr inbounds double, double* %0, i64 %225
%227 = load double, double* %226
%228 = fmul double %216, %227
%229 = fmul double %228, %228
%230 = tail call double @llvm.fmuladd.f64(double %220, double %220, double %229)
%231 = tail call double @sqrt(double %230)
%232 = getelementptr inbounds double, double* %0, i64 %190
store double %231, double* %232
%233 = load double, double* %226
%234 = fmul double %218, %233
%235 = insertelement <2 x double> poison, double %220, i64 0
%236 = insertelement <2 x double> %235, double %228, i64 1
%237 = insertelement <2 x double> poison, double %231, i64 0
%238 = shufflevector <2 x double> %237, <2 x double> poison, <2 x i32> zeroinitializer
%239 = fdiv <2 x double> %236, %238
%240 = extractelement <2 x double> %239, i64 1
%241 = fneg double %240
%242 = insertelement <2 x double> %239, double %223, i64 0
%243 = insertelement <2 x double> poison, double %241, i64 0
%244 = insertelement <2 x double> %243, double %234, i64 1
%245 = fmul <2 x double> %242, %244
%246 = shufflevector <2 x double> %239, <2 x double> undef, <2 x i32> zeroinitializer
%247 = insertelement <2 x double> poison, double %234, i64 0
%248 = insertelement <2 x double> %247, double %223, i64 1
%249 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %246, <2 x double> %248, <2 x double> %245)
%250 = icmp eq i64 %224, %152
br i1 %250, label %251, label %189
251: ; preds = %213
%252 = extractelement <2 x double> %249, i64 1
%253 = extractelement <2 x double> %249, i64 0
br label %254
254: ; preds = %251, %150, %147, %114
%255 = phi double [ %120, %114 ], [ %120, %147 ], [ %188, %150 ], [ %252, %251 ]
%256 = phi double [ %118, %114 ], [ %118, %147 ], [ %187, %150 ], [ %253, %251 ]
store double %255, double* %123
store double %256, double* %119
%257 = tail call double @llvm.fabs.f64(double %255)
%258 = fcmp olt double %257, %59
%259 = select i1 %258, i32 %64, i32 %62
%260 = add nsw i32 %115, 1
%261 = icmp eq i32 %259, %260
%262 = sext i1 %261 to i32
%263 = add nsw i32 %259, %262
%264 = add nuw nsw i32 %63, 1
%265 = icmp sgt i32 %263, 1
%266 = icmp slt i32 %264, %60
%267 = select i1 %265, i1 %266, i1 false
br i1 %267, label %61, label %268
268: ; preds = %254, %3, %57
%269 = phi i32 [ 0, %57 ], [ 0, %3 ], [ %264, %254 ]
ret i32 %269
}