#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 /*<<< 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*/ puts(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 infile removefile\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));
    fclose(fd1);
    return (-1);
  }
  char line_buf1[BUFSIZ];
  char line_buf2[BUFSIZ];
  if (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);
    if (comp == 0) {
      if (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) {
      puts(line_buf1);
      if (fgetl(fd1, BUFSIZ, line_buf1) == -1)
        memset(line_buf1, 0, BUFSIZ);
    }
  }
  if (!feof(fd1) && comp == 0)
    puts(line_buf1);
  if (comp > 0)
    puts(line_buf1);
  while (!feof(fd1)) {
    if (fgetl(fd1, BUFSIZ, line_buf1) == -1) {
      memset(line_buf1, 0, BUFSIZ);
      continue;
    }
    puts(line_buf1);
  }
  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    15a1 <main+0x411>
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    0xe1d(%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,-0x5c(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    0x2da2(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0x5c(%rbp),%edi
mov    -0x58(%rbp),%rdx
mov    %rax,%rcx
lea    0xdda(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    15a1 <main+0x411>
mov    -0x30(%rbp),%rdi
lea    0xdb9(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    12c6 <main+0x136>
mov    0x2d62(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    0x2d3e(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0x6c(%rbp),%edi
mov    -0x68(%rbp),%rdx
mov    %rax,%rcx
lea    0xd76(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    15a1 <main+0x411>
mov    0x2d0b(%rip),%rax
mov    (%rax),%ecx
mov    %rsp,%rdx
mov    %rdx,-0x38(%rbp)
mov    %rcx,%rsi
add    $0xf,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x80(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x40(%rbp)
mov    (%rax),%eax
mov    %rax,%rsi
add    $0xf,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rcx
sub    %rsi,%rcx
mov    %rcx,-0x78(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x48(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2cbd(%rip),%rax
mov    (%rax),%esi
call   1080 <fgetl@plt>
cmp    $0xffffffff,%eax
jne    133f <main+0x1af>
mov    -0x80(%rbp),%rdi
mov    0x2ca2(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <memset@plt>
mov    -0x78(%rbp),%rdx
mov    -0x20(%rbp),%rdi
mov    0x2c8a(%rip),%rax
mov    (%rax),%esi
call   1080 <fgetl@plt>
cmp    $0xffffffff,%eax
jne    1372 <main+0x1e2>
mov    -0x78(%rbp),%rdi
mov    0x2c6f(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <memset@plt>
movl   $0x1,-0x4c(%rbp)
mov    -0x18(%rbp),%rdi
call   1070 <feof@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x81(%rbp)
jne    13ac <main+0x21c>
mov    -0x20(%rbp),%rdi
call   1070 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x81(%rbp)
mov    -0x81(%rbp),%al
test   $0x1,%al
jne    13bf <main+0x22f>
jmp    14e0 <main+0x350>
mov    -0x78(%rbp),%rsi
mov    -0x80(%rbp),%rdi
call   1090 <cmp_cache@plt>
mov    %eax,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
jne    1444 <main+0x2b4>
mov    -0x80(%rbp),%rdx
mov    -0x18(%rbp),%rdi
mov    0x2bf0(%rip),%rax
mov    (%rax),%esi
call   1080 <fgetl@plt>
cmp    $0xffffffff,%eax
jne    140c <main+0x27c>
mov    -0x80(%rbp),%rdi
mov    0x2bd5(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <memset@plt>
mov    -0x78(%rbp),%rdx
mov    -0x20(%rbp),%rdi
mov    0x2bbd(%rip),%rax
mov    (%rax),%esi
call   1080 <fgetl@plt>
cmp    $0xffffffff,%eax
jne    143f <main+0x2af>
mov    -0x78(%rbp),%rdi
mov    0x2ba2(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <memset@plt>
jmp    14db <main+0x34b>
cmpl   $0x0,-0x4c(%rbp)
jle    1486 <main+0x2f6>
mov    -0x78(%rbp),%rdx
mov    -0x20(%rbp),%rdi
mov    0x2b7b(%rip),%rax
mov    (%rax),%esi
call   1080 <fgetl@plt>
cmp    $0xffffffff,%eax
jne    1481 <main+0x2f1>
mov    -0x78(%rbp),%rdi
mov    0x2b60(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <memset@plt>
jmp    14d6 <main+0x346>
cmpl   $0x0,-0x4c(%rbp)
jge    14d1 <main+0x341>
mov    -0x80(%rbp),%rdi
call   1030 <puts@plt>
mov    -0x80(%rbp),%rdx
mov    -0x18(%rbp),%rdi
mov    0x2b30(%rip),%rax
mov    (%rax),%esi
call   1080 <fgetl@plt>
cmp    $0xffffffff,%eax
jne    14cc <main+0x33c>
mov    -0x80(%rbp),%rdi
mov    0x2b15(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <memset@plt>
jmp    14d1 <main+0x341>
jmp    14d6 <main+0x346>
jmp    14db <main+0x34b>
jmp    1379 <main+0x1e9>
mov    -0x18(%rbp),%rdi
call   1070 <feof@plt>
cmp    $0x0,%eax
jne    1505 <main+0x375>
cmpl   $0x0,-0x4c(%rbp)
jne    1505 <main+0x375>
mov    -0x80(%rbp),%rdi
call   1030 <puts@plt>
cmpl   $0x0,-0x4c(%rbp)
jle    1518 <main+0x388>
mov    -0x80(%rbp),%rdi
call   1030 <puts@plt>
jmp    151d <main+0x38d>
mov    -0x18(%rbp),%rdi
call   1070 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    153b <main+0x3ab>
jmp    1581 <main+0x3f1>
mov    -0x80(%rbp),%rdx
mov    -0x18(%rbp),%rdi
mov    0x2a8e(%rip),%rax
mov    (%rax),%esi
call   1080 <fgetl@plt>
cmp    $0xffffffff,%eax
jne    1573 <main+0x3e3>
mov    -0x80(%rbp),%rdi
mov    0x2a73(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <memset@plt>
jmp    151d <main+0x38d>
mov    -0x80(%rbp),%rdi
call   1030 <puts@plt>
jmp    151d <main+0x38d>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x38(%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    $0x18,%rsp
cmp    $0x3,%edi
jne    126d <main+0xdd>
mov    0x8(%rsi),%rbx
mov    0x10(%rsi),%r12
lea    0xe64(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <fopen@plt>
test   %rax,%rax
je     128c <main+0xfc>
mov    %rax,%r15
lea    0xe49(%rip),%rsi
mov    %r12,%rdi
call   10a0 <fopen@plt>
mov    %rax,-0x30(%rbp)
test   %rax,%rax
je     13c1 <main+0x231>
mov    %rsp,-0x38(%rbp)
mov    0x2de4(%rip),%r14
mov    (%r14),%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    (%r14),%esi
mov    %rsp,%r12
mov    %rsi,%rax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
mov    %r15,%rdi
mov    %rbx,%rdx
call   1080 <fgetl@plt>
cmp    $0xffffffff,%eax
jne    123c <main+0xac>
mov    (%r14),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
mov    (%r14),%esi
mov    -0x30(%rbp),%rdi
mov    %r12,%rdx
call   1080 <fgetl@plt>
cmp    $0xffffffff,%eax
jne    125d <main+0xcd>
mov    (%r14),%edx
mov    %r12,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
mov    %r15,%rdi
call   1070 <feof@plt>
mov    $0x1,%r13d
jmp    12d2 <main+0x142>
mov    0x2d6c(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xd80(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    13f6 <main+0x266>
mov    0x2d4d(%rip),%rax
mov    (%rax),%r14d
mov    0x2d33(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xd75(%rip),%rsi
mov    %r14d,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    13f6 <main+0x266>
mov    (%r14),%edx
xor    %esi,%esi
call   1050 <memset@plt>
mov    %r15,%rdi
call   1070 <feof@plt>
test   %eax,%eax
jne    1360 <main+0x1d0>
mov    -0x30(%rbp),%rdi
call   1070 <feof@plt>
test   %eax,%eax
jne    1360 <main+0x1d0>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1090 <cmp_cache@plt>
mov    %eax,%r13d
test   %eax,%eax
je     131b <main+0x18b>
jg     1340 <main+0x1b0>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    (%r14),%esi
mov    %r15,%rdi
mov    %rbx,%rdx
call   1080 <fgetl@plt>
mov    %rbx,%rdi
cmp    $0xffffffff,%eax
jne    12ca <main+0x13a>
jmp    12c0 <main+0x130>
mov    (%r14),%esi
mov    %r15,%rdi
mov    %rbx,%rdx
call   1080 <fgetl@plt>
cmp    $0xffffffff,%eax
jne    1340 <main+0x1b0>
mov    (%r14),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
nopl   0x0(%rax,%rax,1)
mov    (%r14),%esi
mov    -0x30(%rbp),%rdi
mov    %r12,%rdx
call   1080 <fgetl@plt>
mov    %r12,%rdi
cmp    $0xffffffff,%eax
jne    12ca <main+0x13a>
jmp    12c0 <main+0x130>
mov    %r15,%rdi
call   1070 <feof@plt>
or     %r13d,%eax
je     1372 <main+0x1e2>
test   %r13d,%r13d
jle    137a <main+0x1ea>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
call   1070 <feof@plt>
test   %eax,%eax
jne    13a8 <main+0x218>
mov    (%r14),%esi
mov    %r15,%rdi
mov    %rbx,%rdx
call   1080 <fgetl@plt>
cmp    $0xffffffff,%eax
jne    1372 <main+0x1e2>
mov    (%r14),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
jmp    137a <main+0x1ea>
mov    %r15,%rdi
call   1040 <fclose@plt>
mov    -0x30(%rbp),%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
mov    -0x38(%rbp),%rsp
jmp    13fb <main+0x26b>
mov    0x2c18(%rip),%rax
mov    (%rax),%ebx
mov    0x2bff(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xc41(%rip),%rsi
mov    %ebx,%edi
mov    %r12,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %r15,%rdi
call   1040 <fclose@plt>
mov    $0xffffffff,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"usage: %s infile removefile\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
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 ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %118
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 %118
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 %29
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)
%28 = tail call i32 @fclose(i32* %13)
br label %118
29: ; preds = %20
%30 = load i32, i32* @BUFSIZ
%31 = zext i32 %30 to i64
%32 = tail call i8* @llvm.stacksave()
%33 = alloca i8, i64 %31
%34 = load i32, i32* @BUFSIZ
%35 = zext i32 %34 to i64
%36 = alloca i8, i64 %35
%37 = call i32 @fgetl(i32* %13, i32 %34, i8* %33)
%38 = icmp eq i32 %37, -1
br i1 %38, label %39, label %42
39: ; preds = %29
%40 = load i32, i32* @BUFSIZ
%41 = call i32 @memset(i8* %33, i32 0, i32 %40)
br label %42
42: ; preds = %39, %29
%43 = load i32, i32* @BUFSIZ
%44 = call i32 @fgetl(i32* %21, i32 %43, i8* %36)
%45 = icmp eq i32 %44, -1
br i1 %45, label %46, label %49
46: ; preds = %42
%47 = load i32, i32* @BUFSIZ
%48 = call i32 @memset(i8* %36, i32 0, i32 %47)
br label %49
49: ; preds = %46, %42
%50 = call i32 @feof(i32* %13)
%51 = icmp eq i32 %50, 0
br i1 %51, label %52, label %90
52: ; preds = %49
%53 = call i32 @feof(i32* %21)
%54 = icmp eq i32 %53, 0
br i1 %54, label %58, label %90
55: ; preds = %87
%56 = call i32 @feof(i32* %21)
%57 = icmp eq i32 %56, 0
br i1 %57, label %58, label %90
58: ; preds = %52, %55
%59 = call i32 @cmp_cache(i8* %33, i8* %36)
%60 = icmp eq i32 %59, 0
br i1 %60, label %61, label %72
61: ; preds = %58
%62 = load i32, i32* @BUFSIZ
%63 = call i32 @fgetl(i32* %13, i32 %62, i8* %33)
%64 = icmp eq i32 %63, -1
br i1 %64, label %65, label %68
65: ; preds = %61
%66 = load i32, i32* @BUFSIZ
%67 = call i32 @memset(i8* %33, i32 0, i32 %66)
br label %68
68: ; preds = %65, %61
%69 = load i32, i32* @BUFSIZ
%70 = call i32 @fgetl(i32* %21, i32 %69, i8* %36)
%71 = icmp eq i32 %70, -1
br i1 %71, label %83, label %87
72: ; preds = %58
%73 = icmp sgt i32 %59, 0
br i1 %73, label %74, label %78
74: ; preds = %72
%75 = load i32, i32* @BUFSIZ
%76 = call i32 @fgetl(i32* %21, i32 %75, i8* %36)
%77 = icmp eq i32 %76, -1
br i1 %77, label %83, label %87
78: ; preds = %72
%79 = call i32 @puts(i8* %33)
%80 = load i32, i32* @BUFSIZ
%81 = call i32 @fgetl(i32* %13, i32 %80, i8* %33)
%82 = icmp eq i32 %81, -1
br i1 %82, label %83, label %87
83: ; preds = %78, %74, %68
%84 = phi i8* [ %36, %68 ], [ %36, %74 ], [ %33, %78 ]
%85 = load i32, i32* @BUFSIZ
%86 = call i32 @memset(i8* %84, i32 0, i32 %85)
br label %87
87: ; preds = %83, %74, %78, %68
%88 = call i32 @feof(i32* %13)
%89 = icmp eq i32 %88, 0
br i1 %89, label %55, label %90
90: ; preds = %87, %55, %52, %49
%91 = phi i32 [ 1, %49 ], [ 1, %52 ], [ %59, %55 ], [ %59, %87 ]
%92 = call i32 @feof(i32* %13)
%93 = icmp eq i32 %92, 0
%94 = icmp eq i32 %91, 0
%95 = select i1 %93, i1 %94, i1 false
%96 = icmp sgt i32 %91, 0
%97 = select i1 %95, i1 true, i1 %96
br i1 %97, label %98, label %100
98: ; preds = %90
%99 = call i32 @puts(i8* %33)
br label %100
100: ; preds = %90, %98
%101 = call i32 @feof(i32* %13)
%102 = icmp eq i32 %101, 0
br i1 %102, label %103, label %115
103: ; preds = %100, %110
%104 = load i32, i32* @BUFSIZ
%105 = call i32 @fgetl(i32* %13, i32 %104, i8* %33)
%106 = icmp eq i32 %105, -1
br i1 %106, label %107, label %113
107: ; preds = %103
%108 = load i32, i32* @BUFSIZ
%109 = call i32 @memset(i8* %33, i32 0, i32 %108)
br label %110
110: ; preds = %107, %113
%111 = call i32 @feof(i32* %13)
%112 = icmp eq i32 %111, 0
br i1 %112, label %103, label %115
113: ; preds = %103
%114 = call i32 @puts(i8* %33)
br label %110
115: ; preds = %110, %100
%116 = call i32 @fclose(i32* %13)
%117 = call i32 @fclose(i32* %21)
br label %118
118: ; preds = %15, %23, %115, %4
%119 = phi i32 [ -1, %4 ], [ -1, %15 ], [ -1, %23 ], [ 0, %115 ]
ret i32 %119
}