#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;
int /*<<< orphan*/ stdout;
void makePosDefANDsolveLapack_v2(int N, double *hessFortran, double **hessC,
                                 double *delta_x, double *grad, double beta,
                                 int printDetails) {
  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) {
      if (printDetails)
        fprintf(stdout, "Warning: Not pos def!\n");
      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];
        }
      beta = beta * 10;
      posDefCounter = +1;
      if (posDefCounter == 100) {
        fprintf(stderr, "ERROR: Can not make it pos def\n");
        break;
      }
    }
    if (info == 0) {
      if (printDetails)
        fprintf(stdout, "Finally, it is pos def now!\n");
      break;
    }
  }
}


x86 assembly (clang, -O0):
<makePosDefANDsolveLapack_v2>:
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)
mov    %r9d,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
imul   $0x3,-0x4(%rbp),%ecx
imul   $0x3,%ecx,%ecx
imul   -0x4(%rbp),%ecx
cmp    %ecx,%eax
jae    118c <makePosDefANDsolveLapack_v2+0x6c>
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1159 <makePosDefANDsolveLapack_v2+0x39>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
imul   $0x3,-0x4(%rbp),%ecx
cmp    %ecx,%eax
jae    11ff <makePosDefANDsolveLapack_v2+0xdf>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x38(%rbp),%eax
ja     11ec <makePosDefANDsolveLapack_v2+0xcc>
mov    -0x18(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    -0x3c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
imul   $0x3,-0x4(%rbp),%ecx
imul   -0x38(%rbp),%ecx
add    -0x3c(%rbp),%ecx
mov    %ecx,%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11a9 <makePosDefANDsolveLapack_v2+0x89>
jmp    11f1 <makePosDefANDsolveLapack_v2+0xd1>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1193 <makePosDefANDsolveLapack_v2+0x73>
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
imul   $0x3,-0x4(%rbp),%ecx
cmp    %ecx,%eax
jae    1242 <makePosDefANDsolveLapack_v2+0x122>
mov    -0x28(%rbp),%rax
mov    -0x38(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x38(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    120d <makePosDefANDsolveLapack_v2+0xed>
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,-0x40(%rbp)
cmpl   $0x0,-0x40(%rbp)
jle    13c8 <makePosDefANDsolveLapack_v2+0x2a8>
cmpl   $0x0,-0x34(%rbp)
je     1295 <makePosDefANDsolveLapack_v2+0x175>
mov    0x2d51(%rip),%rax
mov    (%rax),%edi
lea    0xd78(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
imul   $0x3,-0x4(%rbp),%ecx
imul   $0x3,%ecx,%ecx
imul   -0x4(%rbp),%ecx
cmp    %ecx,%eax
jae    12cf <makePosDefANDsolveLapack_v2+0x1af>
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    129c <makePosDefANDsolveLapack_v2+0x17c>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
imul   $0x3,-0x4(%rbp),%ecx
cmp    %ecx,%eax
jae    1386 <makePosDefANDsolveLapack_v2+0x266>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x38(%rbp),%eax
ja     1373 <makePosDefANDsolveLapack_v2+0x253>
mov    -0x38(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jne    1337 <makePosDefANDsolveLapack_v2+0x217>
mov    -0x18(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    -0x3c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
imul   $0x3,-0x4(%rbp),%ecx
imul   -0x38(%rbp),%ecx
add    -0x3c(%rbp),%ecx
mov    %ecx,%ecx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1360 <makePosDefANDsolveLapack_v2+0x240>
mov    -0x18(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    -0x3c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
imul   $0x3,-0x4(%rbp),%ecx
imul   -0x38(%rbp),%ecx
add    -0x3c(%rbp),%ecx
mov    %ecx,%ecx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1365 <makePosDefANDsolveLapack_v2+0x245>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12ec <makePosDefANDsolveLapack_v2+0x1cc>
jmp    1378 <makePosDefANDsolveLapack_v2+0x258>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12d6 <makePosDefANDsolveLapack_v2+0x1b6>
movsd  0xc72(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x1,-0x44(%rbp)
cmpl   $0x64,-0x44(%rbp)
jne    13c3 <makePosDefANDsolveLapack_v2+0x2a3>
mov    0x2c30(%rip),%rax
mov    (%rax),%edi
lea    0xc66(%rip),%rsi
call   1030 <fprintf@plt>
jmp    13fb <makePosDefANDsolveLapack_v2+0x2db>
jmp    13c8 <makePosDefANDsolveLapack_v2+0x2a8>
cmpl   $0x0,-0x40(%rbp)
jne    13f6 <makePosDefANDsolveLapack_v2+0x2d6>
cmpl   $0x0,-0x34(%rbp)
je     13f1 <makePosDefANDsolveLapack_v2+0x2d1>
mov    0x2bf5(%rip),%rax
mov    (%rax),%edi
lea    0xc53(%rip),%rsi
call   1030 <fprintf@plt>
jmp    13fb <makePosDefANDsolveLapack_v2+0x2db>
jmp    1206 <makePosDefANDsolveLapack_v2+0xe6>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makePosDefANDsolveLapack_v2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %r9d,0x34(%rsp)
movapd %xmm0,%xmm2
mov    %r8,%r12
mov    %rcx,%r14
mov    %rsi,%r15
mov    %rdi,%rax
mov    %rdi,0x48(%rsp)
imul   %eax,%eax
lea    (%rax,%rax,8),%eax
mov    %eax,%ecx
mov    %eax,0x54(%rsp)
test   %eax,%eax
mov    %rdx,0x40(%rsp)
mov    %rcx,0x38(%rsp)
je     119d <makePosDefANDsolveLapack_v2+0x6d>
lea    0x0(,%rcx,8),%rdx
mov    %r15,%rdi
xor    %esi,%esi
movsd  %xmm2,0x18(%rsp)
call   1030 <memset@plt>
mov    0x38(%rsp),%rcx
mov    0x40(%rsp),%rdx
movsd  0x18(%rsp),%xmm2
mov    0x48(%rsp),%rax
lea    (%rax,%rax,2),%esi
mov    %esi,%edi
mov    %rdi,0x58(%rsp)
test   %eax,%eax
mov    %esi,0x14(%rsp)
je     144b <makePosDefANDsolveLapack_v2+0x31b>
cmp    $0x2,%esi
mov    $0x1,%eax
cmovae %esi,%eax
mov    %rax,0x18(%rsp)
mov    $0x1,%r11d
mov    $0x8,%r13d
xor    %r10d,%r10d
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1207 <makePosDefANDsolveLapack_v2+0xd7>
nop
add    $0x1,%r9
add    $0x1,%r11
mov    0x14(%rsp),%eax
add    %eax,%r13d
add    %eax,%r8d
add    0x58(%rsp),%r10
cmp    0x18(%rsp),%r9
mov    0x38(%rsp),%rcx
je     1440 <makePosDefANDsolveLapack_v2+0x310>
mov    (%rdx,%r9,8),%rbx
cmp    $0x4,%r11
jb     1260 <makePosDefANDsolveLapack_v2+0x130>
mov    0x14(%rsp),%eax
imul   %r9d,%eax
add    %r9d,%eax
jb     1260 <makePosDefANDsolveLapack_v2+0x130>
mov    %r9,%rax
shr    $0x20,%rax
mov    $0x0,%ecx
jne    1262 <makePosDefANDsolveLapack_v2+0x132>
mov    0x14(%rsp),%eax
imul   %r9d,%eax
lea    (%r15,%r11,8),%rcx
lea    (%rcx,%rax,8),%rcx
cmp    %rcx,%rbx
jae    130c <makePosDefANDsolveLapack_v2+0x1dc>
lea    (%r15,%rax,8),%rax
lea    (%rbx,%r11,8),%rcx
cmp    %rcx,%rax
jae    130c <makePosDefANDsolveLapack_v2+0x1dc>
cs nopw 0x0(%rax,%rax,1)
xor    %ecx,%ecx
mov    %r9,%rdi
sub    %rcx,%rdi
test   $0x3,%r11b
je     1299 <makePosDefANDsolveLapack_v2+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    1280 <makePosDefANDsolveLapack_v2+0x150>
cmp    $0x3,%rdi
jb     11e0 <makePosDefANDsolveLapack_v2+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    12c0 <makePosDefANDsolveLapack_v2+0x190>
jmp    11e0 <makePosDefANDsolveLapack_v2+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,0x24(%rsp)
mov    %r8,0x28(%rsp)
jae    1351 <makePosDefANDsolveLapack_v2+0x221>
xor    %edi,%edi
jmp    13d2 <makePosDefANDsolveLapack_v2+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    1360 <makePosDefANDsolveLapack_v2+0x230>
test   $0x3,%sil
je     1423 <makePosDefANDsolveLapack_v2+0x2f3>
add    $0x1,%dl
movzbl %dl,%r8d
and    $0x3,%r8d
shl    $0x2,%r8
lea    (%rbx,%rdi,8),%rbp
add    $0x10,%rbp
add    0x28(%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    1400 <makePosDefANDsolveLapack_v2+0x2d0>
cmp    %rcx,%r11
mov    0x40(%rsp),%rdx
mov    0x24(%rsp),%r13d
mov    0x28(%rsp),%r8
je     11e0 <makePosDefANDsolveLapack_v2+0xb0>
jmp    1262 <makePosDefANDsolveLapack_v2+0x132>
mov    0x14(%rsp),%esi
mov    0x18(%rsp),%r11
jmp    1451 <makePosDefANDsolveLapack_v2+0x321>
mov    $0x1,%r11d
shl    $0x3,%rcx
mov    %rcx,0x38(%rsp)
lea    (%r14,%r11,8),%rax
lea    (%r12,%r11,8),%rcx
mov    %r11d,%edx
and    $0xfffffffc,%edx
mov    %rdx,0x88(%rsp)
add    $0xfffffffffffffffc,%rdx
mov    %rdx,0x80(%rsp)
shr    $0x2,%rdx
add    $0x1,%rdx
cmp    %r14,%rcx
seta   %cl
cmp    %r12,%rax
seta   %al
and    %cl,%al
mov    %al,0x24(%rsp)
mov    %edx,%ecx
and    $0x3,%ecx
movabs $0x7ffffffffffffffc,%rax
ff ff 7f
and    %rax,%rdx
mov    %rdx,0x60(%rsp)
mov    %r11d,%ebp
and    $0x3,%ebp
lea    0x10(%r14),%rax
mov    %rax,0x70(%rsp)
lea    0x10(%r12),%rax
mov    %rax,0x68(%rsp)
mov    %rcx,0x78(%rsp)
mov    %rcx,%rdi
shl    $0x5,%rdi
mov    %rbp,0x90(%rsp)
mov    %rdi,0x28(%rsp)
jmp    150e <makePosDefANDsolveLapack_v2+0x3de>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mulsd  0xb08(%rip),%xmm2
mov    0x90(%rsp),%rbp
mov    0x28(%rsp),%rdi
test   %r13d,%r13d
je     1792 <makePosDefANDsolveLapack_v2+0x662>
movsd  %xmm2,0x18(%rsp)
cmpl   $0x0,0x48(%rsp)
je     168f <makePosDefANDsolveLapack_v2+0x55f>
cmp    $0x4,%r11d
setb   %al
or     0x24(%rsp),%al
je     1540 <makePosDefANDsolveLapack_v2+0x410>
xor    %eax,%eax
jmp    161d <makePosDefANDsolveLapack_v2+0x4ed>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmpq   $0xc,0x80(%rsp)
jae    154f <makePosDefANDsolveLapack_v2+0x41f>
xor    %eax,%eax
jmp    15ca <makePosDefANDsolveLapack_v2+0x49a>
mov    0x60(%rsp),%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movups (%r12,%rax,8),%xmm0
movups 0x10(%r12,%rax,8),%xmm1
movups %xmm0,(%r14,%rax,8)
movups %xmm1,0x10(%r14,%rax,8)
movups 0x20(%r12,%rax,8),%xmm0
movups 0x30(%r12,%rax,8),%xmm1
movups %xmm0,0x20(%r14,%rax,8)
movups %xmm1,0x30(%r14,%rax,8)
movups 0x40(%r12,%rax,8),%xmm0
movups 0x50(%r12,%rax,8),%xmm1
movups %xmm0,0x40(%r14,%rax,8)
movups %xmm1,0x50(%r14,%rax,8)
movupd 0x60(%r12,%rax,8),%xmm0
movups 0x70(%r12,%rax,8),%xmm1
movupd %xmm0,0x60(%r14,%rax,8)
movups %xmm1,0x70(%r14,%rax,8)
add    $0x10,%rax
add    $0xfffffffffffffffc,%rcx
jne    1560 <makePosDefANDsolveLapack_v2+0x430>
cmpq   $0x0,0x78(%rsp)
je     160d <makePosDefANDsolveLapack_v2+0x4dd>
mov    0x70(%rsp),%rcx
lea    (%rcx,%rax,8),%rcx
mov    0x68(%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    15f0 <makePosDefANDsolveLapack_v2+0x4c0>
mov    0x88(%rsp),%rcx
mov    %rcx,%rax
cmp    %rcx,%r11
je     168f <makePosDefANDsolveLapack_v2+0x55f>
mov    %rax,%rcx
not    %rcx
add    %r11,%rcx
test   %rbp,%rbp
je     1646 <makePosDefANDsolveLapack_v2+0x516>
mov    %rbp,%rdx
xchg   %ax,%ax
movsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,(%r14,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1630 <makePosDefANDsolveLapack_v2+0x500>
cmp    $0x3,%rcx
jb     168f <makePosDefANDsolveLapack_v2+0x55f>
nopl   0x0(%rax)
movsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,(%r14,%rax,8)
movsd  0x8(%r12,%rax,8),%xmm0
movsd  %xmm0,0x8(%r14,%rax,8)
movsd  0x10(%r12,%rax,8),%xmm0
movsd  %xmm0,0x10(%r14,%rax,8)
movsd  0x18(%r12,%rax,8),%xmm0
movsd  %xmm0,0x18(%r14,%rax,8)
add    $0x4,%rax
cmp    %rax,%r11
jne    1650 <makePosDefANDsolveLapack_v2+0x520>
mov    %r11,%rbx
mov    %esi,(%rsp)
mov    $0x55,%edi
mov    $0x1,%edx
mov    %r15,%rcx
mov    %esi,%r8d
mov    %r14,%r9
call   1050 <dposv@plt>
mov    %eax,%r13d
test   %eax,%eax
jle    1780 <makePosDefANDsolveLapack_v2+0x650>
cmpl   $0x0,0x34(%rsp)
je     16d4 <makePosDefANDsolveLapack_v2+0x5a4>
mov    0x291a(%rip),%rax
mov    (%rax),%edi
lea    0x939(%rip),%rsi
call   1040 <fprintf@plt>
cmpl   $0x0,0x54(%rsp)
je     16ea <makePosDefANDsolveLapack_v2+0x5ba>
mov    %r15,%rdi
xor    %esi,%esi
mov    0x38(%rsp),%rdx
call   1030 <memset@plt>
cmpl   $0x0,0x48(%rsp)
movsd  0x18(%rsp),%xmm2
mov    0x40(%rsp),%r8
mov    0x14(%rsp),%esi
mov    0x58(%rsp),%r10
mov    %rbx,%r11
je     14f0 <makePosDefANDsolveLapack_v2+0x3c0>
xor    %r9d,%r9d
xor    %ecx,%ecx
jmp    172f <makePosDefANDsolveLapack_v2+0x5ff>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    %r10,%r9
mov    %rax,%rcx
cmp    %r11,%rax
je     14f0 <makePosDefANDsolveLapack_v2+0x3c0>
mov    %esi,%edx
imul   %ecx,%edx
add    %ecx,%edx
mov    (%r8,%rcx,8),%rdi
lea    0x1(%rcx),%rax
xor    %ebp,%ebp
jmp    1768 <makePosDefANDsolveLapack_v2+0x638>
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     1720 <makePosDefANDsolveLapack_v2+0x5f0>
cmp    %rbp,%rcx
jne    1750 <makePosDefANDsolveLapack_v2+0x620>
movsd  (%rdi,%rcx,8),%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,(%r15,%rdx,8)
jmp    175f <makePosDefANDsolveLapack_v2+0x62f>
xchg   %ax,%ax
movsd  0x18(%rsp),%xmm2
mov    0x14(%rsp),%esi
mov    %rbx,%r11
jmp    1500 <makePosDefANDsolveLapack_v2+0x3d0>
cmpl   $0x0,0x34(%rsp)
je     17bf <makePosDefANDsolveLapack_v2+0x68f>
mov    0x2840(%rip),%rax
mov    (%rax),%edi
lea    0x876(%rip),%rsi
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fprintf@plt>
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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