#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*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ abs(unsigned int);
scalar_t__ calloc(int, int);
unsigned int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fp_cleanup(int /*<<< orphan*/ **);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ usage();
int main(int argc, char **argv) {
  FILE **file;
  long len[2];
  unsigned int t[2];
  int c;
  if (argc < 3) {
    usage();
    return 1;
  }
  file = (FILE **)calloc(2, sizeof(FILE *));
  for (c = 0; c < 2; c++) {
    file[c] = fopen(argv[c + 1], "rb");
    if (file[c] == NULL) {
      fprintf(stderr, "Unable to open %s.\n", argv[c + 1]);
      fp_cleanup(file);
      return 1;
    }
    fseek(file[c], 0, SEEK_END);
    len[c] = ftell(file[c]);
    fseek(file[c], 0, SEEK_SET);
    len[c] -= ftell(file[c]);
  }
  if (len[0] != len[1]) {
    fprintf(stderr, "Error: File lengths are not equal.\n");
    fp_cleanup(file);
    return 1;
  }
  for (c = 0; c < len[0]; c++) {
    t[0] = fgetc(file[0]);
    t[1] = fgetc(file[1]);
    if (t[0] != t[1]) {
      fprintf(stdout, "Difference at 0x%04X.\n", c);
      fprintf(stdout, "\tfile 1:\t0x%02X\t%03d\n", t[0], t[0]);
      fprintf(stdout, "\tfile 2:\t0x%02X\t%03d\n", t[1], t[1]);
      fprintf(stdout, "Difference in numbers: %c%d\n",
              (t[0] > t[1]) ? '-' : '+', abs(t[0] - t[1]));
      fprintf(stdout, "\n");
    }
  }
  fp_cleanup(file);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    11c3 <main+0x33>
mov    $0x0,%al
call   10a0 <usage@plt>
movl   $0x1,-0x4(%rbp)
jmp    1438 <main+0x2a8>
mov    $0x2,%edi
mov    $0x8,%esi
call   1050 <calloc@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x2,-0x3c(%rbp)
jge    12eb <main+0x15b>
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe01(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%rdx
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
jne    1263 <main+0xd3>
mov    0x2dab(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xdbc(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1080 <fp_cleanup@plt>
movl   $0x1,-0x4(%rbp)
jmp    1438 <main+0x2a8>
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    0x2d72(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1090 <fseek@plt>
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <ftell@plt>
mov    %rax,%rcx
movslq -0x3c(%rbp),%rax
mov    %rcx,-0x30(%rbp,%rax,8)
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    0x2d21(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1090 <fseek@plt>
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <ftell@plt>
mov    %rax,%rdx
movslq -0x3c(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rcx
sub    %rdx,%rcx
mov    %rcx,-0x30(%rbp,%rax,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11dd <main+0x4d>
mov    -0x30(%rbp),%rax
cmp    -0x28(%rbp),%rax
je     1325 <main+0x195>
mov    0x2cd8(%rip),%rax
mov    (%rax),%edi
lea    0xd0e(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1080 <fp_cleanup@plt>
movl   $0x1,-0x4(%rbp)
jmp    1438 <main+0x2a8>
movl   $0x0,-0x3c(%rbp)
movslq -0x3c(%rbp),%rax
cmp    -0x30(%rbp),%rax
jge    1428 <main+0x298>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1040 <fgetc@plt>
mov    %eax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <fgetc@plt>
mov    %eax,-0x34(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
je     1415 <main+0x285>
mov    0x2c5c(%rip),%rax
mov    (%rax),%edi
mov    -0x3c(%rbp),%edx
lea    0xcc3(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2c42(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%edx
mov    -0x38(%rbp),%ecx
lea    0xcbd(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2c25(%rip),%rax
mov    (%rax),%edi
mov    -0x34(%rbp),%edx
mov    -0x34(%rbp),%ecx
lea    0xcb6(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2c08(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    -0x38(%rbp),%edx
mov    -0x34(%rbp),%esi
mov    $0x2b,%eax
mov    $0x2d,%ecx
cmp    %esi,%edx
cmova  %ecx,%eax
mov    %eax,-0x40(%rbp)
mov    -0x38(%rbp),%edi
sub    -0x34(%rbp),%edi
call   1030 <abs@plt>
mov    -0x44(%rbp),%edi
mov    -0x40(%rbp),%edx
mov    %eax,%ecx
lea    0xc87(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2bc3(%rip),%rax
mov    (%rax),%edi
lea    0xc42(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    141a <main+0x28a>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    132c <main+0x19c>
mov    -0x18(%rbp),%rdi
call   1080 <fp_cleanup@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jg     119c <main+0x1c>
xor    %eax,%eax
call   1090 <usage@plt>
jmp    136f <main+0x1ef>
mov    %rsi,%rbp
mov    $0x2,%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
mov    0x8(%rbp),%rdi
lea    0xe44(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,(%rbx)
test   %rax,%rax
je     1326 <main+0x1a6>
mov    0x2e14(%rip),%r12
mov    (%r12),%edx
mov    %rax,%rdi
xor    %esi,%esi
call   1080 <fseek@plt>
mov    (%rbx),%rdi
call   1060 <ftell@plt>
mov    %rax,%r14
mov    (%rbx),%rdi
mov    0x2dd9(%rip),%r13
mov    0x0(%r13),%edx
xor    %esi,%esi
call   1080 <fseek@plt>
mov    (%rbx),%rdi
call   1060 <ftell@plt>
mov    %rax,%r15
mov    0x10(%rbp),%rdi
lea    0xde8(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,0x8(%rbx)
test   %rax,%rax
je     132d <main+0x1ad>
sub    %r15,%r14
mov    (%r12),%edx
mov    %rax,%rdi
xor    %esi,%esi
call   1080 <fseek@plt>
mov    0x8(%rbx),%rdi
call   1060 <ftell@plt>
mov    %rax,%rbp
mov    0x8(%rbx),%rdi
mov    0x0(%r13),%edx
xor    %esi,%esi
call   1080 <fseek@plt>
mov    0x8(%rbx),%rdi
call   1060 <ftell@plt>
sub    %rax,%rbp
cmp    %rbp,%r14
jne    1350 <main+0x1d0>
test   %r14,%r14
jle    1383 <main+0x203>
mov    0x2d4d(%rip),%r15
xor    %r12d,%r12d
jmp    128d <main+0x10d>
add    $0x1,%r12
cmp    %r12,%r14
je     1383 <main+0x203>
mov    (%rbx),%rdi
call   1030 <fgetc@plt>
mov    %eax,%r13d
mov    0x8(%rbx),%rdi
call   1030 <fgetc@plt>
cmp    %eax,%r13d
je     1280 <main+0x100>
mov    %eax,%ebp
mov    (%r15),%edi
lea    0xd89(%rip),%rsi
mov    %r12d,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%r15),%edi
lea    0xd8c(%rip),%rsi
mov    %r13d,%edx
mov    %r13d,%ecx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%r15),%edi
lea    0xd8b(%rip),%rsi
mov    %ebp,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%r15),%edi
xor    %eax,%eax
sub    %ebp,%r13d
seta   %al
lea    (%rax,%rax,1),%edx
add    $0x2b,%edx
mov    %r13d,%ecx
neg    %ecx
cmovs  %r13d,%ecx
lea    0xd75(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%r15),%edi
lea    0xd36(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    1280 <main+0x100>
mov    $0x1,%eax
jmp    1332 <main+0x1b2>
mov    $0x2,%eax
mov    0x2c9f(%rip),%rcx
mov    (%rcx),%edi
mov    0x0(%rbp,%rax,8),%rdx
lea    0xcbc(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    1367 <main+0x1e7>
mov    0x2c81(%rip),%rax
mov    (%rax),%edi
lea    0xcb7(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %rbx,%rdi
call   1070 <fp_cleanup@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rbx,%rdi
call   1070 <fp_cleanup@plt>
xor    %eax,%eax
jmp    1374 <main+0x1f4>

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
@stderr = global i32 0
@.str.1 = [20 x i8] c"Unable to open %s.\0A\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.2 = [36 x i8] c"Error: File lengths are not equal.\0A\00"
@stdout = global i32 0
@.str.3 = [23 x i8] c"Difference at 0x%04X.\0A\00"
@.str.4 = [22 x i8] c"\09file 1:\090x%02X\09%03d\0A\00"
@.str.5 = [22 x i8] c"\09file 2:\090x%02X\09%03d\0A\00"
@.str.6 = [29 x i8] c"Difference in numbers: %c%d\0A\00"
@.str.7 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32**
%7 = alloca [2 x i64]
%8 = alloca [2 x i32]
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 3
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 (...) @usage()
store i32 1, i32* %3
br label %161
14: ; preds = %2
%15 = call i64 @calloc(i32 2, i32 8)
%16 = inttoptr i64 %15 to i32**
store i32** %16, i32*** %6
store i32 0, i32* %9
br label %17
17: ; preds = %84, %14
%18 = load i32, i32* %9
%19 = icmp slt i32 %18, 2
br i1 %19, label %20, label %87
20: ; preds = %17
%21 = load i8**, i8*** %5
%22 = load i32, i32* %9
%23 = add nsw i32 %22, 1
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8*, i8** %21, i64 %24
%26 = load i8*, i8** %25
%27 = call i32* @fopen(i8* %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%28 = load i32**, i32*** %6
%29 = load i32, i32* %9
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i32*, i32** %28, i64 %30
store i32* %27, i32** %31
%32 = load i32**, i32*** %6
%33 = load i32, i32* %9
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i32*, i32** %32, i64 %34
%36 = load i32*, i32** %35
%37 = icmp eq i32* %36, null
br i1 %37, label %38, label %49
38: ; preds = %20
%39 = load i32, i32* @stderr
%40 = load i8**, i8*** %5
%41 = load i32, i32* %9
%42 = add nsw i32 %41, 1
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i8*, i8** %40, i64 %43
%45 = load i8*, i8** %44
%46 = call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %45)
%47 = load i32**, i32*** %6
%48 = call i32 @fp_cleanup(i32** %47)
store i32 1, i32* %3
br label %161
49: ; preds = %20
%50 = load i32**, i32*** %6
%51 = load i32, i32* %9
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i32*, i32** %50, i64 %52
%54 = load i32*, i32** %53
%55 = load i32, i32* @SEEK_END
%56 = call i32 @fseek(i32* %54, i32 0, i32 %55)
%57 = load i32**, i32*** %6
%58 = load i32, i32* %9
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds i32*, i32** %57, i64 %59
%61 = load i32*, i32** %60
%62 = call i64 @ftell(i32* %61)
%63 = load i32, i32* %9
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [2 x i64], [2 x i64]* %7, i64 0, i64 %64
store i64 %62, i64* %65
%66 = load i32**, i32*** %6
%67 = load i32, i32* %9
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds i32*, i32** %66, i64 %68
%70 = load i32*, i32** %69
%71 = load i32, i32* @SEEK_SET
%72 = call i32 @fseek(i32* %70, i32 0, i32 %71)
%73 = load i32**, i32*** %6
%74 = load i32, i32* %9
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i32*, i32** %73, i64 %75
%77 = load i32*, i32** %76
%78 = call i64 @ftell(i32* %77)
%79 = load i32, i32* %9
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [2 x i64], [2 x i64]* %7, i64 0, i64 %80
%82 = load i64, i64* %81
%83 = sub nsw i64 %82, %78
store i64 %83, i64* %81
br label %84
84: ; preds = %49
%85 = load i32, i32* %9
%86 = add nsw i32 %85, 1
store i32 %86, i32* %9
br label %17
87: ; preds = %17
%88 = getelementptr inbounds [2 x i64], [2 x i64]* %7, i64 0, i64 0
%89 = load i64, i64* %88
%90 = getelementptr inbounds [2 x i64], [2 x i64]* %7, i64 0, i64 1
%91 = load i64, i64* %90
%92 = icmp ne i64 %89, %91
br i1 %92, label %93, label %98
93: ; preds = %87
%94 = load i32, i32* @stderr
%95 = call i32 (i32, i8*, ...) @fprintf(i32 %94, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%96 = load i32**, i32*** %6
%97 = call i32 @fp_cleanup(i32** %96)
store i32 1, i32* %3
br label %161
98: ; preds = %87
store i32 0, i32* %9
br label %99
99: ; preds = %155, %98
%100 = load i32, i32* %9
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds [2 x i64], [2 x i64]* %7, i64 0, i64 0
%103 = load i64, i64* %102
%104 = icmp slt i64 %101, %103
br i1 %104, label %105, label %158
105: ; preds = %99
%106 = load i32**, i32*** %6
%107 = getelementptr inbounds i32*, i32** %106, i64 0
%108 = load i32*, i32** %107
%109 = call i32 @fgetc(i32* %108)
%110 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
store i32 %109, i32* %110
%111 = load i32**, i32*** %6
%112 = getelementptr inbounds i32*, i32** %111, i64 1
%113 = load i32*, i32** %112
%114 = call i32 @fgetc(i32* %113)
%115 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 1
store i32 %114, i32* %115
%116 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
%117 = load i32, i32* %116
%118 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 1
%119 = load i32, i32* %118
%120 = icmp ne i32 %117, %119
br i1 %120, label %121, label %154
121: ; preds = %105
%122 = load i32, i32* @stdout
%123 = load i32, i32* %9
%124 = call i32 (i32, i8*, ...) @fprintf(i32 %122, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 %123)
%125 = load i32, i32* @stdout
%126 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
%127 = load i32, i32* %126
%128 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
%129 = load i32, i32* %128
%130 = call i32 (i32, i8*, ...) @fprintf(i32 %125, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 %127, i32 %129)
%131 = load i32, i32* @stdout
%132 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 1
%133 = load i32, i32* %132
%134 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 1
%135 = load i32, i32* %134
%136 = call i32 (i32, i8*, ...) @fprintf(i32 %131, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i32 %133, i32 %135)
%137 = load i32, i32* @stdout
%138 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
%139 = load i32, i32* %138
%140 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 1
%141 = load i32, i32* %140
%142 = icmp ugt i32 %139, %141
%143 = zext i1 %142 to i64
%144 = select i1 %142, i32 45, i32 43
%145 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
%146 = load i32, i32* %145
%147 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 1
%148 = load i32, i32* %147
%149 = sub i32 %146, %148
%150 = call i32 @abs(i32 %149)
%151 = call i32 (i32, i8*, ...) @fprintf(i32 %137, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i32 %144, i32 %150)
%152 = load i32, i32* @stdout
%153 = call i32 (i32, i8*, ...) @fprintf(i32 %152, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %154
154: ; preds = %121, %105
br label %155
155: ; preds = %154
%156 = load i32, i32* %9
%157 = add nsw i32 %156, 1
store i32 %157, i32* %9
br label %99
158: ; preds = %99
%159 = load i32**, i32*** %6
%160 = call i32 @fp_cleanup(i32** %159)
store i32 0, i32* %3
br label %161
161: ; preds = %158, %93, %38, %12
%162 = load i32, i32* %3
ret i32 %162
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
@stderr = global i32 0
@.str.1 = [20 x i8] c"Unable to open %s.\0A\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.2 = [36 x i8] c"Error: File lengths are not equal.\0A\00"
@stdout = global i32 0
@.str.3 = [23 x i8] c"Difference at 0x%04X.\0A\00"
@.str.4 = [22 x i8] c"\09file 1:\090x%02X\09%03d\0A\00"
@.str.5 = [22 x i8] c"\09file 2:\090x%02X\09%03d\0A\00"
@.str.6 = [29 x i8] c"Difference in numbers: %c%d\0A\00"
@.str.7 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @usage()
br label %82
6: ; preds = %2
%7 = tail call i64 @calloc(i32 2, i32 8)
%8 = inttoptr i64 %7 to i32**
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32* @fopen(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %11, i32** %8
%12 = icmp eq i32* %11, null
br i1 %12, label %13, label %20
13: ; preds = %20, %6
%14 = phi i64 [ 1, %6 ], [ 2, %20 ]
%15 = getelementptr inbounds i8*, i8** %1, i64 %14
%16 = load i32, i32* @stderr
%17 = load i8*, i8** %15
%18 = tail call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %17)
%19 = tail call i32 @fp_cleanup(i32** %8)
br label %82
20: ; preds = %6
%21 = load i32, i32* @SEEK_END
%22 = tail call i32 @fseek(i32* %11, i32 0, i32 %21)
%23 = load i32*, i32** %8
%24 = tail call i64 @ftell(i32* %23)
%25 = load i32*, i32** %8
%26 = load i32, i32* @SEEK_SET
%27 = tail call i32 @fseek(i32* %25, i32 0, i32 %26)
%28 = load i32*, i32** %8
%29 = tail call i64 @ftell(i32* %28)
%30 = sub nsw i64 %24, %29
%31 = getelementptr inbounds i8*, i8** %1, i64 2
%32 = load i8*, i8** %31
%33 = tail call i32* @fopen(i8* %32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%34 = getelementptr inbounds i32*, i32** %8, i64 1
store i32* %33, i32** %34
%35 = icmp eq i32* %33, null
br i1 %35, label %13, label %36
36: ; preds = %20
%37 = load i32, i32* @SEEK_END
%38 = tail call i32 @fseek(i32* %33, i32 0, i32 %37)
%39 = load i32*, i32** %34
%40 = tail call i64 @ftell(i32* %39)
%41 = load i32*, i32** %34
%42 = load i32, i32* @SEEK_SET
%43 = tail call i32 @fseek(i32* %41, i32 0, i32 %42)
%44 = load i32*, i32** %34
%45 = tail call i64 @ftell(i32* %44)
%46 = sub nsw i64 %40, %45
%47 = icmp eq i64 %30, %46
br i1 %47, label %48, label %50
48: ; preds = %36
%49 = icmp sgt i64 %30, 0
br i1 %49, label %54, label %80
50: ; preds = %36
%51 = load i32, i32* @stderr
%52 = tail call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%53 = tail call i32 @fp_cleanup(i32** %8)
br label %82
54: ; preds = %48, %77
%55 = phi i64 [ %78, %77 ], [ 0, %48 ]
%56 = load i32*, i32** %8
%57 = tail call i32 @fgetc(i32* %56)
%58 = load i32*, i32** %34
%59 = tail call i32 @fgetc(i32* %58)
%60 = icmp eq i32 %57, %59
br i1 %60, label %77, label %61
61: ; preds = %54
%62 = load i32, i32* @stdout
%63 = trunc i64 %55 to i32
%64 = tail call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 %63)
%65 = load i32, i32* @stdout
%66 = tail call i32 (i32, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 %57, i32 %57)
%67 = load i32, i32* @stdout
%68 = tail call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i32 %59, i32 %59)
%69 = load i32, i32* @stdout
%70 = icmp ugt i32 %57, %59
%71 = select i1 %70, i32 45, i32 43
%72 = sub i32 %57, %59
%73 = tail call i32 @llvm.abs.i32(i32 %72, i1 true)
%74 = tail call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i32 %71, i32 %73)
%75 = load i32, i32* @stdout
%76 = tail call i32 (i32, i8*, ...) @fprintf(i32 %75, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %77
77: ; preds = %54, %61
%78 = add nuw nsw i64 %55, 1
%79 = icmp eq i64 %78, %30
br i1 %79, label %80, label %54
80: ; preds = %77, %48
%81 = tail call i32 @fp_cleanup(i32** %8)
br label %82
82: ; preds = %80, %50, %13, %4
%83 = phi i32 [ 1, %4 ], [ 1, %13 ], [ 1, %50 ], [ 0, %80 ]
ret i32 %83
}