#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 */

/* Variables and functions */
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ memset(char *, char, int);
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, filter = 1, value = 0, print = 0, i, j;
  if (argc > 1) {
    if (!strcmp(argv[1], "-h")) {
      printf("Usage: %s [-hv] [headers | :] [-e] [new headers] < mail\n",
             argv[0]);
      return 1;
    } else if (!strcmp(argv[1], "-v")) {
      value = 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], 1023);
      argv2[i][1023] = '\0';
    }
  }
  memset(b, '\0', 1024);
  while (fgets(b, 1023, stdin) && b[0] != '\n')
    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("");
    while ((argc < 2 || edit < argc) && fgets(b, 1023, 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   $0x1,-0x100420(%rbp)
movl   $0x0,-0x100424(%rbp)
movl   $0x0,-0x100428(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1341 <main+0x1a1>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe07(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    1226 <main+0x86>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xdee(%rip),%rdi
call   1080 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    17df <main+0x63f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe07(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    125c <main+0xbc>
movl   $0x1,-0x100424(%rbp)
mov    -0x100420(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100420(%rbp)
jmp    1261 <main+0xc1>
mov    -0x100420(%rbp),%eax
mov    %eax,-0x10042c(%rbp)
mov    -0x10042c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12c5 <main+0x125>
mov    -0x10(%rbp),%rax
movslq -0x10042c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdad(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    12ac <main+0x10c>
mov    -0x10042c(%rbp),%eax
mov    %eax,-0x10041c(%rbp)
jmp    12b1 <main+0x111>
mov    -0x10042c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10042c(%rbp)
jmp    126d <main+0xcd>
movl   $0x0,-0x10042c(%rbp)
mov    -0x10042c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    133c <main+0x19c>
movslq -0x10042c(%rbp),%rax
lea    -0x100410(%rbp),%rdi
shl    $0xa,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rax
movslq -0x10042c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    $0x3ff,%edx
call   1030 <strncpy@plt>
movslq -0x10042c(%rbp),%rcx
lea    -0x100410(%rbp),%rax
shl    $0xa,%rcx
add    %rcx,%rax
movb   $0x0,0x3ff(%rax)
mov    -0x10042c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10042c(%rbp)
jmp    12cf <main+0x12f>
jmp    1341 <main+0x1a1>
lea    -0x410(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   10a0 <memset@plt>
lea    -0x410(%rbp),%rdi
mov    0x2c86(%rip),%rax
mov    (%rax),%edx
mov    $0x3ff,%esi
call   10b0 <fgets@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x100431(%rbp)
je     1396 <main+0x1f6>
movsbl -0x410(%rbp),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x100431(%rbp)
mov    -0x100431(%rbp),%al
test   $0x1,%al
jne    13a9 <main+0x209>
jmp    16c2 <main+0x522>
movsbl -0x410(%rbp),%eax
cmp    $0x20,%eax
je     13c9 <main+0x229>
movsbl -0x410(%rbp),%eax
cmp    $0x9,%eax
jne    13f0 <main+0x250>
cmpl   $0x0,-0x100428(%rbp)
je     13eb <main+0x24b>
lea    -0x410(%rbp),%rdi
mov    0x2bf4(%rip),%rax
mov    (%rax),%esi
call   1090 <fputs@plt>
jmp    16bd <main+0x51d>
mov    -0x100420(%rbp),%eax
mov    %eax,-0x10042c(%rbp)
mov    -0x10042c(%rbp),%ecx
xor    %eax,%eax
cmp    -0x10041c(%rbp),%ecx
mov    %al,-0x100432(%rbp)
jge    142f <main+0x28f>
mov    -0x10(%rbp),%rax
movslq -0x10042c(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
setne  %al
mov    %al,-0x100432(%rbp)
mov    -0x100432(%rbp),%al
test   $0x1,%al
jne    1442 <main+0x2a2>
jmp    16b8 <main+0x518>
lea    -0x410(%rbp),%rax
mov    %rax,-0x100448(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x10042c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x100440(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x10042c(%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     14b3 <main+0x313>
mov    -0x10(%rbp),%rax
movslq -0x10042c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
jne    1695 <main+0x4f5>
movl   $0x1,-0x100428(%rbp)
mov    -0x10041c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100430(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x100424(%rbp)
mov    %al,-0x100449(%rbp)
jne    1511 <main+0x371>
mov    -0x100430(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0x100449(%rbp)
jge    1511 <main+0x371>
mov    -0x10(%rbp),%rax
movslq -0x100430(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
setne  %al
mov    %al,-0x100449(%rbp)
mov    -0x100449(%rbp),%al
test   $0x1,%al
jne    1524 <main+0x384>
jmp    161a <main+0x47a>
mov    -0x10(%rbp),%rax
movslq -0x100430(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x3a,%esi
call   1070 <strchr@plt>
mov    %rax,-0x100418(%rbp)
cmp    $0x0,%rax
je     1601 <main+0x461>
lea    -0x410(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x100430(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x100418(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq -0x100430(%rbp),%rdx
mov    (%rcx,%rdx,8),%rcx
sub    %rcx,%rax
add    $0x1,%rax
mov    %eax,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    1601 <main+0x461>
mov    -0x100418(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
je     15da <main+0x43a>
movslq -0x100430(%rbp),%rcx
lea    -0x100410(%rbp),%rax
shl    $0xa,%rcx
add    %rcx,%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     15da <main+0x43a>
mov    -0x10(%rbp),%rax
movslq -0x100430(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <puts@plt>
movslq -0x100430(%rbp),%rcx
lea    -0x100410(%rbp),%rax
shl    $0xa,%rcx
add    %rcx,%rax
movb   $0x0,(%rax)
movl   $0x0,-0x100428(%rbp)
jmp    161a <main+0x47a>
jmp    1606 <main+0x466>
mov    -0x100430(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100430(%rbp)
jmp    14cc <main+0x32c>
cmpl   $0x0,-0x100428(%rbp)
je     1690 <main+0x4f0>
cmpl   $0x0,-0x100424(%rbp)
je     166d <main+0x4cd>
lea    -0x410(%rbp),%rdi
mov    $0x3a,%esi
call   1070 <strchr@plt>
mov    %rax,-0x100418(%rbp)
cmp    $0x0,%rax
je     166d <main+0x4cd>
mov    -0x100418(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x100418(%rbp)
jmp    167b <main+0x4db>
lea    -0x410(%rbp),%rax
mov    %rax,-0x100418(%rbp)
mov    -0x100418(%rbp),%rdi
mov    0x294f(%rip),%rax
mov    (%rax),%esi
call   1090 <fputs@plt>
jmp    16b8 <main+0x518>
movl   $0x0,-0x100428(%rbp)
jmp    16a4 <main+0x504>
mov    -0x10042c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10042c(%rbp)
jmp    13fc <main+0x25c>
jmp    16bd <main+0x51d>
jmp    1354 <main+0x1b4>
cmpl   $0x0,-0x100424(%rbp)
jne    17d8 <main+0x638>
mov    -0x10041c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10042c(%rbp)
mov    -0x10042c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    173e <main+0x59e>
movslq -0x10042c(%rbp),%rcx
lea    -0x100410(%rbp),%rax
shl    $0xa,%rcx
add    %rcx,%rax
cmpb   $0x0,(%rax)
je     1725 <main+0x585>
movslq -0x10042c(%rbp),%rax
lea    -0x100410(%rbp),%rdi
shl    $0xa,%rax
add    %rax,%rdi
call   1050 <puts@plt>
jmp    172a <main+0x58a>
mov    -0x10042c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10042c(%rbp)
jmp    16de <main+0x53e>
mov    -0x10041c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1759 <main+0x5b9>
lea    0x8e7(%rip),%rdi
call   1050 <puts@plt>
jmp    175e <main+0x5be>
cmpl   $0x2,-0x8(%rbp)
jl     177f <main+0x5df>
mov    -0x10041c(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0x10044a(%rbp)
jge    17a6 <main+0x606>
lea    -0x410(%rbp),%rdi
mov    0x285b(%rip),%rax
mov    (%rax),%edx
mov    $0x3ff,%esi
call   10b0 <fgets@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x10044a(%rbp)
mov    -0x10044a(%rbp),%al
test   $0x1,%al
jne    17b9 <main+0x619>
jmp    17d3 <main+0x633>
lea    -0x410(%rbp),%rdi
mov    0x2811(%rip),%rax
mov    (%rax),%esi
call   1090 <fputs@plt>
jmp    175e <main+0x5be>
jmp    17d8 <main+0x638>
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    $0x100448,%rsp
mov    %rsi,%r13
mov    %edi,%ebx
cmp    $0x2,%edi
jl     128b <main+0xdb>
mov    0x8(%r13),%rbp
lea    0xe26(%rip),%rsi
mov    %rbp,%rdi
call   10d0 <strcmp@plt>
test   %eax,%eax
je     15af <main+0x3ff>
mov    %ebx,%r12d
lea    0xe48(%rip),%rsi
mov    %rbp,%rdi
call   10d0 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,0x8(%rsp)
add    $0x1,%ecx
mov    %ebx,%r14d
mov    %ebx,0x4(%rsp)
mov    %ecx,0xc(%rsp)
cmp    %ebx,%ecx
jae    1251 <main+0xa1>
mov    0xc(%rsp),%ebp
lea    0xe1b(%rip),%r15
mov    0x4(%rsp),%eax
mov    %eax,%r14d
nopl   0x0(%rax,%rax,1)
mov    0x0(%r13,%rbp,8),%rdi
mov    %r15,%rsi
call   10d0 <strcmp@plt>
test   %eax,%eax
cmove  %ebp,%r14d
add    $0x1,%rbp
cmp    %rbp,%r12
jne    1230 <main+0x80>
test   %r12d,%r12d
jle    12a2 <main+0xf2>
lea    0x440(%rsp),%rbp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    0x0(%r13,%rbx,8),%rsi
mov    %rbp,%rdi
mov    $0x3ff,%edx
call   1040 <strncpy@plt>
movb   $0x0,0x3ff(%rbp)
add    $0x1,%rbx
add    $0x400,%rbp
cmp    %rbx,%r12
jne    1260 <main+0xb0>
jmp    12a2 <main+0xf2>
movl   $0x0,0x8(%rsp)
movl   $0x1,0xc(%rsp)
mov    %ebx,0x4(%rsp)
mov    %ebx,%r14d
lea    0x40(%rsp),%rbx
xor    %r12d,%r12d
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   10b0 <memset@plt>
mov    0x2d28(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0x3ff,%esi
call   10c0 <fgets@plt>
test   %rax,%rax
je     14dd <main+0x32d>
mov    0x40(%rsp),%al
cmp    $0xa,%al
je     14dd <main+0x32d>
mov    0x8(%rsp),%ecx
not    %cl
lea    0x1(%r14),%edx
mov    0x4(%rsp),%esi
cmp    %esi,%edx
setl   %bl
and    %cl,%bl
mov    %bl,0x3(%rsp)
mov    0xc(%rsp),%edi
movslq %edx,%rdx
movslq %esi,%rcx
mov    %rcx,0x30(%rsp)
mov    %r14d,%ecx
mov    %rcx,0x38(%rsp)
mov    %rdi,%rcx
mov    %rdi,0x28(%rsp)
lea    0x1(%rdi),%rcx
mov    %rcx,0x20(%rsp)
mov    %rdx,0x18(%rsp)
mov    %rdx,%rcx
shl    $0xa,%rcx
add    %rsp,%rcx
add    $0x440,%rcx
mov    %rcx,0x10(%rsp)
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    $0x9,%al
je     1358 <main+0x1a8>
cmp    $0x20,%al
jne    1380 <main+0x1d0>
test   %r15d,%r15d
je     13e0 <main+0x230>
mov    0x2c70(%rip),%rax
mov    (%rax),%esi
lea    0x40(%rsp),%rdi
call   10a0 <fputs@plt>
mov    $0x1,%r15d
jmp    13e3 <main+0x233>
nopl   0x0(%rax)
cmp    %r14d,0xc(%rsp)
jge    13e3 <main+0x233>
mov    0x28(%rsp),%rax
mov    0x0(%r13,%rax,8),%rbp
mov    0x20(%rsp),%rbx
test   %rbp,%rbp
je     13e3 <main+0x233>
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
call   1070 <strlen@plt>
lea    0x40(%rsp),%rdi
mov    %rbp,%rsi
mov    %eax,%edx
call   1050 <strncmp@plt>
test   %eax,%eax
je     1415 <main+0x265>
mov    -0x8(%r13,%rbx,8),%rax
cmpb   $0x3a,(%rax)
je     1415 <main+0x265>
xor    %r15d,%r15d
cmp    %rbx,0x38(%rsp)
je     13e3 <main+0x233>
mov    0x0(%r13,%rbx,8),%rbp
add    $0x1,%rbx
test   %rbp,%rbp
jne    13a0 <main+0x1f0>
jmp    13e3 <main+0x233>
nop
xor    %r15d,%r15d
mov    0x2bfe(%rip),%rax
mov    (%rax),%edx
lea    0x40(%rsp),%rdi
mov    $0x3ff,%esi
call   10c0 <fgets@plt>
test   %rax,%rax
je     14dd <main+0x32d>
mov    0x40(%rsp),%al
cmp    $0xa,%al
jne    1350 <main+0x1a0>
jmp    14dd <main+0x32d>
cmpb   $0x0,0x3(%rsp)
je     1498 <main+0x2e8>
mov    0x10(%rsp),%r15
mov    0x18(%rsp),%r12
jmp    1442 <main+0x292>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r12
add    $0x400,%r15
cmp    0x30(%rsp),%r12
jge    1498 <main+0x2e8>
mov    0x0(%r13,%r12,8),%rbp
test   %rbp,%rbp
je     1498 <main+0x2e8>
mov    %rbp,%rdi
mov    $0x3a,%esi
call   1080 <strchr@plt>
test   %rax,%rax
je     1430 <main+0x280>
mov    %rax,%rbx
mov    %ebx,%edx
sub    %ebp,%edx
add    $0x1,%edx
lea    0x40(%rsp),%rdi
mov    %rbp,%rsi
call   1050 <strncmp@plt>
test   %eax,%eax
jne    1430 <main+0x280>
cmpb   $0x0,0x1(%rbx)
je     148f <main+0x2df>
cmpb   $0x0,(%r15)
je     148f <main+0x2df>
mov    0x0(%r13,%r12,8),%rdi
call   1060 <puts@plt>
movb   $0x0,(%r15)
xor    %r15d,%r15d
jmp    14d5 <main+0x325>
lea    0x40(%rsp),%rdi
cmpb   $0x0,0x8(%rsp)
je     14c1 <main+0x311>
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x3a,%esi
call   1080 <strchr@plt>
lea    0x2(%rax),%rdi
test   %rax,%rax
cmove  %rbx,%rdi
mov    0x2b10(%rip),%rax
mov    (%rax),%esi
call   10a0 <fputs@plt>
mov    $0x1,%r15d
xor    %r12d,%r12d
jmp    13e3 <main+0x233>
cmpb   $0x0,0x8(%rsp)
jne    15c5 <main+0x415>
lea    0x1(%r14),%eax
mov    0x4(%rsp),%r15d
cmp    %r15d,%eax
jge    153b <main+0x38b>
cltq
shl    $0xa,%rax
lea    (%rsp,%rax,1),%rbx
add    $0x440,%rbx
mov    %r14d,%ebp
not    %ebp
add    %r15d,%ebp
jmp    152c <main+0x37c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x400,%rbx
add    $0xffffffff,%ebp
je     153b <main+0x38b>
cmpb   $0x0,(%rbx)
je     1520 <main+0x370>
mov    %rbx,%rdi
call   1060 <puts@plt>
jmp    1520 <main+0x370>
cmp    %r15d,%r14d
jge    15a2 <main+0x3f2>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2a97(%rip),%r14
mov    (%r14),%edx
lea    0x40(%rsp),%rdi
mov    $0x3ff,%esi
call   10c0 <fgets@plt>
test   %rax,%rax
je     15c5 <main+0x415>
mov    0x2a69(%rip),%rbp
lea    0x40(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x0(%rbp),%esi
mov    %rbx,%rdi
call   10a0 <fputs@plt>
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x3ff,%esi
call   10c0 <fgets@plt>
test   %rax,%rax
jne    1580 <main+0x3d0>
jmp    15c5 <main+0x415>
cmp    $0x2,%r15d
jl     154a <main+0x39a>
cmp    %r15d,%r14d
jge    15c5 <main+0x415>
jmp    154a <main+0x39a>
mov    0x0(%r13),%rsi
lea    0xa49(%rip),%rdi
call   1090 <printf@plt>
mov    $0x1,%r12d
mov    %r12d,%eax
add    $0x100448,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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