#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*/ *);
scalar_t__ fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int fscanf(int /*<<< orphan*/ *, char *, int *);
void *malloc(int);
int /*<<< orphan*/ ungetc(char, int /*<<< orphan*/ *);
int ***load_discrete3(char *fname, int *dim1, int **dim2, int ***dim3,
                      int *max) {
  FILE *f;
  int ***x;
  char *s;
  int i, j, k, l, maxlen, v;
  char c;
  int *tmp;
  *max = 0;
  k = 0;
  f = fopen(fname, "r");
  while (!feof(f)) {
    c = (char)fgetc(f);
    if (c == '\n') {
      k++;
    }
  }
  fclose(f);
  *dim1 = k;
  *dim2 = malloc(*dim1 * sizeof(int));
  k = 0;
  i = 0;
  f = fopen(fname, "r");
  while (!feof(f)) {
    c = (char)fgetc(f);
    if (c == '\n') {
      (*dim2)[k] = i;
      k++;
      i = 0;
    } else {
      if (i == 0) {
        i = 1;
      }
      if (c == '\t') {
        i++;
      }
    }
  }
  fclose(f);
  *dim3 = malloc(*dim1 * sizeof(int *));
  for (k = 0; k < *dim1; k++) {
    (*dim3)[k] = malloc((*dim2)[k] * sizeof(int));
  }
  k = 0;
  i = 0;
  j = 0;
  f = fopen(fname, "r");
  while (!feof(f)) {
    c = (char)fgetc(f);
    if (c == '\n') {
      (*dim3)[k][i] = j;
      k++;
      i = 0;
      j = 0;
    } else if (c == '\t') {
      (*dim3)[k][i] = j;
      i++;
      j = 0;
    } else if (c == ' ') {
      j++;
    } else if (j == 0) {
      j = 1;
    }
  }
  fclose(f);
  x = malloc(*dim1 * sizeof(int **));
  for (k = 0; k < *dim1; k++) {
    x[k] = malloc((*dim2)[k] * sizeof(int *));
    for (i = 0; i < (*dim2)[k]; i++) {
      x[k][i] = malloc((*dim3)[k][i] * sizeof(int));
    }
  }
  f = fopen(fname, "r");
  k = 0;
  i = 0;
  j = 0;
  while (!feof(f)) {
    c = (char)fgetc(f);
    if (c <= 0) {
      break;
    }
    if (c == ' ') {
    } else if (c == '\n') {
      k++;
      i = 0;
      j = 0;
    } else if (c == '\t') {
      i++;
      j = 0;
    } else {
      ungetc(c, f);
      l = fscanf(f, "%d", &v);
      x[k][i][j] = v;
      if (v > *max) {
        *max = v;
      }
      j++;
    }
  }
  fclose(f);
  return x;
}


x86 assembly (clang, -O0):
<load_discrete3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x0,-0x4c(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe58(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
call   1060 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    11cf <load_discrete3+0x5f>
jmp    11f6 <load_discrete3+0x86>
mov    -0x30(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %al,-0x59(%rbp)
movsbl -0x59(%rbp),%eax
cmp    $0xa,%eax
jne    11f1 <load_discrete3+0x81>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    11b1 <load_discrete3+0x41>
mov    -0x30(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x4c(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
movslq (%rax),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xdc3(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
call   1060 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1264 <load_discrete3+0xf4>
jmp    12d4 <load_discrete3+0x164>
mov    -0x30(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %al,-0x59(%rbp)
movsbl -0x59(%rbp),%eax
cmp    $0xa,%eax
jne    12a3 <load_discrete3+0x133>
mov    -0x44(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movslq -0x4c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
movl   $0x0,-0x44(%rbp)
jmp    12cf <load_discrete3+0x15f>
cmpl   $0x0,-0x44(%rbp)
jne    12b4 <load_discrete3+0x144>
movl   $0x1,-0x44(%rbp)
movsbl -0x59(%rbp),%eax
cmp    $0x9,%eax
jne    12ca <load_discrete3+0x15a>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    12cf <load_discrete3+0x15f>
jmp    1246 <load_discrete3+0xd6>
mov    -0x30(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x10(%rbp),%rax
movslq (%rax),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    1349 <load_discrete3+0x1d9>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movslq -0x4c(%rbp),%rcx
movslq (%rax,%rcx,4),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movslq -0x4c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1300 <load_discrete3+0x190>
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xc97(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
call   1060 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1390 <load_discrete3+0x220>
jmp    1459 <load_discrete3+0x2e9>
mov    -0x30(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %al,-0x59(%rbp)
movsbl -0x59(%rbp),%eax
cmp    $0xa,%eax
jne    13de <load_discrete3+0x26e>
mov    -0x48(%rbp),%edx
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
jmp    1454 <load_discrete3+0x2e4>
movsbl -0x59(%rbp),%eax
cmp    $0x9,%eax
jne    1419 <load_discrete3+0x2a9>
mov    -0x48(%rbp),%edx
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
jmp    144f <load_discrete3+0x2df>
movsbl -0x59(%rbp),%eax
cmp    $0x20,%eax
jne    1434 <load_discrete3+0x2c4>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    144a <load_discrete3+0x2da>
cmpl   $0x0,-0x48(%rbp)
jne    1445 <load_discrete3+0x2d5>
movl   $0x1,-0x48(%rbp)
jmp    144a <load_discrete3+0x2da>
jmp    144f <load_discrete3+0x2df>
jmp    1454 <load_discrete3+0x2e4>
jmp    1372 <load_discrete3+0x202>
mov    -0x30(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x10(%rbp),%rax
movslq (%rax),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    152f <load_discrete3+0x3bf>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movslq -0x4c(%rbp),%rcx
movslq (%rax,%rcx,4),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    -0x18(%rbp),%rcx
mov    (%rcx),%rcx
movslq -0x4c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jge    151c <load_discrete3+0x3ac>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
movslq (%rax,%rcx,4),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    14be <load_discrete3+0x34e>
jmp    1521 <load_discrete3+0x3b1>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    147f <load_discrete3+0x30f>
mov    -0x8(%rbp),%rdi
lea    0xac6(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x30(%rbp),%rdi
call   1060 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1576 <load_discrete3+0x406>
jmp    1665 <load_discrete3+0x4f5>
mov    -0x30(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %al,-0x59(%rbp)
movsbl -0x59(%rbp),%eax
cmp    $0x0,%eax
jg     1594 <load_discrete3+0x424>
jmp    1665 <load_discrete3+0x4f5>
movsbl -0x59(%rbp),%eax
cmp    $0x20,%eax
jne    15a6 <load_discrete3+0x436>
jmp    1660 <load_discrete3+0x4f0>
movsbl -0x59(%rbp),%eax
cmp    $0xa,%eax
jne    15cf <load_discrete3+0x45f>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
jmp    165b <load_discrete3+0x4eb>
movsbl -0x59(%rbp),%eax
cmp    $0x9,%eax
jne    15f1 <load_discrete3+0x481>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
jmp    1656 <load_discrete3+0x4e6>
mov    -0x59(%rbp),%al
mov    -0x30(%rbp),%rsi
movsbl %al,%edi
call   1080 <ungetc@plt>
mov    -0x30(%rbp),%rdi
lea    0x9f7(%rip),%rsi
lea    -0x58(%rbp),%rdx
call   1040 <fscanf@plt>
mov    %eax,-0x50(%rbp)
mov    -0x58(%rbp),%edx
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x58(%rbp),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jle    164d <load_discrete3+0x4dd>
mov    -0x58(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    165b <load_discrete3+0x4eb>
jmp    1660 <load_discrete3+0x4f0>
jmp    1558 <load_discrete3+0x3e8>
mov    -0x30(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x38(%rbp),%rax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_discrete3>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rcx,0x18(%rsp)
mov    %rdx,%r12
mov    %rsi,0x8(%rsp)
mov    %rdi,%r13
mov    %r8,0x28(%rsp)
movl   $0x0,(%r8)
lea    0xe5f(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <feof@plt>
xor    %r14d,%r14d
test   %eax,%eax
jne    11de <load_discrete3+0x6e>
xor    %r14d,%r14d
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1050 <fgetc@plt>
xor    %ecx,%ecx
cmp    $0xa,%al
sete   %cl
add    %ecx,%r14d
mov    %rbx,%rdi
call   1060 <feof@plt>
test   %eax,%eax
je     11c0 <load_discrete3+0x50>
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    0x8(%rsp),%rax
mov    %r14d,(%rax)
shl    $0x2,%r14d
mov    %r14d,%edi
call   1070 <malloc@plt>
mov    %rax,(%r12)
lea    0xdfb(%rip),%rsi
mov    %r13,%rdi
call   1090 <fopen@plt>
mov    %rax,%r15
mov    %rax,%rdi
call   1060 <feof@plt>
test   %eax,%eax
je     1396 <load_discrete3+0x226>
mov    %r15,%rdi
call   1030 <fclose@plt>
mov    0x8(%rsp),%rax
mov    (%rax),%r14d
lea    0x0(,%r14,8),%edi
call   1070 <malloc@plt>
mov    0x18(%rsp),%r15
mov    %rax,(%r15)
test   %r14d,%r14d
jle    1290 <load_discrete3+0x120>
mov    %rax,%rbx
mov    (%r12),%rax
mov    (%rax),%edi
shl    $0x2,%edi
call   1070 <malloc@plt>
mov    %rax,(%rbx)
cmp    $0x1,%r14d
je     1290 <load_discrete3+0x120>
mov    $0x1,%ebx
nopl   0x0(%rax)
mov    (%r15),%rbp
mov    (%r12),%rax
mov    (%rax,%rbx,4),%edi
shl    $0x2,%edi
call   1070 <malloc@plt>
mov    %rax,0x0(%rbp,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1270 <load_discrete3+0x100>
lea    0xd69(%rip),%rsi
mov    %r13,%rdi
call   1090 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <feof@plt>
test   %eax,%eax
je     13f5 <load_discrete3+0x285>
mov    %r13,0x20(%rsp)
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    0x8(%rsp),%rax
mov    (%rax),%ebx
lea    0x0(,%rbx,8),%edi
call   1070 <malloc@plt>
mov    %rax,0x8(%rsp)
mov    %rbx,0x30(%rsp)
test   %ebx,%ebx
jle    1351 <load_discrete3+0x1e1>
mov    (%r12),%r12
xor    %ebx,%ebx
jmp    12fb <load_discrete3+0x18b>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    0x30(%rsp),%rbx
je     1351 <load_discrete3+0x1e1>
mov    (%r12,%rbx,4),%r14d
lea    0x0(,%r14,8),%edi
call   1070 <malloc@plt>
mov    %rax,%rbp
mov    0x8(%rsp),%rax
mov    %rbp,(%rax,%rbx,8)
test   %r14d,%r14d
jle    12f0 <load_discrete3+0x180>
mov    0x18(%rsp),%rax
mov    (%rax),%r13
movslq (%r12,%rbx,4),%r14
xor    %r15d,%r15d
nopl   0x0(%rax)
mov    0x0(%r13,%rbx,8),%rax
mov    (%rax,%r15,4),%edi
shl    $0x2,%edi
call   1070 <malloc@plt>
mov    %rax,0x0(%rbp,%r15,8)
add    $0x1,%r15
cmp    %r14,%r15
jl     1330 <load_discrete3+0x1c0>
jmp    12f0 <load_discrete3+0x180>
lea    0xca8(%rip),%rsi
mov    0x20(%rsp),%rdi
call   1090 <fopen@plt>
mov    %rax,%rbp
mov    %rax,%rdi
call   1060 <feof@plt>
test   %eax,%eax
mov    0x28(%rsp),%r14
je     1486 <load_discrete3+0x316>
mov    %rbp,%rdi
call   1030 <fclose@plt>
mov    0x8(%rsp),%rax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ebx,%ebx
mov    $0x1,%r14d
xor    %ebp,%ebp
jmp    13d2 <load_discrete3+0x262>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %ebx,%ebx
cmove  %r14d,%ebx
xor    %ecx,%ecx
cmp    $0x9000000,%eax
sete   %cl
add    %ecx,%ebx
mov    %r15,%rdi
call   1060 <feof@plt>
test   %eax,%eax
jne    1220 <load_discrete3+0xb0>
mov    %r15,%rdi
call   1050 <fgetc@plt>
shl    $0x18,%eax
cmp    $0xa000000,%eax
jne    13b0 <load_discrete3+0x240>
mov    (%r12),%rax
movslq %ebp,%rbp
mov    %ebx,(%rax,%rbp,4)
add    $0x1,%ebp
xor    %ebx,%ebx
jmp    13c2 <load_discrete3+0x252>
xor    %r15d,%r15d
xor    %r14d,%r14d
xor    %ebp,%ebp
jmp    141c <load_discrete3+0x2ac>
nop
test   %r14d,%r14d
mov    $0x1,%eax
cmove  %eax,%r14d
mov    %rbx,%rdi
call   1060 <feof@plt>
test   %eax,%eax
jne    12b2 <load_discrete3+0x142>
mov    %rbx,%rdi
call   1050 <fgetc@plt>
shl    $0x18,%eax
cmp    $0x9000000,%eax
je     1460 <load_discrete3+0x2f0>
cmp    $0x20000000,%eax
je     1480 <load_discrete3+0x310>
cmp    $0xa000000,%eax
jne    1400 <load_discrete3+0x290>
mov    0x18(%rsp),%rax
mov    (%rax),%rax
movslq %ebp,%rcx
mov    (%rax,%rcx,8),%rax
movslq %r15d,%rcx
mov    %r14d,(%rax,%rcx,4)
add    $0x1,%ebp
xor    %r14d,%r14d
xor    %r15d,%r15d
jmp    140c <load_discrete3+0x29c>
nopl   (%rax)
mov    0x18(%rsp),%rax
mov    (%rax),%rax
movslq %ebp,%rcx
mov    (%rax,%rcx,8),%rax
movslq %r15d,%r15
mov    %r14d,(%rax,%r15,4)
add    $0x1,%r15d
xor    %r14d,%r14d
jmp    140c <load_discrete3+0x29c>
nop
add    $0x1,%r14d
jmp    140c <load_discrete3+0x29c>
xor    %r13d,%r13d
lea    0x14(%rsp),%r12
xor    %r15d,%r15d
xor    %ebx,%ebx
jmp    14b4 <load_discrete3+0x344>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%r15d
mov    %rbp,%rdi
call   1060 <feof@plt>
test   %eax,%eax
jne    137a <load_discrete3+0x20a>
mov    %rbp,%rdi
call   1050 <fgetc@plt>
test   %al,%al
jle    137a <load_discrete3+0x20a>
cmp    $0x9,%al
je     14e0 <load_discrete3+0x370>
cmp    $0x20,%al
je     14a4 <load_discrete3+0x334>
cmp    $0xa,%al
jne    14f0 <load_discrete3+0x380>
add    $0x1,%ebx
xor    %r15d,%r15d
xor    %r13d,%r13d
jmp    14a4 <load_discrete3+0x334>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r13d
xor    %r15d,%r15d
jmp    14a4 <load_discrete3+0x334>
nopl   0x0(%rax)
movsbl %al,%edi
mov    %rbp,%rsi
call   1080 <ungetc@plt>
mov    %rbp,%rdi
lea    0xafd(%rip),%rsi
mov    %r12,%rdx
call   1040 <fscanf@plt>
mov    0x14(%rsp),%eax
movslq %ebx,%rcx
mov    0x8(%rsp),%rdx
mov    (%rdx,%rcx,8),%rcx
movslq %r13d,%rdx
mov    (%rcx,%rdx,8),%rcx
movslq %r15d,%rdx
mov    %eax,(%rcx,%rdx,4)
mov    0x14(%rsp),%eax
cmp    (%r14),%eax
jle    14a0 <load_discrete3+0x330>
mov    %eax,(%r14)
jmp    14a0 <load_discrete3+0x330>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [3 x i8] c"%d\00"
define i32*** @load_discrete3(i8* %0, i32* %1, i32** %2, i32*** %3, i32* %4) {
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32**
%9 = alloca i32***
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32***
%13 = alloca i8*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i8
%21 = alloca i32*
store i8* %0, i8** %6
store i32* %1, i32** %7
store i32** %2, i32*** %8
store i32*** %3, i32**** %9
store i32* %4, i32** %10
%22 = load i32*, i32** %10
store i32 0, i32* %22
store i32 0, i32* %16
%23 = load i8*, i8** %6
%24 = call i32* @fopen(i8* %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %24, i32** %11
br label %25
25: ; preds = %40, %5
%26 = load i32*, i32** %11
%27 = call i32 @feof(i32* %26)
%28 = icmp ne i32 %27, 0
%29 = xor i1 %28, true
br i1 %29, label %30, label %41
30: ; preds = %25
%31 = load i32*, i32** %11
%32 = call i64 @fgetc(i32* %31)
%33 = trunc i64 %32 to i8
store i8 %33, i8* %20
%34 = load i8, i8* %20
%35 = sext i8 %34 to i32
%36 = icmp eq i32 %35, 10
br i1 %36, label %37, label %40
37: ; preds = %30
%38 = load i32, i32* %16
%39 = add nsw i32 %38, 1
store i32 %39, i32* %16
br label %40
40: ; preds = %37, %30
br label %25
41: ; preds = %25
%42 = load i32*, i32** %11
%43 = call i32 @fclose(i32* %42)
%44 = load i32, i32* %16
%45 = load i32*, i32** %7
store i32 %44, i32* %45
%46 = load i32*, i32** %7
%47 = load i32, i32* %46
%48 = sext i32 %47 to i64
%49 = mul i64 %48, 4
%50 = trunc i64 %49 to i32
%51 = call i8* @malloc(i32 %50)
%52 = bitcast i8* %51 to i32*
%53 = load i32**, i32*** %8
store i32* %52, i32** %53
store i32 0, i32* %16
store i32 0, i32* %14
%54 = load i8*, i8** %6
%55 = call i32* @fopen(i8* %54, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %55, i32** %11
br label %56
56: ; preds = %89, %41
%57 = load i32*, i32** %11
%58 = call i32 @feof(i32* %57)
%59 = icmp ne i32 %58, 0
%60 = xor i1 %59, true
br i1 %60, label %61, label %90
61: ; preds = %56
%62 = load i32*, i32** %11
%63 = call i64 @fgetc(i32* %62)
%64 = trunc i64 %63 to i8
store i8 %64, i8* %20
%65 = load i8, i8* %20
%66 = sext i8 %65 to i32
%67 = icmp eq i32 %66, 10
br i1 %67, label %68, label %77
68: ; preds = %61
%69 = load i32, i32* %14
%70 = load i32**, i32*** %8
%71 = load i32*, i32** %70
%72 = load i32, i32* %16
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i32, i32* %71, i64 %73
store i32 %69, i32* %74
%75 = load i32, i32* %16
%76 = add nsw i32 %75, 1
store i32 %76, i32* %16
store i32 0, i32* %14
br label %89
77: ; preds = %61
%78 = load i32, i32* %14
%79 = icmp eq i32 %78, 0
br i1 %79, label %80, label %81
80: ; preds = %77
store i32 1, i32* %14
br label %81
81: ; preds = %80, %77
%82 = load i8, i8* %20
%83 = sext i8 %82 to i32
%84 = icmp eq i32 %83, 9
br i1 %84, label %85, label %88
85: ; preds = %81
%86 = load i32, i32* %14
%87 = add nsw i32 %86, 1
store i32 %87, i32* %14
br label %88
88: ; preds = %85, %81
br label %89
89: ; preds = %88, %68
br label %56
90: ; preds = %56
%91 = load i32*, i32** %11
%92 = call i32 @fclose(i32* %91)
%93 = load i32*, i32** %7
%94 = load i32, i32* %93
%95 = sext i32 %94 to i64
%96 = mul i64 %95, 8
%97 = trunc i64 %96 to i32
%98 = call i8* @malloc(i32 %97)
%99 = bitcast i8* %98 to i32**
%100 = load i32***, i32**** %9
store i32** %99, i32*** %100
store i32 0, i32* %16
br label %101
101: ; preds = %123, %90
%102 = load i32, i32* %16
%103 = load i32*, i32** %7
%104 = load i32, i32* %103
%105 = icmp slt i32 %102, %104
br i1 %105, label %106, label %126
106: ; preds = %101
%107 = load i32**, i32*** %8
%108 = load i32*, i32** %107
%109 = load i32, i32* %16
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds i32, i32* %108, i64 %110
%112 = load i32, i32* %111
%113 = sext i32 %112 to i64
%114 = mul i64 %113, 4
%115 = trunc i64 %114 to i32
%116 = call i8* @malloc(i32 %115)
%117 = bitcast i8* %116 to i32*
%118 = load i32***, i32**** %9
%119 = load i32**, i32*** %118
%120 = load i32, i32* %16
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds i32*, i32** %119, i64 %121
store i32* %117, i32** %122
br label %123
123: ; preds = %106
%124 = load i32, i32* %16
%125 = add nsw i32 %124, 1
store i32 %125, i32* %16
br label %101
126: ; preds = %101
store i32 0, i32* %16
store i32 0, i32* %14
store i32 0, i32* %15
%127 = load i8*, i8** %6
%128 = call i32* @fopen(i8* %127, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %128, i32** %11
br label %129
129: ; preds = %185, %126
%130 = load i32*, i32** %11
%131 = call i32 @feof(i32* %130)
%132 = icmp ne i32 %131, 0
%133 = xor i1 %132, true
br i1 %133, label %134, label %186
134: ; preds = %129
%135 = load i32*, i32** %11
%136 = call i64 @fgetc(i32* %135)
%137 = trunc i64 %136 to i8
store i8 %137, i8* %20
%138 = load i8, i8* %20
%139 = sext i8 %138 to i32
%140 = icmp eq i32 %139, 10
br i1 %140, label %141, label %154
141: ; preds = %134
%142 = load i32, i32* %15
%143 = load i32***, i32**** %9
%144 = load i32**, i32*** %143
%145 = load i32, i32* %16
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds i32*, i32** %144, i64 %146
%148 = load i32*, i32** %147
%149 = load i32, i32* %14
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds i32, i32* %148, i64 %150
store i32 %142, i32* %151
%152 = load i32, i32* %16
%153 = add nsw i32 %152, 1
store i32 %153, i32* %16
store i32 0, i32* %14
store i32 0, i32* %15
br label %185
154: ; preds = %134
%155 = load i8, i8* %20
%156 = sext i8 %155 to i32
%157 = icmp eq i32 %156, 9
br i1 %157, label %158, label %171
158: ; preds = %154
%159 = load i32, i32* %15
%160 = load i32***, i32**** %9
%161 = load i32**, i32*** %160
%162 = load i32, i32* %16
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds i32*, i32** %161, i64 %163
%165 = load i32*, i32** %164
%166 = load i32, i32* %14
%167 = sext i32 %166 to i64
%168 = getelementptr inbounds i32, i32* %165, i64 %167
store i32 %159, i32* %168
%169 = load i32, i32* %14
%170 = add nsw i32 %169, 1
store i32 %170, i32* %14
store i32 0, i32* %15
br label %184
171: ; preds = %154
%172 = load i8, i8* %20
%173 = sext i8 %172 to i32
%174 = icmp eq i32 %173, 32
br i1 %174, label %175, label %178
175: ; preds = %171
%176 = load i32, i32* %15
%177 = add nsw i32 %176, 1
store i32 %177, i32* %15
br label %183
178: ; preds = %171
%179 = load i32, i32* %15
%180 = icmp eq i32 %179, 0
br i1 %180, label %181, label %182
181: ; preds = %178
store i32 1, i32* %15
br label %182
182: ; preds = %181, %178
br label %183
183: ; preds = %182, %175
br label %184
184: ; preds = %183, %158
br label %185
185: ; preds = %184, %141
br label %129
186: ; preds = %129
%187 = load i32*, i32** %11
%188 = call i32 @fclose(i32* %187)
%189 = load i32*, i32** %7
%190 = load i32, i32* %189
%191 = sext i32 %190 to i64
%192 = mul i64 %191, 8
%193 = trunc i64 %192 to i32
%194 = call i8* @malloc(i32 %193)
%195 = bitcast i8* %194 to i32***
store i32*** %195, i32**** %12
store i32 0, i32* %16
br label %196
196: ; preds = %254, %186
%197 = load i32, i32* %16
%198 = load i32*, i32** %7
%199 = load i32, i32* %198
%200 = icmp slt i32 %197, %199
br i1 %200, label %201, label %257
201: ; preds = %196
%202 = load i32**, i32*** %8
%203 = load i32*, i32** %202
%204 = load i32, i32* %16
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds i32, i32* %203, i64 %205
%207 = load i32, i32* %206
%208 = sext i32 %207 to i64
%209 = mul i64 %208, 8
%210 = trunc i64 %209 to i32
%211 = call i8* @malloc(i32 %210)
%212 = bitcast i8* %211 to i32**
%213 = load i32***, i32**** %12
%214 = load i32, i32* %16
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds i32**, i32*** %213, i64 %215
store i32** %212, i32*** %216
store i32 0, i32* %14
br label %217
217: ; preds = %250, %201
%218 = load i32, i32* %14
%219 = load i32**, i32*** %8
%220 = load i32*, i32** %219
%221 = load i32, i32* %16
%222 = sext i32 %221 to i64
%223 = getelementptr inbounds i32, i32* %220, i64 %222
%224 = load i32, i32* %223
%225 = icmp slt i32 %218, %224
br i1 %225, label %226, label %253
226: ; preds = %217
%227 = load i32***, i32**** %9
%228 = load i32**, i32*** %227
%229 = load i32, i32* %16
%230 = sext i32 %229 to i64
%231 = getelementptr inbounds i32*, i32** %228, i64 %230
%232 = load i32*, i32** %231
%233 = load i32, i32* %14
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds i32, i32* %232, i64 %234
%236 = load i32, i32* %235
%237 = sext i32 %236 to i64
%238 = mul i64 %237, 4
%239 = trunc i64 %238 to i32
%240 = call i8* @malloc(i32 %239)
%241 = bitcast i8* %240 to i32*
%242 = load i32***, i32**** %12
%243 = load i32, i32* %16
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds i32**, i32*** %242, i64 %244
%246 = load i32**, i32*** %245
%247 = load i32, i32* %14
%248 = sext i32 %247 to i64
%249 = getelementptr inbounds i32*, i32** %246, i64 %248
store i32* %241, i32** %249
br label %250
250: ; preds = %226
%251 = load i32, i32* %14
%252 = add nsw i32 %251, 1
store i32 %252, i32* %14
br label %217
253: ; preds = %217
br label %254
254: ; preds = %253
%255 = load i32, i32* %16
%256 = add nsw i32 %255, 1
store i32 %256, i32* %16
br label %196
257: ; preds = %196
%258 = load i8*, i8** %6
%259 = call i32* @fopen(i8* %258, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %259, i32** %11
store i32 0, i32* %16
store i32 0, i32* %14
store i32 0, i32* %15
br label %260
260: ; preds = %323, %257
%261 = load i32*, i32** %11
%262 = call i32 @feof(i32* %261)
%263 = icmp ne i32 %262, 0
%264 = xor i1 %263, true
br i1 %264, label %265, label %324
265: ; preds = %260
%266 = load i32*, i32** %11
%267 = call i64 @fgetc(i32* %266)
%268 = trunc i64 %267 to i8
store i8 %268, i8* %20
%269 = load i8, i8* %20
%270 = sext i8 %269 to i32
%271 = icmp sle i32 %270, 0
br i1 %271, label %272, label %273
272: ; preds = %265
br label %324
273: ; preds = %265
%274 = load i8, i8* %20
%275 = sext i8 %274 to i32
%276 = icmp eq i32 %275, 32
br i1 %276, label %277, label %278
277: ; preds = %273
br label %323
278: ; preds = %273
%279 = load i8, i8* %20
%280 = sext i8 %279 to i32
%281 = icmp eq i32 %280, 10
br i1 %281, label %282, label %285
282: ; preds = %278
%283 = load i32, i32* %16
%284 = add nsw i32 %283, 1
store i32 %284, i32* %16
store i32 0, i32* %14
store i32 0, i32* %15
br label %322
285: ; preds = %278
%286 = load i8, i8* %20
%287 = sext i8 %286 to i32
%288 = icmp eq i32 %287, 9
br i1 %288, label %289, label %292
289: ; preds = %285
%290 = load i32, i32* %14
%291 = add nsw i32 %290, 1
store i32 %291, i32* %14
store i32 0, i32* %15
br label %321
292: ; preds = %285
%293 = load i8, i8* %20
%294 = load i32*, i32** %11
%295 = call i32 @ungetc(i8 signext %293, i32* %294)
%296 = load i32*, i32** %11
%297 = call i32 @fscanf(i32* %296, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %19)
store i32 %297, i32* %17
%298 = load i32, i32* %19
%299 = load i32***, i32**** %12
%300 = load i32, i32* %16
%301 = sext i32 %300 to i64
%302 = getelementptr inbounds i32**, i32*** %299, i64 %301
%303 = load i32**, i32*** %302
%304 = load i32, i32* %14
%305 = sext i32 %304 to i64
%306 = getelementptr inbounds i32*, i32** %303, i64 %305
%307 = load i32*, i32** %306
%308 = load i32, i32* %15
%309 = sext i32 %308 to i64
%310 = getelementptr inbounds i32, i32* %307, i64 %309
store i32 %298, i32* %310
%311 = load i32, i32* %19
%312 = load i32*, i32** %10
%313 = load i32, i32* %312
%314 = icmp sgt i32 %311, %313
br i1 %314, label %315, label %318
315: ; preds = %292
%316 = load i32, i32* %19
%317 = load i32*, i32** %10
store i32 %316, i32* %317
br label %318
318: ; preds = %315, %292
%319 = load i32, i32* %15
%320 = add nsw i32 %319, 1
store i32 %320, i32* %15
br label %321
321: ; preds = %318, %289
br label %322
322: ; preds = %321, %282
br label %323
323: ; preds = %322, %277
br label %260
324: ; preds = %272, %260
%325 = load i32*, i32** %11
%326 = call i32 @fclose(i32* %325)
%327 = load i32***, i32**** %12
ret i32*** %327
}

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