#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 */
scalar_t__ EOF;
int /*<<< orphan*/ compare_results(unsigned char *, unsigned char *, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(unsigned char *);
scalar_t__ fscanf(int /*<<< orphan*/ *, char *, ...);
unsigned char *malloc(int);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int stub1(char *, char *, unsigned long long);
int do_comparison1(char *infile, char *outfile,
                   int (*funcs[])(char *, char *, unsigned long long),
                   int funcslength) {
  setbuf(stdout, NULL);
  FILE *fpin = fopen(infile, "r");
  FILE *fpout = fopen(outfile, "r");
  if (fpin == NULL) {
    fprintf(stderr, "Can't open input file in.list!\n");
    exit(1);
  }
  if (fpout == NULL) {
    fprintf(stderr, "Can't open input file in.list!\n");
    exit(1);
  }
  int inlength, outlength, i, testno;
  testno = 1;
  while (fscanf(fpin, "%d", &inlength) != EOF &&
         fscanf(fpout, "%d", &outlength) != EOF) {
    unsigned char *input = malloc(inlength * sizeof(char));
    unsigned char *output1 = malloc(outlength * sizeof(char));
    unsigned char *output2 = malloc(outlength * sizeof(char));
    for (i = 0; i < inlength; i++) {
      fscanf(fpin, "%2hhx", &input[i]);
    }
    for (i = 0; i < outlength; i++) {
      fscanf(fpout, "%2hhx", &output1[i]);
    }
    for (i = 0; i < funcslength; i++) {
      funcs[i](input, output2, inlength);
      if (!compare_results(output1, output2, outlength)) {
        printf("Test on line %d of file SHA256_compare_in failed for function "
               "%d\n",
               testno, i);
      }
    }
    free(input);
    free(output1);
    free(output2);
    testno++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<do_comparison1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    0x2e22(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <setbuf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe3c(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe28(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    120b <do_comparison1+0x7b>
mov    0x2de5(%rip),%rax
mov    (%rax),%edi
lea    0xe06(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
cmpq   $0x0,-0x30(%rbp)
jne    1235 <do_comparison1+0xa5>
mov    0x2dbb(%rip),%rax
mov    (%rax),%edi
lea    0xddc(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
movl   $0x1,-0x40(%rbp)
mov    -0x28(%rbp),%rdi
lea    0xddb(%rip),%rsi
lea    -0x34(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    %rax,%rcx
xor    %eax,%eax
mov    0x2d8a(%rip),%rdx
cmp    (%rdx),%rcx
mov    %al,-0x59(%rbp)
je     1290 <do_comparison1+0x100>
mov    -0x30(%rbp),%rdi
lea    0xdad(%rip),%rsi
lea    -0x38(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    0x2d61(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
mov    %al,-0x59(%rbp)
mov    -0x59(%rbp),%al
test   $0x1,%al
jne    12a0 <do_comparison1+0x110>
jmp    13e9 <do_comparison1+0x259>
movslq -0x34(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x48(%rbp)
movslq -0x38(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x50(%rbp)
movslq -0x38(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x58(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    1317 <do_comparison1+0x187>
mov    -0x28(%rbp),%rdi
mov    -0x48(%rbp),%rdx
movslq -0x3c(%rbp),%rax
add    %rax,%rdx
lea    0xd23(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12e0 <do_comparison1+0x150>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    1355 <do_comparison1+0x1c5>
mov    -0x30(%rbp),%rdi
mov    -0x50(%rbp),%rdx
movslq -0x3c(%rbp),%rax
add    %rax,%rdx
lea    0xce5(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    131e <do_comparison1+0x18e>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    13c0 <do_comparison1+0x230>
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x48(%rbp),%rdi
mov    -0x58(%rbp),%rsi
movslq -0x34(%rbp),%rdx
call   *%rax
mov    -0x50(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    -0x38(%rbp),%edx
call   10b0 <compare_results@plt>
cmp    $0x0,%eax
jne    13ad <do_comparison1+0x21d>
mov    -0x40(%rbp),%esi
mov    -0x3c(%rbp),%edx
lea    0xc83(%rip),%rdi
call   1050 <printf@plt>
jmp    13b2 <do_comparison1+0x222>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    135c <do_comparison1+0x1cc>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    123c <do_comparison1+0xac>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_comparison1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %ecx,0xc(%rsp)
mov    %rdx,0x30(%rsp)
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    0x2e1c(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1040 <setbuf@plt>
lea    0xe3c(%rip),%r14
mov    %rbp,%rdi
mov    %r14,%rsi
call   1090 <fopen@plt>
mov    %rax,%r15
mov    %rbx,%rdi
mov    %r14,%rsi
call   1090 <fopen@plt>
test   %r15,%r15
je     13a9 <do_comparison1+0x219>
mov    %rax,%rbx
test   %rax,%rax
je     13a9 <do_comparison1+0x219>
lea    0xe29(%rip),%rsi
lea    0x8(%rsp),%rdx
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    0x2dd9(%rip),%rbp
cmp    0x0(%rbp),%rax
jne    1226 <do_comparison1+0x96>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0xc(%rsp),%eax
mov    %rax,0x28(%rsp)
movl   $0x1,0x10(%rsp)
lea    0xde4(%rip),%r12
lea    0xde0(%rip),%r14
mov    %r15,0x18(%rsp)
mov    %rbx,0x20(%rsp)
jmp    12a9 <do_comparison1+0x119>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
addl   $0x1,0x10(%rsp)
mov    0x18(%rsp),%rdi
lea    0xd99(%rip),%r12
mov    %r12,%rsi
lea    0x8(%rsp),%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    0x2d49(%rip),%rbp
cmp    0x0(%rbp),%rax
je     1215 <do_comparison1+0x85>
mov    %rbx,%rdi
mov    %r12,%rsi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
cmp    0x0(%rbp),%rax
je     1215 <do_comparison1+0x85>
mov    0x8(%rsp),%edi
mov    %edi,0x14(%rsp)
call   1080 <malloc@plt>
mov    %rax,%r13
mov    0x4(%rsp),%ebp
mov    %ebp,%edi
call   1080 <malloc@plt>
mov    %rax,%r12
mov    %ebp,%edi
call   1080 <malloc@plt>
mov    %rax,%r15
cmpl   $0x0,0x14(%rsp)
jle    132a <do_comparison1+0x19a>
xor    %ebp,%ebp
mov    0x18(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r13,%rdx
add    %rbp,%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <fscanf@plt>
add    $0x1,%rbp
movslq 0x8(%rsp),%rax
cmp    %rax,%rbp
jl     1300 <do_comparison1+0x170>
mov    0x4(%rsp),%ebp
mov    0x20(%rsp),%rbx
test   %ebp,%ebp
jle    134f <do_comparison1+0x1bf>
xor    %ebp,%ebp
lea    (%r12,%rbp,1),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <fscanf@plt>
add    $0x1,%rbp
movslq 0x4(%rsp),%rax
cmp    %rax,%rbp
jl     1330 <do_comparison1+0x1a0>
cmpl   $0x0,0xc(%rsp)
jle    1260 <do_comparison1+0xd0>
xor    %ebp,%ebp
jmp    136f <do_comparison1+0x1df>
xchg   %ax,%ax
add    $0x1,%rbp
cmp    %rbp,0x28(%rsp)
je     1260 <do_comparison1+0xd0>
movslq 0x8(%rsp),%rdx
mov    %r13,%rdi
mov    %r15,%rsi
mov    0x30(%rsp),%rax
call   *(%rax,%rbp,8)
mov    0x4(%rsp),%edx
mov    %r12,%rdi
mov    %r15,%rsi
call   10b0 <compare_results@plt>
test   %eax,%eax
jne    1360 <do_comparison1+0x1d0>
lea    0xc8f(%rip),%rdi
mov    0x10(%rsp),%esi
mov    %ebp,%edx
call   1050 <printf@plt>
jmp    1360 <do_comparison1+0x1d0>
mov    0x2c28(%rip),%rax
mov    (%rax),%edi
lea    0xc49(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [32 x i8] c"Can't open input file in.list!\0A\00"
@.str.2 = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.3 = [6 x i8] c"%2hhx\00"
@.str.4 = [66 x i8] c"Test on line %d of file SHA256_compare_in failed for function %d\0A\00"
define i32 @do_comparison1(i8* %0, i8* %1, i32 (i8*, i8*, i64)** %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32 (i8*, i8*, i64)**
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 (i8*, i8*, i64)** %2, i32 (i8*, i8*, i64)*** %7
store i32 %3, i32* %8
%18 = load i32, i32* @stdout
%19 = call i32 @setbuf(i32 %18, i32* null)
%20 = load i8*, i8** %5
%21 = call i32* @fopen(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %21, i32** %9
%22 = load i8*, i8** %6
%23 = call i32* @fopen(i8* %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %23, i32** %10
%24 = load i32*, i32** %9
%25 = icmp eq i32* %24, null
br i1 %25, label %26, label %30
26: ; preds = %4
%27 = load i32, i32* @stderr
%28 = call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%29 = call i32 @exit(i32 1)
unreachable
30: ; preds = %4
%31 = load i32*, i32** %10
%32 = icmp eq i32* %31, null
br i1 %32, label %33, label %37
33: ; preds = %30
%34 = load i32, i32* @stderr
%35 = call i32 @fprintf(i32 %34, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%36 = call i32 @exit(i32 1)
unreachable
37: ; preds = %30
store i32 1, i32* %14
br label %38
38: ; preds = %124, %37
%39 = load i32*, i32** %9
%40 = call i64 (i32*, i8*, ...) @fscanf(i32* %39, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %11)
%41 = load i64, i64* @EOF
%42 = icmp ne i64 %40, %41
br i1 %42, label %43, label %48
43: ; preds = %38
%44 = load i32*, i32** %10
%45 = call i64 (i32*, i8*, ...) @fscanf(i32* %44, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %12)
%46 = load i64, i64* @EOF
%47 = icmp ne i64 %45, %46
br label %48
48: ; preds = %43, %38
%49 = phi i1 [ false, %38 ], [ %47, %43 ]
br i1 %49, label %50, label %133
50: ; preds = %48
%51 = load i32, i32* %11
%52 = sext i32 %51 to i64
%53 = mul i64 %52, 1
%54 = trunc i64 %53 to i32
%55 = call i8* @malloc(i32 %54)
store i8* %55, i8** %15
%56 = load i32, i32* %12
%57 = sext i32 %56 to i64
%58 = mul i64 %57, 1
%59 = trunc i64 %58 to i32
%60 = call i8* @malloc(i32 %59)
store i8* %60, i8** %16
%61 = load i32, i32* %12
%62 = sext i32 %61 to i64
%63 = mul i64 %62, 1
%64 = trunc i64 %63 to i32
%65 = call i8* @malloc(i32 %64)
store i8* %65, i8** %17
store i32 0, i32* %13
br label %66
66: ; preds = %77, %50
%67 = load i32, i32* %13
%68 = load i32, i32* %11
%69 = icmp slt i32 %67, %68
br i1 %69, label %70, label %80
70: ; preds = %66
%71 = load i32*, i32** %9
%72 = load i8*, i8** %15
%73 = load i32, i32* %13
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i8, i8* %72, i64 %74
%76 = call i64 (i32*, i8*, ...) @fscanf(i32* %71, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %75)
br label %77
77: ; preds = %70
%78 = load i32, i32* %13
%79 = add nsw i32 %78, 1
store i32 %79, i32* %13
br label %66
80: ; preds = %66
store i32 0, i32* %13
br label %81
81: ; preds = %92, %80
%82 = load i32, i32* %13
%83 = load i32, i32* %12
%84 = icmp slt i32 %82, %83
br i1 %84, label %85, label %95
85: ; preds = %81
%86 = load i32*, i32** %10
%87 = load i8*, i8** %16
%88 = load i32, i32* %13
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds i8, i8* %87, i64 %89
%91 = call i64 (i32*, i8*, ...) @fscanf(i32* %86, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %90)
br label %92
92: ; preds = %85
%93 = load i32, i32* %13
%94 = add nsw i32 %93, 1
store i32 %94, i32* %13
br label %81
95: ; preds = %81
store i32 0, i32* %13
br label %96
96: ; preds = %121, %95
%97 = load i32, i32* %13
%98 = load i32, i32* %8
%99 = icmp slt i32 %97, %98
br i1 %99, label %100, label %124
100: ; preds = %96
%101 = load i32 (i8*, i8*, i64)**, i32 (i8*, i8*, i64)*** %7
%102 = load i32, i32* %13
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds i32 (i8*, i8*, i64)*, i32 (i8*, i8*, i64)** %101, i64 %103
%105 = load i32 (i8*, i8*, i64)*, i32 (i8*, i8*, i64)** %104
%106 = load i8*, i8** %15
%107 = load i8*, i8** %17
%108 = load i32, i32* %11
%109 = sext i32 %108 to i64
%110 = call i32 %105(i8* %106, i8* %107, i64 %109)
%111 = load i8*, i8** %16
%112 = load i8*, i8** %17
%113 = load i32, i32* %12
%114 = call i32 @compare_results(i8* %111, i8* %112, i32 %113)
%115 = icmp ne i32 %114, 0
br i1 %115, label %120, label %116
116: ; preds = %100
%117 = load i32, i32* %14
%118 = load i32, i32* %13
%119 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0), i32 %117, i32 %118)
br label %120
120: ; preds = %116, %100
br label %121
121: ; preds = %120
%122 = load i32, i32* %13
%123 = add nsw i32 %122, 1
store i32 %123, i32* %13
br label %96
124: ; preds = %96
%125 = load i8*, i8** %15
%126 = call i32 @free(i8* %125)
%127 = load i8*, i8** %16
%128 = call i32 @free(i8* %127)
%129 = load i8*, i8** %17
%130 = call i32 @free(i8* %129)
%131 = load i32, i32* %14
%132 = add nsw i32 %131, 1
store i32 %132, i32* %14
br label %38
133: ; preds = %48
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [32 x i8] c"Can't open input file in.list!\0A\00"
@.str.2 = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.3 = [6 x i8] c"%2hhx\00"
@.str.4 = [66 x i8] c"Test on line %d of file SHA256_compare_in failed for function %d\0A\00"
define i32 @do_comparison1(i8* nocapture %0, i8* nocapture %1, i32 (i8*, i8*, i64)** nocapture %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = load i32, i32* @stdout
%8 = tail call i32 @setbuf(i32 %7, i32* null)
%9 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32* @fopen(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = icmp eq i32* %9, null
br i1 %11, label %12, label %16
12: ; preds = %4
%13 = load i32, i32* @stderr
%14 = tail call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%15 = tail call i32 @exit(i32 1)
unreachable
16: ; preds = %4
%17 = icmp eq i32* %10, null
br i1 %17, label %18, label %22
18: ; preds = %16
%19 = load i32, i32* @stderr
%20 = tail call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%21 = tail call i32 @exit(i32 1)
unreachable
22: ; preds = %16
%23 = bitcast i32* %5 to i8*
%24 = bitcast i32* %6 to i8*
%25 = call i64 (i32*, i8*, ...) @fscanf(i32* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %5)
%26 = load i64, i64* @EOF
%27 = icmp eq i64 %25, %26
br i1 %27, label %89, label %28
28: ; preds = %22
%29 = icmp sgt i32 %3, 0
%30 = zext i32 %3 to i64
br label %31
31: ; preds = %28, %81
%32 = phi i32 [ 1, %28 ], [ %85, %81 ]
%33 = call i64 (i32*, i8*, ...) @fscanf(i32* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %6)
%34 = load i64, i64* @EOF
%35 = icmp eq i64 %33, %34
br i1 %35, label %89, label %36
36: ; preds = %31
%37 = load i32, i32* %5
%38 = call i8* @malloc(i32 %37)
%39 = load i32, i32* %6
%40 = call i8* @malloc(i32 %39)
%41 = call i8* @malloc(i32 %39)
%42 = icmp sgt i32 %37, 0
br i1 %42, label %48, label %45
43: ; preds = %48
%44 = load i32, i32* %6
br label %45
45: ; preds = %43, %36
%46 = phi i32 [ %44, %43 ], [ %39, %36 ]
%47 = icmp sgt i32 %46, 0
br i1 %47, label %57, label %56
48: ; preds = %36, %48
%49 = phi i64 [ %52, %48 ], [ 0, %36 ]
%50 = getelementptr inbounds i8, i8* %38, i64 %49
%51 = call i64 (i32*, i8*, ...) @fscanf(i32* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %50)
%52 = add nuw nsw i64 %49, 1
%53 = load i32, i32* %5
%54 = sext i32 %53 to i64
%55 = icmp slt i64 %52, %54
br i1 %55, label %48, label %43
56: ; preds = %57, %45
br i1 %29, label %65, label %81
57: ; preds = %45, %57
%58 = phi i64 [ %61, %57 ], [ 0, %45 ]
%59 = getelementptr inbounds i8, i8* %40, i64 %58
%60 = call i64 (i32*, i8*, ...) @fscanf(i32* %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %59)
%61 = add nuw nsw i64 %58, 1
%62 = load i32, i32* %6
%63 = sext i32 %62 to i64
%64 = icmp slt i64 %61, %63
br i1 %64, label %57, label %56
65: ; preds = %56, %78
%66 = phi i64 [ %79, %78 ], [ 0, %56 ]
%67 = getelementptr inbounds i32 (i8*, i8*, i64)*, i32 (i8*, i8*, i64)** %2, i64 %66
%68 = load i32 (i8*, i8*, i64)*, i32 (i8*, i8*, i64)** %67
%69 = load i32, i32* %5
%70 = sext i32 %69 to i64
%71 = call i32 %68(i8* %38, i8* %41, i64 %70)
%72 = load i32, i32* %6
%73 = call i32 @compare_results(i8* %40, i8* %41, i32 %72)
%74 = icmp eq i32 %73, 0
br i1 %74, label %75, label %78
75: ; preds = %65
%76 = trunc i64 %66 to i32
%77 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0), i32 %32, i32 %76)
br label %78
78: ; preds = %65, %75
%79 = add nuw nsw i64 %66, 1
%80 = icmp eq i64 %79, %30
br i1 %80, label %81, label %65
81: ; preds = %78, %56
%82 = call i32 @free(i8* %38)
%83 = call i32 @free(i8* %40)
%84 = call i32 @free(i8* %41)
%85 = add nuw nsw i32 %32, 1
%86 = call i64 (i32*, i8*, ...) @fscanf(i32* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %5)
%87 = load i64, i64* @EOF
%88 = icmp eq i64 %86, %87
br i1 %88, label %89, label %31
89: ; preds = %31, %81, %22
ret i32 0
}