#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 BUFSIZ;
int cmp_cache(char *, char *, int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int fgetl(int /*<<< orphan*/ *, int, char *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  FILE *fd1;
  FILE *fd2;
  if (argc != 3) {
    fprintf(stderr, "usage: %s <leftfile> <foundfile>\n", argv[0]);
    return (-1);
  }
  char *infile = argv[1];
  char *removefile = argv[2];
  if ((fd1 = fopen(infile, "rb")) == NULL) {
    fprintf(stderr, "%s: %s\n", infile, strerror(errno));
    return (-1);
  }
  if ((fd2 = fopen(removefile, "rb")) == NULL) {
    fprintf(stderr, "%s: %s\n", removefile, strerror(errno));
    return (-1);
  }
  int len;
  char line_buf1[BUFSIZ];
  char line_buf2[BUFSIZ];
  len = 0;
  if ((len = fgetl(fd1, BUFSIZ, line_buf1)) == -1)
    memset(line_buf1, 0, BUFSIZ);
  if (fgetl(fd2, BUFSIZ, line_buf2) == -1)
    memset(line_buf2, 0, BUFSIZ);
  int comp = 1;
  while (!feof(fd1) && !feof(fd2)) {
    comp = cmp_cache(line_buf1, line_buf2, len);
    if (comp == 0) {
      printf("%s\n", line_buf2 + len + 1);
      if ((len = fgetl(fd1, BUFSIZ, line_buf1)) == -1)
        memset(line_buf1, 0, BUFSIZ);
      if (fgetl(fd2, BUFSIZ, line_buf2) == -1)
        memset(line_buf2, 0, BUFSIZ);
    } else if (comp > 0) {
      if (fgetl(fd2, BUFSIZ, line_buf2) == -1)
        memset(line_buf2, 0, BUFSIZ);
    } else if (comp < 0) {
      if ((len = fgetl(fd1, BUFSIZ, line_buf1)) == -1)
        memset(line_buf1, 0, BUFSIZ);
    }
  }
  fclose(fd1);
  fclose(fd2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     11dd <main+0x4d>
mov    0x2e26(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe36(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1531 <main+0x3a1>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
lea    0xe22(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1259 <main+0xc9>
mov    0x2dc6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x64(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    0x2da2(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0x64(%rbp),%edi
mov    -0x60(%rbp),%rdx
mov    %rax,%rcx
lea    0xddf(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1531 <main+0x3a1>
mov    -0x30(%rbp),%rdi
lea    0xdbe(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    12bd <main+0x12d>
mov    0x2d62(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x74(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    0x2d3e(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0x74(%rbp),%edi
mov    -0x70(%rbp),%rdx
mov    %rax,%rcx
lea    0xd7b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1531 <main+0x3a1>
mov    0x2d14(%rip),%rax
mov    (%rax),%ecx
mov    %rsp,%rdx
mov    %rdx,-0x40(%rbp)
mov    %rcx,%rsi
add    $0xf,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x88(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x48(%rbp)
mov    (%rax),%eax
mov    %rax,%rsi
add    $0xf,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rcx
sub    %rsi,%rcx
mov    %rcx,-0x80(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2cbc(%rip),%rax
mov    (%rax),%esi
call   1080 <fgetl@plt>
mov    %eax,-0x34(%rbp)
cmp    $0xffffffff,%eax
jne    1346 <main+0x1b6>
mov    -0x88(%rbp),%rdi
mov    0x2c9b(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <memset@plt>
mov    -0x80(%rbp),%rdx
mov    -0x20(%rbp),%rdi
mov    0x2c83(%rip),%rax
mov    (%rax),%esi
call   1080 <fgetl@plt>
cmp    $0xffffffff,%eax
jne    1379 <main+0x1e9>
mov    -0x80(%rbp),%rdi
mov    0x2c68(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <memset@plt>
movl   $0x1,-0x54(%rbp)
mov    -0x18(%rbp),%rdi
call   1070 <feof@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x89(%rbp)
jne    13b3 <main+0x223>
mov    -0x20(%rbp),%rdi
call   1070 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x89(%rbp)
mov    -0x89(%rbp),%al
test   $0x1,%al
jne    13c6 <main+0x236>
jmp    1511 <main+0x381>
mov    -0x80(%rbp),%rsi
mov    -0x88(%rbp),%rdi
mov    -0x34(%rbp),%edx
call   1090 <cmp_cache@plt>
mov    %eax,-0x54(%rbp)
cmpl   $0x0,-0x54(%rbp)
jne    1475 <main+0x2e5>
mov    -0x80(%rbp),%rsi
movslq -0x34(%rbp),%rax
add    %rax,%rsi
add    $0x1,%rsi
lea    0xc2d(%rip),%rdi
call   1040 <printf@plt>
mov    -0x88(%rbp),%rdx
mov    -0x18(%rbp),%rdi
mov    0x2bc5(%rip),%rax
mov    (%rax),%esi
call   1080 <fgetl@plt>
mov    %eax,-0x34(%rbp)
cmp    $0xffffffff,%eax
jne    143d <main+0x2ad>
mov    -0x88(%rbp),%rdi
mov    0x2ba4(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <memset@plt>
mov    -0x80(%rbp),%rdx
mov    -0x20(%rbp),%rdi
mov    0x2b8c(%rip),%rax
mov    (%rax),%esi
call   1080 <fgetl@plt>
cmp    $0xffffffff,%eax
jne    1470 <main+0x2e0>
mov    -0x80(%rbp),%rdi
mov    0x2b71(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <memset@plt>
jmp    150c <main+0x37c>
cmpl   $0x0,-0x54(%rbp)
jle    14b7 <main+0x327>
mov    -0x80(%rbp),%rdx
mov    -0x20(%rbp),%rdi
mov    0x2b4a(%rip),%rax
mov    (%rax),%esi
call   1080 <fgetl@plt>
cmp    $0xffffffff,%eax
jne    14b2 <main+0x322>
mov    -0x80(%rbp),%rdi
mov    0x2b2f(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <memset@plt>
jmp    1507 <main+0x377>
cmpl   $0x0,-0x54(%rbp)
jge    1502 <main+0x372>
mov    -0x88(%rbp),%rdx
mov    -0x18(%rbp),%rdi
mov    0x2b05(%rip),%rax
mov    (%rax),%esi
call   1080 <fgetl@plt>
mov    %eax,-0x34(%rbp)
cmp    $0xffffffff,%eax
jne    14fd <main+0x36d>
mov    -0x88(%rbp),%rdi
mov    0x2ae4(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <memset@plt>
jmp    1502 <main+0x372>
jmp    1507 <main+0x377>
jmp    150c <main+0x37c>
jmp    1380 <main+0x1f0>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
cmp    $0x3,%edi
jne    1295 <main+0x105>
mov    0x8(%rsi),%rbx
mov    0x10(%rsi),%r12
lea    0xe69(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <fopen@plt>
test   %rax,%rax
je     12b1 <main+0x121>
mov    %rax,%r15
lea    0xe4e(%rip),%rsi
mov    %r12,%rdi
call   10a0 <fopen@plt>
test   %rax,%rax
je     12d8 <main+0x148>
mov    %rax,%r14
mov    %rsp,-0x30(%rbp)
mov    0x2de5(%rip),%rcx
mov    (%rcx),%eax
mov    %rsp,%r12
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
mov    (%rcx),%esi
mov    %rsp,%r13
mov    %rsi,%rax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r13
mov    %r13,%rsp
mov    %r15,%rdi
mov    %r12,%rdx
call   1080 <fgetl@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1241 <main+0xb1>
mov    0x2da3(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
mov    0x2d90(%rip),%rax
mov    (%rax),%esi
mov    %r14,%rdi
mov    %r13,%rdx
call   1080 <fgetl@plt>
cmp    $0xffffffff,%eax
jne    126d <main+0xdd>
mov    0x2d77(%rip),%rax
mov    (%rax),%edx
mov    %r13,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
mov    %r15,%rdi
call   1070 <feof@plt>
test   %eax,%eax
je     1319 <main+0x189>
mov    %r15,%rdi
call   1030 <fclose@plt>
mov    %r14,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
mov    -0x30(%rbp),%rsp
jmp    130a <main+0x17a>
mov    0x2d44(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xd58(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    1305 <main+0x175>
mov    0x2d28(%rip),%rax
mov    (%rax),%r14d
mov    0x2d0e(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xd55(%rip),%rsi
mov    %r14d,%edi
mov    %rbx,%rdx
jmp    12fb <main+0x16b>
mov    0x2d01(%rip),%rax
mov    (%rax),%ebx
mov    0x2ce8(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xd2f(%rip),%rsi
mov    %ebx,%edi
mov    %r12,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0xffffffff,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x1(%r13),%rax
mov    %rax,-0x38(%rbp)
mov    %r15,-0x48(%rbp)
mov    %r14,-0x40(%rbp)
jmp    1353 <main+0x1c3>
mov    $0xffffffff,%ebx
mov    %r12,%rdi
mov    0x2c9e(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <memset@plt>
mov    %r15,%rdi
call   1070 <feof@plt>
test   %eax,%eax
jne    127d <main+0xed>
mov    %r14,%rdi
call   1070 <feof@plt>
test   %eax,%eax
jne    127d <main+0xed>
mov    %r12,%rdi
mov    %r13,%rsi
mov    %ebx,%edx
call   1090 <cmp_cache@plt>
test   %eax,%eax
je     13a0 <main+0x210>
mov    0x2c5d(%rip),%rax
mov    (%rax),%esi
jle    1410 <main+0x280>
mov    %r14,%rdi
mov    %r13,%rdx
call   1080 <fgetl@plt>
mov    %r13,%rdi
cmp    $0xffffffff,%eax
jne    1343 <main+0x1b3>
jmp    1333 <main+0x1a3>
nopl   0x0(%rax,%rax,1)
movslq %ebx,%rsi
add    -0x38(%rbp),%rsi
lea    0xc7b(%rip),%rdi
call   1040 <printf@plt>
mov    0x2c1e(%rip),%r14
mov    (%r14),%esi
mov    %r15,%rdi
mov    %r12,%r15
mov    %r12,%rdx
call   1080 <fgetl@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    13df <main+0x24f>
mov    (%r14),%edx
mov    %r15,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
mov    (%r14),%esi
mov    -0x40(%rbp),%r14
mov    %r14,%rdi
mov    %r13,%rdx
call   1080 <fgetl@plt>
mov    %r13,%rdi
cmp    $0xffffffff,%eax
mov    -0x48(%rbp),%rax
mov    %r15,%r12
mov    %rax,%r15
jne    1343 <main+0x1b3>
jmp    1333 <main+0x1a3>
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %r12,%rdx
call   1080 <fgetl@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1343 <main+0x1b3>
jmp    132b <main+0x19b>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"usage: %s <leftfile> <foundfile>\0A\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [8 x i8] c"%s: %s\0A\00"
@errno = global i32 0
@BUFSIZ = global i32 0
@.str.3 = [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 i32*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i64
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = load i32, i32* %4
%16 = icmp ne i32 %15, 3
br i1 %16, label %17, label %23
17: ; preds = %2
%18 = load i32, i32* @stderr
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 0
%21 = load i8*, i8** %20
%22 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %21)
store i32 -1, i32* %3
br label %144
23: ; preds = %2
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
store i8* %26, i8** %8
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 2
%29 = load i8*, i8** %28
store i8* %29, i8** %9
%30 = load i8*, i8** %8
%31 = call i32* @fopen(i8* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %31, i32** %6
%32 = icmp eq i32* %31, null
br i1 %32, label %33, label %39
33: ; preds = %23
%34 = load i32, i32* @stderr
%35 = load i8*, i8** %8
%36 = load i32, i32* @errno
%37 = call i8* @strerror(i32 %36)
%38 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %35, i8* %37)
store i32 -1, i32* %3
br label %144
39: ; preds = %23
%40 = load i8*, i8** %9
%41 = call i32* @fopen(i8* %40, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %41, i32** %7
%42 = icmp eq i32* %41, null
br i1 %42, label %43, label %49
43: ; preds = %39
%44 = load i32, i32* @stderr
%45 = load i8*, i8** %9
%46 = load i32, i32* @errno
%47 = call i8* @strerror(i32 %46)
%48 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %45, i8* %47)
store i32 -1, i32* %3
br label %144
49: ; preds = %39
%50 = load i32, i32* @BUFSIZ
%51 = zext i32 %50 to i64
%52 = call i8* @llvm.stacksave()
store i8* %52, i8** %11
%53 = alloca i8, i64 %51
store i64 %51, i64* %12
%54 = load i32, i32* @BUFSIZ
%55 = zext i32 %54 to i64
%56 = alloca i8, i64 %55
store i64 %55, i64* %13
store i32 0, i32* %10
%57 = load i32*, i32** %6
%58 = load i32, i32* @BUFSIZ
%59 = call i32 @fgetl(i32* %57, i32 %58, i8* %53)
store i32 %59, i32* %10
%60 = icmp eq i32 %59, -1
br i1 %60, label %61, label %64
61: ; preds = %49
%62 = load i32, i32* @BUFSIZ
%63 = call i32 @memset(i8* %53, i32 0, i32 %62)
br label %64
64: ; preds = %61, %49
%65 = load i32*, i32** %7
%66 = load i32, i32* @BUFSIZ
%67 = call i32 @fgetl(i32* %65, i32 %66, i8* %56)
%68 = icmp eq i32 %67, -1
br i1 %68, label %69, label %72
69: ; preds = %64
%70 = load i32, i32* @BUFSIZ
%71 = call i32 @memset(i8* %56, i32 0, i32 %70)
br label %72
72: ; preds = %69, %64
store i32 1, i32* %14
br label %73
73: ; preds = %137, %72
%74 = load i32*, i32** %6
%75 = call i32 @feof(i32* %74)
%76 = icmp ne i32 %75, 0
br i1 %76, label %82, label %77
77: ; preds = %73
%78 = load i32*, i32** %7
%79 = call i32 @feof(i32* %78)
%80 = icmp ne i32 %79, 0
%81 = xor i1 %80, true
br label %82
82: ; preds = %77, %73
%83 = phi i1 [ false, %73 ], [ %81, %77 ]
br i1 %83, label %84, label %138
84: ; preds = %82
%85 = load i32, i32* %10
%86 = call i32 @cmp_cache(i8* %53, i8* %56, i32 %85)
store i32 %86, i32* %14
%87 = load i32, i32* %14
%88 = icmp eq i32 %87, 0
br i1 %88, label %89, label %111
89: ; preds = %84
%90 = load i32, i32* %10
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds i8, i8* %56, i64 %91
%93 = getelementptr inbounds i8, i8* %92, i64 1
%94 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %93)
%95 = load i32*, i32** %6
%96 = load i32, i32* @BUFSIZ
%97 = call i32 @fgetl(i32* %95, i32 %96, i8* %53)
store i32 %97, i32* %10
%98 = icmp eq i32 %97, -1
br i1 %98, label %99, label %102
99: ; preds = %89
%100 = load i32, i32* @BUFSIZ
%101 = call i32 @memset(i8* %53, i32 0, i32 %100)
br label %102
102: ; preds = %99, %89
%103 = load i32*, i32** %7
%104 = load i32, i32* @BUFSIZ
%105 = call i32 @fgetl(i32* %103, i32 %104, i8* %56)
%106 = icmp eq i32 %105, -1
br i1 %106, label %107, label %110
107: ; preds = %102
%108 = load i32, i32* @BUFSIZ
%109 = call i32 @memset(i8* %56, i32 0, i32 %108)
br label %110
110: ; preds = %107, %102
br label %137
111: ; preds = %84
%112 = load i32, i32* %14
%113 = icmp sgt i32 %112, 0
br i1 %113, label %114, label %123
114: ; preds = %111
%115 = load i32*, i32** %7
%116 = load i32, i32* @BUFSIZ
%117 = call i32 @fgetl(i32* %115, i32 %116, i8* %56)
%118 = icmp eq i32 %117, -1
br i1 %118, label %119, label %122
119: ; preds = %114
%120 = load i32, i32* @BUFSIZ
%121 = call i32 @memset(i8* %56, i32 0, i32 %120)
br label %122
122: ; preds = %119, %114
br label %136
123: ; preds = %111
%124 = load i32, i32* %14
%125 = icmp slt i32 %124, 0
br i1 %125, label %126, label %135
126: ; preds = %123
%127 = load i32*, i32** %6
%128 = load i32, i32* @BUFSIZ
%129 = call i32 @fgetl(i32* %127, i32 %128, i8* %53)
store i32 %129, i32* %10
%130 = icmp eq i32 %129, -1
br i1 %130, label %131, label %134
131: ; preds = %126
%132 = load i32, i32* @BUFSIZ
%133 = call i32 @memset(i8* %53, i32 0, i32 %132)
br label %134
134: ; preds = %131, %126
br label %135
135: ; preds = %134, %123
br label %136
136: ; preds = %135, %122
br label %137
137: ; preds = %136, %110
br label %73
138: ; preds = %82
%139 = load i32*, i32** %6
%140 = call i32 @fclose(i32* %139)
%141 = load i32*, i32** %7
%142 = call i32 @fclose(i32* %141)
store i32 0, i32* %3
%143 = load i8*, i8** %11
br label %144
144: ; preds = %138, %43, %33, %17
%145 = load i32, i32* %3
ret i32 %145
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"usage: %s <leftfile> <foundfile>\0A\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [8 x i8] c"%s: %s\0A\00"
@errno = global i32 0
@BUFSIZ = global i32 0
@.str.3 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %95
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = load i8*, i8** %11
%13 = tail call i32* @fopen(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp eq i32* %13, null
br i1 %14, label %15, label %20
15: ; preds = %8
%16 = load i32, i32* @stderr
%17 = load i32, i32* @errno
%18 = tail call i8* @strerror(i32 %17)
%19 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %10, i8* %18)
br label %95
20: ; preds = %8
%21 = tail call i32* @fopen(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%22 = icmp eq i32* %21, null
br i1 %22, label %23, label %28
23: ; preds = %20
%24 = load i32, i32* @stderr
%25 = load i32, i32* @errno
%26 = tail call i8* @strerror(i32 %25)
%27 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %12, i8* %26)
br label %95
28: ; preds = %20
%29 = load i32, i32* @BUFSIZ
%30 = zext i32 %29 to i64
%31 = tail call i8* @llvm.stacksave()
%32 = alloca i8, i64 %30
%33 = load i32, i32* @BUFSIZ
%34 = zext i32 %33 to i64
%35 = alloca i8, i64 %34
%36 = call i32 @fgetl(i32* %13, i32 %33, i8* %32)
%37 = icmp eq i32 %36, -1
br i1 %37, label %38, label %41
38: ; preds = %28
%39 = load i32, i32* @BUFSIZ
%40 = call i32 @memset(i8* %32, i32 0, i32 %39)
br label %41
41: ; preds = %38, %28
%42 = load i32, i32* @BUFSIZ
%43 = call i32 @fgetl(i32* %21, i32 %42, i8* %35)
%44 = icmp eq i32 %43, -1
br i1 %44, label %45, label %48
45: ; preds = %41
%46 = load i32, i32* @BUFSIZ
%47 = call i32 @memset(i8* %35, i32 0, i32 %46)
br label %48
48: ; preds = %45, %41
%49 = call i32 @feof(i32* %13)
%50 = icmp eq i32 %49, 0
br i1 %50, label %51, label %92
51: ; preds = %48
%52 = getelementptr inbounds i8, i8* %35, i64 1
br label %53
53: ; preds = %51, %88
%54 = phi i32 [ %89, %88 ], [ %36, %51 ]
%55 = call i32 @feof(i32* %21)
%56 = icmp eq i32 %55, 0
br i1 %56, label %57, label %92
57: ; preds = %53
%58 = call i32 @cmp_cache(i8* %32, i8* %35, i32 %54)
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %74
60: ; preds = %57
%61 = sext i32 %54 to i64
%62 = getelementptr inbounds i8, i8* %52, i64 %61
%63 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %62)
%64 = load i32, i32* @BUFSIZ
%65 = call i32 @fgetl(i32* %13, i32 %64, i8* %32)
%66 = icmp eq i32 %65, -1
br i1 %66, label %67, label %70
67: ; preds = %60
%68 = load i32, i32* @BUFSIZ
%69 = call i32 @memset(i8* %32, i32 0, i32 %68)
br label %70
70: ; preds = %67, %60
%71 = load i32, i32* @BUFSIZ
%72 = call i32 @fgetl(i32* %21, i32 %71, i8* %35)
%73 = icmp eq i32 %72, -1
br i1 %73, label %83, label %88
74: ; preds = %57
%75 = icmp sgt i32 %58, 0
%76 = load i32, i32* @BUFSIZ
br i1 %75, label %77, label %80
77: ; preds = %74
%78 = call i32 @fgetl(i32* %21, i32 %76, i8* %35)
%79 = icmp eq i32 %78, -1
br i1 %79, label %83, label %88
80: ; preds = %74
%81 = call i32 @fgetl(i32* %13, i32 %76, i8* %32)
%82 = icmp eq i32 %81, -1
br i1 %82, label %83, label %88
83: ; preds = %80, %77, %70
%84 = phi i8* [ %35, %70 ], [ %35, %77 ], [ %32, %80 ]
%85 = phi i32 [ %65, %70 ], [ %54, %77 ], [ -1, %80 ]
%86 = load i32, i32* @BUFSIZ
%87 = call i32 @memset(i8* %84, i32 0, i32 %86)
br label %88
88: ; preds = %83, %77, %80, %70
%89 = phi i32 [ %65, %70 ], [ %54, %77 ], [ %81, %80 ], [ %85, %83 ]
%90 = call i32 @feof(i32* %13)
%91 = icmp eq i32 %90, 0
br i1 %91, label %53, label %92
92: ; preds = %53, %88, %48
%93 = call i32 @fclose(i32* %13)
%94 = call i32 @fclose(i32* %21)
br label %95
95: ; preds = %15, %23, %92, %4
%96 = phi i32 [ -1, %4 ], [ -1, %15 ], [ -1, %23 ], [ 0, %92 ]
ret i32 %96
}