#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*/ *);
unsigned char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strcat(char *, char *);
int main(void) {
  FILE *font, *ppm;
  char name[100];
  unsigned char mat[16][16][16];
  unsigned char c;
  int i, j, k, mask;
  int y;
  printf("Font bitmap? ");
  fgets(name, 100, stdin);
  printf("Scanlines? (max. 16) ");
  scanf(" %d", &y);
  i = 0;
  while (name[i] != '\n' && name[i] != '\0') {
    i++;
  }
  name[i] = 0;
  printf("Opening %s font bitmap...\n", name);
  font = fopen(name, "rb");
  if (font == NULL) {
    printf("Could not open font bitmap!\n");
  } else {
    strcat(name, ".ppm");
    ppm = fopen(name, "w");
    if (ppm == NULL) {
      printf("Cannot output picture!\n");
    } else {
      i = j = 0;
      while (!feof(font) && i < 16) {
        for (k = 0; k < y; k++) {
          mat[i][j][k] = fgetc(font);
        }
        if ((++j) == 16) {
          j = 0;
          ++i;
        }
      }
      printf("All read! (%d)\n", y);
      fclose(font);
      fprintf(ppm, "P3\n132 %d\n1\n", 2 + y * 16);
      fprintf(ppm, "1 1 1 1 1 1\n");
      for (k = 0; k < 16; k++)
        fprintf(ppm, "1 1 1 1 1 1  1 1 1 1 1 1  1 1 1 1 1 1  1 1 1 1 1 1\n");
      fprintf(ppm, "1 1 1 1 1 1\n\n");
      for (i = 0; i < 16; i++) {
        fprintf(ppm, "# row %d\n\n", i);
        for (k = 0; k < y; k++) {
          fprintf(ppm, "1 1 1 1 1 1\n");
          for (j = 0; j < 16; j++) {
            for (mask = 6; mask >= 0; mask -= 2) {
              switch (mat[i][j][k] >> mask & 3) {
              case 0:
                fprintf(ppm, "0 0 0 0 0 0  ");
                break;
              case 1:
                fprintf(ppm, "0 1 0 0 1 0  ");
                break;
              case 2:
                fprintf(ppm, "1 0 0 1 0 0  ");
                break;
              case 3:
                fprintf(ppm, "1 1 0 1 1 0  ");
                break;
              default:
                printf("* ERROR(%d,%d,%d) *", i, j, k);
              }
            }
            fprintf(ppm, "\n");
          }
          fprintf(ppm, "1 1 1 1 1 1\n\n");
        }
        fprintf(ppm, "\n");
      }
      fprintf(ppm, "\n1 1 1 1 1 1\n");
      for (k = 0; k < 16; k++)
        fprintf(ppm, "1 1 1 1 1 1  1 1 1 1 1 1  1 1 1 1 1 1  1 1 1 1 1 1\n");
      fprintf(ppm, "1 1 1 1 1 1\n");
      fclose(ppm);
      printf("Success!\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10b0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x80(%rbp),%rdi
mov    0x2e2d(%rip),%rax
mov    (%rax),%edx
mov    $0x64,%esi
call   1060 <fgets@plt>
lea    0xe50(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe58(%rip),%rdi
lea    -0x1098(%rbp),%rsi
call   1090 <scanf@plt>
movl   $0x0,-0x1088(%rbp)
movslq -0x1088(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x1099(%rbp)
je     1227 <main+0x97>
movslq -0x1088(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x1099(%rbp)
mov    -0x1099(%rbp),%al
test   $0x1,%al
jne    123a <main+0xaa>
jmp    124e <main+0xbe>
mov    -0x1088(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1088(%rbp)
jmp    11f2 <main+0x62>
movslq -0x1088(%rbp),%rax
movb   $0x0,-0x80(%rbp,%rax,1)
lea    -0x80(%rbp),%rsi
lea    0xdd3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x80(%rbp),%rdi
lea    0xddc(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    129e <main+0x10e>
lea    0xdc4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    16dc <main+0x54c>
lea    -0x80(%rbp),%rdi
lea    0xdca(%rip),%rsi
call   10b0 <strcat@plt>
lea    -0x80(%rbp),%rdi
lea    0xdbf(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    12e0 <main+0x150>
lea    0xda6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    16d7 <main+0x547>
movl   $0x0,-0x108c(%rbp)
movl   $0x0,-0x1088(%rbp)
mov    -0x10(%rbp),%rdi
call   1080 <feof@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x109a(%rbp)
jne    1320 <main+0x190>
cmpl   $0x10,-0x1088(%rbp)
setl   %al
mov    %al,-0x109a(%rbp)
mov    -0x109a(%rbp),%al
test   $0x1,%al
jne    1333 <main+0x1a3>
jmp    13d1 <main+0x241>
movl   $0x0,-0x1090(%rbp)
mov    -0x1090(%rbp),%eax
cmp    -0x1098(%rbp),%eax
jge    139b <main+0x20b>
mov    -0x10(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %al,%dl
movslq -0x1088(%rbp),%rcx
lea    -0x1080(%rbp),%rax
shl    $0x8,%rcx
add    %rcx,%rax
movslq -0x108c(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x1090(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x1090(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1090(%rbp)
jmp    133d <main+0x1ad>
mov    -0x108c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108c(%rbp)
cmp    $0x10,%eax
jne    13cc <main+0x23c>
movl   $0x0,-0x108c(%rbp)
mov    -0x1088(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1088(%rbp)
jmp    12f4 <main+0x164>
mov    -0x1098(%rbp),%esi
lea    0xcb4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x18(%rbp),%rdi
mov    -0x1098(%rbp),%edx
shl    $0x4,%edx
add    $0x2,%edx
lea    0xc9d(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xd32(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x1090(%rbp)
cmpl   $0x10,-0x1090(%rbp)
jge    145b <main+0x2cb>
mov    -0x18(%rbp),%rdi
lea    0xc6f(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x1090(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1090(%rbp)
jmp    1428 <main+0x298>
mov    -0x18(%rbp),%rdi
lea    0xc7d(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x1088(%rbp)
cmpl   $0x10,-0x1088(%rbp)
jge    165f <main+0x4cf>
mov    -0x18(%rbp),%rdi
mov    -0x1088(%rbp),%edx
lea    0xc5c(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x1090(%rbp)
mov    -0x1090(%rbp),%eax
cmp    -0x1098(%rbp),%eax
jge    1639 <main+0x4a9>
mov    -0x18(%rbp),%rdi
lea    0xc86(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x108c(%rbp)
cmpl   $0x10,-0x108c(%rbp)
jge    1613 <main+0x483>
movl   $0x6,-0x1094(%rbp)
cmpl   $0x0,-0x1094(%rbp)
jl     15ed <main+0x45d>
movslq -0x1088(%rbp),%rax
shl    $0x8,%rax
lea    -0x1080(%rbp,%rax,1),%rcx
ff
movslq -0x108c(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rcx
movslq -0x1090(%rbp),%rax
movzbl (%rax,%rcx,1),%eax
mov    -0x1094(%rbp),%cl
shr    %cl,%eax
and    $0x3,%eax
mov    %eax,%ecx
mov    %rcx,-0x10a8(%rbp)
sub    $0x3,%eax
ja     15b4 <main+0x424>
mov    -0x10a8(%rbp),%rax
lea    0xab1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x18(%rbp),%rdi
lea    0xb99(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    15d4 <main+0x444>
mov    -0x18(%rbp),%rdi
lea    0xb90(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    15d4 <main+0x444>
mov    -0x18(%rbp),%rdi
lea    0xb87(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    15d4 <main+0x444>
mov    -0x18(%rbp),%rdi
lea    0xb7e(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    15d4 <main+0x444>
mov    -0x1088(%rbp),%esi
mov    -0x108c(%rbp),%edx
mov    -0x1090(%rbp),%ecx
lea    0xb67(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    15d9 <main+0x449>
mov    -0x1094(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x1094(%rbp)
jmp    14eb <main+0x35b>
mov    -0x18(%rbp),%rdi
lea    0xaf7(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x108c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108c(%rbp)
jmp    14d4 <main+0x344>
mov    -0x18(%rbp),%rdi
lea    0xac5(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x1090(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1090(%rbp)
jmp    14a6 <main+0x316>
mov    -0x18(%rbp),%rdi
lea    0xaab(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x1088(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1088(%rbp)
jmp    1477 <main+0x2e7>
mov    -0x18(%rbp),%rdi
lea    0xade(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x1090(%rbp)
cmpl   $0x10,-0x1090(%rbp)
jge    16ae <main+0x51e>
mov    -0x18(%rbp),%rdi
lea    0xa1c(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x1090(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1090(%rbp)
jmp    167b <main+0x4eb>
mov    -0x18(%rbp),%rdi
lea    0xa90(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xa86(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    16dc <main+0x54c>
xor    %eax,%eax
add    $0x10b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1098,%rsp
lea    0xe28(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2e00(%rip),%rax
mov    (%rax),%edx
lea    0x20(%rsp),%rdi
mov    $0x64,%esi
call   1080 <fgets@plt>
lea    0xe0e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe16(%rip),%rdi
lea    0xc(%rsp),%rsi
call   10b0 <scanf@plt>
nopl   0x0(%rax,%rax,1)
movzbl 0x20(%rsp,%rbx,1),%eax
test   %al,%al
je     1233 <main+0x73>
cmp    $0xa,%al
je     1233 <main+0x73>
add    $0x1,%rbx
jmp    1220 <main+0x60>
mov    %ebx,%eax
movb   $0x0,0x20(%rsp,%rax,1)
lea    0xde7(%rip),%rdi
lea    0x20(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdec(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <fopen@plt>
test   %rax,%rax
je     17d4 <main+0x614>
mov    %rax,%r14
lea    0xdd4(%rip),%rsi
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
call   10d0 <strcat@plt>
lea    0xdc5(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <fopen@plt>
test   %rax,%rax
je     17dd <main+0x61d>
mov    %rax,%rbx
mov    %r14,%rdi
call   10a0 <feof@plt>
test   %eax,%eax
jne    132a <main+0x16a>
xor    %r13d,%r13d
xor    %r12d,%r12d
cmpl   $0x0,0xc(%rsp)
jle    12fb <main+0x13b>
mov    %r12d,%eax
movslq %r13d,%rbp
shl    $0x4,%rbp
shl    $0x8,%rax
add    %rsp,%rax
add    $0x90,%rax
add    %rax,%rbp
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
call   1060 <fgetc@plt>
mov    %al,0x0(%rbp,%r15,1)
add    $0x1,%r15
movslq 0xc(%rsp),%rax
cmp    %rax,%r15
jl     12e0 <main+0x120>
add    $0x1,%r13d
xor    %ebp,%ebp
cmp    $0x10,%r13d
sete   %r15b
mov    $0x0,%eax
cmove  %eax,%r13d
mov    %r14,%rdi
call   10a0 <feof@plt>
test   %eax,%eax
jne    132a <main+0x16a>
mov    %r15b,%bpl
add    %ebp,%r12d
cmp    $0x10,%r12d
jb     12b0 <main+0xf0>
mov    0xc(%rsp),%esi
lea    0xd18(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
call   1040 <fclose@plt>
mov    0xc(%rsp),%edx
shl    $0x4,%edx
or     $0x2,%edx
lea    0xd08(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0xd8a(%rip),%rdi
mov    $0xc,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
lea    0xceb(%rip),%r15
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
lea    0xbc8(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
lea    0x90(%rsp),%rax
mov    %rax,0x10(%rsp)
lea    0x28fc(%rip),%r12
xor    %edx,%edx
jmp    1529 <main+0x369>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1070 <fputc@plt>
mov    0x18(%rsp),%rdx
add    $0x1,%rdx
addq   $0x100,0x10(%rsp)
cmp    $0x10,%rdx
je     163a <main+0x47a>
mov    %rbx,%rdi
lea    0xb79(%rip),%rsi
mov    %rdx,0x18(%rsp)
xor    %eax,%eax
call   1090 <fprintf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1500 <main+0x340>
mov    0x10(%rsp),%rbp
xor    %r14d,%r14d
xchg   %ax,%ax
mov    $0xc,%esi
mov    $0x1,%edx
lea    0xb8f(%rip),%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
xor    %r13d,%r13d
nopl   0x0(%rax)
movzbl 0x0(%rbp,%r13,1),%r15d
mov    %r15,%rax
shr    $0x6,%rax
mov    (%r12,%rax,8),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    %r15,%rax
shr    %rax
and    $0x18,%eax
mov    (%rax,%r12,1),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    %r15d,%eax
and    $0xc,%eax
mov    (%r12,%rax,2),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
and    $0x3,%r15d
mov    (%r12,%r15,8),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1070 <fputc@plt>
add    $0x10,%r13
cmp    $0x100,%r13
jne    1570 <main+0x3b0>
mov    $0xd,%esi
mov    $0x1,%edx
lea    0xa87(%rip),%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
add    $0x1,%r14
movslq 0xc(%rsp),%rax
add    $0x1,%rbp
cmp    %rax,%r14
jl     1550 <main+0x390>
jmp    1500 <main+0x340>
lea    0xaae(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
lea    0xa10(%rip),%r14
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x33,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
lea    0x93f(%rip),%rdi
mov    $0xc,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
lea    0x92b(%rip),%rdi
jmp    17e4 <main+0x624>
lea    0x942(%rip),%rdi
jmp    17e4 <main+0x624>
lea    0x922(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x1098,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Font bitmap? \00"
@stdin = global i32 0
@.str.1 = [22 x i8] c"Scanlines? (max. 16) \00"
@.str.2 = [4 x i8] c" %d\00"
@.str.3 = [27 x i8] c"Opening %s font bitmap...\0A\00"
@.str.4 = [3 x i8] c"rb\00"
@.str.5 = [29 x i8] c"Could not open font bitmap!\0A\00"
@.str.6 = [5 x i8] c".ppm\00"
@.str.7 = [2 x i8] c"w\00"
@.str.8 = [24 x i8] c"Cannot output picture!\0A\00"
@.str.9 = [16 x i8] c"All read! (%d)\0A\00"
@.str.10 = [13 x i8] c"P3\0A132 %d\0A1\0A\00"
@.str.11 = [13 x i8] c"1 1 1 1 1 1\0A\00"
@.str.12 = [52 x i8] c"1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\0A\00"
@.str.13 = [14 x i8] c"1 1 1 1 1 1\0A\0A\00"
@.str.14 = [11 x i8] c"# row %d\0A\0A\00"
@.str.15 = [14 x i8] c"0 0 0 0 0 0 \00"
@.str.16 = [14 x i8] c"0 1 0 0 1 0 \00"
@.str.17 = [14 x i8] c"1 0 0 1 0 0 \00"
@.str.18 = [14 x i8] c"1 1 0 1 1 0 \00"
@.str.19 = [20 x i8] c"* ERROR(%d,%d,%d) *\00"
@.str.20 = [2 x i8] c"\0A\00"
@.str.21 = [14 x i8] c"\0A1 1 1 1 1 1\0A\00"
@.str.22 = [10 x i8] c"Success!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca [100 x i8]
%5 = alloca [16 x [16 x [16 x i8]]]
%6 = alloca i8
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%14 = load i32, i32* @stdin
%15 = call i32 @fgets(i8* %13, i32 100, i32 %14)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %11)
store i32 0, i32* %7
br label %18
18: ; preds = %34, %0
%19 = load i32, i32* %7
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %20
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp ne i32 %23, 10
br i1 %24, label %25, label %32
25: ; preds = %18
%26 = load i32, i32* %7
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %27
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp ne i32 %30, 0
br label %32
32: ; preds = %25, %18
%33 = phi i1 [ false, %18 ], [ %31, %25 ]
br i1 %33, label %34, label %37
34: ; preds = %32
%35 = load i32, i32* %7
%36 = add nsw i32 %35, 1
store i32 %36, i32* %7
br label %18
37: ; preds = %32
%38 = load i32, i32* %7
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %39
store i8 0, i8* %40
%41 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8* %41)
%43 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%44 = call i32* @fopen(i8* %43, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32* %44, i32** %2
%45 = load i32*, i32** %2
%46 = icmp eq i32* %45, null
br i1 %46, label %47, label %49
47: ; preds = %37
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
br label %214
49: ; preds = %37
%50 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%51 = call i32 @strcat(i8* %50, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%52 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%53 = call i32* @fopen(i8* %52, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
store i32* %53, i32** %3
%54 = load i32*, i32** %3
%55 = icmp eq i32* %54, null
br i1 %55, label %56, label %58
56: ; preds = %49
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
br label %213
58: ; preds = %49
store i32 0, i32* %8
store i32 0, i32* %7
br label %59
59: ; preds = %95, %58
%60 = load i32*, i32** %2
%61 = call i32 @feof(i32* %60)
%62 = icmp ne i32 %61, 0
br i1 %62, label %66, label %63
63: ; preds = %59
%64 = load i32, i32* %7
%65 = icmp slt i32 %64, 16
br label %66
66: ; preds = %63, %59
%67 = phi i1 [ false, %59 ], [ %65, %63 ]
br i1 %67, label %68, label %96
68: ; preds = %66
store i32 0, i32* %9
br label %69
69: ; preds = %85, %68
%70 = load i32, i32* %9
%71 = load i32, i32* %11
%72 = icmp slt i32 %70, %71
br i1 %72, label %73, label %88
73: ; preds = %69
%74 = load i32*, i32** %2
%75 = call zeroext i8 @fgetc(i32* %74)
%76 = load i32, i32* %7
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [16 x [16 x [16 x i8]]], [16 x [16 x [16 x i8]]]* %5, i64 0, i64 %77
%79 = load i32, i32* %8
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [16 x [16 x i8]], [16 x [16 x i8]]* %78, i64 0, i64 %80
%82 = load i32, i32* %9
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [16 x i8], [16 x i8]* %81, i64 0, i64 %83
store i8 %75, i8* %84
br label %85
85: ; preds = %73
%86 = load i32, i32* %9
%87 = add nsw i32 %86, 1
store i32 %87, i32* %9
br label %69
88: ; preds = %69
%89 = load i32, i32* %8
%90 = add nsw i32 %89, 1
store i32 %90, i32* %8
%91 = icmp eq i32 %90, 16
br i1 %91, label %92, label %95
92: ; preds = %88
store i32 0, i32* %8
%93 = load i32, i32* %7
%94 = add nsw i32 %93, 1
store i32 %94, i32* %7
br label %95
95: ; preds = %92, %88
br label %59
96: ; preds = %66
%97 = load i32, i32* %11
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), i32 %97)
%99 = load i32*, i32** %2
%100 = call i32 @fclose(i32* %99)
%101 = load i32*, i32** %3
%102 = load i32, i32* %11
%103 = mul nsw i32 %102, 16
%104 = add nsw i32 2, %103
%105 = call i32 (i32*, i8*, ...) @fprintf(i32* %101, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), i32 %104)
%106 = load i32*, i32** %3
%107 = call i32 (i32*, i8*, ...) @fprintf(i32* %106, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
store i32 0, i32* %9
br label %108
108: ; preds = %114, %96
%109 = load i32, i32* %9
%110 = icmp slt i32 %109, 16
br i1 %110, label %111, label %117
111: ; preds = %108
%112 = load i32*, i32** %3
%113 = call i32 (i32*, i8*, ...) @fprintf(i32* %112, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0))
br label %114
114: ; preds = %111
%115 = load i32, i32* %9
%116 = add nsw i32 %115, 1
store i32 %116, i32* %9
br label %108
117: ; preds = %108
%118 = load i32*, i32** %3
%119 = call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0))
store i32 0, i32* %7
br label %120
120: ; preds = %192, %117
%121 = load i32, i32* %7
%122 = icmp slt i32 %121, 16
br i1 %122, label %123, label %195
123: ; preds = %120
%124 = load i32*, i32** %3
%125 = load i32, i32* %7
%126 = call i32 (i32*, i8*, ...) @fprintf(i32* %124, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.14, i64 0, i64 0), i32 %125)
store i32 0, i32* %9
br label %127
127: ; preds = %186, %123
%128 = load i32, i32* %9
%129 = load i32, i32* %11
%130 = icmp slt i32 %128, %129
br i1 %130, label %131, label %189
131: ; preds = %127
%132 = load i32*, i32** %3
%133 = call i32 (i32*, i8*, ...) @fprintf(i32* %132, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
store i32 0, i32* %8
br label %134
134: ; preds = %180, %131
%135 = load i32, i32* %8
%136 = icmp slt i32 %135, 16
br i1 %136, label %137, label %183
137: ; preds = %134
store i32 6, i32* %10
br label %138
138: ; preds = %174, %137
%139 = load i32, i32* %10
%140 = icmp sge i32 %139, 0
br i1 %140, label %141, label %177
141: ; preds = %138
%142 = load i32, i32* %7
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds [16 x [16 x [16 x i8]]], [16 x [16 x [16 x i8]]]* %5, i64 0, i64 %143
%145 = load i32, i32* %8
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds [16 x [16 x i8]], [16 x [16 x i8]]* %144, i64 0, i64 %146
%148 = load i32, i32* %9
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds [16 x i8], [16 x i8]* %147, i64 0, i64 %149
%151 = load i8, i8* %150
%152 = zext i8 %151 to i32
%153 = load i32, i32* %10
%154 = ashr i32 %152, %153
%155 = and i32 %154, 3
switch i32 %155, label %168 [
i32 0, label %156
i32 1, label %159
i32 2, label %162
i32 3, label %165
]
156: ; preds = %141
%157 = load i32*, i32** %3
%158 = call i32 (i32*, i8*, ...) @fprintf(i32* %157, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0))
br label %173
159: ; preds = %141
%160 = load i32*, i32** %3
%161 = call i32 (i32*, i8*, ...) @fprintf(i32* %160, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.16, i64 0, i64 0))
br label %173
162: ; preds = %141
%163 = load i32*, i32** %3
%164 = call i32 (i32*, i8*, ...) @fprintf(i32* %163, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i64 0, i64 0))
br label %173
165: ; preds = %141
%166 = load i32*, i32** %3
%167 = call i32 (i32*, i8*, ...) @fprintf(i32* %166, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.18, i64 0, i64 0))
br label %173
168: ; preds = %141
%169 = load i32, i32* %7
%170 = load i32, i32* %8
%171 = load i32, i32* %9
%172 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.19, i64 0, i64 0), i32 %169, i32 %170, i32 %171)
br label %173
173: ; preds = %168, %165, %162, %159, %156
br label %174
174: ; preds = %173
%175 = load i32, i32* %10
%176 = sub nsw i32 %175, 2
store i32 %176, i32* %10
br label %138
177: ; preds = %138
%178 = load i32*, i32** %3
%179 = call i32 (i32*, i8*, ...) @fprintf(i32* %178, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0))
br label %180
180: ; preds = %177
%181 = load i32, i32* %8
%182 = add nsw i32 %181, 1
store i32 %182, i32* %8
br label %134
183: ; preds = %134
%184 = load i32*, i32** %3
%185 = call i32 (i32*, i8*, ...) @fprintf(i32* %184, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0))
br label %186
186: ; preds = %183
%187 = load i32, i32* %9
%188 = add nsw i32 %187, 1
store i32 %188, i32* %9
br label %127
189: ; preds = %127
%190 = load i32*, i32** %3
%191 = call i32 (i32*, i8*, ...) @fprintf(i32* %190, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0))
br label %192
192: ; preds = %189
%193 = load i32, i32* %7
%194 = add nsw i32 %193, 1
store i32 %194, i32* %7
br label %120
195: ; preds = %120
%196 = load i32*, i32** %3
%197 = call i32 (i32*, i8*, ...) @fprintf(i32* %196, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.21, i64 0, i64 0))
store i32 0, i32* %9
br label %198
198: ; preds = %204, %195
%199 = load i32, i32* %9
%200 = icmp slt i32 %199, 16
br i1 %200, label %201, label %207
201: ; preds = %198
%202 = load i32*, i32** %3
%203 = call i32 (i32*, i8*, ...) @fprintf(i32* %202, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0))
br label %204
204: ; preds = %201
%205 = load i32, i32* %9
%206 = add nsw i32 %205, 1
store i32 %206, i32* %9
br label %198
207: ; preds = %198
%208 = load i32*, i32** %3
%209 = call i32 (i32*, i8*, ...) @fprintf(i32* %208, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0))
%210 = load i32*, i32** %3
%211 = call i32 @fclose(i32* %210)
%212 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.22, i64 0, i64 0))
br label %213
213: ; preds = %207, %56
br label %214
214: ; preds = %213, %47
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Font bitmap? \00"
@stdin = global i32 0
@.str.1 = [22 x i8] c"Scanlines? (max. 16) \00"
@.str.2 = [4 x i8] c" %d\00"
@.str.3 = [27 x i8] c"Opening %s font bitmap...\0A\00"
@.str.4 = [3 x i8] c"rb\00"
@.str.6 = [5 x i8] c".ppm\00"
@.str.7 = [2 x i8] c"w\00"
@.str.9 = [16 x i8] c"All read! (%d)\0A\00"
@.str.10 = [13 x i8] c"P3\0A132 %d\0A1\0A\00"
@.str.11 = [13 x i8] c"1 1 1 1 1 1\0A\00"
@.str.12 = [52 x i8] c"1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\0A\00"
@.str.13 = [14 x i8] c"1 1 1 1 1 1\0A\0A\00"
@.str.14 = [11 x i8] c"# row %d\0A\0A\00"
@.str.15 = [14 x i8] c"0 0 0 0 0 0 \00"
@.str.16 = [14 x i8] c"0 1 0 0 1 0 \00"
@.str.17 = [14 x i8] c"1 0 0 1 0 0 \00"
@.str.18 = [14 x i8] c"1 1 0 1 1 0 \00"
@.str.21 = [14 x i8] c"\0A1 1 1 1 1 1\0A\00"
@str = [9 x i8] c"Success!\00"
@str.23 = [23 x i8] c"Cannot output picture!\00"
@str.24 = [28 x i8] c"Could not open font bitmap!\00"
@switch.table.main.27 = [4 x i8*] [i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.18, i64 0, i64 0)]
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [16 x [16 x [16 x i8]]]
%3 = alloca i32
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [16 x [16 x [16 x i8]]], [16 x [16 x [16 x i8]]]* %2, i64 0, i64 0, i64 0, i64 0
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @stdin
%9 = call i32 @fgets(i8* %4, i32 100, i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %3)
br label %12
12: ; preds = %16, %0
%13 = phi i64 [ %17, %16 ], [ 0, %0 ]
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %13
%15 = load i8, i8* %14
switch i8 %15, label %16 [
i8 10, label %18
i8 0, label %18
]
16: ; preds = %12
%17 = add nuw i64 %13, 1
br label %12
18: ; preds = %12, %12
%19 = and i64 %13, 4294967295
%20 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %19
store i8 0, i8* %20
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8* %4)
%22 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%23 = icmp eq i32* %22, null
br i1 %23, label %152, label %24
24: ; preds = %18
%25 = call i32 @strcat(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%26 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%27 = icmp eq i32* %26, null
br i1 %27, label %152, label %28
28: ; preds = %24
%29 = call i32 @feof(i32* %22)
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %57
31: ; preds = %28, %47
%32 = phi i32 [ %52, %47 ], [ 0, %28 ]
%33 = phi i32 [ %51, %47 ], [ 0, %28 ]
%34 = load i32, i32* %3
%35 = icmp sgt i32 %34, 0
br i1 %35, label %36, label %47
36: ; preds = %31
%37 = zext i32 %33 to i64
%38 = sext i32 %32 to i64
br label %39
39: ; preds = %36, %39
%40 = phi i64 [ 0, %36 ], [ %43, %39 ]
%41 = call zeroext i8 @fgetc(i32* %22)
%42 = getelementptr inbounds [16 x [16 x [16 x i8]]], [16 x [16 x [16 x i8]]]* %2, i64 0, i64 %37, i64 %38, i64 %40
store i8 %41, i8* %42
%43 = add nuw nsw i64 %40, 1
%44 = load i32, i32* %3
%45 = sext i32 %44 to i64
%46 = icmp slt i64 %43, %45
br i1 %46, label %39, label %47
47: ; preds = %39, %31
%48 = add nsw i32 %32, 1
%49 = icmp eq i32 %48, 16
%50 = zext i1 %49 to i32
%51 = add nuw nsw i32 %33, %50
%52 = select i1 %49, i32 0, i32 %48
%53 = call i32 @feof(i32* %22)
%54 = icmp eq i32 %53, 0
%55 = icmp ult i32 %51, 16
%56 = select i1 %54, i1 %55, i1 false
br i1 %56, label %31, label %57
57: ; preds = %47, %28
%58 = load i32, i32* %3
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), i32 %58)
%60 = call i32 @fclose(i32* %22)
%61 = load i32, i32* %3
%62 = shl nsw i32 %61, 4
%63 = or i32 %62, 2
%64 = call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), i32 %63)
%65 = call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i64 12, i64 1, i32* %26)
%66 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%67 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%68 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%69 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%70 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%71 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%72 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%73 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%74 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%75 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%76 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%77 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%78 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%79 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%80 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%81 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%82 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0), i64 13, i64 1, i32* %26)
br label %83
83: ; preds = %57, %128
%84 = phi i64 [ 0, %57 ], [ %130, %128 ]
%85 = trunc i64 %84 to i32
%86 = call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.14, i64 0, i64 0), i32 %85)
%87 = load i32, i32* %3
%88 = icmp sgt i32 %87, 0
br i1 %88, label %89, label %128
89: ; preds = %83, %122
%90 = phi i64 [ %124, %122 ], [ 0, %83 ]
%91 = call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i64 12, i64 1, i32* %26)
br label %92
92: ; preds = %89, %92
%93 = phi i64 [ 0, %89 ], [ %120, %92 ]
%94 = getelementptr inbounds [16 x [16 x [16 x i8]]], [16 x [16 x [16 x i8]]]* %2, i64 0, i64 %84, i64 %93, i64 %90
%95 = load i8, i8* %94
%96 = zext i8 %95 to i32
%97 = lshr i32 %96, 6
%98 = zext i32 %97 to i64
%99 = getelementptr inbounds [4 x i8*], [4 x i8*]* @switch.table.main.27, i64 0, i64 %98
%100 = load i8*, i8** %99
%101 = call i64 @fwrite(i8* %100, i64 13, i64 1, i32* %26)
%102 = lshr i32 %96, 4
%103 = and i32 %102, 3
%104 = zext i32 %103 to i64
%105 = getelementptr inbounds [4 x i8*], [4 x i8*]* @switch.table.main.27, i64 0, i64 %104
%106 = load i8*, i8** %105
%107 = call i64 @fwrite(i8* %106, i64 13, i64 1, i32* %26)
%108 = lshr i32 %96, 2
%109 = and i32 %108, 3
%110 = zext i32 %109 to i64
%111 = getelementptr inbounds [4 x i8*], [4 x i8*]* @switch.table.main.27, i64 0, i64 %110
%112 = load i8*, i8** %111
%113 = call i64 @fwrite(i8* %112, i64 13, i64 1, i32* %26)
%114 = and i32 %96, 3
%115 = zext i32 %114 to i64
%116 = getelementptr inbounds [4 x i8*], [4 x i8*]* @switch.table.main.27, i64 0, i64 %115
%117 = load i8*, i8** %116
%118 = call i64 @fwrite(i8* %117, i64 13, i64 1, i32* %26)
%119 = call i32 @fputc(i32 10, i32* %26)
%120 = add nuw nsw i64 %93, 1
%121 = icmp eq i64 %120, 16
br i1 %121, label %122, label %92
122: ; preds = %92
%123 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0), i64 13, i64 1, i32* %26)
%124 = add nuw nsw i64 %90, 1
%125 = load i32, i32* %3
%126 = sext i32 %125 to i64
%127 = icmp slt i64 %124, %126
br i1 %127, label %89, label %128
128: ; preds = %122, %83
%129 = call i32 @fputc(i32 10, i32* %26)
%130 = add nuw nsw i64 %84, 1
%131 = icmp eq i64 %130, 16
br i1 %131, label %132, label %83
132: ; preds = %128
%133 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.21, i64 0, i64 0), i64 13, i64 1, i32* %26)
%134 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%135 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%136 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%137 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%138 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%139 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%140 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%141 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%142 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%143 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%144 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%145 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%146 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%147 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%148 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%149 = call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i64 51, i64 1, i32* %26)
%150 = call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i64 12, i64 1, i32* %26)
%151 = call i32 @fclose(i32* %26)
br label %152
152: ; preds = %24, %18, %132
%153 = phi i8* [ getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0), %132 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @str.24, i64 0, i64 0), %18 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @str.23, i64 0, i64 0), %24 ]
%154 = call i32 @puts(i8* dereferenceable(1) %153)
ret i32 0
}