#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_two(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], item11[2048], item12[2048];
  int last_matched, rc = 0;
  if (argc == 1)
    infile = stdin;
  else if ((infile = fopen(argv[1], "r")) == NULL) {
    fprintf(stderr, "rep_size 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_two(line, item01, item02);
  else
    rc = 1;
  if ((!feof(infile)) && (rc == 0)) {
    status = fgets(line, 2048, infile);
    if ((status != NULL) && ((int)strlen(line) > 1) && (line[0] != '#'))
      rc = parse_two(line, item11, item12);
    else
      rc = 1;
  }
  last_matched = 0;
  while ((!feof(infile)) && (rc == 0)) {
    if (strncmp(item02, item12, 2048) == 0) {
      if (last_matched == 0)
        fprintf(stdout, "%s\n", item01);
      fprintf(stdout, "%s\n", item11);
      last_matched = 1;
    } else
      last_matched = 0;
    strncpy(item01, item11, 2048);
    strncpy(item02, item12, 2048);
    status = fgets(line, 2048, infile);
    if ((status != NULL) && ((int)strlen(line) > 1) && (line[0] != '#'))
      rc = parse_two(line, item11, item12);
    else
      rc = 1;
  }
  if ((rc == 0) && (strncmp(item02, item12, 2048) == 0)) {
    if (last_matched == 0)
      fprintf(stdout, "%s\n", item01);
    fprintf(stdout, "%s\n", item11);
  }
  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    $0x2830,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x2828(%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    1551 <main+0x3c1>
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     128e <main+0xfe>
lea    -0x820(%rbp),%rdi
call   1070 <strlen@plt>
cmp    $0x1,%eax
jle    128e <main+0xfe>
movsbl -0x820(%rbp),%eax
cmp    $0x23,%eax
je     128e <main+0xfe>
lea    -0x820(%rbp),%rdi
lea    -0x1020(%rbp),%rsi
lea    -0x1820(%rbp),%rdx
call   1050 <parse_two@plt>
mov    %eax,-0x2828(%rbp)
jmp    1298 <main+0x108>
movl   $0x1,-0x2828(%rbp)
mov    -0x18(%rbp),%rdi
call   10a0 <feof@plt>
cmp    $0x0,%eax
jne    1334 <main+0x1a4>
cmpl   $0x0,-0x2828(%rbp)
jne    1334 <main+0x1a4>
lea    -0x820(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x800,%esi
call   1080 <fgets@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1325 <main+0x195>
lea    -0x820(%rbp),%rdi
call   1070 <strlen@plt>
cmp    $0x1,%eax
jle    1325 <main+0x195>
movsbl -0x820(%rbp),%eax
cmp    $0x23,%eax
je     1325 <main+0x195>
lea    -0x820(%rbp),%rdi
lea    -0x2020(%rbp),%rsi
lea    -0x2820(%rbp),%rdx
call   1050 <parse_two@plt>
mov    %eax,-0x2828(%rbp)
jmp    132f <main+0x19f>
movl   $0x1,-0x2828(%rbp)
jmp    1334 <main+0x1a4>
movl   $0x0,-0x2824(%rbp)
mov    -0x18(%rbp),%rdi
call   10a0 <feof@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x2829(%rbp)
jne    136a <main+0x1da>
cmpl   $0x0,-0x2828(%rbp)
sete   %al
mov    %al,-0x2829(%rbp)
mov    -0x2829(%rbp),%al
test   $0x1,%al
jne    137d <main+0x1ed>
jmp    14aa <main+0x31a>
lea    -0x1820(%rbp),%rdi
lea    -0x2820(%rbp),%rsi
mov    $0x800,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    13f3 <main+0x263>
cmpl   $0x0,-0x2824(%rbp)
jne    13c8 <main+0x238>
mov    0x2c1d(%rip),%rax
mov    (%rax),%edi
lea    -0x1020(%rbp),%rdx
lea    0xc5f(%rip),%rsi
call   1090 <fprintf@plt>
mov    0x2c01(%rip),%rax
mov    (%rax),%edi
lea    -0x2020(%rbp),%rdx
lea    0xc43(%rip),%rsi
call   1090 <fprintf@plt>
movl   $0x1,-0x2824(%rbp)
jmp    13fd <main+0x26d>
movl   $0x0,-0x2824(%rbp)
lea    -0x1020(%rbp),%rdi
lea    -0x2020(%rbp),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
lea    -0x1820(%rbp),%rdi
lea    -0x2820(%rbp),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
lea    -0x820(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x800,%esi
call   1080 <fgets@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     149b <main+0x30b>
lea    -0x820(%rbp),%rdi
call   1070 <strlen@plt>
cmp    $0x1,%eax
jle    149b <main+0x30b>
movsbl -0x820(%rbp),%eax
cmp    $0x23,%eax
je     149b <main+0x30b>
lea    -0x820(%rbp),%rdi
lea    -0x2020(%rbp),%rsi
lea    -0x2820(%rbp),%rdx
call   1050 <parse_two@plt>
mov    %eax,-0x2828(%rbp)
jmp    14a5 <main+0x315>
movl   $0x1,-0x2828(%rbp)
jmp    133e <main+0x1ae>
cmpl   $0x0,-0x2828(%rbp)
jne    151e <main+0x38e>
lea    -0x1820(%rbp),%rdi
lea    -0x2820(%rbp),%rsi
mov    $0x800,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    151e <main+0x38e>
cmpl   $0x0,-0x2824(%rbp)
jne    1502 <main+0x372>
mov    0x2ae3(%rip),%rax
mov    (%rax),%edi
lea    -0x1020(%rbp),%rdx
lea    0xb25(%rip),%rsi
call   1090 <fprintf@plt>
mov    0x2ac7(%rip),%rax
mov    (%rax),%edi
lea    -0x2020(%rbp),%rdx
lea    0xb09(%rip),%rsi
call   1090 <fprintf@plt>
cmpl   $0x1,-0x8(%rbp)
jle    1531 <main+0x3a1>
mov    -0x18(%rbp),%rdi
call   1060 <fclose@plt>
cmpl   $0x0,-0x2828(%rbp)
jne    154a <main+0x3ba>
movl   $0x0,-0x4(%rbp)
jmp    1551 <main+0x3c1>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2830,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2818,%rsp
mov    %edi,%ebp
cmp    $0x1,%edi
jne    11b4 <main+0x24>
mov    0x2e39(%rip),%rax
mov    (%rax),%r14
jmp    11d3 <main+0x43>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
lea    0xe3e(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%r14
test   %rax,%rax
je     140d <main+0x27d>
lea    0x10(%rsp),%rdi
mov    $0x800,%esi
mov    %r14,%rdx
call   1080 <fgets@plt>
mov    $0x1,%ebx
test   %rax,%rax
mov    %ebp,0x4(%rsp)
je     1225 <main+0x95>
lea    0x10(%rsp),%rdi
call   1070 <strlen@plt>
cmp    $0x2,%eax
jl     1225 <main+0x95>
cmpb   $0x23,0x10(%rsp)
je     1225 <main+0x95>
lea    0x10(%rsp),%rdi
lea    0x1010(%rsp),%rsi
lea    0x2010(%rsp),%rdx
call   1050 <parse_two@plt>
mov    %eax,%ebx
mov    %r14,%rdi
call   10a0 <feof@plt>
or     %ebx,%eax
jne    127f <main+0xef>
lea    0x10(%rsp),%rdi
mov    $0x800,%esi
mov    %r14,%rdx
call   1080 <fgets@plt>
mov    $0x1,%ebx
test   %rax,%rax
je     127f <main+0xef>
lea    0x10(%rsp),%rdi
call   1070 <strlen@plt>
cmp    $0x2,%eax
jl     127f <main+0xef>
cmpb   $0x23,0x10(%rsp)
je     127f <main+0xef>
lea    0x10(%rsp),%rdi
lea    0x810(%rsp),%rsi
lea    0x1810(%rsp),%rdx
call   1050 <parse_two@plt>
mov    %eax,%ebx
mov    %r14,0x8(%rsp)
mov    %r14,%rdi
call   10a0 <feof@plt>
test   %ebx,%ebx
sete   %r15b
xor    %r14d,%r14d
or     %ebx,%eax
jne    13bc <main+0x22c>
xor    %r14d,%r14d
lea    0x2010(%rsp),%rbx
mov    0x8(%rsp),%rbp
jmp    12cb <main+0x13b>
nop
mov    %rbp,%rdi
call   10a0 <feof@plt>
test   %r13d,%r13d
sete   %r15b
or     %r13d,%eax
mov    %r12,%rbx
jne    13bc <main+0x22c>
mov    %rbx,%rdi
lea    0x1810(%rsp),%r15
mov    %r15,%rsi
mov    $0x800,%edx
call   1040 <strncmp@plt>
mov    $0x0,%ecx
test   %rax,%rax
jne    1331 <main+0x1a1>
test   %r14d,%r14d
jne    130f <main+0x17f>
mov    0x2cd7(%rip),%rax
mov    (%rax),%edi
lea    0xd20(%rip),%rsi
lea    0x1010(%rsp),%rdx
call   1090 <fprintf@plt>
mov    0x2cba(%rip),%rax
mov    (%rax),%edi
lea    0xd03(%rip),%rsi
lea    0x810(%rsp),%rdx
call   1090 <fprintf@plt>
mov    $0x1,%ecx
mov    %ecx,%r14d
lea    0x1010(%rsp),%rdi
lea    0x810(%rsp),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
mov    %rbx,%r12
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x800,%esi
mov    %rbp,%rdx
call   1080 <fgets@plt>
mov    $0x1,%r13d
test   %rax,%rax
je     12b0 <main+0x120>
mov    %rbx,%rdi
call   1070 <strlen@plt>
cmp    $0x2,%eax
jl     12b0 <main+0x120>
cmpb   $0x23,0x10(%rsp)
je     12b0 <main+0x120>
mov    %rbx,%rdi
lea    0x810(%rsp),%rsi
mov    %r15,%rdx
call   1050 <parse_two@plt>
mov    %eax,%r13d
jmp    12b0 <main+0x120>
test   %r15b,%r15b
mov    0x4(%rsp),%ebx
je     13e4 <main+0x254>
lea    0x2010(%rsp),%rdi
lea    0x1810(%rsp),%rsi
mov    $0x800,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     142d <main+0x29d>
cmp    $0x2,%ebx
jl     13f3 <main+0x263>
mov    0x8(%rsp),%rdi
call   1060 <fclose@plt>
xor    $0x1,%r15b
movzbl %r15b,%eax
add    $0x2818,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2bc4(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rbx),%rdx
lea    0xbe1(%rip),%rsi
call   1090 <fprintf@plt>
mov    $0x1,%eax
jmp    13fb <main+0x26b>
test   %r14d,%r14d
jne    144f <main+0x2bf>
mov    0x2b97(%rip),%rax
mov    (%rax),%edi
lea    0xbe0(%rip),%rsi
lea    0x1010(%rsp),%rdx
call   1090 <fprintf@plt>
mov    0x2b7a(%rip),%rax
mov    (%rax),%edi
lea    0xbc3(%rip),%rsi
lea    0x810(%rsp),%rdx
call   1090 <fprintf@plt>
cmp    $0x2,%ebx
jge    13e9 <main+0x259>
jmp    13f3 <main+0x263>

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

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