#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*/ buf2;
typedef int /*<<< orphan*/ buf1;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ StrCompare(char *, char *);
int StrGetLength(char const *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int DoDiff(const char *file1, const char *file2) {
  char buf1[1023 + 2];
  char buf2[1023 + 2];
  size_t len;
  int line = 1;
  if (StrGetLength(file1) > 1023 || StrGetLength(file2) > 1023) {
    fprintf(stderr, "Error: argument is too long");
    return 0;
  }
  FILE *fp1, *fp2;
  fp1 = fopen(file1, "r");
  if (fp1 == NULL) {
    fprintf(stderr, "Error: failed to open file %s\n", file1);
    return 0;
  }
  fp2 = fopen(file2, "r");
  if (fp2 == NULL) {
    fprintf(stderr, "Error: failed to open file %s\n", file2);
    fclose(fp1);
    return 0;
  }
  while (1) {
    int f1 = fgets(buf1, sizeof(buf1), fp1);
    int f2 = fgets(buf2, sizeof(buf2), fp2);
    if (f1 && f2) {
      if ((len = StrGetLength(buf1)) > 1023) {
        fprintf(stderr, "Error: input line is too long\n");
        fclose(fp1);
        fclose(fp2);
        return 0;
      }
      if ((len = StrGetLength(buf2)) > 1023) {
        fprintf(stderr, "Error: input line is too long\n");
        fclose(fp1);
        fclose(fp2);
        return 0;
      }
      if (StrCompare(buf1, buf2) != 0) {
        fprintf(stdout, "%s@%d:%s", file1, line, buf1);
        fprintf(stdout, "%s@%d:%s", file2, line, buf2);
      }
      line += 1;
    } else if ((f1 && !f2) || (!f1 && f2)) {
      if (f1 == 0) {
        fprintf(stderr, "Error: %s ends early at line %d\n", file1, line);
      } else {
        fprintf(stderr, "Error: %s ends early at line %d\n", file2, line);
      }
      fclose(fp1);
      fclose(fp2);
      return 0;
    } else {
      break;
    }
  }
  fclose(fp1);
  fclose(fp2);
  return 1;
}


x86 assembly (clang, -O0):
<DoDiff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x860,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x1,-0x83c(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <StrGetLength@plt>
cmp    $0x3ff,%eax
jg     11a5 <DoDiff+0x45>
mov    -0x18(%rbp),%rdi
call   1050 <StrGetLength@plt>
cmp    $0x3ff,%eax
jle    11c8 <DoDiff+0x68>
mov    0x2e34(%rip),%rax
mov    (%rax),%edi
lea    0xe4b(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    14d5 <DoDiff+0x375>
mov    -0x10(%rbp),%rdi
lea    0xe49(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x848(%rbp)
cmpq   $0x0,-0x848(%rbp)
jne    1214 <DoDiff+0xb4>
mov    0x2dec(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe1d(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    14d5 <DoDiff+0x375>
mov    -0x18(%rbp),%rdi
lea    0xdfd(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x850(%rbp)
cmpq   $0x0,-0x850(%rbp)
jne    126c <DoDiff+0x10c>
mov    0x2da0(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xdd1(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x848(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
jmp    14d5 <DoDiff+0x375>
jmp    1271 <DoDiff+0x111>
lea    -0x420(%rbp),%rdi
mov    -0x848(%rbp),%rdx
mov    $0x401,%esi
call   1060 <fgets@plt>
mov    %eax,-0x854(%rbp)
lea    -0x830(%rbp),%rdi
mov    -0x850(%rbp),%rdx
mov    $0x401,%esi
call   1060 <fgets@plt>
mov    %eax,-0x858(%rbp)
cmpl   $0x0,-0x854(%rbp)
je     1400 <DoDiff+0x2a0>
cmpl   $0x0,-0x858(%rbp)
je     1400 <DoDiff+0x2a0>
lea    -0x420(%rbp),%rdi
call   1050 <StrGetLength@plt>
cltq
mov    %rax,-0x838(%rbp)
cmp    $0x3ff,%rax
jbe    1323 <DoDiff+0x1c3>
mov    0x2cf1(%rip),%rax
mov    (%rax),%edi
lea    0xd45(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x848(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x850(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
jmp    14d5 <DoDiff+0x375>
lea    -0x830(%rbp),%rdi
call   1050 <StrGetLength@plt>
cltq
mov    %rax,-0x838(%rbp)
cmp    $0x3ff,%rax
jbe    137f <DoDiff+0x21f>
mov    0x2c95(%rip),%rax
mov    (%rax),%edi
lea    0xce9(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x848(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x850(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
jmp    14d5 <DoDiff+0x375>
lea    -0x420(%rbp),%rdi
lea    -0x830(%rbp),%rsi
call   1040 <StrCompare@plt>
cmp    $0x0,%rax
je     13ec <DoDiff+0x28c>
mov    0x2c35(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x83c(%rbp),%ecx
lea    -0x420(%rbp),%r8
lea    0xc9f(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2c0d(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
mov    -0x83c(%rbp),%ecx
lea    -0x830(%rbp),%r8
lea    0xc77(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x83c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x83c(%rbp)
jmp    14b1 <DoDiff+0x351>
cmpl   $0x0,-0x854(%rbp)
je     141a <DoDiff+0x2ba>
cmpl   $0x0,-0x858(%rbp)
je     1434 <DoDiff+0x2d4>
cmpl   $0x0,-0x854(%rbp)
jne    14ac <DoDiff+0x34c>
cmpl   $0x0,-0x858(%rbp)
je     14ac <DoDiff+0x34c>
cmpl   $0x0,-0x854(%rbp)
jne    1467 <DoDiff+0x307>
mov    0x2b98(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x83c(%rbp),%ecx
lea    0xc0a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    1488 <DoDiff+0x328>
mov    0x2b72(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
mov    -0x83c(%rbp),%ecx
lea    0xbe4(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x848(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x850(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
jmp    14d5 <DoDiff+0x375>
jmp    14b6 <DoDiff+0x356>
jmp    1271 <DoDiff+0x111>
mov    -0x848(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x850(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x860,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoDiff>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x838,%rsp
mov    %rsi,%r12
mov    %rdi,%rbx
call   1050 <StrGetLength@plt>
cmp    $0x3ff,%eax
jg     1192 <DoDiff+0x32>
mov    %r12,%rdi
call   1050 <StrGetLength@plt>
cmp    $0x400,%eax
jl     11c1 <DoDiff+0x61>
mov    0x2e47(%rip),%rax
mov    (%rax),%edi
lea    0xe5e(%rip),%rsi
xor    %r14d,%r14d
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %r14d,%eax
add    $0x838,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe54(%rip),%rsi
mov    %rbx,%rdi
call   1080 <fopen@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
je     1345 <DoDiff+0x1e5>
lea    0xe37(%rip),%rsi
mov    %r12,%rdi
call   1080 <fopen@plt>
test   %rax,%rax
je     1367 <DoDiff+0x207>
mov    %rax,%r14
lea    0x430(%rsp),%rdi
mov    $0x401,%esi
mov    0x8(%rsp),%rdx
call   1060 <fgets@plt>
mov    %eax,%r15d
lea    0x20(%rsp),%rdi
mov    $0x401,%esi
mov    %r14,%rdx
call   1060 <fgets@plt>
test   %eax,%eax
setne  %cl
mov    $0x1,%ebp
test   %r15d,%r15d
mov    %r14,0x10(%rsp)
mov    %rbx,0x18(%rsp)
je     1318 <DoDiff+0x1b8>
test   %eax,%eax
je     1318 <DoDiff+0x1b8>
mov    $0x1,%ebp
lea    0x430(%rsp),%r13
lea    0x20(%rsp),%rbx
nopl   0x0(%rax)
mov    %r13,%rdi
call   1050 <StrGetLength@plt>
cmp    $0x400,%eax
jae    1393 <DoDiff+0x233>
mov    %rbx,%rdi
call   1050 <StrGetLength@plt>
cmp    $0x400,%eax
jae    1393 <DoDiff+0x233>
mov    %r13,%rdi
mov    %rbx,%rsi
call   1040 <StrCompare@plt>
test   %rax,%rax
je     12dc <DoDiff+0x17c>
mov    0x2d3b(%rip),%r15
mov    (%r15),%edi
mov    %r12,%r14
mov    %r13,%r12
lea    0xdaf(%rip),%r13
mov    %r13,%rsi
mov    0x18(%rsp),%rdx
mov    %ebp,%ecx
mov    %r12,%r8
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%r15),%edi
mov    %r13,%rsi
mov    %r12,%r13
mov    %r14,%r12
mov    %r14,%rdx
mov    %ebp,%ecx
mov    %rbx,%r8
xor    %eax,%eax
call   1070 <fprintf@plt>
add    $0x1,%ebp
mov    %r13,%rdi
mov    $0x401,%esi
mov    0x8(%rsp),%rdx
call   1060 <fgets@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
mov    $0x401,%esi
mov    0x10(%rsp),%rdx
call   1060 <fgets@plt>
test   %eax,%eax
setne  %cl
test   %r15d,%r15d
je     1318 <DoDiff+0x1b8>
test   %eax,%eax
jne    1260 <DoDiff+0x100>
test   %r15d,%r15d
sete   %al
xor    %cl,%al
je     13af <DoDiff+0x24f>
mov    0x8(%rsp),%rdi
call   1030 <fclose@plt>
mov    0x10(%rsp),%rdi
call   1030 <fclose@plt>
mov    $0x1,%r14d
jmp    11ac <DoDiff+0x4c>
mov    0x2c94(%rip),%rax
mov    (%rax),%edi
lea    0xcc9(%rip),%rsi
xor    %r14d,%r14d
mov    %rbx,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    11ac <DoDiff+0x4c>
mov    0x2c72(%rip),%rax
mov    (%rax),%edi
lea    0xca7(%rip),%rsi
xor    %r14d,%r14d
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x8(%rsp),%rdi
call   1030 <fclose@plt>
jmp    11ac <DoDiff+0x4c>
mov    0x2c46(%rip),%rax
mov    (%rax),%edi
lea    0xc9a(%rip),%rsi
xor    %r14d,%r14d
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    13d7 <DoDiff+0x277>
test   %r15d,%r15d
mov    0x2c27(%rip),%rax
mov    (%rax),%edi
cmove  0x18(%rsp),%r12
lea    0xc9d(%rip),%rsi
xor    %r14d,%r14d
mov    %r12,%rdx
mov    %ebp,%ecx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x8(%rsp),%rdi
call   1030 <fclose@plt>
mov    0x10(%rsp),%rdi
call   1030 <fclose@plt>
jmp    11ac <DoDiff+0x4c>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"Error: argument is too long\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [31 x i8] c"Error: failed to open file %s\0A\00"
@.str.3 = [31 x i8] c"Error: input line is too long\0A\00"
@stdout = global i32 0
@.str.4 = [9 x i8] c"%s@%d:%s\00"
@.str.5 = [33 x i8] c"Error: %s ends early at line %d\0A\00"
define i32 @DoDiff(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca [1025 x i8]
%7 = alloca [1025 x i8]
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32
%13 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 1, i32* %9
%14 = load i8*, i8** %4
%15 = call i32 @StrGetLength(i8* %14)
%16 = icmp sgt i32 %15, 1023
br i1 %16, label %21, label %17
17: ; preds = %2
%18 = load i8*, i8** %5
%19 = call i32 @StrGetLength(i8* %18)
%20 = icmp sgt i32 %19, 1023
br i1 %20, label %21, label %24
21: ; preds = %17, %2
%22 = load i32, i32* @stderr
%23 = call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %137
24: ; preds = %17
%25 = load i8*, i8** %4
%26 = call i32* @fopen(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %26, i32** %10
%27 = load i32*, i32** %10
%28 = icmp eq i32* %27, null
br i1 %28, label %29, label %33
29: ; preds = %24
%30 = load i32, i32* @stderr
%31 = load i8*, i8** %4
%32 = call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i8* %31)
store i32 0, i32* %3
br label %137
33: ; preds = %24
%34 = load i8*, i8** %5
%35 = call i32* @fopen(i8* %34, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %35, i32** %11
%36 = load i32*, i32** %11
%37 = icmp eq i32* %36, null
br i1 %37, label %38, label %44
38: ; preds = %33
%39 = load i32, i32* @stderr
%40 = load i8*, i8** %5
%41 = call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i8* %40)
%42 = load i32*, i32** %10
%43 = call i32 @fclose(i32* %42)
store i32 0, i32* %3
br label %137
44: ; preds = %33
br label %45
45: ; preds = %44, %131
%46 = getelementptr inbounds [1025 x i8], [1025 x i8]* %6, i64 0, i64 0
%47 = load i32*, i32** %10
%48 = call i32 @fgets(i8* %46, i32 1025, i32* %47)
store i32 %48, i32* %12
%49 = getelementptr inbounds [1025 x i8], [1025 x i8]* %7, i64 0, i64 0
%50 = load i32*, i32** %11
%51 = call i32 @fgets(i8* %49, i32 1025, i32* %50)
store i32 %51, i32* %13
%52 = load i32, i32* %12
%53 = icmp ne i32 %52, 0
br i1 %53, label %54, label %100
54: ; preds = %45
%55 = load i32, i32* %13
%56 = icmp ne i32 %55, 0
br i1 %56, label %57, label %100
57: ; preds = %54
%58 = getelementptr inbounds [1025 x i8], [1025 x i8]* %6, i64 0, i64 0
%59 = call i32 @StrGetLength(i8* %58)
%60 = sext i32 %59 to i64
store i64 %60, i64* %8
%61 = icmp ugt i64 %60, 1023
br i1 %61, label %62, label %69
62: ; preds = %57
%63 = load i32, i32* @stderr
%64 = call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%65 = load i32*, i32** %10
%66 = call i32 @fclose(i32* %65)
%67 = load i32*, i32** %11
%68 = call i32 @fclose(i32* %67)
store i32 0, i32* %3
br label %137
69: ; preds = %57
%70 = getelementptr inbounds [1025 x i8], [1025 x i8]* %7, i64 0, i64 0
%71 = call i32 @StrGetLength(i8* %70)
%72 = sext i32 %71 to i64
store i64 %72, i64* %8
%73 = icmp ugt i64 %72, 1023
br i1 %73, label %74, label %81
74: ; preds = %69
%75 = load i32, i32* @stderr
%76 = call i32 (i32, i8*, ...) @fprintf(i32 %75, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%77 = load i32*, i32** %10
%78 = call i32 @fclose(i32* %77)
%79 = load i32*, i32** %11
%80 = call i32 @fclose(i32* %79)
store i32 0, i32* %3
br label %137
81: ; preds = %69
%82 = getelementptr inbounds [1025 x i8], [1025 x i8]* %6, i64 0, i64 0
%83 = getelementptr inbounds [1025 x i8], [1025 x i8]* %7, i64 0, i64 0
%84 = call i64 @StrCompare(i8* %82, i8* %83)
%85 = icmp ne i64 %84, 0
br i1 %85, label %86, label %97
86: ; preds = %81
%87 = load i32, i32* @stdout
%88 = load i8*, i8** %4
%89 = load i32, i32* %9
%90 = getelementptr inbounds [1025 x i8], [1025 x i8]* %6, i64 0, i64 0
%91 = call i32 (i32, i8*, ...) @fprintf(i32 %87, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* %88, i32 %89, i8* %90)
%92 = load i32, i32* @stdout
%93 = load i8*, i8** %5
%94 = load i32, i32* %9
%95 = getelementptr inbounds [1025 x i8], [1025 x i8]* %7, i64 0, i64 0
%96 = call i32 (i32, i8*, ...) @fprintf(i32 %92, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* %93, i32 %94, i8* %95)
br label %97
97: ; preds = %86, %81
%98 = load i32, i32* %9
%99 = add nsw i32 %98, 1
store i32 %99, i32* %9
br label %131
100: ; preds = %54, %45
%101 = load i32, i32* %12
%102 = icmp ne i32 %101, 0
br i1 %102, label %103, label %106
103: ; preds = %100
%104 = load i32, i32* %13
%105 = icmp ne i32 %104, 0
br i1 %105, label %106, label %112
106: ; preds = %103, %100
%107 = load i32, i32* %12
%108 = icmp ne i32 %107, 0
br i1 %108, label %130, label %109
109: ; preds = %106
%110 = load i32, i32* %13
%111 = icmp ne i32 %110, 0
br i1 %111, label %112, label %130
112: ; preds = %109, %103
%113 = load i32, i32* %12
%114 = icmp eq i32 %113, 0
br i1 %114, label %115, label %120
115: ; preds = %112
%116 = load i32, i32* @stderr
%117 = load i8*, i8** %4
%118 = load i32, i32* %9
%119 = call i32 (i32, i8*, ...) @fprintf(i32 %116, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i8* %117, i32 %118)
br label %125
120: ; preds = %112
%121 = load i32, i32* @stderr
%122 = load i8*, i8** %5
%123 = load i32, i32* %9
%124 = call i32 (i32, i8*, ...) @fprintf(i32 %121, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i8* %122, i32 %123)
br label %125
125: ; preds = %120, %115
%126 = load i32*, i32** %10
%127 = call i32 @fclose(i32* %126)
%128 = load i32*, i32** %11
%129 = call i32 @fclose(i32* %128)
store i32 0, i32* %3
br label %137
130: ; preds = %109, %106
br label %132
131: ; preds = %97
br label %45
132: ; preds = %130
%133 = load i32*, i32** %10
%134 = call i32 @fclose(i32* %133)
%135 = load i32*, i32** %11
%136 = call i32 @fclose(i32* %135)
store i32 1, i32* %3
br label %137
137: ; preds = %132, %125, %74, %62, %38, %29, %21
%138 = load i32, i32* %3
ret i32 %138
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"Error: argument is too long\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [31 x i8] c"Error: failed to open file %s\0A\00"
@.str.3 = [31 x i8] c"Error: input line is too long\0A\00"
@stdout = global i32 0
@.str.4 = [9 x i8] c"%s@%d:%s\00"
@.str.5 = [33 x i8] c"Error: %s ends early at line %d\0A\00"
define i32 @DoDiff(i8* %0, i8* %1) {
%3 = alloca [1025 x i8]
%4 = alloca [1025 x i8]
%5 = getelementptr inbounds [1025 x i8], [1025 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [1025 x i8], [1025 x i8]* %4, i64 0, i64 0
%7 = tail call i32 @StrGetLength(i8* %0)
%8 = icmp sgt i32 %7, 1023
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = tail call i32 @StrGetLength(i8* %1)
%11 = icmp sgt i32 %10, 1023
br i1 %11, label %12, label %15
12: ; preds = %9, %2
%13 = load i32, i32* @stderr
%14 = tail call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %81
15: ; preds = %9
%16 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp eq i32* %16, null
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* @stderr
%20 = tail call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i8* %0)
br label %81
21: ; preds = %15
%22 = tail call i32* @fopen(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i32* %22, null
br i1 %23, label %30, label %24
24: ; preds = %21
%25 = call i32 @fgets(i8* %5, i32 1025, i32* %16)
%26 = call i32 @fgets(i8* %6, i32 1025, i32* %22)
%27 = icmp ne i32 %25, 0
%28 = icmp ne i32 %26, 0
%29 = and i1 %27, %28
br i1 %29, label %34, label %59
30: ; preds = %21
%31 = load i32, i32* @stderr
%32 = tail call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i8* %1)
%33 = tail call i32 @fclose(i32* %16)
br label %81
34: ; preds = %24, %71
%35 = phi i32 [ %72, %71 ], [ 1, %24 ]
%36 = call i32 @StrGetLength(i8* %5)
%37 = icmp ugt i32 %36, 1023
br i1 %37, label %38, label %43
38: ; preds = %34
%39 = load i32, i32* @stderr
%40 = call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%41 = call i32 @fclose(i32* %16)
%42 = call i32 @fclose(i32* %22)
br label %81
43: ; preds = %34
%44 = call i32 @StrGetLength(i8* %6)
%45 = icmp ugt i32 %44, 1023
br i1 %45, label %46, label %51
46: ; preds = %43
%47 = load i32, i32* @stderr
%48 = call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%49 = call i32 @fclose(i32* %16)
%50 = call i32 @fclose(i32* %22)
br label %81
51: ; preds = %43
%52 = call i64 @StrCompare(i8* %5, i8* %6)
%53 = icmp eq i64 %52, 0
br i1 %53, label %71, label %54
54: ; preds = %51
%55 = load i32, i32* @stdout
%56 = call i32 (i32, i8*, ...) @fprintf(i32 %55, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* %0, i32 %35, i8* %5)
%57 = load i32, i32* @stdout
%58 = call i32 (i32, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* %1, i32 %35, i8* %6)
br label %71
59: ; preds = %71, %24
%60 = phi i32 [ 1, %24 ], [ %72, %71 ]
%61 = phi i32 [ %25, %24 ], [ %73, %71 ]
%62 = phi i1 [ %28, %24 ], [ %76, %71 ]
%63 = icmp eq i32 %61, 0
%64 = xor i1 %63, %62
br i1 %64, label %78, label %65
65: ; preds = %59
%66 = load i32, i32* @stderr
%67 = select i1 %63, i8* %0, i8* %1
%68 = call i32 (i32, i8*, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i8* %67, i32 %60)
%69 = call i32 @fclose(i32* %16)
%70 = call i32 @fclose(i32* %22)
br label %81
71: ; preds = %51, %54
%72 = add nuw nsw i32 %35, 1
%73 = call i32 @fgets(i8* %5, i32 1025, i32* %16)
%74 = call i32 @fgets(i8* %6, i32 1025, i32* %22)
%75 = icmp ne i32 %73, 0
%76 = icmp ne i32 %74, 0
%77 = and i1 %75, %76
br i1 %77, label %34, label %59
78: ; preds = %59
%79 = call i32 @fclose(i32* %16)
%80 = call i32 @fclose(i32* %22)
br label %81
81: ; preds = %65, %46, %38, %18, %30, %78, %12
%82 = phi i32 [ 0, %12 ], [ 0, %18 ], [ 0, %30 ], [ 1, %78 ], [ 0, %38 ], [ 0, %46 ], [ 0, %65 ]
ret i32 %82
}