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

/* Variables and functions */
int EOF;
int /*<<< orphan*/ exit(int);
scalar_t__ fclose(int /*<<< orphan*/ *);
scalar_t__ ferror(int /*<<< orphan*/ *);
char *fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putc(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ *stdout;
int main(int argc, char *argv[]) {
  char infilenamebuffer[1000];
  char outfilenamebuffer[1000] = "stdout";
  FILE *infile;
  FILE *outfile;
  if (argc == 3) {
    {
      char *p1 = argv[1];
      char *p2 = infilenamebuffer;
      while ((*p2++ = *p1++) != '\0')
        ;
    }
    {
      char *p1 = argv[2];
      char *p2 = outfilenamebuffer;
      while ((*p2++ = *p1++) != '\0')
        ;
    }
  } else {
    char filenamebuffer[1000];
    char *filename;
    if (argc == 2) {
      filename = argv[1];
    } else {
      printf("Filename: ");
      filename = fgets(filenamebuffer, sizeof(filenamebuffer), stdin);
      if (filename == NULL) {
        exit(57);
      }
    }
    {
      char *p = infilenamebuffer;
      {
        char *p2 = filename;
        char c;
        while ((c = *p2++) != '\0') {
          *p++ = c;
        }
      }
      if ((&p[-2] >= infilenamebuffer) && (p[-2] == '.') && (p[-1] == 'd')) {
        *p++ = '\0';
        goto to_stdout;
      }
      *p++ = '.';
      *p++ = 'd';
      *p++ = '\0';
    }
    {
      char *p = outfilenamebuffer;
      {
        char *p2 = filename;
        char c;
        while ((c = *p2++) != '\0') {
          *p++ = c;
        }
      }
      *p++ = '.';
      *p++ = 'c';
      *p++ = '\0';
    }
  }
  if ((infile = fopen(infilenamebuffer, "r")) == NULL) {
    perror(infilenamebuffer);
    exit(80);
  }
  if ((outfile = fopen(outfilenamebuffer, "w")) == NULL) {
    fclose(infile);
    perror(outfilenamebuffer);
    exit(82);
  }
  if (0) {
  to_stdout:
    if ((infile = fopen(infilenamebuffer, "r")) == NULL) {
      perror(infilenamebuffer);
      exit(86);
    }
    outfile = stdout;
  }
  {
    fputs("#line 1 \"", outfile);
    fputs(infilenamebuffer, outfile);
    fputs("\"\n", outfile);
  }
  {
    register int c;
  L1:
    c = getc(infile);
  L1a:
    if (c == EOF) {
      goto L3;
    }
    if (!(c == '#'))
      goto L4a;
    c = getc(infile);
    if (!(c == ' ')) {
      putc('#', outfile);
      goto L1a;
    }
    {
      putc('/', outfile);
      putc('*', outfile);
      putc(' ', outfile);
    };
  L2:
    c = getc(infile);
  L2a:
    if (c == EOF) {
      {
        putc(' ', outfile);
        putc('*', outfile);
        putc('/', outfile);
      };
      goto L3;
    }
    if (c == '\n') {
      {
        putc(' ', outfile);
        putc('*', outfile);
        putc('/', outfile);
      };
      putc(c, outfile);
      goto L1;
    }
    if (!(c == '\\')) {
      putc(c, outfile);
      goto L2;
    }
    c = getc(infile);
    if (!(c == '\n')) {
      putc('\\', outfile);
      goto L2a;
    }
    {
      putc(' ', outfile);
      putc('*', outfile);
      putc('/', outfile);
    };
    putc('\\', outfile);
    putc(c, outfile);
    goto L1;
  L4a:
    putc(c, outfile);
    if (!(c == '/')) {
      goto L1;
    }
    c = getc(infile);
    if (c == EOF) {
      goto L3;
    }
    putc(c, outfile);
    if (!(c == '*'))
      goto L1;
  L5:
    c = getc(infile);
  L5a:
    if (c == EOF) {
      goto L3;
    }
    putc(c, outfile);
    if (c == '*')
      goto L6;
    goto L5;
  L6:
    c = getc(infile);
  L6a:
    if (c == EOF) {
      goto L3;
    }
    putc(c, outfile);
    if (c == '/')
      goto L1;
    goto L5;
  L3:;
  }
  if (ferror(infile) || fclose(infile)) {
    perror(infilenamebuffer);
    exit(143);
  }
  if (ferror(outfile) || fclose(outfile)) {
    perror(outfilenamebuffer);
    exit(145);
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x7f0(%rbp),%rdi
xor    %esi,%esi
mov    $0x3e8,%edx
call   1070 <memset@plt>
movb   $0x73,-0x7f0(%rbp)
movb   $0x74,-0x7ef(%rbp)
movb   $0x64,-0x7ee(%rbp)
movb   $0x6f,-0x7ed(%rbp)
movb   $0x75,-0x7ec(%rbp)
movb   $0x74,-0x7eb(%rbp)
cmpl   $0x3,-0x8(%rbp)
jne    12cd <main+0x11d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x808(%rbp)
lea    -0x400(%rbp),%rax
mov    %rax,-0x810(%rbp)
mov    -0x808(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x808(%rbp)
mov    (%rax),%al
mov    -0x810(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x810(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     126c <main+0xbc>
jmp    122d <main+0x7d>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x818(%rbp)
lea    -0x7f0(%rbp),%rax
mov    %rax,-0x820(%rbp)
mov    -0x818(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x818(%rbp)
mov    (%rax),%al
mov    -0x820(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x820(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     12c8 <main+0x118>
jmp    1289 <main+0xd9>
jmp    14f3 <main+0x343>
cmpl   $0x2,-0x8(%rbp)
jne    12eb <main+0x13b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0xc18(%rbp)
jmp    1335 <main+0x185>
lea    0xd0e(%rip),%rdi
call   1050 <printf@plt>
lea    -0xc10(%rbp),%rdi
mov    0x2ce3(%rip),%rax
mov    (%rax),%edx
mov    $0x3e8,%esi
call   1080 <fgets@plt>
mov    %rax,-0xc18(%rbp)
cmpq   $0x0,-0xc18(%rbp)
jne    1330 <main+0x180>
mov    $0x39,%edi
call   10c0 <exit@plt>
jmp    1335 <main+0x185>
lea    -0x400(%rbp),%rax
mov    %rax,-0xc20(%rbp)
mov    -0xc18(%rbp),%rax
mov    %rax,-0xc28(%rbp)
mov    -0xc28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0xc28(%rbp)
mov    (%rax),%al
mov    %al,-0xc29(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     139c <main+0x1ec>
mov    -0xc29(%rbp),%cl
mov    -0xc20(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0xc20(%rbp)
mov    %cl,(%rax)
jmp    1351 <main+0x1a1>
mov    -0xc20(%rbp),%rax
add    $0xfffffffffffffffe,%rax
lea    -0x400(%rbp),%rcx
cmp    %rcx,%rax
jb     13fc <main+0x24c>
mov    -0xc20(%rbp),%rax
movsbl -0x2(%rax),%eax
cmp    $0x2e,%eax
jne    13fc <main+0x24c>
mov    -0xc20(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0x64,%eax
jne    13fc <main+0x24c>
mov    -0xc20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0xc20(%rbp)
movb   $0x0,(%rax)
jmp    1587 <main+0x3d7>
mov    -0xc20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0xc20(%rbp)
movb   $0x2e,(%rax)
mov    -0xc20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0xc20(%rbp)
movb   $0x64,(%rax)
mov    -0xc20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0xc20(%rbp)
movb   $0x0,(%rax)
lea    -0x7f0(%rbp),%rax
mov    %rax,-0xc38(%rbp)
mov    -0xc18(%rbp),%rax
mov    %rax,-0xc40(%rbp)
mov    -0xc40(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0xc40(%rbp)
mov    (%rax),%al
mov    %al,-0xc41(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     14ab <main+0x2fb>
mov    -0xc41(%rbp),%cl
mov    -0xc38(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0xc38(%rbp)
mov    %cl,(%rax)
jmp    1460 <main+0x2b0>
mov    -0xc38(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0xc38(%rbp)
movb   $0x2e,(%rax)
mov    -0xc38(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0xc38(%rbp)
movb   $0x63,(%rax)
mov    -0xc38(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0xc38(%rbp)
movb   $0x0,(%rax)
lea    -0x400(%rbp),%rdi
lea    0xb0a(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x7f8(%rbp)
cmp    $0x0,%rax
jne    152d <main+0x37d>
lea    -0x400(%rbp),%rdi
call   10b0 <perror@plt>
mov    $0x50,%edi
call   10c0 <exit@plt>
lea    -0x7f0(%rbp),%rdi
lea    0xad2(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x800(%rbp)
cmp    $0x0,%rax
jne    1573 <main+0x3c3>
mov    -0x7f8(%rbp),%rdi
call   1040 <fclose@plt>
lea    -0x7f0(%rbp),%rdi
call   10b0 <perror@plt>
mov    $0x52,%edi
call   10c0 <exit@plt>
xor    %eax,%eax
test   $0x1,%al
jne    1582 <main+0x3d2>
jmp    15d2 <main+0x422>
jmp    1587 <main+0x3d7>
lea    -0x400(%rbp),%rdi
lea    0xa76(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x7f8(%rbp)
cmp    $0x0,%rax
jne    15c1 <main+0x411>
lea    -0x400(%rbp),%rdi
call   10b0 <perror@plt>
mov    $0x56,%edi
call   10c0 <exit@plt>
mov    0x2a08(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x800(%rbp)
mov    -0x800(%rbp),%rsi
lea    0xa2f(%rip),%rdi
call   1060 <fputs@plt>
lea    -0x400(%rbp),%rdi
mov    -0x800(%rbp),%rsi
call   1060 <fputs@plt>
mov    -0x800(%rbp),%rsi
lea    0xa13(%rip),%rdi
call   1060 <fputs@plt>
mov    -0x7f8(%rbp),%rdi
call   10d0 <getc@plt>
mov    %eax,-0xc48(%rbp)
mov    -0xc48(%rbp),%eax
mov    0x29b6(%rip),%rcx
cmp    (%rcx),%eax
jne    1637 <main+0x487>
jmp    193e <main+0x78e>
cmpl   $0x23,-0xc48(%rbp)
je     1649 <main+0x499>
jmp    181b <main+0x66b>
mov    -0x7f8(%rbp),%rdi
call   10d0 <getc@plt>
mov    %eax,-0xc48(%rbp)
cmpl   $0x20,-0xc48(%rbp)
je     167e <main+0x4ce>
mov    -0x800(%rbp),%rsi
mov    $0x23,%edi
call   1090 <putc@plt>
jmp    161d <main+0x46d>
mov    -0x800(%rbp),%rsi
mov    $0x2f,%edi
call   1090 <putc@plt>
mov    -0x800(%rbp),%rsi
mov    $0x2a,%edi
call   1090 <putc@plt>
mov    -0x800(%rbp),%rsi
mov    $0x20,%edi
call   1090 <putc@plt>
mov    -0x7f8(%rbp),%rdi
call   10d0 <getc@plt>
mov    %eax,-0xc48(%rbp)
mov    -0xc48(%rbp),%eax
mov    0x2910(%rip),%rcx
cmp    (%rcx),%eax
jne    1710 <main+0x560>
mov    -0x800(%rbp),%rsi
mov    $0x20,%edi
call   1090 <putc@plt>
mov    -0x800(%rbp),%rsi
mov    $0x2a,%edi
call   1090 <putc@plt>
mov    -0x800(%rbp),%rsi
mov    $0x2f,%edi
call   1090 <putc@plt>
jmp    193e <main+0x78e>
cmpl   $0xa,-0xc48(%rbp)
jne    1767 <main+0x5b7>
mov    -0x800(%rbp),%rsi
mov    $0x20,%edi
call   1090 <putc@plt>
mov    -0x800(%rbp),%rsi
mov    $0x2a,%edi
call   1090 <putc@plt>
mov    -0x800(%rbp),%rsi
mov    $0x2f,%edi
call   1090 <putc@plt>
mov    -0xc48(%rbp),%edi
mov    -0x800(%rbp),%rsi
call   1090 <putc@plt>
jmp    160b <main+0x45b>
cmpl   $0x5c,-0xc48(%rbp)
je     178b <main+0x5db>
mov    -0xc48(%rbp),%edi
mov    -0x800(%rbp),%rsi
call   1090 <putc@plt>
jmp    16b1 <main+0x501>
mov    -0x7f8(%rbp),%rdi
call   10d0 <getc@plt>
mov    %eax,-0xc48(%rbp)
cmpl   $0xa,-0xc48(%rbp)
je     17c0 <main+0x610>
mov    -0x800(%rbp),%rsi
mov    $0x5c,%edi
call   1090 <putc@plt>
jmp    16c3 <main+0x513>
mov    -0x800(%rbp),%rsi
mov    $0x20,%edi
call   1090 <putc@plt>
mov    -0x800(%rbp),%rsi
mov    $0x2a,%edi
call   1090 <putc@plt>
mov    -0x800(%rbp),%rsi
mov    $0x2f,%edi
call   1090 <putc@plt>
mov    -0x800(%rbp),%rsi
mov    $0x5c,%edi
call   1090 <putc@plt>
mov    -0xc48(%rbp),%edi
mov    -0x800(%rbp),%rsi
call   1090 <putc@plt>
jmp    160b <main+0x45b>
mov    -0xc48(%rbp),%edi
mov    -0x800(%rbp),%rsi
call   1090 <putc@plt>
cmpl   $0x2f,-0xc48(%rbp)
je     183f <main+0x68f>
jmp    160b <main+0x45b>
mov    -0x7f8(%rbp),%rdi
call   10d0 <getc@plt>
mov    %eax,-0xc48(%rbp)
mov    -0xc48(%rbp),%eax
mov    0x2782(%rip),%rcx
cmp    (%rcx),%eax
jne    186b <main+0x6bb>
jmp    193e <main+0x78e>
mov    -0xc48(%rbp),%edi
mov    -0x800(%rbp),%rsi
call   1090 <putc@plt>
cmpl   $0x2a,-0xc48(%rbp)
je     188f <main+0x6df>
jmp    160b <main+0x45b>
jmp    1894 <main+0x6e4>
mov    -0x7f8(%rbp),%rdi
call   10d0 <getc@plt>
mov    %eax,-0xc48(%rbp)
mov    -0xc48(%rbp),%eax
mov    0x272d(%rip),%rcx
cmp    (%rcx),%eax
jne    18c0 <main+0x710>
jmp    193e <main+0x78e>
mov    -0xc48(%rbp),%edi
mov    -0x800(%rbp),%rsi
call   1090 <putc@plt>
cmpl   $0x2a,-0xc48(%rbp)
jne    18e4 <main+0x734>
jmp    18e9 <main+0x739>
jmp    1894 <main+0x6e4>
mov    -0x7f8(%rbp),%rdi
call   10d0 <getc@plt>
mov    %eax,-0xc48(%rbp)
mov    -0xc48(%rbp),%eax
mov    0x26d8(%rip),%rcx
cmp    (%rcx),%eax
jne    1915 <main+0x765>
jmp    193e <main+0x78e>
mov    -0xc48(%rbp),%edi
mov    -0x800(%rbp),%rsi
call   1090 <putc@plt>
cmpl   $0x2f,-0xc48(%rbp)
jne    1939 <main+0x789>
jmp    160b <main+0x45b>
jmp    1894 <main+0x6e4>
mov    -0x7f8(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
jne    196a <main+0x7ba>
mov    -0x7f8(%rbp),%rdi
call   1040 <fclose@plt>
cmp    $0x0,%rax
je     1980 <main+0x7d0>
lea    -0x400(%rbp),%rdi
call   10b0 <perror@plt>
mov    $0x8f,%edi
call   10c0 <exit@plt>
mov    -0x800(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
jne    19ac <main+0x7fc>
mov    -0x800(%rbp),%rdi
call   1040 <fclose@plt>
cmp    $0x0,%rax
je     19c2 <main+0x812>
lea    -0x7f0(%rbp),%rdi
call   10b0 <perror@plt>
mov    $0x91,%edi
call   10c0 <exit@plt>
xor    %edi,%edi
call   10c0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xbd0,%rsp
mov    %rsi,%r14
mov    %edi,%ebp
lea    0x3f0(%rsp),%rbx
mov    $0x3e8,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1070 <memset@plt>
movl   $0x6f647473,0x3f0(%rsp)
73 74 64 6f
movw   $0x7475,0x3f4(%rsp)
cmp    $0x3,%ebp
jne    1248 <main+0x88>
mov    0x8(%r14),%rax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movzbl (%rax,%rcx,1),%edx
mov    %dl,(%rsp,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1210 <main+0x50>
mov    0x10(%r14),%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rax,%rcx,1),%edx
mov    %dl,0x3f0(%rsp,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1230 <main+0x70>
jmp    132a <main+0x16a>
cmp    $0x2,%ebp
jne    1253 <main+0x93>
mov    0x8(%r14),%rax
jmp    1289 <main+0xc9>
lea    0xda6(%rip),%rdi
call   1050 <printf@plt>
mov    0x2d82(%rip),%rax
mov    (%rax),%edx
lea    0x7e0(%rsp),%rdi
mov    $0x3e8,%esi
call   1080 <fgets@plt>
test   %rax,%rax
jne    1289 <main+0xc9>
mov    $0x39,%edi
call   10c0 <exit@plt>
mov    %rsp,%rsi
mov    (%rax),%dl
mov    %rsi,%rcx
test   %dl,%dl
je     12b1 <main+0xf1>
mov    %rsp,%rcx
lea    0x1(%rax),%rdi
nopl   0x0(%rax)
mov    %dl,(%rcx)
add    $0x1,%rcx
movzbl (%rdi),%edx
add    $0x1,%rdi
test   %dl,%dl
jne    12a0 <main+0xe0>
lea    -0x2(%rcx),%rdx
cmp    %rsi,%rdx
jb     12f2 <main+0x132>
cmpb   $0x2e,(%rdx)
jne    12f2 <main+0x132>
cmpb   $0x64,-0x1(%rcx)
jne    12f2 <main+0x132>
movb   $0x0,(%rcx)
lea    0xd3c(%rip),%rsi
mov    %rsp,%rdi
call   10a0 <fopen@plt>
test   %rax,%rax
jne    1638 <main+0x478>
mov    %rsp,%rdi
call   10b0 <perror@plt>
mov    $0x56,%edi
call   10c0 <exit@plt>
movw   $0x642e,(%rcx)
movb   $0x0,0x2(%rcx)
mov    (%rax),%cl
test   %cl,%cl
je     1321 <main+0x161>
lea    0x3f0(%rsp),%rbx
add    $0x1,%rax
nopl   (%rax)
mov    %cl,(%rbx)
add    $0x1,%rbx
movzbl (%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1310 <main+0x150>
movw   $0x632e,(%rbx)
movb   $0x0,0x2(%rbx)
lea    0xcda(%rip),%rsi
mov    %rsp,%rdi
call   10a0 <fopen@plt>
test   %rax,%rax
jne    1350 <main+0x190>
mov    %rsp,%rdi
call   10b0 <perror@plt>
mov    $0x50,%edi
call   10c0 <exit@plt>
mov    %rax,%r14
lea    0xcb3(%rip),%rsi
lea    0x3f0(%rsp),%rdi
call   10a0 <fopen@plt>
test   %rax,%rax
jne    138b <main+0x1cb>
mov    %r14,%rdi
call   1040 <fclose@plt>
lea    0x3f0(%rsp),%rdi
call   10b0 <perror@plt>
mov    $0x52,%edi
call   10c0 <exit@plt>
mov    %rax,%rbx
lea    0xc7a(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10d0 <fwrite@plt>
mov    %rsp,%rdi
mov    %rbx,%rsi
call   1060 <fputs@plt>
lea    0xc60(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10d0 <fwrite@plt>
mov    %r14,%rdi
call   10e0 <getc@plt>
mov    0x2c06(%rip),%r12
cmp    (%r12),%eax
je     15d4 <main+0x414>
mov    %eax,%ebp
jmp    1436 <main+0x276>
mov    $0x2f,%r15d
mov    $0x2a,%ebp
mov    $0x20,%edi
mov    %rbx,%rsi
call   1090 <putc@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1090 <putc@plt>
mov    %r15d,%edi
mov    %rbx,%rsi
call   1090 <putc@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1090 <putc@plt>
mov    %r14,%rdi
call   10e0 <getc@plt>
mov    %eax,%ebp
cmp    (%r12),%eax
je     15d4 <main+0x414>
cmp    $0x23,%ebp
jne    14d0 <main+0x310>
mov    %r14,%rdi
call   10e0 <getc@plt>
cmp    $0x20,%eax
jne    1570 <main+0x3b0>
mov    $0x2f,%edi
mov    %rbx,%rsi
call   1090 <putc@plt>
mov    $0x2a,%edi
mov    %rbx,%rsi
call   1090 <putc@plt>
mov    $0x20,%edi
nop
mov    %rbx,%rsi
call   1090 <putc@plt>
mov    %r14,%rdi
call   10e0 <getc@plt>
mov    %eax,%ebp
cmp    (%r12),%eax
je     15ad <main+0x3ed>
cmp    $0x5c,%ebp
jne    14c0 <main+0x300>
mov    %r14,%rdi
call   10e0 <getc@plt>
cmp    $0xa,%eax
je     158b <main+0x3cb>
mov    %eax,%ebp
mov    $0x5c,%edi
mov    %rbx,%rsi
call   1090 <putc@plt>
cmp    (%r12),%ebp
jne    148c <main+0x2cc>
jmp    15ad <main+0x3ed>
nopl   0x0(%rax)
cmp    $0xa,%ebp
je     13e8 <main+0x228>
mov    %ebp,%edi
jmp    1470 <main+0x2b0>
nopl   (%rax)
mov    %ebp,%edi
mov    %rbx,%rsi
call   1090 <putc@plt>
cmp    $0x2f,%ebp
jne    1422 <main+0x262>
mov    %r14,%rdi
call   10e0 <getc@plt>
cmp    (%r12),%eax
je     15d4 <main+0x414>
mov    %eax,%ebp
mov    %eax,%edi
mov    %rbx,%rsi
call   1090 <putc@plt>
cmp    $0x2a,%ebp
jne    1422 <main+0x262>
mov    %r14,%rdi
call   10e0 <getc@plt>
cmp    (%r12),%eax
je     15d4 <main+0x414>
mov    %eax,%ebp
jmp    1534 <main+0x374>
mov    %r14,%rdi
call   10e0 <getc@plt>
mov    %eax,%ebp
cmp    (%r12),%eax
je     15d4 <main+0x414>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1090 <putc@plt>
cmp    $0x2a,%ebp
jne    1520 <main+0x360>
mov    %r14,%rdi
call   10e0 <getc@plt>
cmp    (%r12),%eax
je     15d4 <main+0x414>
mov    %eax,%ebp
mov    %eax,%edi
mov    %rbx,%rsi
call   1090 <putc@plt>
cmp    $0x2f,%ebp
jne    1520 <main+0x360>
jmp    1422 <main+0x262>
nopl   0x0(%rax,%rax,1)
mov    %eax,%ebp
mov    $0x23,%edi
mov    %rbx,%rsi
call   1090 <putc@plt>
cmp    (%r12),%ebp
jne    1436 <main+0x276>
jmp    15d4 <main+0x414>
mov    $0x20,%edi
mov    %rbx,%rsi
call   1090 <putc@plt>
mov    $0x5c,%r15d
mov    $0x2f,%ebp
mov    $0x2a,%edi
jmp    13f8 <main+0x238>
mov    $0x20,%edi
mov    %rbx,%rsi
call   1090 <putc@plt>
mov    $0x2a,%edi
mov    %rbx,%rsi
call   1090 <putc@plt>
mov    $0x2f,%edi
mov    %rbx,%rsi
call   1090 <putc@plt>
mov    %r14,%rdi
call   1030 <ferror@plt>
test   %rax,%rax
jne    160f <main+0x44f>
mov    %r14,%rdi
call   1040 <fclose@plt>
test   %rax,%rax
jne    160f <main+0x44f>
mov    %rbx,%rdi
call   1030 <ferror@plt>
test   %rax,%rax
jne    1621 <main+0x461>
mov    %rbx,%rdi
call   1040 <fclose@plt>
test   %rax,%rax
jne    1621 <main+0x461>
xor    %edi,%edi
call   10c0 <exit@plt>
mov    %rsp,%rdi
call   10b0 <perror@plt>
mov    $0x8f,%edi
call   10c0 <exit@plt>
lea    0x3f0(%rsp),%rdi
call   10b0 <perror@plt>
mov    $0x91,%edi
call   10c0 <exit@plt>
mov    %rax,%r14
mov    0x298e(%rip),%rax
mov    (%rax),%rbx
jmp    138e <main+0x1ce>

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

LLVM IR (-O2):
@.str = [11 x i8] c"Filename: \00"
@stdin = global i32 0
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [2 x i8] c"w\00"
@stdout = global i32* null
@.str.3 = [10 x i8] c"#line 1 \22\00"
@.str.4 = [3 x i8] c"\22\0A\00"
@EOF = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1000 x i8]
%4 = alloca [1000 x i8]
%5 = alloca [1000 x i8]
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
store i8 115, i8* %7
%8 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 1
store i8 116, i8* %8
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 2
store i8 100, i8* %9
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 3
store i8 111, i8* %10
%11 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 4
store i8 117, i8* %11
%12 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 5
store i8 116, i8* %12
%13 = icmp eq i32 %0, 3
br i1 %13, label %14, label %34
14: ; preds = %2
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
br label %17
17: ; preds = %17, %14
%18 = phi i8* [ %16, %14 ], [ %20, %17 ]
%19 = phi i8* [ %6, %14 ], [ %22, %17 ]
%20 = getelementptr inbounds i8, i8* %18, i64 1
%21 = load i8, i8* %18
%22 = getelementptr inbounds i8, i8* %19, i64 1
store i8 %21, i8* %19
%23 = icmp eq i8 %21, 0
br i1 %23, label %24, label %17
24: ; preds = %17
%25 = getelementptr inbounds i8*, i8** %1, i64 2
%26 = load i8*, i8** %25
br label %27
27: ; preds = %27, %24
%28 = phi i8* [ %26, %24 ], [ %30, %27 ]
%29 = phi i8* [ %7, %24 ], [ %32, %27 ]
%30 = getelementptr inbounds i8, i8* %28, i64 1
%31 = load i8, i8* %28
%32 = getelementptr inbounds i8, i8* %29, i64 1
store i8 %31, i8* %29
%33 = icmp eq i8 %31, 0
br i1 %33, label %87, label %27
34: ; preds = %2
%35 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 0
%36 = icmp eq i32 %0, 2
br i1 %36, label %37, label %40
37: ; preds = %34
%38 = getelementptr inbounds i8*, i8** %1, i64 1
%39 = load i8*, i8** %38
br label %47
40: ; preds = %34
%41 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%42 = load i32, i32* @stdin
%43 = call i8* @fgets(i8* %35, i32 1000, i32 %42)
%44 = icmp eq i8* %43, null
br i1 %44, label %45, label %47
45: ; preds = %40
%46 = call i32 @exit(i32 57)
unreachable
47: ; preds = %40, %37
%48 = phi i8* [ %39, %37 ], [ %43, %40 ]
%49 = load i8, i8* %48
%50 = icmp eq i8 %49, 0
br i1 %50, label %59, label %51
51: ; preds = %47, %51
%52 = phi i8 [ %57, %51 ], [ %49, %47 ]
%53 = phi i8* [ %55, %51 ], [ %48, %47 ]
%54 = phi i8* [ %56, %51 ], [ %6, %47 ]
%55 = getelementptr inbounds i8, i8* %53, i64 1
%56 = getelementptr inbounds i8, i8* %54, i64 1
store i8 %52, i8* %54
%57 = load i8, i8* %55
%58 = icmp eq i8 %57, 0
br i1 %58, label %59, label %51
59: ; preds = %51, %47
%60 = phi i8* [ %6, %47 ], [ %56, %51 ]
%61 = getelementptr inbounds i8, i8* %60, i64 -2
%62 = icmp ult i8* %61, %6
br i1 %62, label %70, label %63
63: ; preds = %59
%64 = load i8, i8* %61
%65 = icmp eq i8 %64, 46
br i1 %65, label %66, label %70
66: ; preds = %63
%67 = getelementptr inbounds i8, i8* %60, i64 -1
%68 = load i8, i8* %67
%69 = icmp eq i8 %68, 100
br i1 %69, label %100, label %70
70: ; preds = %59, %63, %66
%71 = getelementptr inbounds i8, i8* %60, i64 1
store i8 46, i8* %60
%72 = getelementptr inbounds i8, i8* %60, i64 2
store i8 100, i8* %71
store i8 0, i8* %72
%73 = load i8, i8* %48
%74 = icmp eq i8 %73, 0
br i1 %74, label %83, label %75
75: ; preds = %70, %75
%76 = phi i8 [ %81, %75 ], [ %73, %70 ]
%77 = phi i8* [ %79, %75 ], [ %48, %70 ]
%78 = phi i8* [ %80, %75 ], [ %7, %70 ]
%79 = getelementptr inbounds i8, i8* %77, i64 1
%80 = getelementptr inbounds i8, i8* %78, i64 1
store i8 %76, i8* %78
%81 = load i8, i8* %79
%82 = icmp eq i8 %81, 0
br i1 %82, label %83, label %75
83: ; preds = %75, %70
%84 = phi i8* [ %7, %70 ], [ %80, %75 ]
%85 = getelementptr inbounds i8, i8* %84, i64 1
store i8 46, i8* %84
%86 = getelementptr inbounds i8, i8* %84, i64 2
store i8 99, i8* %85
store i8 0, i8* %86
br label %87
87: ; preds = %27, %83
%88 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%89 = icmp eq i32* %88, null
br i1 %89, label %90, label %93
90: ; preds = %87
%91 = call i32 @perror(i8* %6)
%92 = call i32 @exit(i32 80)
unreachable
93: ; preds = %87
%94 = call i32* @fopen(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%95 = icmp eq i32* %94, null
br i1 %95, label %96, label %108
96: ; preds = %93
%97 = call i64 @fclose(i32* %88)
%98 = call i32 @perror(i8* %7)
%99 = call i32 @exit(i32 82)
unreachable
100: ; preds = %66
store i8 0, i8* %60
%101 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%102 = icmp eq i32* %101, null
br i1 %102, label %103, label %106
103: ; preds = %100
%104 = call i32 @perror(i8* %6)
%105 = call i32 @exit(i32 86)
unreachable
106: ; preds = %100
%107 = load i32*, i32** @stdout
br label %108
108: ; preds = %93, %106
%109 = phi i32* [ %94, %93 ], [ %107, %106 ]
%110 = phi i32* [ %88, %93 ], [ %101, %106 ]
%111 = call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i64 9, i64 1, i32* %109)
%112 = call i32 @fputs(i8* %6, i32* %109)
%113 = call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i64 2, i64 1, i32* %109)
%114 = call i32 @getc(i32* %110)
%115 = load i32, i32* @EOF
%116 = icmp eq i32 %114, %115
br i1 %116, label %199, label %117
117: ; preds = %108, %127
%118 = phi i32 [ %128, %127 ], [ %114, %108 ]
%119 = icmp eq i32 %118, 35
br i1 %119, label %120, label %170
120: ; preds = %117
%121 = call i32 @getc(i32* %110)
%122 = icmp eq i32 %121, 32
br i1 %122, label %129, label %123
123: ; preds = %120
%124 = call i32 @putc(i32 35, i32* %109)
%125 = load i32, i32* @EOF
%126 = icmp eq i32 %121, %125
br i1 %126, label %199, label %127
127: ; preds = %123, %150
%128 = phi i32 [ %121, %123 ], [ %151, %150 ]
br label %117
129: ; preds = %120
%130 = call i32 @putc(i32 47, i32* %109)
%131 = call i32 @putc(i32 42, i32* %109)
%132 = call i32 @putc(i32 32, i32* %109)
%133 = call i32 @getc(i32* %110)
%134 = load i32, i32* @EOF
%135 = icmp eq i32 %133, %134
br i1 %135, label %136, label %140
136: ; preds = %129, %154, %162
%137 = call i32 @putc(i32 32, i32* %109)
%138 = call i32 @putc(i32 42, i32* %109)
%139 = call i32 @putc(i32 47, i32* %109)
br label %199
140: ; preds = %129, %166
%141 = phi i32 [ %167, %166 ], [ %133, %129 ]
switch i32 %141, label %154 [
i32 10, label %142
i32 92, label %159
]
142: ; preds = %140, %168
%143 = phi i32 [ 42, %168 ], [ 32, %140 ]
%144 = phi i32 [ 47, %168 ], [ 42, %140 ]
%145 = phi i32 [ 92, %168 ], [ 47, %140 ]
%146 = call i32 @putc(i32 %143, i32* %109)
%147 = call i32 @putc(i32 %144, i32* %109)
%148 = call i32 @putc(i32 %145, i32* %109)
%149 = call i32 @putc(i32 10, i32* %109)
br label %150
150: ; preds = %196, %142, %170, %177
%151 = call i32 @getc(i32* %110)
%152 = load i32, i32* @EOF
%153 = icmp eq i32 %151, %152
br i1 %153, label %199, label %127
154: ; preds = %140
%155 = call i32 @putc(i32 %141, i32* %109)
%156 = call i32 @getc(i32* %110)
%157 = load i32, i32* @EOF
%158 = icmp eq i32 %156, %157
br i1 %158, label %136, label %166
159: ; preds = %140
%160 = call i32 @getc(i32* %110)
%161 = icmp eq i32 %160, 10
br i1 %161, label %168, label %162
162: ; preds = %159
%163 = call i32 @putc(i32 92, i32* %109)
%164 = load i32, i32* @EOF
%165 = icmp eq i32 %160, %164
br i1 %165, label %136, label %166
166: ; preds = %162, %154
%167 = phi i32 [ %160, %162 ], [ %156, %154 ]
br label %140
168: ; preds = %159
%169 = call i32 @putc(i32 32, i32* %109)
br label %142
170: ; preds = %117
%171 = call i32 @putc(i32 %118, i32* %109)
%172 = icmp eq i32 %118, 47
br i1 %172, label %173, label %150
173: ; preds = %170
%174 = call i32 @getc(i32* %110)
%175 = load i32, i32* @EOF
%176 = icmp eq i32 %174, %175
br i1 %176, label %199, label %177
177: ; preds = %173
%178 = call i32 @putc(i32 %174, i32* %109)
%179 = icmp eq i32 %174, 42
br i1 %179, label %180, label %150
180: ; preds = %177
%181 = call i32 @getc(i32* %110)
%182 = load i32, i32* @EOF
%183 = icmp eq i32 %181, %182
br i1 %183, label %199, label %184
184: ; preds = %180, %188
%185 = phi i32 [ %189, %188 ], [ %181, %180 ]
%186 = call i32 @putc(i32 %185, i32* %109)
%187 = icmp eq i32 %185, 42
br i1 %187, label %192, label %188
188: ; preds = %184, %196
%189 = call i32 @getc(i32* %110)
%190 = load i32, i32* @EOF
%191 = icmp eq i32 %189, %190
br i1 %191, label %199, label %184
192: ; preds = %184
%193 = call i32 @getc(i32* %110)
%194 = load i32, i32* @EOF
%195 = icmp eq i32 %193, %194
br i1 %195, label %199, label %196
196: ; preds = %192
%197 = call i32 @putc(i32 %193, i32* %109)
%198 = icmp eq i32 %193, 47
br i1 %198, label %150, label %188
199: ; preds = %173, %150, %180, %123, %188, %192, %108, %136
%200 = call i64 @ferror(i32* %110)
%201 = icmp eq i64 %200, 0
br i1 %201, label %202, label %205
202: ; preds = %199
%203 = call i64 @fclose(i32* %110)
%204 = icmp eq i64 %203, 0
br i1 %204, label %208, label %205
205: ; preds = %202, %199
%206 = call i32 @perror(i8* %6)
%207 = call i32 @exit(i32 143)
unreachable
208: ; preds = %202
%209 = call i64 @ferror(i32* %109)
%210 = icmp eq i64 %209, 0
br i1 %210, label %211, label %214
211: ; preds = %208
%212 = call i64 @fclose(i32* %109)
%213 = icmp eq i64 %212, 0
br i1 %213, label %217, label %214
214: ; preds = %211, %208
%215 = call i32 @perror(i8* %7)
%216 = call i32 @exit(i32 145)
unreachable
217: ; preds = %211
%218 = call i32 @exit(i32 0)
unreachable
}