#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 dposv(unsigned char, int, int, double *, int, double *, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void makePosDefANDsolveLapack(int N, double *hessFortran, double **hessC,
                              double *delta_x, double *grad, double beta) {
  unsigned i = 0, j = 0;
  for (i = 0; i < 3 * N * 3 * N; i++)
    hessFortran[i] = 0.0;
  for (i = 0; i < 3 * N; i++)
    for (j = 0; j <= i; j++)
      hessFortran[3 * N * i + j] = hessC[i][j];
  int info;
  int posDefCounter = 0;
  while (1) {
    for (i = 0; i < 3 * N; i++)
      delta_x[i] = grad[i];
    info = dposv('U', (3 * N), 1, hessFortran, (3 * N), delta_x, (3 * N));
    if (info > 0) {
      for (i = 0; i < 3 * N * 3 * N; i++)
        hessFortran[i] = 0.0;
      for (i = 0; i < 3 * N; i++)
        for (j = 0; j <= i; j++) {
          if (i == j)
            hessFortran[3 * N * i + j] = (hessC[i][j] + beta);
          else
            hessFortran[3 * N * i + j] = hessC[i][j];
        }
      posDefCounter = +1;
      if (posDefCounter == 100) {
        fprintf(stderr, "ERROR: Can not make it pos def\n");
        break;
      }
      beta = beta * (posDefCounter + 1);
    }
    if (info == 0) {
      break;
    }
  }
}


x86 assembly (clang, -O0):
<makePosDefANDsolveLapack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
imul   $0x3,-0x4(%rbp),%ecx
imul   $0x3,%ecx,%ecx
imul   -0x4(%rbp),%ecx
cmp    %ecx,%eax
jae    1188 <makePosDefANDsolveLapack+0x68>
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1155 <makePosDefANDsolveLapack+0x35>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
imul   $0x3,-0x4(%rbp),%ecx
cmp    %ecx,%eax
jae    11fb <makePosDefANDsolveLapack+0xdb>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
ja     11e8 <makePosDefANDsolveLapack+0xc8>
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    -0x38(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
imul   $0x3,-0x4(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    -0x38(%rbp),%ecx
mov    %ecx,%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11a5 <makePosDefANDsolveLapack+0x85>
jmp    11ed <makePosDefANDsolveLapack+0xcd>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    118f <makePosDefANDsolveLapack+0x6f>
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
imul   $0x3,-0x4(%rbp),%ecx
cmp    %ecx,%eax
jae    123e <makePosDefANDsolveLapack+0x11e>
mov    -0x28(%rbp),%rax
mov    -0x34(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1209 <makePosDefANDsolveLapack+0xe9>
imul   $0x3,-0x4(%rbp),%esi
mov    -0x10(%rbp),%rcx
imul   $0x3,-0x4(%rbp),%r8d
mov    -0x20(%rbp),%r9
imul   $0x3,-0x4(%rbp),%eax
mov    $0x55,%edi
mov    $0x1,%edx
mov    %eax,(%rsp)
call   1040 <dposv@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jle    13a6 <makePosDefANDsolveLapack+0x286>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
imul   $0x3,-0x4(%rbp),%ecx
imul   $0x3,%ecx,%ecx
imul   -0x4(%rbp),%ecx
cmp    %ecx,%eax
jae    12ac <makePosDefANDsolveLapack+0x18c>
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1279 <makePosDefANDsolveLapack+0x159>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
imul   $0x3,-0x4(%rbp),%ecx
cmp    %ecx,%eax
jae    1363 <makePosDefANDsolveLapack+0x243>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
ja     1350 <makePosDefANDsolveLapack+0x230>
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
jne    1314 <makePosDefANDsolveLapack+0x1f4>
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    -0x38(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
imul   $0x3,-0x4(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    -0x38(%rbp),%ecx
mov    %ecx,%ecx
movsd  %xmm0,(%rax,%rcx,8)
jmp    133d <makePosDefANDsolveLapack+0x21d>
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    -0x38(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
imul   $0x3,-0x4(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    -0x38(%rbp),%ecx
mov    %ecx,%ecx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1342 <makePosDefANDsolveLapack+0x222>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12c9 <makePosDefANDsolveLapack+0x1a9>
jmp    1355 <makePosDefANDsolveLapack+0x235>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12b3 <makePosDefANDsolveLapack+0x193>
movl   $0x1,-0x40(%rbp)
cmpl   $0x64,-0x40(%rbp)
jne    138e <makePosDefANDsolveLapack+0x26e>
mov    0x2c65(%rip),%rax
mov    (%rax),%edi
lea    0xc7c(%rip),%rsi
call   1030 <fprintf@plt>
jmp    13ba <makePosDefANDsolveLapack+0x29a>
movsd  -0x30(%rbp),%xmm0
mov    -0x40(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jne    13b5 <makePosDefANDsolveLapack+0x295>
jmp    13ba <makePosDefANDsolveLapack+0x29a>
jmp    1202 <makePosDefANDsolveLapack+0xe2>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makePosDefANDsolveLapack>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
movapd %xmm0,%xmm2
mov    %r8,%r14
mov    %rcx,%r12
mov    %rsi,%r15
mov    %rdi,%rax
mov    %rdi,0x38(%rsp)
imul   %eax,%eax
lea    (%rax,%rax,8),%eax
mov    %eax,%ecx
mov    %eax,0x44(%rsp)
test   %eax,%eax
mov    %rdx,0x30(%rsp)
mov    %rcx,0x28(%rsp)
je     1188 <makePosDefANDsolveLapack+0x68>
lea    0x0(,%rcx,8),%rdx
mov    %r15,%rdi
xor    %esi,%esi
movsd  %xmm2,0x10(%rsp)
call   1030 <memset@plt>
mov    0x28(%rsp),%rcx
mov    0x30(%rsp),%rdx
movsd  0x10(%rsp),%xmm2
mov    0x38(%rsp),%rax
lea    (%rax,%rax,2),%esi
mov    %esi,%edi
mov    %rdi,0x48(%rsp)
test   %eax,%eax
mov    %esi,0xc(%rsp)
je     143b <makePosDefANDsolveLapack+0x31b>
cmp    $0x2,%esi
mov    $0x1,%eax
cmovae %esi,%eax
mov    %rax,0x10(%rsp)
mov    $0x1,%r11d
mov    $0x8,%r13d
xor    %r10d,%r10d
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    11f7 <makePosDefANDsolveLapack+0xd7>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r9
add    $0x1,%r11
mov    0xc(%rsp),%eax
add    %eax,%r13d
add    %eax,%r8d
add    0x48(%rsp),%r10
cmp    0x10(%rsp),%r9
mov    0x28(%rsp),%rcx
je     1430 <makePosDefANDsolveLapack+0x310>
mov    (%rdx,%r9,8),%rbx
cmp    $0x4,%r11
jb     1250 <makePosDefANDsolveLapack+0x130>
mov    0xc(%rsp),%eax
imul   %r9d,%eax
add    %r9d,%eax
jb     1250 <makePosDefANDsolveLapack+0x130>
mov    %r9,%rax
shr    $0x20,%rax
mov    $0x0,%ecx
jne    1252 <makePosDefANDsolveLapack+0x132>
mov    0xc(%rsp),%eax
imul   %r9d,%eax
lea    (%r15,%r11,8),%rcx
lea    (%rcx,%rax,8),%rcx
cmp    %rcx,%rbx
jae    12fc <makePosDefANDsolveLapack+0x1dc>
lea    (%r15,%rax,8),%rax
lea    (%rbx,%r11,8),%rcx
cmp    %rcx,%rax
jae    12fc <makePosDefANDsolveLapack+0x1dc>
cs nopw 0x0(%rax,%rax,1)
xor    %ecx,%ecx
mov    %r9,%rdi
sub    %rcx,%rdi
test   $0x3,%r11b
je     1289 <makePosDefANDsolveLapack+0x169>
mov    %r11d,%eax
and    $0x3,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rbx,%rcx,8),%xmm0
lea    (%r10,%rcx,1),%esi
movsd  %xmm0,(%r15,%rsi,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rax
jne    1270 <makePosDefANDsolveLapack+0x150>
cmp    $0x3,%rdi
jb     11d0 <makePosDefANDsolveLapack+0xb0>
mov    %r11,%rdi
sub    %rcx,%rdi
lea    (%r8,%rcx,1),%eax
lea    (%rbx,%rcx,8),%rcx
add    $0x18,%rcx
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movsd  -0x18(%rcx,%rbx,8),%xmm0
lea    (%rax,%rbx,1),%rsi
mov    %esi,%ebp
movsd  %xmm0,(%r15,%rbp,8)
movsd  -0x10(%rcx,%rbx,8),%xmm0
lea    0x1(%rsi),%ebp
movsd  %xmm0,(%r15,%rbp,8)
movsd  -0x8(%rcx,%rbx,8),%xmm0
lea    0x2(%rsi),%ebp
movsd  %xmm0,(%r15,%rbp,8)
movsd  (%rcx,%rbx,8),%xmm0
add    $0x3,%esi
movsd  %xmm0,(%r15,%rsi,8)
add    $0x4,%rbx
cmp    %rbx,%rdi
jne    12b0 <makePosDefANDsolveLapack+0x190>
jmp    11d0 <makePosDefANDsolveLapack+0xb0>
mov    %r11,%rdx
and    $0xfffffffffffffffc,%rdx
add    $0xfffffffffffffffc,%rdx
shr    $0x2,%rdx
mov    %r11,%rcx
movabs $0x7ffffffffffffffc,%rax
ff ff 7f
and    %rax,%rcx
lea    -0x4(%rcx),%rax
mov    %rax,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
cmp    $0xc,%rax
mov    %r13d,0x1c(%rsp)
mov    %r8,0x20(%rsp)
jae    1341 <makePosDefANDsolveLapack+0x221>
xor    %edi,%edi
jmp    13c2 <makePosDefANDsolveLapack+0x2a2>
lea    0x1(%rdx),%r8
and    $0xfffffffffffffffc,%r8
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
movups (%rbx,%rdi,8),%xmm0
movups 0x10(%rbx,%rdi,8),%xmm1
lea    -0x8(%r13),%eax
movups %xmm0,(%r15,%rax,8)
movups %xmm1,0x10(%r15,%rax,8)
movups 0x20(%rbx,%rdi,8),%xmm0
movups 0x30(%rbx,%rdi,8),%xmm1
lea    -0x4(%r13),%eax
movups %xmm0,(%r15,%rax,8)
movups %xmm1,0x10(%r15,%rax,8)
movups 0x40(%rbx,%rdi,8),%xmm0
movups 0x50(%rbx,%rdi,8),%xmm1
mov    %r13d,%eax
movups %xmm0,(%r15,%rax,8)
movups %xmm1,0x10(%r15,%rax,8)
movupd 0x60(%rbx,%rdi,8),%xmm0
movups 0x70(%rbx,%rdi,8),%xmm1
lea    0x4(%r13),%eax
movupd %xmm0,(%r15,%rax,8)
movups %xmm1,0x10(%r15,%rax,8)
add    $0x10,%rdi
add    $0x10,%r13d
add    $0xfffffffffffffffc,%r8
jne    1350 <makePosDefANDsolveLapack+0x230>
test   $0x3,%sil
je     1413 <makePosDefANDsolveLapack+0x2f3>
add    $0x1,%dl
movzbl %dl,%r8d
and    $0x3,%r8d
shl    $0x2,%r8
lea    (%rbx,%rdi,8),%rbp
add    $0x10,%rbp
add    0x20(%rsp),%edi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movupd -0x10(%rbp,%rax,8),%xmm0
movups 0x0(%rbp,%rax,8),%xmm1
lea    (%rdi,%rax,1),%esi
movupd %xmm0,(%r15,%rsi,8)
movups %xmm1,0x10(%r15,%rsi,8)
add    $0x4,%rax
cmp    %rax,%r8
jne    13f0 <makePosDefANDsolveLapack+0x2d0>
cmp    %rcx,%r11
mov    0x30(%rsp),%rdx
mov    0x1c(%rsp),%r13d
mov    0x20(%rsp),%r8
je     11d0 <makePosDefANDsolveLapack+0xb0>
jmp    1252 <makePosDefANDsolveLapack+0x132>
mov    0xc(%rsp),%esi
mov    0x10(%rsp),%r11
jmp    1441 <makePosDefANDsolveLapack+0x321>
mov    $0x1,%r11d
shl    $0x3,%rcx
mov    %rcx,0x28(%rsp)
lea    (%r14,%r11,8),%rax
mov    %r11d,%ecx
and    $0xfffffffc,%ecx
mov    %rcx,0x78(%rsp)
add    $0xfffffffffffffffc,%rcx
mov    %rcx,0x70(%rsp)
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
cmp    %r12,%rax
seta   %al
lea    (%r12,%r11,8),%rcx
cmp    %r14,%rcx
seta   %cl
and    %al,%cl
mov    %cl,0x1c(%rsp)
mov    %edx,%ecx
and    $0x3,%ecx
movabs $0x7ffffffffffffffc,%rax
ff ff 7f
and    %rax,%rdx
mov    %rdx,0x50(%rsp)
mov    %r11d,%ebp
and    $0x3,%ebp
lea    0x10(%r12),%rax
mov    %rax,0x60(%rsp)
lea    0x10(%r14),%rax
mov    %rax,0x58(%rsp)
mov    %rcx,0x68(%rsp)
mov    %rcx,%rdi
shl    $0x5,%rdi
mov    %rbp,0x80(%rsp)
mov    %rdi,0x20(%rsp)
jmp    14ea <makePosDefANDsolveLapack+0x3ca>
xchg   %ax,%ax
addsd  %xmm2,%xmm2
mov    0x80(%rsp),%rbp
mov    0x20(%rsp),%rdi
test   %r13d,%r13d
je     1742 <makePosDefANDsolveLapack+0x622>
movsd  %xmm2,0x10(%rsp)
cmpl   $0x0,0x38(%rsp)
je     165f <makePosDefANDsolveLapack+0x53f>
cmp    $0x4,%r11d
setb   %al
or     0x1c(%rsp),%al
je     1510 <makePosDefANDsolveLapack+0x3f0>
xor    %eax,%eax
jmp    15ea <makePosDefANDsolveLapack+0x4ca>
nop
cmpq   $0xc,0x70(%rsp)
jae    151c <makePosDefANDsolveLapack+0x3fc>
xor    %eax,%eax
jmp    159a <makePosDefANDsolveLapack+0x47a>
mov    0x50(%rsp),%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movups (%r14,%rax,8),%xmm0
movups 0x10(%r14,%rax,8),%xmm1
movups %xmm0,(%r12,%rax,8)
movups %xmm1,0x10(%r12,%rax,8)
movups 0x20(%r14,%rax,8),%xmm0
movups 0x30(%r14,%rax,8),%xmm1
movups %xmm0,0x20(%r12,%rax,8)
movups %xmm1,0x30(%r12,%rax,8)
movups 0x40(%r14,%rax,8),%xmm0
movups 0x50(%r14,%rax,8),%xmm1
movups %xmm0,0x40(%r12,%rax,8)
movups %xmm1,0x50(%r12,%rax,8)
movupd 0x60(%r14,%rax,8),%xmm0
movups 0x70(%r14,%rax,8),%xmm1
movupd %xmm0,0x60(%r12,%rax,8)
movups %xmm1,0x70(%r12,%rax,8)
add    $0x10,%rax
add    $0xfffffffffffffffc,%rcx
jne    1530 <makePosDefANDsolveLapack+0x410>
cmpq   $0x0,0x68(%rsp)
je     15dd <makePosDefANDsolveLapack+0x4bd>
mov    0x60(%rsp),%rcx
lea    (%rcx,%rax,8),%rcx
mov    0x58(%rsp),%rdx
lea    (%rdx,%rax,8),%rax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
movupd -0x10(%rax,%rdx,1),%xmm0
movups (%rax,%rdx,1),%xmm1
movupd %xmm0,-0x10(%rcx,%rdx,1)
movups %xmm1,(%rcx,%rdx,1)
add    $0x20,%rdx
cmp    %rdx,%rdi
jne    15c0 <makePosDefANDsolveLapack+0x4a0>
mov    0x78(%rsp),%rcx
mov    %rcx,%rax
cmp    %rcx,%r11
je     165f <makePosDefANDsolveLapack+0x53f>
mov    %rax,%rcx
not    %rcx
add    %r11,%rcx
test   %rbp,%rbp
je     1616 <makePosDefANDsolveLapack+0x4f6>
mov    %rbp,%rdx
nopl   0x0(%rax,%rax,1)
movsd  (%r14,%rax,8),%xmm0
movsd  %xmm0,(%r12,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1600 <makePosDefANDsolveLapack+0x4e0>
cmp    $0x3,%rcx
jb     165f <makePosDefANDsolveLapack+0x53f>
nopl   0x0(%rax)
movsd  (%r14,%rax,8),%xmm0
movsd  %xmm0,(%r12,%rax,8)
movsd  0x8(%r14,%rax,8),%xmm0
movsd  %xmm0,0x8(%r12,%rax,8)
movsd  0x10(%r14,%rax,8),%xmm0
movsd  %xmm0,0x10(%r12,%rax,8)
movsd  0x18(%r14,%rax,8),%xmm0
movsd  %xmm0,0x18(%r12,%rax,8)
add    $0x4,%rax
cmp    %rax,%r11
jne    1620 <makePosDefANDsolveLapack+0x500>
mov    %r11,%rbx
mov    %esi,(%rsp)
mov    $0x55,%edi
mov    $0x1,%edx
mov    %r15,%rcx
mov    %esi,%r8d
mov    %r12,%r9
call   1040 <dposv@plt>
mov    %eax,%r13d
test   %eax,%eax
jle    1730 <makePosDefANDsolveLapack+0x610>
cmpl   $0x0,0x44(%rsp)
je     169e <makePosDefANDsolveLapack+0x57e>
mov    %r15,%rdi
xor    %esi,%esi
mov    0x28(%rsp),%rdx
call   1030 <memset@plt>
cmpl   $0x0,0x38(%rsp)
movsd  0x10(%rsp),%xmm2
mov    0x30(%rsp),%r8
mov    0xc(%rsp),%esi
mov    0x48(%rsp),%r10
mov    %rbx,%r11
je     14d0 <makePosDefANDsolveLapack+0x3b0>
xor    %r9d,%r9d
xor    %ecx,%ecx
jmp    16df <makePosDefANDsolveLapack+0x5bf>
nopw   0x0(%rax,%rax,1)
add    %r10,%r9
mov    %rax,%rcx
cmp    %r11,%rax
je     14d0 <makePosDefANDsolveLapack+0x3b0>
mov    %esi,%edx
imul   %ecx,%edx
add    %ecx,%edx
mov    (%r8,%rcx,8),%rdi
lea    0x1(%rcx),%rax
xor    %ebp,%ebp
jmp    1718 <makePosDefANDsolveLapack+0x5f8>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rdi,%rbp,8),%xmm0
lea    (%r9,%rbp,1),%ebx
movsd  %xmm0,(%r15,%rbx,8)
add    $0x1,%rbp
cmp    %rbp,%rax
je     16d0 <makePosDefANDsolveLapack+0x5b0>
cmp    %rbp,%rcx
jne    1700 <makePosDefANDsolveLapack+0x5e0>
movsd  (%rdi,%rcx,8),%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,(%r15,%rdx,8)
jmp    170f <makePosDefANDsolveLapack+0x5ef>
xchg   %ax,%ax
movsd  0x10(%rsp),%xmm2
mov    0xc(%rsp),%esi
mov    %rbx,%r11
jmp    14dc <makePosDefANDsolveLapack+0x3bc>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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