#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 */
typedef struct TYPE_5__ TYPE_1__;

/* Type definitions */
struct TYPE_5__ {
  int /*<<< orphan*/ *next_in;
  int /*<<< orphan*/ *next_out;
  scalar_t__ avail_in;
  void *opaque;
  void *zfree;
  void *zalloc;
};
typedef TYPE_1__ z_stream;
typedef scalar_t__ off_t;
typedef int /*<<< orphan*/ FILE;
typedef int /*<<< orphan*/ Bytef;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int Z_ERRNO;
void *Z_NULL;
int Z_OK;
scalar_t__ ceil(int /*<<< orphan*/);
int dismissMember(TYPE_1__ *, int /*<<< orphan*/ *, size_t, size_t);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fcopy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, scalar_t__,
                 int /*<<< orphan*/ *);
int feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, scalar_t__, int /*<<< orphan*/);
scalar_t__ ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ getiomax(size_t *, size_t *);
int /*<<< orphan*/ inflateEnd(TYPE_1__ *);
int inflateInit2(TYPE_1__ *, int);
int /*<<< orphan*/ log10(int /*<<< orphan*/);
scalar_t__ malloc(size_t);
int /*<<< orphan*/ pow(int, int);
int /*<<< orphan*/ sprintf(char *, char *, char *, scalar_t__);
int /*<<< orphan*/ strlen(char *);
int gzunpack(char *input_file, char *output_dir) {
  FILE *inf = fopen(input_file, "r");
  if (inf == NULL) {
    return Z_ERRNO;
  }
  char output_file[strlen(output_dir) + 1 +
                   (int)ceil(log10(pow(2, sizeof(off_t) * 8))) + 3 + 1];
  off_t current_offset = 0;
  off_t next_offset = 0;
  z_stream z;
  z.zalloc = Z_NULL;
  z.zfree = Z_NULL;
  z.opaque = Z_NULL;
  z.avail_in = 0;
  int ret = inflateInit2(&z, 31);
  if (ret != Z_OK) {
    return ret;
  }
  size_t imax, omax;
  getiomax(&imax, &omax);
  z.next_in = (Bytef *)malloc(imax + omax);
  if (z.next_in == NULL) {
    return Z_ERRNO;
  }
  z.next_out = z.next_in + imax;
  int eof = 0;
  while (!eof) {
    current_offset = ftell(inf);
    ret = dismissMember(&z, inf, imax, omax);
    if (ret != Z_OK) {
      return ret;
    }
    eof = feof(inf);
    next_offset = ftell(inf);
    fseek(inf, current_offset, SEEK_SET);
    sprintf(output_file, "%s/%ld.gz", output_dir, current_offset);
    FILE *outf = fopen(output_file, "w");
    if (outf == NULL) {
      return Z_ERRNO;
    }
    if (fcopy(inf, outf, next_offset - current_offset, NULL) !=
        next_offset - current_offset) {
      return Z_ERRNO;
    }
    fclose(outf);
  }
  free(z.next_in);
  (void)inflateEnd(&z);
  fclose(inf);
  return ret;
}


x86 assembly (clang, -O0):
<gzunpack>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xdd2(%rip),%rsi
call   1100 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1253 <gzunpack+0x43>
mov    0x2d97(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1507 <gzunpack+0x2f7>
mov    -0x18(%rbp),%rdi
call   1080 <strlen@plt>
mov    %eax,-0xa4(%rbp)
mov    $0x2,%edi
mov    $0x40,%esi
call   1110 <pow@plt>
mov    %eax,%edi
call   1120 <log10@plt>
mov    %eax,%edi
call   1050 <ceil@plt>
mov    -0xa4(%rbp),%ecx
mov    %eax,%edx
mov    %ecx,%eax
mov    %edx,%ecx
lea    0x5(%rax,%rcx,1),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xa0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
mov    0x2cfc(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x48(%rbp)
mov    0x2cee(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x50(%rbp)
mov    0x2ce0(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x58(%rbp)
movq   $0x0,-0x60(%rbp)
lea    -0x70(%rbp),%rdi
mov    $0x1f,%esi
call   1070 <inflateInit2@plt>
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%eax
mov    0x2cde(%rip),%rcx
cmp    (%rcx),%eax
je     132c <gzunpack+0x11c>
mov    -0x74(%rbp),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x78(%rbp)
jmp    1500 <gzunpack+0x2f0>
lea    -0x80(%rbp),%rdi
lea    -0x88(%rbp),%rsi
call   10b0 <getiomax@plt>
mov    -0x80(%rbp),%rdi
add    -0x88(%rbp),%rdi
call   10d0 <malloc@plt>
mov    %rax,-0x70(%rbp)
cmpq   $0x0,-0x70(%rbp)
jne    1373 <gzunpack+0x163>
mov    0x2c7e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x78(%rbp)
jmp    1500 <gzunpack+0x2f0>
mov    -0x70(%rbp),%rax
mov    -0x80(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x68(%rbp)
movl   $0x0,-0x8c(%rbp)
cmpl   $0x0,-0x8c(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    13a9 <gzunpack+0x199>
jmp    14d8 <gzunpack+0x2c8>
mov    -0x20(%rbp),%rdi
call   1090 <ftell@plt>
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rsi
mov    -0x80(%rbp),%rdx
mov    -0x88(%rbp),%rcx
lea    -0x70(%rbp),%rdi
call   1030 <dismissMember@plt>
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%eax
mov    0x2c15(%rip),%rcx
cmp    (%rcx),%eax
je     13f5 <gzunpack+0x1e5>
mov    -0x74(%rbp),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x78(%rbp)
jmp    1500 <gzunpack+0x2f0>
mov    -0x20(%rbp),%rdi
call   10a0 <feof@plt>
mov    %eax,-0x8c(%rbp)
mov    -0x20(%rbp),%rdi
call   1090 <ftell@plt>
mov    %rax,-0x40(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    0x2bb0(%rip),%rax
mov    (%rax),%edx
call   10f0 <fseek@plt>
mov    -0xa0(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x38(%rbp),%rcx
lea    0xbc5(%rip),%rsi
call   1130 <sprintf@plt>
mov    -0xa0(%rbp),%rdi
lea    0xbbc(%rip),%rsi
call   1100 <fopen@plt>
mov    %rax,-0x98(%rbp)
cmpq   $0x0,-0x98(%rbp)
jne    1482 <gzunpack+0x272>
mov    0x2b6f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x78(%rbp)
jmp    1500 <gzunpack+0x2f0>
mov    -0x20(%rbp),%rdi
mov    -0x98(%rbp),%rsi
mov    -0x40(%rbp),%rdx
sub    -0x38(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   10e0 <fcopy@plt>
mov    -0x40(%rbp),%rcx
sub    -0x38(%rbp),%rcx
cmp    %rcx,%rax
je     14c7 <gzunpack+0x2b7>
mov    0x2b2a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x78(%rbp)
jmp    1500 <gzunpack+0x2f0>
mov    -0x98(%rbp),%rdi
call   1060 <fclose@plt>
jmp    1390 <gzunpack+0x180>
mov    -0x70(%rbp),%rdi
call   1040 <free@plt>
lea    -0x70(%rbp),%rdi
call   10c0 <inflateEnd@plt>
mov    -0x20(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x74(%rbp),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x78(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gzunpack>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rsi,%r14
lea    0xdd5(%rip),%rsi
call   1100 <fopen@plt>
test   %rax,%rax
je     13da <gzunpack+0x1ca>
mov    %rax,%rbx
mov    %r14,%rdi
call   1080 <strlen@plt>
mov    %r14,%r12
mov    %eax,%r14d
mov    $0x2,%edi
mov    $0x40,%esi
call   1110 <pow@plt>
mov    %eax,%edi
call   1120 <log10@plt>
mov    %eax,%edi
call   1050 <ceil@plt>
mov    %rsp,%r15
add    %r14d,%eax
add    $0x5,%eax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%r14
sub    %rax,%r14
mov    %r14,%rsp
mov    0x2d40(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x58(%rbp)
mov    %rax,-0x60(%rbp)
mov    %rax,-0x68(%rbp)
movq   $0x0,-0x70(%rbp)
lea    -0x80(%rbp),%rdi
mov    $0x1f,%esi
call   1070 <inflateInit2@plt>
mov    %eax,%ecx
mov    0x2d3a(%rip),%rax
cmp    (%rax),%ecx
jne    13fd <gzunpack+0x1ed>
lea    -0x38(%rbp),%rdi
lea    -0x48(%rbp),%rsi
call   10b0 <getiomax@plt>
mov    -0x48(%rbp),%rdi
add    -0x38(%rbp),%rdi
call   10d0 <malloc@plt>
mov    %rax,-0x80(%rbp)
test   %rax,%rax
je     13e5 <gzunpack+0x1d5>
mov    %r14,-0x50(%rbp)
mov    %r15,-0x30(%rbp)
mov    -0x38(%rbp),%rcx
lea    (%rax,%rcx,4),%rax
mov    %rax,-0x78(%rbp)
mov    %r12,%r14
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1090 <ftell@plt>
mov    %rax,%r13
mov    -0x38(%rbp),%rdx
mov    -0x48(%rbp),%rcx
lea    -0x80(%rbp),%rdi
mov    %rbx,%rsi
call   1030 <dismissMember@plt>
mov    %eax,%ecx
mov    0x2cc8(%rip),%rax
cmp    (%rax),%ecx
jne    13f9 <gzunpack+0x1e9>
mov    %ecx,-0x3c(%rbp)
mov    %rbx,%rdi
call   10a0 <feof@plt>
mov    %eax,-0x40(%rbp)
mov    %rbx,%rdi
call   1090 <ftell@plt>
mov    %rax,%r15
mov    0x2c80(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r13,%rsi
call   10f0 <fseek@plt>
mov    -0x50(%rbp),%r12
mov    %r12,%rdi
lea    0xc97(%rip),%rsi
mov    %r14,%rdx
mov    %r13,%rcx
call   1130 <sprintf@plt>
mov    %r12,%rdi
lea    0xc8c(%rip),%rsi
call   1100 <fopen@plt>
test   %rax,%rax
je     13f0 <gzunpack+0x1e0>
mov    %rbx,%rdi
mov    %rax,%r12
sub    %r13,%r15
mov    %rax,%rsi
mov    %r15,%rdx
xor    %ecx,%ecx
call   10e0 <fcopy@plt>
cmp    %r15,%rax
jne    13f0 <gzunpack+0x1e0>
mov    %r12,%rdi
call   1060 <fclose@plt>
cmpl   $0x0,-0x40(%rbp)
je     1300 <gzunpack+0xf0>
mov    -0x80(%rbp),%rdi
call   1040 <free@plt>
lea    -0x80(%rbp),%rdi
call   10c0 <inflateEnd@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
mov    -0x30(%rbp),%r15
mov    -0x3c(%rbp),%ecx
jmp    13fd <gzunpack+0x1ed>
mov    0x2bff(%rip),%rax
mov    (%rax),%ecx
jmp    1400 <gzunpack+0x1f0>
mov    0x2bf4(%rip),%rax
mov    (%rax),%ecx
jmp    13fd <gzunpack+0x1ed>
mov    0x2be9(%rip),%rax
mov    (%rax),%ecx
mov    -0x30(%rbp),%r15
mov    %r15,%rsp
mov    %ecx,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.TYPE_5__ = type { i32*, i32*, i64, i8*, i8*, i8* }
@.str = [2 x i8] c"r\00"
@Z_ERRNO = global i32 0
@Z_NULL = global i8* null
@Z_OK = global i32 0
@SEEK_SET = global i32 0
@.str.1 = [10 x i8] c"%s/%ld.gz\00"
@.str.2 = [2 x i8] c"w\00"
define i32 @gzunpack(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca %struct.TYPE_5__
%12 = alloca i32
%13 = alloca i32
%14 = alloca i64
%15 = alloca i64
%16 = alloca i32
%17 = alloca i32*
store i8* %0, i8** %4
store i8* %1, i8** %5
%18 = load i8*, i8** %4
%19 = call i32* @fopen(i8* %18, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %19, i32** %6
%20 = load i32*, i32** %6
%21 = icmp eq i32* %20, null
br i1 %21, label %22, label %24
22: ; preds = %2
%23 = load i32, i32* @Z_ERRNO
store i32 %23, i32* %3
br label %129
24: ; preds = %2
%25 = load i8*, i8** %5
%26 = call i32 @strlen(i8* %25)
%27 = add nsw i32 %26, 1
%28 = call i32 @pow(i32 2, i32 64)
%29 = call i32 @log10(i32 %28)
%30 = call i64 @ceil(i32 %29)
%31 = trunc i64 %30 to i32
%32 = add nsw i32 %27, %31
%33 = add nsw i32 %32, 3
%34 = add nsw i32 %33, 1
%35 = zext i32 %34 to i64
%36 = call i8* @llvm.stacksave()
store i8* %36, i8** %7
%37 = alloca i8, i64 %35
store i64 %35, i64* %8
store i64 0, i64* %9
store i64 0, i64* %10
%38 = load i8*, i8** @Z_NULL
%39 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %11, i32 0, i32 5
store i8* %38, i8** %39
%40 = load i8*, i8** @Z_NULL
%41 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %11, i32 0, i32 4
store i8* %40, i8** %41
%42 = load i8*, i8** @Z_NULL
%43 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %11, i32 0, i32 3
store i8* %42, i8** %43
%44 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %11, i32 0, i32 2
store i64 0, i64* %44
%45 = call i32 @inflateInit2(%struct.TYPE_5__* %11, i32 31)
store i32 %45, i32* %12
%46 = load i32, i32* %12
%47 = load i32, i32* @Z_OK
%48 = icmp ne i32 %46, %47
br i1 %48, label %49, label %51
49: ; preds = %24
%50 = load i32, i32* %12
store i32 %50, i32* %3
store i32 1, i32* %13
br label %127
51: ; preds = %24
%52 = call i32 @getiomax(i64* %14, i64* %15)
%53 = load i64, i64* %14
%54 = load i64, i64* %15
%55 = add i64 %53, %54
%56 = call i64 @malloc(i64 %55)
%57 = inttoptr i64 %56 to i32*
%58 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %11, i32 0, i32 0
store i32* %57, i32** %58
%59 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %11, i32 0, i32 0
%60 = load i32*, i32** %59
%61 = icmp eq i32* %60, null
br i1 %61, label %62, label %64
62: ; preds = %51
%63 = load i32, i32* @Z_ERRNO
store i32 %63, i32* %3
store i32 1, i32* %13
br label %127
64: ; preds = %51
%65 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %11, i32 0, i32 0
%66 = load i32*, i32** %65
%67 = load i64, i64* %14
%68 = getelementptr inbounds i32, i32* %66, i64 %67
%69 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %11, i32 0, i32 1
store i32* %68, i32** %69
store i32 0, i32* %16
br label %70
70: ; preds = %116, %64
%71 = load i32, i32* %16
%72 = icmp ne i32 %71, 0
%73 = xor i1 %72, true
br i1 %73, label %74, label %119
74: ; preds = %70
%75 = load i32*, i32** %6
%76 = call i64 @ftell(i32* %75)
store i64 %76, i64* %9
%77 = load i32*, i32** %6
%78 = load i64, i64* %14
%79 = load i64, i64* %15
%80 = call i32 @dismissMember(%struct.TYPE_5__* %11, i32* %77, i64 %78, i64 %79)
store i32 %80, i32* %12
%81 = load i32, i32* %12
%82 = load i32, i32* @Z_OK
%83 = icmp ne i32 %81, %82
br i1 %83, label %84, label %86
84: ; preds = %74
%85 = load i32, i32* %12
store i32 %85, i32* %3
store i32 1, i32* %13
br label %127
86: ; preds = %74
%87 = load i32*, i32** %6
%88 = call i32 @feof(i32* %87)
store i32 %88, i32* %16
%89 = load i32*, i32** %6
%90 = call i64 @ftell(i32* %89)
store i64 %90, i64* %10
%91 = load i32*, i32** %6
%92 = load i64, i64* %9
%93 = load i32, i32* @SEEK_SET
%94 = call i32 @fseek(i32* %91, i64 %92, i32 %93)
%95 = load i8*, i8** %5
%96 = load i64, i64* %9
%97 = call i32 @sprintf(i8* %37, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %95, i64 %96)
%98 = call i32* @fopen(i8* %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %98, i32** %17
%99 = load i32*, i32** %17
%100 = icmp eq i32* %99, null
br i1 %100, label %101, label %103
101: ; preds = %86
%102 = load i32, i32* @Z_ERRNO
store i32 %102, i32* %3
store i32 1, i32* %13
br label %127
103: ; preds = %86
%104 = load i32*, i32** %6
%105 = load i32*, i32** %17
%106 = load i64, i64* %10
%107 = load i64, i64* %9
%108 = sub nsw i64 %106, %107
%109 = call i64 @fcopy(i32* %104, i32* %105, i64 %108, i32* null)
%110 = load i64, i64* %10
%111 = load i64, i64* %9
%112 = sub nsw i64 %110, %111
%113 = icmp ne i64 %109, %112
br i1 %113, label %114, label %116
114: ; preds = %103
%115 = load i32, i32* @Z_ERRNO
store i32 %115, i32* %3
store i32 1, i32* %13
br label %127
116: ; preds = %103
%117 = load i32*, i32** %17
%118 = call i32 @fclose(i32* %117)
br label %70
119: ; preds = %70
%120 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %11, i32 0, i32 0
%121 = load i32*, i32** %120
%122 = call i32 @free(i32* %121)
%123 = call i32 @inflateEnd(%struct.TYPE_5__* %11)
%124 = load i32*, i32** %6
%125 = call i32 @fclose(i32* %124)
%126 = load i32, i32* %12
store i32 %126, i32* %3
store i32 1, i32* %13
br label %127
127: ; preds = %119, %114, %101, %84, %62, %49
%128 = load i8*, i8** %7
br label %129
129: ; preds = %127, %22
%130 = load i32, i32* %3
ret i32 %130
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { i32*, i32*, i64, i8*, i8*, i8* }
@.str = [2 x i8] c"r\00"
@Z_ERRNO = global i32 0
@Z_NULL = global i8* null
@Z_OK = global i32 0
@SEEK_SET = global i32 0
@.str.1 = [10 x i8] c"%s/%ld.gz\00"
@.str.2 = [2 x i8] c"w\00"
define i32 @gzunpack(i8* nocapture %0, i8* %1) {
%3 = alloca %struct.TYPE_5__
%4 = alloca i64
%5 = alloca i64
%6 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* @Z_ERRNO
br label %82
10: ; preds = %2
%11 = tail call i32 @strlen(i8* %1)
%12 = tail call i32 @pow(i32 2, i32 64)
%13 = tail call i32 @log10(i32 %12)
%14 = tail call i64 @ceil(i32 %13)
%15 = trunc i64 %14 to i32
%16 = add i32 %11, 5
%17 = add i32 %16, %15
%18 = zext i32 %17 to i64
%19 = tail call i8* @llvm.stacksave()
%20 = alloca i8, i64 %18
%21 = bitcast %struct.TYPE_5__* %3 to i8*
%22 = load i8*, i8** @Z_NULL
%23 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 0, i32 5
store i8* %22, i8** %23
%24 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 0, i32 4
store i8* %22, i8** %24
%25 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 0, i32 3
store i8* %22, i8** %25
%26 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 0, i32 2
store i64 0, i64* %26
%27 = call i32 @inflateInit2(%struct.TYPE_5__* %3, i32 31)
%28 = load i32, i32* @Z_OK
%29 = icmp eq i32 %27, %28
br i1 %29, label %30, label %80
30: ; preds = %10
%31 = bitcast i64* %4 to i8*
%32 = bitcast i64* %5 to i8*
%33 = call i32 @getiomax(i64* %4, i64* %5)
%34 = load i64, i64* %4
%35 = load i64, i64* %5
%36 = add i64 %35, %34
%37 = call i64 @malloc(i64 %36)
%38 = inttoptr i64 %37 to i32*
%39 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 0, i32 0
store i32* %38, i32** %39
%40 = icmp eq i64 %37, 0
br i1 %40, label %41, label %43
41: ; preds = %30
%42 = load i32, i32* @Z_ERRNO
br label %78
43: ; preds = %30
%44 = load i64, i64* %4
%45 = getelementptr inbounds i32, i32* %38, i64 %44
%46 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 0, i32 1
store i32* %45, i32** %46
br label %47
47: ; preds = %43, %70
%48 = call i64 @ftell(i32* %6)
%49 = load i64, i64* %4
%50 = load i64, i64* %5
%51 = call i32 @dismissMember(%struct.TYPE_5__* %3, i32* %6, i64 %49, i64 %50)
%52 = load i32, i32* @Z_OK
%53 = icmp eq i32 %51, %52
br i1 %53, label %54, label %78
54: ; preds = %47
%55 = call i32 @feof(i32* %6)
%56 = call i64 @ftell(i32* %6)
%57 = load i32, i32* @SEEK_SET
%58 = call i32 @fseek(i32* %6, i64 %48, i32 %57)
%59 = call i32 @sprintf(i8* %20, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %1, i64 %48)
%60 = call i32* @fopen(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%61 = icmp eq i32* %60, null
br i1 %61, label %62, label %64
62: ; preds = %54
%63 = load i32, i32* @Z_ERRNO
br label %78
64: ; preds = %54
%65 = sub nsw i64 %56, %48
%66 = call i64 @fcopy(i32* %6, i32* %60, i64 %65, i32* null)
%67 = icmp eq i64 %66, %65
br i1 %67, label %70, label %68
68: ; preds = %64
%69 = load i32, i32* @Z_ERRNO
br label %78
70: ; preds = %64
%71 = call i32 @fclose(i32* %60)
%72 = icmp eq i32 %55, 0
br i1 %72, label %47, label %73
73: ; preds = %70
%74 = load i32*, i32** %39
%75 = call i32 @free(i32* %74)
%76 = call i32 @inflateEnd(%struct.TYPE_5__* %3)
%77 = call i32 @fclose(i32* %6)
br label %78
78: ; preds = %47, %62, %68, %73, %41
%79 = phi i32 [ %42, %41 ], [ %51, %73 ], [ %63, %62 ], [ %69, %68 ], [ %51, %47 ]
br label %80
80: ; preds = %10, %78
%81 = phi i32 [ %79, %78 ], [ %27, %10 ]
br label %82
82: ; preds = %80, %8
%83 = phi i32 [ %9, %8 ], [ %81, %80 ]
ret i32 %83
}