#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 */
int /*<<< orphan*/ dgesv_(int *, int *, double *, int *, int *, double *, int *,
                          int *);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
void solve(double *A, double *B, int nA, int nRHS) {
  int N = nA;
  int NRHS = nRHS;
  int LDA = nA;
  int *IPIV = (int *)malloc(sizeof(int) * nA);
  int LDB = nA;
  int INFO;
  double *AT = (double *)malloc(sizeof(double) * nA * nA);
  double *BT = (double *)malloc(sizeof(double) * nA * nRHS);
  int i, j;
  for (i = 0; i < nA; i++) {
    for (j = 0; j < nA; j++) {
      AT[i + nA * j] = A[j + nA * i];
    }
  }
  if (nRHS > 1) {
    for (i = 0; i < nA; i++) {
      for (j = 0; j < nA; j++) {
        BT[i + nA * j] = B[j + nA * i];
      }
    }
  } else {
    for (i = 0; i < nA; i++)
      BT[i] = B[i];
  }
  dgesv_(&nA, &NRHS, AT, &LDA, IPIV, BT, &LDB, &INFO);
  if (nRHS > 1) {
    for (i = 0; i < nA; i++) {
      for (j = 0; j < nA; j++) {
        B[i + nA * j] = BT[j + nA * i];
      }
    }
  } else {
    for (i = 0; i < nA; i++)
      B[i] = BT[i];
  }
  free(AT);
  free(BT);
  return;
}


x86 assembly (clang, -O0):
<solve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x34(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
movslq -0x14(%rbp),%rcx
imul   %rcx,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x40(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
movslq -0x18(%rbp),%rcx
imul   %rcx,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    121e <solve+0xee>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    120b <solve+0xdb>
mov    -0x8(%rbp),%rax
mov    -0x50(%rbp),%ecx
mov    -0x14(%rbp),%edx
imul   -0x4c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
mov    -0x4c(%rbp),%ecx
mov    -0x14(%rbp),%edx
imul   -0x50(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    11c1 <solve+0x91>
jmp    1210 <solve+0xe0>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    11ae <solve+0x7e>
cmpl   $0x1,-0x18(%rbp)
jle    12a4 <solve+0x174>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    129f <solve+0x16f>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    128c <solve+0x15c>
mov    -0x10(%rbp),%rax
mov    -0x50(%rbp),%ecx
mov    -0x14(%rbp),%edx
imul   -0x4c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x4c(%rbp),%ecx
mov    -0x14(%rbp),%edx
imul   -0x50(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1242 <solve+0x112>
jmp    1291 <solve+0x161>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    122f <solve+0xff>
jmp    12e4 <solve+0x1b4>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    12df <solve+0x1af>
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    12ab <solve+0x17b>
jmp    12e4 <solve+0x1b4>
mov    -0x40(%rbp),%rdx
mov    -0x30(%rbp),%r8
mov    -0x48(%rbp),%r9
lea    -0x14(%rbp),%rdi
lea    -0x20(%rbp),%rsi
lea    -0x24(%rbp),%rcx
lea    -0x34(%rbp),%r10
lea    -0x38(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1040 <dgesv_@plt>
cmpl   $0x1,-0x18(%rbp)
jle    1398 <solve+0x268>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1393 <solve+0x263>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1380 <solve+0x250>
mov    -0x48(%rbp),%rax
mov    -0x50(%rbp),%ecx
mov    -0x14(%rbp),%edx
imul   -0x4c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x4c(%rbp),%ecx
mov    -0x14(%rbp),%edx
imul   -0x50(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1336 <solve+0x206>
jmp    1385 <solve+0x255>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1323 <solve+0x1f3>
jmp    13d8 <solve+0x2a8>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    13d3 <solve+0x2a3>
mov    -0x48(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    139f <solve+0x26f>
jmp    13d8 <solve+0x2a8>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %ecx,%ebp
mov    %edx,%r13d
mov    %rsi,%r15
mov    %rdi,%r12
mov    %edx,0xc(%rsp)
mov    %ecx,0x18(%rsp)
mov    %edx,0x14(%rsp)
lea    0x0(,%r13,4),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %r13d,0x10(%rsp)
mov    %r13d,%edi
imul   %r13d,%edi
shl    $0x3,%edi
call   1050 <malloc@plt>
mov    %rax,0x30(%rsp)
mov    %ebp,%edi
imul   %r13d,%edi
shl    $0x3,%edi
call   1050 <malloc@plt>
mov    %rax,%r14
test   %r13d,%r13d
mov    %rbx,0x20(%rsp)
jle    12e7 <solve+0x1b7>
mov    %ebp,0x2c(%rsp)
mov    %r13d,%r9d
lea    -0x1(%r9),%r8
mov    %r9d,%edi
and    $0xfffffffe,%edi
lea    0x8(%r12),%rbp
lea    0x0(,%r9,8),%rbx
mov    %r9,%rsi
shl    $0x4,%rsi
xor    %r11d,%r11d
mov    0x30(%rsp),%rdx
mov    %rdx,%r10
jmp    11e0 <solve+0xb0>
nop
add    $0x1,%r11
add    %rbx,%rbp
add    $0x8,%r10
cmp    %r9,%r11
je     1246 <solve+0x116>
test   %r8,%r8
je     1220 <solve+0xf0>
mov    %r10,%rcx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movsd  -0x8(%rbp,%rax,8),%xmm0
movsd  %xmm0,(%rcx)
movsd  0x0(%rbp,%rax,8),%xmm0
movsd  %xmm0,(%rcx,%rbx,1)
add    $0x2,%rax
add    %rsi,%rcx
cmp    %rax,%rdi
jne    11f0 <solve+0xc0>
test   $0x1,%r9b
je     11d0 <solve+0xa0>
jmp    1228 <solve+0xf8>
nopl   0x0(%rax)
xor    %eax,%eax
test   $0x1,%r9b
je     11d0 <solve+0xa0>
mov    %r11,%rcx
imul   %r9,%rcx
add    %rax,%rcx
movsd  (%r12,%rcx,8),%xmm0
imul   %r9,%rax
add    %r11,%rax
movsd  %xmm0,(%rdx,%rax,8)
jmp    11d0 <solve+0xa0>
cmpl   $0x1,0x2c(%rsp)
jle    13d5 <solve+0x2a5>
test   %r13d,%r13d
jle    12f5 <solve+0x1c5>
mov    %r9d,%edi
and    $0xfffffffe,%edi
lea    0x8(%r15),%rbp
xor    %r11d,%r11d
mov    %r14,%r10
jmp    1280 <solve+0x150>
nopl   0x0(%rax)
add    $0x1,%r11
add    %rbx,%rbp
add    $0x8,%r10
cmp    %r9,%r11
je     12f5 <solve+0x1c5>
test   %r8,%r8
je     12c0 <solve+0x190>
mov    %r10,%rcx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movsd  -0x8(%rbp,%rax,8),%xmm0
movsd  %xmm0,(%rcx)
movsd  0x0(%rbp,%rax,8),%xmm0
movsd  %xmm0,(%rcx,%rbx,1)
add    $0x2,%rax
add    %rsi,%rcx
cmp    %rax,%rdi
jne    1290 <solve+0x160>
test   $0x1,%r9b
je     1270 <solve+0x140>
jmp    12c8 <solve+0x198>
nopl   0x0(%rax)
xor    %eax,%eax
test   $0x1,%r9b
je     1270 <solve+0x140>
mov    %r11,%rcx
imul   %r9,%rcx
add    %rax,%rcx
movsd  (%r15,%rcx,8),%xmm0
imul   %r9,%rax
add    %r11,%rax
movsd  %xmm0,(%r14,%rax,8)
jmp    1270 <solve+0x140>
cmp    $0x1,%ebp
mov    0x30(%rsp),%rdx
jle    1484 <solve+0x354>
lea    0x1c(%rsp),%rax
lea    0x10(%rsp),%rbp
lea    0xc(%rsp),%rdi
lea    0x18(%rsp),%rsi
lea    0x14(%rsp),%rcx
mov    0x20(%rsp),%r8
mov    %r14,%r9
push   %rax
push   %rbp
mov    %rdx,%rbx
call   1040 <dgesv_@plt>
mov    %rbx,%rdi
add    $0x10,%rsp
mov    0xc(%rsp),%r8d
test   %r8d,%r8d
jle    1754 <solve+0x624>
mov    %r8d,%r11d
and    $0xfffffffe,%r11d
mov    %r14,%rdx
add    $0x8,%rdx
lea    0x0(,%r8,8),%rsi
mov    %r8,%rcx
shl    $0x4,%rcx
xor    %r10d,%r10d
mov    %r15,%r9
jmp    1374 <solve+0x244>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r10
add    %rsi,%rdx
add    $0x8,%r9
cmp    %r8,%r10
je     1754 <solve+0x624>
cmp    $0x1,%r8d
jne    1380 <solve+0x250>
xor    %eax,%eax
jmp    13b0 <solve+0x280>
xchg   %ax,%ax
mov    %r9,%rbx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movsd  -0x8(%rdx,%rax,8),%xmm0
movsd  %xmm0,(%rbx)
movsd  (%rdx,%rax,8),%xmm0
movsd  %xmm0,(%rbx,%rsi,1)
add    $0x2,%rax
add    %rcx,%rbx
cmp    %rax,%r11
jne    1390 <solve+0x260>
test   $0x1,%r8b
je     1360 <solve+0x230>
mov    %r10,%rbp
imul   %r8,%rbp
add    %rax,%rbp
movsd  (%r14,%rbp,8),%xmm0
imul   %r8,%rax
add    %r10,%rax
movsd  %xmm0,(%r15,%rax,8)
jmp    1360 <solve+0x230>
test   %r13d,%r13d
jle    1484 <solve+0x354>
cmp    $0x4,%r13d
jb     13fe <solve+0x2ce>
lea    (%r15,%r9,8),%rax
cmp    %rax,%r14
jae    14a7 <solve+0x377>
lea    (%r14,%r9,8),%rax
cmp    %r15,%rax
jbe    14a7 <solve+0x377>
xor    %ecx,%ecx
mov    0x20(%rsp),%r8
mov    %rcx,%rax
not    %rax
add    %r9,%rax
mov    %r9,%rsi
and    $0x3,%rsi
je     1436 <solve+0x306>
nopw   0x0(%rax,%rax,1)
movsd  (%r15,%rcx,8),%xmm0
movsd  %xmm0,(%r14,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
jne    1420 <solve+0x2f0>
cmp    $0x3,%rax
jb     1599 <solve+0x469>
movsd  (%r15,%rcx,8),%xmm0
movsd  %xmm0,(%r14,%rcx,8)
movsd  0x8(%r15,%rcx,8),%xmm0
movsd  %xmm0,0x8(%r14,%rcx,8)
movsd  0x10(%r15,%rcx,8),%xmm0
movsd  %xmm0,0x10(%r14,%rcx,8)
movsd  0x18(%r15,%rcx,8),%xmm0
movsd  %xmm0,0x18(%r14,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%r9
jne    1440 <solve+0x310>
jmp    1599 <solve+0x469>
lea    0x1c(%rsp),%rax
lea    0x10(%rsp),%rbp
lea    0xc(%rsp),%rdi
lea    0x18(%rsp),%rsi
lea    0x14(%rsp),%rcx
mov    0x20(%rsp),%r8
jmp    15b2 <solve+0x482>
mov    %r9d,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rax
mov    %rax,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%ebp
and    $0x3,%ebp
cmp    $0xc,%rax
jae    14cb <solve+0x39b>
xor    %edi,%edi
jmp    1548 <solve+0x418>
and    $0xfffffffffffffffc,%rsi
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movups (%r15,%rdi,8),%xmm0
movups 0x10(%r15,%rdi,8),%xmm1
movups %xmm0,(%r14,%rdi,8)
movups %xmm1,0x10(%r14,%rdi,8)
movups 0x20(%r15,%rdi,8),%xmm0
movups 0x30(%r15,%rdi,8),%xmm1
movups %xmm0,0x20(%r14,%rdi,8)
movups %xmm1,0x30(%r14,%rdi,8)
movups 0x40(%r15,%rdi,8),%xmm0
movups 0x50(%r15,%rdi,8),%xmm1
movups %xmm0,0x40(%r14,%rdi,8)
movups %xmm1,0x50(%r14,%rdi,8)
movups 0x60(%r15,%rdi,8),%xmm0
movups 0x70(%r15,%rdi,8),%xmm1
movups %xmm0,0x60(%r14,%rdi,8)
movups %xmm1,0x70(%r14,%rdi,8)
add    $0x10,%rdi
add    $0xfffffffffffffffc,%rsi
jne    14e0 <solve+0x3b0>
test   %rbp,%rbp
je     158b <solve+0x45b>
lea    (%r14,%rdi,8),%rax
add    $0x10,%rax
lea    (%r15,%rdi,8),%rsi
add    $0x10,%rsi
shl    $0x5,%rbp
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movups -0x10(%rsi,%rdi,1),%xmm0
movups (%rsi,%rdi,1),%xmm1
movups %xmm0,-0x10(%rax,%rdi,1)
movups %xmm1,(%rax,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rbp
jne    1570 <solve+0x440>
cmp    %r9,%rcx
mov    0x20(%rsp),%r8
jne    1405 <solve+0x2d5>
lea    0x1c(%rsp),%rax
lea    0x10(%rsp),%rbp
lea    0xc(%rsp),%rdi
lea    0x18(%rsp),%rsi
lea    0x14(%rsp),%rcx
mov    %r14,%r9
push   %rax
push   %rbp
mov    %rdx,%rbx
call   1040 <dgesv_@plt>
mov    %rbx,%rdi
add    $0x10,%rsp
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    1754 <solve+0x624>
cmp    $0x4,%eax
jb     15f1 <solve+0x4c1>
lea    (%r14,%rax,8),%rcx
cmp    %r15,%rcx
jbe    1674 <solve+0x544>
lea    (%r15,%rax,8),%rcx
cmp    %rcx,%r14
jae    1674 <solve+0x544>
xor    %ecx,%ecx
mov    %rcx,%rdx
not    %rdx
add    %rax,%rdx
mov    %rax,%rsi
and    $0x3,%rsi
je     1626 <solve+0x4f6>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%r14,%rcx,8),%xmm0
movsd  %xmm0,(%r15,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
jne    1610 <solve+0x4e0>
cmp    $0x3,%rdx
jb     1754 <solve+0x624>
movsd  (%r14,%rcx,8),%xmm0
movsd  %xmm0,(%r15,%rcx,8)
movsd  0x8(%r14,%rcx,8),%xmm0
movsd  %xmm0,0x8(%r15,%rcx,8)
movsd  0x10(%r14,%rcx,8),%xmm0
movsd  %xmm0,0x10(%r15,%rcx,8)
movsd  0x18(%r14,%rcx,8),%xmm0
movsd  %xmm0,0x18(%r15,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rax
jne    1630 <solve+0x500>
jmp    1754 <solve+0x624>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rbp
mov    %rbp,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x3,%edx
cmp    $0xc,%rbp
jae    1697 <solve+0x567>
xor    %ebp,%ebp
jmp    1708 <solve+0x5d8>
and    $0xfffffffffffffffc,%rsi
xor    %ebp,%ebp
nopl   (%rax)
movups (%r14,%rbp,8),%xmm0
movups 0x10(%r14,%rbp,8),%xmm1
movups %xmm0,(%r15,%rbp,8)
movups %xmm1,0x10(%r15,%rbp,8)
movups 0x20(%r14,%rbp,8),%xmm0
movups 0x30(%r14,%rbp,8),%xmm1
movups %xmm0,0x20(%r15,%rbp,8)
movups %xmm1,0x30(%r15,%rbp,8)
movups 0x40(%r14,%rbp,8),%xmm0
movups 0x50(%r14,%rbp,8),%xmm1
movups %xmm0,0x40(%r15,%rbp,8)
movups %xmm1,0x50(%r15,%rbp,8)
movups 0x60(%r14,%rbp,8),%xmm0
movups 0x70(%r14,%rbp,8),%xmm1
movups %xmm0,0x60(%r15,%rbp,8)
movups %xmm1,0x70(%r15,%rbp,8)
add    $0x10,%rbp
add    $0xfffffffffffffffc,%rsi
jne    16a0 <solve+0x570>
test   %rdx,%rdx
je     174b <solve+0x61b>
lea    (%r15,%rbp,8),%rsi
add    $0x10,%rsi
lea    (%r14,%rbp,8),%rbx
add    $0x10,%rbx
shl    $0x5,%rdx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movups -0x10(%rbx,%rbp,1),%xmm0
movups (%rbx,%rbp,1),%xmm1
movups %xmm0,-0x10(%rsi,%rbp,1)
movups %xmm1,(%rsi,%rbp,1)
add    $0x20,%rbp
cmp    %rbp,%rdx
jne    1730 <solve+0x600>
cmp    %rax,%rcx
jne    15f3 <solve+0x4c3>
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @solve(double* %0, double* %1, i32 %2, i32 %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32
%15 = alloca double*
%16 = alloca double*
%17 = alloca i32
%18 = alloca i32
store double* %0, double** %5
store double* %1, double** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%19 = load i32, i32* %7
store i32 %19, i32* %9
%20 = load i32, i32* %8
store i32 %20, i32* %10
%21 = load i32, i32* %7
store i32 %21, i32* %11
%22 = load i32, i32* %7
%23 = sext i32 %22 to i64
%24 = mul i64 4, %23
%25 = trunc i64 %24 to i32
%26 = call i64 @malloc(i32 %25)
%27 = inttoptr i64 %26 to i32*
store i32* %27, i32** %12
%28 = load i32, i32* %7
store i32 %28, i32* %13
%29 = load i32, i32* %7
%30 = sext i32 %29 to i64
%31 = mul i64 8, %30
%32 = load i32, i32* %7
%33 = sext i32 %32 to i64
%34 = mul i64 %31, %33
%35 = trunc i64 %34 to i32
%36 = call i64 @malloc(i32 %35)
%37 = inttoptr i64 %36 to double*
store double* %37, double** %15
%38 = load i32, i32* %7
%39 = sext i32 %38 to i64
%40 = mul i64 8, %39
%41 = load i32, i32* %8
%42 = sext i32 %41 to i64
%43 = mul i64 %40, %42
%44 = trunc i64 %43 to i32
%45 = call i64 @malloc(i32 %44)
%46 = inttoptr i64 %45 to double*
store double* %46, double** %16
store i32 0, i32* %17
br label %47
47: ; preds = %78, %4
%48 = load i32, i32* %17
%49 = load i32, i32* %7
%50 = icmp slt i32 %48, %49
br i1 %50, label %51, label %81
51: ; preds = %47
store i32 0, i32* %18
br label %52
52: ; preds = %74, %51
%53 = load i32, i32* %18
%54 = load i32, i32* %7
%55 = icmp slt i32 %53, %54
br i1 %55, label %56, label %77
56: ; preds = %52
%57 = load double*, double** %5
%58 = load i32, i32* %18
%59 = load i32, i32* %7
%60 = load i32, i32* %17
%61 = mul nsw i32 %59, %60
%62 = add nsw i32 %58, %61
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds double, double* %57, i64 %63
%65 = load double, double* %64
%66 = load double*, double** %15
%67 = load i32, i32* %17
%68 = load i32, i32* %7
%69 = load i32, i32* %18
%70 = mul nsw i32 %68, %69
%71 = add nsw i32 %67, %70
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds double, double* %66, i64 %72
store double %65, double* %73
br label %74
74: ; preds = %56
%75 = load i32, i32* %18
%76 = add nsw i32 %75, 1
store i32 %76, i32* %18
br label %52
77: ; preds = %52
br label %78
78: ; preds = %77
%79 = load i32, i32* %17
%80 = add nsw i32 %79, 1
store i32 %80, i32* %17
br label %47
81: ; preds = %47
%82 = load i32, i32* %8
%83 = icmp sgt i32 %82, 1
br i1 %83, label %84, label %120
84: ; preds = %81
store i32 0, i32* %17
br label %85
85: ; preds = %116, %84
%86 = load i32, i32* %17
%87 = load i32, i32* %7
%88 = icmp slt i32 %86, %87
br i1 %88, label %89, label %119
89: ; preds = %85
store i32 0, i32* %18
br label %90
90: ; preds = %112, %89
%91 = load i32, i32* %18
%92 = load i32, i32* %7
%93 = icmp slt i32 %91, %92
br i1 %93, label %94, label %115
94: ; preds = %90
%95 = load double*, double** %6
%96 = load i32, i32* %18
%97 = load i32, i32* %7
%98 = load i32, i32* %17
%99 = mul nsw i32 %97, %98
%100 = add nsw i32 %96, %99
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds double, double* %95, i64 %101
%103 = load double, double* %102
%104 = load double*, double** %16
%105 = load i32, i32* %17
%106 = load i32, i32* %7
%107 = load i32, i32* %18
%108 = mul nsw i32 %106, %107
%109 = add nsw i32 %105, %108
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds double, double* %104, i64 %110
store double %103, double* %111
br label %112
112: ; preds = %94
%113 = load i32, i32* %18
%114 = add nsw i32 %113, 1
store i32 %114, i32* %18
br label %90
115: ; preds = %90
br label %116
116: ; preds = %115
%117 = load i32, i32* %17
%118 = add nsw i32 %117, 1
store i32 %118, i32* %17
br label %85
119: ; preds = %85
br label %139
120: ; preds = %81
store i32 0, i32* %17
br label %121
121: ; preds = %135, %120
%122 = load i32, i32* %17
%123 = load i32, i32* %7
%124 = icmp slt i32 %122, %123
br i1 %124, label %125, label %138
125: ; preds = %121
%126 = load double*, double** %6
%127 = load i32, i32* %17
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds double, double* %126, i64 %128
%130 = load double, double* %129
%131 = load double*, double** %16
%132 = load i32, i32* %17
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds double, double* %131, i64 %133
store double %130, double* %134
br label %135
135: ; preds = %125
%136 = load i32, i32* %17
%137 = add nsw i32 %136, 1
store i32 %137, i32* %17
br label %121
138: ; preds = %121
br label %139
139: ; preds = %138, %119
%140 = load double*, double** %15
%141 = load i32*, i32** %12
%142 = load double*, double** %16
%143 = call i32 @dgesv_(i32* %7, i32* %10, double* %140, i32* %11, i32* %141, double* %142, i32* %13, i32* %14)
%144 = load i32, i32* %8
%145 = icmp sgt i32 %144, 1
br i1 %145, label %146, label %182
146: ; preds = %139
store i32 0, i32* %17
br label %147
147: ; preds = %178, %146
%148 = load i32, i32* %17
%149 = load i32, i32* %7
%150 = icmp slt i32 %148, %149
br i1 %150, label %151, label %181
151: ; preds = %147
store i32 0, i32* %18
br label %152
152: ; preds = %174, %151
%153 = load i32, i32* %18
%154 = load i32, i32* %7
%155 = icmp slt i32 %153, %154
br i1 %155, label %156, label %177
156: ; preds = %152
%157 = load double*, double** %16
%158 = load i32, i32* %18
%159 = load i32, i32* %7
%160 = load i32, i32* %17
%161 = mul nsw i32 %159, %160
%162 = add nsw i32 %158, %161
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds double, double* %157, i64 %163
%165 = load double, double* %164
%166 = load double*, double** %6
%167 = load i32, i32* %17
%168 = load i32, i32* %7
%169 = load i32, i32* %18
%170 = mul nsw i32 %168, %169
%171 = add nsw i32 %167, %170
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds double, double* %166, i64 %172
store double %165, double* %173
br label %174
174: ; preds = %156
%175 = load i32, i32* %18
%176 = add nsw i32 %175, 1
store i32 %176, i32* %18
br label %152
177: ; preds = %152
br label %178
178: ; preds = %177
%179 = load i32, i32* %17
%180 = add nsw i32 %179, 1
store i32 %180, i32* %17
br label %147
181: ; preds = %147
br label %201
182: ; preds = %139
store i32 0, i32* %17
br label %183
183: ; preds = %197, %182
%184 = load i32, i32* %17
%185 = load i32, i32* %7
%186 = icmp slt i32 %184, %185
br i1 %186, label %187, label %200
187: ; preds = %183
%188 = load double*, double** %16
%189 = load i32, i32* %17
%190 = sext i32 %189 to i64
%191 = getelementptr inbounds double, double* %188, i64 %190
%192 = load double, double* %191
%193 = load double*, double** %6
%194 = load i32, i32* %17
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds double, double* %193, i64 %195
store double %192, double* %196
br label %197
197: ; preds = %187
%198 = load i32, i32* %17
%199 = add nsw i32 %198, 1
store i32 %199, i32* %17
br label %183
200: ; preds = %183
br label %201
201: ; preds = %200, %181
%202 = load double*, double** %15
%203 = call i32 @free(double* %202)
%204 = load double*, double** %16
%205 = call i32 @free(double* %204)
ret void
}

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