#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, *pgm;
  char name[100];
  unsigned char mat[16][16][16];
  unsigned char c, mask;
  int i, j, k, z, top;
  int y;
  int narrow;
  int cols;
  printf("Font bitmap? ");
  fgets(name, 100, stdin);
  printf("Scanlines? (max. 16) ");
  scanf(" %d", &y);
  printf("4 or 8 pixel wide? ");
  scanf(" %d", &narrow);
  narrow = (narrow == 4) ? 1 : 0;
  cols = narrow ? 32 : 16;
  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, ".pgm");
    pgm = fopen(name, "w");
    if (pgm == NULL) {
      printf("Cannot output picture!\n");
    } else {
      top = j = 0;
      while (!feof(font) && top < 16) {
        for (k = 0; k < y; k++) {
          mat[top][j][k] = fgetc(font);
        }
        if ((++j) == 16) {
          j = 0;
          ++top;
        }
      }
      printf("All read! (%d)\n", y);
      fclose(font);
      fprintf(pgm, "P2\n%d %d\n2\n", 129 + cols, 17 + y * top);
      for (i = 0; i < top; i++) {
        printf("Row %d of %d columns...\n", i, cols);
        for (z = 0; z < cols; z++)
          if (narrow)
            fprintf(pgm, "\n1 1 1 1 1");
          else
            fprintf(pgm, "\n1 1 1 1 1 1 1 1 1");
        fprintf(pgm, " 1\n");
        for (k = 0; k < y; k++) {
          for (j = 0; j < 16; j++) {
            fprintf(pgm, "\n1");
            for (mask = 128; mask > 0; mask >>= 1) {
              if (mask == 8)
                fprintf(pgm, "  1  ");
              if (mask & mat[i][j][k])
                fprintf(pgm, " 0");
              else
                fprintf(pgm, " 2");
            }
          }
          fprintf(pgm, " 1\n");
        }
      }
      for (z = 0; z < cols; z++)
        if (narrow)
          fprintf(pgm, "\n1 1 1 1 1");
        else
          fprintf(pgm, "\n1 1 1 1 1 1 1 1 1");
      fprintf(pgm, " 1\n");
      fclose(pgm);
      printf("Success!\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10b0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe57(%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    0xe40(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe48(%rip),%rdi
lea    -0x109c(%rbp),%rsi
call   1090 <scanf@plt>
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe27(%rip),%rdi
lea    -0x10a0(%rbp),%rsi
call   1090 <scanf@plt>
mov    -0x10a0(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x4,%edx
cmove  %ecx,%eax
mov    %eax,-0x10a0(%rbp)
mov    -0x10a0(%rbp),%edx
mov    $0x10,%eax
mov    $0x20,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x10a4(%rbp)
movl   $0x0,-0x1088(%rbp)
movslq -0x1088(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x10a5(%rbp)
je     127d <main+0xed>
movslq -0x1088(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x10a5(%rbp)
mov    -0x10a5(%rbp),%al
test   $0x1,%al
jne    1290 <main+0x100>
jmp    12a4 <main+0x114>
mov    -0x1088(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1088(%rbp)
jmp    1248 <main+0xb8>
movslq -0x1088(%rbp),%rax
movb   $0x0,-0x80(%rbp,%rax,1)
lea    -0x80(%rbp),%rsi
lea    0xd81(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x80(%rbp),%rdi
lea    0xd8a(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    12f4 <main+0x164>
lea    0xd72(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1717 <main+0x587>
lea    -0x80(%rbp),%rdi
lea    0xd78(%rip),%rsi
call   10b0 <strcat@plt>
lea    -0x80(%rbp),%rdi
lea    0xd6d(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1336 <main+0x1a6>
lea    0xd54(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1712 <main+0x582>
movl   $0x0,-0x108c(%rbp)
movl   $0x0,-0x1098(%rbp)
mov    -0x10(%rbp),%rdi
call   1080 <feof@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x10a6(%rbp)
jne    1376 <main+0x1e6>
cmpl   $0x10,-0x1098(%rbp)
setl   %al
mov    %al,-0x10a6(%rbp)
mov    -0x10a6(%rbp),%al
test   $0x1,%al
jne    1389 <main+0x1f9>
jmp    1427 <main+0x297>
movl   $0x0,-0x1090(%rbp)
mov    -0x1090(%rbp),%eax
cmp    -0x109c(%rbp),%eax
jge    13f1 <main+0x261>
mov    -0x10(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %al,%dl
movslq -0x1098(%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    1393 <main+0x203>
mov    -0x108c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108c(%rbp)
cmp    $0x10,%eax
jne    1422 <main+0x292>
movl   $0x0,-0x108c(%rbp)
mov    -0x1098(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1098(%rbp)
jmp    134a <main+0x1ba>
mov    -0x109c(%rbp),%esi
lea    0xc62(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10a4(%rbp),%edx
add    $0x81,%edx
mov    -0x109c(%rbp),%ecx
imul   -0x1098(%rbp),%ecx
add    $0x11,%ecx
lea    0xc3b(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x1088(%rbp)
mov    -0x1088(%rbp),%eax
cmp    -0x1098(%rbp),%eax
jge    167e <main+0x4ee>
mov    -0x1088(%rbp),%esi
mov    -0x10a4(%rbp),%edx
lea    0xc11(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x1094(%rbp)
mov    -0x1094(%rbp),%eax
cmp    -0x10a4(%rbp),%eax
jge    1513 <main+0x383>
cmpl   $0x0,-0x10a0(%rbp)
je     14e8 <main+0x358>
mov    -0x18(%rbp),%rdi
lea    0xbef(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    14fa <main+0x36a>
mov    -0x18(%rbp),%rdi
lea    0xbe3(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    14ff <main+0x36f>
mov    -0x1094(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1094(%rbp)
jmp    14b2 <main+0x322>
mov    -0x18(%rbp),%rdi
lea    0xbcb(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x1090(%rbp)
mov    -0x1090(%rbp),%eax
cmp    -0x109c(%rbp),%eax
jge    1665 <main+0x4d5>
movl   $0x0,-0x108c(%rbp)
cmpl   $0x10,-0x108c(%rbp)
jge    163f <main+0x4af>
mov    -0x18(%rbp),%rdi
lea    0xb8a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movb   $0x80,-0x1082(%rbp)
movzbl -0x1082(%rbp),%eax
cmp    $0x0,%eax
jle    1626 <main+0x496>
movzbl -0x1082(%rbp),%eax
cmp    $0x8,%eax
jne    15a3 <main+0x413>
mov    -0x18(%rbp),%rdi
lea    0xb54(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movzbl -0x1082(%rbp),%eax
movslq -0x1088(%rbp),%rdx
lea    -0x1080(%rbp),%rcx
shl    $0x8,%rdx
add    %rdx,%rcx
movslq -0x108c(%rbp),%rdx
shl    $0x4,%rdx
add    %rdx,%rcx
movslq -0x1090(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     15fa <main+0x46a>
mov    -0x18(%rbp),%rdi
lea    0xb08(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    160c <main+0x47c>
mov    -0x18(%rbp),%rdi
lea    0xaf4(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    1611 <main+0x481>
movzbl -0x1082(%rbp),%eax
sar    $0x1,%eax
mov    %al,-0x1082(%rbp)
jmp    1571 <main+0x3e1>
jmp    162b <main+0x49b>
mov    -0x108c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108c(%rbp)
jmp    154b <main+0x3bb>
mov    -0x18(%rbp),%rdi
lea    0xa9f(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x1090(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1090(%rbp)
jmp    152f <main+0x39f>
jmp    166a <main+0x4da>
mov    -0x1088(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1088(%rbp)
jmp    147c <main+0x2ec>
movl   $0x0,-0x1094(%rbp)
mov    -0x1094(%rbp),%eax
cmp    -0x10a4(%rbp),%eax
jge    16e9 <main+0x559>
cmpl   $0x0,-0x10a0(%rbp)
je     16be <main+0x52e>
mov    -0x18(%rbp),%rdi
lea    0xa19(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    16d0 <main+0x540>
mov    -0x18(%rbp),%rdi
lea    0xa0d(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    16d5 <main+0x545>
mov    -0x1094(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1094(%rbp)
jmp    1688 <main+0x4f8>
mov    -0x18(%rbp),%rdi
lea    0x9f5(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
lea    0x9f1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1717 <main+0x587>
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    $0x10a8,%rsp
lea    0xe38(%rip),%rdi
xor    %ebp,%ebp
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2e10(%rip),%rax
mov    (%rax),%edx
lea    0x30(%rsp),%rdi
mov    $0x64,%esi
call   1070 <fgets@plt>
lea    0xe1e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe26(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   10a0 <scanf@plt>
lea    0xe16(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   10a0 <scanf@plt>
xor    %ecx,%ecx
cmpl   $0x4,0x10(%rsp)
sete   %cl
mov    %ecx,0x10(%rsp)
shl    $0x4,%ecx
add    $0x10,%ecx
nopw   0x0(%rax,%rax,1)
movzbl 0x30(%rsp,%rbp,1),%eax
test   %al,%al
je     1253 <main+0xa3>
cmp    $0xa,%al
je     1253 <main+0xa3>
add    $0x1,%rbp
jmp    1240 <main+0x90>
mov    %ecx,0x14(%rsp)
mov    %ebp,%eax
movb   $0x0,0x30(%rsp,%rax,1)
lea    0xdd7(%rip),%rdi
lea    0x30(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xddc(%rip),%rsi
mov    %rbx,%rdi
call   10b0 <fopen@plt>
test   %rax,%rax
je     15ca <main+0x41a>
mov    %rax,%r12
lea    0xdc4(%rip),%rsi
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
call   10c0 <strcat@plt>
lea    0xdb5(%rip),%rsi
mov    %rbx,%rdi
call   10b0 <fopen@plt>
test   %rax,%rax
je     15d3 <main+0x423>
mov    %rax,%rbx
mov    %r12,%rdi
call   1090 <feof@plt>
xor    %r14d,%r14d
test   %eax,%eax
jne    1356 <main+0x1a6>
xor    %r14d,%r14d
xor    %r13d,%r13d
nopw   0x0(%rax,%rax,1)
cmpl   $0x0,0xc(%rsp)
jle    132b <main+0x17b>
mov    %r14d,%eax
movslq %r13d,%rbp
shl    $0x4,%rbp
shl    $0x8,%rax
add    %rsp,%rax
add    $0xa0,%rax
add    %rax,%rbp
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r12,%rdi
call   1060 <fgetc@plt>
mov    %al,0x0(%rbp,%r15,1)
add    $0x1,%r15
movslq 0xc(%rsp),%rax
cmp    %rax,%r15
jl     1310 <main+0x160>
add    $0x1,%r13d
xor    %eax,%eax
cmp    $0x10,%r13d
sete   %al
mov    $0x0,%ecx
cmove  %ecx,%r13d
add    %eax,%r14d
mov    %r12,%rdi
call   1090 <feof@plt>
test   %eax,%eax
jne    1356 <main+0x1a6>
cmp    $0x10,%r14d
jb     12e0 <main+0x130>
mov    0xc(%rsp),%esi
lea    0xd00(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r12,%rdi
call   1040 <fclose@plt>
mov    0x14(%rsp),%ebp
mov    %ebp,%edx
or     $0x81,%edx
mov    0xc(%rsp),%ecx
imul   %r14d,%ecx
add    $0x11,%ecx
lea    0xce3(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <fprintf@plt>
test   %r14d,%r14d
je     155b <main+0x3ab>
mov    %r14d,%eax
mov    %rax,0x28(%rsp)
lea    0xcf1(%rip),%r14
lea    0xd0d(%rip),%r15
lea    0xd03(%rip),%r13
lea    0xcd1(%rip),%r12
xor    %esi,%esi
jmp    13f6 <main+0x246>
nopl   0x0(%rax)
mov    0x20(%rsp),%rsi
add    $0x1,%rsi
cmp    0x28(%rsp),%rsi
mov    0x14(%rsp),%ebp
lea    0xcb8(%rip),%r14
lea    0xca6(%rip),%r12
je     155b <main+0x3ab>
lea    0xc80(%rip),%rdi
mov    %rsi,0x20(%rsp)
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    142a <main+0x27a>
nopl   (%rax)
mov    $0x12,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10d0 <fwrite@plt>
add    $0xffffffff,%ebp
je     1440 <main+0x290>
cmpl   $0x0,0x10(%rsp)
je     1410 <main+0x260>
mov    $0xa,%esi
mov    $0x1,%edx
mov    %r12,%rdi
jmp    141d <main+0x26d>
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xc63(%rip),%rdi
mov    %rbx,%rcx
call   10d0 <fwrite@plt>
cmpl   $0x0,0xc(%rsp)
jle    13d0 <main+0x220>
xor    %eax,%eax
mov    %rax,0x18(%rsp)
jmp    14a8 <main+0x2f8>
nopl   (%rax)
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xc33(%rip),%rdi
mov    %rbx,%rcx
call   10d0 <fwrite@plt>
mov    0x18(%rsp),%rdx
add    $0x1,%rdx
movslq 0xc(%rsp),%rax
mov    %rdx,%rcx
mov    %rdx,0x18(%rsp)
cmp    %rax,%rdx
jge    13d0 <main+0x220>
xor    %ebp,%ebp
jmp    14ba <main+0x30a>
nopl   0x0(%rax)
add    $0x1,%rbp
cmp    $0x10,%rbp
je     1470 <main+0x2c0>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xbed(%rip),%rdi
mov    %rbx,%rcx
call   10d0 <fwrite@plt>
mov    %rbp,%r12
shl    $0x4,%r12
mov    0x20(%rsp),%rax
shl    $0x8,%rax
add    %rsp,%rax
add    $0xa0,%rax
add    %rax,%r12
add    0x18(%rsp),%r12
mov    $0x80,%r14d
jmp    1515 <main+0x365>
nopl   0x0(%rax)
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10d0 <fwrite@plt>
shr    %r14d
cmp    $0x8,%r14b
je     1530 <main+0x380>
test   %r14b,%r14b
jne    1549 <main+0x399>
jmp    14b0 <main+0x300>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x5,%esi
mov    $0x1,%edx
lea    0xb7a(%rip),%rdi
mov    %rbx,%rcx
call   10d0 <fwrite@plt>
movzbl (%r12),%eax
mov    %r15,%rdi
test   %eax,%r14d
je     1500 <main+0x350>
mov    %r13,%rdi
jmp    1500 <main+0x350>
lea    0xb3f(%rip),%r14
lea    0xb2d(%rip),%r15
jmp    158a <main+0x3da>
nopl   0x0(%rax,%rax,1)
mov    $0x12,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10d0 <fwrite@plt>
add    $0xffffffff,%ebp
je     15a0 <main+0x3f0>
cmpl   $0x0,0x10(%rsp)
je     1570 <main+0x3c0>
mov    $0xa,%esi
mov    $0x1,%edx
mov    %r15,%rdi
jmp    157d <main+0x3cd>
lea    0xb0d(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10d0 <fwrite@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
lea    0xaff(%rip),%rdi
jmp    15da <main+0x42a>
lea    0xb16(%rip),%rdi
jmp    15da <main+0x42a>
lea    0xaf6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10a8,%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 = [20 x i8] c"4 or 8 pixel wide? \00"
@.str.4 = [27 x i8] c"Opening %s font bitmap...\0A\00"
@.str.5 = [3 x i8] c"rb\00"
@.str.6 = [29 x i8] c"Could not open font bitmap!\0A\00"
@.str.7 = [5 x i8] c".pgm\00"
@.str.8 = [2 x i8] c"w\00"
@.str.9 = [24 x i8] c"Cannot output picture!\0A\00"
@.str.10 = [16 x i8] c"All read! (%d)\0A\00"
@.str.11 = [12 x i8] c"P2\0A%d %d\0A2\0A\00"
@.str.12 = [25 x i8] c"Row %d of %d columns...\0A\00"
@.str.13 = [11 x i8] c"\0A1 1 1 1 1\00"
@.str.14 = [19 x i8] c"\0A1 1 1 1 1 1 1 1 1\00"
@.str.15 = [4 x i8] c" 1\0A\00"
@.str.16 = [3 x i8] c"\0A1\00"
@.str.17 = [6 x i8] c" 1 \00"
@.str.18 = [3 x i8] c" 0\00"
@.str.19 = [3 x i8] c" 2\00"
@.str.20 = [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 i8
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %1
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%18 = load i32, i32* @stdin
%19 = call i32 @fgets(i8* %17, i32 100, i32 %18)
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%21 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %13)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%23 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %14)
%24 = load i32, i32* %14
%25 = icmp eq i32 %24, 4
%26 = zext i1 %25 to i64
%27 = select i1 %25, i32 1, i32 0
store i32 %27, i32* %14
%28 = load i32, i32* %14
%29 = icmp ne i32 %28, 0
%30 = zext i1 %29 to i64
%31 = select i1 %29, i32 32, i32 16
store i32 %31, i32* %15
store i32 0, i32* %8
br label %32
32: ; preds = %48, %0
%33 = load i32, i32* %8
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %34
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = icmp ne i32 %37, 10
br i1 %38, label %39, label %46
39: ; preds = %32
%40 = load i32, i32* %8
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %41
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
%45 = icmp ne i32 %44, 0
br label %46
46: ; preds = %39, %32
%47 = phi i1 [ false, %32 ], [ %45, %39 ]
br i1 %47, label %48, label %51
48: ; preds = %46
%49 = load i32, i32* %8
%50 = add nsw i32 %49, 1
store i32 %50, i32* %8
br label %32
51: ; preds = %46
%52 = load i32, i32* %8
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %53
store i8 0, i8* %54
%55 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* %55)
%57 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%58 = call i32* @fopen(i8* %57, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i32* %58, i32** %2
%59 = load i32*, i32** %2
%60 = icmp eq i32* %59, null
br i1 %60, label %61, label %63
61: ; preds = %51
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0))
br label %240
63: ; preds = %51
%64 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%65 = call i32 @strcat(i8* %64, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%66 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%67 = call i32* @fopen(i8* %66, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32* %67, i32** %3
%68 = load i32*, i32** %3
%69 = icmp eq i32* %68, null
br i1 %69, label %70, label %72
70: ; preds = %63
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
br label %239
72: ; preds = %63
store i32 0, i32* %9
store i32 0, i32* %12
br label %73
73: ; preds = %109, %72
%74 = load i32*, i32** %2
%75 = call i32 @feof(i32* %74)
%76 = icmp ne i32 %75, 0
br i1 %76, label %80, label %77
77: ; preds = %73
%78 = load i32, i32* %12
%79 = icmp slt i32 %78, 16
br label %80
80: ; preds = %77, %73
%81 = phi i1 [ false, %73 ], [ %79, %77 ]
br i1 %81, label %82, label %110
82: ; preds = %80
store i32 0, i32* %10
br label %83
83: ; preds = %99, %82
%84 = load i32, i32* %10
%85 = load i32, i32* %13
%86 = icmp slt i32 %84, %85
br i1 %86, label %87, label %102
87: ; preds = %83
%88 = load i32*, i32** %2
%89 = call zeroext i8 @fgetc(i32* %88)
%90 = load i32, i32* %12
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [16 x [16 x [16 x i8]]], [16 x [16 x [16 x i8]]]* %5, i64 0, i64 %91
%93 = load i32, i32* %9
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [16 x [16 x i8]], [16 x [16 x i8]]* %92, i64 0, i64 %94
%96 = load i32, i32* %10
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [16 x i8], [16 x i8]* %95, i64 0, i64 %97
store i8 %89, i8* %98
br label %99
99: ; preds = %87
%100 = load i32, i32* %10
%101 = add nsw i32 %100, 1
store i32 %101, i32* %10
br label %83
102: ; preds = %83
%103 = load i32, i32* %9
%104 = add nsw i32 %103, 1
store i32 %104, i32* %9
%105 = icmp eq i32 %104, 16
br i1 %105, label %106, label %109
106: ; preds = %102
store i32 0, i32* %9
%107 = load i32, i32* %12
%108 = add nsw i32 %107, 1
store i32 %108, i32* %12
br label %109
109: ; preds = %106, %102
br label %73
110: ; preds = %80
%111 = load i32, i32* %13
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i32 %111)
%113 = load i32*, i32** %2
%114 = call i32 @fclose(i32* %113)
%115 = load i32*, i32** %3
%116 = load i32, i32* %15
%117 = add nsw i32 129, %116
%118 = load i32, i32* %13
%119 = load i32, i32* %12
%120 = mul nsw i32 %118, %119
%121 = add nsw i32 17, %120
%122 = call i32 (i32*, i8*, ...) @fprintf(i32* %115, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), i32 %117, i32 %121)
store i32 0, i32* %8
br label %123
123: ; preds = %212, %110
%124 = load i32, i32* %8
%125 = load i32, i32* %12
%126 = icmp slt i32 %124, %125
br i1 %126, label %127, label %215
127: ; preds = %123
%128 = load i32, i32* %8
%129 = load i32, i32* %15
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0), i32 %128, i32 %129)
store i32 0, i32* %11
br label %131
131: ; preds = %145, %127
%132 = load i32, i32* %11
%133 = load i32, i32* %15
%134 = icmp slt i32 %132, %133
br i1 %134, label %135, label %148
135: ; preds = %131
%136 = load i32, i32* %14
%137 = icmp ne i32 %136, 0
br i1 %137, label %138, label %141
138: ; preds = %135
%139 = load i32*, i32** %3
%140 = call i32 (i32*, i8*, ...) @fprintf(i32* %139, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0))
br label %144
141: ; preds = %135
%142 = load i32*, i32** %3
%143 = call i32 (i32*, i8*, ...) @fprintf(i32* %142, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0))
br label %144
144: ; preds = %141, %138
br label %145
145: ; preds = %144
%146 = load i32, i32* %11
%147 = add nsw i32 %146, 1
store i32 %147, i32* %11
br label %131
148: ; preds = %131
%149 = load i32*, i32** %3
%150 = call i32 (i32*, i8*, ...) @fprintf(i32* %149, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0))
store i32 0, i32* %10
br label %151
151: ; preds = %208, %148
%152 = load i32, i32* %10
%153 = load i32, i32* %13
%154 = icmp slt i32 %152, %153
br i1 %154, label %155, label %211
155: ; preds = %151
store i32 0, i32* %9
br label %156
156: ; preds = %202, %155
%157 = load i32, i32* %9
%158 = icmp slt i32 %157, 16
br i1 %158, label %159, label %205
159: ; preds = %156
%160 = load i32*, i32** %3
%161 = call i32 (i32*, i8*, ...) @fprintf(i32* %160, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0))
store i8 -128, i8* %7
br label %162
162: ; preds = %196, %159
%163 = load i8, i8* %7
%164 = zext i8 %163 to i32
%165 = icmp sgt i32 %164, 0
br i1 %165, label %166, label %201
166: ; preds = %162
%167 = load i8, i8* %7
%168 = zext i8 %167 to i32
%169 = icmp eq i32 %168, 8
br i1 %169, label %170, label %173
170: ; preds = %166
%171 = load i32*, i32** %3
%172 = call i32 (i32*, i8*, ...) @fprintf(i32* %171, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0))
br label %173
173: ; preds = %170, %166
%174 = load i8, i8* %7
%175 = zext i8 %174 to i32
%176 = load i32, i32* %8
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds [16 x [16 x [16 x i8]]], [16 x [16 x [16 x i8]]]* %5, i64 0, i64 %177
%179 = load i32, i32* %9
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds [16 x [16 x i8]], [16 x [16 x i8]]* %178, i64 0, i64 %180
%182 = load i32, i32* %10
%183 = sext i32 %182 to i64
%184 = getelementptr inbounds [16 x i8], [16 x i8]* %181, i64 0, i64 %183
%185 = load i8, i8* %184
%186 = zext i8 %185 to i32
%187 = and i32 %175, %186
%188 = icmp ne i32 %187, 0
br i1 %188, label %189, label %192
189: ; preds = %173
%190 = load i32*, i32** %3
%191 = call i32 (i32*, i8*, ...) @fprintf(i32* %190, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0))
br label %195
192: ; preds = %173
%193 = load i32*, i32** %3
%194 = call i32 (i32*, i8*, ...) @fprintf(i32* %193, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0))
br label %195
195: ; preds = %192, %189
br label %196
196: ; preds = %195
%197 = load i8, i8* %7
%198 = zext i8 %197 to i32
%199 = ashr i32 %198, 1
%200 = trunc i32 %199 to i8
store i8 %200, i8* %7
br label %162
201: ; preds = %162
br label %202
202: ; preds = %201
%203 = load i32, i32* %9
%204 = add nsw i32 %203, 1
store i32 %204, i32* %9
br label %156
205: ; preds = %156
%206 = load i32*, i32** %3
%207 = call i32 (i32*, i8*, ...) @fprintf(i32* %206, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0))
br label %208
208: ; preds = %205
%209 = load i32, i32* %10
%210 = add nsw i32 %209, 1
store i32 %210, i32* %10
br label %151
211: ; preds = %151
br label %212
212: ; preds = %211
%213 = load i32, i32* %8
%214 = add nsw i32 %213, 1
store i32 %214, i32* %8
br label %123
215: ; preds = %123
store i32 0, i32* %11
br label %216
216: ; preds = %230, %215
%217 = load i32, i32* %11
%218 = load i32, i32* %15
%219 = icmp slt i32 %217, %218
br i1 %219, label %220, label %233
220: ; preds = %216
%221 = load i32, i32* %14
%222 = icmp ne i32 %221, 0
br i1 %222, label %223, label %226
223: ; preds = %220
%224 = load i32*, i32** %3
%225 = call i32 (i32*, i8*, ...) @fprintf(i32* %224, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0))
br label %229
226: ; preds = %220
%227 = load i32*, i32** %3
%228 = call i32 (i32*, i8*, ...) @fprintf(i32* %227, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0))
br label %229
229: ; preds = %226, %223
br label %230
230: ; preds = %229
%231 = load i32, i32* %11
%232 = add nsw i32 %231, 1
store i32 %232, i32* %11
br label %216
233: ; preds = %216
%234 = load i32*, i32** %3
%235 = call i32 (i32*, i8*, ...) @fprintf(i32* %234, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0))
%236 = load i32*, i32** %3
%237 = call i32 @fclose(i32* %236)
%238 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.20, i64 0, i64 0))
br label %239
239: ; preds = %233, %70
br label %240
240: ; preds = %239, %61
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 = [20 x i8] c"4 or 8 pixel wide? \00"
@.str.4 = [27 x i8] c"Opening %s font bitmap...\0A\00"
@.str.5 = [3 x i8] c"rb\00"
@.str.7 = [5 x i8] c".pgm\00"
@.str.8 = [2 x i8] c"w\00"
@.str.10 = [16 x i8] c"All read! (%d)\0A\00"
@.str.11 = [12 x i8] c"P2\0A%d %d\0A2\0A\00"
@.str.12 = [25 x i8] c"Row %d of %d columns...\0A\00"
@.str.13 = [11 x i8] c"\0A1 1 1 1 1\00"
@.str.14 = [19 x i8] c"\0A1 1 1 1 1 1 1 1 1\00"
@.str.15 = [4 x i8] c" 1\0A\00"
@.str.16 = [3 x i8] c"\0A1\00"
@.str.17 = [6 x i8] c" 1 \00"
@.str.18 = [3 x i8] c" 0\00"
@.str.19 = [3 x i8] c" 2\00"
@str = [9 x i8] c"Success!\00"
@str.21 = [23 x i8] c"Cannot output picture!\00"
@str.22 = [28 x i8] c"Could not open font bitmap!\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [16 x [16 x [16 x i8]]]
%3 = alloca i32
%4 = alloca i32
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%6 = 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
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @stdin
%11 = call i32 @fgets(i8* %5, i32 100, i32 %10)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%16 = load i32, i32* %4
%17 = icmp eq i32 %16, 4
%18 = zext i1 %17 to i32
store i32 %18, i32* %4
%19 = select i1 %17, i32 32, i32 16
br label %20
20: ; preds = %24, %0
%21 = phi i64 [ %25, %24 ], [ 0, %0 ]
%22 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %21
%23 = load i8, i8* %22
switch i8 %23, label %24 [
i8 10, label %26
i8 0, label %26
]
24: ; preds = %20
%25 = add nuw i64 %21, 1
br label %20
26: ; preds = %20, %20
%27 = and i64 %21, 4294967295
%28 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %27
store i8 0, i8* %28
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* %5)
%30 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%31 = icmp eq i32* %30, null
br i1 %31, label %143, label %32
32: ; preds = %26
%33 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%34 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%35 = icmp eq i32* %34, null
br i1 %35, label %143, label %36
36: ; preds = %32
%37 = call i32 @feof(i32* %30)
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %65
39: ; preds = %36, %55
%40 = phi i32 [ %60, %55 ], [ 0, %36 ]
%41 = phi i32 [ %58, %55 ], [ 0, %36 ]
%42 = load i32, i32* %3
%43 = icmp sgt i32 %42, 0
br i1 %43, label %44, label %55
44: ; preds = %39
%45 = zext i32 %40 to i64
%46 = sext i32 %41 to i64
br label %47
47: ; preds = %44, %47
%48 = phi i64 [ 0, %44 ], [ %51, %47 ]
%49 = call zeroext i8 @fgetc(i32* %30)
%50 = getelementptr inbounds [16 x [16 x [16 x i8]]], [16 x [16 x [16 x i8]]]* %2, i64 0, i64 %45, i64 %46, i64 %48
store i8 %49, i8* %50
%51 = add nuw nsw i64 %48, 1
%52 = load i32, i32* %3
%53 = sext i32 %52 to i64
%54 = icmp slt i64 %51, %53
br i1 %54, label %47, label %55
55: ; preds = %47, %39
%56 = add nsw i32 %41, 1
%57 = icmp eq i32 %56, 16
%58 = select i1 %57, i32 0, i32 %56
%59 = zext i1 %57 to i32
%60 = add nuw nsw i32 %40, %59
%61 = call i32 @feof(i32* %30)
%62 = icmp eq i32 %61, 0
%63 = icmp ult i32 %60, 16
%64 = select i1 %62, i1 %63, i1 false
br i1 %64, label %39, label %65
65: ; preds = %55, %36
%66 = phi i32 [ 0, %36 ], [ %60, %55 ]
%67 = load i32, i32* %3
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i32 %67)
%69 = call i32 @fclose(i32* %30)
%70 = or i32 %19, 129
%71 = load i32, i32* %3
%72 = mul nsw i32 %71, %66
%73 = add nsw i32 %72, 17
%74 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), i32 %70, i32 %73)
%75 = icmp eq i32 %66, 0
br i1 %75, label %128, label %76
76: ; preds = %65
%77 = zext i32 %66 to i64
br label %78
78: ; preds = %76, %125
%79 = phi i64 [ 0, %76 ], [ %126, %125 ]
%80 = trunc i64 %79 to i32
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0), i32 %80, i32 %19)
br label %82
82: ; preds = %78, %90
%83 = phi i32 [ 0, %78 ], [ %91, %90 ]
%84 = load i32, i32* %4
%85 = icmp eq i32 %84, 0
br i1 %85, label %88, label %86
86: ; preds = %82
%87 = call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), i64 10, i64 1, i32* %34)
br label %90
88: ; preds = %82
%89 = call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i64 18, i64 1, i32* %34)
br label %90
90: ; preds = %86, %88
%91 = add nuw nsw i32 %83, 1
%92 = icmp eq i32 %91, %19
br i1 %92, label %93, label %82
93: ; preds = %90
%94 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i64 3, i64 1, i32* %34)
%95 = load i32, i32* %3
%96 = icmp sgt i32 %95, 0
br i1 %96, label %97, label %125
97: ; preds = %93, %119
%98 = phi i64 [ %121, %119 ], [ 0, %93 ]
br label %99
99: ; preds = %97, %116
%100 = phi i64 [ 0, %97 ], [ %117, %116 ]
%101 = call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i64 2, i64 1, i32* %34)
%102 = getelementptr inbounds [16 x [16 x [16 x i8]]], [16 x [16 x [16 x i8]]]* %2, i64 0, i64 %79, i64 %100, i64 %98
br label %103
103: ; preds = %108, %99
%104 = phi i32 [ 128, %99 ], [ %115, %108 ]
%105 = trunc i32 %104 to i8
switch i8 %105, label %108 [
i8 0, label %116
i8 8, label %106
]
106: ; preds = %103
%107 = call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0), i64 5, i64 1, i32* %34)
br label %108
108: ; preds = %103, %106
%109 = load i8, i8* %102
%110 = zext i8 %109 to i32
%111 = and i32 %104, %110
%112 = icmp eq i32 %111, 0
%113 = select i1 %112, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0)
%114 = call i64 @fwrite(i8* %113, i64 2, i64 1, i32* %34)
%115 = lshr i32 %104, 1
br label %103
116: ; preds = %103
%117 = add nuw nsw i64 %100, 1
%118 = icmp eq i64 %117, 16
br i1 %118, label %119, label %99
119: ; preds = %116
%120 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i64 3, i64 1, i32* %34)
%121 = add nuw nsw i64 %98, 1
%122 = load i32, i32* %3
%123 = sext i32 %122 to i64
%124 = icmp slt i64 %121, %123
br i1 %124, label %97, label %125
125: ; preds = %119, %93
%126 = add nuw nsw i64 %79, 1
%127 = icmp eq i64 %126, %77
br i1 %127, label %128, label %78
128: ; preds = %125, %65
br label %129
129: ; preds = %128, %137
%130 = phi i32 [ %138, %137 ], [ 0, %128 ]
%131 = load i32, i32* %4
%132 = icmp eq i32 %131, 0
br i1 %132, label %135, label %133
133: ; preds = %129
%134 = call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), i64 10, i64 1, i32* %34)
br label %137
135: ; preds = %129
%136 = call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i64 18, i64 1, i32* %34)
br label %137
137: ; preds = %133, %135
%138 = add nuw nsw i32 %130, 1
%139 = icmp eq i32 %138, %19
br i1 %139, label %140, label %129
140: ; preds = %137
%141 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i64 3, i64 1, i32* %34)
%142 = call i32 @fclose(i32* %34)
br label %143
143: ; preds = %32, %26, %140
%144 = phi i8* [ getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0), %140 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @str.22, i64 0, i64 0), %26 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @str.21, i64 0, i64 0), %32 ]
%145 = call i32 @puts(i8* dereferenceable(1) %144)
ret i32 0
}