LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: sisong[P]ApkDiffPatch/zlib1.3.1/deflate.c
// Function: deflatePrime
int ZEXPORT deflatePrime(z_streamp strm, int bits, int value) {
    deflate_state *s;
    int put;

    if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
    s = strm->state;
#ifdef LIT_MEM
    if (bits < 0 || bits > 16 ||
        (uchf *)s->d_buf < s->pending_out + ((Buf_size + 7) >> 3))
        return Z_BUF_ERROR;
#else
    if (bits < 0 || bits > 16 ||
        s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3))
        return Z_BUF_ERROR;
#endif
    do {
        put = Buf_size - s->bi_valid;
        if (put > bits)
            put = bits;
        s->bi_buf |= (ush)((value & ((1 << put) - 1)) << s->bi_valid);
        s->bi_valid += put;
        _tr_flush_bits(s);
        value >>= put;
        bits -= put;
    } while (bits);
    return Z_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x93560
cmpl $0x0, %eax
je 0x93efc
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x93fd8
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x93f30
cmpl $0x10, -0x14(%rbp)
jg 0x93f30
movq -0x20(%rbp), %rax
movq 0x1700(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x20(%rcx), %rcx
addq $0x2, %rcx
cmpq %rcx, %rax
jae 0x93f3c
movl $0xfffffffb, -0x4(%rbp) # imm = 0xFFFFFFFB
jmp 0x93fd8
jmp 0x93f3e
movq -0x20(%rbp), %rcx
movl $0x10, %eax
subl 0x1734(%rcx), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jle 0x93f5e
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x18(%rbp), %eax
movl -0x24(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
andl %ecx, %eax
movq -0x20(%rbp), %rcx
movl 0x1734(%rcx), %ecx
shll %cl, %eax
movzwl %ax, %edx
movq -0x20(%rbp), %rax
movzwl 0x1730(%rax), %ecx
orl %edx, %ecx
movw %cx, 0x1730(%rax)
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rax
addl 0x1734(%rax), %ecx
movl %ecx, 0x1734(%rax)
movq -0x20(%rbp), %rdi
callq 0x9f080
movl -0x24(%rbp), %ecx
movl -0x18(%rbp), %eax
sarl %cl, %eax
movl %eax, -0x18(%rbp)
movl -0x24(%rbp), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x93f3e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/zlib1.3.1/deflate.c
// Function: slide_hash
local void slide_hash(deflate_state *s) {
    unsigned n, m;
    Posf *p;
    uInt wsize = s->w_size;

    n = s->hash_size;
    p = &s->head[n];
    do {
        m = *--p;
        *p = (Pos)(m >= wsize ? m - wsize : NIL);
    } while (--n);
    n = wsize;
#ifndef FASTEST
    p = &s->prev[n];
    do {
        m = *--p;
        *p = (Pos)(m >= wsize ? m - wsize : NIL);
        /* If n is not on any hash chain, prev[n] is garbage but
         * its value will never be used.
         */
    } while (--n);
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x84(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movl -0xc(%rbp), %ecx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $-0x2, %rcx
movq %rcx, -0x18(%rbp)
movzwl -0x2(%rax), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jb 0x954ed
movl -0x10(%rbp), %eax
subl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x954f4
xorl %eax, %eax
movl %eax, -0x20(%rbp)
jmp 0x954f4
movl -0x20(%rbp), %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, (%rax)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jne 0x954c4
movl -0x1c(%rbp), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movl -0xc(%rbp), %ecx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $-0x2, %rcx
movq %rcx, -0x18(%rbp)
movzwl -0x2(%rax), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jb 0x95553
movl -0x10(%rbp), %eax
subl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x9555a
xorl %eax, %eax
movl %eax, -0x24(%rbp)
jmp 0x9555a
movl -0x24(%rbp), %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, (%rax)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jne 0x9552a
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/zlib1.3.1/deflate.c
// Function: deflateTune
int ZEXPORT deflateTune(z_streamp strm, int good_length, int max_lazy,
                        int nice_length, int max_chain) {
    deflate_state *s;

    if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
    s = strm->state;
    s->good_match = (uInt)good_length;
    s->max_lazy_match = (uInt)max_lazy;
    s->nice_match = nice_length;
    s->max_chain_length = (uInt)max_chain;
    return Z_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x93560
cmpl $0x0, %eax
je 0x955b0
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x955f7
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0xcc(%rax)
movl -0x18(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0xc0(%rax)
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0xd0(%rax)
movl -0x20(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0xbc(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x9f080
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jbe 0x958c2
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x958cd
jmp 0x9595e
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
movl -0xc(%rbp), %eax
movl %eax, %edx
callq 0x4320
movl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, 0x18(%rax)
movl -0xc(%rbp), %edx
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, 0x20(%rax)
movl -0xc(%rbp), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
movl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movl 0x20(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x20(%rax)
movl -0xc(%rbp), %eax
movl %eax, %edx
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x9595e
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jbe 0x9707b
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0x9708d
movl $0x0, -0x4(%rbp)
jmp 0x97138
movl -0x20(%rbp), %edx
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movl -0x20(%rbp), %eax
movl %eax, %edx
callq 0x4320
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
cmpl $0x1, 0x30(%rax)
jne 0x970e0
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
movq -0x18(%rbp), %rsi
movl -0x20(%rbp), %edx
callq 0x91ac0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
jmp 0x9710f
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
cmpl $0x2, 0x30(%rax)
jne 0x9710d
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
movq -0x18(%rbp), %rsi
movl -0x20(%rbp), %edx
callq 0x92a10
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
jmp 0x9710f
movl -0x20(%rbp), %edx
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, (%rax)
movl -0x20(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x9a079
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x9a079
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x9a082
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9a0af
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq 0x38(%rcx), %rsi
callq *%rax
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9ada0
cmpl $0x0, %eax
je 0x9ac96
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9ad94
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x9acf1
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x1, %eax
movslq %eax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x18(%rbp), %rax
movl $0x3f34, 0x8(%rax)      # imm = 0x3F34
movq -0x18(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x18(%rbp), %rax
movl $0xffffffff, 0x18(%rax) # imm = 0xFFFFFFFF
movq -0x18(%rbp), %rax
movl $0x8000, 0x1c(%rax)     # imm = 0x8000
movq -0x18(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x58(%rax)
movq -0x18(%rbp), %rcx
addq $0x558, %rcx            # imm = 0x558
movq -0x18(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x18(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x18(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x1be8(%rax)
movq -0x18(%rbp), %rax
movl $0xffffffff, 0x1bec(%rax) # imm = 0xFFFFFFFF
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x9adc5
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x9adc5
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x9adce
movl $0x1, -0x4(%rbp)
jmp 0x9ae18
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x9ae08
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x9ae08
movq -0x18(%rbp), %rax
cmpl $0x3f34, 0x8(%rax)      # imm = 0x3F34
jb 0x9ae08
movq -0x18(%rbp), %rax
cmpl $0x3f53, 0x8(%rax)      # imm = 0x3F53
jbe 0x9ae11
movl $0x1, -0x4(%rbp)
jmp 0x9ae18
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9ada0
cmpl $0x0, %eax
je 0x9ae43
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9ae7c
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x0, 0x3c(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x40(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x44(%rax)
movq -0x10(%rbp), %rdi
callq 0x9ac70
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9ada0
cmpl $0x0, %eax
je 0x9aeb9
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9af83
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x9aeee
cmpl $-0xf, -0x14(%rbp)
jge 0x9aedd
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9af83
movl $0x0, -0x18(%rbp)
xorl %eax, %eax
subl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x9af0b
movl -0x14(%rbp), %eax
sarl $0x4, %eax
addl $0x5, %eax
movl %eax, -0x18(%rbp)
cmpl $0x30, -0x14(%rbp)
jge 0x9af09
movl -0x14(%rbp), %eax
andl $0xf, %eax
movl %eax, -0x14(%rbp)
jmp 0x9af0b
cmpl $0x0, -0x14(%rbp)
je 0x9af26
cmpl $0x8, -0x14(%rbp)
jl 0x9af1d
cmpl $0xf, -0x14(%rbp)
jle 0x9af26
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9af83
movq -0x20(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x9af63
movq -0x20(%rbp), %rax
movl 0x38(%rax), %eax
cmpl -0x14(%rbp), %eax
je 0x9af63
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rdi
movq -0x20(%rbp), %rcx
movq 0x48(%rcx), %rsi
callq *%rax
movq -0x20(%rbp), %rax
movq $0x0, 0x48(%rax)
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x38(%rax)
movq -0x10(%rbp), %rdi
callq 0x9ae20
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x9afc5
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
movsbl 0x11c34(%rip), %ecx     # 0xacbef
cmpl %ecx, %eax
jne 0x9afc5
cmpl $0x70, -0x24(%rbp)
je 0x9afd1
movl $0xfffffffa, -0x4(%rbp) # imm = 0xFFFFFFFA
jmp 0x9b0cb
cmpq $0x0, -0x10(%rbp)
jne 0x9afe4
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9b0cb
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x9b016
movq -0x10(%rbp), %rax
leaq 0x739a(%rip), %rcx      # 0xa23a0
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x9b030
movq -0x10(%rbp), %rax
leaq 0x73a4(%rip), %rcx      # 0xa23d0
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rdi
movl $0x1, %esi
movl $0x1bf8, %edx           # imm = 0x1BF8
callq *%rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x9b060
movl $0xfffffffc, -0x4(%rbp) # imm = 0xFFFFFFFC
jmp 0x9b0cb
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x30(%rbp), %rax
movl $0x3f34, 0x8(%rax)      # imm = 0x3F34
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x9ae90
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x9b0c5
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rdi
movq -0x30(%rbp), %rsi
callq *%rax
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9ada0
cmpl $0x0, %eax
je 0x9b13c
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9b1ec
cmpl $0x0, -0x14(%rbp)
jne 0x9b14e
movl $0x0, -0x4(%rbp)
jmp 0x9b1ec
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x9b180
movq -0x20(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x58(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x9b1ec
cmpl $0x10, -0x14(%rbp)
jg 0x9b195
movq -0x20(%rbp), %rax
movl 0x58(%rax), %eax
addl -0x14(%rbp), %eax
cmpl $0x20, %eax
jbe 0x9b19e
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9b1ec
movl -0x14(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
subq $0x1, %rcx
movslq -0x18(%rbp), %rax
andq %rcx, %rax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x20(%rbp), %rcx
movl 0x58(%rcx), %ecx
shll %cl, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x20(%rbp), %rax
addq 0x50(%rax), %rcx
movq %rcx, 0x50(%rax)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
addl 0x58(%rax), %ecx
movl %ecx, 0x58(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9ada0
cmpl $0x0, %eax
je 0x9db63
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9dbc1
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x9db94
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rdi
movq -0x18(%rbp), %rcx
movq 0x48(%rcx), %rsi
callq *%rax
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq 0x38(%rcx), %rsi
callq *%rax
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9ada0
cmpl $0x0, %eax
je 0x9dbfe
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9dc98
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x40(%rax)
je 0x9dc7d
cmpq $0x0, -0x18(%rbp)
je 0x9dc7d
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rsi
movq -0x28(%rbp), %rax
movl 0x44(%rax), %eax
addq %rax, %rsi
movq -0x28(%rbp), %rax
movl 0x40(%rax), %eax
movq -0x28(%rbp), %rcx
subl 0x44(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
callq 0x4320
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x40(%rax), %eax
addq %rax, %rdi
movq -0x28(%rbp), %rax
movl 0x44(%rax), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rdi
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rsi
movq -0x28(%rbp), %rax
movl 0x44(%rax), %eax
movl %eax, %edx
callq 0x4320
cmpq $0x0, -0x20(%rbp)
je 0x9dc91
movq -0x28(%rbp), %rax
movl 0x40(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9ada0
cmpl $0x0, %eax
je 0x9dcdd
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9dd9d
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x9dd0c
movq -0x28(%rbp), %rax
cmpl $0x3f3e, 0x8(%rax)      # imm = 0x3F3E
je 0x9dd0c
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9dd9d
movq -0x28(%rbp), %rax
cmpl $0x3f3e, 0x8(%rax)      # imm = 0x3F3E
jne 0x9dd58
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movq %rsi, %rdi
callq 0x91ac0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x91ac0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x20(%rcx), %rax
je 0x9dd56
movl $0xfffffffd, -0x4(%rbp) # imm = 0xFFFFFFFD
jmp 0x9dd9d
jmp 0x9dd58
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %eax
addq %rax, %rsi
movl -0x1c(%rbp), %edx
callq 0x9d940
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x9dd8b
movq -0x28(%rbp), %rax
movl $0x3f52, 0x8(%rax)      # imm = 0x3F52
movl $0xfffffffc, -0x4(%rbp) # imm = 0xFFFFFFFC
jmp 0x9dd9d
movq -0x28(%rbp), %rax
movl $0x1, 0x14(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9ada0
cmpl $0x0, %eax
je 0x9ddd7
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9de19
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x9ddfb
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9de19
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x48(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
xorl %eax, %eax
cmpl -0x14(%rbp), %ecx
movb %al, -0x1d(%rbp)
jae 0x9e076
cmpl $0x4, -0x18(%rbp)
setb %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
testb $0x1, %al
jne 0x9e07f
jmp 0x9e0d7
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movzbl (%rax,%rcx), %eax
movl -0x18(%rbp), %esi
movl $0xff, %ecx
xorl %edx, %edx
cmpl $0x2, %esi
cmovbl %edx, %ecx
cmpl %ecx, %eax
jne 0x9e0a9
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x9e0cc
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
je 0x9e0bf
movl $0x0, -0x18(%rbp)
jmp 0x9e0ca
movl $0x4, %eax
subl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x9e0cc
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x9e05f
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movl -0x1c(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9ada0
cmpl $0x0, %eax
je 0x9e113
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9e14a
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpl $0x3f41, 0x8(%rcx)      # imm = 0x3F41
movb %al, -0x19(%rbp)
jne 0x9e13f
movq -0x18(%rbp), %rax
cmpl $0x0, 0x58(%rax)
sete %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflateUndermine
int ZEXPORT inflateUndermine(z_streamp strm, int subvert) {
    struct inflate_state FAR *state;

    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;
#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
    state->sane = !subvert;
    return Z_OK;
#else
    (void)subvert;
    state->sane = 1;
    return Z_DATA_ERROR;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9ada0
cmpl $0x0, %eax
je 0x9e3c6
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9e3e7
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x1, 0x1be8(%rax)
movl $0xfffffffd, -0x4(%rbp) # imm = 0xFFFFFFFD
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9ada0
cmpl $0x0, %eax
je 0x9e416
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9e455
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x9e441
movq -0x20(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x9e441
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x10(%rax)
jmp 0x9e44e
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
andl $-0x5, %ecx
movl %ecx, 0x10(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9ada0
cmpl $0x0, %eax
je 0x9e484
movq $-0x10000, -0x8(%rbp)   # imm = 0xFFFF0000
jmp 0x9e4fc
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movslq 0x1bec(%rax), %rax
shlq $0x10, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x3f43, 0x8(%rax)      # imm = 0x3F43
jne 0x9e4bc
movq -0x18(%rbp), %rax
movl 0x5c(%rax), %eax
movl %eax, -0x24(%rbp)
jmp 0x9e4ec
movq -0x18(%rbp), %rax
cmpl $0x3f4c, 0x8(%rax)      # imm = 0x3F4C
jne 0x9e4df
movq -0x18(%rbp), %rax
movl 0x1bf0(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0x5c(%rcx), %eax
movl %eax, -0x28(%rbp)
jmp 0x9e4e6
xorl %eax, %eax
movl %eax, -0x28(%rbp)
jmp 0x9e4e6
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9ada0
cmpl $0x0, %eax
je 0x9e534
movq $-0x1, -0x8(%rbp)
jmp 0x9e561
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x90(%rax), %rax
movq -0x18(%rbp), %rcx
addq $0x558, %rcx            # imm = 0x558
subq %rcx, %rax
sarq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/zlib1.3.1/trees.c
// Function: tr_init
void ZLIB_INTERNAL _tr_init(deflate_state *s) {
    tr_static_init();

    s->l_desc.dyn_tree = s->dyn_ltree;
    s->l_desc.stat_desc = &static_l_desc;

    s->d_desc.dyn_tree = s->dyn_dtree;
    s->d_desc.stat_desc = &static_d_desc;

    s->bl_desc.dyn_tree = s->bl_tree;
    s->bl_desc.stat_desc = &static_bl_desc;

    s->bi_buf = 0;
    s->bi_valid = 0;
#ifdef ZLIB_DEBUG
    s->compressed_len = 0L;
    s->bits_sent = 0L;
#endif

    /* Initialize the first block of the first file: */
    init_block(s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
callq 0x9ec80
movq -0x8(%rbp), %rcx
addq $0xd4, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xb58(%rax)
movq -0x8(%rbp), %rax
leaq 0x470ee(%rip), %rcx     # 0xe5ce0
movq %rcx, 0xb68(%rax)
movq -0x8(%rbp), %rcx
addq $0x9c8, %rcx            # imm = 0x9C8
movq -0x8(%rbp), %rax
movq %rcx, 0xb70(%rax)
movq -0x8(%rbp), %rax
leaq 0x470e6(%rip), %rcx     # 0xe5d00
movq %rcx, 0xb80(%rax)
movq -0x8(%rbp), %rcx
addq $0xabc, %rcx            # imm = 0xABC
movq -0x8(%rbp), %rax
movq %rcx, 0xb88(%rax)
movq -0x8(%rbp), %rax
leaq 0x470de(%rip), %rcx     # 0xe5d20
movq %rcx, 0xb98(%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x1730(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1734(%rax)
movq -0x8(%rbp), %rdi
callq 0x9ec90
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/zlib1.3.1/trees.c
// Function: init_block
local void init_block(deflate_state *s) {
    int n; /* iterates over tree elements */

    /* Initialize the trees. */
    for (n = 0; n < L_CODES;  n++) s->dyn_ltree[n].Freq = 0;
    for (n = 0; n < D_CODES;  n++) s->dyn_dtree[n].Freq = 0;
    for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;

    s->dyn_ltree[END_BLOCK].Freq = 1;
    s->opt_len = s->static_len = 0L;
    s->sym_next = s->matches = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x11e, -0xc(%rbp)      # imm = 0x11E
jge 0x9ecc5
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movw $0x0, 0xd4(%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x9ec9f
movl $0x0, -0xc(%rbp)
cmpl $0x1e, -0xc(%rbp)
jge 0x9ecef
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movw $0x0, 0x9c8(%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x9eccc
movl $0x0, -0xc(%rbp)
cmpl $0x13, -0xc(%rbp)
jge 0x9ed19
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movw $0x0, 0xabc(%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x9ecf6
movq -0x8(%rbp), %rax
movw $0x1, 0x4d4(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x1720(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x1718(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1728(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x170c(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x8, 0x1734(%rax)
jle 0x9f025
movq -0x8(%rbp), %rax
movzwl 0x1730(%rax), %eax
andl $0xff, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rsi
movq 0x28(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x28(%rsi)
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movzwl 0x1730(%rax), %eax
sarl $0x8, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rsi
movq 0x28(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x28(%rsi)
movb %dl, (%rax,%rcx)
jmp 0x9f05f
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1734(%rax)
jle 0x9f05d
movq -0x8(%rbp), %rax
movw 0x1730(%rax), %ax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rsi
movq 0x28(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x28(%rsi)
movb %dl, (%rax,%rcx)
jmp 0x9f05f
movq -0x8(%rbp), %rax
movw $0x0, 0x1730(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1734(%rax)
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x10, 0x1734(%rax)
jne 0x9f130
movq -0x8(%rbp), %rax
movzwl 0x1730(%rax), %eax
andl $0xff, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rsi
movq 0x28(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x28(%rsi)
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movzwl 0x1730(%rax), %eax
sarl $0x8, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rsi
movq 0x28(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x28(%rsi)
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movw $0x0, 0x1730(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1734(%rax)
jmp 0x9f192
movq -0x8(%rbp), %rax
cmpl $0x8, 0x1734(%rax)
jl 0x9f190
movq -0x8(%rbp), %rax
movw 0x1730(%rax), %ax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rsi
movq 0x28(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x28(%rsi)
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movzwl 0x1730(%rax), %ecx
sarl $0x8, %ecx
movw %cx, 0x1730(%rax)
movq -0x8(%rbp), %rax
movl 0x1734(%rax), %ecx
subl $0x8, %ecx
movl %ecx, 0x1734(%rax)
jmp 0x9f192
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/zlib1.3.1/trees.c
// Function: detect_data_type
local int detect_data_type(deflate_state *s) {
    /* block_mask is the bit mask of block-listed bytes
     * set bits 0..6, 14..25, and 28..31
     * 0xf3ffc07f = binary 11110011111111111100000001111111
     */
    unsigned long block_mask = 0xf3ffc07fUL;
    int n;

    /* Check for non-textual ("block-listed") bytes. */
    for (n = 0; n <= 31; n++, block_mask >>= 1)
        if ((block_mask & 1) && (s->dyn_ltree[n].Freq != 0))
            return Z_BINARY;

    /* Check for textual ("allow-listed") bytes. */
    if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0
            || s->dyn_ltree[13].Freq != 0)
        return Z_TEXT;
    for (n = 32; n < LITERALS; n++)
        if (s->dyn_ltree[n].Freq != 0)
            return Z_TEXT;

    /* There are no "block-listed" or "allow-listed" bytes:
     * this stream either is empty or has tolerated ("gray-listed") bytes only.
     */
    return Z_BINARY;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl $0xf3ffc07f, %eax       # imm = 0xF3FFC07F
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x1f, -0x1c(%rbp)
jg 0x9f875
movq -0x18(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x9f85d
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movzwl 0xd4(%rax,%rcx,4), %eax
cmpl $0x0, %eax
je 0x9f85d
movl $0x0, -0x4(%rbp)
jmp 0x9f8f0
jmp 0x9f85f
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
shrq %rax
movq %rax, -0x18(%rbp)
jmp 0x9f828
movq -0x10(%rbp), %rax
movzwl 0xf8(%rax), %eax
cmpl $0x0, %eax
jne 0x9f8a5
movq -0x10(%rbp), %rax
movzwl 0xfc(%rax), %eax
cmpl $0x0, %eax
jne 0x9f8a5
movq -0x10(%rbp), %rax
movzwl 0x108(%rax), %eax
cmpl $0x0, %eax
je 0x9f8ae
movl $0x1, -0x4(%rbp)
jmp 0x9f8f0
movl $0x20, -0x1c(%rbp)
cmpl $0x100, -0x1c(%rbp)     # imm = 0x100
jge 0x9f8e9
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movzwl 0xd4(%rax,%rcx,4), %eax
cmpl $0x0, %eax
je 0x9f8dc
movl $0x1, -0x4(%rbp)
jmp 0x9f8f0
jmp 0x9f8de
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x9f8b5
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/zlib1.3.1/trees.c
// Function: build_bl_tree
local int build_bl_tree(deflate_state *s) {
    int max_blindex;  /* index of last bit length code of non zero freq */

    /* Determine the bit length frequencies for literal and distance trees */
    scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code);
    scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code);

    /* Build the bit length tree: */
    build_tree(s, (tree_desc *)(&(s->bl_desc)));
    /* opt_len now includes the length of the tree representations, except the
     * lengths of the bit lengths codes and the 5 + 5 + 4 bits for the counts.
     */

    /* Determine the number of bit length codes to send. The pkzip format
     * requires that at least 4 bit length codes be sent. (appnote.txt says
     * 3 but the actual value used is 4.)
     */
    for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {
        if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
    }
    /* Update opt_len to include the bit length tree and counts */
    s->opt_len += 3*((ulg)max_blindex + 1) + 5 + 5 + 4;
    Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
            s->opt_len, s->static_len));

    return max_blindex;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0xd4, %rsi
movq -0x8(%rbp), %rax
movl 0xb60(%rax), %edx
callq 0xa1380
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x9c8, %rsi            # imm = 0x9C8
movq -0x8(%rbp), %rax
movl 0xb78(%rax), %edx
callq 0xa1380
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0xb88, %rsi            # imm = 0xB88
callq 0x9f900
movl $0x12, -0xc(%rbp)
cmpl $0x3, -0xc(%rbp)
jl 0x9fd48
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rdx
leaq 0x1ed08(%rip), %rcx     # 0xbea30
movzbl (%rcx,%rdx), %ecx
movzwl 0xabe(%rax,%rcx,4), %eax
cmpl $0x0, %eax
je 0x9fd3b
jmp 0x9fd48
jmp 0x9fd3d
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x9fd13
movslq -0xc(%rbp), %rax
addq $0x1, %rax
imulq $0x3, %rax, %rcx
addq $0x5, %rcx
addq $0x5, %rcx
addq $0x4, %rcx
movq -0x8(%rbp), %rax
addq 0x1718(%rax), %rcx
movq %rcx, 0x1718(%rax)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)