#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 uint16_t;
typedef scalar_t__ off_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
scalar_t__ calloc(size_t, size_t);
int fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
size_t fread(int *, size_t, size_t, int /*<<< orphan*/ *);
scalar_t__ fseeko(int /*<<< orphan*/ *, int /*<<< orphan*/, int /*<<< orphan*/);
scalar_t__ ftello(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ stderr;
int hvecs_read(const char *file_in, uint16_t **data, int *n, int *m) {
  size_t s1 = sizeof(uint16_t), s2 = sizeof(uint16_t), i = 0, nn, mm;
  int N = 0, k = 0, tmp = 0;
  uint16_t M = 0;
  off_t L = 0, j;
  FILE *fid = fopen(file_in, "rb");
  if (fid == NULL)
    return EXIT_FAILURE;
  i = fread(&M, s1, 1, fid);
  if (i != 1)
    return EXIT_FAILURE;
  *m = (int)M;
  mm = (size_t)M;
  j = fseeko(fid, 0, SEEK_END);
  L = ftello(fid);
  N = (int)L / (s1 + (*m) * s2);
  *n = N;
  nn = (size_t)N;
  printf("The vector length is %d\nThere are %d vectors\n", M, N);
  j = fseeko(fid, 0, SEEK_SET);
  *data = (uint16_t *)calloc(nn * mm, s2);
  if ((*data) == NULL) {
    fprintf(stderr, "Can't allocate memory while reading file %s\n", file_in);
    return EXIT_FAILURE;
  }
  for (k = 0; k < N; k++) {
    i = fread(&tmp, s1, 1, fid);
    if (i != 1 || tmp != (*m))
      fprintf(stderr, "Incompatible vector\n");
    i = fread((*data) + (k * (*m)), s2, mm, fid);
    if (i != mm)
      fprintf(stderr, "Incompatible vector\n");
  }
  k = fclose(fid);
  if (k != 0)
    return EXIT_FAILURE;
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<hvecs_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movq   $0x4,-0x30(%rbp)
movq   $0x4,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
movl   $0x0,-0x60(%rbp)
movq   $0x0,-0x68(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe1e(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x78(%rbp)
cmpq   $0x0,-0x78(%rbp)
jne    1207 <hvecs_read+0x87>
mov    0x2dcb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    141d <hvecs_read+0x29d>
mov    -0x30(%rbp),%rsi
mov    -0x78(%rbp),%rcx
lea    -0x60(%rbp),%rdi
mov    $0x1,%edx
call   1040 <fread@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x1,-0x40(%rbp)
je     123d <hvecs_read+0xbd>
mov    0x2d95(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    141d <hvecs_read+0x29d>
mov    -0x60(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
movslq -0x60(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x78(%rbp),%rdi
mov    0x2d8f(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1090 <fseeko@plt>
mov    %rax,-0x70(%rbp)
mov    -0x78(%rbp),%rdi
call   1030 <ftello@plt>
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
cltq
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rdx
movslq (%rdx),%rdx
imul   -0x38(%rbp),%rdx
add    %rdx,%rcx
xor    %edx,%edx
div    %rcx
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
movslq -0x54(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x60(%rbp),%esi
mov    -0x54(%rbp),%edx
lea    0xd51(%rip),%rdi
call   1060 <printf@plt>
mov    -0x78(%rbp),%rdi
mov    0x2d0e(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1090 <fseeko@plt>
mov    %rax,-0x70(%rbp)
mov    -0x48(%rbp),%rdi
imul   -0x50(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1070 <calloc@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1325 <hvecs_read+0x1a5>
mov    0x2cd8(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xd24(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x2cad(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    141d <hvecs_read+0x29d>
movl   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    13ea <hvecs_read+0x26a>
mov    -0x30(%rbp),%rsi
mov    -0x78(%rbp),%rcx
lea    -0x5c(%rbp),%rdi
mov    $0x1,%edx
call   1040 <fread@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x1,-0x40(%rbp)
jne    136c <hvecs_read+0x1ec>
mov    -0x5c(%rbp),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
je     1383 <hvecs_read+0x203>
mov    0x2c65(%rip),%rax
mov    (%rax),%edi
lea    0xce2(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    -0x58(%rbp),%eax
mov    -0x28(%rbp),%rcx
imul   (%rcx),%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x38(%rbp),%rsi
mov    -0x50(%rbp),%rdx
mov    -0x78(%rbp),%rcx
call   1040 <fread@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
cmp    -0x50(%rbp),%rax
je     13d7 <hvecs_read+0x257>
mov    0x2c11(%rip),%rax
mov    (%rax),%edi
lea    0xc8e(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    13dc <hvecs_read+0x25c>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    132c <hvecs_read+0x1ac>
mov    -0x78(%rbp),%rdi
call   1050 <fclose@plt>
mov    %eax,-0x58(%rbp)
cmpl   $0x0,-0x58(%rbp)
je     1411 <hvecs_read+0x291>
mov    0x2bc1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    141d <hvecs_read+0x29d>
mov    0x2ba8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hvecs_read>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rcx,%r15
mov    %rdx,%r13
mov    %rsi,0x8(%rsp)
mov    %rdi,%rbp
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0xe4e(%rip),%rsi
call   10a0 <fopen@plt>
mov    0x2e0a(%rip),%r14
test   %rax,%rax
je     136f <hvecs_read+0x1ef>
mov    %rax,%rbx
mov    %rsp,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1040 <fread@plt>
cmp    $0x1,%rax
jne    136f <hvecs_read+0x1ef>
movslq (%rsp),%r12
mov    %r12d,(%r15)
mov    0x2df1(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1090 <fseeko@plt>
mov    %rbx,%rdi
call   1030 <ftello@plt>
movslq %eax,%rcx
movslq (%r15),%rdx
lea    0x4(,%rdx,4),%rsi
mov    %rcx,%rdx
or     %rsi,%rdx
shr    $0x20,%rdx
mov    %rbp,0x10(%rsp)
mov    %r13,%rdi
je     123a <hvecs_read+0xba>
mov    %rcx,%rax
xor    %edx,%edx
div    %rsi
mov    %rax,%r13
jmp    1241 <hvecs_read+0xc1>
xor    %edx,%edx
div    %esi
mov    %eax,%r13d
mov    %r13d,(%rdi)
movslq %r13d,%rbp
lea    0xdb5(%rip),%rdi
mov    %r12d,%esi
mov    %ebp,%edx
call   1060 <printf@plt>
mov    0x2d71(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1090 <fseeko@plt>
imul   %r12,%rbp
mov    $0x4,%esi
mov    %rbp,%rdi
call   1070 <calloc@plt>
mov    0x8(%rsp),%rcx
mov    %rax,(%rcx)
test   %rax,%rax
je     134a <hvecs_read+0x1ca>
test   %r13d,%r13d
jle    1335 <hvecs_read+0x1b5>
lea    0xdc1(%rip),%rbp
xor    %r14d,%r14d
jmp    12b9 <hvecs_read+0x139>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r14d
cmp    %r13d,%r14d
je     1335 <hvecs_read+0x1b5>
mov    $0x4,%esi
mov    $0x1,%edx
lea    0x4(%rsp),%rdi
mov    %rbx,%rcx
call   1040 <fread@plt>
cmp    $0x1,%rax
jne    12df <hvecs_read+0x15f>
mov    0x4(%rsp),%eax
cmp    (%r15),%eax
je     12f5 <hvecs_read+0x175>
mov    0x2cf2(%rip),%rax
mov    (%rax),%edi
mov    %rbp,%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    (%r15),%eax
imul   %r14d,%eax
movslq %eax,%rdi
shl    $0x2,%rdi
mov    0x8(%rsp),%rax
add    (%rax),%rdi
mov    $0x4,%esi
mov    %r12,%rdx
mov    %rbx,%rcx
call   1040 <fread@plt>
cmp    %r12,%rax
je     12b0 <hvecs_read+0x130>
mov    0x2cb4(%rip),%rax
mov    (%rax),%edi
mov    %rbp,%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    12b0 <hvecs_read+0x130>
mov    %rbx,%rdi
call   1050 <fclose@plt>
test   %eax,%eax
jne    1368 <hvecs_read+0x1e8>
mov    0x2c78(%rip),%r14
jmp    136f <hvecs_read+0x1ef>
mov    0x2c87(%rip),%rax
mov    (%rax),%edi
lea    0xcd7(%rip),%rsi
mov    0x10(%rsp),%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    136f <hvecs_read+0x1ef>
mov    0x2c59(%rip),%r14
mov    (%r14),%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
@EXIT_FAILURE = global i32 0
@SEEK_END = global i32 0
@.str.1 = [46 x i8] c"The vector length is %d\0AThere are %d vectors\0A\00"
@SEEK_SET = global i32 0
@stderr = global i32 0
@.str.2 = [45 x i8] c"Can't allocate memory while reading file %s\0A\00"
@.str.3 = [21 x i8] c"Incompatible vector\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @hvecs_read(i8* %0, i32** %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32**
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i64
%20 = alloca i64
%21 = alloca i32*
store i8* %0, i8** %6
store i32** %1, i32*** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i64 4, i64* %10
store i64 4, i64* %11
store i64 0, i64* %12
store i32 0, i32* %15
store i32 0, i32* %16
store i32 0, i32* %17
store i32 0, i32* %18
store i64 0, i64* %19
%22 = load i8*, i8** %6
%23 = call i32* @fopen(i8* %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %23, i32** %21
%24 = load i32*, i32** %21
%25 = icmp eq i32* %24, null
br i1 %25, label %26, label %28
26: ; preds = %4
%27 = load i32, i32* @EXIT_FAILURE
store i32 %27, i32* %5
br label %134
28: ; preds = %4
%29 = load i64, i64* %10
%30 = load i32*, i32** %21
%31 = call i64 @fread(i32* %18, i64 %29, i64 1, i32* %30)
store i64 %31, i64* %12
%32 = load i64, i64* %12
%33 = icmp ne i64 %32, 1
br i1 %33, label %34, label %36
34: ; preds = %28
%35 = load i32, i32* @EXIT_FAILURE
store i32 %35, i32* %5
br label %134
36: ; preds = %28
%37 = load i32, i32* %18
%38 = load i32*, i32** %9
store i32 %37, i32* %38
%39 = load i32, i32* %18
%40 = sext i32 %39 to i64
store i64 %40, i64* %14
%41 = load i32*, i32** %21
%42 = load i32, i32* @SEEK_END
%43 = call i64 @fseeko(i32* %41, i32 0, i32 %42)
store i64 %43, i64* %20
%44 = load i32*, i32** %21
%45 = call i64 @ftello(i32* %44)
store i64 %45, i64* %19
%46 = load i64, i64* %19
%47 = trunc i64 %46 to i32
%48 = sext i32 %47 to i64
%49 = load i64, i64* %10
%50 = load i32*, i32** %9
%51 = load i32, i32* %50
%52 = sext i32 %51 to i64
%53 = load i64, i64* %11
%54 = mul i64 %52, %53
%55 = add i64 %49, %54
%56 = udiv i64 %48, %55
%57 = trunc i64 %56 to i32
store i32 %57, i32* %15
%58 = load i32, i32* %15
%59 = load i32*, i32** %8
store i32 %58, i32* %59
%60 = load i32, i32* %15
%61 = sext i32 %60 to i64
store i64 %61, i64* %13
%62 = load i32, i32* %18
%63 = load i32, i32* %15
%64 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i32 %62, i32 %63)
%65 = load i32*, i32** %21
%66 = load i32, i32* @SEEK_SET
%67 = call i64 @fseeko(i32* %65, i32 0, i32 %66)
store i64 %67, i64* %20
%68 = load i64, i64* %13
%69 = load i64, i64* %14
%70 = mul i64 %68, %69
%71 = load i64, i64* %11
%72 = call i64 @calloc(i64 %70, i64 %71)
%73 = inttoptr i64 %72 to i32*
%74 = load i32**, i32*** %7
store i32* %73, i32** %74
%75 = load i32**, i32*** %7
%76 = load i32*, i32** %75
%77 = icmp eq i32* %76, null
br i1 %77, label %78, label %83
78: ; preds = %36
%79 = load i32, i32* @stderr
%80 = load i8*, i8** %6
%81 = call i32 (i32, i8*, ...) @fprintf(i32 %79, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0), i8* %80)
%82 = load i32, i32* @EXIT_FAILURE
store i32 %82, i32* %5
br label %134
83: ; preds = %36
store i32 0, i32* %16
br label %84
84: ; preds = %122, %83
%85 = load i32, i32* %16
%86 = load i32, i32* %15
%87 = icmp slt i32 %85, %86
br i1 %87, label %88, label %125
88: ; preds = %84
%89 = load i64, i64* %10
%90 = load i32*, i32** %21
%91 = call i64 @fread(i32* %17, i64 %89, i64 1, i32* %90)
store i64 %91, i64* %12
%92 = load i64, i64* %12
%93 = icmp ne i64 %92, 1
br i1 %93, label %99, label %94
94: ; preds = %88
%95 = load i32, i32* %17
%96 = load i32*, i32** %9
%97 = load i32, i32* %96
%98 = icmp ne i32 %95, %97
br i1 %98, label %99, label %102
99: ; preds = %94, %88
%100 = load i32, i32* @stderr
%101 = call i32 (i32, i8*, ...) @fprintf(i32 %100, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %102
102: ; preds = %99, %94
%103 = load i32**, i32*** %7
%104 = load i32*, i32** %103
%105 = load i32, i32* %16
%106 = load i32*, i32** %9
%107 = load i32, i32* %106
%108 = mul nsw i32 %105, %107
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds i32, i32* %104, i64 %109
%111 = load i64, i64* %11
%112 = load i64, i64* %14
%113 = load i32*, i32** %21
%114 = call i64 @fread(i32* %110, i64 %111, i64 %112, i32* %113)
store i64 %114, i64* %12
%115 = load i64, i64* %12
%116 = load i64, i64* %14
%117 = icmp ne i64 %115, %116
br i1 %117, label %118, label %121
118: ; preds = %102
%119 = load i32, i32* @stderr
%120 = call i32 (i32, i8*, ...) @fprintf(i32 %119, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %121
121: ; preds = %118, %102
br label %122
122: ; preds = %121
%123 = load i32, i32* %16
%124 = add nsw i32 %123, 1
store i32 %124, i32* %16
br label %84
125: ; preds = %84
%126 = load i32*, i32** %21
%127 = call i32 @fclose(i32* %126)
store i32 %127, i32* %16
%128 = load i32, i32* %16
%129 = icmp ne i32 %128, 0
br i1 %129, label %130, label %132
130: ; preds = %125
%131 = load i32, i32* @EXIT_FAILURE
store i32 %131, i32* %5
br label %134
132: ; preds = %125
%133 = load i32, i32* @EXIT_SUCCESS
store i32 %133, i32* %5
br label %134
134: ; preds = %132, %130, %78, %34, %26
%135 = load i32, i32* %5
ret i32 %135
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
@EXIT_FAILURE = global i32 0
@SEEK_END = global i32 0
@.str.1 = [46 x i8] c"The vector length is %d\0AThere are %d vectors\0A\00"
@SEEK_SET = global i32 0
@stderr = global i32 0
@.str.2 = [45 x i8] c"Can't allocate memory while reading file %s\0A\00"
@.str.3 = [21 x i8] c"Incompatible vector\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @hvecs_read(i8* %0, i32** nocapture %1, i32* nocapture writeonly %2, i32* nocapture %3) {
%5 = alloca i32
%6 = alloca i32
%7 = bitcast i32* %5 to i8*
store i32 0, i32* %5
%8 = bitcast i32* %6 to i8*
store i32 0, i32* %6
%9 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i32* %9, null
br i1 %10, label %72, label %11
11: ; preds = %4
%12 = call i64 @fread(i32* %6, i64 4, i64 1, i32* %9)
%13 = icmp eq i64 %12, 1
br i1 %13, label %14, label %72
14: ; preds = %11
%15 = load i32, i32* %6
store i32 %15, i32* %3
%16 = sext i32 %15 to i64
%17 = load i32, i32* @SEEK_END
%18 = tail call i64 @fseeko(i32* %9, i32 0, i32 %17)
%19 = tail call i64 @ftello(i32* %9)
%20 = shl i64 %19, 32
%21 = ashr exact i64 %20, 32
%22 = load i32, i32* %3
%23 = sext i32 %22 to i64
%24 = shl nsw i64 %23, 2
%25 = add nsw i64 %24, 4
%26 = udiv i64 %21, %25
%27 = trunc i64 %26 to i32
store i32 %27, i32* %2
%28 = shl i64 %26, 32
%29 = ashr exact i64 %28, 32
%30 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i32 %15, i32 %27)
%31 = load i32, i32* @SEEK_SET
%32 = tail call i64 @fseeko(i32* %9, i32 0, i32 %31)
%33 = mul nsw i64 %29, %16
%34 = tail call i64 @calloc(i64 %33, i64 4)
%35 = inttoptr i64 %34 to i32*
store i32* %35, i32** %1
%36 = icmp eq i64 %34, 0
br i1 %36, label %39, label %37
37: ; preds = %14
%38 = icmp sgt i32 %27, 0
br i1 %38, label %42, label %68
39: ; preds = %14
%40 = load i32, i32* @stderr
%41 = tail call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0), i8* %0)
br label %72
42: ; preds = %37, %65
%43 = phi i32 [ %66, %65 ], [ 0, %37 ]
%44 = call i64 @fread(i32* %5, i64 4, i64 1, i32* %9)
%45 = icmp eq i64 %44, 1
br i1 %45, label %46, label %50
46: ; preds = %42
%47 = load i32, i32* %5
%48 = load i32, i32* %3
%49 = icmp eq i32 %47, %48
br i1 %49, label %54, label %50
50: ; preds = %46, %42
%51 = load i32, i32* @stderr
%52 = tail call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%53 = load i32, i32* %3
br label %54
54: ; preds = %50, %46
%55 = phi i32 [ %53, %50 ], [ %47, %46 ]
%56 = load i32*, i32** %1
%57 = mul nsw i32 %55, %43
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i32, i32* %56, i64 %58
%60 = tail call i64 @fread(i32* %59, i64 4, i64 %16, i32* %9)
%61 = icmp eq i64 %60, %16
br i1 %61, label %65, label %62
62: ; preds = %54
%63 = load i32, i32* @stderr
%64 = tail call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %65
65: ; preds = %54, %62
%66 = add nuw nsw i32 %43, 1
%67 = icmp eq i32 %66, %27
br i1 %67, label %68, label %42
68: ; preds = %65, %37
%69 = tail call i32 @fclose(i32* %9)
%70 = icmp eq i32 %69, 0
%71 = select i1 %70, i32* @EXIT_SUCCESS, i32* @EXIT_FAILURE
br label %72
72: ; preds = %68, %11, %4, %39
%73 = phi i32* [ @EXIT_FAILURE, %39 ], [ @EXIT_FAILURE, %4 ], [ @EXIT_FAILURE, %11 ], [ %71, %68 ]
%74 = load i32, i32* %73
ret i32 %74
}