#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 */

/* Variables and functions */
scalar_t__ get_data(unsigned char const *, long *, char *, unsigned int *,
                    char *, unsigned int *, void (*)(unsigned char));
scalar_t__ get_tables(unsigned char const *, long *, char *, unsigned int *,
                      char *, unsigned int *);
int /*<<< orphan*/ make_code_table(char *, int, unsigned int *, int);
int /*<<< orphan*/ pushout(unsigned char);
void *read_bits(unsigned char const *, long *, int);
int inflate(const unsigned char *data, long *p,
            void (*callback)(unsigned char d)) {
  char blast, btype;
  char hlit_size_table[288];
  unsigned int hlit_code_table[288];
  char hdist_size_table[30];
  unsigned int hdist_code_table[30];
again:
  blast = read_bits(data, p, 1);
  btype = read_bits(data, p, 2);
  if (btype == 1 || btype == 2) {
    if (btype == 2) {
      if (get_tables(data, p, hlit_size_table, hlit_code_table,
                     hdist_size_table, hdist_code_table) < 0)
        return -1;
    } else {
      int j;
      for (j = 0; j < 144; j++)
        hlit_size_table[j] = 8;
      for (; j < 256; j++)
        hlit_size_table[j] = 9;
      for (; j < 280; j++)
        hlit_size_table[j] = 7;
      for (; j < 288; j++)
        hlit_size_table[j] = 8;
      make_code_table(hlit_size_table, 288, hlit_code_table, 15);
      for (j = 0; j < 30; j++)
        hdist_size_table[j] = 5;
      make_code_table(hdist_size_table, 30, hdist_code_table, 15);
    }
    if (get_data(data, p, hlit_size_table, hlit_code_table, hdist_size_table,
                 hdist_code_table, callback) < 0)
      return -1;
    ;
  } else if (btype == 0) {
    unsigned int len;
    unsigned int l;
    unsigned char b;
    *p = (*p + 7) / 8;
    len = read_bits(data, p, 16);
    (void)read_bits(data, p, 16);
    for (l = 0; l < len; l++) {
      b = read_bits(data, p, 8);
      pushout(b);
      callback(b);
    }
  } else {
    return -1;
  }
  if (!blast)
    goto again;
  return 0;
}


x86 assembly (clang, -O0):
<inflate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x690,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1050 <read_bits@plt>
mov    %al,-0x21(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x2,%edx
call   1050 <read_bits@plt>
mov    %al,-0x22(%rbp)
movsbl -0x22(%rbp),%eax
cmp    $0x1,%eax
je     11ab <inflate+0x5b>
movsbl -0x22(%rbp),%eax
cmp    $0x2,%eax
jne    13a1 <inflate+0x251>
movsbl -0x22(%rbp),%eax
cmp    $0x2,%eax
jne    11fc <inflate+0xac>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x150(%rbp),%rdx
lea    -0x5d0(%rbp),%rcx
lea    -0x5f0(%rbp),%r8
lea    -0x670(%rbp),%r9
call   1030 <get_tables@plt>
cmp    $0x0,%rax
jge    11f7 <inflate+0xa7>
movl   $0xffffffff,-0x4(%rbp)
jmp    1484 <inflate+0x334>
jmp    1355 <inflate+0x205>
movl   $0x0,-0x674(%rbp)
cmpl   $0x90,-0x674(%rbp)
jge    1239 <inflate+0xe9>
movslq -0x674(%rbp),%rax
movb   $0x8,-0x150(%rbp,%rax,1)
08
mov    -0x674(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x674(%rbp)
jmp    1206 <inflate+0xb6>
jmp    123e <inflate+0xee>
cmpl   $0x100,-0x674(%rbp)
jge    1271 <inflate+0x121>
movslq -0x674(%rbp),%rax
movb   $0x9,-0x150(%rbp,%rax,1)
09
mov    -0x674(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x674(%rbp)
jmp    123e <inflate+0xee>
jmp    1276 <inflate+0x126>
cmpl   $0x118,-0x674(%rbp)
jge    12a9 <inflate+0x159>
movslq -0x674(%rbp),%rax
movb   $0x7,-0x150(%rbp,%rax,1)
07
mov    -0x674(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x674(%rbp)
jmp    1276 <inflate+0x126>
jmp    12ae <inflate+0x15e>
cmpl   $0x120,-0x674(%rbp)
jge    12e1 <inflate+0x191>
movslq -0x674(%rbp),%rax
movb   $0x8,-0x150(%rbp,%rax,1)
08
mov    -0x674(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x674(%rbp)
jmp    12ae <inflate+0x15e>
lea    -0x150(%rbp),%rdi
lea    -0x5d0(%rbp),%rdx
mov    $0x120,%esi
mov    $0xf,%ecx
call   1060 <make_code_table@plt>
movl   $0x0,-0x674(%rbp)
cmpl   $0x1e,-0x674(%rbp)
jge    1338 <inflate+0x1e8>
movslq -0x674(%rbp),%rax
movb   $0x5,-0x5f0(%rbp,%rax,1)
05
mov    -0x674(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x674(%rbp)
jmp    1308 <inflate+0x1b8>
lea    -0x5f0(%rbp),%rdi
lea    -0x670(%rbp),%rdx
mov    $0x1e,%esi
mov    $0xf,%ecx
call   1060 <make_code_table@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x150(%rbp),%rdx
lea    -0x5d0(%rbp),%rcx
lea    -0x5f0(%rbp),%r8
lea    -0x670(%rbp),%r9
mov    -0x20(%rbp),%rax
mov    %rax,(%rsp)
call   1070 <get_data@plt>
cmp    $0x0,%rax
jge    139c <inflate+0x24c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1484 <inflate+0x334>
jmp    146e <inflate+0x31e>
movsbl -0x22(%rbp),%eax
cmp    $0x0,%eax
jne    145d <inflate+0x30d>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
add    $0x7,%rax
mov    $0x8,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x10,%edx
call   1050 <read_bits@plt>
mov    %eax,-0x678(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x10,%edx
call   1050 <read_bits@plt>
movl   $0x0,-0x67c(%rbp)
mov    -0x67c(%rbp),%eax
cmp    -0x678(%rbp),%eax
jae    1458 <inflate+0x308>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x8,%edx
call   1050 <read_bits@plt>
mov    %al,-0x67d(%rbp)
movzbl -0x67d(%rbp),%edi
call   1040 <pushout@plt>
mov    -0x20(%rbp),%rax
movzbl -0x67d(%rbp),%edi
call   *%rax
mov    -0x67c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x67c(%rbp)
jmp    1401 <inflate+0x2b1>
jmp    1469 <inflate+0x319>
movl   $0xffffffff,-0x4(%rbp)
jmp    1484 <inflate+0x334>
jmp    146e <inflate+0x31e>
cmpb   $0x0,-0x21(%rbp)
jne    147d <inflate+0x32d>
jmp    1167 <inflate+0x17>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x690,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inflate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x678,%rsp
mov    %rdx,0x20(%rsp)
mov    %rsi,%r15
mov    %rdi,0x18(%rsp)
lea    0x50(%rsp),%r12
lea    0x30(%rsp),%r13
lea    0x170(%rsp),%r14
jmp    12bf <inflate+0x16f>
cs nopw 0x0(%rax,%rax,1)
nop
movaps 0xe69(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
lea    0xe0(%rsp),%rax
movaps 0xe2b(%rip),%xmm0
movaps %xmm0,0x60(%rax)
movaps %xmm0,0x50(%rax)
movaps %xmm0,0x40(%rax)
movaps %xmm0,0x30(%rax)
movaps %xmm0,0x20(%rax)
movaps %xmm0,0x10(%rax)
movaps %xmm0,(%rax)
movabs $0x707070707070707,%rcx
07 07 07
mov    %rcx,0x80(%rax)
movaps 0xe08(%rip),%xmm0
movaps %xmm0,0x70(%rax)
movabs $0x808080808080808,%rax
08 08 08
mov    %rax,0x168(%rsp)
mov    %r12,%rdi
mov    $0x120,%esi
mov    %r12,%rbp
lea    0x1f0(%rsp),%r12
mov    %r12,%rdx
mov    $0xf,%ecx
call   1060 <make_code_table@plt>
movaps 0xddb(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movups %xmm0,0x3e(%rsp)
mov    %r13,%rdi
mov    $0x1e,%esi
mov    %r14,%rdx
mov    $0xf,%ecx
call   1060 <make_code_table@plt>
mov    0x18(%rsp),%rbx
mov    0x20(%rsp),%rax
mov    %rax,(%rsp)
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
mov    %r12,%rcx
mov    %r13,%r8
mov    %r14,%r9
call   1070 <get_data@plt>
test   %rax,%rax
js     13d3 <inflate+0x283>
cmpb   $0x0,0x28(%rsp)
lea    0x50(%rsp),%r12
lea    0x30(%rsp),%r13
lea    0x170(%rsp),%r14
jne    13cb <inflate+0x27b>
mov    0x18(%rsp),%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x1,%edx
call   1050 <read_bits@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x2,%edx
call   1050 <read_bits@plt>
shl    $0x18,%eax
mov    %rbp,0x28(%rsp)
je     1350 <inflate+0x200>
movl   $0xffffffff,0x14(%rsp)
ff
cmp    $0x1000000,%eax
je     1190 <inflate+0x40>
cmp    $0x2000000,%eax
lea    0x1f0(%rsp),%rcx
jne    13d3 <inflate+0x283>
mov    0x18(%rsp),%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r12,%rbp
mov    %rcx,%r12
mov    %r13,%r8
mov    %r14,%r9
call   1030 <get_tables@plt>
test   %rax,%rax
jns    1279 <inflate+0x129>
jmp    13d3 <inflate+0x283>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%r15),%rax
lea    0x7(%rax),%rcx
add    $0xe,%rax
test   %rcx,%rcx
cmovns %rcx,%rax
sar    $0x3,%rax
mov    %rax,(%r15)
mov    0x18(%rsp),%r14
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x10,%edx
call   1050 <read_bits@plt>
mov    %rax,%rbp
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x10,%edx
call   1050 <read_bits@plt>
test   %ebp,%ebp
mov    0x20(%rsp),%rbx
je     12a2 <inflate+0x152>
xchg   %ax,%ax
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x8,%edx
call   1050 <read_bits@plt>
movzbl %al,%r12d
mov    %r12d,%edi
call   1040 <pushout@plt>
mov    %r12d,%edi
call   *%rbx
add    $0xffffffff,%ebp
jne    13a0 <inflate+0x250>
jmp    12a2 <inflate+0x152>
movl   $0x0,0x14(%rsp)
mov    0x14(%rsp),%eax
add    $0x678,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @inflate(i8* %0, i64* %1, void (i8)* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca void (i8)*
%8 = alloca i8
%9 = alloca i8
%10 = alloca [288 x i8]
%11 = alloca [288 x i32]
%12 = alloca [30 x i8]
%13 = alloca [30 x i32]
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i8
store i8* %0, i8** %5
store i64* %1, i64** %6
store void (i8)* %2, void (i8)** %7
br label %18
18: ; preds = %162, %3
%19 = load i8*, i8** %5
%20 = load i64*, i64** %6
%21 = call i8* @read_bits(i8* %19, i64* %20, i32 1)
%22 = ptrtoint i8* %21 to i8
store i8 %22, i8* %8
%23 = load i8*, i8** %5
%24 = load i64*, i64** %6
%25 = call i8* @read_bits(i8* %23, i64* %24, i32 2)
%26 = ptrtoint i8* %25 to i8
store i8 %26, i8* %9
%27 = load i8, i8* %9
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 1
br i1 %29, label %34, label %30
30: ; preds = %18
%31 = load i8, i8* %9
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 2
br i1 %33, label %34, label %123
34: ; preds = %30, %18
%35 = load i8, i8* %9
%36 = sext i8 %35 to i32
%37 = icmp eq i32 %36, 2
br i1 %37, label %38, label %49
38: ; preds = %34
%39 = load i8*, i8** %5
%40 = load i64*, i64** %6
%41 = getelementptr inbounds [288 x i8], [288 x i8]* %10, i64 0, i64 0
%42 = getelementptr inbounds [288 x i32], [288 x i32]* %11, i64 0, i64 0
%43 = getelementptr inbounds [30 x i8], [30 x i8]* %12, i64 0, i64 0
%44 = getelementptr inbounds [30 x i32], [30 x i32]* %13, i64 0, i64 0
%45 = call i64 @get_tables(i8* %39, i64* %40, i8* %41, i32* %42, i8* %43, i32* %44)
%46 = icmp slt i64 %45, 0
br i1 %46, label %47, label %48
47: ; preds = %38
store i32 -1, i32* %4
br label %164
48: ; preds = %38
br label %111
49: ; preds = %34
store i32 0, i32* %14
br label %50
50: ; preds = %57, %49
%51 = load i32, i32* %14
%52 = icmp slt i32 %51, 144
br i1 %52, label %53, label %60
53: ; preds = %50
%54 = load i32, i32* %14
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [288 x i8], [288 x i8]* %10, i64 0, i64 %55
store i8 8, i8* %56
br label %57
57: ; preds = %53
%58 = load i32, i32* %14
%59 = add nsw i32 %58, 1
store i32 %59, i32* %14
br label %50
60: ; preds = %50
br label %61
61: ; preds = %68, %60
%62 = load i32, i32* %14
%63 = icmp slt i32 %62, 256
br i1 %63, label %64, label %71
64: ; preds = %61
%65 = load i32, i32* %14
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds [288 x i8], [288 x i8]* %10, i64 0, i64 %66
store i8 9, i8* %67
br label %68
68: ; preds = %64
%69 = load i32, i32* %14
%70 = add nsw i32 %69, 1
store i32 %70, i32* %14
br label %61
71: ; preds = %61
br label %72
72: ; preds = %79, %71
%73 = load i32, i32* %14
%74 = icmp slt i32 %73, 280
br i1 %74, label %75, label %82
75: ; preds = %72
%76 = load i32, i32* %14
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [288 x i8], [288 x i8]* %10, i64 0, i64 %77
store i8 7, i8* %78
br label %79
79: ; preds = %75
%80 = load i32, i32* %14
%81 = add nsw i32 %80, 1
store i32 %81, i32* %14
br label %72
82: ; preds = %72
br label %83
83: ; preds = %90, %82
%84 = load i32, i32* %14
%85 = icmp slt i32 %84, 288
br i1 %85, label %86, label %93
86: ; preds = %83
%87 = load i32, i32* %14
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [288 x i8], [288 x i8]* %10, i64 0, i64 %88
store i8 8, i8* %89
br label %90
90: ; preds = %86
%91 = load i32, i32* %14
%92 = add nsw i32 %91, 1
store i32 %92, i32* %14
br label %83
93: ; preds = %83
%94 = getelementptr inbounds [288 x i8], [288 x i8]* %10, i64 0, i64 0
%95 = getelementptr inbounds [288 x i32], [288 x i32]* %11, i64 0, i64 0
%96 = call i32 @make_code_table(i8* %94, i32 288, i32* %95, i32 15)
store i32 0, i32* %14
br label %97
97: ; preds = %104, %93
%98 = load i32, i32* %14
%99 = icmp slt i32 %98, 30
br i1 %99, label %100, label %107
100: ; preds = %97
%101 = load i32, i32* %14
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds [30 x i8], [30 x i8]* %12, i64 0, i64 %102
store i8 5, i8* %103
br label %104
104: ; preds = %100
%105 = load i32, i32* %14
%106 = add nsw i32 %105, 1
store i32 %106, i32* %14
br label %97
107: ; preds = %97
%108 = getelementptr inbounds [30 x i8], [30 x i8]* %12, i64 0, i64 0
%109 = getelementptr inbounds [30 x i32], [30 x i32]* %13, i64 0, i64 0
%110 = call i32 @make_code_table(i8* %108, i32 30, i32* %109, i32 15)
br label %111
111: ; preds = %107, %48
%112 = load i8*, i8** %5
%113 = load i64*, i64** %6
%114 = getelementptr inbounds [288 x i8], [288 x i8]* %10, i64 0, i64 0
%115 = getelementptr inbounds [288 x i32], [288 x i32]* %11, i64 0, i64 0
%116 = getelementptr inbounds [30 x i8], [30 x i8]* %12, i64 0, i64 0
%117 = getelementptr inbounds [30 x i32], [30 x i32]* %13, i64 0, i64 0
%118 = load void (i8)*, void (i8)** %7
%119 = call i64 @get_data(i8* %112, i64* %113, i8* %114, i32* %115, i8* %116, i32* %117, void (i8)* %118)
%120 = icmp slt i64 %119, 0
br i1 %120, label %121, label %122
121: ; preds = %111
store i32 -1, i32* %4
br label %164
122: ; preds = %111
br label %159
123: ; preds = %30
%124 = load i8, i8* %9
%125 = sext i8 %124 to i32
%126 = icmp eq i32 %125, 0
br i1 %126, label %127, label %157
127: ; preds = %123
%128 = load i64*, i64** %6
%129 = load i64, i64* %128
%130 = add nsw i64 %129, 7
%131 = sdiv i64 %130, 8
%132 = load i64*, i64** %6
store i64 %131, i64* %132
%133 = load i8*, i8** %5
%134 = load i64*, i64** %6
%135 = call i8* @read_bits(i8* %133, i64* %134, i32 16)
%136 = ptrtoint i8* %135 to i32
store i32 %136, i32* %15
%137 = load i8*, i8** %5
%138 = load i64*, i64** %6
%139 = call i8* @read_bits(i8* %137, i64* %138, i32 16)
store i32 0, i32* %16
br label %140
140: ; preds = %153, %127
%141 = load i32, i32* %16
%142 = load i32, i32* %15
%143 = icmp ult i32 %141, %142
br i1 %143, label %144, label %156
144: ; preds = %140
%145 = load i8*, i8** %5
%146 = load i64*, i64** %6
%147 = call i8* @read_bits(i8* %145, i64* %146, i32 8)
%148 = ptrtoint i8* %147 to i8
store i8 %148, i8* %17
%149 = load i8, i8* %17
%150 = call i32 @pushout(i8 zeroext %149)
%151 = load void (i8)*, void (i8)** %7
%152 = load i8, i8* %17
br label %153
153: ; preds = %144
%154 = load i32, i32* %16
%155 = add i32 %154, 1
store i32 %155, i32* %16
br label %140
156: ; preds = %140
br label %158
157: ; preds = %123
store i32 -1, i32* %4
br label %164
158: ; preds = %156
br label %159
159: ; preds = %158, %122
%160 = load i8, i8* %8
%161 = icmp ne i8 %160, 0
br i1 %161, label %163, label %162
162: ; preds = %159
br label %18
163: ; preds = %159
store i32 0, i32* %4
br label %164
164: ; preds = %163, %157, %121, %47
%165 = load i32, i32* %4
ret i32 %165
}

LLVM IR (-O2):
define i32 @inflate(i8* %0, i64* %1, void (i8)* %2) {
%4 = alloca [288 x i8]
%5 = getelementptr inbounds [288 x i8], [288 x i8]* %4, i64 0, i64 0
%6 = alloca [288 x i32]
%7 = alloca [30 x i8]
%8 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%9 = alloca [30 x i32]
%10 = getelementptr inbounds [288 x i8], [288 x i8]* %4, i64 0, i64 0
%11 = bitcast [288 x i32]* %6 to i8*
%12 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%13 = bitcast [30 x i32]* %9 to i8*
%14 = getelementptr inbounds [288 x i32], [288 x i32]* %6, i64 0, i64 0
%15 = getelementptr inbounds [30 x i32], [30 x i32]* %9, i64 0, i64 0
%16 = getelementptr inbounds [288 x i8], [288 x i8]* %4, i64 0, i64 144
%17 = getelementptr inbounds [288 x i8], [288 x i8]* %4, i64 0, i64 256
%18 = getelementptr inbounds [288 x i8], [288 x i8]* %4, i64 0, i64 280
%19 = bitcast i8* %18 to i64*
br label %20
20: ; preds = %54, %3
%21 = call i8* @read_bits(i8* %0, i64* %1, i32 1)
%22 = ptrtoint i8* %21 to i64
%23 = trunc i64 %22 to i8
%24 = call i8* @read_bits(i8* %0, i64* %1, i32 2)
%25 = ptrtoint i8* %24 to i64
%26 = trunc i64 %25 to i32
%27 = shl i32 %26, 24
switch i32 %27, label %56 [
i32 33554432, label %28
i32 16777216, label %31
i32 0, label %37
]
28: ; preds = %20
%29 = call i64 @get_tables(i8* %0, i64* %1, i8* %10, i32* %14, i8* %12, i32* %15)
%30 = icmp slt i64 %29, 0
br i1 %30, label %56, label %34
31: ; preds = %20
store i64 578721382704613384, i64* %19
%32 = call i32 @make_code_table(i8* %10, i32 288, i32* %14, i32 15)
%33 = call i32 @make_code_table(i8* %12, i32 30, i32* %15, i32 15)
br label %34
34: ; preds = %28, %31
%35 = call i64 @get_data(i8* %0, i64* %1, i8* %10, i32* %14, i8* %12, i32* %15, void (i8)* %2)
%36 = icmp slt i64 %35, 0
br i1 %36, label %56, label %54
37: ; preds = %20
%38 = load i64, i64* %1
%39 = add nsw i64 %38, 7
%40 = sdiv i64 %39, 8
store i64 %40, i64* %1
%41 = call i8* @read_bits(i8* %0, i64* %1, i32 16)
%42 = ptrtoint i8* %41 to i64
%43 = trunc i64 %42 to i32
%44 = call i8* @read_bits(i8* %0, i64* %1, i32 16)
%45 = icmp eq i32 %43, 0
br i1 %45, label %54, label %46
46: ; preds = %37, %46
%47 = phi i32 [ %52, %46 ], [ 0, %37 ]
%48 = call i8* @read_bits(i8* %0, i64* %1, i32 8)
%49 = ptrtoint i8* %48 to i64
%50 = trunc i64 %49 to i8
%51 = call i32 @pushout(i8 zeroext %50)
%52 = add nuw i32 %47, 1
%53 = icmp eq i32 %52, %43
br i1 %53, label %54, label %46
54: ; preds = %46, %37, %34
%55 = icmp eq i8 %23, 0
br i1 %55, label %20, label %56
56: ; preds = %54, %20, %34, %28
%57 = phi i32 [ -1, %28 ], [ -1, %34 ], [ -1, %20 ], [ 0, %54 ]
ret i32 %57
}