#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);
int /*<<< orphan*/ free(double *);
double *m_new(int, int);
int /*<<< orphan*/ memcpy(double *, double *, int);
int m_LU(double *A, int nrow, int *pr, int *per) {
  double *p, *q, *sf, *ex;
  double *Ar, *Ai, *Ak = NULL;
  double a, b;
  int r, s, i, k = 0;
  int rowsz = nrow * sizeof(double);
  int g = 0;
  *per = 1;
  sf = m_new(2, nrow);
  if (sf == NULL)
    return 2;
  ex = sf + nrow;
  p = A;
  q = sf;
  for (r = 0; r < nrow; r++) {
    if (pr)
      pr[r] = r;
    a = 0;
    for (i = 0; i < nrow; i++) {
      b = fabs(*p++);
      if (b > a)
        a = b;
    }
    if (a == 0)
      return -1;
    *q++ = 1.0 / a;
  }
  for (i = 0; i < nrow; i++) {
    Ar = A;
    for (r = 0; r < i; r++, Ar += nrow) {
      a = 0;
      p = Ar;
      q = A + i;
      for (s = 0; s < r; s++, q += nrow)
        a += *p++ * *q;
      *q -= a;
    }
    b = 0;
    Ai = Ar;
    for (; r < nrow; r++, Ar += nrow) {
      a = 0;
      p = Ar;
      q = A + i;
      for (s = 0; s < i; s++, q += nrow)
        a += *p++ * *q;
      *p -= a;
      a = fabs(*p) * sf[r];
      if (a > b) {
        b = a;
        k = r;
        Ak = Ar;
      }
    }
    if (i + 1 == nrow)
      break;
    if (i != k) {
      *per = -*per;
      sf[k] = sf[i];
      memcpy(ex, Ai, rowsz);
      memcpy(Ai, Ak, rowsz);
      memcpy(Ak, ex, rowsz);
      if (pr) {
        s = pr[i];
        pr[i] = pr[k];
        pr[k] = s;
      }
    }
    p = Ai + i;
    if (*p == 0.0) {
      *p = 1e-100;
      g = 1;
    }
    a = 1.0 / *p;
    p += nrow;
    for (r = i + 1; r < nrow; r++, p += nrow)
      *p *= a;
  }
  free(sf);
  return g;
}


x86 assembly (clang, -O0):
<m_LU>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movq   $0x0,-0x60(%rbp)
movl   $0x0,-0x80(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,-0x84(%rbp)
movl   $0x0,-0x88(%rbp)
mov    -0x28(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x14(%rbp),%esi
mov    $0x2,%edi
call   1050 <m_new@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    11a3 <m_LU+0x73>
movl   $0x2,-0x4(%rbp)
jmp    166a <m_LU+0x53a>
mov    -0x40(%rbp),%rax
movslq -0x14(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    12af <m_LU+0x17f>
cmpq   $0x0,-0x20(%rbp)
je     11f2 <m_LU+0xc2>
mov    -0x74(%rbp),%edx
mov    -0x20(%rbp),%rax
movslq -0x74(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    125d <m_LU+0x12d>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x30(%rbp)
movsd  (%rax),%xmm0
movaps 0xde9(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
ucomisd -0x68(%rbp),%xmm0
jbe    124a <m_LU+0x11a>
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    124f <m_LU+0x11f>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    1201 <m_LU+0xd1>
movsd  -0x68(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1281 <m_LU+0x151>
jp     1281 <m_LU+0x151>
movl   $0xffffffff,-0x4(%rbp)
jmp    166a <m_LU+0x53a>
movsd  0xd7f(%rip),%xmm0
divsd  -0x68(%rbp),%xmm0
mov    -0x38(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x38(%rbp)
movsd  %xmm0,(%rax)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    11cd <m_LU+0x9d>
movl   $0x0,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1658 <m_LU+0x528>
mov    -0x10(%rbp),%rax
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x7c(%rbp),%eax
jge    139b <m_LU+0x26b>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x7c(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    1363 <m_LU+0x233>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x30(%rbp)
movsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
jmp    1307 <m_LU+0x1d7>
movsd  -0x68(%rbp),%xmm1
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x50(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
jmp    12d1 <m_LU+0x1a1>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    14c7 <m_LU+0x397>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x7c(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x7c(%rbp),%eax
jge    143d <m_LU+0x30d>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x30(%rbp)
movsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
jmp    13e1 <m_LU+0x2b1>
movsd  -0x68(%rbp),%xmm1
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
movaps 0xbaf(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x40(%rbp),%rax
movslq -0x74(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
ucomisd -0x70(%rbp),%xmm0
jbe    149f <m_LU+0x36f>
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x74(%rbp),%eax
mov    %eax,-0x80(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,-0x60(%rbp)
jmp    14a4 <m_LU+0x374>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x50(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
jmp    13ab <m_LU+0x27b>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
cmp    -0x14(%rbp),%eax
jne    14db <m_LU+0x3ab>
jmp    1658 <m_LU+0x528>
mov    -0x7c(%rbp),%eax
cmp    -0x80(%rbp),%eax
je     158a <m_LU+0x45a>
mov    -0x28(%rbp),%rax
xor    %ecx,%ecx
sub    (%rax),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x40(%rbp),%rax
movslq -0x7c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x80(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    -0x84(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x58(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x84(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x60(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x84(%rbp),%edx
call   1040 <memcpy@plt>
cmpq   $0x0,-0x20(%rbp)
je     1585 <m_LU+0x455>
mov    -0x20(%rbp),%rax
movslq -0x7c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x78(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x80(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x20(%rbp),%rax
movslq -0x7c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x78(%rbp),%edx
mov    -0x20(%rbp),%rax
movslq -0x80(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    158a <m_LU+0x45a>
mov    -0x58(%rbp),%rax
movslq -0x7c(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    15d2 <m_LU+0x4a2>
jp     15d2 <m_LU+0x4a2>
mov    -0x30(%rbp),%rax
movsd  0xa3c(%rip),%xmm0
movsd  %xmm0,(%rax)
movl   $0x1,-0x88(%rbp)
mov    -0x30(%rbp),%rax
movsd  0xa2a(%rip),%xmm0
divsd  (%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1645 <m_LU+0x515>
movsd  -0x68(%rbp),%xmm0
mov    -0x30(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
jmp    1605 <m_LU+0x4d5>
jmp    164a <m_LU+0x51a>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    12b6 <m_LU+0x186>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x88(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_LU>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %rdi,0x58(%rsp)
mov    %rcx,0x60(%rsp)
movl   $0x1,(%rcx)
mov    $0x2,%r14d
mov    $0x2,%edi
call   1050 <m_new@plt>
mov    %rax,0x20(%rsp)
test   %rax,%rax
je     1745 <m_LU+0x615>
test   %ebp,%ebp
jle    1729 <m_LU+0x5f9>
mov    %rbp,%r10
movslq %r10d,%rax
lea    0x0(,%rax,8),%ecx
mov    %ecx,0x4(%rsp)
mov    0x20(%rsp),%rdi
mov    %rax,0x28(%rsp)
lea    (%rdi,%rax,8),%rax
mov    %rax,0x50(%rsp)
mov    %r10d,%eax
mov    %rax,0x38(%rsp)
add    $0xffffffff,%ebp
mov    %r10d,%eax
and    $0x3,%eax
mov    %r10d,%r8d
and    $0xfffffffc,%r8d
xor    %edx,%edx
xorpd  %xmm0,%xmm0
movsd  0xe4a(%rip),%xmm6
movapd 0xe32(%rip),%xmm7
movapd 0xe2a(%rip),%xmm1
mov    0x58(%rsp),%r11
mov    %r11,%rsi
xchg   %ax,%ax
test   %rbx,%rbx
je     11e8 <m_LU+0xb8>
mov    %edx,(%rbx,%rdx,4)
xorpd  %xmm2,%xmm2
cmp    $0x3,%ebp
jb     123c <m_LU+0x10c>
xorpd  %xmm2,%xmm2
mov    %r8d,%ecx
nopl   0x0(%rax,%rax,1)
movsd  (%rsi),%xmm3
movsd  0x8(%rsi),%xmm4
movsd  0x10(%rsi),%xmm5
andpd  %xmm1,%xmm3
maxsd  %xmm2,%xmm3
movsd  0x18(%rsi),%xmm2
andpd  %xmm1,%xmm4
maxsd  %xmm3,%xmm4
andpd  %xmm1,%xmm5
maxsd  %xmm4,%xmm5
add    $0x20,%rsi
andpd  %xmm1,%xmm2
maxsd  %xmm5,%xmm2
add    $0xfffffffc,%ecx
jne    1200 <m_LU+0xd0>
movapd %xmm2,%xmm3
test   %eax,%eax
je     1269 <m_LU+0x139>
mov    %eax,%ecx
cs nopw 0x0(%rax,%rax,1)
movsd  (%rsi),%xmm3
add    $0x8,%rsi
andpd  %xmm7,%xmm3
maxsd  %xmm2,%xmm3
movapd %xmm3,%xmm2
add    $0xffffffff,%ecx
jne    1250 <m_LU+0x120>
ucomisd %xmm0,%xmm3
jne    1275 <m_LU+0x145>
jnp    172e <m_LU+0x5fe>
movapd %xmm6,%xmm2
divsd  %xmm3,%xmm2
movsd  %xmm2,(%rdi)
add    $0x8,%rdi
add    $0x1,%rdx
cmp    0x38(%rsp),%rdx
jne    11e0 <m_LU+0xb0>
test   %r10d,%r10d
jle    1729 <m_LU+0x5f9>
mov    %ebp,0x44(%rsp)
mov    %rbx,0x48(%rsp)
lea    -0x2(%r10),%eax
mov    %eax,0x40(%rsp)
mov    0x28(%rsp),%rax
mov    %rax,%r12
shl    $0x5,%r12
lea    0x0(,%rax,8),%rbx
lea    0x3(%r10),%ecx
mov    %ecx,0x1c(%rsp)
lea    (%rbx,%rbx,2),%r8
mov    %rax,%rdi
shl    $0x4,%rdi
xor    %r15d,%r15d
movl   $0xffffffff,0x18(%rsp)
ff
xorpd  %xmm4,%xmm4
mov    %r11,0x30(%rsp)
movl   $0x0,0x14(%rsp)
xor    %r14d,%r14d
xor    %ebp,%ebp
mov    %r10,0x80(%rsp)
mov    %r8,0x78(%rsp)
mov    %rdi,0x70(%rsp)
jmp    132c <m_LU+0x1fc>
nopw   0x0(%rax,%rax,1)
addq   $0x8,0x30(%rsp)
add    $0xffffffff,%r9d
mov    %r9d,0x18(%rsp)
add    $0x3,%sil
mov    %esi,0x1c(%rsp)
mov    0x8(%rsp),%r15
mov    %r15,%r9
mov    %r11,%r13
mov    $0x0,%eax
sub    $0x1,%r9
jb     1433 <m_LU+0x303>
lea    (%r11,%r15,8),%r8
xor    %edx,%edx
mov    %r11,%r13
jmp    1379 <m_LU+0x249>
nopl   0x0(%rax)
xorpd  %xmm0,%xmm0
mov    %r8,%rcx
movsd  (%rcx),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rcx)
add    $0x1,%edx
mov    0x28(%rsp),%rax
lea    0x0(%r13,%rax,8),%r13
cmp    %rdx,%r15
je     1430 <m_LU+0x300>
test   %edx,%edx
je     1350 <m_LU+0x220>
lea    -0x1(%rdx),%eax
xorpd  %xmm0,%xmm0
mov    %r13,%rsi
mov    %r8,%rcx
cmp    $0x3,%eax
jb     13f1 <m_LU+0x2c1>
mov    %edx,%edi
and    $0xfffffffc,%edi
xorpd  %xmm0,%xmm0
mov    0x30(%rsp),%rax
mov    %r13,%rsi
mov    %rax,%rcx
movsd  (%rsi),%xmm1
movsd  0x8(%rsi),%xmm2
mulsd  (%rax),%xmm1
addsd  %xmm0,%xmm1
add    %rbx,%rax
mulsd  (%rcx,%rbx,1),%xmm2
addsd  %xmm1,%xmm2
movsd  0x10(%rsi),%xmm1
mulsd  (%rbx,%rax,1),%xmm1
add    %rbx,%rax
addsd  %xmm2,%xmm1
movsd  0x18(%rsi),%xmm0
add    $0x20,%rsi
mulsd  (%rbx,%rax,1),%xmm0
add    %rbx,%rax
addsd  %xmm1,%xmm0
add    %rbx,%rax
add    $0xfffffffc,%edi
jne    13a0 <m_LU+0x270>
add    %r12,%rcx
test   $0x3,%dl
je     1357 <m_LU+0x227>
mov    %edx,%eax
and    $0x3,%eax
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%rsi,%rdi,8),%xmm1
mulsd  (%rcx),%xmm1
addsd  %xmm1,%xmm0
add    $0x1,%rdi
add    %rbx,%rcx
cmp    %edi,%eax
jne    1410 <m_LU+0x2e0>
jmp    1357 <m_LU+0x227>
nopl   (%rax)
mov    %r15d,%eax
cmp    %r10d,%eax
jge    1560 <m_LU+0x430>
mov    %r15d,%r10d
and    $0x3,%r10d
mov    %r15,%rcx
and    $0xfffffffffffffffc,%rcx
mov    %rcx,0x8(%rsp)
lea    (%r11,%r15,8),%r8
mov    %eax,%edi
xorpd  %xmm0,%xmm0
mov    %r13,%rax
jmp    14a6 <m_LU+0x376>
xchg   %ax,%ax
movsd  (%rdx),%xmm2
subsd  %xmm1,%xmm2
movsd  %xmm2,(%rdx)
andpd  %xmm7,%xmm2
mov    0x20(%rsp),%rcx
mulsd  (%rcx,%rdi,8),%xmm2
ucomisd %xmm0,%xmm2
cmova  %rax,%rbp
cmova  %edi,%r14d
maxsd  %xmm0,%xmm2
add    $0x1,%rdi
mov    0x28(%rsp),%rcx
lea    (%rax,%rcx,8),%rax
movapd %xmm2,%xmm0
cmp    0x38(%rsp),%rdi
je     1560 <m_LU+0x430>
mov    %rax,%rdx
xorpd  %xmm1,%xmm1
test   %r15,%r15
je     1460 <m_LU+0x330>
xorpd  %xmm1,%xmm1
mov    %rax,%rdx
mov    %r8,%r11
cmp    $0x3,%r9
jb     1533 <m_LU+0x403>
xorpd  %xmm1,%xmm1
mov    0x8(%rsp),%rcx
mov    0x30(%rsp),%rsi
mov    %rax,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rsi,%r11
movsd  (%rdx),%xmm2
movsd  0x8(%rdx),%xmm3
mulsd  (%rsi),%xmm2
addsd  %xmm1,%xmm2
add    %rbx,%rsi
mulsd  (%r11,%rbx,1),%xmm3
addsd  %xmm2,%xmm3
movsd  0x10(%rdx),%xmm2
mulsd  (%rbx,%rsi,1),%xmm2
add    %rbx,%rsi
addsd  %xmm3,%xmm2
movsd  0x18(%rdx),%xmm1
add    $0x20,%rdx
mulsd  (%rbx,%rsi,1),%xmm1
add    %rbx,%rsi
addsd  %xmm2,%xmm1
add    %rbx,%rsi
add    $0xfffffffffffffffc,%rcx
jne    14e0 <m_LU+0x3b0>
add    %r12,%r11
test   $0x3,%r15b
je     1460 <m_LU+0x330>
mov    %r10,%rcx
movsd  (%rdx),%xmm2
mulsd  (%r11),%xmm2
add    $0x8,%rdx
addsd  %xmm2,%xmm1
add    %rbx,%r11
add    $0xffffffffffffffff,%rcx
jne    1540 <m_LU+0x410>
jmp    1460 <m_LU+0x330>
nop
lea    0x1(%r15),%rax
mov    %rax,0x8(%rsp)
cmp    0x38(%rsp),%rax
je     1736 <m_LU+0x606>
mov    %r14d,%eax
cmp    %rax,%r15
je     1604 <m_LU+0x4d4>
mov    0x60(%rsp),%rax
negl   (%rax)
mov    0x20(%rsp),%rax
movsd  (%rax,%r15,8),%xmm0
movslq %r14d,%rcx
mov    %rcx,0x68(%rsp)
movsd  %xmm0,(%rax,%rcx,8)
mov    0x50(%rsp),%rdi
mov    %r13,%rsi
mov    0x4(%rsp),%edx
call   1040 <memcpy@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
mov    0x4(%rsp),%edx
call   1040 <memcpy@plt>
mov    %rbp,%rdi
mov    0x50(%rsp),%rsi
mov    0x4(%rsp),%edx
call   1040 <memcpy@plt>
xorpd  %xmm4,%xmm4
movapd 0xa24(%rip),%xmm7
movsd  0xa2c(%rip),%xmm6
cmpq   $0x0,0x48(%rsp)
je     1604 <m_LU+0x4d4>
mov    0x48(%rsp),%rdx
mov    (%rdx,%r15,4),%eax
mov    0x68(%rsp),%rsi
mov    (%rdx,%rsi,4),%ecx
mov    %ecx,(%rdx,%r15,4)
mov    %eax,(%rdx,%rsi,4)
lea    0x0(,%r15,8),%rax
add    %r13,%rax
movsd  0x0(%r13,%r15,8),%xmm1
ucomisd %xmm4,%xmm1
jne    163b <m_LU+0x50b>
jp     163b <m_LU+0x50b>
movabs $0x2b2bff2ee48e0530,%rcx
ff 2b 2b
mov    %rcx,(%rax)
movl   $0x1,0x14(%rsp)
movsd  0x9dd(%rip),%xmm1
mov    0x1c(%rsp),%esi
movzbl %sil,%esi
and    $0x3,%esi
mov    0x8(%rsp),%rcx
cmp    0x28(%rsp),%rcx
mov    0x80(%rsp),%r10
mov    0x58(%rsp),%r11
mov    0x78(%rsp),%r8
mov    0x70(%rsp),%rdi
mov    0x18(%rsp),%r9d
jge    1310 <m_LU+0x1e0>
mov    0x44(%rsp),%edx
sub    %r15d,%edx
mov    0x40(%rsp),%ecx
sub    %r15d,%ecx
movapd %xmm6,%xmm0
divsd  %xmm1,%xmm0
test   $0x3,%dl
je     16c6 <m_LU+0x596>
lea    0x0(,%r15,8),%rax
add    %r13,%rax
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movsd  (%rax,%rbx,1),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rax,%rbx,1)
add    %rbx,%rax
add    $0x1,%edx
cmp    %edx,%esi
jne    16a0 <m_LU+0x570>
sub    %r9d,%edx
cmp    $0x3,%ecx
jb     1310 <m_LU+0x1e0>
jmp    16d4 <m_LU+0x5a4>
mov    0x8(%rsp),%rdx
cmp    $0x3,%ecx
jb     1310 <m_LU+0x1e0>
mov    %r10d,%ecx
sub    %edx,%ecx
nopl   0x0(%rax)
movsd  (%rax,%rbx,1),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rax,%rbx,1)
movsd  (%rax,%rdi,1),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rax,%rdi,1)
movsd  (%rax,%r8,1),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rax,%r8,1)
movsd  (%rax,%r12,1),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rax,%r12,1)
add    %r12,%rax
add    $0xfffffffc,%ecx
jne    16e0 <m_LU+0x5b0>
jmp    1310 <m_LU+0x1e0>
xor    %r14d,%r14d
jmp    173b <m_LU+0x60b>
mov    $0xffffffff,%r14d
jmp    1745 <m_LU+0x615>
mov    0x14(%rsp),%r14d
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    %r14d,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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