#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 */
int /*<<< orphan*/ AddBits(int /*<<< orphan*/, int /*<<< orphan*/,
                           unsigned char *, unsigned char **, size_t *);
int /*<<< orphan*/ AddHuffmanBits(unsigned int const, unsigned int const,
                                  unsigned char *, unsigned char **, size_t *);
int /*<<< orphan*/ ZopfliGetDistExtraBits(unsigned int);
int /*<<< orphan*/ ZopfliGetDistExtraBitsValue(unsigned int);
unsigned int ZopfliGetDistSymbol(unsigned int);
int /*<<< orphan*/ ZopfliGetLengthExtraBits(unsigned int);
int /*<<< orphan*/ ZopfliGetLengthExtraBitsValue(unsigned int);
unsigned int ZopfliGetLengthSymbol(unsigned int);
int /*<<< orphan*/ assert(int);
void AddLZ77Data(const unsigned short *litlens, const unsigned short *dists,
                 size_t lstart, size_t lend, size_t expected_data_size,
                 const unsigned *ll_symbols, const unsigned *ll_lengths,
                 const unsigned *d_symbols, const unsigned *d_lengths,
                 unsigned char *bp, unsigned char **out, size_t *outsize) {
  size_t testlength = 0;
  size_t i;
  for (i = lstart; i < lend; i++) {
    unsigned dist = dists[i];
    unsigned litlen = litlens[i];
    if (dist == 0) {
      assert(litlen < 256);
      assert(ll_lengths[litlen] > 0);
      AddHuffmanBits(ll_symbols[litlen], ll_lengths[litlen], bp, out, outsize);
      testlength++;
    } else {
      unsigned lls = ZopfliGetLengthSymbol(litlen);
      unsigned ds = ZopfliGetDistSymbol(dist);
      assert(litlen >= 3 && litlen <= 288);
      assert(ll_lengths[lls] > 0);
      assert(d_lengths[ds] > 0);
      AddHuffmanBits(ll_symbols[lls], ll_lengths[lls], bp, out, outsize);
      AddBits(ZopfliGetLengthExtraBitsValue(litlen),
              ZopfliGetLengthExtraBits(litlen), bp, out, outsize);
      AddHuffmanBits(d_symbols[ds], d_lengths[ds], bp, out, outsize);
      AddBits(ZopfliGetDistExtraBitsValue(dist), ZopfliGetDistExtraBits(dist),
              bp, out, outsize);
      testlength += litlen;
    }
  }
  assert(expected_data_size == 0 || testlength == expected_data_size);
}


x86 assembly (clang, -O0):
<AddLZ77Data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    139c <AddLZ77Data+0x20c>
mov    -0x10(%rbp),%rax
mov    -0x40(%rbp),%rcx
movzwl (%rax,%rcx,2),%eax
mov    %eax,-0x44(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x40(%rbp),%rcx
movzwl (%rax,%rcx,2),%eax
mov    %eax,-0x48(%rbp)
cmpl   $0x0,-0x44(%rbp)
jne    1270 <AddLZ77Data+0xe0>
cmpl   $0x100,-0x48(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
mov    0x10(%rbp),%rax
mov    -0x48(%rbp),%ecx
cmpl   $0x0,(%rax,%rcx,4)
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
mov    -0x30(%rbp),%rax
mov    -0x48(%rbp),%ecx
mov    (%rax,%rcx,4),%edi
mov    0x10(%rbp),%rax
mov    -0x48(%rbp),%ecx
mov    (%rax,%rcx,4),%esi
mov    0x28(%rbp),%rdx
mov    0x30(%rbp),%rcx
mov    0x38(%rbp),%r8
call   1080 <AddHuffmanBits@plt>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    1386 <AddLZ77Data+0x1f6>
mov    -0x48(%rbp),%edi
call   1060 <ZopfliGetLengthSymbol@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x44(%rbp),%edi
call   1090 <ZopfliGetDistSymbol@plt>
mov    %eax,-0x50(%rbp)
xor    %eax,%eax
cmpl   $0x3,-0x48(%rbp)
mov    %al,-0x51(%rbp)
jb     12a2 <AddLZ77Data+0x112>
cmpl   $0x120,-0x48(%rbp)
setbe  %al
mov    %al,-0x51(%rbp)
mov    -0x51(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
mov    0x10(%rbp),%rax
mov    -0x4c(%rbp),%ecx
cmpl   $0x0,(%rax,%rcx,4)
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
mov    0x20(%rbp),%rax
mov    -0x50(%rbp),%ecx
cmpl   $0x0,(%rax,%rcx,4)
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
mov    -0x30(%rbp),%rax
mov    -0x4c(%rbp),%ecx
mov    (%rax,%rcx,4),%edi
mov    0x10(%rbp),%rax
mov    -0x4c(%rbp),%ecx
mov    (%rax,%rcx,4),%esi
mov    0x28(%rbp),%rdx
mov    0x30(%rbp),%rcx
mov    0x38(%rbp),%r8
call   1080 <AddHuffmanBits@plt>
mov    -0x48(%rbp),%edi
call   10b0 <ZopfliGetLengthExtraBitsValue@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x48(%rbp),%edi
call   1030 <ZopfliGetLengthExtraBits@plt>
mov    -0x5c(%rbp),%edi
mov    %eax,%esi
mov    0x28(%rbp),%rdx
mov    0x30(%rbp),%rcx
mov    0x38(%rbp),%r8
call   1050 <AddBits@plt>
mov    0x18(%rbp),%rax
mov    -0x50(%rbp),%ecx
mov    (%rax,%rcx,4),%edi
mov    0x20(%rbp),%rax
mov    -0x50(%rbp),%ecx
mov    (%rax,%rcx,4),%esi
mov    0x28(%rbp),%rdx
mov    0x30(%rbp),%rcx
mov    0x38(%rbp),%r8
call   1080 <AddHuffmanBits@plt>
mov    -0x44(%rbp),%edi
call   1040 <ZopfliGetDistExtraBitsValue@plt>
mov    %eax,-0x58(%rbp)
mov    -0x44(%rbp),%edi
call   10a0 <ZopfliGetDistExtraBits@plt>
mov    -0x58(%rbp),%edi
mov    %eax,%esi
mov    0x28(%rbp),%rdx
mov    0x30(%rbp),%rcx
mov    0x38(%rbp),%r8
call   1050 <AddBits@plt>
mov    -0x48(%rbp),%eax
add    -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    138b <AddLZ77Data+0x1fb>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    11d8 <AddLZ77Data+0x48>
mov    $0x1,%al
cmpq   $0x0,-0x28(%rbp)
mov    %al,-0x5d(%rbp)
je     13ba <AddLZ77Data+0x22a>
mov    -0x38(%rbp),%rax
cmp    -0x28(%rbp),%rax
sete   %al
mov    %al,-0x5d(%rbp)
mov    -0x5d(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AddLZ77Data>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r9,0x38(%rsp)
mov    %r8,0x48(%rsp)
mov    %rsi,0x60(%rsp)
mov    %rdi,0x58(%rsp)
mov    %rcx,0x68(%rsp)
cmp    %rcx,%rdx
jae    13a4 <AddLZ77Data+0x214>
mov    %rdx,%r14
mov    0xd8(%rsp),%rax
mov    %rax,0x30(%rsp)
mov    0xd0(%rsp),%rax
mov    %rax,0x28(%rsp)
mov    0xc8(%rsp),%rax
mov    %rax,0x20(%rsp)
mov    0xc0(%rsp),%rax
mov    %rax,0x40(%rsp)
mov    0xb8(%rsp),%rax
mov    %rax,0x50(%rsp)
mov    0xb0(%rsp),%rax
mov    %rax,0x18(%rsp)
xor    %ebp,%ebp
mov    0x20(%rsp),%r13
jmp    1338 <AddLZ77Data+0x1a8>
nopl   (%rax)
mov    %ebx,%edi
call   1060 <ZopfliGetLengthSymbol@plt>
mov    %rbp,0x70(%rsp)
mov    %rbx,0x8(%rsp)
mov    %eax,%ebx
mov    %r15d,%edi
call   1090 <ZopfliGetDistSymbol@plt>
mov    %eax,%r12d
mov    0x8(%rsp),%rax
add    $0xfffffffd,%eax
movzwl %ax,%eax
xor    %edi,%edi
cmp    $0x11e,%eax
setb   %dil
call   1070 <assert@plt>
mov    %ebx,%ebp
xor    %edi,%edi
mov    %r15d,0x14(%rsp)
mov    0x18(%rsp),%r15
cmpl   $0x0,(%r15,%rbp,4)
setne  %dil
call   1070 <assert@plt>
mov    %r12d,%ebx
xor    %edi,%edi
mov    0x40(%rsp),%rax
cmpl   $0x0,(%rax,%rbx,4)
setne  %dil
call   1070 <assert@plt>
mov    0x38(%rsp),%rax
mov    (%rax,%rbp,4),%edi
mov    (%r15,%rbp,4),%esi
mov    %r13,%rdx
mov    0x28(%rsp),%r12
mov    %r12,%rcx
mov    0x30(%rsp),%r15
mov    %r15,%r8
call   1080 <AddHuffmanBits@plt>
mov    0x8(%rsp),%rdi
call   10b0 <ZopfliGetLengthExtraBitsValue@plt>
mov    %eax,%ebp
mov    0x8(%rsp),%rdi
call   1030 <ZopfliGetLengthExtraBits@plt>
mov    %ebp,%edi
mov    %eax,%esi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1050 <AddBits@plt>
mov    0x50(%rsp),%rax
mov    (%rax,%rbx,4),%edi
mov    0x40(%rsp),%rax
mov    (%rax,%rbx,4),%esi
mov    0x70(%rsp),%rbp
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1080 <AddHuffmanBits@plt>
mov    0x14(%rsp),%ebx
mov    %ebx,%edi
call   1040 <ZopfliGetDistExtraBitsValue@plt>
mov    %eax,0x10(%rsp)
mov    %ebx,%edi
call   10a0 <ZopfliGetDistExtraBits@plt>
mov    0x10(%rsp),%edi
mov    0x8(%rsp),%rbx
mov    %eax,%esi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
call   1050 <AddBits@plt>
add    %rbx,%rbp
add    $0x1,%r14
cmp    %r14,0x68(%rsp)
je     13a6 <AddLZ77Data+0x216>
mov    0x60(%rsp),%rax
movzwl (%rax,%r14,2),%r15d
mov    0x58(%rsp),%rax
movzwl (%rax,%r14,2),%ebx
test   %r15d,%r15d
jne    1220 <AddLZ77Data+0x90>
xor    %edi,%edi
cmp    $0x100,%ebx
setb   %dil
call   1070 <assert@plt>
mov    %ebx,%ebx
xor    %edi,%edi
mov    0x18(%rsp),%r15
cmpl   $0x0,(%r15,%rbx,4)
setne  %dil
call   1070 <assert@plt>
mov    0x38(%rsp),%rax
mov    (%rax,%rbx,4),%edi
mov    (%r15,%rbx,4),%esi
mov    0x20(%rsp),%rdx
mov    0x28(%rsp),%rcx
mov    0x30(%rsp),%r8
call   1080 <AddHuffmanBits@plt>
mov    $0x1,%ebx
jmp    132a <AddLZ77Data+0x19a>
xor    %ebp,%ebp
mov    0x48(%rsp),%rcx
test   %rcx,%rcx
sete   %al
cmp    %rcx,%rbp
sete   %cl
or     %al,%cl
movzbl %cl,%edi
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1070 <assert@plt>

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

LLVM IR (-O2):
define void @AddLZ77Data(i16* nocapture %0, i16* nocapture %1, i64 %2, i64 %3, i64 %4, i32* nocapture %5, i32* nocapture %6, i32* nocapture %7, i32* nocapture %8, i8* %9, i8** %10, i64* %11) {
%13 = icmp ult i64 %2, %3
br i1 %13, label %14, label %77
14: ; preds = %12, %72
%15 = phi i64 [ %74, %72 ], [ 0, %12 ]
%16 = phi i64 [ %75, %72 ], [ %2, %12 ]
%17 = getelementptr inbounds i16, i16* %1, i64 %16
%18 = load i16, i16* %17
%19 = zext i16 %18 to i32
%20 = getelementptr inbounds i16, i16* %0, i64 %16
%21 = load i16, i16* %20
%22 = zext i16 %21 to i32
%23 = icmp eq i16 %18, 0
br i1 %23, label %24, label %38
24: ; preds = %14
%25 = icmp ult i16 %21, 256
%26 = zext i1 %25 to i32
%27 = tail call i32 @assert(i32 %26)
%28 = zext i16 %21 to i64
%29 = getelementptr inbounds i32, i32* %6, i64 %28
%30 = load i32, i32* %29
%31 = icmp ne i32 %30, 0
%32 = zext i1 %31 to i32
%33 = tail call i32 @assert(i32 %32)
%34 = getelementptr inbounds i32, i32* %5, i64 %28
%35 = load i32, i32* %34
%36 = load i32, i32* %29
%37 = tail call i32 @AddHuffmanBits(i32 %35, i32 %36, i8* %9, i8** %10, i64* %11)
br label %72
38: ; preds = %14
%39 = tail call i32 @ZopfliGetLengthSymbol(i32 %22)
%40 = tail call i32 @ZopfliGetDistSymbol(i32 %19)
%41 = add i16 %21, -3
%42 = icmp ult i16 %41, 286
%43 = zext i1 %42 to i32
%44 = tail call i32 @assert(i32 %43)
%45 = zext i32 %39 to i64
%46 = getelementptr inbounds i32, i32* %6, i64 %45
%47 = load i32, i32* %46
%48 = icmp ne i32 %47, 0
%49 = zext i1 %48 to i32
%50 = tail call i32 @assert(i32 %49)
%51 = zext i32 %40 to i64
%52 = getelementptr inbounds i32, i32* %8, i64 %51
%53 = load i32, i32* %52
%54 = icmp ne i32 %53, 0
%55 = zext i1 %54 to i32
%56 = tail call i32 @assert(i32 %55)
%57 = getelementptr inbounds i32, i32* %5, i64 %45
%58 = load i32, i32* %57
%59 = load i32, i32* %46
%60 = tail call i32 @AddHuffmanBits(i32 %58, i32 %59, i8* %9, i8** %10, i64* %11)
%61 = tail call i32 @ZopfliGetLengthExtraBitsValue(i32 %22)
%62 = tail call i32 @ZopfliGetLengthExtraBits(i32 %22)
%63 = tail call i32 @AddBits(i32 %61, i32 %62, i8* %9, i8** %10, i64* %11)
%64 = getelementptr inbounds i32, i32* %7, i64 %51
%65 = load i32, i32* %64
%66 = load i32, i32* %52
%67 = tail call i32 @AddHuffmanBits(i32 %65, i32 %66, i8* %9, i8** %10, i64* %11)
%68 = tail call i32 @ZopfliGetDistExtraBitsValue(i32 %19)
%69 = tail call i32 @ZopfliGetDistExtraBits(i32 %19)
%70 = tail call i32 @AddBits(i32 %68, i32 %69, i8* %9, i8** %10, i64* %11)
%71 = zext i16 %21 to i64
br label %72
72: ; preds = %38, %24
%73 = phi i64 [ %71, %38 ], [ 1, %24 ]
%74 = add i64 %15, %73
%75 = add i64 %16, 1
%76 = icmp eq i64 %75, %3
br i1 %76, label %77, label %14
77: ; preds = %72, %12
%78 = phi i64 [ 0, %12 ], [ %74, %72 ]
%79 = icmp eq i64 %4, 0
%80 = icmp eq i64 %78, %4
%81 = select i1 %79, i1 true, i1 %80
%82 = zext i1 %81 to i32
%83 = tail call i32 @assert(i32 %82)
ret void
}