#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_three(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];
  char item11[2048], item12[2048], item13[2048];
  int rc = 0;
  if (argc == 1)
    infile = stdin;
  else if ((infile = fopen(argv[1], "r")) == NULL) {
    fprintf(stderr, "rep_hash 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_three(line, item01, item02, item03);
  else
    rc = 1;
  if ((!feof(infile)) && (rc == 0)) {
    status = fgets(line, 2048, infile);
    if ((status != NULL) && ((int)strlen(line) > 1) && (line[0] != '#'))
      rc = parse_three(line, item11, item12, item13);
    else
      rc = 1;
  }
  while ((!feof(infile)) && (rc == 0)) {
    if ((strncmp(item02, item12, 2048) == 0) &&
        (strncmp(item03, item13, 2048) == 0))
      fprintf(stdout, "%s\t%s\n", item01, item11);
    strncpy(item01, item11, 2048);
    strncpy(item02, item12, 2048);
    strncpy(item03, item13, 2048);
    status = fgets(line, 2048, infile);
    if ((status != NULL) && ((int)strlen(line) > 1) && (line[0] != '#'))
      rc = parse_three(line, item11, item12, item13);
    else
      rc = 1;
  }
  if ((rc == 0) && (strncmp(item02, item12, 2048) == 0) &&
      (strncmp(item03, item13, 2048) == 0))
    fprintf(stdout, "%s\t%s\n", item01, item11);
  if (argc > 1)
    (void)fclose(infile);
  if (rc == 3)
    return (0);
  else
    return (1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3830,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x3824(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    11d0 <main+0x40>
mov    0x2e24(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    1222 <main+0x92>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe21(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    121d <main+0x8d>
mov    0x2ddf(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xdf8(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1566 <main+0x3d6>
jmp    1222 <main+0x92>
lea    -0x820(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x800,%esi
call   1070 <fgets@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1297 <main+0x107>
lea    -0x820(%rbp),%rdi
call   1060 <strlen@plt>
cmp    $0x1,%eax
jle    1297 <main+0x107>
movsbl -0x820(%rbp),%eax
cmp    $0x23,%eax
je     1297 <main+0x107>
lea    -0x820(%rbp),%rdi
lea    -0x1020(%rbp),%rsi
lea    -0x1820(%rbp),%rdx
lea    -0x2020(%rbp),%rcx
call   1080 <parse_three@plt>
mov    %eax,-0x3824(%rbp)
jmp    12a1 <main+0x111>
movl   $0x1,-0x3824(%rbp)
mov    -0x18(%rbp),%rdi
call   10a0 <feof@plt>
cmp    $0x0,%eax
jne    1344 <main+0x1b4>
cmpl   $0x0,-0x3824(%rbp)
jne    1344 <main+0x1b4>
lea    -0x820(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x800,%esi
call   1070 <fgets@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1335 <main+0x1a5>
lea    -0x820(%rbp),%rdi
call   1060 <strlen@plt>
cmp    $0x1,%eax
jle    1335 <main+0x1a5>
movsbl -0x820(%rbp),%eax
cmp    $0x23,%eax
je     1335 <main+0x1a5>
lea    -0x820(%rbp),%rdi
lea    -0x2820(%rbp),%rsi
lea    -0x3020(%rbp),%rdx
lea    -0x3820(%rbp),%rcx
call   1080 <parse_three@plt>
mov    %eax,-0x3824(%rbp)
jmp    133f <main+0x1af>
movl   $0x1,-0x3824(%rbp)
jmp    1344 <main+0x1b4>
jmp    1349 <main+0x1b9>
mov    -0x18(%rbp),%rdi
call   10a0 <feof@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x3825(%rbp)
jne    1375 <main+0x1e5>
cmpl   $0x0,-0x3824(%rbp)
sete   %al
mov    %al,-0x3825(%rbp)
mov    -0x3825(%rbp),%al
test   $0x1,%al
jne    1388 <main+0x1f8>
jmp    14bd <main+0x32d>
lea    -0x1820(%rbp),%rdi
lea    -0x3020(%rbp),%rsi
mov    $0x800,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    13f1 <main+0x261>
lea    -0x2020(%rbp),%rdi
lea    -0x3820(%rbp),%rsi
mov    $0x800,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    13f1 <main+0x261>
mov    0x2bfd(%rip),%rax
mov    (%rax),%edi
lea    -0x1020(%rbp),%rdx
lea    -0x2820(%rbp),%rcx
lea    0xc38(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
lea    -0x1020(%rbp),%rdi
lea    -0x2820(%rbp),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
lea    -0x1820(%rbp),%rdi
lea    -0x3020(%rbp),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
lea    -0x2020(%rbp),%rdi
lea    -0x3820(%rbp),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
lea    -0x820(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x800,%esi
call   1070 <fgets@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     14ae <main+0x31e>
lea    -0x820(%rbp),%rdi
call   1060 <strlen@plt>
cmp    $0x1,%eax
jle    14ae <main+0x31e>
movsbl -0x820(%rbp),%eax
cmp    $0x23,%eax
je     14ae <main+0x31e>
lea    -0x820(%rbp),%rdi
lea    -0x2820(%rbp),%rsi
lea    -0x3020(%rbp),%rdx
lea    -0x3820(%rbp),%rcx
call   1080 <parse_three@plt>
mov    %eax,-0x3824(%rbp)
jmp    14b8 <main+0x328>
movl   $0x1,-0x3824(%rbp)
jmp    1349 <main+0x1b9>
cmpl   $0x0,-0x3824(%rbp)
jne    1533 <main+0x3a3>
lea    -0x1820(%rbp),%rdi
lea    -0x3020(%rbp),%rsi
mov    $0x800,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1533 <main+0x3a3>
lea    -0x2020(%rbp),%rdi
lea    -0x3820(%rbp),%rsi
mov    $0x800,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1533 <main+0x3a3>
mov    0x2abb(%rip),%rax
mov    (%rax),%edi
lea    -0x1020(%rbp),%rdx
lea    -0x2820(%rbp),%rcx
lea    0xaf6(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
cmpl   $0x1,-0x8(%rbp)
jle    1546 <main+0x3b6>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
cmpl   $0x3,-0x3824(%rbp)
jne    155f <main+0x3cf>
movl   $0x0,-0x4(%rbp)
jmp    1566 <main+0x3d6>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x3830,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x3818,%rsp
mov    %edi,%ebx
cmp    $0x1,%edi
jne    11b4 <main+0x24>
mov    0x2e39(%rip),%rax
mov    (%rax),%r15
jmp    11d3 <main+0x43>
mov    %rsi,%rbp
mov    0x8(%rsi),%rdi
lea    0xe3e(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%r15
test   %rax,%rax
je     1468 <main+0x2d8>
lea    0x10(%rsp),%rdi
mov    $0x800,%esi
mov    %r15,%rdx
call   1070 <fgets@plt>
mov    $0x1,%ebp
test   %rax,%rax
mov    %ebx,0xc(%rsp)
je     122d <main+0x9d>
lea    0x10(%rsp),%rdi
call   1060 <strlen@plt>
cmp    $0x2,%eax
jl     122d <main+0x9d>
cmpb   $0x23,0x10(%rsp)
je     122d <main+0x9d>
lea    0x10(%rsp),%rdi
lea    0x1810(%rsp),%rsi
lea    0x3010(%rsp),%rdx
lea    0x1010(%rsp),%rcx
call   1080 <parse_three@plt>
mov    %eax,%ebp
mov    %r15,%rdi
call   10a0 <feof@plt>
or     %ebp,%eax
jne    128f <main+0xff>
lea    0x10(%rsp),%rdi
mov    $0x800,%esi
mov    %r15,%rdx
call   1070 <fgets@plt>
mov    $0x1,%ebp
test   %rax,%rax
je     128f <main+0xff>
lea    0x10(%rsp),%rdi
call   1060 <strlen@plt>
cmp    $0x2,%eax
jl     128f <main+0xff>
cmpb   $0x23,0x10(%rsp)
je     128f <main+0xff>
lea    0x10(%rsp),%rdi
lea    0x810(%rsp),%rsi
lea    0x2810(%rsp),%rdx
lea    0x2010(%rsp),%rcx
call   1080 <parse_three@plt>
mov    %eax,%ebp
mov    %r15,%rdi
call   10a0 <feof@plt>
test   %ebp,%ebp
sete   %cl
or     %ebp,%eax
jne    13d6 <main+0x246>
lea    0x3010(%rsp),%r12
lea    0x2810(%rsp),%rbx
lea    0x2010(%rsp),%r14
lea    0x10(%rsp),%r13
jmp    12e5 <main+0x155>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
call   10a0 <feof@plt>
test   %ebp,%ebp
sete   %cl
or     %ebp,%eax
jne    13d6 <main+0x246>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    $0x800,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
jne    1340 <main+0x1b0>
lea    0x1010(%rsp),%rdi
mov    %r14,%rsi
mov    $0x800,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
jne    1340 <main+0x1b0>
mov    0x2cb5(%rip),%rax
mov    (%rax),%edi
lea    0xcfe(%rip),%rsi
lea    0x1810(%rsp),%rdx
lea    0x810(%rsp),%rcx
xor    %eax,%eax
call   1090 <fprintf@plt>
nopl   0x0(%rax,%rax,1)
lea    0x1810(%rsp),%rdi
lea    0x810(%rsp),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
lea    0x1010(%rsp),%rdi
mov    %r14,%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
mov    %r13,%rdi
mov    $0x800,%esi
mov    %r15,%rdx
call   1070 <fgets@plt>
mov    $0x1,%ebp
test   %rax,%rax
je     12d0 <main+0x140>
mov    %r13,%rdi
call   1060 <strlen@plt>
cmp    $0x2,%eax
jl     12d0 <main+0x140>
cmpb   $0x23,0x10(%rsp)
je     12d0 <main+0x140>
mov    %r13,%rdi
lea    0x810(%rsp),%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1080 <parse_three@plt>
mov    %eax,%ebp
jmp    12d0 <main+0x140>
test   %cl,%cl
je     143f <main+0x2af>
lea    0x3010(%rsp),%rdi
lea    0x2810(%rsp),%rsi
mov    $0x800,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
jne    143f <main+0x2af>
lea    0x1010(%rsp),%rdi
lea    0x2010(%rsp),%rsi
mov    $0x800,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
jne    143f <main+0x2af>
mov    0x2bb1(%rip),%rax
mov    (%rax),%edi
lea    0xbfa(%rip),%rsi
lea    0x1810(%rsp),%rdx
lea    0x810(%rsp),%rcx
xor    %eax,%eax
call   1090 <fprintf@plt>
cmpl   $0x2,0xc(%rsp)
jl     144e <main+0x2be>
mov    %r15,%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
cmp    $0x3,%ebp
setne  %al
add    $0x3818,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2b69(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rbp),%rdx
lea    0xb86(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    $0x1,%eax
jmp    1456 <main+0x2c6>

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

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