#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free_matrix(float **, int, int, int, int);
int /*<<< orphan*/ free_vector(float *, int, int);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ getchar();
float **matrix(int, int, int, int);
int /*<<< orphan*/ nrerror(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ qrdcmp(float **, int, float *, float *, int *);
int /*<<< orphan*/ qrsolv(float **, int, float *, float *, float *);
int /*<<< orphan*/ stderr;
float *vector(int, int);
int main(void) {
  int j, k, l, m, n, sing;
  float *x, **a, **ai, **b, *c, *d;
  char dummy[80];
  FILE *fp;
  x = vector(1, 20);
  a = matrix(1, 20, 1, 20);
  b = matrix(1, 20, 1, 20);
  ai = matrix(1, 20, 1, 20);
  c = vector(1, 20);
  d = vector(1, 20);
  if ((fp = fopen("matrx1.dat", "r")) == NULL)
    nrerror("Data file matrx1.dat not found\n");
  while (!feof(fp)) {
    fgets(dummy, 80, fp);
    fgets(dummy, 80, fp);
    fscanf(fp, "%d %d ", &n, &m);
    fgets(dummy, 80, fp);
    for (k = 1; k <= n; k++)
      for (l = 1; l <= n; l++)
        fscanf(fp, "%f ", &a[k][l]);
    fgets(dummy, 80, fp);
    for (l = 1; l <= m; l++)
      for (k = 1; k <= n; k++)
        fscanf(fp, "%f ", &b[k][l]);
    for (l = 1; l <= n; l++)
      for (k = 1; k <= n; k++)
        ai[k][l] = a[k][l];
    qrdcmp(a, n, c, d, &sing);
    if (sing)
      fprintf(stderr, "Singularity in QR decomposition.\n");
    for (k = 1; k <= m; k++) {
      for (l = 1; l <= n; l++)
        x[l] = b[l][k];
      qrsolv(a, n, c, d, x);
      printf("right-hand side vector:\n");
      for (l = 1; l <= n; l++)
        printf("%12.6f", b[l][k]);
      printf("\n%s%s\n", "result of matrix applied", " to sol'n vector");
      for (l = 1; l <= n; l++) {
        b[l][k] = 0.0;
        for (j = 1; j <= n; j++)
          b[l][k] += (ai[l][j] * x[j]);
      }
      for (l = 1; l <= n; l++)
        printf("%12.6f", b[l][k]);
      printf("\n*********************************\n");
    }
    printf("press RETURN for next problem:\n");
    (void)getchar();
  }
  fclose(fp);
  free_vector(d, 1, 20);
  free_vector(c, 1, 20);
  free_matrix(ai, 1, 20, 1, 20);
  free_matrix(b, 1, 20, 1, 20);
  free_matrix(a, 1, 20, 1, 20);
  free_vector(x, 1, 20);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x14,%esi
call   10f0 <vector@plt>
mov    %rax,-0x28(%rbp)
mov    $0x1,%edx
mov    $0x14,%ecx
mov    %edx,%edi
mov    %ecx,%esi
call   10e0 <matrix@plt>
mov    %rax,-0x30(%rbp)
mov    $0x1,%edx
mov    $0x14,%ecx
mov    %edx,%edi
mov    %ecx,%esi
call   10e0 <matrix@plt>
mov    %rax,-0x40(%rbp)
mov    $0x1,%edx
mov    $0x14,%ecx
mov    %edx,%edi
mov    %ecx,%esi
call   10e0 <matrix@plt>
mov    %rax,-0x38(%rbp)
mov    $0x1,%edi
mov    $0x14,%esi
call   10f0 <vector@plt>
mov    %rax,-0x48(%rbp)
mov    $0x1,%edi
mov    $0x14,%esi
call   10f0 <vector@plt>
mov    %rax,-0x50(%rbp)
lea    0xd79(%rip),%rdi
lea    0xe19(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0xa8(%rbp)
cmp    $0x0,%rax
jne    12b0 <main+0xc0>
lea    0xd60(%rip),%rdi
call   1050 <nrerror@plt>
jmp    12b5 <main+0xc5>
mov    -0xa8(%rbp),%rdi
call   10d0 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    12d6 <main+0xe6>
jmp    16e2 <main+0x4f2>
lea    -0xa0(%rbp),%rdi
mov    -0xa8(%rbp),%rdx
mov    $0x50,%esi
call   10a0 <fgets@plt>
lea    -0xa0(%rbp),%rdi
mov    -0xa8(%rbp),%rdx
mov    $0x50,%esi
call   10a0 <fgets@plt>
mov    -0xa8(%rbp),%rdi
lea    0xd17(%rip),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x14(%rbp),%rcx
mov    $0x0,%al
call   1090 <fscanf@plt>
lea    -0xa0(%rbp),%rdi
mov    -0xa8(%rbp),%rdx
mov    $0x50,%esi
call   10a0 <fgets@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     13ae <main+0x1be>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     139b <main+0x1ab>
mov    -0xa8(%rbp),%rdi
mov    -0x30(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
movslq -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
lea    0xcac(%rip),%rsi
mov    $0x0,%al
call   1090 <fscanf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1355 <main+0x165>
jmp    13a0 <main+0x1b0>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1342 <main+0x152>
lea    -0xa0(%rbp),%rdi
mov    -0xa8(%rbp),%rdx
mov    $0x50,%esi
call   10a0 <fgets@plt>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1439 <main+0x249>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     1426 <main+0x236>
mov    -0xa8(%rbp),%rdi
mov    -0x40(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
movslq -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
lea    0xc21(%rip),%rsi
mov    $0x0,%al
call   1090 <fscanf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    13e0 <main+0x1f0>
jmp    142b <main+0x23b>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    13cd <main+0x1dd>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     14aa <main+0x2ba>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     1497 <main+0x2a7>
mov    -0x30(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x38(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1453 <main+0x263>
jmp    149c <main+0x2ac>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1440 <main+0x250>
mov    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x48(%rbp),%rdx
mov    -0x50(%rbp),%rcx
lea    -0x1c(%rbp),%r8
call   1100 <qrdcmp@plt>
cmpl   $0x0,-0x1c(%rbp)
je     14e1 <main+0x2f1>
mov    0x2b0d(%rip),%rax
mov    (%rax),%edi
lea    0xb5a(%rip),%rsi
call   10c0 <fprintf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     16c8 <main+0x4d8>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     1537 <main+0x347>
mov    -0x40(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x10(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    14fb <main+0x30b>
mov    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x48(%rbp),%rdx
mov    -0x50(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1040 <qrsolv@plt>
lea    0xb02(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     15a5 <main+0x3b5>
mov    -0x40(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xae1(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1564 <main+0x374>
lea    0xacc(%rip),%rdi
lea    0xacc(%rip),%rsi
lea    0xade(%rip),%rdx
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     1664 <main+0x474>
mov    -0x40(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0xc(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     1651 <main+0x461>
mov    -0x38(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
mov    -0x40(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    15f3 <main+0x403>
jmp    1656 <main+0x466>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    15c8 <main+0x3d8>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     16ac <main+0x4bc>
mov    -0x40(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0x9da(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    166b <main+0x47b>
lea    0x9f6(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    14e8 <main+0x2f8>
lea    0x9fe(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x0,%al
call   10b0 <getchar@plt>
jmp    12b5 <main+0xc5>
mov    -0xa8(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x50(%rbp),%rdi
mov    $0x1,%esi
mov    $0x14,%edx
call   1080 <free_vector@plt>
mov    -0x48(%rbp),%rdi
mov    $0x1,%esi
mov    $0x14,%edx
call   1080 <free_vector@plt>
mov    -0x38(%rbp),%rdi
mov    $0x1,%ecx
mov    $0x14,%r8d
mov    %ecx,%esi
mov    %r8d,%edx
call   1030 <free_matrix@plt>
mov    -0x40(%rbp),%rdi
mov    $0x1,%ecx
mov    $0x14,%r8d
mov    %ecx,%esi
mov    %r8d,%edx
call   1030 <free_matrix@plt>
mov    -0x30(%rbp),%rdi
mov    $0x1,%ecx
mov    $0x14,%r8d
mov    %ecx,%esi
mov    %r8d,%edx
call   1030 <free_matrix@plt>
mov    -0x28(%rbp),%rdi
mov    $0x1,%esi
mov    $0x14,%edx
call   1080 <free_vector@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    $0x1,%edi
mov    $0x14,%esi
call   1100 <vector@plt>
mov    %rax,%r12
mov    $0x1,%edi
mov    $0x14,%esi
mov    $0x1,%edx
mov    $0x14,%ecx
call   10f0 <matrix@plt>
mov    %rax,0x8(%rsp)
mov    $0x1,%edi
mov    $0x14,%esi
mov    $0x1,%edx
mov    $0x14,%ecx
call   10f0 <matrix@plt>
mov    %rax,%r15
mov    $0x1,%edi
mov    $0x14,%esi
mov    $0x1,%edx
mov    $0x14,%ecx
call   10f0 <matrix@plt>
mov    %rax,%r13
mov    $0x1,%edi
mov    $0x14,%esi
call   1100 <vector@plt>
mov    %rax,0x20(%rsp)
mov    $0x1,%edi
mov    $0x14,%esi
call   1100 <vector@plt>
mov    %rax,0x18(%rsp)
lea    0xd58(%rip),%rdi
lea    0xddf(%rip),%rsi
call   1120 <fopen@plt>
mov    %rax,%rbp
test   %rax,%rax
mov    %rax,0x10(%rsp)
jne    12d2 <main+0xd2>
lea    0xd43(%rip),%rdi
call   1060 <nrerror@plt>
mov    0x10(%rsp),%rbp
mov    %rbp,%rdi
call   10e0 <feof@plt>
test   %eax,%eax
je     1391 <main+0x191>
mov    %rbp,%rdi
call   1070 <fclose@plt>
mov    0x18(%rsp),%rdi
mov    $0x1,%esi
mov    $0x14,%edx
call   1090 <free_vector@plt>
mov    0x20(%rsp),%rdi
mov    $0x1,%esi
mov    $0x14,%edx
call   1090 <free_vector@plt>
mov    %r13,%rdi
mov    $0x1,%esi
mov    $0x14,%edx
mov    $0x1,%ecx
mov    $0x14,%r8d
call   1040 <free_matrix@plt>
mov    %r15,%rdi
mov    $0x1,%esi
mov    $0x14,%edx
mov    $0x1,%ecx
mov    $0x14,%r8d
call   1040 <free_matrix@plt>
mov    0x8(%rsp),%rdi
mov    $0x1,%esi
mov    $0x14,%edx
mov    $0x1,%ecx
mov    $0x14,%r8d
call   1040 <free_matrix@plt>
mov    %r12,%rdi
mov    $0x1,%esi
mov    $0x14,%edx
call   1090 <free_vector@plt>
xor    %eax,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r13,0x30(%rsp)
mov    %r15,0x38(%rsp)
jmp    13c8 <main+0x1c8>
nopl   (%rax)
lea    0xce9(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   10c0 <getchar@plt>
mov    0x10(%rsp),%rbp
mov    %rbp,%rdi
call   10e0 <feof@plt>
test   %eax,%eax
jne    12e2 <main+0xe2>
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x50,%esi
mov    %rbp,%rdx
call   10b0 <fgets@plt>
mov    %rbx,%rdi
mov    $0x50,%esi
mov    %rbp,%rdx
call   10b0 <fgets@plt>
mov    %rbp,%rdi
lea    0xc34(%rip),%rsi
mov    %rsp,%rdx
lea    0x4(%rsp),%rcx
xor    %eax,%eax
call   10a0 <fscanf@plt>
mov    %rbx,%rdi
mov    $0x50,%esi
mov    %rbp,%rdx
call   10b0 <fgets@plt>
mov    (%rsp),%eax
test   %eax,%eax
jle    14a0 <main+0x2a0>
mov    $0x1,%ebx
jmp    143f <main+0x23f>
nopl   0x0(%rax,%rax,1)
movslq %eax,%rcx
lea    0x1(%rbx),%rdx
cmp    %rcx,%rbx
mov    %rdx,%rbx
jge    14a0 <main+0x2a0>
test   %eax,%eax
jle    1430 <main+0x230>
mov    $0x4,%r13d
xor    %r14d,%r14d
mov    0x10(%rsp),%r15
mov    0x8(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
mov    0x0(%rbp,%rbx,8),%rdx
add    %r13,%rdx
mov    %r15,%rdi
lea    0xbc0(%rip),%rsi
xor    %eax,%eax
call   10a0 <fscanf@plt>
movslq (%rsp),%rax
add    $0x1,%r14
add    $0x4,%r13
cmp    %rax,%r14
jl     1460 <main+0x260>
mov    0x30(%rsp),%r13
mov    0x38(%rsp),%r15
jmp    1430 <main+0x230>
cs nopw 0x0(%rax,%rax,1)
lea    0x40(%rsp),%rdi
mov    $0x50,%esi
mov    0x10(%rsp),%rdx
call   10b0 <fgets@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%esi
test   %eax,%eax
jle    1540 <main+0x340>
mov    $0x1,%r14d
jmp    14df <main+0x2df>
nopl   0x0(%rax,%rax,1)
lea    0x1(%r14),%rcx
movslq %eax,%rdx
cmp    %rdx,%r14
mov    %rcx,%r14
jge    1540 <main+0x340>
test   %esi,%esi
jle    14d0 <main+0x2d0>
xor    %ebp,%ebp
mov    0x10(%rsp),%rbx
lea    0xb41(%rip),%r13
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0x0(,%r14,4),%rdx
add    0x8(%r15,%rbp,8),%rdx
mov    %rbx,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   10a0 <fscanf@plt>
movslq (%rsp),%rsi
add    $0x1,%rbp
cmp    %rsi,%rbp
jl     1500 <main+0x300>
mov    0x4(%rsp),%eax
mov    0x30(%rsp),%r13
jmp    14d0 <main+0x2d0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %esi,%esi
lea    0xb0f(%rip),%r14
mov    0x8(%rsp),%rdi
jle    1640 <main+0x440>
mov    %esi,%r10d
lea    0x1(%r10),%r8
lea    -0x1(%r10),%r9
mov    %r10d,%r11d
and    $0x3,%r11d
and    $0xfffffffc,%r10d
mov    $0x1,%ebp
jmp    1592 <main+0x392>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    %r8,%rbp
mov    0x8(%rsp),%rdi
je     1640 <main+0x440>
mov    $0x1,%ecx
cmp    $0x3,%r9
jb     15fd <main+0x3fd>
xor    %ecx,%ecx
nop
mov    0x8(%rdi,%rcx,8),%rdx
movss  (%rdx,%rbp,4),%xmm0
mov    0x8(%r13,%rcx,8),%rdx
movss  %xmm0,(%rdx,%rbp,4)
mov    0x10(%rdi,%rcx,8),%rdx
movss  (%rdx,%rbp,4),%xmm0
mov    0x10(%r13,%rcx,8),%rdx
movss  %xmm0,(%rdx,%rbp,4)
mov    0x18(%rdi,%rcx,8),%rdx
movss  (%rdx,%rbp,4),%xmm0
mov    0x18(%r13,%rcx,8),%rdx
movss  %xmm0,(%rdx,%rbp,4)
mov    0x20(%rdi,%rcx,8),%rdx
movss  (%rdx,%rbp,4),%xmm0
mov    0x20(%r13,%rcx,8),%rdx
movss  %xmm0,(%rdx,%rbp,4)
add    $0x4,%rcx
cmp    %rcx,%r10
jne    15a0 <main+0x3a0>
add    $0x1,%rcx
test   %r11,%r11
je     1580 <main+0x380>
lea    0x0(,%rcx,8),%rbx
add    %r13,%rbx
mov    0x8(%rsp),%rax
lea    (%rax,%rcx,8),%rcx
xor    %edx,%edx
nopl   0x0(%rax)
mov    (%rcx,%rdx,8),%rax
movss  (%rax,%rbp,4),%xmm0
mov    (%rbx,%rdx,8),%rax
movss  %xmm0,(%rax,%rbp,4)
add    $0x1,%rdx
cmp    %rdx,%r11
jne    1620 <main+0x420>
jmp    1580 <main+0x380>
mov    0x20(%rsp),%rdx
mov    0x18(%rsp),%rcx
lea    0x2c(%rsp),%r8
call   1110 <qrdcmp@plt>
cmpl   $0x0,0x2c(%rsp)
je     1670 <main+0x470>
mov    0x297e(%rip),%rax
mov    (%rax),%edi
lea    0x9cb(%rip),%rsi
call   10d0 <fprintf@plt>
cmpl   $0x0,0x4(%rsp)
jle    13a0 <main+0x1a0>
mov    $0x1,%ebp
jmp    16b1 <main+0x4b1>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0xa30(%rip),%rdi
call   1030 <puts@plt>
lea    0x1(%rbp),%rax
movslq 0x4(%rsp),%rcx
cmp    %rcx,%rbp
mov    %rax,%rbp
jge    13a0 <main+0x1a0>
mov    (%rsp),%esi
test   %esi,%esi
jle    1757 <main+0x557>
lea    -0x1(%rsi),%rdx
mov    %esi,%eax
and    $0x3,%eax
mov    $0x1,%ecx
cmp    $0x3,%rdx
jb     1731 <main+0x531>
mov    %esi,%edx
and    $0xfffffffc,%edx
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
mov    0x8(%r15,%rcx,8),%rdi
movss  (%rdi,%rbp,4),%xmm0
movss  %xmm0,0x4(%r12,%rcx,4)
mov    0x10(%r15,%rcx,8),%rdi
movss  (%rdi,%rbp,4),%xmm0
movss  %xmm0,0x8(%r12,%rcx,4)
mov    0x18(%r15,%rcx,8),%rdi
movss  (%rdi,%rbp,4),%xmm0
movss  %xmm0,0xc(%r12,%rcx,4)
mov    0x20(%r15,%rcx,8),%rdi
movss  (%rdi,%rbp,4),%xmm0
movss  %xmm0,0x10(%r12,%rcx,4)
add    $0x4,%rcx
cmp    %rcx,%rdx
jne    16e0 <main+0x4e0>
add    $0x1,%rcx
test   %rax,%rax
je     1757 <main+0x557>
lea    (%r12,%rcx,4),%rdx
lea    (%r15,%rcx,8),%rcx
xor    %edi,%edi
mov    (%rcx,%rdi,8),%rbx
movss  (%rbx,%rbp,4),%xmm0
movss  %xmm0,(%rdx,%rdi,4)
add    $0x1,%rdi
cmp    %rdi,%rax
jne    1740 <main+0x540>
mov    0x8(%rsp),%rdi
mov    0x20(%rsp),%rdx
mov    0x18(%rsp),%rcx
mov    %r12,%r8
call   1050 <qrsolv@plt>
lea    0x93a(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,(%rsp)
jle    17b5 <main+0x5b5>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x8(%r15,%rbx,8),%rax
movss  (%rax,%rbp,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
movslq (%rsp),%rax
add    $0x1,%rbx
cmp    %rax,%rbx
jl     1790 <main+0x590>
lea    0x8a3(%rip),%rdi
lea    0x8a3(%rip),%rsi
lea    0x8b5(%rip),%rdx
xor    %eax,%eax
call   1080 <printf@plt>
mov    (%rsp),%r8d
test   %r8d,%r8d
jle    1690 <main+0x490>
lea    0x1(%r8),%r9
mov    %r8d,%edx
and    $0xfffffffe,%edx
neg    %rdx
mov    $0x1,%esi
jmp    180d <main+0x60d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rsi
cmp    %r9,%rsi
je     18a0 <main+0x6a0>
mov    (%r15,%rsi,8),%rdi
movl   $0x0,(%rdi,%rbp,4)
mov    0x0(%r13,%rsi,8),%rax
xorps  %xmm0,%xmm0
mov    $0x1,%ecx
cmp    $0x2,%r9d
je     187c <main+0x67c>
mov    $0x1,%ecx
xorps  %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movss  (%rax,%rcx,4),%xmm1
mulss  (%r12,%rcx,4),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rdi,%rbp,4)
movss  0x4(%rax,%rcx,4),%xmm0
mulss  0x4(%r12,%rcx,4),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rdi,%rbp,4)
lea    (%rdx,%rcx,1),%rbx
add    $0x2,%rbx
add    $0x2,%rcx
cmp    $0x1,%rbx
jne    1840 <main+0x640>
test   $0x1,%r8b
je     1800 <main+0x600>
movss  (%rax,%rcx,4),%xmm1
mulss  (%r12,%rcx,4),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rdi,%rbp,4)
jmp    1800 <main+0x600>
nop
test   %r8d,%r8d
jle    1690 <main+0x490>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    0x8(%r15,%rbx,8),%rax
movss  (%rax,%rbp,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
movslq (%rsp),%rax
add    $0x1,%rbx
cmp    %rax,%rbx
jl     18b0 <main+0x6b0>
jmp    1690 <main+0x490>

LLVM IR (-O0):
@.str = [11 x i8] c"matrx1.dat\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [32 x i8] c"Data file matrx1.dat not found\0A\00"
@.str.3 = [7 x i8] c"%d %d \00"
@.str.4 = [4 x i8] c"%f \00"
@stderr = global i32 0
@.str.5 = [34 x i8] c"Singularity in QR decomposition.\0A\00"
@.str.6 = [25 x i8] c"right-hand side vector:\0A\00"
@.str.7 = [7 x i8] c"%12.6f\00"
@.str.8 = [7 x i8] c"\0A%s%s\0A\00"
@.str.9 = [25 x i8] c"result of matrix applied\00"
@.str.10 = [17 x i8] c" to sol'n vector\00"
@.str.11 = [36 x i8] c"\0A*********************************\0A\00"
@.str.12 = [32 x i8] c"press RETURN for next problem:\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca float*
%9 = alloca float**
%10 = alloca float**
%11 = alloca float**
%12 = alloca float*
%13 = alloca float*
%14 = alloca [80 x i8]
%15 = alloca i32*
store i32 0, i32* %1
%16 = call float* @vector(i32 1, i32 20)
store float* %16, float** %8
%17 = call float** @matrix(i32 1, i32 20, i32 1, i32 20)
store float** %17, float*** %9
%18 = call float** @matrix(i32 1, i32 20, i32 1, i32 20)
store float** %18, float*** %11
%19 = call float** @matrix(i32 1, i32 20, i32 1, i32 20)
store float** %19, float*** %10
%20 = call float* @vector(i32 1, i32 20)
store float* %20, float** %12
%21 = call float* @vector(i32 1, i32 20)
store float* %21, float** %13
%22 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %22, i32** %15
%23 = icmp eq i32* %22, null
br i1 %23, label %24, label %26
24: ; preds = %0
%25 = call i32 @nrerror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
br label %26
26: ; preds = %24, %0
br label %27
27: ; preds = %278, %26
%28 = load i32*, i32** %15
%29 = call i32 @feof(i32* %28)
%30 = icmp ne i32 %29, 0
%31 = xor i1 %30, true
br i1 %31, label %32, label %281
32: ; preds = %27
%33 = getelementptr inbounds [80 x i8], [80 x i8]* %14, i64 0, i64 0
%34 = load i32*, i32** %15
%35 = call i32 @fgets(i8* %33, i32 80, i32* %34)
%36 = getelementptr inbounds [80 x i8], [80 x i8]* %14, i64 0, i64 0
%37 = load i32*, i32** %15
%38 = call i32 @fgets(i8* %36, i32 80, i32* %37)
%39 = load i32*, i32** %15
%40 = call i32 (i32*, i8*, ...) @fscanf(i32* %39, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32* %6, i32* %5)
%41 = getelementptr inbounds [80 x i8], [80 x i8]* %14, i64 0, i64 0
%42 = load i32*, i32** %15
%43 = call i32 @fgets(i8* %41, i32 80, i32* %42)
store i32 1, i32* %3
br label %44
44: ; preds = %68, %32
%45 = load i32, i32* %3
%46 = load i32, i32* %6
%47 = icmp sle i32 %45, %46
br i1 %47, label %48, label %71
48: ; preds = %44
store i32 1, i32* %4
br label %49
49: ; preds = %64, %48
%50 = load i32, i32* %4
%51 = load i32, i32* %6
%52 = icmp sle i32 %50, %51
br i1 %52, label %53, label %67
53: ; preds = %49
%54 = load i32*, i32** %15
%55 = load float**, float*** %9
%56 = load i32, i32* %3
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds float*, float** %55, i64 %57
%59 = load float*, float** %58
%60 = load i32, i32* %4
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds float, float* %59, i64 %61
%63 = call i32 (i32*, i8*, ...) @fscanf(i32* %54, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float* %62)
br label %64
64: ; preds = %53
%65 = load i32, i32* %4
%66 = add nsw i32 %65, 1
store i32 %66, i32* %4
br label %49
67: ; preds = %49
br label %68
68: ; preds = %67
%69 = load i32, i32* %3
%70 = add nsw i32 %69, 1
store i32 %70, i32* %3
br label %44
71: ; preds = %44
%72 = getelementptr inbounds [80 x i8], [80 x i8]* %14, i64 0, i64 0
%73 = load i32*, i32** %15
%74 = call i32 @fgets(i8* %72, i32 80, i32* %73)
store i32 1, i32* %4
br label %75
75: ; preds = %99, %71
%76 = load i32, i32* %4
%77 = load i32, i32* %5
%78 = icmp sle i32 %76, %77
br i1 %78, label %79, label %102
79: ; preds = %75
store i32 1, i32* %3
br label %80
80: ; preds = %95, %79
%81 = load i32, i32* %3
%82 = load i32, i32* %6
%83 = icmp sle i32 %81, %82
br i1 %83, label %84, label %98
84: ; preds = %80
%85 = load i32*, i32** %15
%86 = load float**, float*** %11
%87 = load i32, i32* %3
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds float*, float** %86, i64 %88
%90 = load float*, float** %89
%91 = load i32, i32* %4
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds float, float* %90, i64 %92
%94 = call i32 (i32*, i8*, ...) @fscanf(i32* %85, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float* %93)
br label %95
95: ; preds = %84
%96 = load i32, i32* %3
%97 = add nsw i32 %96, 1
store i32 %97, i32* %3
br label %80
98: ; preds = %80
br label %99
99: ; preds = %98
%100 = load i32, i32* %4
%101 = add nsw i32 %100, 1
store i32 %101, i32* %4
br label %75
102: ; preds = %75
store i32 1, i32* %4
br label %103
103: ; preds = %134, %102
%104 = load i32, i32* %4
%105 = load i32, i32* %6
%106 = icmp sle i32 %104, %105
br i1 %106, label %107, label %137
107: ; preds = %103
store i32 1, i32* %3
br label %108
108: ; preds = %130, %107
%109 = load i32, i32* %3
%110 = load i32, i32* %6
%111 = icmp sle i32 %109, %110
br i1 %111, label %112, label %133
112: ; preds = %108
%113 = load float**, float*** %9
%114 = load i32, i32* %3
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds float*, float** %113, i64 %115
%117 = load float*, float** %116
%118 = load i32, i32* %4
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds float, float* %117, i64 %119
%121 = load float, float* %120
%122 = load float**, float*** %10
%123 = load i32, i32* %3
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds float*, float** %122, i64 %124
%126 = load float*, float** %125
%127 = load i32, i32* %4
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds float, float* %126, i64 %128
store float %121, float* %129
br label %130
130: ; preds = %112
%131 = load i32, i32* %3
%132 = add nsw i32 %131, 1
store i32 %132, i32* %3
br label %108
133: ; preds = %108
br label %134
134: ; preds = %133
%135 = load i32, i32* %4
%136 = add nsw i32 %135, 1
store i32 %136, i32* %4
br label %103
137: ; preds = %103
%138 = load float**, float*** %9
%139 = load i32, i32* %6
%140 = load float*, float** %12
%141 = load float*, float** %13
%142 = call i32 @qrdcmp(float** %138, i32 %139, float* %140, float* %141, i32* %7)
%143 = load i32, i32* %7
%144 = icmp ne i32 %143, 0
br i1 %144, label %145, label %148
145: ; preds = %137
%146 = load i32, i32* @stderr
%147 = call i32 @fprintf(i32 %146, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
br label %148
148: ; preds = %145, %137
store i32 1, i32* %3
br label %149
149: ; preds = %275, %148
%150 = load i32, i32* %3
%151 = load i32, i32* %5
%152 = icmp sle i32 %150, %151
br i1 %152, label %153, label %278
153: ; preds = %149
store i32 1, i32* %4
br label %154
154: ; preds = %172, %153
%155 = load i32, i32* %4
%156 = load i32, i32* %6
%157 = icmp sle i32 %155, %156
br i1 %157, label %158, label %175
158: ; preds = %154
%159 = load float**, float*** %11
%160 = load i32, i32* %4
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds float*, float** %159, i64 %161
%163 = load float*, float** %162
%164 = load i32, i32* %3
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds float, float* %163, i64 %165
%167 = load float, float* %166
%168 = load float*, float** %8
%169 = load i32, i32* %4
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds float, float* %168, i64 %170
store float %167, float* %171
br label %172
172: ; preds = %158
%173 = load i32, i32* %4
%174 = add nsw i32 %173, 1
store i32 %174, i32* %4
br label %154
175: ; preds = %154
%176 = load float**, float*** %9
%177 = load i32, i32* %6
%178 = load float*, float** %12
%179 = load float*, float** %13
%180 = load float*, float** %8
%181 = call i32 @qrsolv(float** %176, i32 %177, float* %178, float* %179, float* %180)
%182 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
store i32 1, i32* %4
br label %183
183: ; preds = %199, %175
%184 = load i32, i32* %4
%185 = load i32, i32* %6
%186 = icmp sle i32 %184, %185
br i1 %186, label %187, label %202
187: ; preds = %183
%188 = load float**, float*** %11
%189 = load i32, i32* %4
%190 = sext i32 %189 to i64
%191 = getelementptr inbounds float*, float** %188, i64 %190
%192 = load float*, float** %191
%193 = load i32, i32* %3
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds float, float* %192, i64 %194
%196 = load float, float* %195
%197 = fpext float %196 to double
%198 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), double %197)
br label %199
199: ; preds = %187
%200 = load i32, i32* %4
%201 = add nsw i32 %200, 1
store i32 %201, i32* %4
br label %183
202: ; preds = %183
%203 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0))
store i32 1, i32* %4
br label %204
204: ; preds = %250, %202
%205 = load i32, i32* %4
%206 = load i32, i32* %6
%207 = icmp sle i32 %205, %206
br i1 %207, label %208, label %253
208: ; preds = %204
%209 = load float**, float*** %11
%210 = load i32, i32* %4
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds float*, float** %209, i64 %211
%213 = load float*, float** %212
%214 = load i32, i32* %3
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds float, float* %213, i64 %215
store float 0.000000e+00, float* %216
store i32 1, i32* %2
br label %217
217: ; preds = %246, %208
%218 = load i32, i32* %2
%219 = load i32, i32* %6
%220 = icmp sle i32 %218, %219
br i1 %220, label %221, label %249
221: ; preds = %217
%222 = load float**, float*** %10
%223 = load i32, i32* %4
%224 = sext i32 %223 to i64
%225 = getelementptr inbounds float*, float** %222, i64 %224
%226 = load float*, float** %225
%227 = load i32, i32* %2
%228 = sext i32 %227 to i64
%229 = getelementptr inbounds float, float* %226, i64 %228
%230 = load float, float* %229
%231 = load float*, float** %8
%232 = load i32, i32* %2
%233 = sext i32 %232 to i64
%234 = getelementptr inbounds float, float* %231, i64 %233
%235 = load float, float* %234
%236 = load float**, float*** %11
%237 = load i32, i32* %4
%238 = sext i32 %237 to i64
%239 = getelementptr inbounds float*, float** %236, i64 %238
%240 = load float*, float** %239
%241 = load i32, i32* %3
%242 = sext i32 %241 to i64
%243 = getelementptr inbounds float, float* %240, i64 %242
%244 = load float, float* %243
%245 = call float @llvm.fmuladd.f32(float %230, float %235, float %244)
store float %245, float* %243
br label %246
246: ; preds = %221
%247 = load i32, i32* %2
%248 = add nsw i32 %247, 1
store i32 %248, i32* %2
br label %217
249: ; preds = %217
br label %250
250: ; preds = %249
%251 = load i32, i32* %4
%252 = add nsw i32 %251, 1
store i32 %252, i32* %4
br label %204
253: ; preds = %204
store i32 1, i32* %4
br label %254
254: ; preds = %270, %253
%255 = load i32, i32* %4
%256 = load i32, i32* %6
%257 = icmp sle i32 %255, %256
br i1 %257, label %258, label %273
258: ; preds = %254
%259 = load float**, float*** %11
%260 = load i32, i32* %4
%261 = sext i32 %260 to i64
%262 = getelementptr inbounds float*, float** %259, i64 %261
%263 = load float*, float** %262
%264 = load i32, i32* %3
%265 = sext i32 %264 to i64
%266 = getelementptr inbounds float, float* %263, i64 %265
%267 = load float, float* %266
%268 = fpext float %267 to double
%269 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), double %268)
br label %270
270: ; preds = %258
%271 = load i32, i32* %4
%272 = add nsw i32 %271, 1
store i32 %272, i32* %4
br label %254
273: ; preds = %254
%274 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0))
br label %275
275: ; preds = %273
%276 = load i32, i32* %3
%277 = add nsw i32 %276, 1
store i32 %277, i32* %3
br label %149
278: ; preds = %149
%279 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.12, i64 0, i64 0))
%280 = call i32 (...) @getchar()
br label %27
281: ; preds = %27
%282 = load i32*, i32** %15
%283 = call i32 @fclose(i32* %282)
%284 = load float*, float** %13
%285 = call i32 @free_vector(float* %284, i32 1, i32 20)
%286 = load float*, float** %12
%287 = call i32 @free_vector(float* %286, i32 1, i32 20)
%288 = load float**, float*** %10
%289 = call i32 @free_matrix(float** %288, i32 1, i32 20, i32 1, i32 20)
%290 = load float**, float*** %11
%291 = call i32 @free_matrix(float** %290, i32 1, i32 20, i32 1, i32 20)
%292 = load float**, float*** %9
%293 = call i32 @free_matrix(float** %292, i32 1, i32 20, i32 1, i32 20)
%294 = load float*, float** %8
%295 = call i32 @free_vector(float* %294, i32 1, i32 20)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"matrx1.dat\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [32 x i8] c"Data file matrx1.dat not found\0A\00"
@.str.3 = [7 x i8] c"%d %d \00"
@.str.4 = [4 x i8] c"%f \00"
@stderr = global i32 0
@.str.5 = [34 x i8] c"Singularity in QR decomposition.\0A\00"
@.str.7 = [7 x i8] c"%12.6f\00"
@.str.8 = [7 x i8] c"\0A%s%s\0A\00"
@.str.9 = [25 x i8] c"result of matrix applied\00"
@.str.10 = [17 x i8] c" to sol'n vector\00"
@str = [31 x i8] c"press RETURN for next problem:\00"
@str.13 = [24 x i8] c"right-hand side vector:\00"
@str.14 = [35 x i8] c"\0A*********************************\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [80 x i8]
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%9 = tail call float* @vector(i32 1, i32 20)
%10 = tail call float** @matrix(i32 1, i32 20, i32 1, i32 20)
%11 = tail call float** @matrix(i32 1, i32 20, i32 1, i32 20)
%12 = tail call float** @matrix(i32 1, i32 20, i32 1, i32 20)
%13 = tail call float* @vector(i32 1, i32 20)
%14 = tail call float* @vector(i32 1, i32 20)
%15 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i32* %15, null
br i1 %16, label %17, label %19
17: ; preds = %0
%18 = tail call i32 @nrerror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
br label %19
19: ; preds = %17, %0
%20 = call i32 @feof(i32* %15)
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %302
22: ; preds = %19, %297
%23 = call i32 @fgets(i8* %8, i32 80, i32* %15)
%24 = call i32 @fgets(i8* %8, i32 80, i32* %15)
%25 = call i32 (i32*, i8*, ...) @fscanf(i32* %15, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32* %2, i32* %1)
%26 = call i32 @fgets(i8* %8, i32 80, i32* %15)
%27 = load i32, i32* %2
%28 = icmp slt i32 %27, 1
br i1 %28, label %49, label %29
29: ; preds = %22, %44
%30 = phi i32 [ %45, %44 ], [ %27, %22 ]
%31 = phi i64 [ %47, %44 ], [ 1, %22 ]
%32 = icmp slt i32 %30, 1
br i1 %32, label %44, label %33
33: ; preds = %29
%34 = getelementptr inbounds float*, float** %10, i64 %31
br label %35
35: ; preds = %33, %35
%36 = phi i64 [ 1, %33 ], [ %40, %35 ]
%37 = load float*, float** %34
%38 = getelementptr inbounds float, float* %37, i64 %36
%39 = call i32 (i32*, i8*, ...) @fscanf(i32* %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float* %38)
%40 = add nuw nsw i64 %36, 1
%41 = load i32, i32* %2
%42 = sext i32 %41 to i64
%43 = icmp slt i64 %36, %42
br i1 %43, label %35, label %44
44: ; preds = %35, %29
%45 = phi i32 [ %30, %29 ], [ %41, %35 ]
%46 = sext i32 %45 to i64
%47 = add nuw nsw i64 %31, 1
%48 = icmp slt i64 %31, %46
br i1 %48, label %29, label %49
49: ; preds = %44, %22
%50 = call i32 @fgets(i8* %8, i32 80, i32* %15)
%51 = load i32, i32* %1
%52 = icmp slt i32 %51, 1
%53 = load i32, i32* %2
br i1 %52, label %54, label %66
54: ; preds = %83, %49
%55 = phi i32 [ %53, %49 ], [ %85, %83 ]
%56 = icmp slt i32 %55, 1
br i1 %56, label %146, label %57
57: ; preds = %54
%58 = add nuw i32 %55, 1
%59 = zext i32 %58 to i64
%60 = add nsw i64 %59, -1
%61 = add nsw i64 %59, -2
%62 = and i64 %60, 3
%63 = icmp ult i64 %61, 3
%64 = and i64 %60, -4
%65 = icmp eq i64 %62, 0
br label %89
66: ; preds = %49, %83
%67 = phi i32 [ %84, %83 ], [ %51, %49 ]
%68 = phi i32 [ %85, %83 ], [ %53, %49 ]
%69 = phi i64 [ %86, %83 ], [ 1, %49 ]
%70 = icmp slt i32 %68, 1
br i1 %70, label %83, label %71
71: ; preds = %66, %71
%72 = phi i64 [ %77, %71 ], [ 1, %66 ]
%73 = getelementptr inbounds float*, float** %11, i64 %72
%74 = load float*, float** %73
%75 = getelementptr inbounds float, float* %74, i64 %69
%76 = call i32 (i32*, i8*, ...) @fscanf(i32* %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float* %75)
%77 = add nuw nsw i64 %72, 1
%78 = load i32, i32* %2
%79 = sext i32 %78 to i64
%80 = icmp slt i64 %72, %79
br i1 %80, label %71, label %81
81: ; preds = %71
%82 = load i32, i32* %1
br label %83
83: ; preds = %81, %66
%84 = phi i32 [ %82, %81 ], [ %67, %66 ]
%85 = phi i32 [ %78, %81 ], [ %68, %66 ]
%86 = add nuw nsw i64 %69, 1
%87 = sext i32 %84 to i64
%88 = icmp slt i64 %69, %87
br i1 %88, label %66, label %54
89: ; preds = %143, %57
%90 = phi i64 [ 1, %57 ], [ %144, %143 ]
br i1 %63, label %128, label %91
91: ; preds = %89, %91
%92 = phi i64 [ %125, %91 ], [ 1, %89 ]
%93 = phi i64 [ %126, %91 ], [ 0, %89 ]
%94 = getelementptr inbounds float*, float** %10, i64 %92
%95 = load float*, float** %94
%96 = getelementptr inbounds float, float* %95, i64 %90
%97 = load float, float* %96
%98 = getelementptr inbounds float*, float** %12, i64 %92
%99 = load float*, float** %98
%100 = getelementptr inbounds float, float* %99, i64 %90
store float %97, float* %100
%101 = add nuw nsw i64 %92, 1
%102 = getelementptr inbounds float*, float** %10, i64 %101
%103 = load float*, float** %102
%104 = getelementptr inbounds float, float* %103, i64 %90
%105 = load float, float* %104
%106 = getelementptr inbounds float*, float** %12, i64 %101
%107 = load float*, float** %106
%108 = getelementptr inbounds float, float* %107, i64 %90
store float %105, float* %108
%109 = add nuw nsw i64 %92, 2
%110 = getelementptr inbounds float*, float** %10, i64 %109
%111 = load float*, float** %110
%112 = getelementptr inbounds float, float* %111, i64 %90
%113 = load float, float* %112
%114 = getelementptr inbounds float*, float** %12, i64 %109
%115 = load float*, float** %114
%116 = getelementptr inbounds float, float* %115, i64 %90
store float %113, float* %116
%117 = add nuw nsw i64 %92, 3
%118 = getelementptr inbounds float*, float** %10, i64 %117
%119 = load float*, float** %118
%120 = getelementptr inbounds float, float* %119, i64 %90
%121 = load float, float* %120
%122 = getelementptr inbounds float*, float** %12, i64 %117
%123 = load float*, float** %122
%124 = getelementptr inbounds float, float* %123, i64 %90
store float %121, float* %124
%125 = add nuw nsw i64 %92, 4
%126 = add i64 %93, 4
%127 = icmp eq i64 %126, %64
br i1 %127, label %128, label %91
128: ; preds = %91, %89
%129 = phi i64 [ 1, %89 ], [ %125, %91 ]
br i1 %65, label %143, label %130
130: ; preds = %128, %130
%131 = phi i64 [ %140, %130 ], [ %129, %128 ]
%132 = phi i64 [ %141, %130 ], [ 0, %128 ]
%133 = getelementptr inbounds float*, float** %10, i64 %131
%134 = load float*, float** %133
%135 = getelementptr inbounds float, float* %134, i64 %90
%136 = load float, float* %135
%137 = getelementptr inbounds float*, float** %12, i64 %131
%138 = load float*, float** %137
%139 = getelementptr inbounds float, float* %138, i64 %90
store float %136, float* %139
%140 = add nuw nsw i64 %131, 1
%141 = add i64 %132, 1
%142 = icmp eq i64 %141, %62
br i1 %142, label %143, label %130
143: ; preds = %130, %128
%144 = add nuw nsw i64 %90, 1
%145 = icmp eq i64 %144, %59
br i1 %145, label %146, label %89
146: ; preds = %143, %54
%147 = call i32 @qrdcmp(float** %10, i32 %55, float* %13, float* %14, i32* %3)
%148 = load i32, i32* %3
%149 = icmp eq i32 %148, 0
br i1 %149, label %153, label %150
150: ; preds = %146
%151 = load i32, i32* @stderr
%152 = call i32 @fprintf(i32 %151, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
br label %153
153: ; preds = %150, %146
%154 = load i32, i32* %1
%155 = icmp slt i32 %154, 1
br i1 %155, label %297, label %156
156: ; preds = %153, %291
%157 = phi i64 [ %293, %291 ], [ 1, %153 ]
%158 = load i32, i32* %2
%159 = icmp slt i32 %158, 1
br i1 %159, label %212, label %160
160: ; preds = %156
%161 = add nuw i32 %158, 1
%162 = zext i32 %161 to i64
%163 = add nsw i64 %162, -1
%164 = add nsw i64 %162, -2
%165 = and i64 %163, 3
%166 = icmp ult i64 %164, 3
br i1 %166, label %198, label %167
167: ; preds = %160
%168 = and i64 %163, -4
br label %169
169: ; preds = %169, %167
%170 = phi i64 [ 1, %167 ], [ %195, %169 ]
%171 = phi i64 [ 0, %167 ], [ %196, %169 ]
%172 = getelementptr inbounds float*, float** %11, i64 %170
%173 = load float*, float** %172
%174 = getelementptr inbounds float, float* %173, i64 %157
%175 = load float, float* %174
%176 = getelementptr inbounds float, float* %9, i64 %170
store float %175, float* %176
%177 = add nuw nsw i64 %170, 1
%178 = getelementptr inbounds float*, float** %11, i64 %177
%179 = load float*, float** %178
%180 = getelementptr inbounds float, float* %179, i64 %157
%181 = load float, float* %180
%182 = getelementptr inbounds float, float* %9, i64 %177
store float %181, float* %182
%183 = add nuw nsw i64 %170, 2
%184 = getelementptr inbounds float*, float** %11, i64 %183
%185 = load float*, float** %184
%186 = getelementptr inbounds float, float* %185, i64 %157
%187 = load float, float* %186
%188 = getelementptr inbounds float, float* %9, i64 %183
store float %187, float* %188
%189 = add nuw nsw i64 %170, 3
%190 = getelementptr inbounds float*, float** %11, i64 %189
%191 = load float*, float** %190
%192 = getelementptr inbounds float, float* %191, i64 %157
%193 = load float, float* %192
%194 = getelementptr inbounds float, float* %9, i64 %189
store float %193, float* %194
%195 = add nuw nsw i64 %170, 4
%196 = add i64 %171, 4
%197 = icmp eq i64 %196, %168
br i1 %197, label %198, label %169
198: ; preds = %169, %160
%199 = phi i64 [ 1, %160 ], [ %195, %169 ]
%200 = icmp eq i64 %165, 0
br i1 %200, label %212, label %201
201: ; preds = %198, %201
%202 = phi i64 [ %209, %201 ], [ %199, %198 ]
%203 = phi i64 [ %210, %201 ], [ 0, %198 ]
%204 = getelementptr inbounds float*, float** %11, i64 %202
%205 = load float*, float** %204
%206 = getelementptr inbounds float, float* %205, i64 %157
%207 = load float, float* %206
%208 = getelementptr inbounds float, float* %9, i64 %202
store float %207, float* %208
%209 = add nuw nsw i64 %202, 1
%210 = add i64 %203, 1
%211 = icmp eq i64 %210, %165
br i1 %211, label %212, label %201
212: ; preds = %198, %201, %156
%213 = call i32 @qrsolv(float** %10, i32 %158, float* %13, float* %14, float* %9)
%214 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.13, i64 0, i64 0))
%215 = load i32, i32* %2
%216 = icmp slt i32 %215, 1
br i1 %216, label %229, label %217
217: ; preds = %212, %217
%218 = phi i64 [ %225, %217 ], [ 1, %212 ]
%219 = getelementptr inbounds float*, float** %11, i64 %218
%220 = load float*, float** %219
%221 = getelementptr inbounds float, float* %220, i64 %157
%222 = load float, float* %221
%223 = fpext float %222 to double
%224 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), double %223)
%225 = add nuw nsw i64 %218, 1
%226 = load i32, i32* %2
%227 = sext i32 %226 to i64
%228 = icmp slt i64 %218, %227
br i1 %228, label %217, label %229
229: ; preds = %217, %212
%230 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0))
%231 = load i32, i32* %2
%232 = icmp slt i32 %231, 1
br i1 %232, label %291, label %233
233: ; preds = %229
%234 = add nuw i32 %231, 1
%235 = zext i32 %234 to i64
%236 = add nsw i64 %235, -1
%237 = and i64 %236, 1
%238 = icmp eq i32 %234, 2
%239 = and i64 %236, -2
%240 = icmp eq i64 %237, 0
br label %242
241: ; preds = %276
br i1 %232, label %291, label %279
242: ; preds = %276, %233
%243 = phi i64 [ 1, %233 ], [ %277, %276 ]
%244 = getelementptr inbounds float*, float** %11, i64 %243
%245 = load float*, float** %244
%246 = getelementptr inbounds float, float* %245, i64 %157
store float 0.000000e+00, float* %246
%247 = getelementptr inbounds float*, float** %12, i64 %243
%248 = load float*, float** %247
br i1 %238, label %267, label %249
249: ; preds = %242, %249
%250 = phi float [ %263, %249 ], [ 0.000000e+00, %242 ]
%251 = phi i64 [ %264, %249 ], [ 1, %242 ]
%252 = phi i64 [ %265, %249 ], [ 0, %242 ]
%253 = getelementptr inbounds float, float* %248, i64 %251
%254 = load float, float* %253
%255 = getelementptr inbounds float, float* %9, i64 %251
%256 = load float, float* %255
%257 = call float @llvm.fmuladd.f32(float %254, float %256, float %250)
store float %257, float* %246
%258 = add nuw nsw i64 %251, 1
%259 = getelementptr inbounds float, float* %248, i64 %258
%260 = load float, float* %259
%261 = getelementptr inbounds float, float* %9, i64 %258
%262 = load float, float* %261
%263 = call float @llvm.fmuladd.f32(float %260, float %262, float %257)
store float %263, float* %246
%264 = add nuw nsw i64 %251, 2
%265 = add i64 %252, 2
%266 = icmp eq i64 %265, %239
br i1 %266, label %267, label %249
267: ; preds = %249, %242
%268 = phi float [ 0.000000e+00, %242 ], [ %263, %249 ]
%269 = phi i64 [ 1, %242 ], [ %264, %249 ]
br i1 %240, label %276, label %270
270: ; preds = %267
%271 = getelementptr inbounds float, float* %248, i64 %269
%272 = load float, float* %271
%273 = getelementptr inbounds float, float* %9, i64 %269
%274 = load float, float* %273
%275 = call float @llvm.fmuladd.f32(float %272, float %274, float %268)
store float %275, float* %246
br label %276
276: ; preds = %267, %270
%277 = add nuw nsw i64 %243, 1
%278 = icmp eq i64 %277, %235
br i1 %278, label %241, label %242
279: ; preds = %241, %279
%280 = phi i64 [ %287, %279 ], [ 1, %241 ]
%281 = getelementptr inbounds float*, float** %11, i64 %280
%282 = load float*, float** %281
%283 = getelementptr inbounds float, float* %282, i64 %157
%284 = load float, float* %283
%285 = fpext float %284 to double
%286 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), double %285)
%287 = add nuw nsw i64 %280, 1
%288 = load i32, i32* %2
%289 = sext i32 %288 to i64
%290 = icmp slt i64 %280, %289
br i1 %290, label %279, label %291
291: ; preds = %279, %229, %241
%292 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.14, i64 0, i64 0))
%293 = add nuw nsw i64 %157, 1
%294 = load i32, i32* %1
%295 = sext i32 %294 to i64
%296 = icmp slt i64 %157, %295
br i1 %296, label %156, label %297
297: ; preds = %291, %153
%298 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%299 = call i32 (...) @getchar()
%300 = call i32 @feof(i32* %15)
%301 = icmp eq i32 %300, 0
br i1 %301, label %22, label %302
302: ; preds = %297, %19
%303 = call i32 @fclose(i32* %15)
%304 = call i32 @free_vector(float* %14, i32 1, i32 20)
%305 = call i32 @free_vector(float* %13, i32 1, i32 20)
%306 = call i32 @free_matrix(float** %12, i32 1, i32 20, i32 1, i32 20)
%307 = call i32 @free_matrix(float** %11, i32 1, i32 20, i32 1, i32 20)
%308 = call i32 @free_matrix(float** %10, i32 1, i32 20, i32 1, i32 20)
%309 = call i32 @free_vector(float* %9, i32 1, i32 20)
ret i32 0
}