#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 atoi(char *);
int /*<<< orphan*/ choleskyblk(double *, int, int, int *);
int /*<<< orphan*/ choleskytile(double *, int, int, int *);
int /*<<< orphan*/ convtile(double *, double *, int, int, int);
int /*<<< orphan*/ dgemv_(char *, int *, int *, double const *, double *, int *,
                          double *, int const *, double const *, double *,
                          int const *, int);
int /*<<< orphan*/ dpotrs_(char *, int *, int const *, double *, int *,
                           double *, int *, int *, int);
double drand48();
int /*<<< orphan*/ exit(int);
scalar_t__ fabs(double);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  int i, j, n = 640, bs = 64, ft = 0, info;
  double *A, *B, *x, *b, *r, err;
  const double done = 1.0, dzero = 0.0;
  const int one = 1;
  if (argc >= 2) {
    if ((n = atoi(argv[1])) < 0)
      n = 640;
  }
  if (argc >= 3) {
    if ((bs = atoi(argv[2])) < 0)
      bs = 64;
  }
  if (n < bs || n % bs) {
    printf("ERROR: el tamaño de la matriz ha de ser divisible por bs\n");
    exit(1);
  }
  if (argc >= 4)
    ft = atoi(argv[3]);
  printf("Cholesky de matriz de orden %d, tamaño de bloque=%d %s\n", n, bs,
         ft ? "FORTRAN" : "TILE");
  B = (double *)malloc(n * n * sizeof(double));
  A = (double *)malloc(n * n * sizeof(double));
  x = (double *)malloc(n * sizeof(double));
  b = (double *)malloc(n * sizeof(double));
  r = (double *)malloc(n * sizeof(double));
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      A[i + n * j] = drand48();
      A[j + n * i] = A[i + n * j];
    }
  }
  for (i = 0; i < n; i++)
    A[i + i * n] += (double)n;
  for (i = 0; i < n; i++)
    x[i] = 1.0;
  dgemv_("N", &n, &n, &done, A, &n, x, &one, &dzero, b, &one, 1);
  if (ft)
    choleskyblk(A, n, bs, &info);
  else {
    convtile(A, B, n, bs, 0);
    choleskytile(B, n, bs, &info);
    convtile(B, A, n, bs, 1);
  }
  if (info != 0) {
    printf("ERROR: falló la factorización de Cholesky\n");
    exit(1);
  }
  dpotrs_("L", &n, &one, A, &n, b, &n, &info, 1);
  if (info != 0) {
    printf("ERROR: falló la resolución triangular\n");
    exit(1);
  }
  err = 0.0;
  for (i = 0; i < n; i++)
    err += fabs(1.0 - b[i]);
  printf("Error=%g\n", err);
  free(A);
  free(B);
  free(x);
  free(b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0xa8,%rsp
movl   $0x0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x280,-0x24(%rbp)
movl   $0x40,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movsd  0xe09(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x1,-0x74(%rbp)
cmpl   $0x2,-0x10(%rbp)
jl     123a <main+0x7a>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x24(%rbp)
cmp    $0x0,%eax
jge    1235 <main+0x75>
movl   $0x280,-0x24(%rbp)
jmp    123a <main+0x7a>
cmpl   $0x3,-0x10(%rbp)
jl     1269 <main+0xa9>
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x28(%rbp)
cmp    $0x0,%eax
jge    1264 <main+0xa4>
movl   $0x40,-0x28(%rbp)
jmp    1269 <main+0xa9>
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jl     1285 <main+0xc5>
mov    -0x24(%rbp),%eax
cltd
idivl  -0x28(%rbp)
cmp    $0x0,%edx
je     129d <main+0xdd>
lea    0xd7c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
cmpl   $0x4,-0x10(%rbp)
jl     12b7 <main+0xf7>
mov    -0x18(%rbp),%rax
mov    0x18(%rax),%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
mov    -0x2c(%rbp),%edi
lea    0xdbd(%rip),%rcx
lea    0xdae(%rip),%rax
cmp    $0x0,%edi
cmovne %rax,%rcx
lea    0xd67(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x24(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x24(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x38(%rbp)
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x48(%rbp)
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x50(%rbp)
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x58(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    13e2 <main+0x222>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    13cf <main+0x20f>
mov    $0x0,%al
call   10e0 <drand48@plt>
mov    -0x38(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    -0x24(%rbp),%edx
imul   -0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    -0x24(%rbp),%edx
imul   -0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%edx
imul   -0x1c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1366 <main+0x1a6>
jmp    13d4 <main+0x214>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1353 <main+0x193>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1425 <main+0x265>
cvtsi2sdl -0x24(%rbp),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    -0x1c(%rbp),%edx
imul   -0x24(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    13e9 <main+0x229>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    145b <main+0x29b>
mov    -0x48(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  0xbb8(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    142c <main+0x26c>
mov    -0x38(%rbp),%r8
mov    -0x48(%rbp),%rbx
mov    -0x50(%rbp),%r10
lea    0xc14(%rip),%rdi
lea    -0x24(%rbp),%r9
lea    -0x68(%rbp),%rcx
lea    -0x74(%rbp),%rax
lea    -0x70(%rbp),%r11
mov    %r9,%rsi
mov    %r9,%rdx
mov    %rbx,(%rsp)
mov    %rax,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %rax,0x20(%rsp)
movl   $0x1,0x28(%rsp)
call   10a0 <dgemv_@plt>
cmpl   $0x0,-0x2c(%rbp)
je     14cb <main+0x30b>
mov    -0x38(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
lea    -0x30(%rbp),%rcx
call   1040 <choleskyblk@plt>
jmp    150d <main+0x34d>
mov    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%ecx
xor    %r8d,%r8d
call   10d0 <convtile@plt>
mov    -0x40(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
lea    -0x30(%rbp),%rcx
call   1080 <choleskytile@plt>
mov    -0x40(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    $0x1,%r8d
call   10d0 <convtile@plt>
cmpl   $0x0,-0x30(%rbp)
je     152f <main+0x36f>
lea    0xb6b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
mov    -0x38(%rbp),%rcx
mov    -0x50(%rbp),%r9
lea    0xb78(%rip),%rdi
lea    -0x24(%rbp),%r10
lea    -0x74(%rbp),%rdx
lea    -0x30(%rbp),%rax
mov    %r10,%rsi
mov    %r10,%r8
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
movl   $0x1,0x10(%rsp)
call   1070 <dpotrs_@plt>
cmpl   $0x0,-0x30(%rbp)
je     1588 <main+0x3c8>
lea    0xb41(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    15da <main+0x41a>
mov    -0x50(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  0xa4d(%rip),%xmm0
subsd  (%rax,%rcx,8),%xmm0
call   1060 <fabs@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1597 <main+0x3d7>
movsd  -0x60(%rbp),%xmm0
lea    0xafb(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rsi,%r14
mov    %edi,%ebx
movl   $0x280,(%rsp)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x50(%rsp)
movq   $0x0,0x48(%rsp)
movl   $0x1,0x24(%rsp)
cmp    $0x2,%edi
jl     1251 <main+0x81>
mov    0x8(%r14),%rdi
call   10c0 <atoi@plt>
test   %eax,%eax
mov    $0x280,%esi
cmovns %eax,%esi
mov    %esi,(%rsp)
mov    $0x40,%ebp
cmp    $0x2,%ebx
je     1248 <main+0x78>
mov    0x10(%r14),%rdi
mov    %rsi,%rbp
call   10c0 <atoi@plt>
mov    %rbp,%rsi
test   %eax,%eax
mov    $0x40,%ebp
cmovns %eax,%ebp
cmp    %ebp,%esi
jae    125b <main+0x8b>
jmp    1709 <main+0x539>
mov    $0x280,%esi
mov    $0x40,%ebp
mov    %esi,%eax
xor    %edx,%edx
div    %ebp
test   %edx,%edx
jne    1709 <main+0x539>
cmp    $0x4,%ebx
mov    %rsi,%rax
mov    %rsi,0x8(%rsp)
jl     1299 <main+0xc9>
mov    0x18(%r14),%rdi
call   10c0 <atoi@plt>
mov    0x8(%rsp),%rsi
test   %eax,%eax
je     1299 <main+0xc9>
lea    0xdc2(%rip),%rcx
movl   $0x0,0x1c(%rsp)
jmp    12a6 <main+0xd6>
lea    0xdb9(%rip),%rcx
mov    $0x1,%al
mov    %eax,0x1c(%rsp)
lea    0xd6b(%rip),%rdi
mov    %ebp,0x20(%rsp)
mov    %ebp,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x8(%rsp),%rax
lea    0x0(,%rax,8),%r14d
mov    %r14d,%ebx
imul   0x8(%rsp),%ebx
mov    %ebx,%edi
call   10a0 <malloc@plt>
mov    %rax,%r15
mov    %ebx,%edi
call   10a0 <malloc@plt>
mov    %rax,%r13
mov    %r14d,%edi
call   10a0 <malloc@plt>
mov    %rax,%r12
mov    %r14d,%edi
call   10a0 <malloc@plt>
mov    %rax,0x40(%rsp)
mov    %r14d,%edi
call   10a0 <malloc@plt>
mov    0x8(%rsp),%rax
test   %eax,%eax
je     158d <main+0x3bd>
mov    %r12,0x30(%rsp)
mov    %r15,0x38(%rsp)
mov    %eax,%ebp
lea    0x0(,%rbp,8),%rbx
mov    %r13,%r14
mov    %r13,0x28(%rsp)
mov    %r13,%r15
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,0x10(%rsp)
xor    %r13d,%r13d
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10f0 <drand48@plt>
movsd  %xmm0,(%r14)
movsd  %xmm0,(%r15,%r13,8)
add    $0x1,%r13
add    %rbx,%r14
cmp    %r13,%rbp
jne    1350 <main+0x180>
add    $0x1,%r12
add    %rbx,%r15
mov    0x10(%rsp),%r14
add    $0x8,%r14
cmp    %rbp,%r12
jne    1340 <main+0x170>
mov    0x8(%rsp),%rbx
test   %ebx,%ebx
mov    0x38(%rsp),%r15
mov    0x30(%rsp),%r12
mov    0x28(%rsp),%r13
movabs $0x3ff0000000000000,%r11
je     158d <main+0x3bd>
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
xor    %eax,%eax
cmp    $0x1,%ebx
jne    13ce <main+0x1fe>
test   $0x1,%bpl
jne    144d <main+0x27d>
test   %ebx,%ebx
jne    146e <main+0x29e>
jmp    158d <main+0x3bd>
lea    (%rbx,%rbx,1),%r9d
mov    %ebp,%r8d
and    $0xfffffffe,%r8d
neg    %r8
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
movslq %ebx,%rbx
lea    (%rdi,%rbx,1),%r10
cltq
lea    (%rdx,%rax,1),%rcx
movsd  0x0(%r13,%rcx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%r13,%rcx,8)
movsd  0x0(%r13,%r10,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%r13,%r10,8)
add    $0x2,%rdx
add    %r9d,%eax
add    $0x2,%rdi
add    %r9d,%ebx
add    $0xfffffffffffffffe,%rsi
cmp    %rsi,%r8
jne    13f0 <main+0x220>
neg    %rsi
mov    %rsi,%rax
mov    0x8(%rsp),%rbx
test   $0x1,%bpl
je     13c1 <main+0x1f1>
mov    %ebx,%ecx
imul   %eax,%ecx
movslq %ecx,%rcx
add    %rax,%rcx
addsd  0x0(%r13,%rcx,8),%xmm0
movsd  %xmm0,0x0(%r13,%rcx,8)
test   %ebx,%ebx
je     158d <main+0x3bd>
cmp    $0x4,%ebx
jae    147a <main+0x2aa>
xor    %eax,%eax
jmp    1580 <main+0x3b0>
mov    %ebp,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x7,%ecx
cmp    $0x1c,%rsi
jae    14a0 <main+0x2d0>
xor    %esi,%esi
jmp    1545 <main+0x375>
and    $0xfffffffffffffff8,%rdx
xor    %esi,%esi
movapd 0xb52(%rip),%xmm0
xchg   %ax,%ax
movupd %xmm0,(%r12,%rsi,8)
movupd %xmm0,0x10(%r12,%rsi,8)
movupd %xmm0,0x20(%r12,%rsi,8)
movupd %xmm0,0x30(%r12,%rsi,8)
movupd %xmm0,0x40(%r12,%rsi,8)
movupd %xmm0,0x50(%r12,%rsi,8)
movupd %xmm0,0x60(%r12,%rsi,8)
movupd %xmm0,0x70(%r12,%rsi,8)
movupd %xmm0,0x80(%r12,%rsi,8)
movupd %xmm0,0x90(%r12,%rsi,8)
movupd %xmm0,0xa0(%r12,%rsi,8)
movupd %xmm0,0xb0(%r12,%rsi,8)
movupd %xmm0,0xc0(%r12,%rsi,8)
movupd %xmm0,0xd0(%r12,%rsi,8)
movupd %xmm0,0xe0(%r12,%rsi,8)
movupd %xmm0,0xf0(%r12,%rsi,8)
add    $0x20,%rsi
add    $0xfffffffffffffff8,%rdx
jne    14b0 <main+0x2e0>
test   %rcx,%rcx
je     1574 <main+0x3a4>
lea    (%r12,%rsi,8),%rdx
add    $0x10,%rdx
shl    $0x5,%rcx
xor    %esi,%esi
movapd 0xaa0(%rip),%xmm0
movupd %xmm0,-0x10(%rdx,%rsi,1)
movupd %xmm0,(%rdx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%rcx
jne    1560 <main+0x390>
cmp    %rbp,%rax
je     158d <main+0x3bd>
nopl   0x0(%rax)
mov    %r11,(%r12,%rax,8)
add    $0x1,%rax
cmp    %rax,%rbp
jne    1580 <main+0x3b0>
lea    0x24(%rsp),%rax
lea    0x48(%rsp),%r10
lea    0xab9(%rip),%rdi
lea    0x50(%rsp),%rcx
mov    %rsp,%r14
mov    %r14,%rsi
mov    %r14,%rdx
mov    %r13,%r8
mov    %r14,%r9
push   $0x1
push   %rax
mov    0x50(%rsp),%rbp
push   %rbp
push   %r10
push   %rax
push   %r12
call   10b0 <dgemv_@plt>
add    $0x30,%rsp
mov    (%rsp),%edx
cmpb   $0x0,0x1c(%rsp)
je     1611 <main+0x441>
mov    %r13,%rdi
mov    %r15,%rsi
mov    0x20(%rsp),%ebx
mov    %ebx,%ecx
xor    %r8d,%r8d
call   10e0 <convtile@plt>
mov    (%rsp),%esi
lea    0x4(%rsp),%rcx
mov    %r15,%rdi
mov    %ebx,%edx
call   1090 <choleskytile@plt>
mov    (%rsp),%edx
mov    %r15,%rdi
mov    %r13,%rsi
mov    %ebx,%ecx
mov    $0x1,%r8d
call   10e0 <convtile@plt>
jmp    1624 <main+0x454>
lea    0x4(%rsp),%rcx
mov    %r13,%rdi
mov    %edx,%esi
mov    0x20(%rsp),%edx
call   1050 <choleskyblk@plt>
cmpl   $0x0,0x4(%rsp)
jne    1712 <main+0x542>
sub    $0x8,%rsp
lea    0xc(%rsp),%rax
lea    0xa1f(%rip),%rdi
lea    0x2c(%rsp),%rdx
mov    %r14,%rsi
mov    %r13,%rcx
mov    %r14,%r8
mov    %rbp,%r9
push   $0x1
push   %rax
push   %r14
call   1080 <dpotrs_@plt>
add    $0x20,%rsp
cmpl   $0x0,0x4(%rsp)
jne    171b <main+0x54b>
cmpl   $0x0,(%rsp)
jle    16c6 <main+0x4f6>
xorpd  %xmm0,%xmm0
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  %xmm0,0x10(%rsp)
movsd  0x982(%rip),%xmm0
subsd  0x0(%rbp,%rbx,8),%xmm0
call   1070 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  0x10(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0x10(%rsp),%xmm0
add    $0x1,%rbx
movslq (%rsp),%rax
cmp    %rax,%rbx
jl     1680 <main+0x4b0>
jmp    16ca <main+0x4fa>
xorpd  %xmm0,%xmm0
lea    0x98f(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x9ae(%rip),%rdi
jmp    1722 <main+0x552>
lea    0x979(%rip),%rdi
jmp    1722 <main+0x552>
lea    0x948(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
@.str = [59 x i8] c"ERROR: el tama\C3\B1o de la matriz ha de ser divisible por bs\0A\00"
@.str.1 = [57 x i8] c"Cholesky de matriz de orden %d, tama\C3\B1o de bloque=%d %s\0A\00"
@.str.2 = [8 x i8] c"FORTRAN\00"
@.str.3 = [5 x i8] c"TILE\00"
@.str.4 = [2 x i8] c"N\00"
@.str.5 = [45 x i8] c"ERROR: fall\C3\B3 la factorizaci\C3\B3n de Cholesky\0A\00"
@.str.6 = [2 x i8] c"L\00"
@.str.7 = [41 x i8] c"ERROR: fall\C3\B3 la resoluci\C3\B3n triangular\0A\00"
@.str.8 = [10 x i8] c"Error=%g\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 640, i32* %8
store i32 64, i32* %9
store i32 0, i32* %10
store double 1.000000e+00, double* %18
store double 0.000000e+00, double* %19
store i32 1, i32* %20
%21 = load i32, i32* %4
%22 = icmp sge i32 %21, 2
br i1 %22, label %23, label %31
23: ; preds = %2
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i32 @atoi(i8* %26)
store i32 %27, i32* %8
%28 = icmp slt i32 %27, 0
br i1 %28, label %29, label %30
29: ; preds = %23
store i32 640, i32* %8
br label %30
30: ; preds = %29, %23
br label %31
31: ; preds = %30, %2
%32 = load i32, i32* %4
%33 = icmp sge i32 %32, 3
br i1 %33, label %34, label %42
34: ; preds = %31
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 2
%37 = load i8*, i8** %36
%38 = call i32 @atoi(i8* %37)
store i32 %38, i32* %9
%39 = icmp slt i32 %38, 0
br i1 %39, label %40, label %41
40: ; preds = %34
store i32 64, i32* %9
br label %41
41: ; preds = %40, %34
br label %42
42: ; preds = %41, %31
%43 = load i32, i32* %8
%44 = load i32, i32* %9
%45 = icmp slt i32 %43, %44
br i1 %45, label %51, label %46
46: ; preds = %42
%47 = load i32, i32* %8
%48 = load i32, i32* %9
%49 = srem i32 %47, %48
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %54
51: ; preds = %46, %42
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%53 = call i32 @exit(i32 1)
unreachable
54: ; preds = %46
%55 = load i32, i32* %4
%56 = icmp sge i32 %55, 4
br i1 %56, label %57, label %62
57: ; preds = %54
%58 = load i8**, i8*** %5
%59 = getelementptr inbounds i8*, i8** %58, i64 3
%60 = load i8*, i8** %59
%61 = call i32 @atoi(i8* %60)
store i32 %61, i32* %10
br label %62
62: ; preds = %57, %54
%63 = load i32, i32* %8
%64 = load i32, i32* %9
%65 = load i32, i32* %10
%66 = icmp ne i32 %65, 0
%67 = zext i1 %66 to i64
%68 = select i1 %66, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0)
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0), i32 %63, i32 %64, i8* %68)
%70 = load i32, i32* %8
%71 = load i32, i32* %8
%72 = mul nsw i32 %70, %71
%73 = sext i32 %72 to i64
%74 = mul i64 %73, 8
%75 = trunc i64 %74 to i32
%76 = call i64 @malloc(i32 %75)
%77 = inttoptr i64 %76 to double*
store double* %77, double** %13
%78 = load i32, i32* %8
%79 = load i32, i32* %8
%80 = mul nsw i32 %78, %79
%81 = sext i32 %80 to i64
%82 = mul i64 %81, 8
%83 = trunc i64 %82 to i32
%84 = call i64 @malloc(i32 %83)
%85 = inttoptr i64 %84 to double*
store double* %85, double** %12
%86 = load i32, i32* %8
%87 = sext i32 %86 to i64
%88 = mul i64 %87, 8
%89 = trunc i64 %88 to i32
%90 = call i64 @malloc(i32 %89)
%91 = inttoptr i64 %90 to double*
store double* %91, double** %14
%92 = load i32, i32* %8
%93 = sext i32 %92 to i64
%94 = mul i64 %93, 8
%95 = trunc i64 %94 to i32
%96 = call i64 @malloc(i32 %95)
%97 = inttoptr i64 %96 to double*
store double* %97, double** %15
%98 = load i32, i32* %8
%99 = sext i32 %98 to i64
%100 = mul i64 %99, 8
%101 = trunc i64 %100 to i32
%102 = call i64 @malloc(i32 %101)
%103 = inttoptr i64 %102 to double*
store double* %103, double** %16
store i32 0, i32* %6
br label %104
104: ; preds = %144, %62
%105 = load i32, i32* %6
%106 = load i32, i32* %8
%107 = icmp slt i32 %105, %106
br i1 %107, label %108, label %147
108: ; preds = %104
store i32 0, i32* %7
br label %109
109: ; preds = %140, %108
%110 = load i32, i32* %7
%111 = load i32, i32* %8
%112 = icmp slt i32 %110, %111
br i1 %112, label %113, label %143
113: ; preds = %109
%114 = call double (...) @drand48()
%115 = load double*, double** %12
%116 = load i32, i32* %6
%117 = load i32, i32* %8
%118 = load i32, i32* %7
%119 = mul nsw i32 %117, %118
%120 = add nsw i32 %116, %119
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds double, double* %115, i64 %121
store double %114, double* %122
%123 = load double*, double** %12
%124 = load i32, i32* %6
%125 = load i32, i32* %8
%126 = load i32, i32* %7
%127 = mul nsw i32 %125, %126
%128 = add nsw i32 %124, %127
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds double, double* %123, i64 %129
%131 = load double, double* %130
%132 = load double*, double** %12
%133 = load i32, i32* %7
%134 = load i32, i32* %8
%135 = load i32, i32* %6
%136 = mul nsw i32 %134, %135
%137 = add nsw i32 %133, %136
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds double, double* %132, i64 %138
store double %131, double* %139
br label %140
140: ; preds = %113
%141 = load i32, i32* %7
%142 = add nsw i32 %141, 1
store i32 %142, i32* %7
br label %109
143: ; preds = %109
br label %144
144: ; preds = %143
%145 = load i32, i32* %6
%146 = add nsw i32 %145, 1
store i32 %146, i32* %6
br label %104
147: ; preds = %104
store i32 0, i32* %6
br label %148
148: ; preds = %165, %147
%149 = load i32, i32* %6
%150 = load i32, i32* %8
%151 = icmp slt i32 %149, %150
br i1 %151, label %152, label %168
152: ; preds = %148
%153 = load i32, i32* %8
%154 = sitofp i32 %153 to double
%155 = load double*, double** %12
%156 = load i32, i32* %6
%157 = load i32, i32* %6
%158 = load i32, i32* %8
%159 = mul nsw i32 %157, %158
%160 = add nsw i32 %156, %159
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds double, double* %155, i64 %161
%163 = load double, double* %162
%164 = fadd double %163, %154
store double %164, double* %162
br label %165
165: ; preds = %152
%166 = load i32, i32* %6
%167 = add nsw i32 %166, 1
store i32 %167, i32* %6
br label %148
168: ; preds = %148
store i32 0, i32* %6
br label %169
169: ; preds = %178, %168
%170 = load i32, i32* %6
%171 = load i32, i32* %8
%172 = icmp slt i32 %170, %171
br i1 %172, label %173, label %181
173: ; preds = %169
%174 = load double*, double** %14
%175 = load i32, i32* %6
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds double, double* %174, i64 %176
store double 1.000000e+00, double* %177
br label %178
178: ; preds = %173
%179 = load i32, i32* %6
%180 = add nsw i32 %179, 1
store i32 %180, i32* %6
br label %169
181: ; preds = %169
%182 = load double*, double** %12
%183 = load double*, double** %14
%184 = load double*, double** %15
%185 = call i32 @dgemv_(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i32* %8, i32* %8, double* %18, double* %182, i32* %8, double* %183, i32* %20, double* %19, double* %184, i32* %20, i32 1)
%186 = load i32, i32* %10
%187 = icmp ne i32 %186, 0
br i1 %187, label %188, label %193
188: ; preds = %181
%189 = load double*, double** %12
%190 = load i32, i32* %8
%191 = load i32, i32* %9
%192 = call i32 @choleskyblk(double* %189, i32 %190, i32 %191, i32* %11)
br label %208
193: ; preds = %181
%194 = load double*, double** %12
%195 = load double*, double** %13
%196 = load i32, i32* %8
%197 = load i32, i32* %9
%198 = call i32 @convtile(double* %194, double* %195, i32 %196, i32 %197, i32 0)
%199 = load double*, double** %13
%200 = load i32, i32* %8
%201 = load i32, i32* %9
%202 = call i32 @choleskytile(double* %199, i32 %200, i32 %201, i32* %11)
%203 = load double*, double** %13
%204 = load double*, double** %12
%205 = load i32, i32* %8
%206 = load i32, i32* %9
%207 = call i32 @convtile(double* %203, double* %204, i32 %205, i32 %206, i32 1)
br label %208
208: ; preds = %193, %188
%209 = load i32, i32* %11
%210 = icmp ne i32 %209, 0
br i1 %210, label %211, label %214
211: ; preds = %208
%212 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.5, i64 0, i64 0))
%213 = call i32 @exit(i32 1)
unreachable
214: ; preds = %208
%215 = load double*, double** %12
%216 = load double*, double** %15
%217 = call i32 @dpotrs_(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i32* %8, i32* %20, double* %215, i32* %8, double* %216, i32* %8, i32* %11, i32 1)
%218 = load i32, i32* %11
%219 = icmp ne i32 %218, 0
br i1 %219, label %220, label %223
220: ; preds = %214
%221 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0))
%222 = call i32 @exit(i32 1)
unreachable
223: ; preds = %214
store double 0.000000e+00, double* %17
store i32 0, i32* %6
br label %224
224: ; preds = %239, %223
%225 = load i32, i32* %6
%226 = load i32, i32* %8
%227 = icmp slt i32 %225, %226
br i1 %227, label %228, label %242
228: ; preds = %224
%229 = load double*, double** %15
%230 = load i32, i32* %6
%231 = sext i32 %230 to i64
%232 = getelementptr inbounds double, double* %229, i64 %231
%233 = load double, double* %232
%234 = fsub double 1.000000e+00, %233
%235 = call i64 @fabs(double %234)
%236 = sitofp i64 %235 to double
%237 = load double, double* %17
%238 = fadd double %237, %236
store double %238, double* %17
br label %239
239: ; preds = %228
%240 = load i32, i32* %6
%241 = add nsw i32 %240, 1
store i32 %241, i32* %6
br label %224
242: ; preds = %224
%243 = load double, double* %17
%244 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), double %243)
%245 = load double*, double** %12
%246 = call i32 @free(double* %245)
%247 = load double*, double** %13
%248 = call i32 @free(double* %247)
%249 = load double*, double** %14
%250 = call i32 @free(double* %249)
%251 = load double*, double** %15
%252 = call i32 @free(double* %251)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [57 x i8] c"Cholesky de matriz de orden %d, tama\C3\B1o de bloque=%d %s\0A\00"
@.str.2 = [8 x i8] c"FORTRAN\00"
@.str.3 = [5 x i8] c"TILE\00"
@.str.4 = [2 x i8] c"N\00"
@.str.6 = [2 x i8] c"L\00"
@.str.8 = [10 x i8] c"Error=%g\0A\00"
@str = [40 x i8] c"ERROR: fall\C3\B3 la resoluci\C3\B3n triangular\00"
@str.9 = [44 x i8] c"ERROR: fall\C3\B3 la factorizaci\C3\B3n de Cholesky\00"
@str.10 = [58 x i8] c"ERROR: el tama\C3\B1o de la matriz ha de ser divisible por bs\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
%6 = alloca double
%7 = alloca i32
%8 = bitcast i32* %3 to i8*
store i32 640, i32* %3
%9 = bitcast i32* %4 to i8*
%10 = bitcast double* %5 to i8*
store double 1.000000e+00, double* %5
%11 = bitcast double* %6 to i8*
store double 0.000000e+00, double* %6
%12 = bitcast i32* %7 to i8*
store i32 1, i32* %7
%13 = icmp sgt i32 %0, 1
br i1 %13, label %14, label %30
14: ; preds = %2
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = tail call i32 @atoi(i8* %16)
%18 = icmp slt i32 %17, 0
%19 = select i1 %18, i32 640, i32 %17
store i32 %19, i32* %3
%20 = icmp eq i32 %0, 2
br i1 %20, label %27, label %21
21: ; preds = %14
%22 = getelementptr inbounds i8*, i8** %1, i64 2
%23 = load i8*, i8** %22
%24 = tail call i32 @atoi(i8* %23)
%25 = icmp slt i32 %24, 0
%26 = select i1 %25, i32 64, i32 %24
br label %27
27: ; preds = %21, %14
%28 = phi i32 [ %26, %21 ], [ 64, %14 ]
%29 = icmp ult i32 %19, %28
br i1 %29, label %35, label %30
30: ; preds = %2, %27
%31 = phi i32 [ %28, %27 ], [ 64, %2 ]
%32 = phi i32 [ %19, %27 ], [ 640, %2 ]
%33 = urem i32 %32, %31
%34 = icmp eq i32 %33, 0
br i1 %34, label %38, label %35
35: ; preds = %30, %27
%36 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.10, i64 0, i64 0))
%37 = tail call i32 @exit(i32 1)
unreachable
38: ; preds = %30
%39 = icmp sgt i32 %0, 3
br i1 %39, label %40, label %45
40: ; preds = %38
%41 = getelementptr inbounds i8*, i8** %1, i64 3
%42 = load i8*, i8** %41
%43 = tail call i32 @atoi(i8* %42)
%44 = icmp eq i32 %43, 0
br i1 %44, label %45, label %46
45: ; preds = %38, %40
br label %46
46: ; preds = %40, %45
%47 = phi i1 [ true, %45 ], [ false, %40 ]
%48 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), %45 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), %40 ]
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0), i32 %32, i32 %31, i8* %48)
%50 = shl i32 %32, 3
%51 = mul i32 %50, %32
%52 = tail call i64 @malloc(i32 %51)
%53 = inttoptr i64 %52 to double*
%54 = tail call i64 @malloc(i32 %51)
%55 = inttoptr i64 %54 to double*
%56 = tail call i64 @malloc(i32 %50)
%57 = inttoptr i64 %56 to double*
%58 = tail call i64 @malloc(i32 %50)
%59 = inttoptr i64 %58 to double*
%60 = tail call i64 @malloc(i32 %50)
%61 = icmp eq i32 %32, 0
br i1 %61, label %200, label %62
62: ; preds = %46
%63 = zext i32 %32 to i64
%64 = zext i32 %32 to i64
br label %65
65: ; preds = %85, %62
%66 = phi i64 [ 0, %62 ], [ %86, %85 ]
%67 = mul nsw i64 %66, %63
br label %75
68: ; preds = %85
br i1 %61, label %200, label %69
69: ; preds = %68
%70 = sitofp i32 %32 to double
%71 = and i64 %63, 1
%72 = icmp eq i32 %32, 1
br i1 %72, label %88, label %73
73: ; preds = %69
%74 = and i64 %63, 4294967294
br label %174
75: ; preds = %65, %75
%76 = phi i64 [ 0, %65 ], [ %83, %75 ]
%77 = tail call double (...) @drand48()
%78 = mul nsw i64 %76, %63
%79 = add nuw nsw i64 %78, %66
%80 = getelementptr inbounds double, double* %55, i64 %79
store double %77, double* %80
%81 = add nuw nsw i64 %67, %76
%82 = getelementptr inbounds double, double* %55, i64 %81
store double %77, double* %82
%83 = add nuw nsw i64 %76, 1
%84 = icmp eq i64 %83, %64
br i1 %84, label %85, label %75
85: ; preds = %75
%86 = add nuw nsw i64 %66, 1
%87 = icmp eq i64 %86, %64
br i1 %87, label %68, label %65
88: ; preds = %174, %69
%89 = phi i64 [ 0, %69 ], [ %192, %174 ]
%90 = icmp eq i64 %71, 0
br i1 %90, label %99, label %91
91: ; preds = %88
%92 = trunc i64 %89 to i32
%93 = mul nsw i32 %32, %92
%94 = sext i32 %93 to i64
%95 = add nsw i64 %89, %94
%96 = getelementptr inbounds double, double* %55, i64 %95
%97 = load double, double* %96
%98 = fadd double %97, %70
store double %98, double* %96
br label %99
99: ; preds = %88, %91
br i1 %61, label %200, label %100
100: ; preds = %99
%101 = zext i32 %32 to i64
%102 = icmp ult i32 %32, 4
br i1 %102, label %172, label %103
103: ; preds = %100
%104 = and i64 %64, 4294967292
%105 = add nsw i64 %104, -4
%106 = lshr exact i64 %105, 2
%107 = add nuw nsw i64 %106, 1
%108 = and i64 %107, 7
%109 = icmp ult i64 %105, 28
br i1 %109, label %157, label %110
110: ; preds = %103
%111 = and i64 %107, 9223372036854775800
br label %112
112: ; preds = %112, %110
%113 = phi i64 [ 0, %110 ], [ %154, %112 ]
%114 = phi i64 [ 0, %110 ], [ %155, %112 ]
%115 = getelementptr inbounds double, double* %57, i64 %113
%116 = bitcast double* %115 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %116
%117 = getelementptr inbounds double, double* %115, i64 2
%118 = bitcast double* %117 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %118
%119 = or i64 %113, 4
%120 = getelementptr inbounds double, double* %57, i64 %119
%121 = bitcast double* %120 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %121
%122 = getelementptr inbounds double, double* %120, i64 2
%123 = bitcast double* %122 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %123
%124 = or i64 %113, 8
%125 = getelementptr inbounds double, double* %57, i64 %124
%126 = bitcast double* %125 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %126
%127 = getelementptr inbounds double, double* %125, i64 2
%128 = bitcast double* %127 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %128
%129 = or i64 %113, 12
%130 = getelementptr inbounds double, double* %57, i64 %129
%131 = bitcast double* %130 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %131
%132 = getelementptr inbounds double, double* %130, i64 2
%133 = bitcast double* %132 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %133
%134 = or i64 %113, 16
%135 = getelementptr inbounds double, double* %57, i64 %134
%136 = bitcast double* %135 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %136
%137 = getelementptr inbounds double, double* %135, i64 2
%138 = bitcast double* %137 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %138
%139 = or i64 %113, 20
%140 = getelementptr inbounds double, double* %57, i64 %139
%141 = bitcast double* %140 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %141
%142 = getelementptr inbounds double, double* %140, i64 2
%143 = bitcast double* %142 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %143
%144 = or i64 %113, 24
%145 = getelementptr inbounds double, double* %57, i64 %144
%146 = bitcast double* %145 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %146
%147 = getelementptr inbounds double, double* %145, i64 2
%148 = bitcast double* %147 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %148
%149 = or i64 %113, 28
%150 = getelementptr inbounds double, double* %57, i64 %149
%151 = bitcast double* %150 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %151
%152 = getelementptr inbounds double, double* %150, i64 2
%153 = bitcast double* %152 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %153
%154 = add nuw i64 %113, 32
%155 = add i64 %114, 8
%156 = icmp eq i64 %155, %111
br i1 %156, label %157, label %112
157: ; preds = %112, %103
%158 = phi i64 [ 0, %103 ], [ %154, %112 ]
%159 = icmp eq i64 %108, 0
br i1 %159, label %170, label %160
160: ; preds = %157, %160
%161 = phi i64 [ %167, %160 ], [ %158, %157 ]
%162 = phi i64 [ %168, %160 ], [ 0, %157 ]
%163 = getelementptr inbounds double, double* %57, i64 %161
%164 = bitcast double* %163 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %164
%165 = getelementptr inbounds double, double* %163, i64 2
%166 = bitcast double* %165 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %166
%167 = add nuw i64 %161, 4
%168 = add i64 %162, 1
%169 = icmp eq i64 %168, %108
br i1 %169, label %170, label %160
170: ; preds = %160, %157
%171 = icmp eq i64 %104, %64
br i1 %171, label %200, label %172
172: ; preds = %100, %170
%173 = phi i64 [ 0, %100 ], [ %104, %170 ]
br label %195
174: ; preds = %174, %73
%175 = phi i64 [ 0, %73 ], [ %192, %174 ]
%176 = phi i64 [ 0, %73 ], [ %193, %174 ]
%177 = trunc i64 %175 to i32
%178 = mul nsw i32 %32, %177
%179 = sext i32 %178 to i64
%180 = add nsw i64 %175, %179
%181 = getelementptr inbounds double, double* %55, i64 %180
%182 = load double, double* %181
%183 = fadd double %182, %70
store double %183, double* %181
%184 = or i64 %175, 1
%185 = trunc i64 %184 to i32
%186 = mul nsw i32 %32, %185
%187 = sext i32 %186 to i64
%188 = add nsw i64 %184, %187
%189 = getelementptr inbounds double, double* %55, i64 %188
%190 = load double, double* %189
%191 = fadd double %190, %70
store double %191, double* %189
%192 = add nuw nsw i64 %175, 2
%193 = add i64 %176, 2
%194 = icmp eq i64 %193, %74
br i1 %194, label %88, label %174
195: ; preds = %172, %195
%196 = phi i64 [ %198, %195 ], [ %173, %172 ]
%197 = getelementptr inbounds double, double* %57, i64 %196
store double 1.000000e+00, double* %197
%198 = add nuw nsw i64 %196, 1
%199 = icmp eq i64 %198, %101
br i1 %199, label %200, label %195
200: ; preds = %195, %170, %46, %68, %99
%201 = call i32 @dgemv_(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i32* %3, i32* %3, double* %5, double* %55, i32* %3, double* %57, i32* %7, double* %6, double* %59, i32* %7, i32 1)
%202 = load i32, i32* %3
br i1 %47, label %205, label %203
203: ; preds = %200
%204 = call i32 @choleskyblk(double* %55, i32 %202, i32 %31, i32* %4)
br label %211
205: ; preds = %200
%206 = call i32 @convtile(double* %55, double* %53, i32 %202, i32 %31, i32 0)
%207 = load i32, i32* %3
%208 = call i32 @choleskytile(double* %53, i32 %207, i32 %31, i32* %4)
%209 = load i32, i32* %3
%210 = call i32 @convtile(double* %53, double* %55, i32 %209, i32 %31, i32 1)
br label %211
211: ; preds = %205, %203
%212 = load i32, i32* %4
%213 = icmp eq i32 %212, 0
br i1 %213, label %217, label %214
214: ; preds = %211
%215 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.9, i64 0, i64 0))
%216 = call i32 @exit(i32 1)
unreachable
217: ; preds = %211
%218 = call i32 @dpotrs_(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i32* %3, i32* %7, double* %55, i32* %3, double* %59, i32* %3, i32* %4, i32 1)
%219 = load i32, i32* %4
%220 = icmp eq i32 %219, 0
br i1 %220, label %221, label %224
221: ; preds = %217
%222 = load i32, i32* %3
%223 = icmp sgt i32 %222, 0
br i1 %223, label %227, label %240
224: ; preds = %217
%225 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%226 = call i32 @exit(i32 1)
unreachable
227: ; preds = %221, %227
%228 = phi i64 [ %236, %227 ], [ 0, %221 ]
%229 = phi double [ %235, %227 ], [ 0.000000e+00, %221 ]
%230 = getelementptr inbounds double, double* %59, i64 %228
%231 = load double, double* %230
%232 = fsub double 1.000000e+00, %231
%233 = call i64 @fabs(double %232)
%234 = sitofp i64 %233 to double
%235 = fadd double %229, %234
%236 = add nuw nsw i64 %228, 1
%237 = load i32, i32* %3
%238 = sext i32 %237 to i64
%239 = icmp slt i64 %236, %238
br i1 %239, label %227, label %240
240: ; preds = %227, %221
%241 = phi double [ 0.000000e+00, %221 ], [ %235, %227 ]
%242 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), double %241)
%243 = call i32 @free(double* %55)
%244 = call i32 @free(double* %53)
%245 = call i32 @free(double* %57)
%246 = call i32 @free(double* %59)
ret i32 0
}