// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x987ea
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
movsbl 0x1440f(%rip), %ecx     # 0xacbef
cmpl %ecx, %eax
jne 0x987ea
cmpl $0x70, -0x2c(%rbp)
je 0x987f6
movl $0xfffffffa, -0x4(%rbp) # imm = 0xFFFFFFFA
jmp 0x98903
cmpq $0x0, -0x10(%rbp)
je 0x98810
cmpq $0x0, -0x20(%rbp)
je 0x98810
cmpl $0x8, -0x14(%rbp)
jl 0x98810
cmpl $0xf, -0x14(%rbp)
jle 0x9881c
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x98903
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x9884e
movq -0x10(%rbp), %rax
leaq 0x9b62(%rip), %rcx      # 0xa23a0
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x98868
movq -0x10(%rbp), %rax
leaq 0x9b6c(%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, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x98898
movl $0xfffffffc, -0x4(%rbp) # imm = 0xFFFFFFFC
jmp 0x98903
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x38(%rbp), %rax
movl $0x8000, 0x1c(%rax)     # imm = 0x8000
movl -0x14(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x38(%rax)
movl -0x14(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x3c(%rax)
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x44(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x40(%rax)
movq -0x38(%rbp), %rax
movl $0x1, 0x1be8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)