#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 /*<<< orphan*/ assert(int);
int atoi(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ free(int *);
int *malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  int *matrix;
  int rows = 100;
  int columns = 100;
  int byrow = 1;
  int debug = 0;
  int order = 0;
  int i, j, opt;
  argc--;
  argv++;
  while (argc >= 1) {
    opt = 1;
    if (*argv[0] == '-') {
      if ((!strcmp(argv[0], "-h")) || (!strcmp(argv[0], "--help"))) {
        usage();
        exit(0);
      } else if ((!strcmp(argv[0], "-d")) || (!strcmp(argv[0], "--debug")))
        debug = 1;
      else if (!strcmp(argv[0], "-bycolumn"))
        byrow = 0;
      else if (!strcmp(argv[0], "-byrow"))
        byrow = 1;
      else {
        opt = 2;
        if (argc < 2) {
          usage();
          exit(-1);
        } else if ((!strcmp(argv[0], "-c")) ||
                   (!strcmp(argv[0], "--columns"))) {
          columns = atoi(argv[1]);
          if (columns < 1) {
            printf("Number of columns cannot be smaller than one. Input: %dn",
                   columns);
            exit(-1);
          }
        } else if ((!strcmp(argv[0], "-r")) || (!strcmp(argv[0], "--rows"))) {
          rows = atoi(argv[1]);
          if (rows < 1) {
            printf("Number of rows cannot be smaller than one. Input: %dn",
                   rows);
            exit(-1);
          }
        } else {
          usage();
          exit(-1);
        }
      }
    }
    argc -= opt;
    argv += opt;
  }
  assert(columns > 0 && rows > 0);
  matrix = malloc(sizeof(int) * columns * rows);
  assert(matrix != NULL);
  printf("Allocated data structure: matrix[%d][%d]n", rows, columns);
  printf("Memory access starts!n");
  if (byrow) {
    for (i = 0; i < rows; i++) {
      for (j = 0; j < columns; j++) {
        matrix[i * columns + j] = order;
        order++;
      }
    }
  } else {
    for (j = 0; j < columns; j++) {
      for (i = 0; i < rows; i++) {
        matrix[i * columns + j] = order;
        order++;
      }
    }
  }
  if (debug) {
    printf("Order that matrix cells were accessedn");
    for (i = 0; i < rows; i++) {
      for (j = 0; j < columns; j++) {
        printf("matrix[%d][%d] = %dn", i, j, matrix[i * columns + j]);
      }
    }
  }
  printf("Memory access ends!n");
  free(matrix);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x64,-0x1c(%rbp)
movl   $0x64,-0x20(%rbp)
movl   $0x1,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     142b <main+0x2ab>
movl   $0x1,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1406 <main+0x286>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe00(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
je     122a <main+0xaa>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xde7(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1238 <main+0xb8>
mov    $0x0,%al
call   1080 <usage@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xdc4(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
je     1270 <main+0xf0>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xdab(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    127c <main+0xfc>
movl   $0x1,-0x28(%rbp)
jmp    13fc <main+0x27c>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xd8b(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    12a4 <main+0x124>
movl   $0x0,-0x24(%rbp)
jmp    13f7 <main+0x277>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xd6d(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    12cc <main+0x14c>
movl   $0x1,-0x24(%rbp)
jmp    13f2 <main+0x272>
movl   $0x2,-0x38(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    12ee <main+0x16e>
mov    $0x0,%al
call   1080 <usage@plt>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xd2a(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
je     1326 <main+0x1a6>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xd11(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1360 <main+0x1e0>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1090 <atoi@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x1,-0x20(%rbp)
jge    135b <main+0x1db>
mov    -0x20(%rbp),%esi
lea    0xce9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>
jmp    13e8 <main+0x268>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xcfe(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
je     1398 <main+0x218>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xce5(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    13d2 <main+0x252>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1090 <atoi@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jge    13cd <main+0x24d>
mov    -0x1c(%rbp),%esi
lea    0xcba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>
jmp    13e3 <main+0x263>
mov    $0x0,%al
call   1080 <usage@plt>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>
jmp    13e8 <main+0x268>
jmp    13ed <main+0x26d>
jmp    13f2 <main+0x272>
jmp    13f7 <main+0x277>
jmp    13fc <main+0x27c>
jmp    1401 <main+0x281>
jmp    1406 <main+0x286>
mov    -0x38(%rbp),%ecx
mov    -0x8(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x38(%rbp),%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    11ce <main+0x4e>
xor    %eax,%eax
cmpl   $0x0,-0x20(%rbp)
mov    %al,-0x39(%rbp)
jle    1444 <main+0x2c4>
cmpl   $0x0,-0x1c(%rbp)
setg   %al
mov    %al,-0x39(%rbp)
mov    -0x39(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movslq -0x20(%rbp),%rax
shl    $0x2,%rax
movslq -0x1c(%rbp),%rcx
imul   %rcx,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
lea    0xc21(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xc3d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x24(%rbp)
je     1516 <main+0x396>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1511 <main+0x391>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    14fe <main+0x37e>
mov    -0x2c(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x20(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    14c4 <main+0x344>
jmp    1503 <main+0x383>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    14b1 <main+0x331>
jmp    1582 <main+0x402>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    157d <main+0x3fd>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    156a <main+0x3ea>
mov    -0x2c(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x20(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1530 <main+0x3b0>
jmp    156f <main+0x3ef>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    151d <main+0x39d>
jmp    1582 <main+0x402>
cmpl   $0x0,-0x28(%rbp)
je     160e <main+0x48e>
lea    0xb5a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1609 <main+0x489>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    15f6 <main+0x476>
mov    -0x30(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x20(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%ecx
lea    0xb33(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    15b4 <main+0x434>
jmp    15fb <main+0x47b>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    15a1 <main+0x421>
jmp    160e <main+0x48e>
lea    0xb14(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
cmp    $0x2,%edi
jl     1343 <main+0x1c3>
mov    %rsi,%rbp
mov    %edi,%ebx
add    $0x8,%rbp
add    $0xffffffff,%ebx
movl   $0x64,0x4(%rsp)
movl   $0x1,0x8(%rsp)
xor    %r15d,%r15d
mov    $0x64,%r12d
jmp    11e7 <main+0x67>
movl   $0x1,0x8(%rsp)
cs nopw 0x0(%rax,%rax,1)
mov    $0x1,%r14d
mov    %r14d,%eax
lea    0x0(%rbp,%rax,8),%rbp
sub    %r14d,%ebx
jle    135c <main+0x1dc>
mov    0x0(%rbp),%r13
cmpb   $0x2d,0x0(%r13)
jne    11d0 <main+0x50>
mov    %r13,%rdi
lea    0xe94(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     1767 <main+0x5e7>
mov    %r13,%rdi
lea    0xe80(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     1767 <main+0x5e7>
mov    %r13,%rdi
lea    0xe70(%rip),%rsi
call   1050 <strcmp@plt>
mov    $0x1,%r14d
test   %eax,%eax
je     1300 <main+0x180>
mov    %r13,%rdi
lea    0xe56(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     1300 <main+0x180>
mov    %r13,%rdi
lea    0xe47(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     130b <main+0x18b>
mov    %r13,%rdi
lea    0xe3a(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     11be <main+0x3e>
cmp    $0x1,%ebx
jbe    1775 <main+0x5f5>
mov    %r13,%rdi
lea    0xe21(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     1318 <main+0x198>
mov    %r13,%rdi
lea    0xe11(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     1318 <main+0x198>
mov    %r13,%rdi
lea    0xe41(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12db <main+0x15b>
mov    %r13,%rdi
lea    0xe31(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
jne    1775 <main+0x5f5>
mov    0x8(%rbp),%rdi
call   1090 <atoi@plt>
mov    %eax,%r12d
mov    $0x2,%r14d
test   %eax,%eax
jg     11d6 <main+0x56>
jmp    1786 <main+0x606>
nopw   0x0(%rax,%rax,1)
mov    $0x1,%r15d
jmp    11d6 <main+0x56>
movl   $0x0,0x8(%rsp)
jmp    11d6 <main+0x56>
mov    0x8(%rbp),%rdi
call   1090 <atoi@plt>
mov    $0x2,%r14d
mov    %eax,0x4(%rsp)
test   %eax,%eax
jg     11d6 <main+0x56>
lea    0xd89(%rip),%rdi
mov    0x4(%rsp),%esi
jmp    1790 <main+0x610>
xor    %r15d,%r15d
movl   $0x1,0x8(%rsp)
mov    $0x64,%r12d
movl   $0x64,0x4(%rsp)
mov    %r15d,0x24(%rsp)
mov    $0x1,%edi
call   1060 <assert@plt>
mov    %r12d,%edi
mov    0x4(%rsp),%ebx
imul   %ebx,%edi
shl    $0x2,%edi
call   1070 <malloc@plt>
xor    %edi,%edi
mov    %rax,0x18(%rsp)
test   %rax,%rax
setne  %dil
call   1060 <assert@plt>
lea    0xda5(%rip),%rdi
mov    %r12d,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdbc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x0,0x8(%rsp)
mov    %r12d,0x10(%rsp)
je     15c8 <main+0x448>
test   %r12d,%r12d
jle    16b3 <main+0x533>
mov    0x4(%rsp),%eax
movslq %eax,%r9
mov    0x10(%rsp),%r13d
mov    %eax,%r11d
mov    %r11d,%r12d
and    $0xfffffff8,%r12d
lea    -0x8(%r12),%rax
mov    %rax,0x8(%rsp)
shr    $0x3,%rax
add    $0x1,%rax
mov    %eax,%r10d
and    $0x3,%r10d
and    $0xfffffffffffffffc,%rax
mov    %rax,0x28(%rsp)
mov    0x18(%rsp),%rcx
lea    0x70(%rcx),%rbx
shl    $0x2,%r9
mov    %rcx,%r15
add    $0x10,%r15
mov    %r10,0x30(%rsp)
shl    $0x5,%r10
xor    %edx,%edx
movdqa 0xbd6(%rip),%xmm8
movdqa 0xbde(%rip),%xmm1
movdqa 0xbe6(%rip),%xmm2
movdqa 0xbed(%rip),%xmm9
movdqa 0xbf4(%rip),%xmm10
movdqa 0xbfb(%rip),%xmm11
movdqa 0xc03(%rip),%xmm6
movdqa 0xc0b(%rip),%xmm7
movdqa 0xc13(%rip),%xmm0
xor    %r14d,%r14d
jmp    1496 <main+0x316>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rdx
add    %r9,%rbx
add    %r9,%r15
add    %r9,%rcx
cmp    %r13,%rdx
je     16b3 <main+0x533>
mov    0x4(%rsp),%eax
test   %eax,%eax
jle    1480 <main+0x300>
cmp    $0x8,%eax
jae    14b0 <main+0x330>
xor    %ebp,%ebp
jmp    159f <main+0x41f>
nopw   0x0(%rax,%rax,1)
movd   %r14d,%xmm3
pshufd $0x0,%xmm3,%xmm3
paddd  %xmm8,%xmm3
cmpq   $0x18,0x8(%rsp)
jae    14cf <main+0x34f>
xor    %r8d,%r8d
jmp    1560 <main+0x3e0>
mov    0x28(%rsp),%rsi
xor    %r8d,%r8d
nopw   0x0(%rax,%rax,1)
movdqa %xmm3,%xmm4
paddd  %xmm1,%xmm4
movdqu %xmm3,-0x70(%rbx,%r8,4)
movdqu %xmm4,-0x60(%rbx,%r8,4)
movdqa %xmm3,%xmm4
paddd  %xmm2,%xmm4
movdqa %xmm3,%xmm5
paddd  %xmm9,%xmm5
movdqu %xmm4,-0x50(%rbx,%r8,4)
movdqu %xmm5,-0x40(%rbx,%r8,4)
movdqa %xmm3,%xmm4
paddd  %xmm10,%xmm4
movdqa %xmm3,%xmm5
paddd  %xmm11,%xmm5
movdqu %xmm4,-0x30(%rbx,%r8,4)
movdqu %xmm5,-0x20(%rbx,%r8,4)
movdqa %xmm3,%xmm4
paddd  %xmm6,%xmm4
movdqa %xmm3,%xmm5
paddd  %xmm7,%xmm5
movdqu %xmm4,-0x10(%rbx,%r8,4)
movdqu %xmm5,(%rbx,%r8,4)
add    $0x20,%r8
paddd  %xmm0,%xmm3
add    $0xfffffffffffffffc,%rsi
jne    14e0 <main+0x360>
cmpq   $0x0,0x30(%rsp)
je     1590 <main+0x410>
lea    (%r15,%r8,4),%rsi
xor    %eax,%eax
xchg   %ax,%ax
movdqa %xmm3,%xmm4
paddd  %xmm1,%xmm4
movdqu %xmm3,-0x10(%rsi,%rax,1)
movdqu %xmm4,(%rsi,%rax,1)
paddd  %xmm2,%xmm3
add    $0x20,%rax
cmp    %rax,%r10
jne    1570 <main+0x3f0>
add    %r12d,%r14d
mov    %r12,%rbp
cmp    %r11,%r12
je     1480 <main+0x300>
lea    (%rcx,%rbp,4),%rsi
mov    %r11,%rax
sub    %rbp,%rax
mov    %r14d,%r14d
xor    %ebp,%ebp
xchg   %ax,%ax
lea    (%r14,%rbp,1),%edi
mov    %edi,(%rsi,%rbp,4)
add    $0x1,%rbp
cmp    %rbp,%rax
jne    15b0 <main+0x430>
add    %ebp,%r14d
jmp    1480 <main+0x300>
test   %ebx,%ebx
jle    16b3 <main+0x533>
mov    0x4(%rsp),%eax
mov    0x10(%rsp),%r14d
lea    -0x1(%r14),%r8
mov    %r14d,%r9d
and    $0x3,%r9d
and    $0xfffffffc,%r14d
mov    %rax,%r12
shl    $0x4,%r12
lea    0x0(,%rax,4),%rbp
lea    0x0(,%rbp,2),%r15
add    %rbp,%r15
xor    %r11d,%r11d
mov    0x18(%rsp),%r10
xor    %esi,%esi
jmp    1621 <main+0x4a1>
xchg   %ax,%ax
add    $0x1,%r11
add    $0x4,%r10
cmp    %rax,%r11
je     16b3 <main+0x533>
cmpl   $0x0,0x10(%rsp)
jle    1610 <main+0x490>
cmp    $0x3,%r8
jae    1640 <main+0x4c0>
xor    %edx,%edx
test   %r9,%r9
jne    1682 <main+0x502>
jmp    1610 <main+0x490>
nopw   0x0(%rax,%rax,1)
mov    %esi,%ecx
mov    %r10,%rdi
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
lea    (%rcx,%rdx,1),%ebx
mov    %ebx,(%rdi)
lea    (%rcx,%rdx,1),%ebx
add    $0x1,%ebx
mov    %ebx,(%rdi,%rax,4)
lea    0x2(%rcx,%rdx,1),%ebx
mov    %ebx,(%rdi,%rax,8)
lea    (%rcx,%rdx,1),%ebx
add    $0x3,%ebx
mov    %ebx,(%rdi,%r15,1)
add    $0x4,%rdx
add    %r12,%rdi
cmp    %rdx,%r14
jne    1650 <main+0x4d0>
add    %edx,%esi
test   %r9,%r9
je     1610 <main+0x490>
imul   %rax,%rdx
add    %r11,%rdx
mov    0x18(%rsp),%rcx
lea    (%rcx,%rdx,4),%rcx
mov    %r9,%rdx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %esi,(%rcx)
add    $0x1,%esi
add    %rbp,%rcx
add    $0xffffffffffffffff,%rdx
jne    16a0 <main+0x520>
jmp    1610 <main+0x490>
cmpl   $0x0,0x24(%rsp)
mov    0x10(%rsp),%ebx
je     173e <main+0x5be>
lea    0xab4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebx,%ebx
jle    173e <main+0x5be>
mov    0x4(%rsp),%eax
movslq %eax,%r14
mov    %ebx,%ecx
mov    %rcx,0x10(%rsp)
mov    %eax,%r12d
shl    $0x2,%r14
lea    0xab4(%rip),%r15
mov    0x18(%rsp),%r13
xor    %ebp,%ebp
jmp    170e <main+0x58e>
nopl   0x0(%rax)
add    $0x1,%rbp
add    %r14,%r13
cmp    0x10(%rsp),%rbp
je     173e <main+0x5be>
cmpl   $0x0,0x4(%rsp)
jle    1700 <main+0x580>
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    0x0(%r13,%rbx,4),%ecx
mov    %r15,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1720 <main+0x5a0>
jmp    1700 <main+0x580>
lea    0xa74(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
call   1080 <usage@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
xor    %eax,%eax
call   1080 <usage@plt>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>
lea    0x979(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"-h\00"
@.str.1 = [7 x i8] c"--help\00"
@.str.2 = [3 x i8] c"-d\00"
@.str.3 = [8 x i8] c"--debug\00"
@.str.4 = [10 x i8] c"-bycolumn\00"
@.str.5 = [7 x i8] c"-byrow\00"
@.str.6 = [3 x i8] c"-c\00"
@.str.7 = [10 x i8] c"--columns\00"
@.str.8 = [57 x i8] c"Number of columns cannot be smaller than one. Input: %dn\00"
@.str.9 = [3 x i8] c"-r\00"
@.str.10 = [7 x i8] c"--rows\00"
@.str.11 = [54 x i8] c"Number of rows cannot be smaller than one. Input: %dn\00"
@.str.12 = [42 x i8] c"Allocated data structure: matrix[%d][%d]n\00"
@.str.13 = [23 x i8] c"Memory access starts!n\00"
@.str.14 = [39 x i8] c"Order that matrix cells were accessedn\00"
@.str.15 = [21 x i8] c"matrix[%d][%d] = %dn\00"
@.str.16 = [21 x i8] c"Memory access ends!n\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 i32
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 100, i32* %7
store i32 100, i32* %8
store i32 1, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
%15 = load i32, i32* %4
%16 = add nsw i32 %15, -1
store i32 %16, i32* %4
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i32 1
store i8** %18, i8*** %5
br label %19
19: ; preds = %135, %2
%20 = load i32, i32* %4
%21 = icmp sge i32 %20, 1
br i1 %21, label %22, label %143
22: ; preds = %19
store i32 1, i32* %14
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 0
%25 = load i8*, i8** %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 45
br i1 %28, label %29, label %135
29: ; preds = %22
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 0
%32 = load i8*, i8** %31
%33 = call i32 @strcmp(i8* %32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %41
35: ; preds = %29
%36 = load i8**, i8*** %5
%37 = getelementptr inbounds i8*, i8** %36, i64 0
%38 = load i8*, i8** %37
%39 = call i32 @strcmp(i8* %38, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%40 = icmp ne i32 %39, 0
br i1 %40, label %44, label %41
41: ; preds = %35, %29
%42 = call i32 (...) @usage()
%43 = call i32 @exit(i32 0)
unreachable
44: ; preds = %35
%45 = load i8**, i8*** %5
%46 = getelementptr inbounds i8*, i8** %45, i64 0
%47 = load i8*, i8** %46
%48 = call i32 @strcmp(i8* %47, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%49 = icmp ne i32 %48, 0
br i1 %49, label %50, label %56
50: ; preds = %44
%51 = load i8**, i8*** %5
%52 = getelementptr inbounds i8*, i8** %51, i64 0
%53 = load i8*, i8** %52
%54 = call i32 @strcmp(i8* %53, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%55 = icmp ne i32 %54, 0
br i1 %55, label %57, label %56
56: ; preds = %50, %44
store i32 1, i32* %10
br label %133
57: ; preds = %50
%58 = load i8**, i8*** %5
%59 = getelementptr inbounds i8*, i8** %58, i64 0
%60 = load i8*, i8** %59
%61 = call i32 @strcmp(i8* %60, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%62 = icmp ne i32 %61, 0
br i1 %62, label %64, label %63
63: ; preds = %57
store i32 0, i32* %9
br label %132
64: ; preds = %57
%65 = load i8**, i8*** %5
%66 = getelementptr inbounds i8*, i8** %65, i64 0
%67 = load i8*, i8** %66
%68 = call i32 @strcmp(i8* %67, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%69 = icmp ne i32 %68, 0
br i1 %69, label %71, label %70
70: ; preds = %64
store i32 1, i32* %9
br label %131
71: ; preds = %64
store i32 2, i32* %14
%72 = load i32, i32* %4
%73 = icmp slt i32 %72, 2
br i1 %73, label %74, label %77
74: ; preds = %71
%75 = call i32 (...) @usage()
%76 = call i32 @exit(i32 -1)
unreachable
77: ; preds = %71
%78 = load i8**, i8*** %5
%79 = getelementptr inbounds i8*, i8** %78, i64 0
%80 = load i8*, i8** %79
%81 = call i32 @strcmp(i8* %80, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%82 = icmp ne i32 %81, 0
br i1 %82, label %83, label %89
83: ; preds = %77
%84 = load i8**, i8*** %5
%85 = getelementptr inbounds i8*, i8** %84, i64 0
%86 = load i8*, i8** %85
%87 = call i32 @strcmp(i8* %86, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
%88 = icmp ne i32 %87, 0
br i1 %88, label %101, label %89
89: ; preds = %83, %77
%90 = load i8**, i8*** %5
%91 = getelementptr inbounds i8*, i8** %90, i64 1
%92 = load i8*, i8** %91
%93 = call i32 @atoi(i8* %92)
store i32 %93, i32* %8
%94 = load i32, i32* %8
%95 = icmp slt i32 %94, 1
br i1 %95, label %96, label %100
96: ; preds = %89
%97 = load i32, i32* %8
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.8, i64 0, i64 0), i32 %97)
%99 = call i32 @exit(i32 -1)
unreachable
100: ; preds = %89
br label %129
101: ; preds = %83
%102 = load i8**, i8*** %5
%103 = getelementptr inbounds i8*, i8** %102, i64 0
%104 = load i8*, i8** %103
%105 = call i32 @strcmp(i8* %104, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%106 = icmp ne i32 %105, 0
br i1 %106, label %107, label %113
107: ; preds = %101
%108 = load i8**, i8*** %5
%109 = getelementptr inbounds i8*, i8** %108, i64 0
%110 = load i8*, i8** %109
%111 = call i32 @strcmp(i8* %110, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%112 = icmp ne i32 %111, 0
br i1 %112, label %125, label %113
113: ; preds = %107, %101
%114 = load i8**, i8*** %5
%115 = getelementptr inbounds i8*, i8** %114, i64 1
%116 = load i8*, i8** %115
%117 = call i32 @atoi(i8* %116)
store i32 %117, i32* %7
%118 = load i32, i32* %7
%119 = icmp slt i32 %118, 1
br i1 %119, label %120, label %124
120: ; preds = %113
%121 = load i32, i32* %7
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.11, i64 0, i64 0), i32 %121)
%123 = call i32 @exit(i32 -1)
unreachable
124: ; preds = %113
br label %128
125: ; preds = %107
%126 = call i32 (...) @usage()
%127 = call i32 @exit(i32 -1)
unreachable
128: ; preds = %124
br label %129
129: ; preds = %128, %100
br label %130
130: ; preds = %129
br label %131
131: ; preds = %130, %70
br label %132
132: ; preds = %131, %63
br label %133
133: ; preds = %132, %56
br label %134
134: ; preds = %133
br label %135
135: ; preds = %134, %22
%136 = load i32, i32* %14
%137 = load i32, i32* %4
%138 = sub nsw i32 %137, %136
store i32 %138, i32* %4
%139 = load i32, i32* %14
%140 = load i8**, i8*** %5
%141 = sext i32 %139 to i64
%142 = getelementptr inbounds i8*, i8** %140, i64 %141
store i8** %142, i8*** %5
br label %19
143: ; preds = %19
%144 = load i32, i32* %8
%145 = icmp sgt i32 %144, 0
br i1 %145, label %146, label %149
146: ; preds = %143
%147 = load i32, i32* %7
%148 = icmp sgt i32 %147, 0
br label %149
149: ; preds = %146, %143
%150 = phi i1 [ false, %143 ], [ %148, %146 ]
%151 = zext i1 %150 to i32
%152 = call i32 @assert(i32 %151)
%153 = load i32, i32* %8
%154 = sext i32 %153 to i64
%155 = mul i64 4, %154
%156 = load i32, i32* %7
%157 = sext i32 %156 to i64
%158 = mul i64 %155, %157
%159 = trunc i64 %158 to i32
%160 = call i32* @malloc(i32 %159)
store i32* %160, i32** %6
%161 = load i32*, i32** %6
%162 = icmp ne i32* %161, null
%163 = zext i1 %162 to i32
%164 = call i32 @assert(i32 %163)
%165 = load i32, i32* %7
%166 = load i32, i32* %8
%167 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.12, i64 0, i64 0), i32 %165, i32 %166)
%168 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0))
%169 = load i32, i32* %9
%170 = icmp ne i32 %169, 0
br i1 %170, label %171, label %201
171: ; preds = %149
store i32 0, i32* %12
br label %172
172: ; preds = %197, %171
%173 = load i32, i32* %12
%174 = load i32, i32* %7
%175 = icmp slt i32 %173, %174
br i1 %175, label %176, label %200
176: ; preds = %172
store i32 0, i32* %13
br label %177
177: ; preds = %193, %176
%178 = load i32, i32* %13
%179 = load i32, i32* %8
%180 = icmp slt i32 %178, %179
br i1 %180, label %181, label %196
181: ; preds = %177
%182 = load i32, i32* %11
%183 = load i32*, i32** %6
%184 = load i32, i32* %12
%185 = load i32, i32* %8
%186 = mul nsw i32 %184, %185
%187 = load i32, i32* %13
%188 = add nsw i32 %186, %187
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds i32, i32* %183, i64 %189
store i32 %182, i32* %190
%191 = load i32, i32* %11
%192 = add nsw i32 %191, 1
store i32 %192, i32* %11
br label %193
193: ; preds = %181
%194 = load i32, i32* %13
%195 = add nsw i32 %194, 1
store i32 %195, i32* %13
br label %177
196: ; preds = %177
br label %197
197: ; preds = %196
%198 = load i32, i32* %12
%199 = add nsw i32 %198, 1
store i32 %199, i32* %12
br label %172
200: ; preds = %172
br label %231
201: ; preds = %149
store i32 0, i32* %13
br label %202
202: ; preds = %227, %201
%203 = load i32, i32* %13
%204 = load i32, i32* %8
%205 = icmp slt i32 %203, %204
br i1 %205, label %206, label %230
206: ; preds = %202
store i32 0, i32* %12
br label %207
207: ; preds = %223, %206
%208 = load i32, i32* %12
%209 = load i32, i32* %7
%210 = icmp slt i32 %208, %209
br i1 %210, label %211, label %226
211: ; preds = %207
%212 = load i32, i32* %11
%213 = load i32*, i32** %6
%214 = load i32, i32* %12
%215 = load i32, i32* %8
%216 = mul nsw i32 %214, %215
%217 = load i32, i32* %13
%218 = add nsw i32 %216, %217
%219 = sext i32 %218 to i64
%220 = getelementptr inbounds i32, i32* %213, i64 %219
store i32 %212, i32* %220
%221 = load i32, i32* %11
%222 = add nsw i32 %221, 1
store i32 %222, i32* %11
br label %223
223: ; preds = %211
%224 = load i32, i32* %12
%225 = add nsw i32 %224, 1
store i32 %225, i32* %12
br label %207
226: ; preds = %207
br label %227
227: ; preds = %226
%228 = load i32, i32* %13
%229 = add nsw i32 %228, 1
store i32 %229, i32* %13
br label %202
230: ; preds = %202
br label %231
231: ; preds = %230, %200
%232 = load i32, i32* %10
%233 = icmp ne i32 %232, 0
br i1 %233, label %234, label %266
234: ; preds = %231
%235 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.14, i64 0, i64 0))
store i32 0, i32* %12
br label %236
236: ; preds = %262, %234
%237 = load i32, i32* %12
%238 = load i32, i32* %7
%239 = icmp slt i32 %237, %238
br i1 %239, label %240, label %265
240: ; preds = %236
store i32 0, i32* %13
br label %241
241: ; preds = %258, %240
%242 = load i32, i32* %13
%243 = load i32, i32* %8
%244 = icmp slt i32 %242, %243
br i1 %244, label %245, label %261
245: ; preds = %241
%246 = load i32, i32* %12
%247 = load i32, i32* %13
%248 = load i32*, i32** %6
%249 = load i32, i32* %12
%250 = load i32, i32* %8
%251 = mul nsw i32 %249, %250
%252 = load i32, i32* %13
%253 = add nsw i32 %251, %252
%254 = sext i32 %253 to i64
%255 = getelementptr inbounds i32, i32* %248, i64 %254
%256 = load i32, i32* %255
%257 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0), i32 %246, i32 %247, i32 %256)
br label %258
258: ; preds = %245
%259 = load i32, i32* %13
%260 = add nsw i32 %259, 1
store i32 %260, i32* %13
br label %241
261: ; preds = %241
br label %262
262: ; preds = %261
%263 = load i32, i32* %12
%264 = add nsw i32 %263, 1
store i32 %264, i32* %12
br label %236
265: ; preds = %236
br label %266
266: ; preds = %265, %231
%267 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i64 0, i64 0))
%268 = load i32*, i32** %6
%269 = call i32 @free(i32* %268)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"-h\00"
@.str.1 = [7 x i8] c"--help\00"
@.str.2 = [3 x i8] c"-d\00"
@.str.3 = [8 x i8] c"--debug\00"
@.str.4 = [10 x i8] c"-bycolumn\00"
@.str.5 = [7 x i8] c"-byrow\00"
@.str.6 = [3 x i8] c"-c\00"
@.str.7 = [10 x i8] c"--columns\00"
@.str.8 = [57 x i8] c"Number of columns cannot be smaller than one. Input: %dn\00"
@.str.9 = [3 x i8] c"-r\00"
@.str.10 = [7 x i8] c"--rows\00"
@.str.11 = [54 x i8] c"Number of rows cannot be smaller than one. Input: %dn\00"
@.str.12 = [42 x i8] c"Allocated data structure: matrix[%d][%d]n\00"
@.str.13 = [23 x i8] c"Memory access starts!n\00"
@.str.14 = [39 x i8] c"Order that matrix cells were accessedn\00"
@.str.15 = [21 x i8] c"matrix[%d][%d] = %dn\00"
@.str.16 = [21 x i8] c"Memory access ends!n\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %84
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = add nsw i32 %0, -1
br label %7
7: ; preds = %4, %74
%8 = phi i32 [ %78, %74 ], [ 0, %4 ]
%9 = phi i32 [ %77, %74 ], [ 1, %4 ]
%10 = phi i32 [ %76, %74 ], [ 100, %4 ]
%11 = phi i32 [ %75, %74 ], [ 100, %4 ]
%12 = phi i32 [ %80, %74 ], [ %6, %4 ]
%13 = phi i8** [ %82, %74 ], [ %5, %4 ]
%14 = load i8*, i8** %13
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 45
br i1 %16, label %17, label %74
17: ; preds = %7
%18 = tail call i32 @strcmp(i8* %14, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%19 = icmp eq i32 %18, 0
br i1 %19, label %23, label %20
20: ; preds = %17
%21 = tail call i32 @strcmp(i8* %14, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %20, %17
%24 = tail call i32 (...) @usage()
%25 = tail call i32 @exit(i32 0)
unreachable
26: ; preds = %20
%27 = tail call i32 @strcmp(i8* %14, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%28 = icmp eq i32 %27, 0
br i1 %28, label %74, label %29
29: ; preds = %26
%30 = tail call i32 @strcmp(i8* %14, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%31 = icmp eq i32 %30, 0
br i1 %31, label %74, label %32
32: ; preds = %29
%33 = tail call i32 @strcmp(i8* %14, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%34 = icmp eq i32 %33, 0
br i1 %34, label %74, label %35
35: ; preds = %32
%36 = tail call i32 @strcmp(i8* %14, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%37 = icmp eq i32 %36, 0
br i1 %37, label %74, label %38
38: ; preds = %35
%39 = icmp ult i32 %12, 2
br i1 %39, label %40, label %43
40: ; preds = %38
%41 = tail call i32 (...) @usage()
%42 = tail call i32 @exit(i32 -1)
unreachable
43: ; preds = %38
%44 = tail call i32 @strcmp(i8* %14, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%45 = icmp eq i32 %44, 0
br i1 %45, label %49, label %46
46: ; preds = %43
%47 = tail call i32 @strcmp(i8* %14, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
%48 = icmp eq i32 %47, 0
br i1 %48, label %49, label %57
49: ; preds = %46, %43
%50 = getelementptr inbounds i8*, i8** %13, i64 1
%51 = load i8*, i8** %50
%52 = tail call i32 @atoi(i8* %51)
%53 = icmp slt i32 %52, 1
br i1 %53, label %54, label %74
54: ; preds = %49
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.8, i64 0, i64 0), i32 %52)
%56 = tail call i32 @exit(i32 -1)
unreachable
57: ; preds = %46
%58 = tail call i32 @strcmp(i8* %14, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%59 = icmp eq i32 %58, 0
br i1 %59, label %63, label %60
60: ; preds = %57
%61 = tail call i32 @strcmp(i8* %14, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%62 = icmp eq i32 %61, 0
br i1 %62, label %63, label %71
63: ; preds = %60, %57
%64 = getelementptr inbounds i8*, i8** %13, i64 1
%65 = load i8*, i8** %64
%66 = tail call i32 @atoi(i8* %65)
%67 = icmp slt i32 %66, 1
br i1 %67, label %68, label %74
68: ; preds = %63
%69 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.11, i64 0, i64 0), i32 %66)
%70 = tail call i32 @exit(i32 -1)
unreachable
71: ; preds = %60
%72 = tail call i32 (...) @usage()
%73 = tail call i32 @exit(i32 -1)
unreachable
74: ; preds = %35, %32, %26, %29, %63, %49, %7
%75 = phi i32 [ %66, %63 ], [ %11, %49 ], [ %11, %7 ], [ %11, %29 ], [ %11, %26 ], [ %11, %32 ], [ %11, %35 ]
%76 = phi i32 [ %10, %63 ], [ %52, %49 ], [ %10, %7 ], [ %10, %29 ], [ %10, %26 ], [ %10, %32 ], [ %10, %35 ]
%77 = phi i32 [ %9, %63 ], [ %9, %49 ], [ %9, %7 ], [ %9, %29 ], [ %9, %26 ], [ 0, %32 ], [ 1, %35 ]
%78 = phi i32 [ %8, %63 ], [ %8, %49 ], [ %8, %7 ], [ 1, %29 ], [ 1, %26 ], [ %8, %32 ], [ %8, %35 ]
%79 = phi i32 [ 2, %63 ], [ 2, %49 ], [ 1, %7 ], [ 1, %29 ], [ 1, %26 ], [ 1, %32 ], [ 1, %35 ]
%80 = sub nsw i32 %12, %79
%81 = zext i32 %79 to i64
%82 = getelementptr inbounds i8*, i8** %13, i64 %81
%83 = icmp sgt i32 %80, 0
br i1 %83, label %7, label %84
84: ; preds = %74, %2
%85 = phi i32 [ 100, %2 ], [ %75, %74 ]
%86 = phi i32 [ 100, %2 ], [ %76, %74 ]
%87 = phi i32 [ 1, %2 ], [ %77, %74 ]
%88 = phi i32 [ 0, %2 ], [ %78, %74 ]
%89 = tail call i32 @assert(i32 1)
%90 = shl i32 %85, 2
%91 = mul i32 %90, %86
%92 = tail call i32* @malloc(i32 %91)
%93 = icmp ne i32* %92, null
%94 = zext i1 %93 to i32
%95 = tail call i32 @assert(i32 %94)
%96 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.12, i64 0, i64 0), i32 %85, i32 %86)
%97 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0))
%98 = icmp eq i32 %87, 0
br i1 %98, label %118, label %99
99: ; preds = %84
%100 = icmp sgt i32 %85, 0
br i1 %100, label %101, label %260
101: ; preds = %99
%102 = icmp sgt i32 %86, 0
%103 = sext i32 %86 to i64
%104 = zext i32 %85 to i64
%105 = zext i32 %86 to i64
%106 = and i64 %105, 4294967288
%107 = add nsw i64 %106, -8
%108 = lshr exact i64 %107, 3
%109 = add nuw nsw i64 %108, 1
%110 = icmp ult i32 %86, 8
%111 = and i64 %105, 4294967288
%112 = trunc i64 %111 to i32
%113 = and i64 %109, 3
%114 = icmp ult i64 %107, 24
%115 = and i64 %109, 4611686018427387900
%116 = icmp eq i64 %113, 0
%117 = icmp eq i64 %111, %105
br label %130
118: ; preds = %84
%119 = icmp sgt i32 %86, 0
br i1 %119, label %120, label %260
120: ; preds = %118
%121 = icmp sgt i32 %85, 0
%122 = zext i32 %86 to i64
%123 = zext i32 %86 to i64
%124 = zext i32 %85 to i64
%125 = add nsw i64 %124, -1
%126 = and i64 %124, 3
%127 = icmp ult i64 %125, 3
%128 = and i64 %124, 4294967292
%129 = icmp eq i64 %126, 0
br label %211
130: ; preds = %101, %207
%131 = phi i64 [ 0, %101 ], [ %209, %207 ]
%132 = phi i32 [ 0, %101 ], [ %208, %207 ]
br i1 %102, label %133, label %207
133: ; preds = %130
%134 = mul nsw i64 %131, %103
br i1 %110, label %196, label %135
135: ; preds = %133
%136 = add i32 %132, %112
%137 = insertelement <4 x i32> poison, i32 %132, i64 0
%138 = shufflevector <4 x i32> %137, <4 x i32> poison, <4 x i32> zeroinitializer
%139 = add <4 x i32> %138, <i32 0, i32 1, i32 2, i32 3>
br i1 %114, label %178, label %140
140: ; preds = %135, %140
%141 = phi i64 [ %174, %140 ], [ 0, %135 ]
%142 = phi <4 x i32> [ %175, %140 ], [ %139, %135 ]
%143 = phi i64 [ %176, %140 ], [ 0, %135 ]
%144 = add <4 x i32> %142, <i32 4, i32 4, i32 4, i32 4>
%145 = add nsw i64 %141, %134
%146 = getelementptr inbounds i32, i32* %92, i64 %145
%147 = bitcast i32* %146 to <4 x i32>*
store <4 x i32> %142, <4 x i32>* %147
%148 = getelementptr inbounds i32, i32* %146, i64 4
%149 = bitcast i32* %148 to <4 x i32>*
store <4 x i32> %144, <4 x i32>* %149
%150 = or i64 %141, 8
%151 = add <4 x i32> %142, <i32 8, i32 8, i32 8, i32 8>
%152 = add <4 x i32> %142, <i32 12, i32 12, i32 12, i32 12>
%153 = add nsw i64 %150, %134
%154 = getelementptr inbounds i32, i32* %92, i64 %153
%155 = bitcast i32* %154 to <4 x i32>*
store <4 x i32> %151, <4 x i32>* %155
%156 = getelementptr inbounds i32, i32* %154, i64 4
%157 = bitcast i32* %156 to <4 x i32>*
store <4 x i32> %152, <4 x i32>* %157
%158 = or i64 %141, 16
%159 = add <4 x i32> %142, <i32 16, i32 16, i32 16, i32 16>
%160 = add <4 x i32> %142, <i32 20, i32 20, i32 20, i32 20>
%161 = add nsw i64 %158, %134
%162 = getelementptr inbounds i32, i32* %92, i64 %161
%163 = bitcast i32* %162 to <4 x i32>*
store <4 x i32> %159, <4 x i32>* %163
%164 = getelementptr inbounds i32, i32* %162, i64 4
%165 = bitcast i32* %164 to <4 x i32>*
store <4 x i32> %160, <4 x i32>* %165
%166 = or i64 %141, 24
%167 = add <4 x i32> %142, <i32 24, i32 24, i32 24, i32 24>
%168 = add <4 x i32> %142, <i32 28, i32 28, i32 28, i32 28>
%169 = add nsw i64 %166, %134
%170 = getelementptr inbounds i32, i32* %92, i64 %169
%171 = bitcast i32* %170 to <4 x i32>*
store <4 x i32> %167, <4 x i32>* %171
%172 = getelementptr inbounds i32, i32* %170, i64 4
%173 = bitcast i32* %172 to <4 x i32>*
store <4 x i32> %168, <4 x i32>* %173
%174 = add nuw i64 %141, 32
%175 = add <4 x i32> %142, <i32 32, i32 32, i32 32, i32 32>
%176 = add i64 %143, 4
%177 = icmp eq i64 %176, %115
br i1 %177, label %178, label %140
178: ; preds = %140, %135
%179 = phi i64 [ 0, %135 ], [ %174, %140 ]
%180 = phi <4 x i32> [ %139, %135 ], [ %175, %140 ]
br i1 %116, label %195, label %181
181: ; preds = %178, %181
%182 = phi i64 [ %191, %181 ], [ %179, %178 ]
%183 = phi <4 x i32> [ %192, %181 ], [ %180, %178 ]
%184 = phi i64 [ %193, %181 ], [ 0, %178 ]
%185 = add <4 x i32> %183, <i32 4, i32 4, i32 4, i32 4>
%186 = add nsw i64 %182, %134
%187 = getelementptr inbounds i32, i32* %92, i64 %186
%188 = bitcast i32* %187 to <4 x i32>*
store <4 x i32> %183, <4 x i32>* %188
%189 = getelementptr inbounds i32, i32* %187, i64 4
%190 = bitcast i32* %189 to <4 x i32>*
store <4 x i32> %185, <4 x i32>* %190
%191 = add nuw i64 %182, 8
%192 = add <4 x i32> %183, <i32 8, i32 8, i32 8, i32 8>
%193 = add i64 %184, 1
%194 = icmp eq i64 %193, %113
br i1 %194, label %195, label %181
195: ; preds = %181, %178
br i1 %117, label %207, label %196
196: ; preds = %133, %195
%197 = phi i64 [ 0, %133 ], [ %111, %195 ]
%198 = phi i32 [ %132, %133 ], [ %136, %195 ]
br label %199
199: ; preds = %196, %199
%200 = phi i64 [ %205, %199 ], [ %197, %196 ]
%201 = phi i32 [ %204, %199 ], [ %198, %196 ]
%202 = add nsw i64 %200, %134
%203 = getelementptr inbounds i32, i32* %92, i64 %202
store i32 %201, i32* %203
%204 = add nsw i32 %201, 1
%205 = add nuw nsw i64 %200, 1
%206 = icmp eq i64 %205, %105
br i1 %206, label %207, label %199
207: ; preds = %199, %195, %130
%208 = phi i32 [ %132, %130 ], [ %136, %195 ], [ %204, %199 ]
%209 = add nuw nsw i64 %131, 1
%210 = icmp eq i64 %209, %104
br i1 %210, label %260, label %130
211: ; preds = %120, %256
%212 = phi i64 [ 0, %120 ], [ %258, %256 ]
%213 = phi i32 [ 0, %120 ], [ %257, %256 ]
br i1 %121, label %214, label %256
214: ; preds = %211
br i1 %127, label %241, label %215
215: ; preds = %214, %215
%216 = phi i64 [ %238, %215 ], [ 0, %214 ]
%217 = phi i32 [ %237, %215 ], [ %213, %214 ]
%218 = phi i64 [ %239, %215 ], [ 0, %214 ]
%219 = mul nsw i64 %216, %122
%220 = add nuw nsw i64 %219, %212
%221 = getelementptr inbounds i32, i32* %92, i64 %220
store i32 %217, i32* %221
%222 = add nsw i32 %217, 1
%223 = or i64 %216, 1
%224 = mul nsw i64 %223, %122
%225 = add nuw nsw i64 %224, %212
%226 = getelementptr inbounds i32, i32* %92, i64 %225
store i32 %222, i32* %226
%227 = add nsw i32 %217, 2
%228 = or i64 %216, 2
%229 = mul nsw i64 %228, %122
%230 = add nuw nsw i64 %229, %212
%231 = getelementptr inbounds i32, i32* %92, i64 %230
store i32 %227, i32* %231
%232 = add nsw i32 %217, 3
%233 = or i64 %216, 3
%234 = mul nsw i64 %233, %122
%235 = add nuw nsw i64 %234, %212
%236 = getelementptr inbounds i32, i32* %92, i64 %235
store i32 %232, i32* %236
%237 = add nsw i32 %217, 4
%238 = add nuw nsw i64 %216, 4
%239 = add i64 %218, 4
%240 = icmp eq i64 %239, %128
br i1 %240, label %241, label %215
241: ; preds = %215, %214
%242 = phi i32 [ undef, %214 ], [ %237, %215 ]
%243 = phi i64 [ 0, %214 ], [ %238, %215 ]
%244 = phi i32 [ %213, %214 ], [ %237, %215 ]
br i1 %129, label %256, label %245
245: ; preds = %241, %245
%246 = phi i64 [ %253, %245 ], [ %243, %241 ]
%247 = phi i32 [ %252, %245 ], [ %244, %241 ]
%248 = phi i64 [ %254, %245 ], [ 0, %241 ]
%249 = mul nsw i64 %246, %122
%250 = add nuw nsw i64 %249, %212
%251 = getelementptr inbounds i32, i32* %92, i64 %250
store i32 %247, i32* %251
%252 = add nsw i32 %247, 1
%253 = add nuw nsw i64 %246, 1
%254 = add i64 %248, 1
%255 = icmp eq i64 %254, %126
br i1 %255, label %256, label %245
256: ; preds = %241, %245, %211
%257 = phi i32 [ %213, %211 ], [ %242, %241 ], [ %252, %245 ]
%258 = add nuw nsw i64 %212, 1
%259 = icmp eq i64 %258, %123
br i1 %259, label %260, label %211
260: ; preds = %207, %256, %99, %118
%261 = icmp eq i32 %88, 0
br i1 %261, label %287, label %262
262: ; preds = %260
%263 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.14, i64 0, i64 0))
%264 = icmp sgt i32 %85, 0
br i1 %264, label %265, label %287
265: ; preds = %262
%266 = icmp sgt i32 %86, 0
%267 = sext i32 %86 to i64
%268 = zext i32 %85 to i64
%269 = zext i32 %86 to i64
br label %270
270: ; preds = %265, %284
%271 = phi i64 [ 0, %265 ], [ %285, %284 ]
br i1 %266, label %272, label %284
272: ; preds = %270
%273 = mul nsw i64 %271, %267
%274 = trunc i64 %271 to i32
br label %275
275: ; preds = %272, %275
%276 = phi i64 [ 0, %272 ], [ %282, %275 ]
%277 = add nsw i64 %276, %273
%278 = getelementptr inbounds i32, i32* %92, i64 %277
%279 = load i32, i32* %278
%280 = trunc i64 %276 to i32
%281 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0), i32 %274, i32 %280, i32 %279)
%282 = add nuw nsw i64 %276, 1
%283 = icmp eq i64 %282, %269
br i1 %283, label %284, label %275
284: ; preds = %275, %270
%285 = add nuw nsw i64 %271, 1
%286 = icmp eq i64 %285, %268
br i1 %286, label %287, label %270
287: ; preds = %284, %262, %260
%288 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i64 0, i64 0))
%289 = tail call i32 @free(i32* %92)
ret i32 0
}