#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
char *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int parse_four(char *, char *, char *, char *, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ *stdin;
int /*<<< orphan*/ stdout;
scalar_t__ strlen(char *);
scalar_t__ strncmp(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
int main(int argc, char *argv[]) {
  FILE *infile;
  char *status, line[2048];
  char item01[2048], item02[2048], item03[2048], item04[2048];
  char item11[2048], item12[2048], item13[2048], item14[2048];
  int last_matched, rc = 0;
  if (argc == 1)
    infile = stdin;
  else if ((infile = fopen(argv[1], "r")) == NULL) {
    fprintf(stderr, "rep_node error: can't open %s!\n", argv[1]);
    return (1);
  }
  status = fgets(line, 2048, infile);
  if ((status != NULL) && ((int)strlen(line) > 1) && (line[0] != '#'))
    rc = parse_four(line, item01, item02, item03, item04);
  else
    rc = 1;
  if ((!feof(infile)) && (rc == 0)) {
    status = fgets(line, 2048, infile);
    if ((status != NULL) && ((int)strlen(line) > 1) && (line[0] != '#'))
      rc = parse_four(line, item11, item12, item13, item14);
    else
      rc = 1;
  }
  last_matched = 1;
  while ((!feof(infile)) && (rc == 0)) {
    if ((strncmp(item02, item12, 2048) != 0) ||
        (strncmp(item03, item13, 2048) != 0) ||
        (strncmp(item04, item14, 2048) != 0)) {
      fprintf(stdout, "%s\n", item01);
      strncpy(item01, item11, 2048);
      strncpy(item02, item12, 2048);
      strncpy(item03, item13, 2048);
      strncpy(item04, item14, 2048);
      last_matched = 0;
    } else
      last_matched = 1;
    status = fgets(line, 2048, infile);
    if ((status != NULL) && ((int)strlen(line) > 1) && (line[0] != '#'))
      rc = parse_four(line, item11, item12, item13, item14);
    else
      rc = 1;
  }
  if (last_matched == 0)
    fprintf(stdout, "%s\n", item01);
  if (argc > 1)
    (void)fclose(infile);
  if (rc == 0)
    return (0);
  else
    return (1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4830,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x4828(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    11d0 <main+0x40>
mov    0x2e24(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    1220 <main+0x90>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe21(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    121b <main+0x8b>
mov    0x2ddf(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xdf8(%rip),%rsi
call   1090 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    157b <main+0x3eb>
jmp    1220 <main+0x90>
lea    -0x820(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x800,%esi
call   1080 <fgets@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     129c <main+0x10c>
lea    -0x820(%rbp),%rdi
call   1060 <strlen@plt>
cmp    $0x1,%eax
jle    129c <main+0x10c>
movsbl -0x820(%rbp),%eax
cmp    $0x23,%eax
je     129c <main+0x10c>
lea    -0x820(%rbp),%rdi
lea    -0x1020(%rbp),%rsi
lea    -0x1820(%rbp),%rdx
lea    -0x2020(%rbp),%rcx
lea    -0x2820(%rbp),%r8
call   1070 <parse_four@plt>
mov    %eax,-0x4828(%rbp)
jmp    12a6 <main+0x116>
movl   $0x1,-0x4828(%rbp)
mov    -0x18(%rbp),%rdi
call   10a0 <feof@plt>
cmp    $0x0,%eax
jne    1350 <main+0x1c0>
cmpl   $0x0,-0x4828(%rbp)
jne    1350 <main+0x1c0>
lea    -0x820(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x800,%esi
call   1080 <fgets@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1341 <main+0x1b1>
lea    -0x820(%rbp),%rdi
call   1060 <strlen@plt>
cmp    $0x1,%eax
jle    1341 <main+0x1b1>
movsbl -0x820(%rbp),%eax
cmp    $0x23,%eax
je     1341 <main+0x1b1>
lea    -0x820(%rbp),%rdi
lea    -0x3020(%rbp),%rsi
lea    -0x3820(%rbp),%rdx
lea    -0x4020(%rbp),%rcx
lea    -0x4820(%rbp),%r8
call   1070 <parse_four@plt>
mov    %eax,-0x4828(%rbp)
jmp    134b <main+0x1bb>
movl   $0x1,-0x4828(%rbp)
jmp    1350 <main+0x1c0>
movl   $0x1,-0x4824(%rbp)
mov    -0x18(%rbp),%rdi
call   10a0 <feof@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x4829(%rbp)
jne    1386 <main+0x1f6>
cmpl   $0x0,-0x4828(%rbp)
sete   %al
mov    %al,-0x4829(%rbp)
mov    -0x4829(%rbp),%al
test   $0x1,%al
jne    1399 <main+0x209>
jmp    151f <main+0x38f>
lea    -0x1820(%rbp),%rdi
lea    -0x3820(%rbp),%rsi
mov    $0x800,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    13ff <main+0x26f>
lea    -0x2020(%rbp),%rdi
lea    -0x4020(%rbp),%rsi
mov    $0x800,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    13ff <main+0x26f>
lea    -0x2820(%rbp),%rdi
lea    -0x4820(%rbp),%rsi
mov    $0x800,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     148a <main+0x2fa>
mov    0x2bca(%rip),%rax
mov    (%rax),%edi
lea    -0x1020(%rbp),%rdx
lea    0xc0c(%rip),%rsi
call   1090 <fprintf@plt>
lea    -0x1020(%rbp),%rdi
lea    -0x3020(%rbp),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
lea    -0x1820(%rbp),%rdi
lea    -0x3820(%rbp),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
lea    -0x2020(%rbp),%rdi
lea    -0x4020(%rbp),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
lea    -0x2820(%rbp),%rdi
lea    -0x4820(%rbp),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
movl   $0x0,-0x4824(%rbp)
jmp    1494 <main+0x304>
movl   $0x1,-0x4824(%rbp)
lea    -0x820(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x800,%esi
call   1080 <fgets@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1510 <main+0x380>
lea    -0x820(%rbp),%rdi
call   1060 <strlen@plt>
cmp    $0x1,%eax
jle    1510 <main+0x380>
movsbl -0x820(%rbp),%eax
cmp    $0x23,%eax
je     1510 <main+0x380>
lea    -0x820(%rbp),%rdi
lea    -0x3020(%rbp),%rsi
lea    -0x3820(%rbp),%rdx
lea    -0x4020(%rbp),%rcx
lea    -0x4820(%rbp),%r8
call   1070 <parse_four@plt>
mov    %eax,-0x4828(%rbp)
jmp    151a <main+0x38a>
movl   $0x1,-0x4828(%rbp)
jmp    135a <main+0x1ca>
cmpl   $0x0,-0x4824(%rbp)
jne    1548 <main+0x3b8>
mov    0x2a9d(%rip),%rax
mov    (%rax),%edi
lea    -0x1020(%rbp),%rdx
lea    0xadf(%rip),%rsi
call   1090 <fprintf@plt>
cmpl   $0x1,-0x8(%rbp)
jle    155b <main+0x3cb>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
cmpl   $0x0,-0x4828(%rbp)
jne    1574 <main+0x3e4>
movl   $0x0,-0x4(%rbp)
jmp    157b <main+0x3eb>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4830,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x4818,%rsp
mov    %edi,%r14d
cmp    $0x1,%edi
jne    11b5 <main+0x25>
mov    0x2e38(%rip),%rax
mov    (%rax),%rbx
jmp    11d4 <main+0x44>
mov    %rsi,%rbp
mov    0x8(%rsi),%rdi
lea    0xe3d(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1490 <main+0x300>
lea    0x10(%rsp),%rdi
mov    $0x800,%esi
mov    %rbx,%rdx
call   1080 <fgets@plt>
mov    $0x1,%ebp
test   %rax,%rax
je     1232 <main+0xa2>
lea    0x10(%rsp),%rdi
call   1060 <strlen@plt>
cmp    $0x2,%eax
jl     1232 <main+0xa2>
cmpb   $0x23,0x10(%rsp)
je     1232 <main+0xa2>
lea    0x10(%rsp),%rdi
lea    0x3810(%rsp),%rsi
lea    0x3010(%rsp),%rdx
lea    0x2810(%rsp),%rcx
lea    0x2010(%rsp),%r8
call   1070 <parse_four@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   10a0 <feof@plt>
or     %ebp,%eax
jne    129c <main+0x10c>
lea    0x10(%rsp),%rdi
mov    $0x800,%esi
mov    %rbx,%rdx
call   1080 <fgets@plt>
mov    $0x1,%ebp
test   %rax,%rax
je     129c <main+0x10c>
lea    0x10(%rsp),%rdi
call   1060 <strlen@plt>
cmp    $0x2,%eax
jl     129c <main+0x10c>
cmpb   $0x23,0x10(%rsp)
je     129c <main+0x10c>
lea    0x10(%rsp),%rdi
lea    0x1810(%rsp),%rsi
lea    0x4010(%rsp),%rdx
lea    0x1010(%rsp),%rcx
lea    0x810(%rsp),%r8
call   1070 <parse_four@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   10a0 <feof@plt>
test   %ebp,%ebp
sete   %r12b
or     %ebp,%eax
jne    1468 <main+0x2d8>
mov    %r14d,0xc(%rsp)
lea    0x4010(%rsp),%r14
jmp    12e8 <main+0x158>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   10a0 <feof@plt>
test   %r13d,%r13d
sete   %r12b
or     %r13d,%eax
jne    1441 <main+0x2b1>
lea    0x3010(%rsp),%rdi
mov    %r14,%rsi
mov    $0x800,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
jne    1350 <main+0x1c0>
lea    0x2810(%rsp),%rdi
lea    0x1010(%rsp),%rsi
mov    $0x800,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
jne    1350 <main+0x1c0>
lea    0x2010(%rsp),%rdi
lea    0x810(%rsp),%rsi
mov    $0x800,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     143c <main+0x2ac>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x2c79(%rip),%rax
mov    (%rax),%edi
lea    0xcc2(%rip),%rsi
lea    0x3810(%rsp),%rbp
mov    %rbp,%rdx
call   1090 <fprintf@plt>
mov    %rbp,%rdi
lea    0x1810(%rsp),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
lea    0x3010(%rsp),%rdi
mov    %r14,%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
lea    0x2810(%rsp),%rdi
lea    0x1010(%rsp),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
lea    0x2010(%rsp),%rdi
lea    0x810(%rsp),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
mov    $0x1,%r15b
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x800,%esi
mov    %rbx,%rdx
call   1080 <fgets@plt>
mov    $0x1,%r13d
test   %rax,%rax
je     12d0 <main+0x140>
mov    %rbp,%rdi
call   1060 <strlen@plt>
cmp    $0x2,%eax
jl     12d0 <main+0x140>
cmpb   $0x23,0x10(%rsp)
je     12d0 <main+0x140>
mov    %rbp,%rdi
lea    0x1810(%rsp),%rsi
mov    %r14,%rdx
lea    0x1010(%rsp),%rcx
lea    0x810(%rsp),%r8
call   1070 <parse_four@plt>
mov    %eax,%r13d
jmp    12d0 <main+0x140>
xor    %r15d,%r15d
jmp    13d1 <main+0x241>
test   %r15b,%r15b
je     1463 <main+0x2d3>
mov    0x2b83(%rip),%rax
mov    (%rax),%edi
lea    0xbcc(%rip),%rsi
lea    0x3810(%rsp),%rdx
call   1090 <fprintf@plt>
mov    0xc(%rsp),%r14d
cmp    $0x2,%r14d
jl     1476 <main+0x2e6>
mov    %rbx,%rdi
call   1050 <fclose@plt>
xor    $0x1,%r12b
movzbl %r12b,%eax
add    $0x4818,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2b41(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rbp),%rdx
lea    0xb5e(%rip),%rsi
call   1090 <fprintf@plt>
mov    $0x1,%eax
jmp    147e <main+0x2ee>

LLVM IR (-O0):
@stdin = global i32* null
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [32 x i8] c"rep_node error: can't open %s!\0A\00"
@stdout = global i32 0
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca [2048 x i8]
%9 = alloca [2048 x i8]
%10 = alloca [2048 x i8]
%11 = alloca [2048 x i8]
%12 = alloca [2048 x i8]
%13 = alloca [2048 x i8]
%14 = alloca [2048 x i8]
%15 = alloca [2048 x i8]
%16 = alloca [2048 x i8]
%17 = alloca i32
%18 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %18
%19 = load i32, i32* %4
%20 = icmp eq i32 %19, 1
br i1 %20, label %21, label %23
21: ; preds = %2
%22 = load i32*, i32** @stdin
store i32* %22, i32** %6
br label %36
23: ; preds = %2
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i32* @fopen(i8* %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %27, i32** %6
%28 = icmp eq i32* %27, null
br i1 %28, label %29, label %35
29: ; preds = %23
%30 = load i32, i32* @stderr
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
%34 = call i32 @fprintf(i32 %30, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %33)
store i32 1, i32* %3
br label %177
35: ; preds = %23
br label %36
36: ; preds = %35, %21
%37 = getelementptr inbounds [2048 x i8], [2048 x i8]* %8, i64 0, i64 0
%38 = load i32*, i32** %6
%39 = call i8* @fgets(i8* %37, i32 2048, i32* %38)
store i8* %39, i8** %7
%40 = load i8*, i8** %7
%41 = icmp ne i8* %40, null
br i1 %41, label %42, label %59
42: ; preds = %36
%43 = getelementptr inbounds [2048 x i8], [2048 x i8]* %8, i64 0, i64 0
%44 = call i64 @strlen(i8* %43)
%45 = trunc i64 %44 to i32
%46 = icmp sgt i32 %45, 1
br i1 %46, label %47, label %59
47: ; preds = %42
%48 = getelementptr inbounds [2048 x i8], [2048 x i8]* %8, i64 0, i64 0
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = icmp ne i32 %50, 35
br i1 %51, label %52, label %59
52: ; preds = %47
%53 = getelementptr inbounds [2048 x i8], [2048 x i8]* %8, i64 0, i64 0
%54 = getelementptr inbounds [2048 x i8], [2048 x i8]* %9, i64 0, i64 0
%55 = getelementptr inbounds [2048 x i8], [2048 x i8]* %10, i64 0, i64 0
%56 = getelementptr inbounds [2048 x i8], [2048 x i8]* %11, i64 0, i64 0
%57 = getelementptr inbounds [2048 x i8], [2048 x i8]* %12, i64 0, i64 0
%58 = call i32 @parse_four(i8* %53, i8* %54, i8* %55, i8* %56, i8* %57)
store i32 %58, i32* %18
br label %60
59: ; preds = %47, %42, %36
store i32 1, i32* %18
br label %60
60: ; preds = %59, %52
%61 = load i32*, i32** %6
%62 = call i32 @feof(i32* %61)
%63 = icmp ne i32 %62, 0
br i1 %63, label %92, label %64
64: ; preds = %60
%65 = load i32, i32* %18
%66 = icmp eq i32 %65, 0
br i1 %66, label %67, label %92
67: ; preds = %64
%68 = getelementptr inbounds [2048 x i8], [2048 x i8]* %8, i64 0, i64 0
%69 = load i32*, i32** %6
%70 = call i8* @fgets(i8* %68, i32 2048, i32* %69)
store i8* %70, i8** %7
%71 = load i8*, i8** %7
%72 = icmp ne i8* %71, null
br i1 %72, label %73, label %90
73: ; preds = %67
%74 = getelementptr inbounds [2048 x i8], [2048 x i8]* %8, i64 0, i64 0
%75 = call i64 @strlen(i8* %74)
%76 = trunc i64 %75 to i32
%77 = icmp sgt i32 %76, 1
br i1 %77, label %78, label %90
78: ; preds = %73
%79 = getelementptr inbounds [2048 x i8], [2048 x i8]* %8, i64 0, i64 0
%80 = load i8, i8* %79
%81 = sext i8 %80 to i32
%82 = icmp ne i32 %81, 35
br i1 %82, label %83, label %90
83: ; preds = %78
%84 = getelementptr inbounds [2048 x i8], [2048 x i8]* %8, i64 0, i64 0
%85 = getelementptr inbounds [2048 x i8], [2048 x i8]* %13, i64 0, i64 0
%86 = getelementptr inbounds [2048 x i8], [2048 x i8]* %14, i64 0, i64 0
%87 = getelementptr inbounds [2048 x i8], [2048 x i8]* %15, i64 0, i64 0
%88 = getelementptr inbounds [2048 x i8], [2048 x i8]* %16, i64 0, i64 0
%89 = call i32 @parse_four(i8* %84, i8* %85, i8* %86, i8* %87, i8* %88)
store i32 %89, i32* %18
br label %91
90: ; preds = %78, %73, %67
store i32 1, i32* %18
br label %91
91: ; preds = %90, %83
br label %92
92: ; preds = %91, %64, %60
store i32 1, i32* %17
br label %93
93: ; preds = %158, %92
%94 = load i32*, i32** %6
%95 = call i32 @feof(i32* %94)
%96 = icmp ne i32 %95, 0
br i1 %96, label %100, label %97
97: ; preds = %93
%98 = load i32, i32* %18
%99 = icmp eq i32 %98, 0
br label %100
100: ; preds = %97, %93
%101 = phi i1 [ false, %93 ], [ %99, %97 ]
br i1 %101, label %102, label %159
102: ; preds = %100
%103 = getelementptr inbounds [2048 x i8], [2048 x i8]* %10, i64 0, i64 0
%104 = getelementptr inbounds [2048 x i8], [2048 x i8]* %14, i64 0, i64 0
%105 = call i64 @strncmp(i8* %103, i8* %104, i32 2048)
%106 = icmp ne i64 %105, 0
br i1 %106, label %117, label %107
107: ; preds = %102
%108 = getelementptr inbounds [2048 x i8], [2048 x i8]* %11, i64 0, i64 0
%109 = getelementptr inbounds [2048 x i8], [2048 x i8]* %15, i64 0, i64 0
%110 = call i64 @strncmp(i8* %108, i8* %109, i32 2048)
%111 = icmp ne i64 %110, 0
br i1 %111, label %117, label %112
112: ; preds = %107
%113 = getelementptr inbounds [2048 x i8], [2048 x i8]* %12, i64 0, i64 0
%114 = getelementptr inbounds [2048 x i8], [2048 x i8]* %16, i64 0, i64 0
%115 = call i64 @strncmp(i8* %113, i8* %114, i32 2048)
%116 = icmp ne i64 %115, 0
br i1 %116, label %117, label %133
117: ; preds = %112, %107, %102
%118 = load i32, i32* @stdout
%119 = getelementptr inbounds [2048 x i8], [2048 x i8]* %9, i64 0, i64 0
%120 = call i32 @fprintf(i32 %118, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %119)
%121 = getelementptr inbounds [2048 x i8], [2048 x i8]* %9, i64 0, i64 0
%122 = getelementptr inbounds [2048 x i8], [2048 x i8]* %13, i64 0, i64 0
%123 = call i32 @strncpy(i8* %121, i8* %122, i32 2048)
%124 = getelementptr inbounds [2048 x i8], [2048 x i8]* %10, i64 0, i64 0
%125 = getelementptr inbounds [2048 x i8], [2048 x i8]* %14, i64 0, i64 0
%126 = call i32 @strncpy(i8* %124, i8* %125, i32 2048)
%127 = getelementptr inbounds [2048 x i8], [2048 x i8]* %11, i64 0, i64 0
%128 = getelementptr inbounds [2048 x i8], [2048 x i8]* %15, i64 0, i64 0
%129 = call i32 @strncpy(i8* %127, i8* %128, i32 2048)
%130 = getelementptr inbounds [2048 x i8], [2048 x i8]* %12, i64 0, i64 0
%131 = getelementptr inbounds [2048 x i8], [2048 x i8]* %16, i64 0, i64 0
%132 = call i32 @strncpy(i8* %130, i8* %131, i32 2048)
store i32 0, i32* %17
br label %134
133: ; preds = %112
store i32 1, i32* %17
br label %134
134: ; preds = %133, %117
%135 = getelementptr inbounds [2048 x i8], [2048 x i8]* %8, i64 0, i64 0
%136 = load i32*, i32** %6
%137 = call i8* @fgets(i8* %135, i32 2048, i32* %136)
store i8* %137, i8** %7
%138 = load i8*, i8** %7
%139 = icmp ne i8* %138, null
br i1 %139, label %140, label %157
140: ; preds = %134
%141 = getelementptr inbounds [2048 x i8], [2048 x i8]* %8, i64 0, i64 0
%142 = call i64 @strlen(i8* %141)
%143 = trunc i64 %142 to i32
%144 = icmp sgt i32 %143, 1
br i1 %144, label %145, label %157
145: ; preds = %140
%146 = getelementptr inbounds [2048 x i8], [2048 x i8]* %8, i64 0, i64 0
%147 = load i8, i8* %146
%148 = sext i8 %147 to i32
%149 = icmp ne i32 %148, 35
br i1 %149, label %150, label %157
150: ; preds = %145
%151 = getelementptr inbounds [2048 x i8], [2048 x i8]* %8, i64 0, i64 0
%152 = getelementptr inbounds [2048 x i8], [2048 x i8]* %13, i64 0, i64 0
%153 = getelementptr inbounds [2048 x i8], [2048 x i8]* %14, i64 0, i64 0
%154 = getelementptr inbounds [2048 x i8], [2048 x i8]* %15, i64 0, i64 0
%155 = getelementptr inbounds [2048 x i8], [2048 x i8]* %16, i64 0, i64 0
%156 = call i32 @parse_four(i8* %151, i8* %152, i8* %153, i8* %154, i8* %155)
store i32 %156, i32* %18
br label %158
157: ; preds = %145, %140, %134
store i32 1, i32* %18
br label %158
158: ; preds = %157, %150
br label %93
159: ; preds = %100
%160 = load i32, i32* %17
%161 = icmp eq i32 %160, 0
br i1 %161, label %162, label %166
162: ; preds = %159
%163 = load i32, i32* @stdout
%164 = getelementptr inbounds [2048 x i8], [2048 x i8]* %9, i64 0, i64 0
%165 = call i32 @fprintf(i32 %163, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %164)
br label %166
166: ; preds = %162, %159
%167 = load i32, i32* %4
%168 = icmp sgt i32 %167, 1
br i1 %168, label %169, label %172
169: ; preds = %166
%170 = load i32*, i32** %6
%171 = call i32 @fclose(i32* %170)
br label %172
172: ; preds = %169, %166
%173 = load i32, i32* %18
%174 = icmp eq i32 %173, 0
br i1 %174, label %175, label %176
175: ; preds = %172
store i32 0, i32* %3
br label %177
176: ; preds = %172
store i32 1, i32* %3
br label %177
177: ; preds = %176, %175, %29
%178 = load i32, i32* %3
ret i32 %178
}

LLVM IR (-O2):
@stdin = global i32* null
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [32 x i8] c"rep_node error: can't open %s!\0A\00"
@stdout = global i32 0
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [2048 x i8]
%4 = alloca [2048 x i8]
%5 = alloca [2048 x i8]
%6 = alloca [2048 x i8]
%7 = alloca [2048 x i8]
%8 = alloca [2048 x i8]
%9 = alloca [2048 x i8]
%10 = alloca [2048 x i8]
%11 = alloca [2048 x i8]
%12 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%13 = getelementptr inbounds [2048 x i8], [2048 x i8]* %4, i64 0, i64 0
%14 = getelementptr inbounds [2048 x i8], [2048 x i8]* %5, i64 0, i64 0
%15 = getelementptr inbounds [2048 x i8], [2048 x i8]* %6, i64 0, i64 0
%16 = getelementptr inbounds [2048 x i8], [2048 x i8]* %7, i64 0, i64 0
%17 = getelementptr inbounds [2048 x i8], [2048 x i8]* %8, i64 0, i64 0
%18 = getelementptr inbounds [2048 x i8], [2048 x i8]* %9, i64 0, i64 0
%19 = getelementptr inbounds [2048 x i8], [2048 x i8]* %10, i64 0, i64 0
%20 = getelementptr inbounds [2048 x i8], [2048 x i8]* %11, i64 0, i64 0
%21 = icmp eq i32 %0, 1
br i1 %21, label %22, label %24
22: ; preds = %2
%23 = load i32*, i32** @stdin
br label %33
24: ; preds = %2
%25 = getelementptr inbounds i8*, i8** %1, i64 1
%26 = load i8*, i8** %25
%27 = tail call i32* @fopen(i8* %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%28 = icmp eq i32* %27, null
br i1 %28, label %29, label %33
29: ; preds = %24
%30 = load i32, i32* @stderr
%31 = load i8*, i8** %25
%32 = tail call i32 @fprintf(i32 %30, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %31)
br label %117
33: ; preds = %24, %22
%34 = phi i32* [ %23, %22 ], [ %27, %24 ]
%35 = call i8* @fgets(i8* %12, i32 2048, i32* %34)
%36 = icmp eq i8* %35, null
br i1 %36, label %46, label %37
37: ; preds = %33
%38 = call i64 @strlen(i8* %12)
%39 = trunc i64 %38 to i32
%40 = icmp sgt i32 %39, 1
%41 = load i8, i8* %12
%42 = icmp ne i8 %41, 35
%43 = select i1 %40, i1 %42, i1 false
br i1 %43, label %44, label %46
44: ; preds = %37
%45 = call i32 @parse_four(i8* %12, i8* %13, i8* %14, i8* %15, i8* %16)
br label %46
46: ; preds = %33, %37, %44
%47 = phi i32 [ %45, %44 ], [ 1, %37 ], [ 1, %33 ]
%48 = call i32 @feof(i32* %34)
%49 = icmp eq i32 %48, 0
%50 = icmp eq i32 %47, 0
%51 = select i1 %49, i1 %50, i1 false
br i1 %51, label %52, label %64
52: ; preds = %46
%53 = call i8* @fgets(i8* %12, i32 2048, i32* %34)
%54 = icmp eq i8* %53, null
br i1 %54, label %64, label %55
55: ; preds = %52
%56 = call i64 @strlen(i8* %12)
%57 = trunc i64 %56 to i32
%58 = icmp sgt i32 %57, 1
%59 = load i8, i8* %12
%60 = icmp ne i8 %59, 35
%61 = select i1 %58, i1 %60, i1 false
br i1 %61, label %62, label %64
62: ; preds = %55
%63 = call i32 @parse_four(i8* %12, i8* %17, i8* %18, i8* %19, i8* %20)
br label %64
64: ; preds = %52, %55, %62, %46
%65 = phi i32 [ %63, %62 ], [ %47, %46 ], [ 1, %55 ], [ 1, %52 ]
%66 = call i32 @feof(i32* %34)
%67 = icmp eq i32 %66, 0
%68 = icmp eq i32 %65, 0
%69 = select i1 %67, i1 %68, i1 false
br i1 %69, label %70, label %109
70: ; preds = %64, %99
%71 = call i64 @strncmp(i8* %14, i8* %18, i32 2048)
%72 = icmp eq i64 %71, 0
br i1 %72, label %73, label %79
73: ; preds = %70
%74 = call i64 @strncmp(i8* %15, i8* %19, i32 2048)
%75 = icmp eq i64 %74, 0
br i1 %75, label %76, label %79
76: ; preds = %73
%77 = call i64 @strncmp(i8* %16, i8* %20, i32 2048)
%78 = icmp eq i64 %77, 0
br i1 %78, label %86, label %79
79: ; preds = %76, %73, %70
%80 = load i32, i32* @stdout
%81 = call i32 @fprintf(i32 %80, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %13)
%82 = call i32 @strncpy(i8* %13, i8* %17, i32 2048)
%83 = call i32 @strncpy(i8* %14, i8* %18, i32 2048)
%84 = call i32 @strncpy(i8* %15, i8* %19, i32 2048)
%85 = call i32 @strncpy(i8* %16, i8* %20, i32 2048)
br label %86
86: ; preds = %76, %79
%87 = phi i1 [ false, %76 ], [ true, %79 ]
%88 = call i8* @fgets(i8* %12, i32 2048, i32* %34)
%89 = icmp eq i8* %88, null
br i1 %89, label %99, label %90
90: ; preds = %86
%91 = call i64 @strlen(i8* %12)
%92 = trunc i64 %91 to i32
%93 = icmp sgt i32 %92, 1
%94 = load i8, i8* %12
%95 = icmp ne i8 %94, 35
%96 = select i1 %93, i1 %95, i1 false
br i1 %96, label %97, label %99
97: ; preds = %90
%98 = call i32 @parse_four(i8* %12, i8* %17, i8* %18, i8* %19, i8* %20)
br label %99
99: ; preds = %86, %90, %97
%100 = phi i32 [ %98, %97 ], [ 1, %90 ], [ 1, %86 ]
%101 = call i32 @feof(i32* %34)
%102 = icmp eq i32 %101, 0
%103 = icmp eq i32 %100, 0
%104 = select i1 %102, i1 %103, i1 false
br i1 %104, label %70, label %105
105: ; preds = %99
br i1 %87, label %106, label %109
106: ; preds = %105
%107 = load i32, i32* @stdout
%108 = call i32 @fprintf(i32 %107, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %13)
br label %109
109: ; preds = %64, %106, %105
%110 = phi i1 [ %103, %106 ], [ %103, %105 ], [ %68, %64 ]
%111 = icmp sgt i32 %0, 1
br i1 %111, label %112, label %114
112: ; preds = %109
%113 = call i32 @fclose(i32* %34)
br label %114
114: ; preds = %112, %109
%115 = xor i1 %110, true
%116 = zext i1 %115 to i32
br label %117
117: ; preds = %114, %29
%118 = phi i32 [ 1, %29 ], [ %116, %114 ]
ret i32 %118
}