#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*/ *);
scalar_t__ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int fread(char **, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ write(int, char *, int);
int main(int argc, char *argv[]) {
  FILE *fp[10];
  char inbytes[1024], outbytes[1024];
  int bytes_read, max_bytes_read;
  int files, files_done;
  int option_same_size = 0;
  int f, b;
  if (argc <= 1) {
    printf("usage: xor FILE1 FILE2\n");
    return 2;
  }
  files = argc - 1;
  if (strcmp("--same-size", argv[1]) == 0) {
    files -= 1;
    option_same_size = 1;
  }
  if (files < 2) {
    printf("usage: xor FILE1 FILE2\n");
    return 2;
  } else if (files > 10) {
    printf("Too many files. Please recompile with a faster number of files "
           "maximum\n");
    return 2;
  }
  for (f = 0; f < files; f++) {
    fp[f] = fopen(argv[f + 1], "rb");
    if (fp[f] == NULL) {
      printf("File %d not found: %s\n", f, argv[f + 1]);
      return 1;
    }
  }
  while (1) {
    files_done = 0;
    for (f = 0; f < files; f++)
      if (feof(fp[f]))
        files_done++;
    if (files == files_done)
      break;
    memset(outbytes, 0, 1024);
    max_bytes_read = -1;
    for (f = 0; f < files; f++) {
      bytes_read = fread(&inbytes, 1, 1024, fp[f]);
      for (b = 0; b < bytes_read; b++)
        outbytes[b] ^= inbytes[b];
      if (option_same_size && max_bytes_read >= 0 &&
          max_bytes_read != bytes_read) {
        fprintf(stderr, "files were not the same size");
        return 3;
      }
      if (bytes_read > max_bytes_read)
        max_bytes_read = bytes_read;
    }
    write(1, outbytes, max_bytes_read);
  }
  for (f = 0; f < files; f++)
    fclose(fp[f]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x880,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x874(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     11d7 <main+0x47>
lea    0xe3c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x2,-0x4(%rbp)
jmp    153d <main+0x3ad>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x86c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe26(%rip),%rdi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    121a <main+0x8a>
mov    -0x86c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x86c(%rbp)
movl   $0x1,-0x874(%rbp)
cmpl   $0x2,-0x86c(%rbp)
jge    1241 <main+0xb1>
lea    0xdd2(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x2,-0x4(%rbp)
jmp    153d <main+0x3ad>
cmpl   $0xa,-0x86c(%rbp)
jle    1268 <main+0xd8>
lea    0xdcf(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x2,-0x4(%rbp)
jmp    153d <main+0x3ad>
jmp    126d <main+0xdd>
movl   $0x0,-0x878(%rbp)
mov    -0x878(%rbp),%eax
cmp    -0x86c(%rbp),%eax
jge    1318 <main+0x188>
mov    -0x10(%rbp),%rax
mov    -0x878(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdc8(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%rcx
movslq -0x878(%rbp),%rax
mov    %rcx,-0x60(%rbp,%rax,8)
movslq -0x878(%rbp),%rax
cmpq   $0x0,-0x60(%rbp,%rax,8)
jne    12ff <main+0x16f>
mov    -0x878(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    -0x878(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xd83(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    153d <main+0x3ad>
jmp    1304 <main+0x174>
mov    -0x878(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x878(%rbp)
jmp    1277 <main+0xe7>
jmp    131d <main+0x18d>
movl   $0x0,-0x870(%rbp)
movl   $0x0,-0x878(%rbp)
mov    -0x878(%rbp),%eax
cmp    -0x86c(%rbp),%eax
jge    1386 <main+0x1f6>
movslq -0x878(%rbp),%rax
mov    -0x60(%rbp,%rax,8),%rdi
call   10a0 <feof@plt>
cmp    $0x0,%rax
je     136d <main+0x1dd>
mov    -0x870(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x870(%rbp)
jmp    1372 <main+0x1e2>
mov    -0x878(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x878(%rbp)
jmp    1331 <main+0x1a1>
mov    -0x86c(%rbp),%eax
cmp    -0x870(%rbp),%eax
jne    139d <main+0x20d>
jmp    14f5 <main+0x365>
lea    -0x860(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1070 <memset@plt>
movl   $0xffffffff,-0x868(%rbp)
ff ff ff
movl   $0x0,-0x878(%rbp)
mov    -0x878(%rbp),%eax
cmp    -0x86c(%rbp),%eax
jge    14d9 <main+0x349>
lea    -0x460(%rbp),%rdi
movslq -0x878(%rbp),%rax
mov    -0x60(%rbp,%rax,8),%rcx
mov    $0x1,%esi
mov    $0x400,%edx
call   1030 <fread@plt>
mov    %eax,-0x864(%rbp)
movl   $0x0,-0x87c(%rbp)
mov    -0x87c(%rbp),%eax
cmp    -0x864(%rbp),%eax
jge    1455 <main+0x2c5>
movslq -0x87c(%rbp),%rax
movsbl -0x460(%rbp,%rax,1),%edx
ff
movslq -0x87c(%rbp),%rax
movsbl -0x860(%rbp,%rax,1),%ecx
ff
xor    %edx,%ecx
mov    %cl,-0x860(%rbp,%rax,1)
mov    -0x87c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x87c(%rbp)
jmp    1408 <main+0x278>
cmpl   $0x0,-0x874(%rbp)
je     14a2 <main+0x312>
cmpl   $0x0,-0x868(%rbp)
jl     14a2 <main+0x312>
mov    -0x868(%rbp),%eax
cmp    -0x864(%rbp),%eax
je     14a2 <main+0x312>
mov    0x2b58(%rip),%rax
mov    (%rax),%edi
lea    0xbf5(%rip),%rsi
call   1090 <fprintf@plt>
movl   $0x3,-0x4(%rbp)
jmp    153d <main+0x3ad>
mov    -0x864(%rbp),%eax
cmp    -0x868(%rbp),%eax
jle    14c0 <main+0x330>
mov    -0x864(%rbp),%eax
mov    %eax,-0x868(%rbp)
jmp    14c5 <main+0x335>
mov    -0x878(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x878(%rbp)
jmp    13c4 <main+0x234>
lea    -0x860(%rbp),%rsi
mov    -0x868(%rbp),%edx
mov    $0x1,%edi
call   1040 <write@plt>
jmp    131d <main+0x18d>
movl   $0x0,-0x878(%rbp)
mov    -0x878(%rbp),%eax
cmp    -0x86c(%rbp),%eax
jge    1536 <main+0x3a6>
movslq -0x878(%rbp),%rax
mov    -0x60(%rbp,%rax,8),%rdi
call   1050 <fclose@plt>
mov    -0x878(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x878(%rbp)
jmp    14ff <main+0x36f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x880,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x868,%rsp
cmp    $0x1,%edi
jle    11e1 <main+0x41>
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x8(%rsi),%rsi
lea    0xe3a(%rip),%rdi
call   1090 <strcmp@plt>
xor    %r12d,%r12d
test   %rax,%rax
sete   %r12b
not    %r12d
add    %ebp,%r12d
cmp    $0x1,%r12d
ja     1206 <main+0x66>
lea    0xea2(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2,%ebx
mov    %ebx,%eax
add    $0x868,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
cmp    $0xa,%r12d
jbe    1215 <main+0x75>
lea    0xe30(%rip),%rdi
jmp    11e8 <main+0x48>
mov    %rax,0x8(%rsp)
mov    %r12d,%r15d
xor    %ebp,%ebp
lea    0xde6(%rip),%r13
cs nopw 0x0(%rax,%rax,1)
cmp    %rbp,%r15
je     1270 <main+0xd0>
lea    0x1(%rbp),%r14
mov    0x8(%rbx,%rbp,8),%rdi
mov    %r13,%rsi
call   10c0 <fopen@plt>
mov    %rax,0x10(%rsp,%rbp,8)
mov    %r14,%rbp
test   %rax,%rax
jne    1230 <main+0x90>
lea    -0x1(%r14),%esi
mov    (%rbx,%r14,8),%rdx
lea    0xdad(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x1,%ebx
jmp    11f2 <main+0x52>
cmpq   $0x0,0x8(%rsp)
setne  %r13b
lea    0x60(%rsp),%r14
jmp    12a9 <main+0x109>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1080 <memset@plt>
mov    $0xffffffff,%ebp
mov    $0x1,%edi
lea    0x60(%rsp),%r14
mov    %r14,%rsi
mov    %ebp,%edx
call   1050 <write@plt>
test   %r12d,%r12d
jle    1281 <main+0xe1>
xor    %ebx,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x10(%rsp,%rbx,8),%rdi
call   10b0 <feof@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebp
add    $0x1,%rbx
cmp    %rbx,%r15
jne    12c0 <main+0x120>
cmp    %ebp,%r12d
je     14b9 <main+0x319>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1080 <memset@plt>
mov    $0xffffffff,%ebp
test   %r12d,%r12d
jle    1295 <main+0xf5>
xor    %r14d,%r14d
jmp    1322 <main+0x182>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    %ebp,%eax
cmovg  %eax,%ebp
add    $0x1,%r14
cmp    %r15,%r14
je     1295 <main+0xf5>
mov    0x10(%rsp,%r14,8),%rcx
lea    0x460(%rsp),%rdi
mov    $0x1,%esi
mov    $0x400,%edx
call   1040 <fread@plt>
test   %eax,%eax
jle    1475 <main+0x2d5>
mov    %eax,%ecx
cmp    $0x8,%eax
jae    1360 <main+0x1c0>
xor    %edx,%edx
jmp    1460 <main+0x2c0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    $0x20,%eax
jae    136c <main+0x1cc>
xor    %edx,%edx
jmp    1431 <main+0x291>
mov    %ecx,%edx
and    $0xffffffe0,%edx
lea    -0x20(%rdx),%rsi
mov    %rsi,%rbx
shr    $0x5,%rbx
add    $0x1,%rbx
test   %rsi,%rsi
je     148d <main+0x2ed>
mov    %rbx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movaps 0x60(%rsp,%rdi,1),%xmm0
movaps 0x70(%rsp,%rdi,1),%xmm1
movaps 0x80(%rsp,%rdi,1),%xmm2
movaps 0x90(%rsp,%rdi,1),%xmm3
xorps  0x460(%rsp,%rdi,1),%xmm0
xorps  0x470(%rsp,%rdi,1),%xmm1
movaps %xmm0,0x60(%rsp,%rdi,1)
movaps %xmm1,0x70(%rsp,%rdi,1)
xorps  0x480(%rsp,%rdi,1),%xmm2
xorps  0x490(%rsp,%rdi,1),%xmm3
movaps %xmm2,0x80(%rsp,%rdi,1)
movaps %xmm3,0x90(%rsp,%rdi,1)
add    $0x40,%rdi
add    $0xfffffffffffffffe,%rsi
jne    13a0 <main+0x200>
test   $0x1,%bl
je     1427 <main+0x287>
movaps 0x60(%rsp,%rdi,1),%xmm0
movaps 0x70(%rsp,%rdi,1),%xmm1
xorps  0x460(%rsp,%rdi,1),%xmm0
xorps  0x470(%rsp,%rdi,1),%xmm1
movaps %xmm0,0x60(%rsp,%rdi,1)
movaps %xmm1,0x70(%rsp,%rdi,1)
cmp    %rcx,%rdx
je     1475 <main+0x2d5>
test   $0x18,%cl
je     1460 <main+0x2c0>
mov    %rdx,%rsi
mov    %ecx,%edx
and    $0xfffffff8,%edx
nopl   0x0(%rax)
mov    0x460(%rsp,%rsi,1),%rdi
xor    %rdi,0x60(%rsp,%rsi,1)
add    $0x8,%rsi
cmp    %rsi,%rdx
jne    1440 <main+0x2a0>
cmp    %rcx,%rdx
je     1475 <main+0x2d5>
nopl   0x0(%rax,%rax,1)
movzbl 0x460(%rsp,%rdx,1),%ebx
xor    %bl,0x60(%rsp,%rdx,1)
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1460 <main+0x2c0>
test   %ebp,%ebp
sets   %cl
or     %r13b,%cl
jne    1310 <main+0x170>
cmp    %eax,%ebp
je     1310 <main+0x170>
jmp    149a <main+0x2fa>
xor    %edi,%edi
test   $0x1,%bl
jne    1403 <main+0x263>
jmp    1427 <main+0x287>
mov    0x2b3f(%rip),%rax
mov    (%rax),%edi
lea    0xb7c(%rip),%rsi
call   10a0 <fprintf@plt>
mov    $0x3,%ebx
jmp    11f2 <main+0x52>
xor    %ebx,%ebx
test   %r12d,%r12d
jle    11f2 <main+0x52>
xor    %ebp,%ebp
mov    0x10(%rsp,%rbp,8),%rdi
call   1060 <fclose@plt>
add    $0x1,%rbp
cmp    %rbp,%r15
jne    14c6 <main+0x326>
jmp    11f2 <main+0x52>

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

LLVM IR (-O2):
@.str.1 = [12 x i8] c"--same-size\00"
@.str.3 = [3 x i8] c"rb\00"
@.str.4 = [23 x i8] c"File %d not found: %s\0A\00"
@stderr = global i32 0
@.str.5 = [29 x i8] c"files were not the same size\00"
@str = [71 x i8] c"Too many files. Please recompile with a faster number of files maximum\00"
@str.7 = [23 x i8] c"usage: xor FILE1 FILE2\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [10 x i32*]
%4 = alloca [1024 x i8]
%5 = alloca [1024 x i8]
%6 = bitcast [10 x i32*]* %3 to i8*
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%9 = icmp slt i32 %0, 2
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.7, i64 0, i64 0))
br label %204
12: ; preds = %2
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = tail call i64 @strcmp(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %14)
%16 = icmp eq i64 %15, 0
%17 = select i1 %16, i32 -2, i32 -1
%18 = add nsw i32 %17, %0
%19 = icmp ult i32 %18, 2
br i1 %19, label %20, label %22
20: ; preds = %12
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.7, i64 0, i64 0))
br label %204
22: ; preds = %12
%23 = icmp ugt i32 %18, 10
br i1 %23, label %26, label %24
24: ; preds = %22
%25 = zext i32 %18 to i64
br label %28
26: ; preds = %22
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str, i64 0, i64 0))
br label %204
28: ; preds = %24, %35
%29 = phi i64 [ 0, %24 ], [ %36, %35 ]
%30 = icmp eq i64 %29, %25
br i1 %30, label %31, label %35
31: ; preds = %28
%32 = icmp sgt i32 %18, 0
%33 = bitcast [1024 x i8]* %4 to i8**
%34 = xor i1 %16, true
br label %48
35: ; preds = %28
%36 = add nuw nsw i64 %29, 1
%37 = getelementptr inbounds i8*, i8** %1, i64 %36
%38 = load i8*, i8** %37
%39 = tail call i32* @fopen(i8* %38, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%40 = getelementptr inbounds [10 x i32*], [10 x i32*]* %3, i64 0, i64 %29
store i32* %39, i32** %40
%41 = icmp eq i32* %39, null
br i1 %41, label %42, label %28
42: ; preds = %35
%43 = trunc i64 %29 to i32
%44 = and i64 %36, 4294967295
%45 = getelementptr inbounds i8*, i8** %1, i64 %44
%46 = load i8*, i8** %45
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %43, i8* %46)
br label %204
48: ; preds = %31, %194
br i1 %32, label %49, label %62
49: ; preds = %48, %49
%50 = phi i64 [ %58, %49 ], [ 0, %48 ]
%51 = phi i32 [ %57, %49 ], [ 0, %48 ]
%52 = getelementptr inbounds [10 x i32*], [10 x i32*]* %3, i64 0, i64 %50
%53 = load i32*, i32** %52
%54 = call i64 @feof(i32* %53)
%55 = icmp ne i64 %54, 0
%56 = zext i1 %55 to i32
%57 = add nuw nsw i32 %51, %56
%58 = add nuw nsw i64 %50, 1
%59 = icmp eq i64 %58, %25
br i1 %59, label %60, label %49
60: ; preds = %49
%61 = icmp eq i32 %18, %57
br i1 %61, label %64, label %65
62: ; preds = %48
%63 = call i32 @memset(i8* %8, i32 0, i32 1024)
br label %194
64: ; preds = %60
br i1 %32, label %197, label %204
65: ; preds = %60
%66 = call i32 @memset(i8* %8, i32 0, i32 1024)
br i1 %32, label %67, label %194
67: ; preds = %65, %189
%68 = phi i64 [ %192, %189 ], [ 0, %65 ]
%69 = phi i32 [ %191, %189 ], [ -1, %65 ]
%70 = getelementptr inbounds [10 x i32*], [10 x i32*]* %3, i64 0, i64 %68
%71 = load i32*, i32** %70
%72 = call i32 @fread(i8** %33, i32 1, i32 1024, i32* %71)
%73 = icmp sgt i32 %72, 0
br i1 %73, label %74, label %181
74: ; preds = %67
%75 = zext i32 %72 to i64
%76 = icmp ult i32 %72, 8
br i1 %76, label %170, label %77
77: ; preds = %74
%78 = icmp ult i32 %72, 32
br i1 %78, label %152, label %79
79: ; preds = %77
%80 = and i64 %75, 4294967264
%81 = add nsw i64 %80, -32
%82 = lshr exact i64 %81, 5
%83 = add nuw nsw i64 %82, 1
%84 = and i64 %83, 1
%85 = icmp eq i64 %81, 0
br i1 %85, label %127, label %86
86: ; preds = %79
%87 = and i64 %83, 1152921504606846974
br label %88
88: ; preds = %88, %86
%89 = phi i64 [ 0, %86 ], [ %124, %88 ]
%90 = phi i64 [ 0, %86 ], [ %125, %88 ]
%91 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %89
%92 = bitcast i8* %91 to <16 x i8>*
%93 = load <16 x i8>, <16 x i8>* %92
%94 = getelementptr inbounds i8, i8* %91, i64 16
%95 = bitcast i8* %94 to <16 x i8>*
%96 = load <16 x i8>, <16 x i8>* %95
%97 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %89
%98 = bitcast i8* %97 to <16 x i8>*
%99 = load <16 x i8>, <16 x i8>* %98
%100 = getelementptr inbounds i8, i8* %97, i64 16
%101 = bitcast i8* %100 to <16 x i8>*
%102 = load <16 x i8>, <16 x i8>* %101
%103 = xor <16 x i8> %99, %93
%104 = xor <16 x i8> %102, %96
%105 = bitcast i8* %97 to <16 x i8>*
store <16 x i8> %103, <16 x i8>* %105
%106 = bitcast i8* %100 to <16 x i8>*
store <16 x i8> %104, <16 x i8>* %106
%107 = or i64 %89, 32
%108 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %107
%109 = bitcast i8* %108 to <16 x i8>*
%110 = load <16 x i8>, <16 x i8>* %109
%111 = getelementptr inbounds i8, i8* %108, i64 16
%112 = bitcast i8* %111 to <16 x i8>*
%113 = load <16 x i8>, <16 x i8>* %112
%114 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %107
%115 = bitcast i8* %114 to <16 x i8>*
%116 = load <16 x i8>, <16 x i8>* %115
%117 = getelementptr inbounds i8, i8* %114, i64 16
%118 = bitcast i8* %117 to <16 x i8>*
%119 = load <16 x i8>, <16 x i8>* %118
%120 = xor <16 x i8> %116, %110
%121 = xor <16 x i8> %119, %113
%122 = bitcast i8* %114 to <16 x i8>*
store <16 x i8> %120, <16 x i8>* %122
%123 = bitcast i8* %117 to <16 x i8>*
store <16 x i8> %121, <16 x i8>* %123
%124 = add nuw i64 %89, 64
%125 = add i64 %90, 2
%126 = icmp eq i64 %125, %87
br i1 %126, label %127, label %88
127: ; preds = %88, %79
%128 = phi i64 [ 0, %79 ], [ %124, %88 ]
%129 = icmp eq i64 %84, 0
br i1 %129, label %147, label %130
130: ; preds = %127
%131 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %128
%132 = bitcast i8* %131 to <16 x i8>*
%133 = load <16 x i8>, <16 x i8>* %132
%134 = getelementptr inbounds i8, i8* %131, i64 16
%135 = bitcast i8* %134 to <16 x i8>*
%136 = load <16 x i8>, <16 x i8>* %135
%137 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %128
%138 = bitcast i8* %137 to <16 x i8>*
%139 = load <16 x i8>, <16 x i8>* %138
%140 = getelementptr inbounds i8, i8* %137, i64 16
%141 = bitcast i8* %140 to <16 x i8>*
%142 = load <16 x i8>, <16 x i8>* %141
%143 = xor <16 x i8> %139, %133
%144 = xor <16 x i8> %142, %136
%145 = bitcast i8* %137 to <16 x i8>*
store <16 x i8> %143, <16 x i8>* %145
%146 = bitcast i8* %140 to <16 x i8>*
store <16 x i8> %144, <16 x i8>* %146
br label %147
147: ; preds = %127, %130
%148 = icmp eq i64 %80, %75
br i1 %148, label %181, label %149
149: ; preds = %147
%150 = and i64 %75, 24
%151 = icmp eq i64 %150, 0
br i1 %151, label %170, label %152
152: ; preds = %77, %149
%153 = phi i64 [ %80, %149 ], [ 0, %77 ]
%154 = zext i32 %72 to i64
%155 = and i64 %154, 4294967288
br label %156
156: ; preds = %156, %152
%157 = phi i64 [ %153, %152 ], [ %166, %156 ]
%158 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %157
%159 = bitcast i8* %158 to <8 x i8>*
%160 = load <8 x i8>, <8 x i8>* %159
%161 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %157
%162 = bitcast i8* %161 to <8 x i8>*
%163 = load <8 x i8>, <8 x i8>* %162
%164 = xor <8 x i8> %163, %160
%165 = bitcast i8* %161 to <8 x i8>*
store <8 x i8> %164, <8 x i8>* %165
%166 = add nuw i64 %157, 8
%167 = icmp eq i64 %166, %155
br i1 %167, label %168, label %156
168: ; preds = %156
%169 = icmp eq i64 %155, %154
br i1 %169, label %181, label %170
170: ; preds = %74, %149, %168
%171 = phi i64 [ 0, %74 ], [ %80, %149 ], [ %155, %168 ]
br label %172
172: ; preds = %170, %172
%173 = phi i64 [ %179, %172 ], [ %171, %170 ]
%174 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %173
%175 = load i8, i8* %174
%176 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %173
%177 = load i8, i8* %176
%178 = xor i8 %177, %175
store i8 %178, i8* %176
%179 = add nuw nsw i64 %173, 1
%180 = icmp eq i64 %179, %75
br i1 %180, label %181, label %172
181: ; preds = %172, %147, %168, %67
%182 = icmp slt i32 %69, 0
%183 = select i1 %34, i1 true, i1 %182
%184 = icmp eq i32 %69, %72
%185 = select i1 %183, i1 true, i1 %184
br i1 %185, label %189, label %186
186: ; preds = %181
%187 = load i32, i32* @stderr
%188 = call i32 @fprintf(i32 %187, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
br label %204
189: ; preds = %181
%190 = icmp sgt i32 %72, %69
%191 = select i1 %190, i32 %72, i32 %69
%192 = add nuw nsw i64 %68, 1
%193 = icmp eq i64 %192, %25
br i1 %193, label %194, label %67
194: ; preds = %189, %62, %65
%195 = phi i32 [ -1, %65 ], [ -1, %62 ], [ %191, %189 ]
%196 = call i32 @write(i32 1, i8* %8, i32 %195)
br label %48
197: ; preds = %64, %197
%198 = phi i64 [ %202, %197 ], [ 0, %64 ]
%199 = getelementptr inbounds [10 x i32*], [10 x i32*]* %3, i64 0, i64 %198
%200 = load i32*, i32** %199
%201 = call i32 @fclose(i32* %200)
%202 = add nuw nsw i64 %198, 1
%203 = icmp eq i64 %202, %25
br i1 %203, label %204, label %197
204: ; preds = %197, %64, %186, %42, %26, %20, %10
%205 = phi i32 [ 2, %10 ], [ 2, %20 ], [ 2, %26 ], [ 1, %42 ], [ 3, %186 ], [ 0, %64 ], [ 0, %197 ]
ret i32 %205
}