#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_SET;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
unsigned int fread(unsigned char *, int, unsigned int, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, unsigned int,
                         int /*<<< orphan*/);
scalar_t__ malloc(unsigned int);
scalar_t__ memcmp(void *, void *, int);
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/, unsigned int);
unsigned int readLE32(unsigned char *);
int /*<<< orphan*/ stderr;
int lzpt_read_toc(FILE *fh_in, unsigned char **pp_toc, int *pnum_entries,
                  int *pmax_dblksz) {
  unsigned char iobuf[512], *p_toc = NULL;
  unsigned int lztp_version, toc_offset, toc_size, toc_nentries;
  fseek(fh_in, 0, SEEK_SET);
  if ((fread(iobuf, 1, (sizeof("TPZL") - 1), fh_in) != (sizeof("TPZL") - 1)) ||
      memcmp((void *)iobuf, (void *)"TPZL", (sizeof("TPZL") - 1))) {
    fprintf(stderr, "lzpt_read_toc(): Bad magic!\n");
    return 1;
  }
  fseek(fh_in, 4, SEEK_SET);
  fread(iobuf, sizeof(unsigned int), 1, fh_in);
  lztp_version = readLE32(iobuf);
  switch (lztp_version) {
  case 0x00000010:
    if (pmax_dblksz)
      *pmax_dblksz = 65536;
    break;
  case 0x00000011:
    if (pmax_dblksz)
      *pmax_dblksz = 131072;
    break;
  default:
    fprintf(stderr, "lzpt_read_toc(): Bad version!\n");
    return 1;
  }
  fseek(fh_in, 8, SEEK_SET);
  fread(iobuf, sizeof(unsigned int), 1, fh_in);
  toc_offset = readLE32(iobuf);
  fseek(fh_in, 12, SEEK_SET);
  fread(iobuf, sizeof(unsigned int), 1, fh_in);
  toc_size = readLE32(iobuf);
  toc_nentries = (toc_size / (2 * sizeof(unsigned int)));
  if (!(p_toc = (unsigned char *)malloc(toc_size))) {
    fprintf(stderr, "lzpt_read_toc(): Error allocating TOC!\n");
    return 1;
  }
  memset(p_toc, 0, toc_size);
  fseek(fh_in, toc_offset, SEEK_SET);
  if (fread(p_toc, 1, toc_size, fh_in) != toc_size) {
    fprintf(stderr, "lzpt_read_toc(): Error reading TOC!\n");
    return 1;
  }
  if (pp_toc) {
    *pp_toc = p_toc;
  } else {
    free((void *)p_toc);
  }
  if (pnum_entries)
    *pnum_entries = toc_nentries;
  return 0;
}


x86 assembly (clang, -O0):
<lzpt_read_toc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x260,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movq   $0x0,-0x238(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2e27(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10a0 <fseek@plt>
lea    -0x230(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x1,%esi
mov    $0x4,%edx
call   1040 <fread@plt>
mov    %eax,%eax
cmp    $0x4,%rax
jne    1202 <lzpt_read_toc+0x82>
lea    -0x230(%rbp),%rdi
lea    0xe12(%rip),%rsi
mov    $0x4,%edx
call   1060 <memcmp@plt>
cmp    $0x0,%rax
je     1223 <lzpt_read_toc+0xa3>
mov    0x2dd7(%rip),%rax
mov    (%rax),%edi
lea    0xdf3(%rip),%rsi
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1486 <lzpt_read_toc+0x306>
mov    -0x10(%rbp),%rdi
mov    0x2daa(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%esi
mov    %esi,-0x25c(%rbp)
call   10a0 <fseek@plt>
mov    -0x25c(%rbp),%esi
mov    -0x10(%rbp),%rcx
lea    -0x230(%rbp),%rdi
mov    %rdi,-0x258(%rbp)
mov    $0x1,%edx
call   1040 <fread@plt>
mov    -0x258(%rbp),%rdi
call   1080 <readLE32@plt>
mov    %eax,-0x23c(%rbp)
mov    -0x23c(%rbp),%eax
mov    %eax,-0x24c(%rbp)
sub    $0x10,%eax
je     12a2 <lzpt_read_toc+0x122>
jmp    128e <lzpt_read_toc+0x10e>
mov    -0x24c(%rbp),%eax
sub    $0x11,%eax
je     12bc <lzpt_read_toc+0x13c>
jmp    12d6 <lzpt_read_toc+0x156>
cmpq   $0x0,-0x28(%rbp)
je     12b7 <lzpt_read_toc+0x137>
mov    -0x28(%rbp),%rax
movl   $0x10000,(%rax)
jmp    12f7 <lzpt_read_toc+0x177>
cmpq   $0x0,-0x28(%rbp)
je     12d1 <lzpt_read_toc+0x151>
mov    -0x28(%rbp),%rax
movl   $0x20000,(%rax)
jmp    12f7 <lzpt_read_toc+0x177>
mov    0x2d03(%rip),%rax
mov    (%rax),%edi
lea    0xd3c(%rip),%rsi
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1486 <lzpt_read_toc+0x306>
mov    -0x10(%rbp),%rdi
mov    0x2cd6(%rip),%rax
mov    (%rax),%edx
mov    $0x8,%esi
call   10a0 <fseek@plt>
lea    -0x230(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <fread@plt>
lea    -0x230(%rbp),%rdi
call   1080 <readLE32@plt>
mov    %eax,-0x240(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2c93(%rip),%rax
mov    (%rax),%edx
mov    $0xc,%esi
call   10a0 <fseek@plt>
lea    -0x230(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <fread@plt>
lea    -0x230(%rbp),%rdi
call   1080 <readLE32@plt>
mov    %eax,-0x244(%rbp)
mov    -0x244(%rbp),%eax
shr    $0x3,%rax
mov    %eax,-0x248(%rbp)
mov    -0x244(%rbp),%edi
call   1090 <malloc@plt>
mov    %rax,-0x238(%rbp)
cmp    $0x0,%rax
jne    13ca <lzpt_read_toc+0x24a>
mov    0x2c30(%rip),%rax
mov    (%rax),%edi
lea    0xc88(%rip),%rsi
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1486 <lzpt_read_toc+0x306>
mov    -0x238(%rbp),%rdi
mov    -0x244(%rbp),%edx
xor    %esi,%esi
call   1050 <memset@plt>
mov    -0x10(%rbp),%rdi
mov    -0x240(%rbp),%esi
mov    0x2be9(%rip),%rax
mov    (%rax),%edx
call   10a0 <fseek@plt>
mov    -0x238(%rbp),%rdi
mov    -0x244(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fread@plt>
cmp    -0x244(%rbp),%eax
je     143e <lzpt_read_toc+0x2be>
mov    0x2bbc(%rip),%rax
mov    (%rax),%edi
lea    0xc3c(%rip),%rsi
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1486 <lzpt_read_toc+0x306>
cmpq   $0x0,-0x18(%rbp)
je     145c <lzpt_read_toc+0x2dc>
mov    -0x238(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
jmp    1468 <lzpt_read_toc+0x2e8>
mov    -0x238(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x20(%rbp)
je     147f <lzpt_read_toc+0x2ff>
mov    -0x248(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x260,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lzpt_read_toc>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x218,%rsp
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rsi,%r15
mov    %rdi,%rbx
mov    0x2e34(%rip),%r14
mov    (%r14),%edx
xor    %esi,%esi
call   10a0 <fseek@plt>
lea    0x10(%rsp),%rdi
mov    $0x1,%ebp
mov    $0x1,%esi
mov    $0x4,%edx
mov    %rbx,%rcx
call   1040 <fread@plt>
cmp    $0x4,%eax
jne    11ea <lzpt_read_toc+0x6a>
lea    0xe2a(%rip),%rsi
lea    0x10(%rsp),%rdi
mov    $0x4,%edx
call   1060 <memcmp@plt>
test   %rax,%rax
je     1213 <lzpt_read_toc+0x93>
mov    0x2def(%rip),%rax
mov    (%rax),%edi
lea    0xe0b(%rip),%rsi
call   1070 <fprintf@plt>
mov    %ebp,%eax
add    $0x218,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x4,%esi
call   10a0 <fseek@plt>
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fread@plt>
mov    %rbp,%rdi
call   1080 <readLE32@plt>
cmp    $0x11,%eax
je     1264 <lzpt_read_toc+0xe4>
cmp    $0x10,%eax
jne    1334 <lzpt_read_toc+0x1b4>
mov    %r13,0x8(%rsp)
mov    $0x10000,%eax
test   %r12,%r12
jne    1273 <lzpt_read_toc+0xf3>
jmp    1277 <lzpt_read_toc+0xf7>
mov    %r13,0x8(%rsp)
mov    $0x20000,%eax
test   %r12,%r12
je     1277 <lzpt_read_toc+0xf7>
mov    %eax,(%r12)
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x8,%esi
call   10a0 <fseek@plt>
lea    0x10(%rsp),%r12
mov    $0x1,%ebp
mov    %r12,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fread@plt>
mov    %r12,%rdi
call   1080 <readLE32@plt>
mov    %eax,0x4(%rsp)
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0xc,%esi
call   10a0 <fseek@plt>
mov    %r12,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fread@plt>
mov    %r12,%rdi
call   1080 <readLE32@plt>
mov    %eax,%r12d
mov    %eax,%edi
call   1090 <malloc@plt>
test   %rax,%rax
je     1353 <lzpt_read_toc+0x1d3>
mov    %rax,%r13
mov    %rax,%rdi
xor    %esi,%esi
mov    %r12d,%edx
call   1050 <memset@plt>
mov    (%r14),%edx
mov    %rbx,%rdi
mov    0x4(%rsp),%esi
call   10a0 <fseek@plt>
mov    $0x1,%ebp
mov    %r13,%rdi
mov    $0x1,%esi
mov    %r12d,%edx
mov    %rbx,%rcx
call   1040 <fread@plt>
cmp    %r12d,%eax
jne    1368 <lzpt_read_toc+0x1e8>
test   %r15,%r15
je     137d <lzpt_read_toc+0x1fd>
mov    %r13,(%r15)
jmp    1385 <lzpt_read_toc+0x205>
mov    0x2ca5(%rip),%rax
mov    (%rax),%edi
lea    0xcde(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x1,%ebp
jmp    11ff <lzpt_read_toc+0x7f>
mov    0x2c86(%rip),%rax
mov    (%rax),%edi
lea    0xcde(%rip),%rsi
jmp    11fa <lzpt_read_toc+0x7a>
mov    0x2c71(%rip),%rax
mov    (%rax),%edi
lea    0xcf1(%rip),%rsi
jmp    11fa <lzpt_read_toc+0x7a>
mov    %r13,%rdi
call   1030 <free@plt>
xor    %ebp,%ebp
mov    0x8(%rsp),%rax
test   %rax,%rax
je     11ff <lzpt_read_toc+0x7f>
shr    $0x3,%r12d
mov    %r12d,(%rax)
jmp    11ff <lzpt_read_toc+0x7f>

LLVM IR (-O0):
@SEEK_SET = global i32 0
@.str = [5 x i8] c"TPZL\00"
@stderr = global i32 0
@.str.1 = [29 x i8] c"lzpt_read_toc(): Bad magic!\0A\00"
@.str.2 = [31 x i8] c"lzpt_read_toc(): Bad version!\0A\00"
@.str.3 = [40 x i8] c"lzpt_read_toc(): Error allocating TOC!\0A\00"
@.str.4 = [37 x i8] c"lzpt_read_toc(): Error reading TOC!\0A\00"
define i32 @lzpt_read_toc(i32* %0, i8** %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i8**
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca [512 x i8]
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32* %0, i32** %6
store i8** %1, i8*** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i8* null, i8** %11
%16 = load i32*, i32** %6
%17 = load i32, i32* @SEEK_SET
%18 = call i32 @fseek(i32* %16, i32 0, i32 %17)
%19 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%20 = load i32*, i32** %6
%21 = call i32 @fread(i8* %19, i32 1, i32 4, i32* %20)
%22 = zext i32 %21 to i64
%23 = icmp ne i64 %22, 4
br i1 %23, label %28, label %24
24: ; preds = %4
%25 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%26 = call i64 @memcmp(i8* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%27 = icmp ne i64 %26, 0
br i1 %27, label %28, label %31
28: ; preds = %24, %4
%29 = load i32, i32* @stderr
%30 = call i32 @fprintf(i32 %29, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %5
br label %117
31: ; preds = %24
%32 = load i32*, i32** %6
%33 = load i32, i32* @SEEK_SET
%34 = call i32 @fseek(i32* %32, i32 4, i32 %33)
%35 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%36 = load i32*, i32** %6
%37 = call i32 @fread(i8* %35, i32 4, i32 1, i32* %36)
%38 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%39 = call i32 @readLE32(i8* %38)
store i32 %39, i32* %12
%40 = load i32, i32* %12
switch i32 %40, label %53 [
i32 16, label %41
i32 17, label %47
]
41: ; preds = %31
%42 = load i32*, i32** %9
%43 = icmp ne i32* %42, null
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = load i32*, i32** %9
store i32 65536, i32* %45
br label %46
46: ; preds = %44, %41
br label %56
47: ; preds = %31
%48 = load i32*, i32** %9
%49 = icmp ne i32* %48, null
br i1 %49, label %50, label %52
50: ; preds = %47
%51 = load i32*, i32** %9
store i32 131072, i32* %51
br label %52
52: ; preds = %50, %47
br label %56
53: ; preds = %31
%54 = load i32, i32* @stderr
%55 = call i32 @fprintf(i32 %54, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %5
br label %117
56: ; preds = %52, %46
%57 = load i32*, i32** %6
%58 = load i32, i32* @SEEK_SET
%59 = call i32 @fseek(i32* %57, i32 8, i32 %58)
%60 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%61 = load i32*, i32** %6
%62 = call i32 @fread(i8* %60, i32 4, i32 1, i32* %61)
%63 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%64 = call i32 @readLE32(i8* %63)
store i32 %64, i32* %13
%65 = load i32*, i32** %6
%66 = load i32, i32* @SEEK_SET
%67 = call i32 @fseek(i32* %65, i32 12, i32 %66)
%68 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%69 = load i32*, i32** %6
%70 = call i32 @fread(i8* %68, i32 4, i32 1, i32* %69)
%71 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%72 = call i32 @readLE32(i8* %71)
store i32 %72, i32* %14
%73 = load i32, i32* %14
%74 = zext i32 %73 to i64
%75 = udiv i64 %74, 8
%76 = trunc i64 %75 to i32
store i32 %76, i32* %15
%77 = load i32, i32* %14
%78 = call i64 @malloc(i32 %77)
%79 = inttoptr i64 %78 to i8*
store i8* %79, i8** %11
%80 = icmp ne i8* %79, null
br i1 %80, label %84, label %81
81: ; preds = %56
%82 = load i32, i32* @stderr
%83 = call i32 @fprintf(i32 %82, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %5
br label %117
84: ; preds = %56
%85 = load i8*, i8** %11
%86 = load i32, i32* %14
%87 = call i32 @memset(i8* %85, i32 0, i32 %86)
%88 = load i32*, i32** %6
%89 = load i32, i32* %13
%90 = load i32, i32* @SEEK_SET
%91 = call i32 @fseek(i32* %88, i32 %89, i32 %90)
%92 = load i8*, i8** %11
%93 = load i32, i32* %14
%94 = load i32*, i32** %6
%95 = call i32 @fread(i8* %92, i32 1, i32 %93, i32* %94)
%96 = load i32, i32* %14
%97 = icmp ne i32 %95, %96
br i1 %97, label %98, label %101
98: ; preds = %84
%99 = load i32, i32* @stderr
%100 = call i32 @fprintf(i32 %99, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %5
br label %117
101: ; preds = %84
%102 = load i8**, i8*** %7
%103 = icmp ne i8** %102, null
br i1 %103, label %104, label %107
104: ; preds = %101
%105 = load i8*, i8** %11
%106 = load i8**, i8*** %7
store i8* %105, i8** %106
br label %110
107: ; preds = %101
%108 = load i8*, i8** %11
%109 = call i32 @free(i8* %108)
br label %110
110: ; preds = %107, %104
%111 = load i32*, i32** %8
%112 = icmp ne i32* %111, null
br i1 %112, label %113, label %116
113: ; preds = %110
%114 = load i32, i32* %15
%115 = load i32*, i32** %8
store i32 %114, i32* %115
br label %116
116: ; preds = %113, %110
store i32 0, i32* %5
br label %117
117: ; preds = %116, %98, %81, %53, %28
%118 = load i32, i32* %5
ret i32 %118
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
@.str = [5 x i8] c"TPZL\00"
@stderr = global i32 0
@.str.1 = [29 x i8] c"lzpt_read_toc(): Bad magic!\0A\00"
@.str.2 = [31 x i8] c"lzpt_read_toc(): Bad version!\0A\00"
@.str.3 = [40 x i8] c"lzpt_read_toc(): Error allocating TOC!\0A\00"
@.str.4 = [37 x i8] c"lzpt_read_toc(): Error reading TOC!\0A\00"
define i32 @lzpt_read_toc(i32* nocapture %0, i8** writeonly %1, i32* writeonly %2, i32* writeonly %3) {
%5 = alloca [512 x i8]
%6 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* @SEEK_SET
%8 = tail call i32 @fseek(i32* %0, i32 0, i32 %7)
%9 = call i32 @fread(i8* %6, i32 1, i32 4, i32* %0)
%10 = icmp eq i32 %9, 4
br i1 %10, label %11, label %14
11: ; preds = %4
%12 = call i64 @memcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%13 = icmp eq i64 %12, 0
br i1 %13, label %17, label %14
14: ; preds = %11, %4
%15 = load i32, i32* @stderr
%16 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
br label %64
17: ; preds = %11
%18 = load i32, i32* @SEEK_SET
%19 = call i32 @fseek(i32* %0, i32 4, i32 %18)
%20 = call i32 @fread(i8* %6, i32 4, i32 1, i32* %0)
%21 = call i32 @readLE32(i8* %6)
switch i32 %21, label %26 [
i32 16, label %22
i32 17, label %24
]
22: ; preds = %17
%23 = icmp eq i32* %3, null
br i1 %23, label %31, label %29
24: ; preds = %17
%25 = icmp eq i32* %3, null
br i1 %25, label %31, label %29
26: ; preds = %17
%27 = load i32, i32* @stderr
%28 = call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
br label %64
29: ; preds = %24, %22
%30 = phi i32 [ 65536, %22 ], [ 131072, %24 ]
store i32 %30, i32* %3
br label %31
31: ; preds = %29, %24, %22
%32 = load i32, i32* @SEEK_SET
%33 = call i32 @fseek(i32* %0, i32 8, i32 %32)
%34 = call i32 @fread(i8* %6, i32 4, i32 1, i32* %0)
%35 = call i32 @readLE32(i8* %6)
%36 = load i32, i32* @SEEK_SET
%37 = call i32 @fseek(i32* %0, i32 12, i32 %36)
%38 = call i32 @fread(i8* %6, i32 4, i32 1, i32* %0)
%39 = call i32 @readLE32(i8* %6)
%40 = lshr i32 %39, 3
%41 = call i64 @malloc(i32 %39)
%42 = inttoptr i64 %41 to i8*
%43 = icmp eq i64 %41, 0
br i1 %43, label %44, label %47
44: ; preds = %31
%45 = load i32, i32* @stderr
%46 = call i32 @fprintf(i32 %45, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
br label %64
47: ; preds = %31
%48 = call i32 @memset(i8* %42, i32 0, i32 %39)
%49 = load i32, i32* @SEEK_SET
%50 = call i32 @fseek(i32* %0, i32 %35, i32 %49)
%51 = call i32 @fread(i8* %42, i32 1, i32 %39, i32* %0)
%52 = icmp eq i32 %51, %39
br i1 %52, label %56, label %53
53: ; preds = %47
%54 = load i32, i32* @stderr
%55 = call i32 @fprintf(i32 %54, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0))
br label %64
56: ; preds = %47
%57 = icmp eq i8** %1, null
br i1 %57, label %59, label %58
58: ; preds = %56
store i8* %42, i8** %1
br label %61
59: ; preds = %56
%60 = call i32 @free(i8* %42)
br label %61
61: ; preds = %59, %58
%62 = icmp eq i32* %2, null
br i1 %62, label %64, label %63
63: ; preds = %61
store i32 %40, i32* %2
br label %64
64: ; preds = %61, %63, %53, %44, %26, %14
%65 = phi i32 [ 1, %14 ], [ 1, %26 ], [ 1, %53 ], [ 1, %44 ], [ 0, %63 ], [ 0, %61 ]
ret i32 %65
}