#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*/ *);
char *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int strlen(char *);
int main(int argc, char **argv) {
  FILE *fp1;
  FILE *fp2;
  char lineBuf1[1023];
  char lineBuf2[1023];
  char *line1;
  char *line2;
  int lineNum;
  int minStringLen;
  int maxStringLen;
  int i;
  if (argc != 3) {
    printf("Usage: %s <file1> <file2>\n", argv[0]);
    return (1);
  }
  if ((fp1 = fopen(argv[1], "r")) == NULL) {
    fprintf(stderr, "Cannot open file \"%s\"\n", argv[1]);
    return (2);
  }
  if ((fp2 = fopen(argv[2], "r")) == NULL) {
    fprintf(stderr, "Cannot open file \"%s\"\n", argv[2]);
    return (3);
  }
  lineNum = 1;
  while (1) {
    line1 = fgets(lineBuf1, 1023 - 2, fp1);
    line2 = fgets(lineBuf2, 1023 - 2, fp2);
    if ((line1 != NULL) && (line2 != NULL)) {
      printf("\nline number %d:\n", lineNum++);
      printf("%s", line1);
      printf("%s", line2);
      if (strlen(line1) < strlen(line2)) {
        minStringLen = strlen(line1);
        maxStringLen = strlen(line2);
      } else {
        minStringLen = strlen(line2);
        maxStringLen = strlen(line1);
      }
      for (i = 0; i < minStringLen; i++) {
        if (line1[i] == line2[i]) {
          if (line1[i] == 0x09) {
            printf("\t");
          } else {
            printf(" ");
          }
        } else {
          printf("^");
        }
      }
      for (i = minStringLen; i < maxStringLen - 1; i++) {
        printf("^");
      }
      continue;
    }
    if ((line1 != NULL) && (line2 == NULL)) {
      printf("\nline number %d:\n", lineNum++);
      printf("%s\n", line1);
      for (i = 0; i < strlen(line1) - 1; i++) {
        printf("^");
      }
      continue;
    }
    if ((line1 == NULL) && (line2 != NULL)) {
      printf("\nline number %d:\n", lineNum++);
      printf("\n%s", line2);
      for (i = 0; i < strlen(line2) - 1; i++) {
        printf("^");
      }
      continue;
    }
    break;
  }
  printf("\n");
  fclose(fp1);
  fclose(fp2);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x850,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     11a4 <main+0x44>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    15da <main+0x47a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe68(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    11ef <main+0x8f>
mov    0x2e13(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xe3f(%rip),%rsi
call   1070 <fprintf@plt>
movl   $0x2,-0x4(%rbp)
jmp    15da <main+0x47a>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe1d(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    123a <main+0xda>
mov    0x2dc8(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdx
lea    0xdf4(%rip),%rsi
call   1070 <fprintf@plt>
movl   $0x3,-0x4(%rbp)
jmp    15da <main+0x47a>
movl   $0x1,-0x834(%rbp)
lea    -0x420(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x3fd,%esi
call   1060 <fgets@plt>
mov    %rax,-0x828(%rbp)
lea    -0x820(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x3fd,%esi
call   1060 <fgets@plt>
mov    %rax,-0x830(%rbp)
cmpq   $0x0,-0x828(%rbp)
je     1456 <main+0x2f6>
cmpq   $0x0,-0x830(%rbp)
je     1456 <main+0x2f6>
mov    -0x834(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x834(%rbp)
lea    0xd84(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x828(%rbp),%rsi
lea    0xd8c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x830(%rbp),%rsi
lea    0xd77(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x828(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x844(%rbp)
mov    -0x830(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x844(%rbp),%eax
cmp    %ecx,%eax
jge    1338 <main+0x1d8>
mov    -0x828(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x838(%rbp)
mov    -0x830(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x83c(%rbp)
jmp    135c <main+0x1fc>
mov    -0x830(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x838(%rbp)
mov    -0x828(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x83c(%rbp)
movl   $0x0,-0x840(%rbp)
mov    -0x840(%rbp),%eax
cmp    -0x838(%rbp),%eax
jge    140c <main+0x2ac>
mov    -0x828(%rbp),%rax
movslq -0x840(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x830(%rbp),%rcx
movslq -0x840(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    13e5 <main+0x285>
mov    -0x828(%rbp),%rax
movslq -0x840(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x9,%eax
jne    13d2 <main+0x272>
lea    0xc80(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    13e0 <main+0x280>
lea    0xc6f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    13f3 <main+0x293>
lea    0xc5e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    13f8 <main+0x298>
mov    -0x840(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x840(%rbp)
jmp    1366 <main+0x206>
mov    -0x838(%rbp),%eax
mov    %eax,-0x840(%rbp)
mov    -0x840(%rbp),%eax
mov    -0x83c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1451 <main+0x2f1>
lea    0xc14(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x840(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x840(%rbp)
jmp    1418 <main+0x2b8>
jmp    1244 <main+0xe4>
cmpq   $0x0,-0x828(%rbp)
je     1502 <main+0x3a2>
cmpq   $0x0,-0x830(%rbp)
jne    1502 <main+0x3a2>
mov    -0x834(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x834(%rbp)
lea    0xbaa(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x828(%rbp),%rsi
lea    0xbad(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x840(%rbp)
mov    -0x840(%rbp),%eax
mov    %eax,-0x848(%rbp)
mov    -0x828(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x848(%rbp),%eax
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    14fd <main+0x39d>
lea    0xb68(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x840(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x840(%rbp)
jmp    14b0 <main+0x350>
jmp    1244 <main+0xe4>
cmpq   $0x0,-0x828(%rbp)
jne    15ae <main+0x44e>
cmpq   $0x0,-0x830(%rbp)
je     15ae <main+0x44e>
mov    -0x834(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x834(%rbp)
lea    0xafe(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x830(%rbp),%rsi
lea    0xb05(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x840(%rbp)
mov    -0x840(%rbp),%eax
mov    %eax,-0x84c(%rbp)
mov    -0x830(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x84c(%rbp),%eax
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    15a9 <main+0x449>
lea    0xabc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x840(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x840(%rbp)
jmp    155c <main+0x3fc>
jmp    1244 <main+0xe4>
jmp    15b3 <main+0x453>
lea    0xa78(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x850,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x828,%rsp
mov    %rsi,%rbp
cmp    $0x3,%edi
jne    13f1 <main+0x271>
mov    0x8(%rbp),%rdi
lea    0xe73(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,0x18(%rsp)
test   %rax,%rax
je     142c <main+0x2ac>
mov    0x10(%rbp),%rdi
lea    0xe55(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,0x10(%rsp)
test   %rax,%rax
je     144c <main+0x2cc>
mov    $0x1,%ebp
jmp    11e3 <main+0x63>
add    $0x1,%ebp
lea    0x420(%rsp),%rdi
mov    $0x3fd,%esi
mov    0x18(%rsp),%rdx
call   1080 <fgets@plt>
mov    %rax,%r12
lea    0x20(%rsp),%rdi
mov    $0x3fd,%esi
mov    0x10(%rsp),%rdx
call   1080 <fgets@plt>
mov    %rax,%r13
test   %r12,%r12
je     12e0 <main+0x160>
test   %r13,%r13
je     12e0 <main+0x160>
lea    0xe07(%rip),%rdi
mov    %ebp,0xc(%rsp)
mov    %ebp,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xe06(%rip),%rbx
mov    %rbx,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r12,%rdi
call   1060 <strlen@plt>
mov    %eax,%ebx
mov    %r13,%rdi
call   1060 <strlen@plt>
cmp    %eax,%ebx
mov    %r13,%rdi
cmovl  %r12,%rdi
mov    %r12,%rbx
cmovl  %r13,%rbx
call   1060 <strlen@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
call   1060 <strlen@plt>
mov    %eax,%r14d
test   %r15d,%r15d
jle    1350 <main+0x1d0>
mov    %r15d,%ebx
xor    %ebp,%ebp
jmp    12b2 <main+0x132>
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
je     1350 <main+0x1d0>
movzbl (%r12,%rbp,1),%eax
mov    $0x9,%edi
cmp    $0x9,%al
je     12c5 <main+0x145>
mov    $0x20,%edi
cmp    0x0(%r13,%rbp,1),%al
je     12a0 <main+0x120>
mov    $0x5e,%edi
jmp    12a0 <main+0x120>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
test   %r12,%r12
je     1390 <main+0x210>
test   %r13,%r13
jne    1390 <main+0x210>
lea    0xd3b(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
call   1060 <strlen@plt>
cmp    $0x2,%eax
jl     11e0 <main+0x60>
xor    %ebx,%ebx
nopl   (%rax)
mov    $0x5e,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
mov    %r12,%rdi
call   1060 <strlen@plt>
add    $0xffffffff,%eax
cmp    %eax,%ebx
jl     1320 <main+0x1a0>
jmp    11e0 <main+0x60>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x1(%r14),%eax
cmp    %eax,%r15d
mov    0xc(%rsp),%ebp
jge    11e0 <main+0x60>
not    %r15d
add    %r14d,%r15d
nopw   0x0(%rax,%rax,1)
mov    $0x5e,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%r15d
jne    1370 <main+0x1f0>
jmp    11e0 <main+0x60>
cs nopw 0x0(%rax,%rax,1)
nop
test   %r12,%r12
jne    140a <main+0x28a>
test   %r13,%r13
je     140a <main+0x28a>
lea    0xc93(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xc95(%rip),%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r13,%rdi
call   1060 <strlen@plt>
cmp    $0x2,%eax
jl     11e0 <main+0x60>
xor    %ebx,%ebx
xchg   %ax,%ax
mov    $0x5e,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
mov    %r13,%rdi
call   1060 <strlen@plt>
add    $0xffffffff,%eax
cmp    %eax,%ebx
jl     13d0 <main+0x250>
jmp    11e0 <main+0x60>
mov    0x0(%rbp),%rsi
lea    0xc04(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x1,%eax
jmp    146a <main+0x2ea>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x18(%rsp),%rdi
call   1050 <fclose@plt>
mov    0x10(%rsp),%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
jmp    146a <main+0x2ea>
mov    0x2bad(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rbp),%rdx
lea    0xbdd(%rip),%rsi
call   1090 <fprintf@plt>
mov    $0x2,%eax
jmp    146a <main+0x2ea>
mov    0x2b8d(%rip),%rax
mov    (%rax),%edi
mov    0x10(%rbp),%rdx
lea    0xbbd(%rip),%rsi
call   1090 <fprintf@plt>
mov    $0x3,%eax
add    $0x828,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [27 x i8] c"Usage: %s <file1> <file2>\0A\00"
@.str.1 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.2 = [23 x i8] c"Cannot open file \22%s\22\0A\00"
@.str.3 = [18 x i8] c"\0Aline number %d:\0A\00"
@.str.4 = [3 x i8] c"%s\00"
@.str.9 = [4 x i8] c"\0A%s\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1023 x i8]
%4 = alloca [1023 x i8]
%5 = getelementptr inbounds [1023 x i8], [1023 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [1023 x i8], [1023 x i8]* %4, i64 0, i64 0
%7 = icmp eq i32 %0, 3
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i8*, i8** %1
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %107
11: ; preds = %2
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = load i8*, i8** %12
%14 = tail call i32* @fopen(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp eq i32* %14, null
br i1 %15, label %16, label %20
16: ; preds = %11
%17 = load i32, i32* @stderr
%18 = load i8*, i8** %12
%19 = tail call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* %18)
br label %107
20: ; preds = %11
%21 = getelementptr inbounds i8*, i8** %1, i64 2
%22 = load i8*, i8** %21
%23 = tail call i32* @fopen(i8* %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%24 = icmp eq i32* %23, null
br i1 %24, label %25, label %31
25: ; preds = %20
%26 = load i32, i32* @stderr
%27 = load i8*, i8** %21
%28 = tail call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* %27)
br label %107
29: ; preds = %96, %81, %68, %91, %76, %52
%30 = add nuw nsw i32 %32, 1
br label %31
31: ; preds = %20, %29
%32 = phi i32 [ %30, %29 ], [ 1, %20 ]
%33 = call i8* @fgets(i8* %5, i32 1021, i32* %14)
%34 = call i8* @fgets(i8* %6, i32 1021, i32* %23)
%35 = icmp ne i8* %33, null
%36 = icmp ne i8* %34, null
%37 = and i1 %35, %36
br i1 %37, label %38, label %73
38: ; preds = %31
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %32)
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %33)
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %34)
%42 = call i32 @strlen(i8* %33)
%43 = call i32 @strlen(i8* %34)
%44 = icmp slt i32 %42, %43
%45 = select i1 %44, i8* %33, i8* %34
%46 = select i1 %44, i8* %34, i8* %33
%47 = call i32 @strlen(i8* %45)
%48 = call i32 @strlen(i8* %46)
%49 = icmp sgt i32 %47, 0
br i1 %49, label %50, label %52
50: ; preds = %38
%51 = zext i32 %47 to i64
br label %55
52: ; preds = %55, %38
%53 = add i32 %48, -1
%54 = icmp slt i32 %47, %53
br i1 %54, label %68, label %29
55: ; preds = %50, %55
%56 = phi i64 [ 0, %50 ], [ %66, %55 ]
%57 = getelementptr inbounds i8, i8* %33, i64 %56
%58 = load i8, i8* %57
%59 = getelementptr inbounds i8, i8* %34, i64 %56
%60 = load i8, i8* %59
%61 = icmp eq i8 %58, %60
%62 = icmp eq i8 %58, 9
%63 = select i1 %62, i32 9, i32 32
%64 = select i1 %61, i32 %63, i32 94
%65 = call i32 @putchar(i32 %64)
%66 = add nuw nsw i64 %56, 1
%67 = icmp eq i64 %66, %51
br i1 %67, label %52, label %55
68: ; preds = %52, %68
%69 = phi i32 [ %71, %68 ], [ %47, %52 ]
%70 = call i32 @putchar(i32 94)
%71 = add nsw i32 %69, 1
%72 = icmp eq i32 %71, %53
br i1 %72, label %29, label %68
73: ; preds = %31
%74 = icmp eq i8* %34, null
%75 = and i1 %35, %74
br i1 %75, label %76, label %88
76: ; preds = %73
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %32)
%78 = call i32 @puts(i8* %33)
%79 = call i32 @strlen(i8* %33)
%80 = icmp sgt i32 %79, 1
br i1 %80, label %81, label %29
81: ; preds = %76, %81
%82 = phi i32 [ %84, %81 ], [ 0, %76 ]
%83 = call i32 @putchar(i32 94)
%84 = add nuw nsw i32 %82, 1
%85 = call i32 @strlen(i8* %33)
%86 = add nsw i32 %85, -1
%87 = icmp slt i32 %84, %86
br i1 %87, label %81, label %29
88: ; preds = %73
%89 = icmp eq i8* %33, null
%90 = and i1 %89, %36
br i1 %90, label %91, label %103
91: ; preds = %88
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %32)
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* %34)
%94 = call i32 @strlen(i8* %34)
%95 = icmp sgt i32 %94, 1
br i1 %95, label %96, label %29
96: ; preds = %91, %96
%97 = phi i32 [ %99, %96 ], [ 0, %91 ]
%98 = call i32 @putchar(i32 94)
%99 = add nuw nsw i32 %97, 1
%100 = call i32 @strlen(i8* %34)
%101 = add nsw i32 %100, -1
%102 = icmp slt i32 %99, %101
br i1 %102, label %96, label %29
103: ; preds = %88
%104 = call i32 @putchar(i32 10)
%105 = call i32 @fclose(i32* %14)
%106 = call i32 @fclose(i32* %23)
br label %107
107: ; preds = %103, %25, %16, %8
%108 = phi i32 [ 1, %8 ], [ 2, %16 ], [ 3, %25 ], [ 0, %103 ]
ret i32 %108
}