#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*/ printf(char *, ...);
void print_snapshot(int p, int r, int allocation[p][r], int request[p][r],
                    int Avail[r], int proc[p][r], int Max[r]) {
  int i, j, k;
  printf("Current snapshot: \n\n");
  for (k = 0; k < 5; k++) {
    if (k == 0) {
      printf("\tCurrent Allocation");
    }
    if (k == 1) {
      printf("\t\tCurrent Request");
    }
    if (k == 2) {
      printf("\t\t    Currently Available Resource");
    }
    if (k == 3) {
      printf("\t\tMaximum Possible Request");
    }
    if (k == 4) {
      printf("\t\tMaximum Available Resources");
    }
  }
  printf("\n");
  for (k = 0; k < 5; k++) {
    printf("\t_____________________________");
  }
  printf("\n");
  for (k = 0; k < 5; k++) {
    for (j = 0; j < r; j++) {
      printf("\tR%d ", j + 1);
    }
    printf("\t");
  }
  printf("\n");
  printf("P%d ", 1);
  for (k = 0; k < 5; k++) {
    if (k == 0) {
      for (j = 0; j < r; j++) {
        printf("\t%d ", allocation[0][j]);
      }
    }
    if (k == 1) {
      for (j = 0; j < r; j++) {
        printf("\t%d ", request[0][j]);
      }
    }
    if (k == 2) {
      for (j = 0; j < r; j++) {
        printf("\t%d ", Avail[j]);
      }
    }
    if (k == 3) {
      for (j = 0; j < r; j++) {
        printf("\t%d ", proc[0][j]);
      }
    }
    if (k == 4) {
      for (j = 0; j < r; j++) {
        printf("\t%d ", Max[j]);
      }
    }
    printf("\t");
  }
  printf("\n");
  for (i = 1; i < p; i++) {
    printf("P%d ", i + 1);
    for (k = 0; k < 5; k++) {
      if (k == 0) {
        for (j = 0; j < r; j++) {
          printf("\t%d ", allocation[i][j]);
        }
      }
      if (k == 1) {
        for (j = 0; j < r; j++) {
          printf("\t%d ", request[i][j]);
        }
      }
      if (k == 2) {
        for (j = 0; j < r; j++) {
          printf("\t  ");
        }
      }
      if (k == 3) {
        for (j = 0; j < r; j++) {
          printf("\t%d ", proc[i][j]);
        }
      }
      printf("\t");
    }
    printf("\n");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_snapshot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x50(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x48(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x40(%rbp)
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x5,-0x34(%rbp)
jge    11f1 <print_snapshot+0xe1>
cmpl   $0x0,-0x34(%rbp)
jne    117e <print_snapshot+0x6e>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x1,-0x34(%rbp)
jne    1196 <print_snapshot+0x86>
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x2,-0x34(%rbp)
jne    11ae <print_snapshot+0x9e>
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x3,-0x34(%rbp)
jne    11c6 <print_snapshot+0xb6>
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x4,-0x34(%rbp)
jne    11de <print_snapshot+0xce>
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11e3 <print_snapshot+0xd3>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    115c <print_snapshot+0x4c>
lea    0xe1b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x5,-0x34(%rbp)
jge    122c <print_snapshot+0x11c>
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1206 <print_snapshot+0xf6>
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x5,-0x34(%rbp)
jge    129c <print_snapshot+0x18c>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1280 <print_snapshot+0x170>
mov    -0x30(%rbp),%esi
add    $0x1,%esi
lea    0xe4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1252 <print_snapshot+0x142>
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1241 <print_snapshot+0x131>
lea    0xd70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe0d(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x5,-0x34(%rbp)
jge    1484 <print_snapshot+0x374>
cmpl   $0x0,-0x34(%rbp)
jne    1326 <print_snapshot+0x216>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1321 <print_snapshot+0x211>
mov    -0x50(%rbp),%rcx
mov    -0x10(%rbp),%rax
imul   $0x0,%rcx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xdb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    12df <print_snapshot+0x1cf>
jmp    1326 <print_snapshot+0x216>
cmpl   $0x1,-0x34(%rbp)
jne    137e <print_snapshot+0x26e>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1379 <print_snapshot+0x269>
mov    -0x48(%rbp),%rcx
mov    -0x18(%rbp),%rax
imul   $0x0,%rcx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1337 <print_snapshot+0x227>
jmp    137e <print_snapshot+0x26e>
cmpl   $0x2,-0x34(%rbp)
jne    13c7 <print_snapshot+0x2b7>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    13c2 <print_snapshot+0x2b2>
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    138f <print_snapshot+0x27f>
jmp    13c7 <print_snapshot+0x2b7>
cmpl   $0x3,-0x34(%rbp)
jne    141f <print_snapshot+0x30f>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    141a <print_snapshot+0x30a>
mov    -0x40(%rbp),%rcx
mov    -0x28(%rbp),%rax
imul   $0x0,%rcx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xcbe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    13d8 <print_snapshot+0x2c8>
jmp    141f <print_snapshot+0x30f>
cmpl   $0x4,-0x34(%rbp)
jne    1468 <print_snapshot+0x358>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1463 <print_snapshot+0x353>
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xc75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1430 <print_snapshot+0x320>
jmp    1468 <print_snapshot+0x358>
lea    0xc4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12c4 <print_snapshot+0x1b4>
lea    0xb88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1654 <print_snapshot+0x544>
mov    -0x2c(%rbp),%esi
add    $0x1,%esi
lea    0xc0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x5,-0x34(%rbp)
jge    1638 <print_snapshot+0x528>
cmpl   $0x0,-0x34(%rbp)
jne    1526 <print_snapshot+0x416>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1521 <print_snapshot+0x411>
mov    -0x50(%rbp),%rdx
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xbb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    14db <print_snapshot+0x3cb>
jmp    1526 <print_snapshot+0x416>
cmpl   $0x1,-0x34(%rbp)
jne    1582 <print_snapshot+0x472>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    157d <print_snapshot+0x46d>
mov    -0x48(%rbp),%rdx
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xb5b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1537 <print_snapshot+0x427>
jmp    1582 <print_snapshot+0x472>
cmpl   $0x2,-0x34(%rbp)
jne    15c0 <print_snapshot+0x4b0>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    15bb <print_snapshot+0x4ab>
lea    0xb22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1593 <print_snapshot+0x483>
jmp    15c0 <print_snapshot+0x4b0>
cmpl   $0x3,-0x34(%rbp)
jne    161c <print_snapshot+0x50c>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1617 <print_snapshot+0x507>
mov    -0x40(%rbp),%rdx
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xac1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    15d1 <print_snapshot+0x4c1>
jmp    161c <print_snapshot+0x50c>
lea    0xa99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    14c0 <print_snapshot+0x3b0>
lea    0x9d4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1499 <print_snapshot+0x389>
lea    0x9b8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_snapshot>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9,0x28(%rsp)
mov    %r8,0x38(%rsp)
mov    %rcx,0x20(%rsp)
mov    %rdx,0x18(%rsp)
mov    %esi,%r14d
mov    %edi,0x30(%rsp)
mov    0x80(%rsp),%rax
mov    %rax,0x10(%rsp)
lea    0xf6c(%rip),%rdi
call   1040 <puts@plt>
lea    0xeab(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeca(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xed7(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xedd(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %r14d,%r14d
jle    1350 <print_snapshot+0x220>
mov    %r14d,%ebp
neg    %ebp
mov    $0x1,%r15d
lea    0xea5(%rip),%rbx
mov    %rbx,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    (%r15,%rbp,1),%eax
add    $0x1,%eax
mov    %r15d,%ecx
add    $0x1,%ecx
mov    %ecx,%r15d
cmp    $0x1,%eax
jne    1220 <print_snapshot+0xf0>
mov    $0x9,%edi
call   1030 <putchar@plt>
test   %r14d,%r14d
jle    135a <print_snapshot+0x22a>
mov    $0x1,%ebx
lea    0xe64(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    1270 <print_snapshot+0x140>
mov    $0x9,%edi
call   1030 <putchar@plt>
test   %r14d,%r14d
jle    1364 <print_snapshot+0x234>
mov    $0x1,%ebx
lea    0xe18(%rip),%r15
nopl   (%rax)
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    12b0 <print_snapshot+0x180>
mov    $0x9,%edi
call   1030 <putchar@plt>
test   %r14d,%r14d
jle    136e <print_snapshot+0x23e>
mov    $0x1,%ebx
lea    0xdd8(%rip),%r15
nopl   (%rax)
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    12f0 <print_snapshot+0x1c0>
mov    $0x9,%edi
call   1030 <putchar@plt>
test   %r14d,%r14d
jle    1378 <print_snapshot+0x248>
mov    $0x1,%ebx
lea    0xd9c(%rip),%r15
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    1330 <print_snapshot+0x200>
jmp    1378 <print_snapshot+0x248>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd38(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14d,0xc(%rsp)
mov    %r14d,%r14d
lea    0xd22(%rip),%r12
xor    %r13d,%r13d
mov    0x10(%rsp),%rbx
jmp    13d8 <print_snapshot+0x2a8>
nopl   0x0(%rax,%rax,1)
mov    $0x9,%edi
call   1030 <putchar@plt>
add    $0x1,%r13d
cmp    $0x5,%r13d
je     1526 <print_snapshot+0x3f6>
cmp    $0x4,%r13d
ja     13c0 <print_snapshot+0x290>
mov    %r13d,%eax
lea    0xc18(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmpl   $0x0,0xc(%rsp)
jle    13c0 <print_snapshot+0x290>
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    0x18(%rsp),%rax
mov    (%rax,%rbp,4),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1400 <print_snapshot+0x2d0>
jmp    13c0 <print_snapshot+0x290>
cmpl   $0x0,0xc(%rsp)
jle    13c0 <print_snapshot+0x290>
xor    %ebp,%ebp
mov    0x20(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx,%rbp,4),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1430 <print_snapshot+0x300>
cmp    $0x4,%r13d
mov    0x10(%rsp),%rbx
je     14f5 <print_snapshot+0x3c5>
cmp    $0x3,%r13d
je     14b0 <print_snapshot+0x380>
cmp    $0x2,%r13d
jne    13c0 <print_snapshot+0x290>
cmpl   $0x0,0xc(%rsp)
jle    13c0 <print_snapshot+0x290>
xor    %ebp,%ebp
mov    0x38(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
mov    (%rbx,%rbp,4),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1480 <print_snapshot+0x350>
cmp    $0x4,%r13d
mov    0x10(%rsp),%rbx
je     14f5 <print_snapshot+0x3c5>
cmp    $0x3,%r13d
jne    13c0 <print_snapshot+0x290>
nopl   0x0(%rax,%rax,1)
cmpl   $0x0,0xc(%rsp)
jle    13c0 <print_snapshot+0x290>
xor    %ebp,%ebp
mov    0x28(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%rbx,%rbp,4),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    14d0 <print_snapshot+0x3a0>
cmp    $0x4,%r13d
mov    0x10(%rsp),%rbx
jne    13c0 <print_snapshot+0x290>
cmpl   $0x0,0xc(%rsp)
jle    151c <print_snapshot+0x3ec>
xor    %r15d,%r15d
nop
mov    (%rbx,%r15,4),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%r15
cmp    %r15,%r14
jne    1500 <print_snapshot+0x3d0>
jmp    13c0 <print_snapshot+0x290>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x30(%rsp),%ecx
cmp    $0x2,%ecx
jl     172c <print_snapshot+0x5fc>
mov    0xc(%rsp),%eax
cmp    $0x2,%eax
mov    $0x1,%ebp
cmovge %eax,%ebp
mov    %ecx,%eax
mov    %rax,0x38(%rsp)
mov    0x20(%rsp),%rax
lea    (%rax,%r14,4),%rcx
lea    0x0(,%r14,4),%rax
mov    %rax,0x30(%rsp)
mov    0x28(%rsp),%rax
lea    (%rax,%r14,4),%r12
mov    0x18(%rsp),%rax
lea    (%rax,%r14,4),%rax
mov    %rax,0x18(%rsp)
mov    $0x1,%esi
lea    0xb44(%rip),%r13
mov    %r14,0x40(%rsp)
jmp    15cf <print_snapshot+0x49f>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x10(%rsp),%rcx
mov    0x30(%rsp),%rax
add    %rax,%rcx
add    %rax,%r12
add    %rax,0x18(%rsp)
mov    0x20(%rsp),%rsi
cmp    0x38(%rsp),%rsi
je     172c <print_snapshot+0x5fc>
mov    %rcx,0x10(%rsp)
add    $0x1,%rsi
lea    0xaec(%rip),%rdi
mov    %rsi,0x20(%rsp)
xor    %eax,%eax
call   1050 <printf@plt>
xor    %r15d,%r15d
mov    %r12,0x28(%rsp)
jmp    1614 <print_snapshot+0x4e4>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x9,%edi
call   1030 <putchar@plt>
add    $0x1,%r15d
cmp    $0x5,%r15d
je     15a0 <print_snapshot+0x470>
cmp    $0x3,%r15d
ja     1600 <print_snapshot+0x4d0>
mov    %r15d,%eax
lea    0x9f0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmpl   $0x0,0xc(%rsp)
jle    1600 <print_snapshot+0x4d0>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    0x18(%rsp),%rax
mov    (%rax,%rbx,4),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1640 <print_snapshot+0x510>
jmp    1600 <print_snapshot+0x4d0>
nopl   (%rax)
cmpl   $0x0,0xc(%rsp)
jle    1600 <print_snapshot+0x4d0>
xor    %ebx,%ebx
mov    %r14,%r12
mov    0x10(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1680 <print_snapshot+0x550>
cmp    $0x3,%r15d
mov    %r12,%r14
mov    0x28(%rsp),%r12
je     1700 <print_snapshot+0x5d0>
cmp    $0x2,%r15d
jne    1600 <print_snapshot+0x4d0>
nop
cmpl   $0x0,0xc(%rsp)
jle    1600 <print_snapshot+0x4d0>
mov    0xc(%rsp),%ebx
lea    0xa0f(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0xffffffff,%ebx
jne    16d0 <print_snapshot+0x5a0>
cmpl   $0x0,0xc(%rsp)
mov    0x40(%rsp),%r14
jle    1600 <print_snapshot+0x4d0>
cmp    $0x3,%r15d
je     170b <print_snapshot+0x5db>
jmp    1600 <print_snapshot+0x4d0>
nopw   0x0(%rax,%rax,1)
cmpl   $0x0,0xc(%rsp)
jle    1600 <print_snapshot+0x4d0>
xor    %ebx,%ebx
nopl   (%rax)
mov    (%r12,%rbx,4),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1710 <print_snapshot+0x5e0>
jmp    1600 <print_snapshot+0x4d0>
mov    $0xa,%edi
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

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

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