#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*/ n;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int atoi(char *);
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fputc(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int ftell(int /*<<< orphan*/ *);
scalar_t__ isdigit(int);
int /*<<< orphan*/ memset(unsigned char *, int, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ print_usage(char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ *stdin;
int /*<<< orphan*/ *stdout;
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv) {
  unsigned char esc, n[25];
  int i, ch, ni;
  FILE *in = stdin;
  FILE *out = stdout;
  int delay = 0;
  int clear = 0;
  int pause = 0;
  if (argc < 2) {
    print_usage(argv[0]);
    return (0);
  }
  for (i = 1; i < argc; i++) {
    if (argv[i][0] == '-') {
      if (strcmp(argv[i], "-delay") == 0) {
        if (i + 1 == argc) {
          print_usage(argv[0]);
          return -1;
        }
        if ((delay = atoi(argv[++i])) < 1) {
          print_usage(argv[0]);
          return -1;
        }
      } else if (strcmp(argv[i], "-clear") == 0)
        clear = 1;
      else if (strcmp(argv[i], "-pause") == 0)
        pause = 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);
      }
    }
  }
  if (clear)
    fprintf(out, "\1n\1l");
  esc = 0;
  while ((ch = fgetc(in)) != EOF) {
    if (ch == '[' && esc) {
      ni = 0;
      memset(n, 1, sizeof(n));
      while ((ch = fgetc(in)) != EOF) {
        if (isdigit(ch)) {
          n[ni] = ch & 0xf;
          ch = fgetc(in);
          if (ch == EOF)
            break;
          if (isdigit(ch)) {
            n[ni] *= 10;
            n[ni] += ch & 0xf;
            ch = fgetc(in);
            if (ch == EOF)
              break;
            if (isdigit(ch)) {
              n[ni] *= 10;
              n[ni] += ch & 0xf;
              ch = fgetc(in);
            }
          }
          ni++;
        }
        if (ch == ';')
          continue;
        switch (ch) {
        case '=':
        case '?':
          ch = fgetc(in);
          if (isdigit(ch))
            ch = fgetc(in);
          if (isdigit(ch))
            ch = fgetc(in);
          if (isdigit(ch))
            fgetc(in);
          break;
        case 'J':
          if (n[0] == 2)
            fputs("\1l", out);
          break;
        case 'K':
          fputs("\1>", out);
          break;
        case 'm':
          for (i = 0; i < ni; i++) {
            fputc(1, out);
            switch (n[i]) {
            default:
            case 0:
            case 2:
              fputc('n', out);
              break;
            case 1:
              fputc('h', out);
              break;
            case 3:
            case 4:
            case 5:
            case 6:
            case 7:
              fputc('i', out);
              break;
            case 8:
              fputc('e', out);
              break;
            case 30:
              fputc('k', out);
              break;
            case 31:
              fputc('r', out);
              break;
            case 32:
              fputc('g', out);
              break;
            case 33:
              fputc('y', out);
              break;
            case 34:
              fputc('b', out);
              break;
            case 35:
              fputc('m', out);
              break;
            case 36:
              fputc('c', out);
              break;
            case 37:
              fputc('w', out);
              break;
            case 40:
              fputc('0', out);
              break;
            case 41:
              fputc('1', out);
              break;
            case 42:
              fputc('2', out);
              break;
            case 43:
              fputc('3', out);
              break;
            case 44:
              fputc('4', out);
              break;
            case 45:
              fputc('5', out);
              break;
            case 46:
              fputc('6', out);
              break;
            case 47:
              fputc('7', out);
              break;
            }
          }
          break;
        case 'B':
          while (n[0]) {
            fprintf(out, "\n");
            n[0]--;
          }
          break;
        case 'C':
          fprintf(out, "\1%c", 0x7f + n[0]);
          break;
        case 'D':
          if (n[0] >= 80)
            fprintf(out, "\r");
          else
            while (n[0]) {
              fprintf(out, "\b");
              n[0]--;
            }
          break;
        default:
          fprintf(stderr, "Unsupported ANSI code '%c' (0x%02X)\r\n", ch, ch);
          break;
        }
        break;
      }
      esc = 0;
      continue;
    }
    if (ch == '\x1b')
      esc = 1;
    else {
      esc = 0;
      fputc(ch, out);
    }
    if (delay && (ftell(out) % delay) == 0)
      fprintf(out, "\1,");
  }
  if (pause)
    fprintf(out, "\1p");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e0b(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x48(%rbp)
mov    0x2ddd(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1229 <main+0x69>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10e0 <print_usage@plt>
movl   $0x0,-0x4(%rbp)
jmp    19bb <main+0x7fb>
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1437 <main+0x277>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1362 <main+0x1a2>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xf1d(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    12df <main+0x11f>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
cmp    -0x8(%rbp),%eax
jne    129d <main+0xdd>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10e0 <print_usage@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    19bb <main+0x7fb>
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   10d0 <atoi@plt>
mov    %eax,-0x54(%rbp)
cmp    $0x1,%eax
jge    12da <main+0x11a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10e0 <print_usage@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    19bb <main+0x7fb>
jmp    135d <main+0x19d>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe99(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    130d <main+0x14d>
movl   $0x1,-0x58(%rbp)
jmp    1358 <main+0x198>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe72(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    133b <main+0x17b>
movl   $0x1,-0x5c(%rbp)
jmp    1353 <main+0x193>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10e0 <print_usage@plt>
movl   $0x0,-0x4(%rbp)
jmp    19bb <main+0x7fb>
jmp    1358 <main+0x198>
jmp    135d <main+0x19d>
jmp    1424 <main+0x264>
mov    -0x48(%rbp),%rax
mov    0x2c7b(%rip),%rcx
cmp    (%rcx),%rax
jne    13be <main+0x1fe>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe10(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x48(%rbp)
cmp    $0x0,%rax
jne    13b9 <main+0x1f9>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   10c0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    19bb <main+0x7fb>
jmp    141f <main+0x25f>
mov    -0x50(%rbp),%rax
mov    0x2bff(%rip),%rcx
cmp    (%rcx),%rax
jne    141a <main+0x25a>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdb7(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x50(%rbp)
cmp    $0x0,%rax
jne    1415 <main+0x255>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   10c0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    19bb <main+0x7fb>
jmp    141a <main+0x25a>
jmp    141f <main+0x25f>
jmp    1424 <main+0x264>
jmp    1429 <main+0x269>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1230 <main+0x70>
cmpl   $0x0,-0x58(%rbp)
je     1453 <main+0x293>
mov    -0x50(%rbp),%rdi
lea    0xd53(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movb   $0x0,-0x11(%rbp)
mov    -0x48(%rbp),%rdi
call   1060 <fgetc@plt>
mov    %eax,-0x38(%rbp)
mov    0x2b76(%rip),%rcx
cmp    (%rcx),%eax
je     1998 <main+0x7d8>
cmpl   $0x5b,-0x38(%rbp)
jne    193e <main+0x77e>
movzbl -0x11(%rbp),%eax
cmp    $0x0,%eax
je     193e <main+0x77e>
movl   $0x0,-0x3c(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x1,%esi
mov    $0x19,%edx
call   1050 <memset@plt>
mov    -0x48(%rbp),%rdi
call   1060 <fgetc@plt>
mov    %eax,-0x38(%rbp)
mov    0x2b2a(%rip),%rcx
cmp    (%rcx),%eax
je     1935 <main+0x775>
mov    -0x38(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     15ae <main+0x3ee>
mov    -0x38(%rbp),%eax
and    $0xf,%eax
mov    %al,%cl
movslq -0x3c(%rbp),%rax
mov    %cl,-0x30(%rbp,%rax,1)
mov    -0x48(%rbp),%rdi
call   1060 <fgetc@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    0x2aea(%rip),%rcx
cmp    (%rcx),%eax
jne    1503 <main+0x343>
jmp    1935 <main+0x775>
mov    -0x38(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     15a5 <main+0x3e5>
movslq -0x3c(%rbp),%rax
movzbl -0x30(%rbp,%rax,1),%ecx
imul   $0xa,%ecx,%ecx
mov    %cl,-0x30(%rbp,%rax,1)
mov    -0x38(%rbp),%edx
and    $0xf,%edx
movslq -0x3c(%rbp),%rax
movzbl -0x30(%rbp,%rax,1),%ecx
add    %edx,%ecx
mov    %cl,-0x30(%rbp,%rax,1)
mov    -0x48(%rbp),%rdi
call   1060 <fgetc@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    0x2a90(%rip),%rcx
cmp    (%rcx),%eax
jne    155d <main+0x39d>
jmp    1935 <main+0x775>
mov    -0x38(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     15a0 <main+0x3e0>
movslq -0x3c(%rbp),%rax
movzbl -0x30(%rbp,%rax,1),%ecx
imul   $0xa,%ecx,%ecx
mov    %cl,-0x30(%rbp,%rax,1)
mov    -0x38(%rbp),%edx
and    $0xf,%edx
movslq -0x3c(%rbp),%rax
movzbl -0x30(%rbp,%rax,1),%ecx
add    %edx,%ecx
mov    %cl,-0x30(%rbp,%rax,1)
mov    -0x48(%rbp),%rdi
call   1060 <fgetc@plt>
mov    %eax,-0x38(%rbp)
jmp    15a5 <main+0x3e5>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
cmpl   $0x3b,-0x38(%rbp)
jne    15bd <main+0x3fd>
jmp    14a3 <main+0x2e3>
mov    -0x38(%rbp),%eax
add    $0xffffffc3,%eax
mov    %eax,%ecx
mov    %rcx,-0x68(%rbp)
sub    $0x30,%eax
ja     1912 <main+0x752>
mov    -0x68(%rbp),%rax
lea    0xa23(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x48(%rbp),%rdi
call   1060 <fgetc@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1610 <main+0x450>
mov    -0x48(%rbp),%rdi
call   1060 <fgetc@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     162e <main+0x46e>
mov    -0x48(%rbp),%rdi
call   1060 <fgetc@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1649 <main+0x489>
mov    -0x48(%rbp),%rdi
call   1060 <fgetc@plt>
jmp    1930 <main+0x770>
movzbl -0x30(%rbp),%eax
cmp    $0x2,%eax
jne    166b <main+0x4ab>
mov    -0x50(%rbp),%rsi
lea    0xb3b(%rip),%rdi
call   1040 <fputs@plt>
jmp    1930 <main+0x770>
mov    -0x50(%rbp),%rsi
lea    0xb29(%rip),%rdi
call   1040 <fputs@plt>
jmp    1930 <main+0x770>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1860 <main+0x6a0>
mov    -0x50(%rbp),%rsi
mov    $0x1,%edi
call   1070 <fputc@plt>
movslq -0x34(%rbp),%rax
movzbl -0x30(%rbp,%rax,1),%eax
mov    %rax,-0x70(%rbp)
sub    $0x2f,%rax
ja     16d1 <main+0x511>
mov    -0x70(%rbp),%rax
lea    0x9fc(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    16d6 <main+0x516>
mov    -0x50(%rbp),%rsi
mov    $0x6e,%edi
call   1070 <fputc@plt>
jmp    184d <main+0x68d>
mov    -0x50(%rbp),%rsi
mov    $0x68,%edi
call   1070 <fputc@plt>
jmp    184d <main+0x68d>
mov    -0x50(%rbp),%rsi
mov    $0x69,%edi
call   1070 <fputc@plt>
jmp    184d <main+0x68d>
mov    -0x50(%rbp),%rsi
mov    $0x65,%edi
call   1070 <fputc@plt>
jmp    184d <main+0x68d>
mov    -0x50(%rbp),%rsi
mov    $0x6b,%edi
call   1070 <fputc@plt>
jmp    184d <main+0x68d>
mov    -0x50(%rbp),%rsi
mov    $0x72,%edi
call   1070 <fputc@plt>
jmp    184d <main+0x68d>
mov    -0x50(%rbp),%rsi
mov    $0x67,%edi
call   1070 <fputc@plt>
jmp    184d <main+0x68d>
mov    -0x50(%rbp),%rsi
mov    $0x79,%edi
call   1070 <fputc@plt>
jmp    184d <main+0x68d>
mov    -0x50(%rbp),%rsi
mov    $0x62,%edi
call   1070 <fputc@plt>
jmp    184d <main+0x68d>
mov    -0x50(%rbp),%rsi
mov    $0x6d,%edi
call   1070 <fputc@plt>
jmp    184d <main+0x68d>
mov    -0x50(%rbp),%rsi
mov    $0x63,%edi
call   1070 <fputc@plt>
jmp    184d <main+0x68d>
mov    -0x50(%rbp),%rsi
mov    $0x77,%edi
call   1070 <fputc@plt>
jmp    184d <main+0x68d>
mov    -0x50(%rbp),%rsi
mov    $0x30,%edi
call   1070 <fputc@plt>
jmp    184d <main+0x68d>
mov    -0x50(%rbp),%rsi
mov    $0x31,%edi
call   1070 <fputc@plt>
jmp    184d <main+0x68d>
mov    -0x50(%rbp),%rsi
mov    $0x32,%edi
call   1070 <fputc@plt>
jmp    184d <main+0x68d>
mov    -0x50(%rbp),%rsi
mov    $0x33,%edi
call   1070 <fputc@plt>
jmp    184d <main+0x68d>
mov    -0x50(%rbp),%rsi
mov    $0x34,%edi
call   1070 <fputc@plt>
jmp    184d <main+0x68d>
mov    -0x50(%rbp),%rsi
mov    $0x35,%edi
call   1070 <fputc@plt>
jmp    184d <main+0x68d>
mov    -0x50(%rbp),%rsi
mov    $0x36,%edi
call   1070 <fputc@plt>
jmp    184d <main+0x68d>
mov    -0x50(%rbp),%rsi
mov    $0x37,%edi
call   1070 <fputc@plt>
jmp    1852 <main+0x692>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    168c <main+0x4cc>
jmp    1930 <main+0x770>
jmp    186a <main+0x6aa>
cmpb   $0x0,-0x30(%rbp)
je     1893 <main+0x6d3>
mov    -0x50(%rbp),%rdi
lea    0x954(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x30(%rbp),%al
add    $0xff,%al
mov    %al,-0x30(%rbp)
jmp    186a <main+0x6aa>
jmp    1930 <main+0x770>
mov    -0x50(%rbp),%rdi
movzbl -0x30(%rbp),%edx
add    $0x7f,%edx
lea    0x8fd(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    1930 <main+0x770>
movzbl -0x30(%rbp),%eax
cmp    $0x50,%eax
jl     18da <main+0x71a>
mov    -0x50(%rbp),%rdi
lea    0x8dd(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    190d <main+0x74d>
jmp    18df <main+0x71f>
cmpb   $0x0,-0x30(%rbp)
je     1908 <main+0x748>
mov    -0x50(%rbp),%rdi
lea    0x8b9(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x30(%rbp),%al
add    $0xff,%al
mov    %al,-0x30(%rbp)
jmp    18df <main+0x71f>
jmp    190d <main+0x74d>
jmp    1930 <main+0x770>
mov    0x26b7(%rip),%rax
movslq (%rax),%rdi
mov    -0x38(%rbp),%edx
mov    -0x38(%rbp),%ecx
lea    0x886(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    1935 <main+0x775>
movb   $0x0,-0x11(%rbp)
jmp    1457 <main+0x297>
cmpl   $0x1b,-0x38(%rbp)
jne    1951 <main+0x791>
movb   $0x1,-0x11(%rbp)
jmp    1961 <main+0x7a1>
movb   $0x0,-0x11(%rbp)
mov    -0x38(%rbp),%edi
mov    -0x50(%rbp),%rsi
call   1070 <fputc@plt>
cmpl   $0x0,-0x54(%rbp)
je     1993 <main+0x7d3>
mov    -0x50(%rbp),%rdi
call   10a0 <ftell@plt>
cltd
idivl  -0x54(%rbp)
cmp    $0x0,%edx
jne    1993 <main+0x7d3>
mov    -0x50(%rbp),%rdi
lea    0x849(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    1457 <main+0x297>
cmpl   $0x0,-0x5c(%rbp)
je     19b4 <main+0x7f4>
mov    -0x50(%rbp),%rdi
lea    0x82b(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
cmp    $0x1,%edi
jg     11e2 <main+0x22>
mov    (%rsi),%rdi
call   10e0 <print_usage@plt>
xor    %ebx,%ebx
jmp    13f2 <main+0x232>
mov    %edi,%ebp
mov    0x2dfd(%rip),%rax
mov    (%rax),%rbx
mov    0x2dd3(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x10(%rsp)
mov    $0x1,%r14d
mov    $0x1,%eax
sub    %edi,%eax
mov    %rax,0x50(%rsp)
xor    %eax,%eax
mov    %rax,0x48(%rsp)
xor    %r15d,%r15d
movl   $0x0,0x4(%rsp)
mov    %rsi,0x8(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r14d,%r12d
movslq %r14d,%rax
lea    (%rsi,%rax,8),%rbx
xor    %r13d,%r13d
mov    0x10(%rsp),%r14
nopl   (%rax)
mov    (%rbx,%r13,8),%rdi
cmpb   $0x2d,(%rdi)
jne    1290 <main+0xd0>
lea    0xf30(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     12e0 <main+0x120>
mov    (%rbx,%r13,8),%rdi
lea    0xf1e(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    1330 <main+0x170>
add    $0x1,%r13
lea    (%r12,%r13,1),%eax
mov    $0x1,%r15d
cmp    %ebp,%eax
jl     1240 <main+0x80>
jmp    139b <main+0x1db>
xchg   %ax,%ax
lea    (%r12,%r13,1),%r14
mov    0x18(%rsp),%rbx
mov    0x2d48(%rip),%rax
cmp    (%rax),%rbx
je     1381 <main+0x1c1>
mov    0x10(%rsp),%rax
mov    0x2d13(%rip),%rcx
cmp    (%rcx),%rax
jne    136a <main+0x1aa>
lea    0xed3(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,0x10(%rsp)
test   %rax,%rax
jne    136a <main+0x1aa>
jmp    1770 <main+0x5b0>
nopl   (%rax)
mov    0x50(%rsp),%rax
add    %r12d,%eax
mov    %r13d,%ecx
add    %eax,%ecx
je     174c <main+0x58c>
lea    0x1(%r12),%eax
cltq
mov    0x8(%rsp),%rcx
lea    (%rcx,%rax,8),%rax
mov    (%rax,%r13,8),%rdi
call   10c0 <atoi@plt>
mov    %eax,0x4(%rsp)
test   %eax,%eax
jle    174c <main+0x58c>
lea    (%r12,%r13,1),%r14
add    $0x1,%r14
jmp    1365 <main+0x1a5>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movslq %r12d,%rax
mov    0x8(%rsp),%rcx
lea    (%rcx,%rax,8),%rax
mov    (%rax,%r13,8),%rdi
lea    0xe47(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    1763 <main+0x5a3>
add    %r13,%r12
mov    $0x1,%eax
mov    %rax,0x48(%rsp)
mov    %r12d,%r14d
mov    0x18(%rsp),%rbx
add    $0x1,%r14d
cmp    %ebp,%r14d
mov    0x8(%rsp),%rsi
jl     1226 <main+0x66>
jmp    1739 <main+0x579>
lea    0xe0d(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     1770 <main+0x5b0>
mov    %rax,%rbx
jmp    136a <main+0x1aa>
mov    0x18(%rsp),%rbx
lea    0xdf4(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10d0 <fwrite@plt>
mov    %rbx,%rdi
call   1050 <fgetc@plt>
mov    0x2c18(%rip),%rcx
cmp    (%rcx),%eax
mov    0x4(%rsp),%ebp
jne    1403 <main+0x243>
xor    %ebx,%ebx
cmpl   $0x0,0x48(%rsp)
je     13f2 <main+0x232>
lea    0xdf0(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10d0 <fwrite@plt>
mov    %ebx,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %r15d,%r15d
jmp    1427 <main+0x267>
mov    %r12,%rbx
nopl   0x0(%rax,%rax,1)
mov    0x4(%rsp),%ebp
mov    %rbx,%rdi
call   1050 <fgetc@plt>
mov    0x2bbd(%rip),%rcx
cmp    (%rcx),%eax
je     13d0 <main+0x210>
test   %r15d,%r15d
je     1590 <main+0x3d0>
cmp    $0x5b,%eax
jne    1590 <main+0x3d0>
lea    0x20(%rsp),%rdi
mov    $0x1,%esi
mov    $0x19,%edx
call   1040 <memset@plt>
xor    %r15d,%r15d
xor    %r13d,%r13d
mov    %rbx,%rdi
call   1050 <fgetc@plt>
mov    %eax,%ebp
mov    0x2b7c(%rip),%rax
cmp    (%rax),%ebp
je     1410 <main+0x250>
mov    %ebp,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     1517 <main+0x357>
and    $0xf,%bpl
mov    %rbx,%rdi
movslq %r13d,%rbx
mov    %bpl,0x20(%rsp,%rbx,1)
mov    %rdi,%r12
call   1050 <fgetc@plt>
mov    %eax,%ebp
mov    0x2b48(%rip),%rax
cmp    (%rax),%ebp
je     1408 <main+0x248>
mov    %ebp,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     1510 <main+0x350>
movzbl 0x20(%rsp,%rbx,1),%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
and    $0xf,%bpl
add    %al,%bpl
mov    %bpl,0x20(%rsp,%rbx,1)
mov    %r12,%rdi
call   1050 <fgetc@plt>
mov    %eax,%ebp
mov    0x2b0d(%rip),%rax
cmp    (%rax),%ebp
je     1408 <main+0x248>
mov    %ebp,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     1510 <main+0x350>
movzbl 0x20(%rsp,%rbx,1),%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
and    $0xf,%bpl
add    %al,%bpl
mov    %bpl,0x20(%rsp,%rbx,1)
mov    %r12,%rbx
mov    %r12,%rdi
call   1050 <fgetc@plt>
mov    %eax,%ebp
jmp    1513 <main+0x353>
nopl   0x0(%rax)
mov    %r12,%rbx
add    $0x1,%r13d
cmp    $0x3b,%ebp
je     1453 <main+0x293>
lea    -0x3d(%rbp),%eax
cmp    $0x30,%eax
ja     16e2 <main+0x522>
lea    0xacd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    %rbx,%rdi
call   1050 <fgetc@plt>
mov    %eax,%ebp
mov    %eax,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     155c <main+0x39c>
mov    %rbx,%rdi
call   1050 <fgetc@plt>
mov    %eax,%ebp
mov    %ebp,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     1572 <main+0x3b2>
mov    %rbx,%rdi
call   1050 <fgetc@plt>
mov    %eax,%ebp
mov    %ebp,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     1410 <main+0x250>
mov    %rbx,%rdi
call   1050 <fgetc@plt>
jmp    1410 <main+0x250>
nop
mov    $0x1,%r15d
cmp    $0x1b,%eax
je     15a8 <main+0x3e8>
mov    %eax,%edi
mov    %r14,%rsi
call   1060 <fputc@plt>
xor    %r15d,%r15d
test   %ebp,%ebp
je     1414 <main+0x254>
mov    %r14,%rdi
call   1090 <ftell@plt>
cltd
idiv   %ebp
test   %edx,%edx
jne    1414 <main+0x254>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xbf9(%rip),%rdi
mov    %r14,%rcx
call   10d0 <fwrite@plt>
jmp    1414 <main+0x254>
cmpb   $0x0,0x20(%rsp)
je     1410 <main+0x250>
mov    0x4(%rsp),%ebp
mov    $0xa,%edi
mov    %r14,%rsi
call   1060 <fputc@plt>
addb   $0xff,0x20(%rsp)
jne    15f0 <main+0x430>
jmp    1414 <main+0x254>
movzbl 0x20(%rsp),%edx
add    $0x7f,%edx
xor    %r15d,%r15d
mov    %r14,%rdi
lea    0xb85(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    1410 <main+0x250>
mov    0x20(%rsp),%al
cmp    $0x4f,%al
jbe    1706 <main+0x546>
mov    $0xd,%edi
mov    %r14,%rsi
call   1060 <fputc@plt>
jmp    1410 <main+0x250>
cmpb   $0x2,0x20(%rsp)
jne    1410 <main+0x250>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xb39(%rip),%rdi
jmp    1677 <main+0x4b7>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xb29(%rip),%rdi
mov    %r14,%rcx
call   10d0 <fwrite@plt>
jmp    1410 <main+0x250>
test   %r13d,%r13d
jle    1410 <main+0x250>
mov    %rbx,%r12
mov    %r13d,%ebx
xor    %ebp,%ebp
jmp    16b5 <main+0x4f5>
nopw   0x0(%rax,%rax,1)
mov    %r14,%rsi
call   1060 <fputc@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
je     1408 <main+0x248>
mov    $0x1,%edi
mov    %r14,%rsi
call   1060 <fputc@plt>
movzbl 0x20(%rsp,%rbp,1),%eax
add    $0xff,%al
mov    $0x6e,%edi
cmp    $0x2e,%al
ja     16a0 <main+0x4e0>
movsbq %al,%rax
lea    0x9e7(%rip),%rcx
mov    (%rcx,%rax,4),%edi
jmp    16a0 <main+0x4e0>
mov    0x28e7(%rip),%rax
movslq (%rax),%rdi
xor    %r15d,%r15d
lea    0xab1(%rip),%rsi
mov    %ebp,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    1410 <main+0x250>
test   %al,%al
mov    0x4(%rsp),%ebp
je     1414 <main+0x254>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x8,%edi
mov    %r14,%rsi
call   1060 <fputc@plt>
addb   $0xff,0x20(%rsp)
jne    1720 <main+0x560>
jmp    1414 <main+0x254>
test   %r15d,%r15d
mov    0x10(%rsp),%r14
jne    13a0 <main+0x1e0>
jmp    13b9 <main+0x1f9>
mov    0x8(%rsp),%rax
mov    (%rax),%rdi
call   10e0 <print_usage@plt>
mov    $0xffffffff,%ebx
jmp    13f2 <main+0x232>
mov    0x8(%rsp),%rax
mov    (%rax),%rdi
jmp    11d6 <main+0x16>
movslq %r12d,%rax
mov    0x8(%rsp),%rcx
lea    (%rcx,%rax,8),%rax
mov    (%rax,%r13,8),%rdi
call   10b0 <perror@plt>
mov    $0x1,%ebx
jmp    13f2 <main+0x232>

LLVM IR (-O0):
@stdin = global i32* null
@stdout = global i32* null
@.str = [7 x i8] c"-delay\00"
@.str.1 = [7 x i8] c"-clear\00"
@.str.2 = [7 x i8] c"-pause\00"
@.str.3 = [3 x i8] c"rb\00"
@.str.4 = [3 x i8] c"wb\00"
@.str.5 = [5 x i8] c"\01n\01l\00"
@EOF = global i32 0
@.str.6 = [3 x i8] c"\01l\00"
@.str.7 = [3 x i8] c"\01>\00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [4 x i8] c"\01%c\00"
@.str.10 = [2 x i8] c"\0D\00"
@.str.11 = [2 x i8] c"\08\00"
@stderr = global i32 0
@.str.12 = [38 x i8] c"Unsupported ANSI code '%c' (0x%02X)\0D\0A\00"
@.str.13 = [3 x i8] c"\01,\00"
@.str.14 = [3 x i8] c"\01p\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca [25 x 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* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = load i32*, i32** @stdin
store i32* %16, i32** %11
%17 = load i32*, i32** @stdout
store i32* %17, i32** %12
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
%18 = load i32, i32* %4
%19 = icmp slt i32 %18, 2
br i1 %19, label %20, label %25
20: ; preds = %2
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 0
%23 = load i8*, i8** %22
%24 = call i32 @print_usage(i8* %23)
store i32 0, i32* %3
br label %441
25: ; preds = %2
store i32 1, i32* %8
br label %26
26: ; preds = %142, %25
%27 = load i32, i32* %8
%28 = load i32, i32* %4
%29 = icmp slt i32 %27, %28
br i1 %29, label %30, label %145
30: ; preds = %26
%31 = load i8**, i8*** %5
%32 = load i32, i32* %8
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i8*, i8** %31, i64 %33
%35 = load i8*, i8** %34
%36 = getelementptr inbounds i8, i8* %35, i64 0
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 45
br i1 %39, label %40, label %99
40: ; preds = %30
%41 = load i8**, i8*** %5
%42 = load i32, i32* %8
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i8*, i8** %41, i64 %43
%45 = load i8*, i8** %44
%46 = call i64 @strcmp(i8* %45, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %73
48: ; preds = %40
%49 = load i32, i32* %8
%50 = add nsw i32 %49, 1
%51 = load i32, i32* %4
%52 = icmp eq i32 %50, %51
br i1 %52, label %53, label %58
53: ; preds = %48
%54 = load i8**, i8*** %5
%55 = getelementptr inbounds i8*, i8** %54, i64 0
%56 = load i8*, i8** %55
%57 = call i32 @print_usage(i8* %56)
store i32 -1, i32* %3
br label %441
58: ; preds = %48
%59 = load i8**, i8*** %5
%60 = load i32, i32* %8
%61 = add nsw i32 %60, 1
store i32 %61, i32* %8
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i8*, i8** %59, i64 %62
%64 = load i8*, i8** %63
%65 = call i32 @atoi(i8* %64)
store i32 %65, i32* %13
%66 = icmp slt i32 %65, 1
br i1 %66, label %67, label %72
67: ; preds = %58
%68 = load i8**, i8*** %5
%69 = getelementptr inbounds i8*, i8** %68, i64 0
%70 = load i8*, i8** %69
%71 = call i32 @print_usage(i8* %70)
store i32 -1, i32* %3
br label %441
72: ; preds = %58
br label %98
73: ; preds = %40
%74 = load i8**, i8*** %5
%75 = load i32, i32* %8
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds i8*, i8** %74, i64 %76
%78 = load i8*, i8** %77
%79 = call i64 @strcmp(i8* %78, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%80 = icmp eq i64 %79, 0
br i1 %80, label %81, label %82
81: ; preds = %73
store i32 1, i32* %14
br label %97
82: ; preds = %73
%83 = load i8**, i8*** %5
%84 = load i32, i32* %8
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds i8*, i8** %83, i64 %85
%87 = load i8*, i8** %86
%88 = call i64 @strcmp(i8* %87, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%89 = icmp eq i64 %88, 0
br i1 %89, label %90, label %91
90: ; preds = %82
store i32 1, i32* %15
br label %96
91: ; preds = %82
%92 = load i8**, i8*** %5
%93 = getelementptr inbounds i8*, i8** %92, i64 0
%94 = load i8*, i8** %93
%95 = call i32 @print_usage(i8* %94)
store i32 0, i32* %3
br label %441
96: ; preds = %90
br label %97
97: ; preds = %96, %81
br label %98
98: ; preds = %97, %72
br label %141
99: ; preds = %30
%100 = load i32*, i32** %11
%101 = load i32*, i32** @stdin
%102 = icmp eq i32* %100, %101
br i1 %102, label %103, label %119
103: ; preds = %99
%104 = load i8**, i8*** %5
%105 = load i32, i32* %8
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds i8*, i8** %104, i64 %106
%108 = load i8*, i8** %107
%109 = call i32* @fopen(i8* %108, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32* %109, i32** %11
%110 = icmp eq i32* %109, null
br i1 %110, label %111, label %118
111: ; preds = %103
%112 = load i8**, i8*** %5
%113 = load i32, i32* %8
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds i8*, i8** %112, i64 %114
%116 = load i8*, i8** %115
%117 = call i32 @perror(i8* %116)
store i32 1, i32* %3
br label %441
118: ; preds = %103
br label %140
119: ; preds = %99
%120 = load i32*, i32** %12
%121 = load i32*, i32** @stdout
%122 = icmp eq i32* %120, %121
br i1 %122, label %123, label %139
123: ; preds = %119
%124 = load i8**, i8*** %5
%125 = load i32, i32* %8
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds i8*, i8** %124, i64 %126
%128 = load i8*, i8** %127
%129 = call i32* @fopen(i8* %128, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32* %129, i32** %12
%130 = icmp eq i32* %129, null
br i1 %130, label %131, label %138
131: ; preds = %123
%132 = load i8**, i8*** %5
%133 = load i32, i32* %8
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds i8*, i8** %132, i64 %134
%136 = load i8*, i8** %135
%137 = call i32 @perror(i8* %136)
store i32 1, i32* %3
br label %441
138: ; preds = %123
br label %139
139: ; preds = %138, %119
br label %140
140: ; preds = %139, %118
br label %141
141: ; preds = %140, %98
br label %142
142: ; preds = %141
%143 = load i32, i32* %8
%144 = add nsw i32 %143, 1
store i32 %144, i32* %8
br label %26
145: ; preds = %26
%146 = load i32, i32* %14
%147 = icmp ne i32 %146, 0
br i1 %147, label %148, label %151
148: ; preds = %145
%149 = load i32*, i32** %12
%150 = call i32 (i32*, i8*, ...) @fprintf(i32* %149, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %151
151: ; preds = %148, %145
store i8 0, i8* %6
br label %152
152: ; preds = %433, %412, %151
%153 = load i32*, i32** %11
%154 = call i32 @fgetc(i32* %153)
store i32 %154, i32* %9
%155 = load i32, i32* @EOF
%156 = icmp ne i32 %154, %155
br i1 %156, label %157, label %434
157: ; preds = %152
%158 = load i32, i32* %9
%159 = icmp eq i32 %158, 91
br i1 %159, label %160, label %413
160: ; preds = %157
%161 = load i8, i8* %6
%162 = zext i8 %161 to i32
%163 = icmp ne i32 %162, 0
br i1 %163, label %164, label %413
164: ; preds = %160
store i32 0, i32* %10
%165 = getelementptr inbounds [25 x i8], [25 x i8]* %7, i64 0, i64 0
%166 = call i32 @memset(i8* %165, i32 1, i32 25)
br label %167
167: ; preds = %246, %164
%168 = load i32*, i32** %11
%169 = call i32 @fgetc(i32* %168)
store i32 %169, i32* %9
%170 = load i32, i32* @EOF
%171 = icmp ne i32 %169, %170
br i1 %171, label %172, label %412
172: ; preds = %167
%173 = load i32, i32* %9
%174 = call i64 @isdigit(i32 %173)
%175 = icmp ne i64 %174, 0
br i1 %175, label %176, label %243
176: ; preds = %172
%177 = load i32, i32* %9
%178 = and i32 %177, 15
%179 = trunc i32 %178 to i8
%180 = load i32, i32* %10
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds [25 x i8], [25 x i8]* %7, i64 0, i64 %181
store i8 %179, i8* %182
%183 = load i32*, i32** %11
%184 = call i32 @fgetc(i32* %183)
store i32 %184, i32* %9
%185 = load i32, i32* %9
%186 = load i32, i32* @EOF
%187 = icmp eq i32 %185, %186
br i1 %187, label %188, label %189
188: ; preds = %176
br label %412
189: ; preds = %176
%190 = load i32, i32* %9
%191 = call i64 @isdigit(i32 %190)
%192 = icmp ne i64 %191, 0
br i1 %192, label %193, label %240
193: ; preds = %189
%194 = load i32, i32* %10
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds [25 x i8], [25 x i8]* %7, i64 0, i64 %195
%197 = load i8, i8* %196
%198 = zext i8 %197 to i32
%199 = mul nsw i32 %198, 10
%200 = trunc i32 %199 to i8
store i8 %200, i8* %196
%201 = load i32, i32* %9
%202 = and i32 %201, 15
%203 = load i32, i32* %10
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds [25 x i8], [25 x i8]* %7, i64 0, i64 %204
%206 = load i8, i8* %205
%207 = zext i8 %206 to i32
%208 = add nsw i32 %207, %202
%209 = trunc i32 %208 to i8
store i8 %209, i8* %205
%210 = load i32*, i32** %11
%211 = call i32 @fgetc(i32* %210)
store i32 %211, i32* %9
%212 = load i32, i32* %9
%213 = load i32, i32* @EOF
%214 = icmp eq i32 %212, %213
br i1 %214, label %215, label %216
215: ; preds = %193
br label %412
216: ; preds = %193
%217 = load i32, i32* %9
%218 = call i64 @isdigit(i32 %217)
%219 = icmp ne i64 %218, 0
br i1 %219, label %220, label %239
220: ; preds = %216
%221 = load i32, i32* %10
%222 = sext i32 %221 to i64
%223 = getelementptr inbounds [25 x i8], [25 x i8]* %7, i64 0, i64 %222
%224 = load i8, i8* %223
%225 = zext i8 %224 to i32
%226 = mul nsw i32 %225, 10
%227 = trunc i32 %226 to i8
store i8 %227, i8* %223
%228 = load i32, i32* %9
%229 = and i32 %228, 15
%230 = load i32, i32* %10
%231 = sext i32 %230 to i64
%232 = getelementptr inbounds [25 x i8], [25 x i8]* %7, i64 0, i64 %231
%233 = load i8, i8* %232
%234 = zext i8 %233 to i32
%235 = add nsw i32 %234, %229
%236 = trunc i32 %235 to i8
store i8 %236, i8* %232
%237 = load i32*, i32** %11
%238 = call i32 @fgetc(i32* %237)
store i32 %238, i32* %9
br label %239
239: ; preds = %220, %216
br label %240
240: ; preds = %239, %189
%241 = load i32, i32* %10
%242 = add nsw i32 %241, 1
store i32 %242, i32* %10
br label %243
243: ; preds = %240, %172
%244 = load i32, i32* %9
%245 = icmp eq i32 %244, 59
br i1 %245, label %246, label %247
246: ; preds = %243
br label %167
247: ; preds = %243
%248 = load i32, i32* %9
switch i32 %248, label %404 [
i32 61, label %249
i32 63, label %249
i32 74, label %273
i32 75, label %282
i32 109, label %285
i32 66, label %364
i32 67, label %376
i32 68, label %383
]
249: ; preds = %247, %247
%250 = load i32*, i32** %11
%251 = call i32 @fgetc(i32* %250)
store i32 %251, i32* %9
%252 = load i32, i32* %9
%253 = call i64 @isdigit(i32 %252)
%254 = icmp ne i64 %253, 0
br i1 %254, label %255, label %258
255: ; preds = %249
%256 = load i32*, i32** %11
%257 = call i32 @fgetc(i32* %256)
store i32 %257, i32* %9
br label %258
258: ; preds = %255, %249
%259 = load i32, i32* %9
%260 = call i64 @isdigit(i32 %259)
%261 = icmp ne i64 %260, 0
br i1 %261, label %262, label %265
262: ; preds = %258
%263 = load i32*, i32** %11
%264 = call i32 @fgetc(i32* %263)
store i32 %264, i32* %9
br label %265
265: ; preds = %262, %258
%266 = load i32, i32* %9
%267 = call i64 @isdigit(i32 %266)
%268 = icmp ne i64 %267, 0
br i1 %268, label %269, label %272
269: ; preds = %265
%270 = load i32*, i32** %11
%271 = call i32 @fgetc(i32* %270)
br label %272
272: ; preds = %269, %265
br label %411
273: ; preds = %247
%274 = getelementptr inbounds [25 x i8], [25 x i8]* %7, i64 0, i64 0
%275 = load i8, i8* %274
%276 = zext i8 %275 to i32
%277 = icmp eq i32 %276, 2
br i1 %277, label %278, label %281
278: ; preds = %273
%279 = load i32*, i32** %12
%280 = call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %279)
br label %281
281: ; preds = %278, %273
br label %411
282: ; preds = %247
%283 = load i32*, i32** %12
%284 = call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %283)
br label %411
285: ; preds = %247
store i32 0, i32* %8
br label %286
286: ; preds = %360, %285
%287 = load i32, i32* %8
%288 = load i32, i32* %10
%289 = icmp slt i32 %287, %288
br i1 %289, label %290, label %363
290: ; preds = %286
%291 = load i32*, i32** %12
%292 = call i32 @fputc(i32 1, i32* %291)
%293 = load i32, i32* %8
%294 = sext i32 %293 to i64
%295 = getelementptr inbounds [25 x i8], [25 x i8]* %7, i64 0, i64 %294
%296 = load i8, i8* %295
%297 = zext i8 %296 to i32
switch i32 %297, label %298 [
i32 0, label %299
i32 2, label %299
i32 1, label %302
i32 3, label %305
i32 4, label %305
i32 5, label %305
i32 6, label %305
i32 7, label %305
i32 8, label %308
i32 30, label %311
i32 31, label %314
i32 32, label %317
i32 33, label %320
i32 34, label %323
i32 35, label %326
i32 36, label %329
i32 37, label %332
i32 40, label %335
i32 41, label %338
i32 42, label %341
i32 43, label %344
i32 44, label %347
i32 45, label %350
i32 46, label %353
i32 47, label %356
]
298: ; preds = %290
br label %299
299: ; preds = %290, %290, %298
%300 = load i32*, i32** %12
%301 = call i32 @fputc(i32 110, i32* %300)
br label %359
302: ; preds = %290
%303 = load i32*, i32** %12
%304 = call i32 @fputc(i32 104, i32* %303)
br label %359
305: ; preds = %290, %290, %290, %290, %290
%306 = load i32*, i32** %12
%307 = call i32 @fputc(i32 105, i32* %306)
br label %359
308: ; preds = %290
%309 = load i32*, i32** %12
%310 = call i32 @fputc(i32 101, i32* %309)
br label %359
311: ; preds = %290
%312 = load i32*, i32** %12
%313 = call i32 @fputc(i32 107, i32* %312)
br label %359
314: ; preds = %290
%315 = load i32*, i32** %12
%316 = call i32 @fputc(i32 114, i32* %315)
br label %359
317: ; preds = %290
%318 = load i32*, i32** %12
%319 = call i32 @fputc(i32 103, i32* %318)
br label %359
320: ; preds = %290
%321 = load i32*, i32** %12
%322 = call i32 @fputc(i32 121, i32* %321)
br label %359
323: ; preds = %290
%324 = load i32*, i32** %12
%325 = call i32 @fputc(i32 98, i32* %324)
br label %359
326: ; preds = %290
%327 = load i32*, i32** %12
%328 = call i32 @fputc(i32 109, i32* %327)
br label %359
329: ; preds = %290
%330 = load i32*, i32** %12
%331 = call i32 @fputc(i32 99, i32* %330)
br label %359
332: ; preds = %290
%333 = load i32*, i32** %12
%334 = call i32 @fputc(i32 119, i32* %333)
br label %359
335: ; preds = %290
%336 = load i32*, i32** %12
%337 = call i32 @fputc(i32 48, i32* %336)
br label %359
338: ; preds = %290
%339 = load i32*, i32** %12
%340 = call i32 @fputc(i32 49, i32* %339)
br label %359
341: ; preds = %290
%342 = load i32*, i32** %12
%343 = call i32 @fputc(i32 50, i32* %342)
br label %359
344: ; preds = %290
%345 = load i32*, i32** %12
%346 = call i32 @fputc(i32 51, i32* %345)
br label %359
347: ; preds = %290
%348 = load i32*, i32** %12
%349 = call i32 @fputc(i32 52, i32* %348)
br label %359
350: ; preds = %290
%351 = load i32*, i32** %12
%352 = call i32 @fputc(i32 53, i32* %351)
br label %359
353: ; preds = %290
%354 = load i32*, i32** %12
%355 = call i32 @fputc(i32 54, i32* %354)
br label %359
356: ; preds = %290
%357 = load i32*, i32** %12
%358 = call i32 @fputc(i32 55, i32* %357)
br label %359
359: ; preds = %356, %353, %350, %347, %344, %341, %338, %335, %332, %329, %326, %323, %320, %317, %314, %311, %308, %305, %302, %299
br label %360
360: ; preds = %359
%361 = load i32, i32* %8
%362 = add nsw i32 %361, 1
store i32 %362, i32* %8
br label %286
363: ; preds = %286
br label %411
364: ; preds = %247
br label %365
365: ; preds = %369, %364
%366 = getelementptr inbounds [25 x i8], [25 x i8]* %7, i64 0, i64 0
%367 = load i8, i8* %366
%368 = icmp ne i8 %367, 0
br i1 %368, label %369, label %375
369: ; preds = %365
%370 = load i32*, i32** %12
%371 = call i32 (i32*, i8*, ...) @fprintf(i32* %370, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%372 = getelementptr inbounds [25 x i8], [25 x i8]* %7, i64 0, i64 0
%373 = load i8, i8* %372
%374 = add i8 %373, -1
store i8 %374, i8* %372
br label %365
375: ; preds = %365
br label %411
376: ; preds = %247
%377 = load i32*, i32** %12
%378 = getelementptr inbounds [25 x i8], [25 x i8]* %7, i64 0, i64 0
%379 = load i8, i8* %378
%380 = zext i8 %379 to i32
%381 = add nsw i32 127, %380
%382 = call i32 (i32*, i8*, ...) @fprintf(i32* %377, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %381)
br label %411
383: ; preds = %247
%384 = getelementptr inbounds [25 x i8], [25 x i8]* %7, i64 0, i64 0
%385 = load i8, i8* %384
%386 = zext i8 %385 to i32
%387 = icmp sge i32 %386, 80
br i1 %387, label %388, label %391
388: ; preds = %383
%389 = load i32*, i32** %12
%390 = call i32 (i32*, i8*, ...) @fprintf(i32* %389, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
br label %403
391: ; preds = %383
br label %392
392: ; preds = %396, %391
%393 = getelementptr inbounds [25 x i8], [25 x i8]* %7, i64 0, i64 0
%394 = load i8, i8* %393
%395 = icmp ne i8 %394, 0
br i1 %395, label %396, label %402
396: ; preds = %392
%397 = load i32*, i32** %12
%398 = call i32 (i32*, i8*, ...) @fprintf(i32* %397, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%399 = getelementptr inbounds [25 x i8], [25 x i8]* %7, i64 0, i64 0
%400 = load i8, i8* %399
%401 = add i8 %400, -1
store i8 %401, i8* %399
br label %392
402: ; preds = %392
br label %403
403: ; preds = %402, %388
br label %411
404: ; preds = %247
%405 = load i32, i32* @stderr
%406 = sext i32 %405 to i64
%407 = inttoptr i64 %406 to i32*
%408 = load i32, i32* %9
%409 = load i32, i32* %9
%410 = call i32 (i32*, i8*, ...) @fprintf(i32* %407, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.12, i64 0, i64 0), i32 %408, i32 %409)
br label %411
411: ; preds = %404, %403, %376, %375, %363, %282, %281, %272
br label %412
412: ; preds = %411, %215, %188, %167
store i8 0, i8* %6
br label %152
413: ; preds = %160, %157
%414 = load i32, i32* %9
%415 = icmp eq i32 %414, 27
br i1 %415, label %416, label %417
416: ; preds = %413
store i8 1, i8* %6
br label %421
417: ; preds = %413
store i8 0, i8* %6
%418 = load i32, i32* %9
%419 = load i32*, i32** %12
%420 = call i32 @fputc(i32 %418, i32* %419)
br label %421
421: ; preds = %417, %416
%422 = load i32, i32* %13
%423 = icmp ne i32 %422, 0
br i1 %423, label %424, label %433
424: ; preds = %421
%425 = load i32*, i32** %12
%426 = call i32 @ftell(i32* %425)
%427 = load i32, i32* %13
%428 = srem i32 %426, %427
%429 = icmp eq i32 %428, 0
br i1 %429, label %430, label %433
430: ; preds = %424
%431 = load i32*, i32** %12
%432 = call i32 (i32*, i8*, ...) @fprintf(i32* %431, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
br label %433
433: ; preds = %430, %424, %421
br label %152
434: ; preds = %152
%435 = load i32, i32* %15
%436 = icmp ne i32 %435, 0
br i1 %436, label %437, label %440
437: ; preds = %434
%438 = load i32*, i32** %12
%439 = call i32 (i32*, i8*, ...) @fprintf(i32* %438, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
br label %440
440: ; preds = %437, %434
store i32 0, i32* %3
br label %441
441: ; preds = %440, %131, %111, %91, %67, %53, %20
%442 = load i32, i32* %3
ret i32 %442
}

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