#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__ check_malloc(int);
int /*<<< orphan*/ free(double *);
int /*<<< orphan*/ gelim_double(double *, int, double *);
void lsqr(float *x, float *y, float *w, int np, float *c0, int order) {
  double *t0, *ts, *b0, *a0, sum, f;
  int i, j, k, ip;
  t0 = (double *)check_malloc(2 * order * sizeof(double));
  ts = (double *)check_malloc(order * sizeof(double));
  a0 = (double *)check_malloc(order * order * sizeof(double));
  b0 = (double *)check_malloc(order * sizeof(double));
  for (i = 0; i < order * order; i++)
    a0[i] = 0.0;
  for (i = 0; i < order; i++)
    b0[i] = 0.0;
  t0[0] = 1;
  for (ip = 0; ip < np; ip++) {
    t0[1] = x[ip];
    for (i = 2; i < 2 * order; i++)
      t0[i] = t0[i - 1] * t0[1];
    ts[0] = y[ip];
    for (i = 1; i < order; i++)
      ts[i] = t0[i] * y[ip];
    for (j = 0; j < order; j++) {
      for (i = 0; i < order; i++)
        a0[i + j * order] = a0[i + j * order] + t0[i + j] * w[ip];
      b0[j] = b0[j] + ts[j] * w[ip];
    }
  }
  gelim_double(a0, order, b0);
  for (i = 0; i < order; i++)
    c0[i] = b0[i];
  free(a0);
  free(b0);
  free(t0);
  free(ts);
}


x86 assembly (clang, -O0):
<lsqr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <check_malloc@plt>
mov    %rax,-0x38(%rbp)
movslq -0x2c(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <check_malloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x2c(%rbp),%eax
imul   -0x2c(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <check_malloc@plt>
mov    %rax,-0x50(%rbp)
movslq -0x2c(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <check_malloc@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    -0x2c(%rbp),%ecx
imul   -0x2c(%rbp),%ecx
cmp    %ecx,%eax
jge    11db <lsqr+0xab>
mov    -0x50(%rbp),%rax
movslq -0x64(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    11ab <lsqr+0x7b>
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    120c <lsqr+0xdc>
mov    -0x48(%rbp),%rax
movslq -0x64(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    11e2 <lsqr+0xb2>
mov    -0x38(%rbp),%rax
movsd  0xde8(%rip),%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    13f0 <lsqr+0x2c0>
mov    -0x8(%rbp),%rax
movslq -0x70(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movl   $0x2,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    -0x2c(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jge    1297 <lsqr+0x167>
mov    -0x38(%rbp),%rax
mov    -0x64(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1250 <lsqr+0x120>
mov    -0x10(%rbp),%rax
movslq -0x70(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x40(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1300 <lsqr+0x1d0>
mov    -0x38(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x70(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x40(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    12b7 <lsqr+0x187>
movl   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    13dd <lsqr+0x2ad>
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    138f <lsqr+0x25f>
mov    -0x50(%rbp),%rax
mov    -0x64(%rbp),%ecx
mov    -0x68(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x38(%rbp),%rax
mov    -0x64(%rbp),%ecx
add    -0x68(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x70(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x50(%rbp),%rax
mov    -0x64(%rbp),%ecx
mov    -0x68(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    131a <lsqr+0x1ea>
mov    -0x48(%rbp),%rax
movslq -0x68(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x40(%rbp),%rax
movslq -0x68(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x70(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x48(%rbp),%rax
movslq -0x68(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    1307 <lsqr+0x1d7>
jmp    13e2 <lsqr+0x2b2>
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    1223 <lsqr+0xf3>
mov    -0x50(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x48(%rbp),%rdx
call   1040 <gelim_double@plt>
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    143f <lsqr+0x30f>
mov    -0x48(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x64(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1407 <lsqr+0x2d7>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lsqr>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xe8,%rsp
mov    %r9d,%r14d
mov    %r8,0x48(%rsp)
mov    %ecx,%r12d
mov    %rdx,0x98(%rsp)
mov    %rsi,0x30(%rsp)
mov    %rdi,0xb0(%rsp)
mov    %r9d,%edi
shl    $0x4,%edi
call   1060 <check_malloc@plt>
mov    %rax,%rbx
lea    0x0(,%r14,8),%ebp
mov    %ebp,%edi
call   1060 <check_malloc@plt>
mov    %rax,%r15
mov    %r14,0x18(%rsp)
imul   %r14d,%r14d
lea    0x0(,%r14,8),%edi
call   1060 <check_malloc@plt>
mov    %rax,%r13
mov    %ebp,%edi
call   1060 <check_malloc@plt>
mov    %rax,%r11
test   %r14d,%r14d
mov    %rax,0x10(%rsp)
je     11d4 <lsqr+0x94>
mov    %r14d,%edx
shl    $0x3,%rdx
mov    %r13,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
mov    0x10(%rsp),%r11
mov    0x18(%rsp),%rsi
mov    %esi,%r14d
test   %esi,%esi
jle    11fc <lsqr+0xbc>
lea    0x0(,%r14,8),%rdx
mov    %r11,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
mov    0x10(%rsp),%r11
mov    0x18(%rsp),%rsi
movabs $0x3ff0000000000000,%rax
mov    %rax,(%rbx)
test   %r12d,%r12d
jle    1810 <lsqr+0x6d0>
lea    (%rsi,%rsi,1),%eax
cmp    $0x4,%eax
mov    $0x3,%edi
mov    %eax,0x24(%rsp)
cmovge %eax,%edi
mov    %r12d,%eax
mov    %rax,0xa8(%rsp)
lea    (%r15,%r14,8),%r8
mov    %r15,%rcx
add    $0x8,%rcx
lea    0x8(%rbx),%r12
lea    (%rbx,%r14,8),%r9
lea    -0x1(%r14),%r10
lea    -0x3(%rdi),%rbp
add    $0xfffffffffffffffc,%rdi
mov    %rdi,0x70(%rsp)
lea    -0x5(%r14),%rdi
mov    %rdi,0x68(%rsp)
shr    $0x2,%rdi
add    $0x1,%rdi
mov    %r14d,%eax
and    $0xfffffffc,%eax
mov    %rax,0xd0(%rsp)
add    $0xfffffffffffffffc,%rax
mov    %rax,0xc8(%rsp)
mov    %rax,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %ebp,%eax
and    $0x3,%eax
mov    %rax,0x78(%rsp)
cmp    %r9,%rcx
setb   %cl
mov    %r12,0x90(%rsp)
cmp    %r8,%r12
setb   %al
and    %cl,%al
mov    %al,0xf(%rsp)
mov    %r10,0x28(%rsp)
and    $0xfffffffffffffffc,%r10
mov    %rdi,%rax
mov    %rdi,0x60(%rsp)
and    $0xfffffffffffffffe,%rdi
mov    %rdi,0x40(%rsp)
mov    %rdx,%rax
mov    %rdx,0xc0(%rsp)
and    $0xfffffffffffffffe,%rdx
mov    %rdx,0xb8(%rsp)
mov    %r14,%rax
neg    %rax
mov    %rax,0xd8(%rsp)
and    $0xfffffffffffffffc,%rbp
neg    %rbp
movslq %esi,%rax
mov    %r10,0x58(%rsp)
lea    0x1(%r10),%rcx
mov    %rcx,0x50(%rsp)
lea    0x30(%r13),%rcx
mov    %rcx,0x88(%rsp)
mov    %rax,0xe0(%rsp)
lea    0x0(,%rax,8),%rdx
lea    0x30(%rbx),%rax
mov    %rax,0x80(%rsp)
xor    %r8d,%r8d
mov    %rbp,0xa0(%rsp)
jmp    135f <lsqr+0x21f>
nopl   0x0(%rax)
mov    0x38(%rsp),%r8
add    $0x1,%r8
cmp    0xa8(%rsp),%r8
mov    0xa0(%rsp),%rbp
je     1810 <lsqr+0x6d0>
mov    0xb0(%rsp),%rax
movss  (%rax,%r8,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x8(%rbx)
cmp    $0x2,%esi
jl     1460 <lsqr+0x320>
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rbx)
cmpl   $0x4,0x24(%rsp)
mov    0x78(%rsp),%rdi
jl     1413 <lsqr+0x2d3>
mov    $0x3,%ecx
cmpq   $0x3,0x70(%rsp)
jb     13f0 <lsqr+0x2b0>
mov    $0x3,%ecx
cs nopw 0x0(%rax,%rax,1)
mulsd  0x8(%rbx),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
movsd  0x8(%rbx),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rbx,%rcx,8)
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rbx,%rcx,8)
mulsd  0x8(%rbx),%xmm0
movsd  %xmm0,0x18(%rbx,%rcx,8)
lea    (%rcx,%rbp,1),%rax
add    $0x4,%rax
add    $0x4,%rcx
cmp    $0x3,%rax
jne    13b0 <lsqr+0x270>
test   %rdi,%rdi
je     1413 <lsqr+0x2d3>
lea    (%rbx,%rcx,8),%rax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mulsd  0x8(%rbx),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rdi
jne    1400 <lsqr+0x2c0>
mov    0x30(%rsp),%rax
movss  (%rax,%r8,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,(%r15)
cmp    $0x2,%esi
jl     1474 <lsqr+0x334>
cmpq   $0x4,0x28(%rsp)
setb   %al
or     0xf(%rsp),%al
mov    $0x1,%ecx
jne    1772 <lsqr+0x632>
movaps %xmm0,%xmm1
movlhps %xmm0,%xmm1
cmpq   $0x4,0x68(%rsp)
jae    16d7 <lsqr+0x597>
xor    %ecx,%ecx
jmp    172e <lsqr+0x5ee>
nopl   (%rax)
mov    0x30(%rsp),%rax
movss  (%rax,%r8,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,(%r15)
mov    %r8,0x38(%rsp)
test   %esi,%esi
jle    1340 <lsqr+0x200>
mov    0x98(%rsp),%rax
mov    0x38(%rsp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movaps %xmm0,%xmm1
movlhps %xmm0,%xmm1
mov    %r13,%r12
mov    0x90(%rsp),%r8
mov    0x80(%rsp),%r10
mov    0x88(%rsp),%r9
xor    %ecx,%ecx
jmp    14f1 <lsqr+0x3b1>
nopl   0x0(%rax)
movsd  (%r15,%rcx,8),%xmm2
mulsd  %xmm0,%xmm2
addsd  (%r11,%rcx,8),%xmm2
movsd  %xmm2,(%r11,%rcx,8)
add    $0x1,%rcx
add    %rdx,%r9
add    $0x8,%r10
add    $0x8,%r8
add    %rdx,%r12
cmp    %r14,%rcx
je     1340 <lsqr+0x200>
mov    %rcx,%rdi
imul   0xe0(%rsp),%rdi
cmp    $0x4,%esi
jb     153a <lsqr+0x3fa>
lea    (%rcx,%r14,1),%rax
lea    (%rbx,%rax,8),%rax
lea    0x0(,%rdi,8),%rbp
add    %r13,%rbp
cmp    %rax,%rbp
jae    15c0 <lsqr+0x480>
lea    (%rbx,%rcx,8),%rax
lea    (%rdi,%r14,1),%rbp
lea    0x0(,%rbp,8),%rbp
add    %r13,%rbp
cmp    %rbp,%rax
jae    15c0 <lsqr+0x480>
xor    %ebp,%ebp
mov    %rbp,%rax
test   $0x1,%r14b
je     156a <lsqr+0x42a>
add    %rbp,%rdi
lea    (%rcx,%rbp,1),%rax
movsd  (%rbx,%rax,8),%xmm2
mulsd  %xmm0,%xmm2
addsd  0x0(%r13,%rdi,8),%xmm2
movsd  %xmm2,0x0(%r13,%rdi,8)
mov    %rbp,%rax
or     $0x1,%rax
not    %rbp
cmp    0xd8(%rsp),%rbp
je     14c0 <lsqr+0x380>
nopl   0x0(%rax,%rax,1)
movsd  -0x8(%r8,%rax,8),%xmm2
mulsd  %xmm0,%xmm2
addsd  (%r12,%rax,8),%xmm2
movsd  %xmm2,(%r12,%rax,8)
movsd  (%r8,%rax,8),%xmm2
mulsd  %xmm0,%xmm2
addsd  0x8(%r12,%rax,8),%xmm2
movsd  %xmm2,0x8(%r12,%rax,8)
add    $0x2,%rax
cmp    %rax,%r14
jne    1580 <lsqr+0x440>
jmp    14c0 <lsqr+0x380>
nopl   (%rax)
cmpq   $0x0,0xc8(%rsp)
je     16c8 <lsqr+0x588>
mov    0xb8(%rsp),%rax
xor    %r11d,%r11d
nopw   0x0(%rax,%rax,1)
movupd -0x30(%r10,%r11,8),%xmm2
movupd -0x20(%r10,%r11,8),%xmm3
mulpd  %xmm1,%xmm2
movupd -0x30(%r9,%r11,8),%xmm4
addpd  %xmm2,%xmm4
movupd -0x20(%r9,%r11,8),%xmm2
movupd -0x10(%r9,%r11,8),%xmm5
movupd (%r9,%r11,8),%xmm6
mulpd  %xmm1,%xmm3
addpd  %xmm2,%xmm3
movupd %xmm4,-0x30(%r9,%r11,8)
movupd %xmm3,-0x20(%r9,%r11,8)
movupd -0x10(%r10,%r11,8),%xmm2
movupd (%r10,%r11,8),%xmm3
mulpd  %xmm1,%xmm2
addpd  %xmm5,%xmm2
mulpd  %xmm1,%xmm3
addpd  %xmm6,%xmm3
movupd %xmm2,-0x10(%r9,%r11,8)
movupd %xmm3,(%r9,%r11,8)
add    $0x8,%r11
add    $0xfffffffffffffffe,%rax
jne    15e0 <lsqr+0x4a0>
testb  $0x1,0xc0(%rsp)
01
je     16a5 <lsqr+0x565>
lea    (%r11,%rdi,1),%rax
movupd 0x0(%r13,%rax,8),%xmm2
movupd 0x10(%r13,%rax,8),%xmm3
add    %rcx,%r11
movupd (%rbx,%r11,8),%xmm4
movupd 0x10(%rbx,%r11,8),%xmm5
mulpd  %xmm1,%xmm4
addpd  %xmm2,%xmm4
mulpd  %xmm1,%xmm5
addpd  %xmm3,%xmm5
movupd %xmm4,0x0(%r13,%rax,8)
movupd %xmm5,0x10(%r13,%rax,8)
mov    0xd0(%rsp),%rax
mov    %rax,%rbp
cmp    %r14,%rax
mov    0x18(%rsp),%rsi
mov    0x10(%rsp),%r11
je     14c0 <lsqr+0x380>
jmp    153c <lsqr+0x3fc>
xor    %r11d,%r11d
testb  $0x1,0xc0(%rsp)
01
jne    1665 <lsqr+0x525>
jmp    16a5 <lsqr+0x565>
mov    0x40(%rsp),%rax
xor    %ecx,%ecx
xchg   %ax,%ax
movupd 0x8(%rbx,%rcx,8),%xmm2
movupd 0x18(%rbx,%rcx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,0x8(%r15,%rcx,8)
movupd %xmm3,0x18(%r15,%rcx,8)
movupd 0x28(%rbx,%rcx,8),%xmm2
movupd 0x38(%rbx,%rcx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,0x28(%r15,%rcx,8)
movupd %xmm3,0x38(%r15,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rax
jne    16e0 <lsqr+0x5a0>
testb  $0x1,0x60(%rsp)
je     175d <lsqr+0x61d>
shl    $0x3,%rcx
or     $0x8,%rcx
movupd (%rbx,%rcx,1),%xmm2
movupd 0x10(%rbx,%rcx,1),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,(%r15,%rcx,1)
movupd %xmm3,0x10(%r15,%rcx,1)
mov    0x50(%rsp),%rcx
mov    0x58(%rsp),%rax
cmp    %rax,0x28(%rsp)
je     1474 <lsqr+0x334>
mov    %r14d,%edi
sub    %ecx,%edi
mov    %rcx,%rax
not    %rax
add    %r14,%rax
and    $0x3,%rdi
je     17a9 <lsqr+0x669>
cs nopw 0x0(%rax,%rax,1)
movsd  (%rbx,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%r15,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rdi
jne    1790 <lsqr+0x650>
cmp    $0x3,%rax
jb     1474 <lsqr+0x334>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rbx,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%r15,%rcx,8)
movsd  0x8(%rbx,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%r15,%rcx,8)
movsd  0x10(%rbx,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%r15,%rcx,8)
movsd  0x18(%rbx,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%r15,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%r14
jne    17c0 <lsqr+0x680>
jmp    1474 <lsqr+0x334>
mov    %r13,%rdi
mov    %r11,%rdx
call   1040 <gelim_double@plt>
mov    0x10(%rsp),%rbp
mov    0x18(%rsp),%rax
test   %eax,%eax
mov    0x48(%rsp),%rdi
jle    18f8 <lsqr+0x7b8>
cmp    $0x4,%eax
jae    183e <lsqr+0x6fe>
xor    %eax,%eax
jmp    18e0 <lsqr+0x7a0>
mov    %r14d,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rdx
mov    %rdx,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
test   %rdx,%rdx
je     1929 <lsqr+0x7e9>
mov    %rcx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
movupd 0x0(%rbp,%rdx,8),%xmm0
movupd 0x10(%rbp,%rdx,8),%xmm1
cvtpd2ps %xmm0,%xmm0
cvtpd2ps %xmm1,%xmm1
unpcklpd %xmm1,%xmm0
movupd %xmm0,(%rdi,%rdx,4)
movupd 0x20(%rbp,%rdx,8),%xmm0
movupd 0x30(%rbp,%rdx,8),%xmm1
cvtpd2ps %xmm0,%xmm0
cvtpd2ps %xmm1,%xmm1
unpcklpd %xmm1,%xmm0
movupd %xmm0,0x10(%rdi,%rdx,4)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rsi
jne    1870 <lsqr+0x730>
test   $0x1,%cl
je     18d7 <lsqr+0x797>
movupd 0x0(%rbp,%rdx,8),%xmm0
movupd 0x10(%rbp,%rdx,8),%xmm1
cvtpd2ps %xmm0,%xmm0
cvtpd2ps %xmm1,%xmm1
unpcklpd %xmm1,%xmm0
movupd %xmm0,(%rdi,%rdx,4)
cmp    %r14,%rax
je     18f8 <lsqr+0x7b8>
nopl   0x0(%rax)
movsd  0x0(%rbp,%rax,8),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rdi,%rax,4)
add    $0x1,%rax
cmp    %rax,%r14
jne    18e0 <lsqr+0x7a0>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
add    $0xe8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>
xor    %edx,%edx
test   $0x1,%cl
jne    18ba <lsqr+0x77a>
jmp    18d7 <lsqr+0x797>

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

LLVM IR (-O2):
define void @lsqr(float* nocapture %0, float* nocapture %1, float* nocapture %2, i32 %3, float* nocapture writeonly %4, i32 %5) {
%7 = shl i32 %5, 1
%8 = shl i32 %5, 4
%9 = tail call i64 @check_malloc(i32 %8)
%10 = inttoptr i64 %9 to double*
%11 = shl i32 %5, 3
%12 = tail call i64 @check_malloc(i32 %11)
%13 = inttoptr i64 %12 to double*
%14 = mul nsw i32 %5, %5
%15 = shl i32 %14, 3
%16 = tail call i64 @check_malloc(i32 %15)
%17 = inttoptr i64 %16 to double*
%18 = tail call i64 @check_malloc(i32 %11)
%19 = inttoptr i64 %18 to double*
%20 = inttoptr i64 %18 to i8*
%21 = icmp eq i32 %14, 0
br i1 %21, label %26, label %22
22: ; preds = %6
%23 = inttoptr i64 %16 to i8*
%24 = zext i32 %14 to i64
%25 = shl nuw nsw i64 %24, 3
br label %26
26: ; preds = %22, %6
%27 = icmp sgt i32 %5, 0
br i1 %27, label %28, label %31
28: ; preds = %26
%29 = zext i32 %5 to i64
%30 = shl nuw nsw i64 %29, 3
br label %31
31: ; preds = %28, %26
store double 1.000000e+00, double* %10
%32 = icmp sgt i32 %3, 0
br i1 %32, label %33, label %366
33: ; preds = %31
%34 = getelementptr inbounds double, double* %10, i64 1
%35 = icmp sgt i32 %5, 1
%36 = call i32 @llvm.smax.i32(i32 %7, i32 3)
%37 = sext i32 %5 to i64
%38 = zext i32 %3 to i64
%39 = zext i32 %36 to i64
%40 = zext i32 %5 to i64
%41 = zext i32 %5 to i64
%42 = getelementptr double, double* %13, i64 1
%43 = getelementptr double, double* %13, i64 %40
%44 = getelementptr double, double* %10, i64 1
%45 = getelementptr double, double* %10, i64 %40
%46 = add nsw i64 %40, -1
%47 = add nsw i64 %39, -3
%48 = add nsw i64 %39, -4
%49 = add nsw i64 %40, -5
%50 = lshr i64 %49, 2
%51 = add nuw nsw i64 %50, 1
%52 = and i64 %40, 4294967292
%53 = add nsw i64 %52, -4
%54 = lshr exact i64 %53, 2
%55 = add nuw nsw i64 %54, 1
%56 = getelementptr inbounds double, double* %10, i64 2
%57 = icmp slt i32 %7, 4
%58 = and i64 %47, 3
%59 = icmp ult i64 %48, 3
%60 = and i64 %47, -4
%61 = icmp eq i64 %58, 0
%62 = icmp ult i64 %46, 4
%63 = icmp ult double* %42, %45
%64 = icmp ult double* %44, %43
%65 = and i1 %63, %64
%66 = and i64 %46, -4
%67 = or i64 %66, 1
%68 = and i64 %51, 1
%69 = icmp ult i64 %49, 4
%70 = and i64 %51, 9223372036854775806
%71 = icmp eq i64 %68, 0
%72 = icmp eq i64 %46, %66
%73 = icmp ult i32 %5, 4
%74 = and i64 %40, 4294967292
%75 = and i64 %55, 1
%76 = icmp eq i64 %53, 0
%77 = and i64 %55, 9223372036854775806
%78 = icmp eq i64 %75, 0
%79 = icmp eq i64 %74, %40
%80 = and i64 %40, 1
%81 = icmp eq i64 %80, 0
%82 = sub nsw i64 0, %40
br label %83
83: ; preds = %33, %363
%84 = phi i64 [ 0, %33 ], [ %364, %363 ]
%85 = getelementptr inbounds float, float* %0, i64 %84
%86 = load float, float* %85
%87 = fpext float %86 to double
store double %87, double* %34
br i1 %35, label %88, label %91
88: ; preds = %83
%89 = fmul double %87, %87
store double %89, double* %56
br i1 %57, label %129, label %90
90: ; preds = %88
br i1 %59, label %116, label %95
91: ; preds = %83
%92 = getelementptr inbounds float, float* %1, i64 %84
%93 = load float, float* %92
%94 = fpext float %93 to double
store double %94, double* %13
br label %209
95: ; preds = %90, %95
%96 = phi i64 [ %113, %95 ], [ 3, %90 ]
%97 = phi double [ %111, %95 ], [ %89, %90 ]
%98 = phi i64 [ %114, %95 ], [ 0, %90 ]
%99 = load double, double* %34
%100 = fmul double %97, %99
%101 = getelementptr inbounds double, double* %10, i64 %96
store double %100, double* %101
%102 = add nuw nsw i64 %96, 1
%103 = load double, double* %34
%104 = fmul double %100, %103
%105 = getelementptr inbounds double, double* %10, i64 %102
store double %104, double* %105
%106 = add nuw nsw i64 %96, 2
%107 = fmul double %104, %103
%108 = getelementptr inbounds double, double* %10, i64 %106
store double %107, double* %108
%109 = add nuw nsw i64 %96, 3
%110 = load double, double* %34
%111 = fmul double %107, %110
%112 = getelementptr inbounds double, double* %10, i64 %109
store double %111, double* %112
%113 = add nuw nsw i64 %96, 4
%114 = add i64 %98, 4
%115 = icmp eq i64 %114, %60
br i1 %115, label %116, label %95
116: ; preds = %95, %90
%117 = phi i64 [ 3, %90 ], [ %113, %95 ]
%118 = phi double [ %89, %90 ], [ %111, %95 ]
br i1 %61, label %129, label %119
119: ; preds = %116, %119
%120 = phi i64 [ %126, %119 ], [ %117, %116 ]
%121 = phi double [ %124, %119 ], [ %118, %116 ]
%122 = phi i64 [ %127, %119 ], [ 0, %116 ]
%123 = load double, double* %34
%124 = fmul double %121, %123
%125 = getelementptr inbounds double, double* %10, i64 %120
store double %124, double* %125
%126 = add nuw nsw i64 %120, 1
%127 = add i64 %122, 1
%128 = icmp eq i64 %127, %58
br i1 %128, label %129, label %119
129: ; preds = %116, %119, %88
%130 = getelementptr inbounds float, float* %1, i64 %84
%131 = load float, float* %130
%132 = fpext float %131 to double
store double %132, double* %13
br i1 %35, label %133, label %209
133: ; preds = %129
%134 = select i1 %62, i1 true, i1 %65
br i1 %134, label %189, label %135
135: ; preds = %133
%136 = insertelement <2 x double> poison, double %132, i64 0
%137 = shufflevector <2 x double> %136, <2 x double> poison, <2 x i32> zeroinitializer
%138 = insertelement <2 x double> poison, double %132, i64 0
%139 = shufflevector <2 x double> %138, <2 x double> poison, <2 x i32> zeroinitializer
br i1 %69, label %172, label %140
140: ; preds = %135, %140
%141 = phi i64 [ %169, %140 ], [ 0, %135 ]
%142 = phi i64 [ %170, %140 ], [ 0, %135 ]
%143 = or i64 %141, 1
%144 = getelementptr inbounds double, double* %10, i64 %143
%145 = bitcast double* %144 to <2 x double>*
%146 = load <2 x double>, <2 x double>* %145
%147 = getelementptr inbounds double, double* %144, i64 2
%148 = bitcast double* %147 to <2 x double>*
%149 = load <2 x double>, <2 x double>* %148
%150 = fmul <2 x double> %146, %137
%151 = fmul <2 x double> %149, %139
%152 = getelementptr inbounds double, double* %13, i64 %143
%153 = bitcast double* %152 to <2 x double>*
store <2 x double> %150, <2 x double>* %153
%154 = getelementptr inbounds double, double* %152, i64 2
%155 = bitcast double* %154 to <2 x double>*
store <2 x double> %151, <2 x double>* %155
%156 = or i64 %141, 5
%157 = getelementptr inbounds double, double* %10, i64 %156
%158 = bitcast double* %157 to <2 x double>*
%159 = load <2 x double>, <2 x double>* %158
%160 = getelementptr inbounds double, double* %157, i64 2
%161 = bitcast double* %160 to <2 x double>*
%162 = load <2 x double>, <2 x double>* %161
%163 = fmul <2 x double> %159, %137
%164 = fmul <2 x double> %162, %139
%165 = getelementptr inbounds double, double* %13, i64 %156
%166 = bitcast double* %165 to <2 x double>*
store <2 x double> %163, <2 x double>* %166
%167 = getelementptr inbounds double, double* %165, i64 2
%168 = bitcast double* %167 to <2 x double>*
store <2 x double> %164, <2 x double>* %168
%169 = add nuw i64 %141, 8
%170 = add i64 %142, 2
%171 = icmp eq i64 %170, %70
br i1 %171, label %172, label %140
172: ; preds = %140, %135
%173 = phi i64 [ 0, %135 ], [ %169, %140 ]
br i1 %71, label %188, label %174
174: ; preds = %172
%175 = or i64 %173, 1
%176 = getelementptr inbounds double, double* %10, i64 %175
%177 = bitcast double* %176 to <2 x double>*
%178 = load <2 x double>, <2 x double>* %177
%179 = getelementptr inbounds double, double* %176, i64 2
%180 = bitcast double* %179 to <2 x double>*
%181 = load <2 x double>, <2 x double>* %180
%182 = fmul <2 x double> %178, %137
%183 = fmul <2 x double> %181, %139
%184 = getelementptr inbounds double, double* %13, i64 %175
%185 = bitcast double* %184 to <2 x double>*
store <2 x double> %182, <2 x double>* %185
%186 = getelementptr inbounds double, double* %184, i64 2
%187 = bitcast double* %186 to <2 x double>*
store <2 x double> %183, <2 x double>* %187
br label %188
188: ; preds = %172, %174
br i1 %72, label %209, label %189
189: ; preds = %133, %188
%190 = phi i64 [ 1, %133 ], [ %67, %188 ]
%191 = sub nsw i64 %40, %190
%192 = xor i64 %190, -1
%193 = add nsw i64 %192, %40
%194 = and i64 %191, 3
%195 = icmp eq i64 %194, 0
br i1 %195, label %206, label %196
196: ; preds = %189, %196
%197 = phi i64 [ %203, %196 ], [ %190, %189 ]
%198 = phi i64 [ %204, %196 ], [ 0, %189 ]
%199 = getelementptr inbounds double, double* %10, i64 %197
%200 = load double, double* %199
%201 = fmul double %200, %132
%202 = getelementptr inbounds double, double* %13, i64 %197
store double %201, double* %202
%203 = add nuw nsw i64 %197, 1
%204 = add i64 %198, 1
%205 = icmp eq i64 %204, %194
br i1 %205, label %206, label %196
206: ; preds = %196, %189
%207 = phi i64 [ %190, %189 ], [ %203, %196 ]
%208 = icmp ult i64 %193, 3
br i1 %208, label %209, label %218
209: ; preds = %206, %218, %188, %91, %129
br i1 %27, label %210, label %363
210: ; preds = %209
%211 = getelementptr inbounds float, float* %2, i64 %84
%212 = load float, float* %211
%213 = fpext float %212 to double
%214 = insertelement <2 x double> poison, double %213, i64 0
%215 = shufflevector <2 x double> %214, <2 x double> poison, <2 x i32> zeroinitializer
%216 = insertelement <2 x double> poison, double %213, i64 0
%217 = shufflevector <2 x double> %216, <2 x double> poison, <2 x i32> zeroinitializer
br label %241
218: ; preds = %206, %218
%219 = phi i64 [ %239, %218 ], [ %207, %206 ]
%220 = getelementptr inbounds double, double* %10, i64 %219
%221 = load double, double* %220
%222 = fmul double %221, %132
%223 = getelementptr inbounds double, double* %13, i64 %219
store double %222, double* %223
%224 = add nuw nsw i64 %219, 1
%225 = getelementptr inbounds double, double* %10, i64 %224
%226 = load double, double* %225
%227 = fmul double %226, %132
%228 = getelementptr inbounds double, double* %13, i64 %224
store double %227, double* %228
%229 = add nuw nsw i64 %219, 2
%230 = getelementptr inbounds double, double* %10, i64 %229
%231 = load double, double* %230
%232 = fmul double %231, %132
%233 = getelementptr inbounds double, double* %13, i64 %229
store double %232, double* %233
%234 = add nuw nsw i64 %219, 3
%235 = getelementptr inbounds double, double* %10, i64 %234
%236 = load double, double* %235
%237 = fmul double %236, %132
%238 = getelementptr inbounds double, double* %13, i64 %234
store double %237, double* %238
%239 = add nuw nsw i64 %219, 4
%240 = icmp eq i64 %239, %40
br i1 %240, label %209, label %218
241: ; preds = %355, %210
%242 = phi i64 [ 0, %210 ], [ %361, %355 ]
%243 = mul i64 %242, %37
%244 = mul nsw i64 %242, %37
br i1 %73, label %321, label %245
245: ; preds = %241
%246 = add nuw i64 %242, %40
%247 = getelementptr double, double* %10, i64 %246
%248 = getelementptr double, double* %10, i64 %242
%249 = add i64 %243, %40
%250 = getelementptr double, double* %17, i64 %249
%251 = getelementptr double, double* %17, i64 %243
%252 = icmp ult double* %251, %247
%253 = icmp ult double* %248, %250
%254 = and i1 %252, %253
br i1 %254, label %321, label %255
255: ; preds = %245
br i1 %76, label %299, label %256
256: ; preds = %255, %256
%257 = phi i64 [ %296, %256 ], [ 0, %255 ]
%258 = phi i64 [ %297, %256 ], [ 0, %255 ]
%259 = add nsw i64 %257, %244
%260 = getelementptr inbounds double, double* %17, i64 %259
%261 = bitcast double* %260 to <2 x double>*
%262 = load <2 x double>, <2 x double>* %261
%263 = getelementptr inbounds double, double* %260, i64 2
%264 = bitcast double* %263 to <2 x double>*
%265 = load <2 x double>, <2 x double>* %264
%266 = add nuw nsw i64 %257, %242
%267 = getelementptr inbounds double, double* %10, i64 %266
%268 = bitcast double* %267 to <2 x double>*
%269 = load <2 x double>, <2 x double>* %268
%270 = getelementptr inbounds double, double* %267, i64 2
%271 = bitcast double* %270 to <2 x double>*
%272 = load <2 x double>, <2 x double>* %271
%273 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %269, <2 x double> %215, <2 x double> %262)
%274 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %272, <2 x double> %217, <2 x double> %265)
%275 = bitcast double* %260 to <2 x double>*
store <2 x double> %273, <2 x double>* %275
%276 = bitcast double* %263 to <2 x double>*
store <2 x double> %274, <2 x double>* %276
%277 = or i64 %257, 4
%278 = add nsw i64 %277, %244
%279 = getelementptr inbounds double, double* %17, i64 %278
%280 = bitcast double* %279 to <2 x double>*
%281 = load <2 x double>, <2 x double>* %280
%282 = getelementptr inbounds double, double* %279, i64 2
%283 = bitcast double* %282 to <2 x double>*
%284 = load <2 x double>, <2 x double>* %283
%285 = add nuw nsw i64 %277, %242
%286 = getelementptr inbounds double, double* %10, i64 %285
%287 = bitcast double* %286 to <2 x double>*
%288 = load <2 x double>, <2 x double>* %287
%289 = getelementptr inbounds double, double* %286, i64 2
%290 = bitcast double* %289 to <2 x double>*
%291 = load <2 x double>, <2 x double>* %290
%292 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %288, <2 x double> %215, <2 x double> %281)
%293 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %291, <2 x double> %217, <2 x double> %284)
%294 = bitcast double* %279 to <2 x double>*
store <2 x double> %292, <2 x double>* %294
%295 = bitcast double* %282 to <2 x double>*
store <2 x double> %293, <2 x double>* %295
%296 = add nuw i64 %257, 8
%297 = add i64 %258, 2
%298 = icmp eq i64 %297, %77
br i1 %298, label %299, label %256
299: ; preds = %256, %255
%300 = phi i64 [ 0, %255 ], [ %296, %256 ]
br i1 %78, label %320, label %301
301: ; preds = %299
%302 = add nsw i64 %300, %244
%303 = getelementptr inbounds double, double* %17, i64 %302
%304 = bitcast double* %303 to <2 x double>*
%305 = load <2 x double>, <2 x double>* %304
%306 = getelementptr inbounds double, double* %303, i64 2
%307 = bitcast double* %306 to <2 x double>*
%308 = load <2 x double>, <2 x double>* %307
%309 = add nuw nsw i64 %300, %242
%310 = getelementptr inbounds double, double* %10, i64 %309
%311 = bitcast double* %310 to <2 x double>*
%312 = load <2 x double>, <2 x double>* %311
%313 = getelementptr inbounds double, double* %310, i64 2
%314 = bitcast double* %313 to <2 x double>*
%315 = load <2 x double>, <2 x double>* %314
%316 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %312, <2 x double> %215, <2 x double> %305)
%317 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %315, <2 x double> %217, <2 x double> %308)
%318 = bitcast double* %303 to <2 x double>*
store <2 x double> %316, <2 x double>* %318
%319 = bitcast double* %306 to <2 x double>*
store <2 x double> %317, <2 x double>* %319
br label %320
320: ; preds = %299, %301
br i1 %79, label %355, label %321
321: ; preds = %245, %241, %320
%322 = phi i64 [ 0, %245 ], [ 0, %241 ], [ %74, %320 ]
%323 = xor i64 %322, -1
br i1 %81, label %333, label %324
324: ; preds = %321
%325 = add nsw i64 %322, %244
%326 = getelementptr inbounds double, double* %17, i64 %325
%327 = load double, double* %326
%328 = add nuw nsw i64 %322, %242
%329 = getelementptr inbounds double, double* %10, i64 %328
%330 = load double, double* %329
%331 = tail call double @llvm.fmuladd.f64(double %330, double %213, double %327)
store double %331, double* %326
%332 = or i64 %322, 1
br label %333
333: ; preds = %324, %321
%334 = phi i64 [ %322, %321 ], [ %332, %324 ]
%335 = icmp eq i64 %323, %82
br i1 %335, label %355, label %336
336: ; preds = %333, %336
%337 = phi i64 [ %353, %336 ], [ %334, %333 ]
%338 = add nsw i64 %337, %244
%339 = getelementptr inbounds double, double* %17, i64 %338
%340 = load double, double* %339
%341 = add nuw nsw i64 %337, %242
%342 = getelementptr inbounds double, double* %10, i64 %341
%343 = load double, double* %342
%344 = tail call double @llvm.fmuladd.f64(double %343, double %213, double %340)
store double %344, double* %339
%345 = add nuw nsw i64 %337, 1
%346 = add nsw i64 %345, %244
%347 = getelementptr inbounds double, double* %17, i64 %346
%348 = load double, double* %347
%349 = add nuw nsw i64 %345, %242
%350 = getelementptr inbounds double, double* %10, i64 %349
%351 = load double, double* %350
%352 = tail call double @llvm.fmuladd.f64(double %351, double %213, double %348)
store double %352, double* %347
%353 = add nuw nsw i64 %337, 2
%354 = icmp eq i64 %353, %41
br i1 %354, label %355, label %336
355: ; preds = %333, %336, %320
%356 = getelementptr inbounds double, double* %19, i64 %242
%357 = load double, double* %356
%358 = getelementptr inbounds double, double* %13, i64 %242
%359 = load double, double* %358
%360 = tail call double @llvm.fmuladd.f64(double %359, double %213, double %357)
store double %360, double* %356
%361 = add nuw nsw i64 %242, 1
%362 = icmp eq i64 %361, %41
br i1 %362, label %363, label %241
363: ; preds = %355, %209
%364 = add nuw nsw i64 %84, 1
%365 = icmp eq i64 %364, %38
br i1 %365, label %366, label %83
366: ; preds = %363, %31
%367 = tail call i32 @gelim_double(double* %17, i32 %5, double* %19)
br i1 %27, label %368, label %439
368: ; preds = %366
%369 = zext i32 %5 to i64
%370 = icmp ult i32 %5, 4
br i1 %370, label %429, label %371
371: ; preds = %368
%372 = and i64 %369, 4294967292
%373 = add nsw i64 %372, -4
%374 = lshr exact i64 %373, 2
%375 = add nuw nsw i64 %374, 1
%376 = and i64 %375, 1
%377 = icmp eq i64 %373, 0
br i1 %377, label %411, label %378
378: ; preds = %371
%379 = and i64 %375, 9223372036854775806
br label %380
380: ; preds = %380, %378
%381 = phi i64 [ 0, %378 ], [ %408, %380 ]
%382 = phi i64 [ 0, %378 ], [ %409, %380 ]
%383 = getelementptr inbounds double, double* %19, i64 %381
%384 = bitcast double* %383 to <2 x double>*
%385 = load <2 x double>, <2 x double>* %384
%386 = getelementptr inbounds double, double* %383, i64 2
%387 = bitcast double* %386 to <2 x double>*
%388 = load <2 x double>, <2 x double>* %387
%389 = fptrunc <2 x double> %385 to <2 x float>
%390 = fptrunc <2 x double> %388 to <2 x float>
%391 = getelementptr inbounds float, float* %4, i64 %381
%392 = bitcast float* %391 to <2 x float>*
store <2 x float> %389, <2 x float>* %392
%393 = getelementptr inbounds float, float* %391, i64 2
%394 = bitcast float* %393 to <2 x float>*
store <2 x float> %390, <2 x float>* %394
%395 = or i64 %381, 4
%396 = getelementptr inbounds double, double* %19, i64 %395
%397 = bitcast double* %396 to <2 x double>*
%398 = load <2 x double>, <2 x double>* %397
%399 = getelementptr inbounds double, double* %396, i64 2
%400 = bitcast double* %399 to <2 x double>*
%401 = load <2 x double>, <2 x double>* %400
%402 = fptrunc <2 x double> %398 to <2 x float>
%403 = fptrunc <2 x double> %401 to <2 x float>
%404 = getelementptr inbounds float, float* %4, i64 %395
%405 = bitcast float* %404 to <2 x float>*
store <2 x float> %402, <2 x float>* %405
%406 = getelementptr inbounds float, float* %404, i64 2
%407 = bitcast float* %406 to <2 x float>*
store <2 x float> %403, <2 x float>* %407
%408 = add nuw i64 %381, 8
%409 = add i64 %382, 2
%410 = icmp eq i64 %409, %379
br i1 %410, label %411, label %380
411: ; preds = %380, %371
%412 = phi i64 [ 0, %371 ], [ %408, %380 ]
%413 = icmp eq i64 %376, 0
br i1 %413, label %427, label %414
414: ; preds = %411
%415 = getelementptr inbounds double, double* %19, i64 %412
%416 = bitcast double* %415 to <2 x double>*
%417 = load <2 x double>, <2 x double>* %416
%418 = getelementptr inbounds double, double* %415, i64 2
%419 = bitcast double* %418 to <2 x double>*
%420 = load <2 x double>, <2 x double>* %419
%421 = fptrunc <2 x double> %417 to <2 x float>
%422 = fptrunc <2 x double> %420 to <2 x float>
%423 = getelementptr inbounds float, float* %4, i64 %412
%424 = bitcast float* %423 to <2 x float>*
store <2 x float> %421, <2 x float>* %424
%425 = getelementptr inbounds float, float* %423, i64 2
%426 = bitcast float* %425 to <2 x float>*
store <2 x float> %422, <2 x float>* %426
br label %427
427: ; preds = %411, %414
%428 = icmp eq i64 %372, %369
br i1 %428, label %439, label %429
429: ; preds = %368, %427
%430 = phi i64 [ 0, %368 ], [ %372, %427 ]
br label %431
431: ; preds = %429, %431
%432 = phi i64 [ %437, %431 ], [ %430, %429 ]
%433 = getelementptr inbounds double, double* %19, i64 %432
%434 = load double, double* %433
%435 = fptrunc double %434 to float
%436 = getelementptr inbounds float, float* %4, i64 %432
store float %435, float* %436
%437 = add nuw nsw i64 %432, 1
%438 = icmp eq i64 %437, %369
br i1 %438, label %439, label %431
439: ; preds = %431, %427, %366
%440 = tail call i32 @free(double* %17)
%441 = tail call i32 @free(double* %19)
%442 = tail call i32 @free(double* %10)
%443 = tail call i32 @free(double* %13)
ret void
}