LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/deflate.c
// Function: flush_pending
local void flush_pending(z_streamp strm) {
    unsigned len;
    deflate_state *s = strm->state;

    _tr_flush_bits(s);
    len = s->pending;
    if (len > strm->avail_out) len = strm->avail_out;
    if (len == 0) return;

    zmemcpy(strm->next_out, s->pending_out, len);
    strm->next_out  += len;
    s->pending_out  += len;
    strm->total_out += len;
    strm->avail_out -= len;
    s->pending      -= len;
    if (s->pending == 0) {
        s->pending_out = s->pending_buf;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x38(%rdi), %rbx
movq %rbx, %rdi
callq 0x514c6
movl 0x28(%rbx), %ebp
movl 0x20(%r14), %eax
cmpl %ebp, %eax
cmovbl %eax, %ebp
testl %ebp, %ebp
je 0x4b857
movq 0x18(%r14), %rdi
movq 0x20(%rbx), %rsi
movl %ebp, %r15d
movq %r15, %rdx
callq 0x4290
addq %r15, 0x18(%r14)
addq %r15, 0x20(%rbx)
addq %r15, 0x28(%r14)
subl %ebp, 0x20(%r14)
subq %r15, 0x28(%rbx)
jne 0x4b857
movq 0x10(%rbx), %rax
movq %rax, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/deflate.c
// Function: deflate_huff
local block_state deflate_huff(deflate_state *s, int flush) {
    int bflush;             /* set if current block must be flushed */

    for (;;) {
        /* Make sure that we have a literal to write. */
        if (s->lookahead == 0) {
            fill_window(s);
            if (s->lookahead == 0) {
                if (flush == Z_NO_FLUSH)
                    return need_more;
                break;      /* flush the current block */
            }
        }

        /* Output a literal byte */
        s->match_length = 0;
        Tracevv((stderr,"%c", s->window[s->strstart]));
        _tr_tally_lit(s, s->window[s->strstart], bflush);
        s->lookahead--;
        s->strstart++;
        if (bflush) FLUSH_BLOCK(s, 0);
    }
    s->insert = 0;
    if (flush == Z_FINISH) {
        FLUSH_BLOCK(s, 1);
        return finish_done;
    }
    if (s->sym_next)
        FLUSH_BLOCK(s, 0);
    return block_done;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
xorl %r15d, %r15d
cmpl $0x0, 0xb4(%rbx)
jne 0x4bcc8
movq %rbx, %rdi
callq 0x4a532
cmpl $0x0, 0xb4(%rbx)
je 0x4bdaa
movl $0x0, 0xa0(%rbx)
movq 0x60(%rbx), %rax
movl 0xac(%rbx), %ecx
movzbl (%rax,%rcx), %eax
movq 0x1700(%rbx), %rcx
movl 0x170c(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x170c(%rbx)
movb %r15b, (%rcx,%rdx)
movq 0x1700(%rbx), %rcx
movl 0x170c(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x170c(%rbx)
movb %r15b, (%rcx,%rdx)
movq 0x1700(%rbx), %rcx
movl 0x170c(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x170c(%rbx)
movb %al, (%rcx,%rdx)
incw 0xd4(%rbx,%rax,4)
movl 0x170c(%rbx), %ecx
decl 0xb4(%rbx)
movl 0xac(%rbx), %eax
incl %eax
cmpl 0x1710(%rbx), %ecx
movl %eax, 0xac(%rbx)
jne 0x4bcaa
movq 0x98(%rbx), %rcx
testq %rcx, %rcx
js 0x4bd6f
movl %ecx, %esi
addq 0x60(%rbx), %rsi
jmp 0x4bd71
xorl %esi, %esi
movl %eax, %edx
subq %rcx, %rdx
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x51617
movl 0xac(%rbx), %eax
movq %rax, 0x98(%rbx)
movq (%rbx), %rdi
callq 0x4b800
movq (%rbx), %rax
cmpl $0x0, 0x20(%rax)
jne 0x4bcaa
jmp 0x4be76
testl %ebp, %ebp
je 0x4bdd1
movl $0x0, 0x172c(%rbx)
cmpl $0x4, %ebp
jne 0x4bdd9
movq 0x98(%rbx), %rax
testq %rax, %rax
js 0x4bdfd
movl %eax, %esi
addq 0x60(%rbx), %rsi
jmp 0x4bdff
xorl %r14d, %r14d
jmp 0x4be76
cmpl $0x0, 0x170c(%rbx)
je 0x4be70
movq 0x98(%rbx), %rax
xorl %r14d, %r14d
testq %rax, %rax
js 0x4be3d
movl %eax, %esi
addq 0x60(%rbx), %rsi
jmp 0x4be3f
xorl %esi, %esi
movl 0xac(%rbx), %edx
subq %rax, %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x51617
movl 0xac(%rbx), %eax
movq %rax, 0x98(%rbx)
movq (%rbx), %rdi
callq 0x4b800
movq (%rbx), %rax
cmpl $0x1, 0x20(%rax)
movl $0x3, %r14d
sbbl $0x0, %r14d
jmp 0x4be76
xorl %esi, %esi
movl 0xac(%rbx), %edx
subq %rax, %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x51617
movl 0xac(%rbx), %eax
movq %rax, 0x98(%rbx)
movq (%rbx), %rdi
callq 0x4b800
movq (%rbx), %rax
cmpl $0x0, 0x20(%rax)
je 0x4be76
movl $0x1, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/deflate.c
// Function: read_buf
local unsigned read_buf(z_streamp strm, Bytef *buf, unsigned size) {
    unsigned len = strm->avail_in;

    if (len > size) len = size;
    if (len == 0) return 0;

    strm->avail_in  -= len;

    zmemcpy(buf, strm->next_in, len);
    if (strm->state->wrap == 1) {
        strm->adler = adler32(strm->adler, buf, len);
    }
#ifdef GZIP
    else if (strm->state->wrap == 2) {
        strm->adler = crc32(strm->adler, buf, len);
    }
#endif
    strm->next_in  += len;
    strm->total_in += len;

    return len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl 0x8(%rdi), %eax
cmpl %edx, %eax
cmovbl %eax, %ebx
testl %ebx, %ebx
je 0x4c48c
movq %rsi, %r12
movq %rdi, %r14
subl %ebx, %eax
movl %eax, 0x8(%rdi)
movq (%rdi), %rsi
movl %ebx, %r15d
movq %r12, %rdi
movq %r15, %rdx
callq 0x4290
movq 0x38(%r14), %rax
movl 0x30(%rax), %eax
cmpl $0x2, %eax
je 0x4c473
cmpl $0x1, %eax
jne 0x4c485
movq 0x60(%r14), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0x49770
jmp 0x4c481
movq 0x60(%r14), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0x49d47
movq %rax, 0x60(%r14)
addq %r15, (%r14)
addq %r15, 0x10(%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/infback.c
// Function: inflateBackInit_
int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits,
                             unsigned char FAR *window, const char *version,
                             int stream_size) {
    struct inflate_state FAR *state;

    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
        stream_size != (int)(sizeof(z_stream)))
        return Z_VERSION_ERROR;
    if (strm == Z_NULL || window == Z_NULL ||
        windowBits < 8 || windowBits > 15)
        return Z_STREAM_ERROR;
    strm->msg = Z_NULL;                 /* in case we return an error */
    if (strm->zalloc == (alloc_func)0) {
#ifdef Z_SOLO
        return Z_STREAM_ERROR;
#else
        strm->zalloc = zcalloc;
        strm->opaque = (voidpf)0;
#endif
    }
    if (strm->zfree == (free_func)0)
#ifdef Z_SOLO
        return Z_STREAM_ERROR;
#else
    strm->zfree = zcfree;
#endif
    state = (struct inflate_state FAR *)ZALLOC(strm, 1,
                                               sizeof(struct inflate_state));
    if (state == Z_NULL) return Z_MEM_ERROR;
    Tracev((stderr, "inflate: allocated\n"));
    strm->state = (struct internal_state FAR *)state;
    state->dmax = 32768U;
    state->wbits = (uInt)windowBits;
    state->wsize = 1U << windowBits;
    state->window = window;
    state->wnext = 0;
    state->whave = 0;
    state->sane = 1;
    return Z_OK;
}

// Assembly:
movl $0xfffffffa, %eax       # imm = 0xFFFFFFFA
testq %rcx, %rcx
je 0x4d179
cmpl $0x70, %r8d
jne 0x4d179
cmpb $0x31, (%rcx)
jne 0x4d179
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
leal -0x10(%r14), %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpl $-0x8, %ecx
jb 0x4d16f
movq %rdi, %r15
testq %rdi, %rdi
je 0x4d16f
movq %rdx, %rbx
testq %rdx, %rdx
je 0x4d16f
movq $0x0, 0x30(%r15)
movq 0x40(%r15), %rax
testq %rax, %rax
jne 0x4d10d
leaq 0x6069(%rip), %rax      # 0x5316a
movq %rax, 0x40(%r15)
movq $0x0, 0x50(%r15)
cmpq $0x0, 0x48(%r15)
jne 0x4d11f
leaq 0x6059(%rip), %rcx      # 0x53174
movq %rcx, 0x48(%r15)
movq 0x50(%r15), %rdi
movl $0x1, %ebp
movl $0x1, %esi
movl $0x1bf8, %edx           # imm = 0x1BF8
callq *%rax
testq %rax, %rax
je 0x4d16a
movq %rax, 0x38(%r15)
movl $0x8000, 0x1c(%rax)     # imm = 0x8000
movl %r14d, 0x38(%rax)
movl %r14d, %ecx
shll %cl, %ebp
movl %ebp, 0x3c(%rax)
movq %rbx, 0x48(%rax)
movq $0x0, 0x40(%rax)
movl $0x1, 0x1be8(%rax)
xorl %eax, %eax
jmp 0x4d16f
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/infback.c
// Function: inflateBackEnd
int ZEXPORT inflateBackEnd(z_streamp strm) {
    if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
        return Z_STREAM_ERROR;
    ZFREE(strm, strm->state);
    strm->state = Z_NULL;
    Tracev((stderr, "inflate: end\n"));
    return Z_OK;
}

// Assembly:
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testq %rdi, %rdi
je 0x4e0a1
pushq %rbx
movq %rdi, %rbx
movq 0x38(%rdi), %rsi
testq %rsi, %rsi
je 0x4e0a0
movq 0x48(%rbx), %rcx
testq %rcx, %rcx
je 0x4e0a0
movq 0x50(%rbx), %rdi
callq *%rcx
movq $0x0, 0x38(%rbx)
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflateResetKeep
int ZEXPORT inflateResetKeep(z_streamp strm) {
    struct inflate_state FAR *state;

    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;
    strm->total_in = strm->total_out = state->total = 0;
    strm->msg = Z_NULL;
    if (state->wrap)        /* to support ill-conceived Java test suite */
        strm->adler = state->wrap & 1;
    state->mode = HEAD;
    state->last = 0;
    state->havedict = 0;
    state->flags = -1;
    state->dmax = 32768U;
    state->head = Z_NULL;
    state->hold = 0;
    state->bits = 0;
    state->lencode = state->distcode = state->next = state->codes;
    state->sane = 1;
    state->back = -1;
    Tracev((stderr, "inflate: reset\n"));
    return Z_OK;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x4e621
movl %eax, %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testl %ecx, %ecx
jne 0x4e61f
movq 0x38(%rbx), %rcx
xorl %eax, %eax
movq %rax, 0x28(%rcx)
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movl 0x10(%rcx), %edx
testq %rdx, %rdx
je 0x4e5cc
andl $0x1, %edx
movq %rdx, 0x60(%rbx)
movq $0x3f34, 0x8(%rcx)      # imm = 0x3F34
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
movq %rdx, 0x14(%rcx)
movl $0x8000, 0x1c(%rcx)     # imm = 0x8000
movq %rax, 0x30(%rcx)
movq %rax, 0x50(%rcx)
movl $0x0, 0x58(%rcx)
leaq 0x558(%rcx), %rdx
movq %rdx, 0x90(%rcx)
movq %rdx, 0x70(%rcx)
movq %rdx, 0x68(%rcx)
movabsq $-0xffffffff, %rdx      # imm = 0xFFFFFFFF00000001
movq %rdx, 0x1be8(%rcx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflateStateCheck
local int inflateStateCheck(z_streamp strm) {
    struct inflate_state FAR *state;
    if (strm == Z_NULL ||
        strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0)
        return 1;
    state = (struct inflate_state FAR *)strm->state;
    if (state == Z_NULL || state->strm != strm ||
        state->mode < HEAD || state->mode > SYNC)
        return 1;
    return 0;
}

// Assembly:
movl $0x1, %eax
testq %rdi, %rdi
je 0x4e647
cmpq $0x0, 0x40(%rdi)
je 0x4e647
cmpq $0x0, 0x48(%rdi)
je 0x4e647
movq 0x38(%rdi), %rcx
testq %rcx, %rcx
je 0x4e647
cmpq %rdi, (%rcx)
je 0x4e648
retq
movl $0xffffc0ac, %edx       # imm = 0xFFFFC0AC
addl 0x8(%rcx), %edx
xorl %eax, %eax
cmpl $-0x20, %edx
setb %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflateReset
int ZEXPORT inflateReset(z_streamp strm) {
    struct inflate_state FAR *state;

    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;
    state->wsize = 0;
    state->whave = 0;
    state->wnext = 0;
    return inflateResetKeep(strm);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x4e621
testl %eax, %eax
je 0x4e66d
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
popq %rbx
retq
movq 0x38(%rbx), %rax
movq $0x0, 0x3c(%rax)
movl $0x0, 0x44(%rax)
movq %rbx, %rdi
popq %rbx
jmp 0x4e594
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflateReset2
int ZEXPORT inflateReset2(z_streamp strm, int windowBits) {
    int wrap;
    struct inflate_state FAR *state;

    /* get the state */
    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;

    /* extract wrap request from windowBits parameter */
    if (windowBits < 0) {
        if (windowBits < -15)
            return Z_STREAM_ERROR;
        wrap = 0;
        windowBits = -windowBits;
    }
    else {
        wrap = (windowBits >> 4) + 5;
#ifdef GUNZIP
        if (windowBits < 48)
            windowBits &= 15;
#endif
    }

    /* set number of window bits, free window if different */
    if (windowBits && (windowBits < 8 || windowBits > 15))
        return Z_STREAM_ERROR;
    if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) {
        ZFREE(strm, state->window);
        state->window = Z_NULL;
    }

    /* update state and reset the rest of it */
    state->wrap = wrap;
    state->wbits = (unsigned)windowBits;
    return inflateReset(strm);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
callq 0x4e621
testl %eax, %eax
je 0x4e6af
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x38(%rbx), %r15
testl %r14d, %r14d
js 0x4e6d4
movl %r14d, %ebp
shrl $0x4, %ebp
addl $0x5, %ebp
movl %r14d, %eax
andl $0xf, %eax
cmpl $0x30, %r14d
cmovael %r14d, %eax
movl %eax, %r14d
jmp 0x4e6df
cmpl $-0xf, %r14d
jb 0x4e69f
negl %r14d
xorl %ebp, %ebp
leal -0x8(%r14), %eax
cmpl $0x8, %eax
jae 0x4e720
movq 0x48(%r15), %rsi
testq %rsi, %rsi
je 0x4e706
cmpl %r14d, 0x38(%r15)
je 0x4e706
movq 0x50(%rbx), %rdi
callq *0x48(%rbx)
movq $0x0, 0x48(%r15)
movl %ebp, 0x10(%r15)
movl %r14d, 0x38(%r15)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4e659
testl %r14d, %r14d
je 0x4e6e8
jmp 0x4e69f
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflateInit2_
int ZEXPORT inflateInit2_(z_streamp strm, int windowBits,
                          const char *version, int stream_size) {
    int ret;
    struct inflate_state FAR *state;

    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
        stream_size != (int)(sizeof(z_stream)))
        return Z_VERSION_ERROR;
    if (strm == Z_NULL) return Z_STREAM_ERROR;
    strm->msg = Z_NULL;                 /* in case we return an error */
    if (strm->zalloc == (alloc_func)0) {
#ifdef Z_SOLO
        return Z_STREAM_ERROR;
#else
        strm->zalloc = zcalloc;
        strm->opaque = (voidpf)0;
#endif
    }
    if (strm->zfree == (free_func)0)
#ifdef Z_SOLO
        return Z_STREAM_ERROR;
#else
        strm->zfree = zcfree;
#endif
    state = (struct inflate_state FAR *)
            ZALLOC(strm, 1, sizeof(struct inflate_state));
    if (state == Z_NULL) return Z_MEM_ERROR;
    Tracev((stderr, "inflate: allocated\n"));
    strm->state = (struct internal_state FAR *)state;
    state->strm = strm;
    state->window = Z_NULL;
    state->mode = HEAD;     /* to pass state test in inflateReset2() */
    ret = inflateReset2(strm, windowBits);
    if (ret != Z_OK) {
        ZFREE(strm, state);
        strm->state = Z_NULL;
    }
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xfffffffa, %r14d      # imm = 0xFFFFFFFA
testq %rdx, %rdx
je 0x4e7fc
cmpl $0x70, %ecx
jne 0x4e7fc
cmpb $0x31, (%rdx)
jne 0x4e7fc
movq %rdi, %rbx
testq %rdi, %rdi
je 0x4e7e9
movl %esi, %ebp
movq $0x0, 0x30(%rbx)
movq 0x40(%rbx), %rax
testq %rax, %rax
jne 0x4e784
leaq 0x49f2(%rip), %rax      # 0x5316a
movq %rax, 0x40(%rbx)
movq $0x0, 0x50(%rbx)
cmpq $0x0, 0x48(%rbx)
jne 0x4e796
leaq 0x49e2(%rip), %rcx      # 0x53174
movq %rcx, 0x48(%rbx)
movq 0x50(%rbx), %rdi
movl $0x1, %esi
movl $0x1bf8, %edx           # imm = 0x1BF8
callq *%rax
testq %rax, %rax
je 0x4e7f1
movq %rax, %r15
movq %rax, 0x38(%rbx)
movq %rbx, (%rax)
movq $0x0, 0x48(%rax)
movl $0x3f34, 0x8(%rax)      # imm = 0x3F34
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4e689
testl %eax, %eax
je 0x4e7f9
movl %eax, %r14d
movq 0x50(%rbx), %rdi
movq %r15, %rsi
callq *0x48(%rbx)
movq $0x0, 0x38(%rbx)
jmp 0x4e7fc
movl $0xfffffffe, %r14d      # imm = 0xFFFFFFFE
jmp 0x4e7fc
movl $0xfffffffc, %r14d      # imm = 0xFFFFFFFC
jmp 0x4e7fc
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflatePrime
int ZEXPORT inflatePrime(z_streamp strm, int bits, int value) {
    struct inflate_state FAR *state;

    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    if (bits == 0)
        return Z_OK;
    state = (struct inflate_state FAR *)strm->state;
    if (bits < 0) {
        state->hold = 0;
        state->bits = 0;
        return Z_OK;
    }
    if (bits > 16 || state->bits + (uInt)bits > 32) return Z_STREAM_ERROR;
    value &= (1L << bits) - 1;
    state->hold += (unsigned)value << state->bits;
    state->bits += (uInt)bits;
    return Z_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
callq 0x4e621
movl %eax, %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testl %ecx, %ecx
jne 0x4e882
testl %r14d, %r14d
je 0x4e880
movq 0x38(%r15), %rsi
js 0x4e871
cmpl $0x10, %r14d
ja 0x4e882
movl 0x58(%rsi), %edx
leal (%rdx,%r14), %edi
cmpl $0x20, %edi
ja 0x4e882
movq $-0x1, %rax
movl %r14d, %ecx
shlq %cl, %rax
notl %eax
andl %ebx, %eax
movl %edx, %ecx
shll %cl, %eax
addq %rax, 0x50(%rsi)
movl %edi, 0x58(%rsi)
jmp 0x4e880
movq $0x0, 0x50(%rsi)
movl $0x0, 0x58(%rsi)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: updatewindow
local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) {
    struct inflate_state FAR *state;
    unsigned dist;

    state = (struct inflate_state FAR *)strm->state;

    /* if it hasn't been done already, allocate space for the window */
    if (state->window == Z_NULL) {
        state->window = (unsigned char FAR *)
                        ZALLOC(strm, 1U << state->wbits,
                               sizeof(unsigned char));
        if (state->window == Z_NULL) return 1;
    }

    /* if window not in use yet, initialize */
    if (state->wsize == 0) {
        state->wsize = 1U << state->wbits;
        state->wnext = 0;
        state->whave = 0;
    }

    /* copy state->wsize or less output bytes into the circular window */
    if (copy >= state->wsize) {
        zmemcpy(state->window, end - state->wsize, state->wsize);
        state->wnext = 0;
        state->whave = state->wsize;
    }
    else {
        dist = state->wsize - state->wnext;
        if (dist > copy) dist = copy;
        zmemcpy(state->window + state->wnext, end - copy, dist);
        copy -= dist;
        if (copy) {
            zmemcpy(state->window, end - copy, copy);
            state->wnext = copy;
            state->whave = state->wsize;
        }
        else {
            state->wnext += dist;
            if (state->wnext == state->wsize) state->wnext = 0;
            if (state->whave < state->wsize) state->whave += dist;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %rax
movq 0x38(%rdi), %r12
movq 0x48(%r12), %rdi
testq %rdi, %rdi
jne 0x5038c
movq 0x50(%rax), %rdi
movb 0x38(%r12), %cl
movl $0x1, %ebp
movl $0x1, %esi
shll %cl, %esi
movl $0x1, %edx
callq *0x40(%rax)
movq %rax, %rdi
movq %rax, 0x48(%r12)
testq %rax, %rax
je 0x5041d
movl 0x3c(%r12), %ebp
testl %ebp, %ebp
jne 0x503af
movb 0x38(%r12), %cl
movl $0x1, %ebp
shll %cl, %ebp
movl %ebp, 0x3c(%r12)
movq $0x0, 0x40(%r12)
cmpl %r14d, %ebp
jbe 0x503fb
movl 0x44(%r12), %eax
subl %eax, %ebp
cmpl %r14d, %ebp
movl %r14d, %r15d
cmovbl %ebp, %r15d
addq %rax, %rdi
movl %r14d, %eax
movq %rbx, %rsi
subq %rax, %rsi
movq %r15, %rdx
callq 0x4290
cmpl %r14d, %ebp
jae 0x50428
subl %r15d, %r14d
movq 0x48(%r12), %rdi
subq %r14, %rbx
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4290
movl %r14d, 0x44(%r12)
jmp 0x50411
movl %ebp, %edx
subq %rdx, %rbx
movq %rbx, %rsi
callq 0x4290
movl $0x0, 0x44(%r12)
movl 0x3c(%r12), %eax
movl %eax, 0x40(%r12)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl 0x44(%r12), %ecx
addl %r15d, %ecx
movl 0x3c(%r12), %edx
movl 0x40(%r12), %eax
xorl %ebp, %ebp
cmpl %edx, %ecx
cmovel %ebp, %ecx
movl %ecx, 0x44(%r12)
cmpl %edx, %eax
jae 0x5041d
addl %r15d, %eax
movl %eax, 0x40(%r12)
jmp 0x5041d
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflateEnd
int ZEXPORT inflateEnd(z_streamp strm) {
    struct inflate_state FAR *state;
    if (inflateStateCheck(strm))
        return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;
    if (state->window != Z_NULL) ZFREE(strm, state->window);
    ZFREE(strm, strm->state);
    strm->state = Z_NULL;
    Tracev((stderr, "inflate: end\n"));
    return Z_OK;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x4e621
movl %eax, %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testl %ecx, %ecx
jne 0x50494
movq 0x38(%rbx), %rsi
movq 0x48(%rsi), %rax
testq %rax, %rax
je 0x50483
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq *0x48(%rbx)
movq 0x38(%rbx), %rsi
movq 0x50(%rbx), %rdi
callq *0x48(%rbx)
movq $0x0, 0x38(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflateGetDictionary
int ZEXPORT inflateGetDictionary(z_streamp strm, Bytef *dictionary,
                                 uInt *dictLength) {
    struct inflate_state FAR *state;

    /* check state */
    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;

    /* copy dictionary */
    if (state->whave && dictionary != Z_NULL) {
        zmemcpy(dictionary, state->window + state->wnext,
                state->whave - state->wnext);
        zmemcpy(dictionary + state->whave - state->wnext,
                state->window, state->wnext);
    }
    if (dictLength != Z_NULL)
        *dictLength = state->whave;
    return Z_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x4e621
movl %eax, %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testl %ecx, %ecx
jne 0x50501
movq 0x38(%r15), %r15
movl 0x40(%r15), %edx
testl %edx, %edx
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x504f4
movl 0x44(%r15), %esi
subl %esi, %edx
addq 0x48(%r15), %rsi
movq %r14, %rdi
callq 0x4290
movl 0x40(%r15), %edi
movl 0x44(%r15), %edx
addq %r14, %rdi
subq %rdx, %rdi
movq 0x48(%r15), %rsi
callq 0x4290
xorl %eax, %eax
testq %rbx, %rbx
je 0x50501
movl 0x40(%r15), %ecx
movl %ecx, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflateSetDictionary
int ZEXPORT inflateSetDictionary(z_streamp strm, const Bytef *dictionary,
                                 uInt dictLength) {
    struct inflate_state FAR *state;
    unsigned long dictid;
    int ret;

    /* check state */
    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;
    if (state->wrap != 0 && state->mode != DICT)
        return Z_STREAM_ERROR;

    /* check for correct dictionary identifier */
    if (state->mode == DICT) {
        dictid = adler32(0L, Z_NULL, 0);
        dictid = adler32(dictid, dictionary, dictLength);
        if (dictid != state->check)
            return Z_DATA_ERROR;
    }

    /* copy dictionary to window using updatewindow(), which will amend the
       existing dictionary if appropriate */
    ret = updatewindow(strm, dictionary + dictLength, dictLength);
    if (ret) {
        state->mode = MEM;
        return Z_MEM_ERROR;
    }
    state->havedict = 1;
    Tracev((stderr, "inflate:   dictionary set\n"));
    return Z_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
callq 0x4e621
movl %eax, %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testl %ecx, %ecx
je 0x50532
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x38(%r15), %r12
cmpl $0x0, 0x10(%r12)
movl 0x8(%r12), %ecx
je 0x50552
cmpl $0x3f3e, %ecx           # imm = 0x3F3E
jne 0x50528
leaq 0x8(%r12), %r13
jmp 0x5055f
leaq 0x8(%r12), %r13
cmpl $0x3f3e, %ecx           # imm = 0x3F3E
jne 0x50586
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x49770
movq %rax, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x49770
movq %rax, %rcx
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
cmpq 0x20(%r12), %rcx
jne 0x50528
movl %ebx, %eax
addq %rax, %r14
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x5033f
testl %eax, %eax
je 0x505ae
movl $0x3f52, (%r13)         # imm = 0x3F52
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
jmp 0x50528
movl $0x1, 0x14(%r12)
xorl %eax, %eax
jmp 0x50528
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflateGetHeader
int ZEXPORT inflateGetHeader(z_streamp strm, gz_headerp head) {
    struct inflate_state FAR *state;

    /* check state */
    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;
    if ((state->wrap & 2) == 0) return Z_STREAM_ERROR;

    /* save header structure */
    state->head = head;
    head->done = 0;
    return Z_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4e621
movl %eax, %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testl %ecx, %ecx
jne 0x505ef
movq 0x38(%r14), %rcx
testb $0x2, 0x10(%rcx)
je 0x505ef
movq %rbx, 0x30(%rcx)
movl $0x0, 0x48(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: syncsearch
local unsigned syncsearch(unsigned FAR *have, const unsigned char FAR *buf,
                          unsigned len) {
    unsigned got;
    unsigned next;

    got = *have;
    next = 0;
    while (next < len && got < 4) {
        if ((int)(buf[next]) == (got < 2 ? 0 : 0xff))
            got++;
        else if (buf[next])
            got = 0;
        else
            got = 4 - got;
        next++;
    }
    *have = got;
    return next;
}

// Assembly:
movl (%rdi), %ecx
testl %edx, %edx
setne %al
cmpl $0x4, %ecx
setb %r8b
andb %al, %r8b
xorl %eax, %eax
cmpb $0x1, %r8b
jne 0x5077c
pushq %rbx
movl %edx, %edx
xorl %r8d, %r8d
xorl %eax, %eax
movzbl (%rsi,%rax), %r9d
cmpl $0x2, %ecx
movl $0xff, %r10d
cmovbl %r8d, %r10d
movl $0x4, %r11d
subl %ecx, %r11d
movl %ecx, %ebx
incl %ebx
testl %r9d, %r9d
cmovnel %r8d, %r11d
cmpl %r9d, %r10d
movl %r11d, %ecx
cmovel %ebx, %ecx
incq %rax
cmpq %rdx, %rax
jae 0x5077b
cmpl $0x4, %ecx
jb 0x5073f
popq %rbx
movl %ecx, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflateSyncPoint
int ZEXPORT inflateSyncPoint(z_streamp strm) {
    struct inflate_state FAR *state;

    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;
    return state->mode == STORED && state->bits == 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x4e621
movl %eax, %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testl %ecx, %ecx
jne 0x507ab
movq 0x38(%rbx), %rcx
xorl %eax, %eax
cmpl $0x3f41, 0x8(%rcx)      # imm = 0x3F41
jne 0x507ab
xorl %eax, %eax
cmpl $0x0, 0x58(%rcx)
sete %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflateValidate
int ZEXPORT inflateValidate(z_streamp strm, int check) {
    struct inflate_state FAR *state;

    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;
    if (check && state->wrap)
        state->wrap |= 4;
    else
        state->wrap &= ~4;
    return Z_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x4e621
movl %eax, %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testl %ecx, %ecx
jne 0x50962
movq 0x38(%r14), %rax
movl 0x10(%rax), %ecx
testl %ebx, %ebx
je 0x50956
testl %ecx, %ecx
je 0x5095b
orl $0x4, %ecx
jmp 0x5095d
andl $-0x5, %ecx
jmp 0x5095d
xorl %ecx, %ecx
movl %ecx, 0x10(%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflateMark
long ZEXPORT inflateMark(z_streamp strm) {
    struct inflate_state FAR *state;

    if (inflateStateCheck(strm))
        return -(1L << 16);
    state = (struct inflate_state FAR *)strm->state;
    return (long)(((unsigned long)((long)state->back)) << 16) +
        (state->mode == COPY ? state->length :
            (state->mode == MATCH ? state->was - state->length : 0));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x4e621
movl %eax, %ecx
movq $-0x10000, %rax         # imm = 0xFFFF0000
testl %ecx, %ecx
jne 0x509b7
movq 0x38(%rbx), %rcx
movslq 0x1bec(%rcx), %rax
shlq $0x10, %rax
movl 0x8(%rcx), %esi
cmpl $0x3f4c, %esi           # imm = 0x3F4C
je 0x509a9
xorl %edx, %edx
cmpl $0x3f43, %esi           # imm = 0x3F43
jne 0x509b2
movl 0x5c(%rcx), %edx
jmp 0x509b2
movl 0x1bf0(%rcx), %edx
subl 0x5c(%rcx), %edx
movl %edx, %ecx
addq %rcx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflateCodesUsed
unsigned long ZEXPORT inflateCodesUsed(z_streamp strm) {
    struct inflate_state FAR *state;
    if (inflateStateCheck(strm)) return (unsigned long)-1;
    state = (struct inflate_state FAR *)strm->state;
    return (unsigned long)(state->next - state->codes);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x4e621
movl %eax, %ecx
movq $-0x1, %rax
testl %ecx, %ecx
jne 0x509e7
movq 0x38(%rbx), %rcx
movq 0x90(%rcx), %rax
subq %rcx, %rax
addq $-0x558, %rax           # imm = 0xFAA8
sarq $0x2, %rax
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/trees.c
// Function: bi_windup
local void bi_windup(deflate_state *s) {
    if (s->bi_valid > 8) {
        put_short(s, s->bi_buf);
    } else if (s->bi_valid > 0) {
        put_byte(s, (Byte)s->bi_buf);
    }
    s->bi_buf = 0;
    s->bi_valid = 0;
#ifdef ZLIB_DEBUG
    s->bits_sent = (s->bits_sent + 7) & ~7;
#endif
}

// Assembly:
movl 0x1734(%rdi), %eax
cmpl $0x9, %eax
jl 0x5148f
movb 0x1730(%rdi), %dl
leaq 0x10(%rdi), %rcx
leaq 0x28(%rdi), %rax
movq 0x10(%rdi), %rsi
movq 0x28(%rdi), %r8
leaq 0x1(%r8), %r9
movq %r9, 0x28(%rdi)
movb %dl, (%rsi,%r8)
movzbl 0x1731(%rdi), %edx
jmp 0x514a2
testl %eax, %eax
jle 0x514b2
movzwl 0x1730(%rdi), %edx
leaq 0x10(%rdi), %rcx
leaq 0x28(%rdi), %rax
movq (%rcx), %rcx
movq (%rax), %rsi
leaq 0x1(%rsi), %r8
movq %r8, (%rax)
movb %dl, (%rcx,%rsi)
movw $0x0, 0x1730(%rdi)
movl $0x0, 0x1734(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/trees.c
// Function: bi_flush
local void bi_flush(deflate_state *s) {
    if (s->bi_valid == 16) {
        put_short(s, s->bi_buf);
        s->bi_buf = 0;
        s->bi_valid = 0;
    } else if (s->bi_valid >= 8) {
        put_byte(s, (Byte)s->bi_buf);
        s->bi_buf >>= 8;
        s->bi_valid -= 8;
    }
}

// Assembly:
movl 0x1734(%rdi), %eax
cmpl $0x10, %eax
jne 0x51512
movb 0x1730(%rdi), %al
movq 0x10(%rdi), %rcx
movq 0x28(%rdi), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x28(%rdi)
movb %al, (%rcx,%rdx)
movb 0x1731(%rdi), %al
movq 0x10(%rdi), %rcx
movq 0x28(%rdi), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x28(%rdi)
movb %al, (%rcx,%rdx)
movw $0x0, 0x1730(%rdi)
xorl %eax, %eax
jmp 0x51547
cmpl $0x8, %eax
jl 0x5154d
movb 0x1730(%rdi), %al
movq 0x10(%rdi), %rcx
movq 0x28(%rdi), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x28(%rdi)
movb %al, (%rcx,%rdx)
movzbl 0x1731(%rdi), %eax
movw %ax, 0x1730(%rdi)
movl 0x1734(%rdi), %eax
addl $-0x8, %eax
movl %eax, 0x1734(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/trees.c
// Function: tr_tally
int ZLIB_INTERNAL _tr_tally(deflate_state *s, unsigned dist, unsigned lc) {
#ifdef LIT_MEM
    s->d_buf[s->sym_next] = (ush)dist;
    s->l_buf[s->sym_next++] = (uch)lc;
#else
    s->sym_buf[s->sym_next++] = (uch)dist;
    s->sym_buf[s->sym_next++] = (uch)(dist >> 8);
    s->sym_buf[s->sym_next++] = (uch)lc;
#endif
    if (dist == 0) {
        /* lc is the unmatched char */
        s->dyn_ltree[lc].Freq++;
    } else {
        s->matches++;
        /* Here, lc is the match length - MIN_MATCH */
        dist--;             /* dist = match distance - 1 */
        Assert((ush)dist < (ush)MAX_DIST(s) &&
               (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
               (ush)d_code(dist) < (ush)D_CODES,  "_tr_tally: bad match");

        s->dyn_ltree[_length_code[lc] + LITERALS + 1].Freq++;
        s->dyn_dtree[d_code(dist)].Freq++;
    }
    return (s->sym_next == s->sym_end);
}

// Assembly:
movl %esi, %eax
movq 0x1700(%rdi), %rcx
movl 0x170c(%rdi), %esi
leal 0x1(%rsi), %r8d
movl %r8d, 0x170c(%rdi)
movb %al, (%rcx,%rsi)
movq 0x1700(%rdi), %rcx
movl 0x170c(%rdi), %esi
leal 0x1(%rsi), %r8d
movl %r8d, 0x170c(%rdi)
movb %ah, (%rcx,%rsi)
movq 0x1700(%rdi), %rcx
movl 0x170c(%rdi), %esi
leal 0x1(%rsi), %r8d
movl %r8d, 0x170c(%rdi)
movb %dl, (%rcx,%rsi)
testl %eax, %eax
je 0x528e7
incl 0x1728(%rdi)
movl %edx, %ecx
leaq 0x13a32(%rip), %rdx     # 0x662e0
movzbl (%rcx,%rdx), %ecx
incw 0x4d8(%rdi,%rcx,4)
leal -0x1(%rax), %ecx
movl %ecx, %edx
shrl $0x7, %edx
addl $0x100, %edx            # imm = 0x100
cmpl $0x101, %eax            # imm = 0x101
cmovbl %ecx, %edx
leaq 0x13809(%rip), %rax     # 0x660e0
movzbl (%rdx,%rax), %eax
leaq (%rdi,%rax,4), %rax
addq $0x9c8, %rax            # imm = 0x9C8
jmp 0x528f3
movl %edx, %eax
leaq (%rdi,%rax,4), %rax
addq $0xd4, %rax
incw (%rax)
movl 0x170c(%rdi), %ecx
xorl %eax, %eax
cmpl 0x1710(%rdi), %ecx
sete %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/trees.c
// Function: pqdownheap
local void pqdownheap(deflate_state *s, ct_data *tree, int k) {
    int v = s->heap[k];
    int j = k << 1;  /* left son of k */
    while (j <= s->heap_len) {
        /* Set j to the smallest of the two sons: */
        if (j < s->heap_len &&
            smaller(tree, s->heap[j + 1], s->heap[j], s->depth)) {
            j++;
        }
        /* Exit if v is smaller than both sons */
        if (smaller(tree, v, s->heap[j], s->depth)) break;

        /* Exchange v with the smallest son */
        s->heap[k] = s->heap[j];  k = j;

        /* And continue down the tree, setting j to the left son of k */
        j <<= 1;
    }
    s->heap[k] = v;
}

// Assembly:
movl %edx, %eax
movl 0xbc0(%rdi,%rax,4), %eax
leal (%rdx,%rdx), %r8d
movl 0x14b4(%rdi), %r10d
cmpl %r10d, %r8d
jle 0x52929
movl %edx, %r9d
jmp 0x529db
pushq %rbp
pushq %r14
pushq %rbx
movslq %eax, %rcx
cmpl %r10d, %r8d
jge 0x52966
movl %r8d, %r11d
orl $0x1, %r11d
movslq %r11d, %rbx
movslq 0xbc0(%rdi,%rbx,4), %r9
movslq %r8d, %r10
movslq 0xbc0(%rdi,%r10,4), %r14
movzwl (%rsi,%r14,4), %ebp
cmpw %bp, (%rsi,%r9,4)
jae 0x529bb
movq %rbx, %r10
movl %r11d, %r9d
jmp 0x5296c
movslq %r8d, %r10
movl %r8d, %r9d
movl 0xbc0(%rdi,%r10,4), %r8d
movslq %r8d, %r10
movzwl (%rsi,%r10,4), %r11d
cmpw %r11w, (%rsi,%rcx,4)
jb 0x529d4
jne 0x52997
movb 0x14bc(%rdi,%rcx), %r11b
cmpb 0x14bc(%rdi,%r10), %r11b
jbe 0x529d4
movslq %edx, %rdx
movl %r8d, 0xbc0(%rdi,%rdx,4)
leal (%r9,%r9), %r8d
movl 0x14b4(%rdi), %r10d
movl %r9d, %edx
cmpl %r10d, %r8d
jle 0x52930
jmp 0x529d7
jne 0x52969
movb 0x14bc(%rdi,%r9), %bpl
movl %r8d, %r9d
cmpb 0x14bc(%rdi,%r14), %bpl
jbe 0x5295e
jmp 0x5296c
movl %edx, %r9d
popq %rbx
popq %r14
popq %rbp
movslq %r9d, %rcx
movl %eax, 0xbc0(%rdi,%rcx,4)
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/zlib1.3.1/trees.c
// Function: scan_tree
local void scan_tree(deflate_state *s, ct_data *tree, int max_code) {
    int n;                     /* iterates over all tree elements */
    int prevlen = -1;          /* last emitted length */
    int curlen;                /* length of current code */
    int nextlen = tree[0].Len; /* length of next code */
    int count = 0;             /* repeat count of the current code */
    int max_count = 7;         /* max repeat count */
    int min_count = 4;         /* min repeat count */

    if (nextlen == 0) max_count = 138, min_count = 3;
    tree[max_code + 1].Len = (ush)0xffff; /* guard */

    for (n = 0; n <= max_code; n++) {
        curlen = nextlen; nextlen = tree[n + 1].Len;
        if (++count < max_count && curlen == nextlen) {
            continue;
        } else if (count < min_count) {
            s->bl_tree[curlen].Freq += count;
        } else if (curlen != 0) {
            if (curlen != prevlen) s->bl_tree[curlen].Freq++;
            s->bl_tree[REP_3_6].Freq++;
        } else if (count <= 10) {
            s->bl_tree[REPZ_3_10].Freq++;
        } else {
            s->bl_tree[REPZ_11_138].Freq++;
        }
        count = 0; prevlen = curlen;
        if (nextlen == 0) {
            max_count = 138, min_count = 3;
        } else if (curlen == nextlen) {
            max_count = 6, min_count = 3;
        } else {
            max_count = 7, min_count = 4;
        }
    }
}

// Assembly:
movzwl 0x2(%rsi), %eax
movslq %edx, %rcx
movw $0xffff, 0x6(%rsi,%rcx,4) # imm = 0xFFFF
testl %ecx, %ecx
js 0x52acb
pushq %r14
pushq %rbx
xorl %r9d, %r9d
testl %eax, %eax
setne %r9b
movl $0x8a, %ecx
movl $0x7, %r10d
cmovel %ecx, %r10d
addl $0x3, %r9d
incl %edx
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %r14d, %r14d
movl %eax, %r8d
movzwl 0x6(%rsi,%rcx,4), %eax
leal 0x1(%r14), %r11d
cmpl %r10d, %r11d
jge 0x52a42
cmpl %eax, %r8d
jne 0x52a42
movl %ebx, %r8d
jmp 0x52ab6
cmpl %r9d, %r11d
jge 0x52a55
movl %r8d, %r9d
addw %r11w, 0xabc(%rdi,%r9,4)
jmp 0x52a8a
testl %r8d, %r8d
je 0x52a74
cmpl %ebx, %r8d
je 0x52a6b
movl %r8d, %r9d
incw 0xabc(%rdi,%r9,4)
incw 0xafc(%rdi)
jmp 0x52a8a
cmpl $0x9, %r14d
jg 0x52a83
incw 0xb00(%rdi)
jmp 0x52a8a
incw 0xb04(%rdi)
xorl %r11d, %r11d
testl %eax, %eax
je 0x52aaa
xorl %r10d, %r10d
cmpl %eax, %r8d
sete %r10b
movl $0x4, %r9d
subl %r10d, %r9d
xorl $0x7, %r10d
jmp 0x52ab6
movl $0x3, %r9d
movl $0x8a, %r10d
incq %rcx
movl %r11d, %r14d
movl %r8d, %ebx
cmpq %rcx, %rdx
jne 0x52a27
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/lzma/C/LzmaDec.c
// Function: LzmaDec_DecodeToBuf
SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status)
{
  SizeT outSize = *destLen;
  SizeT inSize = *srcLen;
  *srcLen = *destLen = 0;
  for (;;)
  {
    SizeT inSizeCur = inSize, outSizeCur, dicPos;
    ELzmaFinishMode curFinishMode;
    SRes res;
    if (p->dicPos == p->dicBufSize)
      p->dicPos = 0;
    dicPos = p->dicPos;
    if (outSize > p->dicBufSize - dicPos)
    {
      outSizeCur = p->dicBufSize;
      curFinishMode = LZMA_FINISH_ANY;
    }
    else
    {
      outSizeCur = dicPos + outSize;
      curFinishMode = finishMode;
    }

    res = LzmaDec_DecodeToDic(p, outSizeCur, src, &inSizeCur, curFinishMode, status);
    src += inSizeCur;
    inSize -= inSizeCur;
    *srcLen += inSizeCur;
    outSizeCur = p->dicPos - dicPos;
    memcpy(dest, p->dic + dicPos, outSizeCur);
    dest += outSizeCur;
    outSize -= outSizeCur;
    *destLen += outSizeCur;
    if (res != 0)
      return res;
    if (outSizeCur == 0 || outSize == 0)
      return SZ_OK;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, 0x8(%rsp)
movq %rcx, %r9
movq %rsi, 0x10(%rsp)
movq %rdi, %rbp
movq (%rdx), %r10
movq (%r8), %rax
xorl %ecx, %ecx
movq %rdx, 0x20(%rsp)
movq %rcx, (%rdx)
movq %r8, 0x28(%rsp)
movq %rcx, (%r8)
movq %rax, 0x30(%rsp)
movq %rax, 0x18(%rsp)
movq 0x20(%rbp), %rax
movq 0x28(%rbp), %r15
cmpq %rax, %r15
jne 0x5724f
movq $0x0, 0x28(%rbp)
xorl %r15d, %r15d
movq %rax, %rcx
subq %r15, %rcx
leaq (%r15,%r10), %rsi
movq %r10, 0x38(%rsp)
cmpq %rcx, %r10
cmovaq %rax, %rsi
movl 0x8(%rsp), %r8d
movl $0x0, %eax
cmoval %eax, %r8d
movq %rbp, %rdi
movq %r9, 0x40(%rsp)
movq %r9, %rdx
leaq 0x18(%rsp), %rcx
movq 0x80(%rsp), %r9
callq 0x54ffa
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rbx
movq 0x28(%rsp), %rax
addq %rbx, (%rax)
movq 0x28(%rbp), %r13
movq %r13, %r14
subq %r15, %r14
movq %rbp, %r12
movq 0x18(%rbp), %rsi
addq %r15, %rsi
movq 0x10(%rsp), %rdi
movq %r14, %rdx
callq 0x4290
movl 0xc(%rsp), %ecx
movq 0x20(%rsp), %rax
addq %r14, (%rax)
testl %ecx, %ecx
jne 0x57300
cmpq %r15, %r13
movq 0x40(%rsp), %r9
movq 0x38(%rsp), %r10
movq 0x30(%rsp), %rax
je 0x57300
movq %r12, %rbp
subq %r14, %r10
addq %r14, 0x10(%rsp)
subq %rbx, %rax
addq %rbx, %r9
testq %r10, %r10
jne 0x5722d
movl %ecx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/lzma/C/LzmaDec.c
// Function: LzmaDec_AllocateProbs
SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc)
{
  CLzmaProps propNew;
  RINOK(LzmaProps_Decode(&propNew, props, propsSize))
  RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc))
  p->prop = propNew;
  return SZ_OK;
}

// Assembly:
movl $0x4, %eax
cmpl $0x5, %edx
jb 0x57465
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x1(%rsi), %edx
cmpl $0x1001, %edx           # imm = 0x1001
movl $0x1000, %r12d          # imm = 0x1000
cmovael %edx, %r12d
movb (%rsi), %bpl
cmpb $-0x20, %bpl
ja 0x57457
movq %rdi, %rbx
movzbl %bpl, %r13d
imull $0x39, %r13d, %eax
shrl $0x9, %eax
leal (%rax,%rax,8), %edx
movl %ebp, %esi
subb %dl, %sil
imull $0x34, %eax, %edx
movzbl %dh, %edx
leal (%rdx,%rdx,4), %edx
subb %dl, %al
movzbl %sil, %r14d
movzbl %al, %r15d
movl %r14d, %esi
movl %r15d, %edx
callq 0x57466
testl %eax, %eax
jne 0x57457
imull $0x6d, %r13d, %eax
shrl $0x8, %eax
subb %al, %bpl
shrb %bpl
addb %al, %bpl
shrb $0x5, %bpl
shlq $0x20, %r12
movzbl %bpl, %eax
shll $0x10, %eax
orq %r12, %rax
shll $0x8, %r15d
orq %rax, %r15
orq %r15, %r14
movq %r14, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/lzma/C/LzmaDec.c
// Function: LzmaDec_AllocateProbs2
static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAllocPtr alloc)
{
  UInt32 numProbs = LzmaProps_GetNumProbs(propNew);
  if (!p->probs || numProbs != p->numProbs)
  {
    LzmaDec_FreeProbs(p, alloc);
    p->probs = (CLzmaProb *)ISzAlloc_Alloc(alloc, numProbs * sizeof(CLzmaProb));
    if (!p->probs)
      return SZ_ERROR_MEM;
    p->probs_1664 = p->probs + 1664;
    p->numProbs = numProbs;
  }
  return SZ_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %rbx
leal (%rsi,%rdx), %ecx
movl $0x300, %ebp            # imm = 0x300
shll %cl, %ebp
movq %rdi, %r14
addl $0x7c0, %ebp            # imm = 0x7C0
movq 0x8(%rdi), %rsi
testq %rsi, %rsi
je 0x57491
xorl %eax, %eax
cmpl 0x60(%r14), %ebp
je 0x574c9
movq %rbx, %rdi
callq *0x8(%rbx)
movq $0x0, 0x8(%r14)
movl %ebp, %esi
addq %rsi, %rsi
movq %rbx, %rdi
callq *(%rbx)
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x574c4
addq $0xd00, %rax            # imm = 0xD00
movq %rax, 0x10(%r14)
movl %ebp, 0x60(%r14)
xorl %eax, %eax
jmp 0x574c9
movl $0x2, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/lzma/C/LzmaDec.c
// Function: LzmaDec_Allocate
SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc)
{
  CLzmaProps propNew;
  SizeT dicBufSize;
  RINOK(LzmaProps_Decode(&propNew, props, propsSize))
  RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc))

  {
    UInt32 dictSize = propNew.dicSize;
    SizeT mask = ((UInt32)1 << 12) - 1;
         if (dictSize >= ((UInt32)1 << 30)) mask = ((UInt32)1 << 22) - 1;
    else if (dictSize >= ((UInt32)1 << 22)) mask = ((UInt32)1 << 20) - 1;
    dicBufSize = ((SizeT)dictSize + mask) & ~mask;
    if (dicBufSize < dictSize)
      dicBufSize = dictSize;
  }

  if (!p->dic || dicBufSize != p->dicBufSize)
  {
    LzmaDec_FreeDict(p, alloc);
    p->dic = (Byte *)ISzAlloc_Alloc(alloc, dicBufSize);
    if (!p->dic)
    {
      LzmaDec_FreeProbs(p, alloc);
      return SZ_ERROR_MEM;
    }
  }
  p->dicBufSize = dicBufSize;
  p->prop = propNew;
  return SZ_OK;
}

// Assembly:
movl $0x4, %eax
cmpl $0x5, %edx
jb 0x5762e
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl 0x1(%rsi), %r13d
cmpl $0x1001, %r13d          # imm = 0x1001
movl $0x1000, %r15d          # imm = 0x1000
cmovael %r13d, %r15d
movb (%rsi), %bpl
cmpb $-0x20, %bpl
ja 0x57620
movq %rcx, %r14
movzbl %bpl, %eax
movl %eax, 0x14(%rsp)
imull $0x39, %eax, %eax
shrl $0x9, %eax
leal (%rax,%rax,8), %ecx
movl %ebp, %edx
subb %cl, %dl
imull $0x34, %eax, %ecx
movzbl %ch, %ecx
leal (%rcx,%rcx,4), %ecx
subb %cl, %al
movzbl %dl, %r12d
movzbl %al, %ebx
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movl %r12d, %esi
movl %ebx, %edx
movq %r14, %rcx
callq 0x57466
movq 0x8(%rsp), %rdx
testl %eax, %eax
jne 0x57620
cmpl $0x400000, %r13d        # imm = 0x400000
movl $0xfffff, %eax          # imm = 0xFFFFF
movl $0xfff, %ecx            # imm = 0xFFF
cmovaeq %rax, %rcx
cmpl $0x40000000, %r13d      # imm = 0x40000000
movl $0x3fffff, %r13d        # imm = 0x3FFFFF
cmovbq %rcx, %r13
movl %r15d, %r15d
leaq (%r15,%r13), %rax
notq %r13
andq %rax, %r13
cmpq %r15, %r13
cmovbeq %r15, %r13
movq 0x18(%rdx), %rsi
testq %rsi, %rsi
je 0x575a3
cmpq 0x20(%rdx), %r13
je 0x575ce
movq %r14, %rdi
callq *0x8(%r14)
movq 0x8(%rsp), %rax
movq $0x0, 0x18(%rax)
movq %r14, %rdi
movq %r13, %rsi
callq *(%r14)
movq 0x8(%rsp), %rdx
movq %rax, 0x18(%rdx)
testq %rax, %rax
je 0x57605
imull $0x6d, 0x14(%rsp), %eax
shrl $0x8, %eax
subb %al, %bpl
shrb %bpl
addb %al, %bpl
shrb $0x5, %bpl
movq %r13, 0x20(%rdx)
shlq $0x20, %r15
movzbl %bpl, %eax
shll $0x10, %eax
orq %r15, %rax
shll $0x8, %ebx
orq %rax, %rbx
orq %rbx, %r12
movq %r12, (%rdx)
xorl %eax, %eax
jmp 0x57620
movq 0x8(%rdx), %rsi
movq %rdx, %rbx
movq %r14, %rdi
callq *0x8(%r14)
movq $0x0, 0x8(%rbx)
movl $0x2, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq