#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 EOF;
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fputc(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ print_usage(char *);
int /*<<< orphan*/ *stdin;
int /*<<< orphan*/ *stdout;
scalar_t__ strcmp(char *, char *);
char toupper(int);
int main(int argc, char **argv) {
  int ch;
  int i;
  int strip = 0;
  FILE *in = stdin;
  FILE *out = stdout;
  if (argc < 2) {
    print_usage(argv[0]);
    return (0);
  }
  for (i = 1; i < argc; i++) {
    if (argv[i][0] == '-') {
      if (strcmp(argv[i], "-strip") == 0)
        strip = 1;
      else {
        print_usage(argv[0]);
        return 0;
      }
    } else if (in == stdin) {
      if ((in = fopen(argv[i], "rb")) == NULL) {
        perror(argv[i]);
        return (1);
      }
    } else if (out == stdout) {
      if ((out = fopen(argv[i], "wb")) == NULL) {
        perror(argv[i]);
        return (1);
      }
    }
  }
  while ((ch = fgetc(in)) != EOF) {
    if (ch == '\1') {
      ch = fgetc(in);
      if (ch == EOF || toupper(ch) == 'Z')
        break;
      if (ch > 0x7f) {
        int cnt = ch - 0x7f;
        fprintf(out, "\x1b[");
        if (cnt > 1)
          fprintf(out, "%u", cnt);
        fputc('C', out);
        continue;
      }
      switch (toupper(ch)) {
      case 'A':
        fputc('\1', out);
        break;
      case '<':
        fputc('\b', out);
        break;
      case '>':
        fprintf(out, "\x1b[");
        fputc('K', out);
        break;
      case '[':
        fputc('\r', out);
        break;
      case ']':
        fputc('\n', out);
        break;
      case 'L':
        fprintf(out, "\x1b[");
        fprintf(out, "2J");
        fprintf(out, "\x1b[");
        fprintf(out, "H");
        break;
      case '-':
      case '_':
      case 'N':
        fprintf(out, "\x1b[");
        fprintf(out, "0m");
        break;
      case 'H':
        fprintf(out, "\x1b[");
        fprintf(out, "1m");
        break;
      case 'I':
        fprintf(out, "\x1b[");
        fprintf(out, "5m");
        break;
      case 'K':
        fprintf(out, "\x1b[");
        fprintf(out, "30m");
        break;
      case 'R':
        fprintf(out, "\x1b[");
        fprintf(out, "31m");
        break;
      case 'G':
        fprintf(out, "\x1b[");
        fprintf(out, "32m");
        break;
      case 'Y':
        fprintf(out, "\x1b[");
        fprintf(out, "33m");
        break;
      case 'B':
        fprintf(out, "\x1b[");
        fprintf(out, "34m");
        break;
      case 'M':
        fprintf(out, "\x1b[");
        fprintf(out, "35m");
        break;
      case 'C':
        fprintf(out, "\x1b[");
        fprintf(out, "36m");
        break;
      case 'W':
        fprintf(out, "\x1b[");
        fprintf(out, "37m");
        break;
      case '0':
        fprintf(out, "\x1b[");
        fprintf(out, "40m");
        break;
      case '1':
        fprintf(out, "\x1b[");
        fprintf(out, "41m");
        break;
      case '2':
        fprintf(out, "\x1b[");
        fprintf(out, "42m");
        break;
      case '3':
        fprintf(out, "\x1b[");
        fprintf(out, "43m");
        break;
      case '4':
        fprintf(out, "\x1b[");
        fprintf(out, "44m");
        break;
      case '5':
        fprintf(out, "\x1b[");
        fprintf(out, "45m");
        break;
      case '6':
        fprintf(out, "\x1b[");
        fprintf(out, "46m");
        break;
      case '7':
        fprintf(out, "\x1b[");
        fprintf(out, "47m");
        break;
      default:
        if (!strip)
          fprintf(out, "\1%c", ch);
        break;
      }
    } else
      fputc(ch, out);
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    0x2e44(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    0x2e1e(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11db <main+0x5b>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10a0 <print_usage@plt>
movl   $0x0,-0x4(%rbp)
jmp    1819 <main+0x699>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1326 <main+0x1a6>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1251 <main+0xd1>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xeb3(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    1234 <main+0xb4>
movl   $0x1,-0x1c(%rbp)
jmp    124c <main+0xcc>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10a0 <print_usage@plt>
movl   $0x0,-0x4(%rbp)
jmp    1819 <main+0x699>
jmp    1313 <main+0x193>
mov    -0x28(%rbp),%rax
mov    0x2d8c(%rip),%rcx
cmp    (%rcx),%rax
jne    12ad <main+0x12d>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe5b(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
jne    12a8 <main+0x128>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1090 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    1819 <main+0x699>
jmp    130e <main+0x18e>
mov    -0x30(%rbp),%rax
mov    0x2d18(%rip),%rcx
cmp    (%rcx),%rax
jne    1309 <main+0x189>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe02(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
jne    1304 <main+0x184>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1090 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    1819 <main+0x699>
jmp    1309 <main+0x189>
jmp    130e <main+0x18e>
jmp    1313 <main+0x193>
jmp    1318 <main+0x198>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11e2 <main+0x62>
jmp    132b <main+0x1ab>
mov    -0x28(%rbp),%rdi
call   1040 <fgetc@plt>
mov    %eax,-0x14(%rbp)
mov    0x2ca2(%rip),%rcx
cmp    (%rcx),%eax
je     1812 <main+0x692>
cmpl   $0x1,-0x14(%rbp)
jne    1801 <main+0x681>
mov    -0x28(%rbp),%rdi
call   1040 <fgetc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2c7a(%rip),%rcx
cmp    (%rcx),%eax
je     1382 <main+0x202>
mov    -0x14(%rbp),%edi
call   1030 <toupper@plt>
movsbl %al,%eax
cmp    $0x5a,%eax
jne    1387 <main+0x207>
jmp    1812 <main+0x692>
cmpl   $0x7f,-0x14(%rbp)
jle    13de <main+0x25e>
mov    -0x14(%rbp),%eax
sub    $0x7f,%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xd34(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
cmpl   $0x1,-0x34(%rbp)
jle    13cb <main+0x24b>
mov    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%edx
lea    0xd18(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rsi
mov    $0x43,%edi
call   1050 <fputc@plt>
jmp    132b <main+0x1ab>
mov    -0x14(%rbp),%edi
call   1030 <toupper@plt>
movsbl %al,%eax
add    $0xffffffd3,%eax
mov    %eax,%ecx
mov    %rcx,-0x40(%rbp)
sub    $0x32,%eax
ja     17d8 <main+0x658>
mov    -0x40(%rbp),%rax
lea    0xbfa(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x30(%rbp),%rsi
mov    $0x1,%edi
call   1050 <fputc@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rsi
mov    $0x8,%edi
call   1050 <fputc@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0xc99(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rsi
mov    $0x4b,%edi
call   1050 <fputc@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rsi
mov    $0xd,%edi
call   1050 <fputc@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rsi
mov    $0xa,%edi
call   1050 <fputc@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0xc4e(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xc42(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xc2a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xc21(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0xc01(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xbfb(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0xbd8(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xbd6(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0xbaf(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xbbd(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0xb86(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xb7f(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0xb5d(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xb5a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0xb34(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xb35(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0xb0b(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xb10(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0xae2(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xaeb(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0xab9(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xac6(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0xa90(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xaa1(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0xa67(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xa7c(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0xa3e(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xa57(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0xa15(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xa32(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0x9ec(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xa0d(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0x9c3(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x9e8(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0x99a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x9c3(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0x971(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x99e(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0x948(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x979(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
mov    -0x30(%rbp),%rdi
lea    0x91f(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0x954(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
cmpl   $0x0,-0x1c(%rbp)
jne    17f7 <main+0x677>
mov    -0x30(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0x934(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    17fc <main+0x67c>
jmp    180d <main+0x68d>
mov    -0x14(%rbp),%edi
mov    -0x30(%rbp),%rsi
call   1050 <fputc@plt>
jmp    132b <main+0x1ab>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
cmp    $0x1,%edi
jg     11c1 <main+0x31>
mov    (%rbx),%rdi
call   10b0 <print_usage@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2e20(%rip),%r15
mov    (%r15),%rax
mov    %rax,0x8(%rsp)
mov    0x2df9(%rip),%rax
mov    (%rax),%r13
mov    %edi,%r14d
movl   $0x0,0x14(%rsp)
mov    $0x1,%r12d
lea    0xeda(%rip),%rbp
jmp    121e <main+0x8e>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbp,%rsi
call   1060 <strcmp@plt>
movl   $0x1,0x14(%rsp)
test   %rax,%rax
jne    11a6 <main+0x16>
add    $0x1,%r12
cmp    %r12,%r14
je     127c <main+0xec>
mov    (%rbx,%r12,8),%rdi
cmpb   $0x2d,(%rdi)
je     1200 <main+0x70>
mov    0x8(%rsp),%rax
cmp    (%r15),%rax
je     1253 <main+0xc3>
mov    0x2d98(%rip),%rax
cmp    (%rax),%r13
jne    1215 <main+0x85>
lea    0xe92(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,%r13
test   %rax,%rax
jne    1215 <main+0x85>
jmp    1269 <main+0xd9>
lea    0xe79(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
jne    1215 <main+0x85>
mov    (%rbx,%r12,8),%rdi
call   1090 <perror@plt>
mov    $0x1,%ebx
jmp    11b0 <main+0x20>
mov    0x8(%rsp),%rdi
call   1040 <fgetc@plt>
mov    0x2d53(%rip),%r15
xor    %ebx,%ebx
cmp    (%r15),%eax
je     11b0 <main+0x20>
mov    %r13,%r14
lea    0xe37(%rip),%r12
lea    0xd57(%rip),%r13
jmp    12cd <main+0x13d>
nopl   0x0(%rax,%rax,1)
mov    %eax,%edi
mov    %r14,%rsi
call   1050 <fputc@plt>
mov    0x8(%rsp),%rdi
call   1040 <fgetc@plt>
cmp    (%r15),%eax
je     11ae <main+0x1e>
cmp    $0x1,%eax
jne    12b0 <main+0x120>
mov    0x8(%rsp),%rdi
call   1040 <fgetc@plt>
xor    %ebx,%ebx
cmp    (%r15),%eax
je     11b0 <main+0x20>
mov    %eax,%ebp
mov    %eax,%edi
call   1030 <toupper@plt>
cmp    $0x5a,%al
je     11b0 <main+0x20>
cmp    $0x80,%ebp
jl     1340 <main+0x1b0>
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r12,%rdi
mov    %r14,%rcx
call   10a0 <fwrite@plt>
cmp    $0x80,%ebp
je     1333 <main+0x1a3>
add    $0xffffff81,%ebp
mov    %r14,%rdi
lea    0xdb2(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0x43,%edi
jmp    12b2 <main+0x122>
nopl   (%rax)
mov    %ebp,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
add    $0xffffffd3,%eax
cmp    $0x32,%eax
ja     1384 <main+0x1f4>
mov    %r13,%rcx
movslq 0x0(%r13,%rax,4),%rax
add    %r13,%rax
jmp    *%rax
lea    0xd73(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xd64(%rip),%rdi
jmp    15e8 <main+0x458>
cmpl   $0x0,0x14(%rsp)
jne    12ba <main+0x12a>
mov    %r14,%rdi
lea    0xd89(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    12ba <main+0x12a>
lea    0xd2b(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xd3b(%rip),%rdi
mov    $0x3,%esi
jmp    15ed <main+0x45d>
lea    0xd01(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xd15(%rip),%rdi
mov    $0x3,%esi
jmp    15ed <main+0x45d>
lea    0xcd7(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xcef(%rip),%rdi
mov    $0x3,%esi
jmp    15ed <main+0x45d>
lea    0xcad(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xcc9(%rip),%rdi
mov    $0x3,%esi
jmp    15ed <main+0x45d>
lea    0xc83(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xca3(%rip),%rdi
mov    $0x3,%esi
jmp    15ed <main+0x45d>
lea    0xc59(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xc7d(%rip),%rdi
mov    $0x3,%esi
jmp    15ed <main+0x45d>
lea    0xc2f(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xc57(%rip),%rdi
mov    $0x3,%esi
jmp    15ed <main+0x45d>
lea    0xc05(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xc31(%rip),%rdi
mov    $0x3,%esi
jmp    15ed <main+0x45d>
mov    $0x8,%edi
jmp    12b2 <main+0x122>
lea    0xbd1(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
mov    $0x4b,%edi
jmp    12b2 <main+0x122>
mov    $0x1,%edi
jmp    12b2 <main+0x122>
lea    0xba4(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xba4(%rip),%rdi
mov    $0x3,%esi
jmp    15ed <main+0x45d>
lea    0xb7a(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xb82(%rip),%rdi
mov    $0x3,%esi
jmp    15ed <main+0x45d>
lea    0xb53(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xb4b(%rip),%rdi
mov    $0x3,%esi
jmp    15ed <main+0x45d>
lea    0xb2c(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xb21(%rip),%rdi
jmp    15e8 <main+0x458>
lea    0xb0a(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xb0f(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
jmp    12ba <main+0x12a>
lea    0xad3(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xac3(%rip),%rdi
mov    $0x3,%esi
jmp    15ed <main+0x45d>
lea    0xaac(%rip),%rbx
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbx,%rdi
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xa96(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbx,%rdi
mov    %r14,%rcx
call   10a0 <fwrite@plt>
mov    $0x48,%edi
jmp    12b2 <main+0x122>
lea    0xa58(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xa5c(%rip),%rdi
mov    $0x3,%esi
jmp    15ed <main+0x45d>
lea    0xa2e(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xa22(%rip),%rdi
mov    $0x3,%esi
jmp    15ed <main+0x45d>
lea    0xa04(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0xa10(%rip),%rdi
mov    $0x3,%esi
jmp    15ed <main+0x45d>
lea    0x9da(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10a0 <fwrite@plt>
lea    0x9d6(%rip),%rdi
mov    $0x3,%esi
jmp    15ed <main+0x45d>
mov    $0xd,%edi
jmp    12b2 <main+0x122>
mov    $0xa,%edi
jmp    12b2 <main+0x122>

LLVM IR (-O0):
@stdin = global i32* null
@stdout = global i32* null
@.str = [7 x i8] c"-strip\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [3 x i8] c"wb\00"
@EOF = global i32 0
@.str.3 = [3 x i8] c"\1B[\00"
@.str.4 = [3 x i8] c"%u\00"
@.str.5 = [3 x i8] c"2J\00"
@.str.6 = [2 x i8] c"H\00"
@.str.7 = [3 x i8] c"0m\00"
@.str.8 = [3 x i8] c"1m\00"
@.str.9 = [3 x i8] c"5m\00"
@.str.10 = [4 x i8] c"30m\00"
@.str.11 = [4 x i8] c"31m\00"
@.str.12 = [4 x i8] c"32m\00"
@.str.13 = [4 x i8] c"33m\00"
@.str.14 = [4 x i8] c"34m\00"
@.str.15 = [4 x i8] c"35m\00"
@.str.16 = [4 x i8] c"36m\00"
@.str.17 = [4 x i8] c"37m\00"
@.str.18 = [4 x i8] c"40m\00"
@.str.19 = [4 x i8] c"41m\00"
@.str.20 = [4 x i8] c"42m\00"
@.str.21 = [4 x i8] c"43m\00"
@.str.22 = [4 x i8] c"44m\00"
@.str.23 = [4 x i8] c"45m\00"
@.str.24 = [4 x i8] c"46m\00"
@.str.25 = [4 x i8] c"47m\00"
@.str.26 = [4 x i8] c"\01%c\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %8
%12 = load i32*, i32** @stdin
store i32* %12, i32** %9
%13 = load i32*, i32** @stdout
store i32* %13, i32** %10
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 2
br i1 %15, label %16, label %21
16: ; preds = %2
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 0
%19 = load i8*, i8** %18
%20 = call i32 @print_usage(i8* %19)
store i32 0, i32* %3
br label %275
21: ; preds = %2
store i32 1, i32* %7
br label %22
22: ; preds = %94, %21
%23 = load i32, i32* %7
%24 = load i32, i32* %4
%25 = icmp slt i32 %23, %24
br i1 %25, label %26, label %97
26: ; preds = %22
%27 = load i8**, i8*** %5
%28 = load i32, i32* %7
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8*, i8** %27, i64 %29
%31 = load i8*, i8** %30
%32 = getelementptr inbounds i8, i8* %31, i64 0
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 45
br i1 %35, label %36, label %51
36: ; preds = %26
%37 = load i8**, i8*** %5
%38 = load i32, i32* %7
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i8*, i8** %37, i64 %39
%41 = load i8*, i8** %40
%42 = call i64 @strcmp(i8* %41, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%43 = icmp eq i64 %42, 0
br i1 %43, label %44, label %45
44: ; preds = %36
store i32 1, i32* %8
br label %50
45: ; preds = %36
%46 = load i8**, i8*** %5
%47 = getelementptr inbounds i8*, i8** %46, i64 0
%48 = load i8*, i8** %47
%49 = call i32 @print_usage(i8* %48)
store i32 0, i32* %3
br label %275
50: ; preds = %44
br label %93
51: ; preds = %26
%52 = load i32*, i32** %9
%53 = load i32*, i32** @stdin
%54 = icmp eq i32* %52, %53
br i1 %54, label %55, label %71
55: ; preds = %51
%56 = load i8**, i8*** %5
%57 = load i32, i32* %7
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i8*, i8** %56, i64 %58
%60 = load i8*, i8** %59
%61 = call i32* @fopen(i8* %60, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %61, i32** %9
%62 = icmp eq i32* %61, null
br i1 %62, label %63, label %70
63: ; preds = %55
%64 = load i8**, i8*** %5
%65 = load i32, i32* %7
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds i8*, i8** %64, i64 %66
%68 = load i8*, i8** %67
%69 = call i32 @perror(i8* %68)
store i32 1, i32* %3
br label %275
70: ; preds = %55
br label %92
71: ; preds = %51
%72 = load i32*, i32** %10
%73 = load i32*, i32** @stdout
%74 = icmp eq i32* %72, %73
br i1 %74, label %75, label %91
75: ; preds = %71
%76 = load i8**, i8*** %5
%77 = load i32, i32* %7
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i8*, i8** %76, i64 %78
%80 = load i8*, i8** %79
%81 = call i32* @fopen(i8* %80, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
store i32* %81, i32** %10
%82 = icmp eq i32* %81, null
br i1 %82, label %83, label %90
83: ; preds = %75
%84 = load i8**, i8*** %5
%85 = load i32, i32* %7
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds i8*, i8** %84, i64 %86
%88 = load i8*, i8** %87
%89 = call i32 @perror(i8* %88)
store i32 1, i32* %3
br label %275
90: ; preds = %75
br label %91
91: ; preds = %90, %71
br label %92
92: ; preds = %91, %70
br label %93
93: ; preds = %92, %50
br label %94
94: ; preds = %93
%95 = load i32, i32* %7
%96 = add nsw i32 %95, 1
store i32 %96, i32* %7
br label %22
97: ; preds = %22
br label %98
98: ; preds = %273, %132, %97
%99 = load i32*, i32** %9
%100 = call i32 @fgetc(i32* %99)
store i32 %100, i32* %6
%101 = load i32, i32* @EOF
%102 = icmp ne i32 %100, %101
br i1 %102, label %103, label %274
103: ; preds = %98
%104 = load i32, i32* %6
%105 = icmp eq i32 %104, 1
br i1 %105, label %106, label %269
106: ; preds = %103
%107 = load i32*, i32** %9
%108 = call i32 @fgetc(i32* %107)
store i32 %108, i32* %6
%109 = load i32, i32* %6
%110 = load i32, i32* @EOF
%111 = icmp eq i32 %109, %110
br i1 %111, label %117, label %112
112: ; preds = %106
%113 = load i32, i32* %6
%114 = call signext i8 @toupper(i32 %113)
%115 = sext i8 %114 to i32
%116 = icmp eq i32 %115, 90
br i1 %116, label %117, label %118
117: ; preds = %112, %106
br label %274
118: ; preds = %112
%119 = load i32, i32* %6
%120 = icmp sgt i32 %119, 127
br i1 %120, label %121, label %135
121: ; preds = %118
%122 = load i32, i32* %6
%123 = sub nsw i32 %122, 127
store i32 %123, i32* %11
%124 = load i32*, i32** %10
%125 = call i32 (i32*, i8*, ...) @fprintf(i32* %124, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%126 = load i32, i32* %11
%127 = icmp sgt i32 %126, 1
br i1 %127, label %128, label %132
128: ; preds = %121
%129 = load i32*, i32** %10
%130 = load i32, i32* %11
%131 = call i32 (i32*, i8*, ...) @fprintf(i32* %129, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %130)
br label %132
132: ; preds = %128, %121
%133 = load i32*, i32** %10
%134 = call i32 @fputc(i32 67, i32* %133)
br label %98
135: ; preds = %118
%136 = load i32, i32* %6
%137 = call signext i8 @toupper(i32 %136)
%138 = sext i8 %137 to i32
switch i32 %138, label %260 [
i32 65, label %139
i32 60, label %142
i32 62, label %145
i32 91, label %150
i32 93, label %153
i32 76, label %156
i32 45, label %165
i32 95, label %165
i32 78, label %165
i32 72, label %170
i32 73, label %175
i32 75, label %180
i32 82, label %185
i32 71, label %190
i32 89, label %195
i32 66, label %200
i32 77, label %205
i32 67, label %210
i32 87, label %215
i32 48, label %220
i32 49, label %225
i32 50, label %230
i32 51, label %235
i32 52, label %240
i32 53, label %245
i32 54, label %250
i32 55, label %255
]
139: ; preds = %135
%140 = load i32*, i32** %10
%141 = call i32 @fputc(i32 1, i32* %140)
br label %268
142: ; preds = %135
%143 = load i32*, i32** %10
%144 = call i32 @fputc(i32 8, i32* %143)
br label %268
145: ; preds = %135
%146 = load i32*, i32** %10
%147 = call i32 (i32*, i8*, ...) @fprintf(i32* %146, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%148 = load i32*, i32** %10
%149 = call i32 @fputc(i32 75, i32* %148)
br label %268
150: ; preds = %135
%151 = load i32*, i32** %10
%152 = call i32 @fputc(i32 13, i32* %151)
br label %268
153: ; preds = %135
%154 = load i32*, i32** %10
%155 = call i32 @fputc(i32 10, i32* %154)
br label %268
156: ; preds = %135
%157 = load i32*, i32** %10
%158 = call i32 (i32*, i8*, ...) @fprintf(i32* %157, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%159 = load i32*, i32** %10
%160 = call i32 (i32*, i8*, ...) @fprintf(i32* %159, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%161 = load i32*, i32** %10
%162 = call i32 (i32*, i8*, ...) @fprintf(i32* %161, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%163 = load i32*, i32** %10
%164 = call i32 (i32*, i8*, ...) @fprintf(i32* %163, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %268
165: ; preds = %135, %135, %135
%166 = load i32*, i32** %10
%167 = call i32 (i32*, i8*, ...) @fprintf(i32* %166, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%168 = load i32*, i32** %10
%169 = call i32 (i32*, i8*, ...) @fprintf(i32* %168, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
br label %268
170: ; preds = %135
%171 = load i32*, i32** %10
%172 = call i32 (i32*, i8*, ...) @fprintf(i32* %171, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%173 = load i32*, i32** %10
%174 = call i32 (i32*, i8*, ...) @fprintf(i32* %173, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
br label %268
175: ; preds = %135
%176 = load i32*, i32** %10
%177 = call i32 (i32*, i8*, ...) @fprintf(i32* %176, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%178 = load i32*, i32** %10
%179 = call i32 (i32*, i8*, ...) @fprintf(i32* %178, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
br label %268
180: ; preds = %135
%181 = load i32*, i32** %10
%182 = call i32 (i32*, i8*, ...) @fprintf(i32* %181, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%183 = load i32*, i32** %10
%184 = call i32 (i32*, i8*, ...) @fprintf(i32* %183, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
br label %268
185: ; preds = %135
%186 = load i32*, i32** %10
%187 = call i32 (i32*, i8*, ...) @fprintf(i32* %186, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%188 = load i32*, i32** %10
%189 = call i32 (i32*, i8*, ...) @fprintf(i32* %188, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
br label %268
190: ; preds = %135
%191 = load i32*, i32** %10
%192 = call i32 (i32*, i8*, ...) @fprintf(i32* %191, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%193 = load i32*, i32** %10
%194 = call i32 (i32*, i8*, ...) @fprintf(i32* %193, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
br label %268
195: ; preds = %135
%196 = load i32*, i32** %10
%197 = call i32 (i32*, i8*, ...) @fprintf(i32* %196, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%198 = load i32*, i32** %10
%199 = call i32 (i32*, i8*, ...) @fprintf(i32* %198, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0))
br label %268
200: ; preds = %135
%201 = load i32*, i32** %10
%202 = call i32 (i32*, i8*, ...) @fprintf(i32* %201, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%203 = load i32*, i32** %10
%204 = call i32 (i32*, i8*, ...) @fprintf(i32* %203, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
br label %268
205: ; preds = %135
%206 = load i32*, i32** %10
%207 = call i32 (i32*, i8*, ...) @fprintf(i32* %206, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%208 = load i32*, i32** %10
%209 = call i32 (i32*, i8*, ...) @fprintf(i32* %208, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0))
br label %268
210: ; preds = %135
%211 = load i32*, i32** %10
%212 = call i32 (i32*, i8*, ...) @fprintf(i32* %211, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%213 = load i32*, i32** %10
%214 = call i32 (i32*, i8*, ...) @fprintf(i32* %213, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0))
br label %268
215: ; preds = %135
%216 = load i32*, i32** %10
%217 = call i32 (i32*, i8*, ...) @fprintf(i32* %216, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%218 = load i32*, i32** %10
%219 = call i32 (i32*, i8*, ...) @fprintf(i32* %218, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0))
br label %268
220: ; preds = %135
%221 = load i32*, i32** %10
%222 = call i32 (i32*, i8*, ...) @fprintf(i32* %221, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%223 = load i32*, i32** %10
%224 = call i32 (i32*, i8*, ...) @fprintf(i32* %223, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0))
br label %268
225: ; preds = %135
%226 = load i32*, i32** %10
%227 = call i32 (i32*, i8*, ...) @fprintf(i32* %226, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%228 = load i32*, i32** %10
%229 = call i32 (i32*, i8*, ...) @fprintf(i32* %228, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0))
br label %268
230: ; preds = %135
%231 = load i32*, i32** %10
%232 = call i32 (i32*, i8*, ...) @fprintf(i32* %231, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%233 = load i32*, i32** %10
%234 = call i32 (i32*, i8*, ...) @fprintf(i32* %233, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0))
br label %268
235: ; preds = %135
%236 = load i32*, i32** %10
%237 = call i32 (i32*, i8*, ...) @fprintf(i32* %236, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%238 = load i32*, i32** %10
%239 = call i32 (i32*, i8*, ...) @fprintf(i32* %238, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0))
br label %268
240: ; preds = %135
%241 = load i32*, i32** %10
%242 = call i32 (i32*, i8*, ...) @fprintf(i32* %241, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%243 = load i32*, i32** %10
%244 = call i32 (i32*, i8*, ...) @fprintf(i32* %243, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0))
br label %268
245: ; preds = %135
%246 = load i32*, i32** %10
%247 = call i32 (i32*, i8*, ...) @fprintf(i32* %246, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%248 = load i32*, i32** %10
%249 = call i32 (i32*, i8*, ...) @fprintf(i32* %248, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.23, i64 0, i64 0))
br label %268
250: ; preds = %135
%251 = load i32*, i32** %10
%252 = call i32 (i32*, i8*, ...) @fprintf(i32* %251, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%253 = load i32*, i32** %10
%254 = call i32 (i32*, i8*, ...) @fprintf(i32* %253, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i64 0, i64 0))
br label %268
255: ; preds = %135
%256 = load i32*, i32** %10
%257 = call i32 (i32*, i8*, ...) @fprintf(i32* %256, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%258 = load i32*, i32** %10
%259 = call i32 (i32*, i8*, ...) @fprintf(i32* %258, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.25, i64 0, i64 0))
br label %268
260: ; preds = %135
%261 = load i32, i32* %8
%262 = icmp ne i32 %261, 0
br i1 %262, label %267, label %263
263: ; preds = %260
%264 = load i32*, i32** %10
%265 = load i32, i32* %6
%266 = call i32 (i32*, i8*, ...) @fprintf(i32* %264, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.26, i64 0, i64 0), i32 %265)
br label %267
267: ; preds = %263, %260
br label %268
268: ; preds = %267, %255, %250, %245, %240, %235, %230, %225, %220, %215, %210, %205, %200, %195, %190, %185, %180, %175, %170, %165, %156, %153, %150, %145, %142, %139
br label %273
269: ; preds = %103
%270 = load i32, i32* %6
%271 = load i32*, i32** %10
%272 = call i32 @fputc(i32 %270, i32* %271)
br label %273
273: ; preds = %269, %268
br label %98
274: ; preds = %117, %98
store i32 0, i32* %3
br label %275
275: ; preds = %274, %83, %63, %45, %16
%276 = load i32, i32* %3
ret i32 %276
}

LLVM IR (-O2):
@stdin = global i32* null
@stdout = global i32* null
@.str = [7 x i8] c"-strip\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [3 x i8] c"wb\00"
@EOF = global i32 0
@.str.3 = [3 x i8] c"\1B[\00"
@.str.4 = [3 x i8] c"%u\00"
@.str.5 = [3 x i8] c"2J\00"
@.str.7 = [3 x i8] c"0m\00"
@.str.8 = [3 x i8] c"1m\00"
@.str.9 = [3 x i8] c"5m\00"
@.str.10 = [4 x i8] c"30m\00"
@.str.11 = [4 x i8] c"31m\00"
@.str.12 = [4 x i8] c"32m\00"
@.str.13 = [4 x i8] c"33m\00"
@.str.14 = [4 x i8] c"34m\00"
@.str.15 = [4 x i8] c"35m\00"
@.str.16 = [4 x i8] c"36m\00"
@.str.17 = [4 x i8] c"37m\00"
@.str.18 = [4 x i8] c"40m\00"
@.str.19 = [4 x i8] c"41m\00"
@.str.20 = [4 x i8] c"42m\00"
@.str.21 = [4 x i8] c"43m\00"
@.str.22 = [4 x i8] c"44m\00"
@.str.23 = [4 x i8] c"45m\00"
@.str.24 = [4 x i8] c"46m\00"
@.str.25 = [4 x i8] c"47m\00"
@.str.26 = [4 x i8] c"\01%c\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @print_usage(i8* %5)
br label %165
7: ; preds = %2
%8 = load i32*, i32** @stdin
%9 = load i32*, i32** @stdout
%10 = zext i32 %0 to i64
br label %17
11: ; preds = %54
%12 = tail call i32 @fgetc(i32* %56)
%13 = load i32, i32* @EOF
%14 = icmp eq i32 %12, %13
br i1 %14, label %165, label %15
15: ; preds = %11
%16 = icmp eq i32 %55, 0
br label %60
17: ; preds = %7, %54
%18 = phi i64 [ 1, %7 ], [ %58, %54 ]
%19 = phi i32* [ %9, %7 ], [ %57, %54 ]
%20 = phi i32* [ %8, %7 ], [ %56, %54 ]
%21 = phi i32 [ 0, %7 ], [ %55, %54 ]
%22 = getelementptr inbounds i8*, i8** %1, i64 %18
%23 = load i8*, i8** %22
%24 = load i8, i8* %23
%25 = icmp eq i8 %24, 45
br i1 %25, label %26, label %32
26: ; preds = %17
%27 = tail call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %54, label %29
29: ; preds = %26
%30 = load i8*, i8** %1
%31 = tail call i32 @print_usage(i8* %30)
br label %165
32: ; preds = %17
%33 = load i32*, i32** @stdin
%34 = icmp eq i32* %20, %33
br i1 %34, label %35, label %43
35: ; preds = %32
%36 = tail call i32* @fopen(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%37 = icmp eq i32* %36, null
br i1 %37, label %38, label %54
38: ; preds = %35
%39 = and i64 %18, 4294967295
%40 = getelementptr inbounds i8*, i8** %1, i64 %39
%41 = load i8*, i8** %40
%42 = tail call i32 @perror(i8* %41)
br label %165
43: ; preds = %32
%44 = load i32*, i32** @stdout
%45 = icmp eq i32* %19, %44
br i1 %45, label %46, label %54
46: ; preds = %43
%47 = tail call i32* @fopen(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%48 = icmp eq i32* %47, null
br i1 %48, label %49, label %54
49: ; preds = %46
%50 = and i64 %18, 4294967295
%51 = getelementptr inbounds i8*, i8** %1, i64 %50
%52 = load i8*, i8** %51
%53 = tail call i32 @perror(i8* %52)
br label %165
54: ; preds = %26, %43, %46, %35
%55 = phi i32 [ %21, %35 ], [ %21, %46 ], [ %21, %43 ], [ 1, %26 ]
%56 = phi i32* [ %36, %35 ], [ %20, %46 ], [ %20, %43 ], [ %20, %26 ]
%57 = phi i32* [ %19, %35 ], [ %47, %46 ], [ %19, %43 ], [ %19, %26 ]
%58 = add nuw nsw i64 %18, 1
%59 = icmp eq i64 %58, %10
br i1 %59, label %11, label %17
60: ; preds = %15, %80
%61 = phi i32 [ %12, %15 ], [ %81, %80 ]
%62 = icmp eq i32 %61, 1
br i1 %62, label %63, label %163
63: ; preds = %60
%64 = tail call i32 @fgetc(i32* %56)
%65 = load i32, i32* @EOF
%66 = icmp eq i32 %64, %65
br i1 %66, label %165, label %67
67: ; preds = %63
%68 = tail call signext i8 @toupper(i32 %64)
%69 = icmp eq i8 %68, 90
br i1 %69, label %165, label %70
70: ; preds = %67
%71 = icmp sgt i32 %64, 127
br i1 %71, label %72, label %84
72: ; preds = %70
%73 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%74 = icmp eq i32 %64, 128
br i1 %74, label %78, label %75
75: ; preds = %72
%76 = add nsw i32 %64, -127
%77 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %57, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %76)
br label %78
78: ; preds = %75, %72
%79 = tail call i32 @fputc(i32 67, i32* %57)
br label %80
80: ; preds = %163, %160, %161, %157, %154, %151, %148, %145, %142, %139, %136, %133, %130, %127, %124, %121, %118, %115, %112, %109, %106, %103, %98, %96, %94, %91, %89, %87, %78
%81 = tail call i32 @fgetc(i32* %56)
%82 = load i32, i32* @EOF
%83 = icmp eq i32 %81, %82
br i1 %83, label %165, label %60
84: ; preds = %70
%85 = tail call signext i8 @toupper(i32 %64)
%86 = sext i8 %85 to i32
switch i32 %86, label %160 [
i32 65, label %87
i32 60, label %89
i32 62, label %91
i32 91, label %94
i32 93, label %96
i32 76, label %98
i32 45, label %103
i32 95, label %103
i32 78, label %103
i32 72, label %106
i32 73, label %109
i32 75, label %112
i32 82, label %115
i32 71, label %118
i32 89, label %121
i32 66, label %124
i32 77, label %127
i32 67, label %130
i32 87, label %133
i32 48, label %136
i32 49, label %139
i32 50, label %142
i32 51, label %145
i32 52, label %148
i32 53, label %151
i32 54, label %154
i32 55, label %157
]
87: ; preds = %84
%88 = tail call i32 @fputc(i32 1, i32* %57)
br label %80
89: ; preds = %84
%90 = tail call i32 @fputc(i32 8, i32* %57)
br label %80
91: ; preds = %84
%92 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%93 = tail call i32 @fputc(i32 75, i32* %57)
br label %80
94: ; preds = %84
%95 = tail call i32 @fputc(i32 13, i32* %57)
br label %80
96: ; preds = %84
%97 = tail call i32 @fputc(i32 10, i32* %57)
br label %80
98: ; preds = %84
%99 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%100 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i64 2, i64 1, i32* %57)
%101 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%102 = tail call i32 @fputc(i32 72, i32* %57)
br label %80
103: ; preds = %84, %84, %84
%104 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%105 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i64 2, i64 1, i32* %57)
br label %80
106: ; preds = %84
%107 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%108 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i64 2, i64 1, i32* %57)
br label %80
109: ; preds = %84
%110 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%111 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i64 2, i64 1, i32* %57)
br label %80
112: ; preds = %84
%113 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%114 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i64 3, i64 1, i32* %57)
br label %80
115: ; preds = %84
%116 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%117 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i64 3, i64 1, i32* %57)
br label %80
118: ; preds = %84
%119 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%120 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i64 3, i64 1, i32* %57)
br label %80
121: ; preds = %84
%122 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%123 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i64 3, i64 1, i32* %57)
br label %80
124: ; preds = %84
%125 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%126 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i64 3, i64 1, i32* %57)
br label %80
127: ; preds = %84
%128 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%129 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i64 3, i64 1, i32* %57)
br label %80
130: ; preds = %84
%131 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%132 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i64 3, i64 1, i32* %57)
br label %80
133: ; preds = %84
%134 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%135 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0), i64 3, i64 1, i32* %57)
br label %80
136: ; preds = %84
%137 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%138 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0), i64 3, i64 1, i32* %57)
br label %80
139: ; preds = %84
%140 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%141 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), i64 3, i64 1, i32* %57)
br label %80
142: ; preds = %84
%143 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%144 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0), i64 3, i64 1, i32* %57)
br label %80
145: ; preds = %84
%146 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%147 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i64 3, i64 1, i32* %57)
br label %80
148: ; preds = %84
%149 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%150 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i64 3, i64 1, i32* %57)
br label %80
151: ; preds = %84
%152 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%153 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.23, i64 0, i64 0), i64 3, i64 1, i32* %57)
br label %80
154: ; preds = %84
%155 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%156 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i64 0, i64 0), i64 3, i64 1, i32* %57)
br label %80
157: ; preds = %84
%158 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %57)
%159 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.25, i64 0, i64 0), i64 3, i64 1, i32* %57)
br label %80
160: ; preds = %84
br i1 %16, label %161, label %80
161: ; preds = %160
%162 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %57, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.26, i64 0, i64 0), i32 %64)
br label %80
163: ; preds = %60
%164 = tail call i32 @fputc(i32 %61, i32* %57)
br label %80
165: ; preds = %63, %67, %80, %11, %49, %38, %29, %4
%166 = phi i32 [ 0, %4 ], [ 0, %29 ], [ 1, %38 ], [ 1, %49 ], [ 0, %11 ], [ 0, %80 ], [ 0, %67 ], [ 0, %63 ]
ret i32 %166
}