#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*/ b;
typedef int /*<<< orphan*/ argv2;

/* Variables and functions */
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
char *strchr(char *, char);
int /*<<< orphan*/ strcmp(char *, char *);
int strlen(char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
int main(int argc, char **argv) {
  char b[1024], argv2[1024][1024], *ptr;
  int edit = argc, body = 0, filter = 1, value = 0, print = 0, i, j;
  if (argc > 1) {
    if (!strcmp(argv[1], "-h")) {
      printf("Usage: %s [-bhv] [headers | :] [-e] [new headers] < mail\n",
             argv[0]);
      return 1;
    } else if (!strcmp(argv[1], "-v")) {
      value = 1;
      filter++;
    } else if (!strcmp(argv[1], "-b")) {
      body = 1;
      filter++;
    }
    for (i = filter; i < argc; i++)
      if (!strcmp(argv[i], "-e"))
        edit = i;
    for (i = 0; i < argc; i++) {
      strncpy(argv2[i], argv[i], sizeof(argv2[i]));
      argv2[i][1023] = '\0';
    }
  }
  *b = '\0';
  while (fgets(b, sizeof(b), stdin) && b[0] != '\n') {
    if (b[0] == '\r' || b[0] == '\n')
      break;
    if ((b[0] == ' ' || b[0] == '\t')) {
      if (print)
        fputs(b, stdout);
    } else
      for (i = filter; i < edit && argv[i]; i++)
        if (!strncmp(b, argv[i], strlen(argv[i])) || argv[i][0] == ':') {
          print = 1;
          for (j = edit + 1; !value && j < argc && argv[j]; j++)
            if ((ptr = strchr(argv[j], ':')) &&
                !strncmp(b, argv[j], ptr - argv[j] + 1)) {
              if (ptr[1] != '\0' && argv2[j][0])
                puts(argv[j]);
              argv2[j][0] = '\0';
              print = 0;
              break;
            }
          if (print) {
            if (value && (ptr = strchr(b, ':')))
              ptr += 2;
            else
              ptr = b;
            fputs(ptr, stdout);
          }
          break;
        } else
          print = 0;
  }
  if (!value) {
    for (i = edit + 1; i < argc; i++)
      if (argv2[i][0])
        puts(argv2[i]);
    if (edit < argc)
      puts("");
    if (body)
      while ((body || argc < 2 || edit < argc) && fgets(b, sizeof(b), stdin))
        fputs(b, stdout);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100450,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10041c(%rbp)
movl   $0x0,-0x100420(%rbp)
movl   $0x1,-0x100424(%rbp)
movl   $0x0,-0x100428(%rbp)
movl   $0x0,-0x10042c(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    137b <main+0x1eb>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe0d(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%eax
jne    1220 <main+0x90>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xdf4(%rip),%rdi
call   1080 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1851 <main+0x6c1>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe0e(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%eax
jne    125b <main+0xcb>
movl   $0x1,-0x100428(%rbp)
mov    -0x100424(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100424(%rbp)
jmp    1296 <main+0x106>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdd6(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%eax
jne    1291 <main+0x101>
movl   $0x1,-0x100420(%rbp)
mov    -0x100424(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100424(%rbp)
jmp    1296 <main+0x106>
jmp    129b <main+0x10b>
mov    -0x100424(%rbp),%eax
mov    %eax,-0x100430(%rbp)
mov    -0x100430(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12ff <main+0x16f>
mov    -0x10(%rbp),%rax
movslq -0x100430(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd77(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%eax
jne    12e6 <main+0x156>
mov    -0x100430(%rbp),%eax
mov    %eax,-0x10041c(%rbp)
jmp    12eb <main+0x15b>
mov    -0x100430(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100430(%rbp)
jmp    12a7 <main+0x117>
movl   $0x0,-0x100430(%rbp)
mov    -0x100430(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1376 <main+0x1e6>
movslq -0x100430(%rbp),%rax
lea    -0x100410(%rbp),%rdi
shl    $0xa,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rax
movslq -0x100430(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    $0x400,%edx
call   1030 <strncpy@plt>
movslq -0x100430(%rbp),%rcx
lea    -0x100410(%rbp),%rax
shl    $0xa,%rcx
add    %rcx,%rax
movb   $0x0,0x3ff(%rax)
mov    -0x100430(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100430(%rbp)
jmp    1309 <main+0x179>
jmp    137b <main+0x1eb>
movb   $0x0,-0x410(%rbp)
lea    -0x410(%rbp),%rdi
mov    0x2c58(%rip),%rax
mov    (%rax),%edx
mov    $0x400,%esi
call   10a0 <fgets@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x100435(%rbp)
je     13c4 <main+0x234>
movsbl -0x410(%rbp),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x100435(%rbp)
mov    -0x100435(%rbp),%al
test   $0x1,%al
jne    13d7 <main+0x247>
jmp    1715 <main+0x585>
movsbl -0x410(%rbp),%eax
cmp    $0xd,%eax
je     13f7 <main+0x267>
movsbl -0x410(%rbp),%eax
cmp    $0xa,%eax
jne    13fc <main+0x26c>
jmp    1715 <main+0x585>
movsbl -0x410(%rbp),%eax
cmp    $0x20,%eax
je     141c <main+0x28c>
movsbl -0x410(%rbp),%eax
cmp    $0x9,%eax
jne    1443 <main+0x2b3>
cmpl   $0x0,-0x10042c(%rbp)
je     143e <main+0x2ae>
lea    -0x410(%rbp),%rdi
mov    0x2ba1(%rip),%rax
mov    (%rax),%esi
call   1090 <fputs@plt>
jmp    1710 <main+0x580>
mov    -0x100424(%rbp),%eax
mov    %eax,-0x100430(%rbp)
mov    -0x100430(%rbp),%ecx
xor    %eax,%eax
cmp    -0x10041c(%rbp),%ecx
mov    %al,-0x100436(%rbp)
jge    1482 <main+0x2f2>
mov    -0x10(%rbp),%rax
movslq -0x100430(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
setne  %al
mov    %al,-0x100436(%rbp)
mov    -0x100436(%rbp),%al
test   $0x1,%al
jne    1495 <main+0x305>
jmp    170b <main+0x57b>
lea    -0x410(%rbp),%rax
mov    %rax,-0x100448(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x100430(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x100440(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x100430(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <strlen@plt>
mov    -0x100448(%rbp),%rdi
mov    -0x100440(%rbp),%rsi
mov    %eax,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
je     1506 <main+0x376>
mov    -0x10(%rbp),%rax
movslq -0x100430(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
jne    16e8 <main+0x558>
movl   $0x1,-0x10042c(%rbp)
mov    -0x10041c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100434(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x100428(%rbp)
mov    %al,-0x100449(%rbp)
jne    1564 <main+0x3d4>
mov    -0x100434(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0x100449(%rbp)
jge    1564 <main+0x3d4>
mov    -0x10(%rbp),%rax
movslq -0x100434(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
setne  %al
mov    %al,-0x100449(%rbp)
mov    -0x100449(%rbp),%al
test   $0x1,%al
jne    1577 <main+0x3e7>
jmp    166d <main+0x4dd>
mov    -0x10(%rbp),%rax
movslq -0x100434(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x3a,%esi
call   1070 <strchr@plt>
mov    %rax,-0x100418(%rbp)
cmp    $0x0,%rax
je     1654 <main+0x4c4>
lea    -0x410(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x100434(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x100418(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq -0x100434(%rbp),%rdx
mov    (%rcx,%rdx,8),%rcx
sub    %rcx,%rax
add    $0x1,%rax
mov    %eax,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    1654 <main+0x4c4>
mov    -0x100418(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
je     162d <main+0x49d>
movslq -0x100434(%rbp),%rcx
lea    -0x100410(%rbp),%rax
shl    $0xa,%rcx
add    %rcx,%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     162d <main+0x49d>
mov    -0x10(%rbp),%rax
movslq -0x100434(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <puts@plt>
movslq -0x100434(%rbp),%rcx
lea    -0x100410(%rbp),%rax
shl    $0xa,%rcx
add    %rcx,%rax
movb   $0x0,(%rax)
movl   $0x0,-0x10042c(%rbp)
jmp    166d <main+0x4dd>
jmp    1659 <main+0x4c9>
mov    -0x100434(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100434(%rbp)
jmp    151f <main+0x38f>
cmpl   $0x0,-0x10042c(%rbp)
je     16e3 <main+0x553>
cmpl   $0x0,-0x100428(%rbp)
je     16c0 <main+0x530>
lea    -0x410(%rbp),%rdi
mov    $0x3a,%esi
call   1070 <strchr@plt>
mov    %rax,-0x100418(%rbp)
cmp    $0x0,%rax
je     16c0 <main+0x530>
mov    -0x100418(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x100418(%rbp)
jmp    16ce <main+0x53e>
lea    -0x410(%rbp),%rax
mov    %rax,-0x100418(%rbp)
mov    -0x100418(%rbp),%rdi
mov    0x28fc(%rip),%rax
mov    (%rax),%esi
call   1090 <fputs@plt>
jmp    170b <main+0x57b>
movl   $0x0,-0x10042c(%rbp)
jmp    16f7 <main+0x567>
mov    -0x100430(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100430(%rbp)
jmp    144f <main+0x2bf>
jmp    1710 <main+0x580>
jmp    1382 <main+0x1f2>
cmpl   $0x0,-0x100428(%rbp)
jne    184a <main+0x6ba>
mov    -0x10041c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100430(%rbp)
mov    -0x100430(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1791 <main+0x601>
movslq -0x100430(%rbp),%rcx
lea    -0x100410(%rbp),%rax
shl    $0xa,%rcx
add    %rcx,%rax
cmpb   $0x0,(%rax)
je     1778 <main+0x5e8>
movslq -0x100430(%rbp),%rax
lea    -0x100410(%rbp),%rdi
shl    $0xa,%rax
add    %rax,%rdi
call   1050 <puts@plt>
jmp    177d <main+0x5ed>
mov    -0x100430(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100430(%rbp)
jmp    1731 <main+0x5a1>
mov    -0x10041c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    17ac <main+0x61c>
lea    0x895(%rip),%rdi
call   1050 <puts@plt>
cmpl   $0x0,-0x100420(%rbp)
je     1845 <main+0x6b5>
jmp    17be <main+0x62e>
cmpl   $0x0,-0x100420(%rbp)
jne    17ec <main+0x65c>
cmpl   $0x2,-0x8(%rbp)
jl     17ec <main+0x65c>
mov    -0x10041c(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0x10044a(%rbp)
jge    1813 <main+0x683>
lea    -0x410(%rbp),%rdi
mov    0x27ee(%rip),%rax
mov    (%rax),%edx
mov    $0x400,%esi
call   10a0 <fgets@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x10044a(%rbp)
mov    -0x10044a(%rbp),%al
test   $0x1,%al
jne    1826 <main+0x696>
jmp    1840 <main+0x6b0>
lea    -0x410(%rbp),%rdi
mov    0x27a4(%rip),%rax
mov    (%rax),%esi
call   1090 <fputs@plt>
jmp    17be <main+0x62e>
jmp    1845 <main+0x6b5>
jmp    184a <main+0x6ba>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x100450,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x100458,%rsp
mov    %rsi,%r12
mov    %edi,%r15d
cmp    $0x2,%edi
jl     120f <main+0x6f>
mov    0x8(%r12),%rbp
lea    0xe38(%rip),%rsi
mov    %rbp,%rdi
call   10c0 <strcmp@plt>
test   %eax,%eax
je     122e <main+0x8e>
lea    0xe62(%rip),%rsi
mov    %rbp,%rdi
call   10c0 <strcmp@plt>
test   %eax,%eax
je     1249 <main+0xa9>
lea    0xe52(%rip),%rsi
mov    %rbp,%rdi
call   10c0 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %rcx,0x18(%rsp)
add    $0x1,%ecx
movl   $0x0,0x10(%rsp)
jmp    125d <main+0xbd>
xor    %eax,%eax
mov    %rax,0x18(%rsp)
movl   $0x1,0x14(%rsp)
mov    %r15d,%r13d
movl   $0x0,0x10(%rsp)
jmp    12ed <main+0x14d>
mov    (%r12),%rsi
lea    0xdca(%rip),%rdi
call   1090 <printf@plt>
mov    $0x1,%r14d
jmp    1535 <main+0x395>
movl   $0x1,0x10(%rsp)
mov    $0x2,%ecx
xor    %eax,%eax
mov    %rax,0x18(%rsp)
mov    %r15d,%eax
mov    %r15d,%r15d
mov    %eax,%r13d
mov    %eax,0xc(%rsp)
cmp    %eax,%ecx
mov    %ecx,0x14(%rsp)
jae    12b0 <main+0x110>
mov    %ecx,%ebp
lea    0xdc8(%rip),%r14
mov    0xc(%rsp),%eax
mov    %eax,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r12,%rbp,8),%rdi
mov    %r14,%rsi
call   10c0 <strcmp@plt>
test   %eax,%eax
cmove  %ebp,%r13d
add    $0x1,%rbp
cmp    %rbp,%r15
jne    1290 <main+0xf0>
test   %r15d,%r15d
jle    12e8 <main+0x148>
lea    0x450(%rsp),%rbp
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r12,%rbx,8),%rsi
mov    %rbp,%rdi
mov    $0x400,%edx
call   1040 <strncpy@plt>
movb   $0x0,0x3ff(%rbp)
add    $0x1,%rbx
add    $0x400,%rbp
cmp    %rbx,%r15
jne    12c0 <main+0x120>
mov    0xc(%rsp),%r15d
movb   $0x0,0x50(%rsp)
mov    0x2cef(%rip),%rax
mov    (%rax),%edx
lea    0x50(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
call   10b0 <fgets@plt>
test   %rax,%rax
je     152b <main+0x38b>
mov    0x50(%rsp),%al
cmp    $0xa,%al
je     152b <main+0x38b>
cmp    $0xd,%al
je     152b <main+0x38b>
cmpl   $0x0,0x10(%rsp)
sete   %sil
lea    0x1(%r13),%edx
cmp    %r15d,%edx
setl   %cl
and    %sil,%cl
mov    %cl,0xb(%rsp)
mov    0x14(%rsp),%esi
movslq %edx,%rdx
movslq %r15d,%rcx
mov    %rcx,0x40(%rsp)
mov    %r13d,%ecx
mov    %rcx,0x48(%rsp)
mov    %rsi,%rcx
mov    %rsi,0x38(%rsp)
lea    0x1(%rsi),%rcx
mov    %rcx,0x30(%rsp)
mov    %rdx,0x28(%rsp)
mov    %rdx,%rcx
shl    $0xa,%rcx
add    %rsp,%rcx
add    $0x450,%rcx
mov    %rcx,0x20(%rsp)
xor    %r14d,%r14d
mov    %r15d,0xc(%rsp)
nop
cmp    $0x9,%al
je     1398 <main+0x1f8>
cmp    $0x20,%al
jne    13c0 <main+0x220>
test   %r14d,%r14d
je     1420 <main+0x280>
mov    0x2c30(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   10a0 <fputs@plt>
mov    $0x1,%r14d
jmp    1423 <main+0x283>
nopw   0x0(%rax,%rax,1)
cmp    %r13d,0x14(%rsp)
jge    1423 <main+0x283>
mov    0x38(%rsp),%rax
mov    (%r12,%rax,8),%rbp
mov    0x30(%rsp),%rbx
test   %rbp,%rbp
je     1423 <main+0x283>
nopw   0x0(%rax,%rax,1)
mov    %rbp,%rdi
call   1070 <strlen@plt>
lea    0x50(%rsp),%rdi
mov    %rbp,%rsi
mov    %eax,%edx
call   1050 <strncmp@plt>
test   %eax,%eax
je     1460 <main+0x2c0>
mov    -0x8(%r12,%rbx,8),%rax
cmpb   $0x3a,(%rax)
je     1460 <main+0x2c0>
xor    %r14d,%r14d
cmp    %rbx,0x48(%rsp)
je     1423 <main+0x283>
mov    (%r12,%rbx,8),%rbp
add    $0x1,%rbx
test   %rbp,%rbp
jne    13e0 <main+0x240>
jmp    1423 <main+0x283>
xchg   %ax,%ax
xor    %r14d,%r14d
mov    0x2bbe(%rip),%rax
mov    (%rax),%edx
lea    0x50(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
call   10b0 <fgets@plt>
test   %rax,%rax
je     152b <main+0x38b>
mov    0x50(%rsp),%al
cmp    $0xa,%al
je     152b <main+0x38b>
cmp    $0xd,%al
jne    1390 <main+0x1f0>
jmp    152b <main+0x38b>
cmpb   $0x0,0xb(%rsp)
je     14e6 <main+0x346>
mov    0x20(%rsp),%r14
mov    0x28(%rsp),%r15
jmp    1492 <main+0x2f2>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r15
add    $0x400,%r14
cmp    0x40(%rsp),%r15
jge    14e6 <main+0x346>
mov    (%r12,%r15,8),%rbp
test   %rbp,%rbp
je     14e6 <main+0x346>
mov    %rbp,%rdi
mov    $0x3a,%esi
call   1080 <strchr@plt>
test   %rax,%rax
je     1480 <main+0x2e0>
mov    %rax,%rbx
mov    %ebx,%edx
sub    %ebp,%edx
add    $0x1,%edx
lea    0x50(%rsp),%rdi
mov    %rbp,%rsi
call   1050 <strncmp@plt>
test   %eax,%eax
jne    1480 <main+0x2e0>
cmpb   $0x0,0x1(%rbx)
je     14dd <main+0x33d>
cmpb   $0x0,(%r14)
je     14dd <main+0x33d>
mov    (%r12,%r15,8),%rdi
call   1060 <puts@plt>
movb   $0x0,(%r14)
xor    %r14d,%r14d
jmp    1521 <main+0x381>
lea    0x50(%rsp),%rbx
mov    %rbx,%rdi
cmpl   $0x0,0x10(%rsp)
je     150d <main+0x36d>
mov    %rbx,%rdi
mov    $0x3a,%esi
call   1080 <strchr@plt>
lea    0x2(%rax),%rdi
test   %rax,%rax
cmove  %rbx,%rdi
mov    0x2ac4(%rip),%rax
mov    (%rax),%esi
call   10a0 <fputs@plt>
mov    $0x1,%r14d
mov    0xc(%rsp),%r15d
jmp    1423 <main+0x283>
xor    %r14d,%r14d
cmpl   $0x0,0x10(%rsp)
je     154a <main+0x3aa>
mov    %r14d,%eax
add    $0x100458,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x1(%r13),%eax
cmp    %r15d,%eax
jge    158c <main+0x3ec>
cltq
shl    $0xa,%rax
lea    (%rsp,%rax,1),%rbp
add    $0x450,%rbp
mov    %r13d,%ebx
not    %ebx
add    %r15d,%ebx
jmp    157c <main+0x3dc>
xchg   %ax,%ax
add    $0x400,%rbp
add    $0xffffffff,%ebx
je     158c <main+0x3ec>
cmpb   $0x0,0x0(%rbp)
je     1570 <main+0x3d0>
mov    %rbp,%rdi
call   1060 <puts@plt>
jmp    1570 <main+0x3d0>
cmp    %r15d,%r13d
jge    159b <main+0x3fb>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmpl   $0x0,0x18(%rsp)
mov    0x2a41(%rip),%r15
je     1535 <main+0x395>
mov    (%r15),%edx
lea    0x50(%rsp),%rdi
mov    $0x400,%esi
call   10b0 <fgets@plt>
test   %rax,%rax
je     1535 <main+0x395>
mov    0x2a0d(%rip),%rbx
lea    0x50(%rsp),%rbp
mov    (%rbx),%esi
mov    %rbp,%rdi
call   10a0 <fputs@plt>
mov    (%r15),%edx
mov    %rbp,%rdi
mov    $0x400,%esi
call   10b0 <fgets@plt>
test   %rax,%rax
jne    15d0 <main+0x430>
jmp    1535 <main+0x395>

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

LLVM IR (-O2):
@.str = [3 x i8] c"-h\00"
@.str.1 = [58 x i8] c"Usage: %s [-bhv] [headers | :] [-e] [new headers] < mail\0A\00"
@.str.2 = [3 x i8] c"-v\00"
@.str.3 = [3 x i8] c"-b\00"
@.str.4 = [3 x i8] c"-e\00"
@stdin = global i32 0
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1024 x i8]
%4 = alloca [1024 x [1024 x i8]]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [1024 x [1024 x i8]], [1024 x [1024 x i8]]* %4, i64 0, i64 0, i64 0
%7 = icmp sgt i32 %0, 1
br i1 %7, label %8, label %57
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %8
%14 = load i8*, i8** %1
%15 = tail call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i8* %14)
br label %199
16: ; preds = %8
%17 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %24, label %19
19: ; preds = %16
%20 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
%22 = zext i1 %21 to i32
%23 = select i1 %21, i32 2, i32 1
br label %24
24: ; preds = %19, %16
%25 = phi i32 [ 0, %16 ], [ %22, %19 ]
%26 = phi i32 [ 2, %16 ], [ %23, %19 ]
%27 = phi i32 [ 1, %16 ], [ 0, %19 ]
%28 = icmp ult i32 %26, %0
br i1 %28, label %29, label %34
29: ; preds = %24
%30 = zext i32 %26 to i64
%31 = zext i32 %0 to i64
br label %37
32: ; preds = %37
%33 = icmp sgt i32 %0, 0
br i1 %33, label %34, label %57
34: ; preds = %24, %32
%35 = phi i32 [ %45, %32 ], [ %0, %24 ]
%36 = zext i32 %0 to i64
br label %48
37: ; preds = %29, %37
%38 = phi i64 [ %30, %29 ], [ %46, %37 ]
%39 = phi i32 [ %0, %29 ], [ %45, %37 ]
%40 = getelementptr inbounds i8*, i8** %1, i64 %38
%41 = load i8*, i8** %40
%42 = tail call i32 @strcmp(i8* dereferenceable(1) %41, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%43 = icmp eq i32 %42, 0
%44 = trunc i64 %38 to i32
%45 = select i1 %43, i32 %44, i32 %39
%46 = add nuw nsw i64 %38, 1
%47 = icmp eq i64 %46, %31
br i1 %47, label %32, label %37
48: ; preds = %34, %48
%49 = phi i64 [ 0, %34 ], [ %55, %48 ]
%50 = getelementptr inbounds [1024 x [1024 x i8]], [1024 x [1024 x i8]]* %4, i64 0, i64 %49, i64 0
%51 = getelementptr inbounds i8*, i8** %1, i64 %49
%52 = load i8*, i8** %51
%53 = call i32 @strncpy(i8* %50, i8* %52, i32 1024)
%54 = getelementptr inbounds [1024 x [1024 x i8]], [1024 x [1024 x i8]]* %4, i64 0, i64 %49, i64 1023
store i8 0, i8* %54
%55 = add nuw nsw i64 %49, 1
%56 = icmp eq i64 %55, %36
br i1 %56, label %57, label %48
57: ; preds = %48, %32, %2
%58 = phi i32 [ %0, %2 ], [ %45, %32 ], [ %35, %48 ]
%59 = phi i32 [ 0, %2 ], [ %25, %32 ], [ %25, %48 ]
%60 = phi i32 [ 1, %2 ], [ %26, %32 ], [ %26, %48 ]
%61 = phi i32 [ 0, %2 ], [ %27, %32 ], [ %27, %48 ]
store i8 0, i8* %5
%62 = load i32, i32* @stdin
%63 = call i64 @fgets(i8* %5, i32 1024, i32 %62)
%64 = icmp eq i64 %63, 0
%65 = load i8, i8* %5
%66 = icmp eq i8 %65, 10
%67 = select i1 %64, i1 true, i1 %66
%68 = icmp eq i8 %65, 13
%69 = select i1 %67, i1 true, i1 %68
br i1 %69, label %165, label %70
70: ; preds = %57
%71 = icmp slt i32 %60, %58
%72 = icmp eq i32 %61, 0
%73 = add i32 %58, 1
%74 = icmp slt i32 %73, %0
%75 = select i1 %72, i1 %74, i1 false
%76 = zext i32 %60 to i64
%77 = sext i32 %73 to i64
%78 = sext i32 %0 to i64
%79 = zext i32 %58 to i64
%80 = getelementptr inbounds i8*, i8** %1, i64 %76
br label %81
81: ; preds = %70, %155
%82 = phi i8 [ %65, %70 ], [ %160, %155 ]
%83 = phi i32 [ 0, %70 ], [ %156, %155 ]
switch i8 %82, label %84 [
i8 32, label %88
i8 9, label %88
]
84: ; preds = %81
br i1 %71, label %85, label %155
85: ; preds = %84
%86 = load i8*, i8** %80
%87 = icmp eq i8* %86, null
br i1 %87, label %155, label %99
88: ; preds = %81, %81
%89 = icmp eq i32 %83, 0
br i1 %89, label %155, label %90
90: ; preds = %88
%91 = load i32, i32* @stdout
%92 = call i32 @fputs(i8* %5, i32 %91)
br label %155
93: ; preds = %106
%94 = icmp eq i64 %110, %79
br i1 %94, label %155, label %95
95: ; preds = %93
%96 = getelementptr inbounds i8*, i8** %1, i64 %110
%97 = load i8*, i8** %96
%98 = icmp eq i8* %97, null
br i1 %98, label %155, label %99
99: ; preds = %85, %95
%100 = phi i8* [ %97, %95 ], [ %86, %85 ]
%101 = phi i8** [ %96, %95 ], [ %80, %85 ]
%102 = phi i64 [ %110, %95 ], [ %76, %85 ]
%103 = call i32 @strlen(i8* %100)
%104 = call i32 @strncmp(i8* %5, i8* %100, i32 %103)
%105 = icmp eq i32 %104, 0
br i1 %105, label %111, label %106
106: ; preds = %99
%107 = load i8*, i8** %101
%108 = load i8, i8* %107
%109 = icmp eq i8 %108, 58
%110 = add nuw nsw i64 %102, 1
br i1 %109, label %111, label %93
111: ; preds = %106, %99
br i1 %75, label %112, label %145
112: ; preds = %111, %142
%113 = phi i64 [ %143, %142 ], [ %77, %111 ]
%114 = getelementptr inbounds i8*, i8** %1, i64 %113
%115 = load i8*, i8** %114
%116 = icmp eq i8* %115, null
br i1 %116, label %145, label %117
117: ; preds = %112
%118 = call i8* @strchr(i8* %115, i8 signext 58)
%119 = icmp eq i8* %118, null
br i1 %119, label %142, label %120
120: ; preds = %117
%121 = ptrtoint i8* %118 to i64
%122 = ptrtoint i8* %115 to i64
%123 = sub i64 %121, %122
%124 = trunc i64 %123 to i32
%125 = add i32 %124, 1
%126 = call i32 @strncmp(i8* %5, i8* %115, i32 %125)
%127 = icmp eq i32 %126, 0
br i1 %127, label %128, label %142
128: ; preds = %120
%129 = getelementptr inbounds i8*, i8** %1, i64 %113
%130 = getelementptr inbounds i8, i8* %118, i64 1
%131 = load i8, i8* %130
%132 = icmp eq i8 %131, 0
br i1 %132, label %140, label %133
133: ; preds = %128
%134 = getelementptr inbounds [1024 x [1024 x i8]], [1024 x [1024 x i8]]* %4, i64 0, i64 %113, i64 0
%135 = load i8, i8* %134
%136 = icmp eq i8 %135, 0
br i1 %136, label %140, label %137
137: ; preds = %133
%138 = load i8*, i8** %129
%139 = call i32 @puts(i8* dereferenceable(1) %138)
br label %140
140: ; preds = %137, %133, %128
%141 = getelementptr inbounds [1024 x [1024 x i8]], [1024 x [1024 x i8]]* %4, i64 0, i64 %113, i64 0
store i8 0, i8* %141
br label %155
142: ; preds = %117, %120
%143 = add nsw i64 %113, 1
%144 = icmp slt i64 %143, %78
br i1 %144, label %112, label %145
145: ; preds = %112, %142, %111
br i1 %72, label %151, label %146
146: ; preds = %145
%147 = call i8* @strchr(i8* %5, i8 signext 58)
%148 = icmp eq i8* %147, null
%149 = getelementptr inbounds i8, i8* %147, i64 2
%150 = select i1 %148, i8* %5, i8* %149
br label %151
151: ; preds = %146, %145
%152 = phi i8* [ %5, %145 ], [ %150, %146 ]
%153 = load i32, i32* @stdout
%154 = call i32 @fputs(i8* %152, i32 %153)
br label %155
155: ; preds = %95, %93, %85, %84, %140, %151, %88, %90
%156 = phi i32 [ 1, %90 ], [ 0, %88 ], [ 1, %151 ], [ 0, %140 ], [ %83, %84 ], [ %83, %85 ], [ 0, %93 ], [ 0, %95 ]
%157 = load i32, i32* @stdin
%158 = call i64 @fgets(i8* %5, i32 1024, i32 %157)
%159 = icmp eq i64 %158, 0
%160 = load i8, i8* %5
%161 = icmp eq i8 %160, 10
%162 = select i1 %159, i1 true, i1 %161
%163 = icmp eq i8 %160, 13
%164 = select i1 %162, i1 true, i1 %163
br i1 %164, label %165, label %81
165: ; preds = %155, %57
%166 = icmp eq i32 %61, 0
br i1 %166, label %167, label %199
167: ; preds = %165
%168 = add i32 %58, 1
%169 = icmp slt i32 %168, %0
br i1 %169, label %170, label %183
170: ; preds = %167
%171 = sext i32 %168 to i64
br label %172
172: ; preds = %170, %179
%173 = phi i64 [ %171, %170 ], [ %180, %179 ]
%174 = getelementptr inbounds [1024 x [1024 x i8]], [1024 x [1024 x i8]]* %4, i64 0, i64 %173, i64 0
%175 = load i8, i8* %174
%176 = icmp eq i8 %175, 0
br i1 %176, label %179, label %177
177: ; preds = %172
%178 = call i32 @puts(i8* %174)
br label %179
179: ; preds = %172, %177
%180 = add nsw i64 %173, 1
%181 = trunc i64 %180 to i32
%182 = icmp eq i32 %181, %0
br i1 %182, label %183, label %172
183: ; preds = %179, %167
%184 = icmp slt i32 %58, %0
br i1 %184, label %185, label %187
185: ; preds = %183
%186 = call i32 @putchar(i32 10)
br label %187
187: ; preds = %185, %183
%188 = icmp eq i32 %59, 0
br i1 %188, label %199, label %189
189: ; preds = %187
%190 = load i32, i32* @stdin
%191 = call i64 @fgets(i8* %5, i32 1024, i32 %190)
%192 = icmp eq i64 %191, 0
br i1 %192, label %199, label %193
193: ; preds = %189, %193
%194 = load i32, i32* @stdout
%195 = call i32 @fputs(i8* %5, i32 %194)
%196 = load i32, i32* @stdin
%197 = call i64 @fgets(i8* %5, i32 1024, i32 %196)
%198 = icmp eq i64 %197, 0
br i1 %198, label %199, label %193
199: ; preds = %193, %189, %165, %187, %13
%200 = phi i32 [ 1, %13 ], [ 0, %187 ], [ 0, %165 ], [ 0, %189 ], [ 0, %193 ]
ret i32 %200
}