LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %rax
movq 0x38(%rdi), %r12
movq 0x48(%r12), %rdi
pushq $0x1
popq %rbp
testq %rdi, %rdi
jne 0x46924
movq 0x50(%rax), %rdi
movb 0x38(%r12), %cl
movl %ebp, %esi
shll %cl, %esi
movl %ebp, %edx
callq *0x40(%rax)
movq %rax, %rdi
movq %rax, 0x48(%r12)
testq %rax, %rax
je 0x469b0
movl 0x3c(%r12), %r13d
testl %r13d, %r13d
jne 0x46943
movb 0x38(%r12), %cl
shll %cl, %ebp
movl %ebp, 0x3c(%r12)
andq $0x0, 0x40(%r12)
movl %ebp, %r13d
cmpl %r14d, %r13d
jbe 0x46990
movl 0x44(%r12), %eax
subl %eax, %r13d
cmpl %r14d, %r13d
movl %r14d, %r15d
cmovbl %r13d, %r15d
addq %rax, %rdi
movl %r14d, %eax
movq %rbx, %rsi
subq %rax, %rsi
movq %r15, %rdx
callq 0x42c0
cmpl %r14d, %r13d
jae 0x469c1
subl %r15d, %r14d
movq 0x48(%r12), %rdi
subq %r14, %rbx
movq %rbx, %rsi
movq %r14, %rdx
callq 0x42c0
movl %r14d, 0x44(%r12)
jmp 0x469a4
movl %r13d, %edx
subq %rdx, %rbx
movq %rbx, %rsi
callq 0x42c0
andl $0x0, 0x44(%r12)
movl 0x3c(%r12), %eax
movl %eax, 0x40(%r12)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
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 0x469b0
addl %r15d, %eax
movl %eax, 0x40(%r12)
jmp 0x469b0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x44ae0
testl %eax, %eax
je 0x469ff
pushq $-0x2
popq %rax
jmp 0x46a28
movq 0x38(%rbx), %rsi
movq 0x48(%rsi), %rax
testq %rax, %rax
je 0x46a1a
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq *0x48(%rbx)
movq 0x38(%rbx), %rsi
movq 0x50(%rbx), %rdi
callq *0x48(%rbx)
andq $0x0, 0x38(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x44ae0
testl %eax, %eax
je 0x46a46
pushq $-0x2
popq %rax
jmp 0x46a93
movq 0x38(%r15), %r15
movl 0x40(%r15), %edx
testl %edx, %edx
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x46a86
movl 0x44(%r15), %esi
subl %esi, %edx
addq 0x48(%r15), %rsi
movq %r14, %rdi
callq 0x42c0
movl 0x40(%r15), %edi
movl 0x44(%r15), %edx
addq %r14, %rdi
subq %rdx, %rdi
movq 0x48(%r15), %rsi
callq 0x42c0
xorl %eax, %eax
testq %rbx, %rbx
je 0x46a93
movl 0x40(%r15), %ecx
movl %ecx, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x44ae0
movl %eax, %ecx
pushq $-0x2
popq %rax
testl %ecx, %ecx
jne 0x46b36
movq 0x38(%r15), %r12
cmpl $0x0, 0x10(%r12)
movl 0x8(%r12), %ecx
je 0x46ad8
cmpl $0x3f3e, %ecx           # imm = 0x3F3E
jne 0x46b36
leaq 0x8(%r12), %r13
jmp 0x46ae5
leaq 0x8(%r12), %r13
cmpl $0x3f3e, %ecx           # imm = 0x3F3E
jne 0x46b04
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x400c8
movq %rax, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x400c8
cmpq 0x20(%r12), %rax
jne 0x46b26
movl %ebx, %eax
addq %rax, %r14
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x468dc
testl %eax, %eax
je 0x46b2b
movl $0x3f52, (%r13)         # imm = 0x3F52
pushq $-0x4
jmp 0x46b28
pushq $-0x3
popq %rax
jmp 0x46b36
movl $0x1, 0x14(%r12)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x44ae0
movl %eax, %ecx
pushq $-0x2
popq %rax
testl %ecx, %ecx
jne 0x46b6c
movq 0x38(%r14), %rcx
testb $0x2, 0x10(%rcx)
je 0x46b6c
movq %rbx, 0x30(%rcx)
andl $0x0, 0x48(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movl (%rdi), %ecx
movl %edx, %edx
xorl %r8d, %r8d
movl $0x4, %r9d
xorl %eax, %eax
cmpq %rdx, %rax
jae 0x46cd3
cmpl $0x3, %ecx
ja 0x46cd3
movzbl (%rsi,%rax), %r10d
cmpl $0x2, %ecx
movl $0xff, %r11d
cmovbl %r8d, %r11d
movl %r9d, %ebx
subl %ecx, %ebx
incl %ecx
testl %r10d, %r10d
cmovnel %r8d, %ebx
cmpl %r10d, %r11d
cmovnel %ebx, %ecx
incq %rax
jmp 0x46c9e
movl %ecx, (%rdi)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x44ae0
testl %eax, %eax
je 0x46ce9
pushq $-0x2
popq %rax
jmp 0x46d01
movq 0x38(%rbx), %rcx
xorl %eax, %eax
cmpl $0x3f41, 0x8(%rcx)      # imm = 0x3F41
jne 0x46d01
xorl %eax, %eax
cmpl $0x0, 0x58(%rcx)
sete %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
callq 0x44ae0
testl %eax, %eax
je 0x46e5d
pushq $-0x2
jmp 0x46e6d
movq 0x38(%rbx), %rax
movl $0x1, 0x1be8(%rax)
pushq $-0x3
popq %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x44ae0
testl %eax, %eax
je 0x46e87
pushq $-0x2
popq %rax
jmp 0x46ea7
movq 0x38(%r14), %rax
movl 0x10(%rax), %ecx
testl %ebx, %ebx
je 0x46e9b
testl %ecx, %ecx
je 0x46ea0
orl $0x4, %ecx
jmp 0x46ea2
andl $-0x5, %ecx
jmp 0x46ea2
xorl %ecx, %ecx
movl %ecx, 0x10(%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x44ae0
movl %eax, %ecx
movq $-0x10000, %rax         # imm = 0xFFFF0000
testl %ecx, %ecx
jne 0x46efc
movq 0x38(%rbx), %rcx
movslq 0x1bec(%rcx), %rax
shlq $0x10, %rax
movl 0x8(%rcx), %esi
cmpl $0x3f4c, %esi           # imm = 0x3F4C
je 0x46eee
xorl %edx, %edx
cmpl $0x3f43, %esi           # imm = 0x3F43
jne 0x46ef7
movl 0x5c(%rcx), %edx
jmp 0x46ef7
movl 0x1bf0(%rcx), %edx
subl 0x5c(%rcx), %edx
movl %edx, %ecx
addq %rcx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x44ae0
testl %eax, %eax
je 0x46f10
pushq $-0x1
popq %rax
jmp 0x46f28
movq 0x38(%rbx), %rcx
movq 0x90(%rcx), %rax
subq %rcx, %rax
addq $-0x558, %rax           # imm = 0xFAA8
sarq $0x2, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x35
popq %rax
cmpq $0x153, %rax            # imm = 0x153
je 0x4738e
andw $0x0, (%rdi,%rax,4)
incq %rax
jmp 0x4737c
xorl %eax, %eax
cmpq $0x1e, %rax
je 0x473a4
andw $0x0, 0x9c8(%rdi,%rax,4)
incq %rax
jmp 0x47390
xorl %eax, %eax
cmpq $0x13, %rax
je 0x473ba
andw $0x0, 0xabc(%rdi,%rax,4)
incq %rax
jmp 0x473a6
movw $0x1, 0x4d4(%rdi)
andl $0x0, 0x170c(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x1718(%rdi)
andl $0x0, 0x1728(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/trees.c
// Function: tr_stored_block
void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf,
                                    ulg stored_len, int last) {
    send_bits(s, (STORED_BLOCK<<1) + last, 3);  /* send block type */
    bi_windup(s);        /* align on byte boundary */
    put_short(s, (ush)stored_len);
    put_short(s, (ush)~stored_len);
    if (stored_len)
        zmemcpy(s->pending_buf + s->pending, (Bytef *)buf, stored_len);
    s->pending += stored_len;
#ifdef ZLIB_DEBUG
    s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
    s->compressed_len += (stored_len + 4) << 3;
    s->bits_sent += 2*16;
    s->bits_sent += stored_len << 3;
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %ecx, %r8d
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl 0x1734(%rdi), %eax
cmpl $0xe, %eax
jl 0x47459
movzwl %r8w, %edx
movl %eax, %ecx
shll %cl, %r8d
orw 0x1730(%r14), %r8w
movw %r8w, 0x1730(%r14)
movq 0x10(%r14), %rax
movq 0x28(%r14), %rcx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x28(%r14)
movb %r8b, (%rax,%rcx)
movb 0x1731(%r14), %al
movq 0x10(%r14), %rcx
movq 0x28(%r14), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, 0x28(%r14)
movb %al, (%rcx,%rsi)
movl 0x1734(%r14), %eax
movb $0x10, %cl
subb %al, %cl
shrl %cl, %edx
movw %dx, 0x1730(%r14)
addl $-0xd, %eax
jmp 0x47469
movl %eax, %ecx
shll %cl, %r8d
orw %r8w, 0x1730(%r14)
addl $0x3, %eax
movl %eax, 0x1734(%r14)
movq %r14, %rdi
callq 0x474ed
movq 0x10(%r14), %rax
movq 0x28(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x28(%r14)
movb %bl, (%rax,%rcx)
movq 0x10(%r14), %rax
movq 0x28(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x28(%r14)
movb %bh, (%rax,%rcx)
movl %ebx, %eax
xorl $0xffff, %eax           # imm = 0xFFFF
movq 0x10(%r14), %rcx
movq 0x28(%r14), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x28(%r14)
movb %al, (%rcx,%rdx)
movq 0x10(%r14), %rcx
movq 0x28(%r14), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x28(%r14)
movb %ah, (%rcx,%rdx)
testq %rbx, %rbx
je 0x474e3
movq 0x10(%r14), %rdi
addq 0x28(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x42c0
addq %rbx, 0x28(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x47523
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 0x47536
testl %eax, %eax
jle 0x47546
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)
andw $0x0, 0x1730(%rdi)
andl $0x0, 0x1734(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x475a1
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)
andw $0x0, 0x1730(%rdi)
xorl %eax, %eax
jmp 0x475d6
cmpl $0x8, %eax
jl 0x475dc
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_O2/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 0x4848f
incl 0x1728(%rdi)
movl %edx, %ecx
leaq 0x12eea(%rip), %rdx     # 0x5b340
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 0x12cc1(%rip), %rax     # 0x5b140
movzbl (%rdx,%rax), %eax
leaq (%rdi,%rax,4), %rax
addq $0x9c8, %rax            # imm = 0x9C8
jmp 0x4849b
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_O2/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:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %eax
movl 0xbc0(%rdi,%rax,4), %eax
movslq %eax, %rcx
movslq %edx, %r8
addl %edx, %edx
cmpl 0x14b4(%rdi), %edx
jg 0x4854c
jge 0x484ff
movl %edx, %r10d
orl $0x1, %r10d
movslq %r10d, %r11
movslq 0xbc0(%rdi,%r11,4), %rbx
movslq %edx, %r9
movslq 0xbc0(%rdi,%r9,4), %r14
movzwl (%rsi,%r14,4), %ebp
cmpw %bp, (%rsi,%rbx,4)
jae 0x48537
movq %r11, %r9
movl %r10d, %edx
jmp 0x48502
movslq %edx, %r9
movl 0xbc0(%rdi,%r9,4), %r9d
movslq %r9d, %r10
movzwl (%rsi,%r10,4), %r11d
cmpw %r11w, (%rsi,%rcx,4)
jb 0x4854c
jne 0x4852d
movb 0x14bc(%rdi,%rcx), %r11b
cmpb 0x14bc(%rdi,%r10), %r11b
jbe 0x4854c
movl %r9d, 0xbc0(%rdi,%r8,4)
jmp 0x484c0
jne 0x48502
movb 0x14bc(%rdi,%rbx), %bl
cmpb 0x14bc(%rdi,%r14), %bl
jbe 0x484f7
jmp 0x48502
movl %eax, 0xbc0(%rdi,%r8,4)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movzwl 0x2(%rsi), %ecx
xorl %ebx, %ebx
testl %ecx, %ecx
movl $0x8a, %eax
movl $0x7, %ebp
cmovel %eax, %ebp
setne %bl
addl $0x3, %ebx
movslq %edx, %rdx
orw $-0x1, 0x6(%rsi,%rdx,4)
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
xorl %r8d, %r8d
movl $0x4, %r9d
movl $0x3, %r10d
movl %r11d, %r15d
xorl %r14d, %r14d
cmpq %rdx, %r8
jg 0x48631
movl %ecx, %r11d
movzwl 0x6(%rsi,%r8,4), %ecx
incq %r8
incl %r14d
cmpl %ebp, %r14d
jge 0x485c2
cmpl %ecx, %r11d
je 0x485a0
movl %r11d, %r12d
cmpl %ebx, %r14d
jge 0x485dd
addl 0xabc(%rdi,%r12,4), %r14d
movw %r14w, 0xabc(%rdi,%r12,4)
jmp 0x48612
testl %r11d, %r11d
je 0x485f9
cmpl %r15d, %r11d
je 0x485f0
incw 0xabc(%rdi,%r12,4)
incw 0xafc(%rdi)
jmp 0x48612
decl %r14d
cmpl $0x9, %r14d
ja 0x4860b
incw 0xb00(%rdi)
jmp 0x48612
incw 0xb04(%rdi)
xorl %ebp, %ebp
cmpl %ecx, %r11d
sete %bpl
movl %r9d, %ebx
subl %ebp, %ebx
xorl $0x7, %ebp
testl %ecx, %ecx
cmovel %eax, %ebp
cmovel %r10d, %ebx
jmp 0x4859a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 (%rdx), %r10
movq (%r8), %rax
movq %rdx, 0x20(%rsp)
andq $0x0, (%rdx)
movq %rsi, 0x10(%rsp)
movq %r8, 0x28(%rsp)
andq $0x0, (%r8)
movq %rdi, %r13
movq %rax, 0x40(%rsp)
movq %rax, 0x18(%rsp)
movq 0x20(%r13), %rax
movq 0x28(%r13), %r15
cmpq %rax, %r15
jne 0x4ccbb
andq $0x0, 0x28(%r13)
xorl %r15d, %r15d
movq %rax, %rcx
subq %r15, %rcx
leaq (%r15,%r10), %rsi
movq %r10, 0x30(%rsp)
cmpq %rcx, %r10
cmovaq %rax, %rsi
movl 0x8(%rsp), %r8d
movl $0x0, %eax
cmoval %eax, %r8d
movq %r13, %rdi
movq %r9, 0x38(%rsp)
movq %r9, %rdx
leaq 0x18(%rsp), %rcx
movq 0x80(%rsp), %r9
callq 0x4aae9
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rbx
movq 0x28(%rsp), %rax
addq %rbx, (%rax)
movq 0x28(%r13), %rbp
movq %rbp, %r14
subq %r15, %r14
movq %r13, %r12
movq 0x18(%r13), %rsi
addq %r15, %rsi
movq 0x10(%rsp), %rdi
movq %r14, %rdx
callq 0x42c0
movl 0xc(%rsp), %ecx
movq 0x20(%rsp), %rax
addq %r14, (%rax)
testl %ecx, %ecx
jne 0x4cd6c
cmpq %r15, %rbp
movq 0x38(%rsp), %r9
movq 0x40(%rsp), %rax
movq 0x30(%rsp), %r10
je 0x4cd6c
movq %r12, %r13
subq %r14, %r10
addq %r14, 0x10(%rsp)
subq %rbx, %rax
addq %rbx, %r9
testq %r10, %r10
jne 0x4cc9c
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_O2/sisong[P]ApkDiffPatch/lzma/C/LzmaDec.c
// Function: LzmaProps_Decode
SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size)
{
  UInt32 dicSize;
  Byte d;
  
  if (size < LZMA_PROPS_SIZE)
    return SZ_ERROR_UNSUPPORTED;
  else
    dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24);
 
  if (dicSize < LZMA_DIC_MIN)
    dicSize = LZMA_DIC_MIN;
  p->dicSize = dicSize;

  d = data[0];
  if (d >= (9 * 5 * 5))
    return SZ_ERROR_UNSUPPORTED;

  p->lc = (Byte)(d % 9);
  d /= 9;
  p->pb = (Byte)(d / 5);
  p->lp = (Byte)(d % 5);

  return SZ_OK;
}

// Assembly:
pushq $0x4
popq %rax
cmpl $0x5, %edx
jb 0x4ce12
movl 0x1(%rsi), %ecx
cmpl $0x1001, %ecx           # imm = 0x1001
movl $0x1000, %edx           # imm = 0x1000
cmovael %ecx, %edx
movl %edx, 0x4(%rdi)
movb (%rsi), %cl
cmpb $-0x20, %cl
ja 0x4ce12
movzbl %cl, %ecx
movb $0x9, %dl
movl %ecx, %eax
divb %dl
movl %eax, %edx
movzbl %ah, %eax
movb %al, (%rdi)
movb $0x2d, %sil
movl %ecx, %eax
divb %sil
movb %al, 0x2(%rdi)
movzbl %dl, %eax
movb $0x5, %cl
divb %cl
movzbl %ah, %eax
movb %al, 0x1(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdx, %rbx
movzbl 0x1(%rsi), %ecx
addl (%rsi), %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 0x4ce7a
xorl %eax, %eax
cmpl 0x60(%r14), %ebp
je 0x4cead
movq %rbx, %rdi
callq *0x8(%rbx)
andq $0x0, 0x8(%r14)
movl %ebp, %esi
addq %rsi, %rsi
movq %rbx, %rdi
callq *(%rbx)
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x4ceaa
addq $0xd00, %rax            # imm = 0xD00
movq %rax, 0x10(%r14)
movl %ebp, 0x60(%r14)
xorl %eax, %eax
jmp 0x4cead
pushq $0x2
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4cdc5
testl %eax, %eax
jne 0x4cf74
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4ce4c
testl %eax, %eax
jne 0x4cf74
movl 0xc(%rsp), %eax
cmpq $0x400000, %rax         # imm = 0x400000
movl $0xfffff, %ecx          # imm = 0xFFFFF
movl $0xfff, %edx            # imm = 0xFFF
cmovaeq %rcx, %rdx
cmpq $0x40000000, %rax       # imm = 0x40000000
movl $0x3fffff, %r15d        # imm = 0x3FFFFF
cmovbq %rdx, %r15
leaq (%r15,%rax), %rcx
notq %r15
andq %rcx, %r15
cmpq %rax, %r15
cmovbeq %rax, %r15
movq 0x18(%rbx), %rsi
testq %rsi, %rsi
je 0x4cf33
cmpq 0x20(%rbx), %r15
je 0x4cf51
movq %r14, %rdi
callq *0x8(%r14)
andq $0x0, 0x18(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq *(%r14)
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x4cf61
movq %r15, 0x20(%rbx)
movq 0x8(%rsp), %rax
movq %rax, (%rbx)
xorl %eax, %eax
jmp 0x4cf74
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq *0x8(%r14)
andq $0x0, 0x8(%rbx)
pushq $0x2
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/lzma/C/LzmaDec.c
// Function: LzmaDecode
SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
    const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
    ELzmaStatus *status, ISzAllocPtr alloc)
{
  CLzmaDec p;
  SRes res;
  SizeT outSize = *destLen, inSize = *srcLen;
  *destLen = *srcLen = 0;
  *status = LZMA_STATUS_NOT_SPECIFIED;
  if (inSize < RC_INIT_SIZE)
    return SZ_ERROR_INPUT_EOF;
  LzmaDec_CONSTRUCT(&p)
  RINOK(LzmaDec_AllocateProbs(&p, propData, propSize, alloc))
  p.dic = dest;
  p.dicBufSize = outSize;
  LzmaDec_Init(&p);
  *srcLen = inSize;
  res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status);
  *destLen = p.dicPos;
  if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT)
    res = SZ_ERROR_INPUT_EOF;
  LzmaDec_FreeProbs(&p, alloc);
  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq (%rsi), %rbp
movq (%rcx), %r13
andq $0x0, (%rcx)
movq 0xc8(%rsp), %rax
andq $0x0, (%rsi)
andl $0x0, (%rax)
cmpq $0x5, %r13
jae 0x4cfb7
pushq $0x6
popq %r14
jmp 0x4d064
movq %rcx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, (%rsp)
leaq 0x8(%rsp), %rdi
andq $0x0, 0x18(%rdi)
movq 0xd0(%rsp), %rcx
andq $0x0, 0x8(%rdi)
movq %r8, %rsi
movl %r9d, %edx
callq 0x4ce13
movl %eax, %r14d
testl %eax, %eax
jne 0x4d064
leaq 0x8(%rsp), %rdi
movq %rbx, 0x18(%rdi)
movq %rbp, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
andl $0x0, 0x64(%rdi)
andq $0x0, 0x40(%rdi)
movl 0xc0(%rsp), %r8d
movl $0x114, 0x5c(%rdi)      # imm = 0x114
movq %r13, (%r12)
movq %rdi, %r13
movq %rbp, %rsi
movq (%rsp), %rdx
movq %r12, %rcx
movq 0xc8(%rsp), %rbx
movq %rbx, %r9
callq 0x4aae9
movl %eax, %r14d
movq 0x28(%r13), %rax
movq %rax, (%r15)
testl %r14d, %r14d
jne 0x4d054
xorl %eax, %eax
cmpl $0x3, (%rbx)
pushq $0x6
popq %r14
cmovnel %eax, %r14d
movq 0x10(%rsp), %rsi
movq 0xd0(%rsp), %rdi
callq *0x8(%rdi)
movl %r14d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/lzma/C/Lzma2Dec.c
// Function: Lzma2Dec_GetOldProps
static SRes Lzma2Dec_GetOldProps(Byte prop, Byte *props)
{
  UInt32 dicSize;
  if (prop > 40)
    return SZ_ERROR_UNSUPPORTED;
  dicSize = (prop == 40) ? 0xFFFFFFFF : LZMA2_DIC_SIZE_FROM_PROP(prop);
  props[0] = (Byte)LZMA2_LCLP_MAX;
  props[1] = (Byte)(dicSize);
  props[2] = (Byte)(dicSize >> 8);
  props[3] = (Byte)(dicSize >> 16);
  props[4] = (Byte)(dicSize >> 24);
  return SZ_OK;
}

// Assembly:
cmpb $0x28, %dil
jbe 0x4d0c1
pushq $0x4
popq %rax
retq
jne 0x4d0c8
pushq $-0x1
popq %rax
jmp 0x4d0da
movl %edi, %eax
andl $0x1, %eax
orl $0x2, %eax
shrl %edi
addb $0xb, %dil
movl %edi, %ecx
shll %cl, %eax
movb $0x4, (%rsi)
movb %al, 0x1(%rsi)
movb %ah, 0x2(%rsi)
movl %eax, %ecx
shrl $0x10, %ecx
movb %cl, 0x3(%rsi)
shrl $0x18, %eax
movb %al, 0x4(%rsi)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/lzma/C/Lzma2Dec.c
// Function: Lzma2Dec_DecodeToBuf
SRes Lzma2Dec_DecodeToBuf(CLzma2Dec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status)
{
  SizeT outSize = *destLen, inSize = *srcLen;
  *srcLen = *destLen = 0;
  
  for (;;)
  {
    SizeT inCur = inSize, outCur, dicPos;
    ELzmaFinishMode curFinishMode;
    SRes res;
    
    if (p->decoder.dicPos == p->decoder.dicBufSize)
      p->decoder.dicPos = 0;
    dicPos = p->decoder.dicPos;
    curFinishMode = LZMA_FINISH_ANY;
    outCur = p->decoder.dicBufSize - dicPos;
    
    if (outCur >= outSize)
    {
      outCur = outSize;
      curFinishMode = finishMode;
    }

    res = Lzma2Dec_DecodeToDic(p, dicPos + outCur, src, &inCur, curFinishMode, status);
    
    src += inCur;
    inSize -= inCur;
    *srcLen += inCur;
    outCur = p->decoder.dicPos - dicPos;
    memcpy(dest, p->decoder.dic + dicPos, outCur);
    dest += outCur;
    outSize -= outCur;
    *destLen += outCur;
    if (res != 0)
      return res;
    if (outCur == 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 (%rdx), %r9
movq (%r8), %rax
movq %rdx, 0x20(%rsp)
andq $0x0, (%rdx)
movq %rsi, 0x10(%rsp)
movq %r8, 0x28(%rsp)
andq $0x0, (%r8)
movq %rdi, %r13
movq %rax, 0x40(%rsp)
movq %rax, 0x18(%rsp)
movq 0x30(%r13), %rsi
movq 0x38(%r13), %r15
cmpq %rsi, %r15
jne 0x4d79a
andq $0x0, 0x38(%r13)
xorl %r15d, %r15d
subq %r15, %rsi
cmpq %r9, %rsi
movq %r9, 0x30(%rsp)
cmovaeq %r9, %rsi
movl 0x8(%rsp), %r8d
movl $0x0, %eax
cmovbl %eax, %r8d
addq %r15, %rsi
movq %r13, %rdi
movq %rcx, 0x38(%rsp)
movq %rcx, %rdx
leaq 0x18(%rsp), %rcx
movq 0x80(%rsp), %r9
callq 0x4d145
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rbx
movq 0x28(%rsp), %rax
addq %rbx, (%rax)
movq 0x38(%r13), %rbp
movq %rbp, %r14
subq %r15, %r14
movq %r13, %r12
movq 0x28(%r13), %rsi
addq %r15, %rsi
movq 0x10(%rsp), %rdi
movq %r14, %rdx
callq 0x42c0
movl 0xc(%rsp), %edx
movq 0x20(%rsp), %rax
addq %r14, (%rax)
testl %edx, %edx
jne 0x4d847
cmpq %r15, %rbp
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %rax
movq 0x30(%rsp), %r9
je 0x4d847
movq %r12, %r13
subq %r14, %r9
addq %r14, 0x10(%rsp)
subq %rbx, %rax
addq %rbx, %rcx
testq %r9, %r9
jne 0x4d77b
movl %edx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/lzma/C/Lzma2Dec.c
// Function: Lzma2Decode
SRes Lzma2Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
    Byte prop, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAllocPtr alloc)
{
  CLzma2Dec p;
  SRes res;
  SizeT outSize = *destLen, inSize = *srcLen;
  *destLen = *srcLen = 0;
  *status = LZMA_STATUS_NOT_SPECIFIED;
  Lzma2Dec_CONSTRUCT(&p)
  RINOK(Lzma2Dec_AllocateProbs(&p, prop, alloc))
  p.decoder.dic = dest;
  p.decoder.dicBufSize = outSize;
  Lzma2Dec_Init(&p);
  *srcLen = inSize;
  res = Lzma2Dec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status);
  *destLen = p.decoder.dicPos;
  if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT)
    res = SZ_ERROR_INPUT_EOF;
  Lzma2Dec_FreeProbs(&p, alloc);
  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %r9d, 0x4(%rsp)
movq %rcx, %r12
movq %rdx, 0x10(%rsp)
movq %rsi, %r14
movq (%rsi), %rbx
movq (%rcx), %rax
movq %rax, 0x8(%rsp)
andq $0x0, (%rcx)
movq %rdi, %rbp
andq $0x0, (%rsi)
movq 0xe0(%rsp), %rax
andl $0x0, (%rax)
leaq 0x18(%rsp), %rdi
andq $0x0, 0x28(%rdi)
movq 0xe8(%rsp), %r13
andq $0x0, 0x18(%rdi)
movl %r8d, %esi
movq %r13, %rdx
callq 0x4d07c
movl %eax, %r15d
testl %eax, %eax
jne 0x4d935
leaq 0x28(%rsp), %rax
movq %rbp, 0x18(%rax)
movq %rax, %rbp
movq %rbx, 0x20(%rax)
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x4d12f
movq 0x8(%rsp), %rax
movq %rax, (%r12)
movq %r15, %rdi
movq %rbx, %rsi
movq 0x10(%rsp), %rdx
movq %r12, %rcx
movl 0x4(%rsp), %r8d
movq 0xe0(%rsp), %rbx
movq %rbx, %r9
callq 0x4d145
movq 0x38(%r15), %rcx
movq %rcx, (%r14)
testl %eax, %eax
je 0x4d91d
pushq $0x1
popq %r15
jmp 0x4d92a
xorl %eax, %eax
cmpl $0x3, (%rbx)
pushq $0x6
popq %r15
cmovnel %eax, %r15d
movq %rbp, %rdi
movq %r13, %rsi
callq 0x4cd7d
movl %r15d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/bitboard.cpp
// Function: bitboards::init()
void bitboards::init(){

  // std::cout << "Generating Bitboard Masks... \n";
    for(int i=0; i<numOfSq; i++)
    {
          squareBitMask[i] = (1ULL << i);
    }
    
    //diagonal and antiDiagonal bit masks
    for(int i=0; i<numOfSq; i++)
    {
        
        
        diagonalBitMask[i]  = diagMasks(i, 0) ;//& clearEdges;
        
       
        antiDiagonalBitMask[i] = antidiagMasks(i, 0);// & clearEdges;
        
        
    }
    
    for( int i = 0; i < numOfFile; i++)
    {
        fileBitMask[i] = fileA << i;
        clearFile[i] = ~fileBitMask[i];
    }
    
    for( int i = 0; i < numOfRank; i++)
    {
        rankBitMask[i] = rank1 << (8*i);
        clearRank[i] = ~rankBitMask[i];
    }
    // std::cout << "Generating Piece Attacks... \n";
     allPawnAttacks();
     allKingAttacks();
     allKnightAttacks();
     allBishopAttacks();
     allRookAttacks();
     allQueenAttacks();
     //std::cout << "Generating Magic Bishop Boards... \n";
     initMagicBishop();
     //std::cout << "Generating Magic Rook Boards... \n";
     initMagicRook();
     inBetweenBitMask();
     //std::cout << "Generating Bitboards Complete... \n";
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x95bd(%rip), %rax      # 0xbde0
xorl %ecx, %ecx
pushq $0x1
popq %rdx
cmpq $0x40, %rcx
je 0x2840
movq %rdx, %rsi
shlq %cl, %rsi
movq %rsi, (%rax)
incq %rcx
addq $0x8, %rax
jmp 0x2828
xorl %r14d, %r14d
leaq 0x9816(%rip), %r15      # 0xc060
leaq 0x9a0f(%rip), %r12      # 0xc260
xorl %ebx, %ebx
cmpq $0x40, %rbx
je 0x287c
movl %ebx, %edi
xorl %esi, %esi
callq 0x291f
movq %rax, (%r14,%r15)
movl %ebx, %edi
xorl %esi, %esi
callq 0x298c
movq %rax, (%r14,%r12)
incq %rbx
addq $0x8, %r14
jmp 0x2853
xorl %eax, %eax
movabsq $0x101010101010101, %rdx # imm = 0x101010101010101
leaq 0x9751(%rip), %rsi      # 0xbfe0
leaq 0x9bca(%rip), %rdi      # 0xc460
xorl %ecx, %ecx
cmpq $0x8, %rcx
je 0x28b8
movq %rdx, %r8
shlq %cl, %r8
movq %r8, (%rax,%rsi)
notq %r8
movq %r8, (%rax,%rdi)
incq %rcx
addq $0x8, %rax
jmp 0x2898
xorl %ecx, %ecx
leaq 0x975f(%rip), %rax      # 0xc020
leaq 0x9bd8(%rip), %rdx      # 0xc4a0
cmpq $0x40, %rcx
je 0x28e7
movl $0xff, %esi
shlq %cl, %rsi
movq %rsi, (%rcx,%rax)
notq %rsi
movq %rsi, (%rcx,%rdx)
addq $0x8, %rcx
jmp 0x28c8
callq 0x29f5
callq 0x2aa9
callq 0x2b4b
callq 0x2c20
callq 0x2c79
callq 0x2da4
callq 0x2dd6
callq 0x2f94
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3152
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/bitboard.cpp
// Function: diagMasks(int, unsigned long)
bitboard diagMasks (int sq, bitboard occupied){
    int iter = sq;
   bitboard bb = squareBitMask[sq];
    
    //Diagonal
    //north east
    bitboard diag = bb;
    while( (square_to_rank(square(iter)) < numOfRank-1) && (square_to_file(square(iter)) < numOfFile-1) )
    {
        
        iter += noEa;
        diag |= (diag << noEa);
        if( squareBitMask[iter] & occupied) break;
    }
    
    //south west
    iter = sq;
    while( (square_to_rank(square(iter)) >= 0) && (square_to_file(square(iter)) > 0) && iter >= 0 )
    {
        iter +=soWe;
        diag |= (diag >> -soWe);
        if( squareBitMask[iter] & occupied) break;
    }
    
    //diagonalBitMask[sq] = diag;
    
    return diag;
}

// Assembly:
movslq %edi, %rcx
leaq 0x94b7(%rip), %rdx      # 0xbde0
leaq (%rdx,%rcx,8), %r8
addq $0x48, %r8
movq -0x48(%r8), %rax
movl %edi, %r9d
notl %r9d
testb $0x38, %r9b
je 0x2967
movl %edi, %r9d
andl $0x7, %r9d
cmpl $0x7, %r9d
je 0x2967
movq %rax, %r9
shlq $0x9, %r9
orq %r9, %rax
addl $0x9, %edi
leaq 0x48(%r8), %r9
testq %rsi, (%r8)
movq %r9, %r8
je 0x2935
testq %rcx, %rcx
js 0x298b
movl %ecx, %edi
andl $0x7, %edi
je 0x298b
leaq -0x9(%rcx), %rdi
movq %rax, %r8
shrq $0x9, %r8
orq %r8, %rax
testq %rsi, -0x48(%rdx,%rcx,8)
movq %rdi, %rcx
je 0x2967
retq
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/bitboard.cpp
// Function: antidiagMasks(int, unsigned long)
bitboard antidiagMasks (int sq, bitboard occupied){
    
    bitboard antiDiag = squareBitMask[sq];
    int iter = sq;
    while( (square_to_rank(square(iter)) < numOfRank-1) && (square_to_file(square(iter)) > 0) )
    {
        iter += noWe;
        antiDiag |= (antiDiag << noWe);
        if( squareBitMask[iter] & occupied) break;
    }
    
    //south east
    iter = sq;
    while( (square_to_rank(square(iter)) >= 0) && (square_to_file(square(iter)) < numOfFile-1) )
    {
        iter += soEa;
        antiDiag |= (antiDiag >> -soEa);
        if( squareBitMask[iter] & occupied) break;
        
    }
    
    return antiDiag;
}

// Assembly:
movslq %edi, %rdx
leaq 0x944a(%rip), %rcx      # 0xbde0
leaq (%rcx,%rdx,8), %r8
addq $0x38, %r8
movq -0x38(%r8), %rax
movl %edi, %r9d
notl %r9d
testb $0x38, %r9b
je 0x29ea
movl %edi, %r9d
andl $0x7, %r9d
je 0x29ea
movq %rax, %r9
shlq $0x7, %r9
orq %r9, %rax
addl $0x7, %edi
leaq 0x38(%r8), %r9
testq %rsi, (%r8)
movq %r9, %r8
je 0x29a2
jmp 0x29ea
leaq -0x7(%rdx), %rdi
movq %rax, %r8
shrq $0x7, %r8
orq %r8, %rax
testq %rsi, -0x38(%rcx,%rdx,8)
movq %rdi, %rdx
jne 0x29f4
movl %edx, %edi
notl %edi
testb $0x7, %dil
jne 0x29d2
retq
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/bitboard.cpp
// Function: allPawnAttacks()
void allPawnAttacks(){
    bitboard pawnA = 0ULL, pawnH = 0ULL, pawnAttacks = 0ULL;
    square sq = a1;
    
    for(rank rk = rank_1; rk<numOfRank-1; rk++)
    {
        for(file f = file_a; f<numOfFile; f++)
        {
            sq = rankFile_to_sq(rk, f);
            pawnA = squareBitMask[sq] & clearFile[file_a];
            pawnH = squareBitMask[sq] & clearFile[file_h];
            
            pawnAttacks |= (pawnA << noWe);
            pawnAttacks |= (pawnH << noEa);
            
            //printBitboard(pawnAttacks);
            openBoardPawnAttacks[0][sq] = pawnAttacks;
            pawnAttacks = 0ULL;
        }
    }
    
    for(rank rk = rank_8; rk > rank_1; rk--)
    {
        for(file f = file_a; f<numOfFile; f++)
        {
            sq = rankFile_to_sq(rk, f);
            pawnA = squareBitMask[sq] & clearFile[file_a];
            pawnH = squareBitMask[sq] & clearFile[file_h];
            
            pawnAttacks |= (pawnA >> -soWe);
            pawnAttacks |= (pawnH >> -soEa);
            
            //printBitboard(pawnAttacks);
            openBoardPawnAttacks[1][sq] = pawnAttacks;
            pawnAttacks = 0ULL;
        }
    }
}

// Assembly:
pushq %rbx
movq 0x9a63(%rip), %rax      # 0xc460
movq 0x9a94(%rip), %rcx      # 0xc498
xorl %edx, %edx
leaq 0x93d3(%rip), %rsi      # 0xbde0
leaq 0xa6cc(%rip), %rdi      # 0xd0e0
xorl %r8d, %r8d
cmpq $0x7, %r8
je 0x2a55
xorl %r9d, %r9d
cmpq $0x40, %r9
je 0x2a4c
leaq (%rdx,%r9), %r10
movq (%rsi,%r10), %r11
movq %rax, %rbx
andq %r11, %rbx
andq %rcx, %r11
shlq $0x7, %rbx
shlq $0x9, %r11
orq %rbx, %r11
movq %r11, (%rdi,%r10)
addq $0x8, %r9
jmp 0x2a20
incq %r8
addq $0x40, %rdx
jmp 0x2a17
movabsq $0x7, %rdx
leaq 0x953a(%rip), %rsi      # 0xbfa0
leaq 0xaa33(%rip), %rdi      # 0xd4a0
subq $0x1, %rdx
jb 0x2aa7
xorl %r8d, %r8d
cmpq $0x8, %r8
je 0x2a9d
movq (%rsi,%r8,8), %r9
movq %rax, %r10
andq %r9, %r10
andq %rcx, %r9
shrq $0x9, %r10
shrq $0x7, %r9
orq %r10, %r9
movq %r9, (%rdi,%r8,8)
incq %r8
jmp 0x2a76
addq $-0x40, %rsi
addq $-0x40, %rdi
jmp 0x2a6d
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/bjohnsonfl[P]Overhead-Chess-Engine-/bitboard.cpp
// Function: allKingAttacks()
void allKingAttacks(){
    bitboard kingA = 0ULL, kingH = 0ULL, kingMoves = 0ULL, king = 0ULL;
    square sq = a1;
    for(rank rk = rank_1; rk<numOfRank; rk++)
    {
        for(file f = file_a; f<numOfFile; f++)
        {
            sq = rankFile_to_sq(rk, f);
            kingA = squareBitMask[sq] & clearFile[file_a];
            kingH = squareBitMask[sq] & clearFile[file_h];
            king  = squareBitMask[sq];
            
            kingMoves |= (kingA << noWe);
            kingMoves |= (king  << nort);
            kingMoves |= (kingH << noEa);
            kingMoves |= (kingH << east);
            kingMoves |= (kingH >> -soEa);
            kingMoves |= (king  >> -south);
            kingMoves |= (kingA >> -soWe);
            kingMoves |= (kingA >> -west);
            
           // printBitboard(kingMoves);
            openBoardAttacks[p_king][sq] = kingMoves;
            kingMoves = 0ULL;
        }
        
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x99a9(%rip), %rax      # 0xc460
leaq 0x9322(%rip), %rcx      # 0xbde0
leaq 0xa41b(%rip), %rdx      # 0xcee0
movq 0x99cc(%rip), %rsi      # 0xc498
xorl %edi, %edi
cmpq $0x8, %rdi
je 0x2b43
xorl %r8d, %r8d
cmpq $0x8, %r8
je 0x2b36
movq (%rcx,%r8,8), %r10
movq %rax, %r9
andq %r10, %r9
movq %rsi, %r11
andq %r10, %r11
movq %r9, %rbx
shlq $0x7, %rbx
movq %r10, %r14
shlq $0x8, %r14
movq %r11, %r15
shlq $0x9, %r15
leaq (%r11,%r11), %r12
orq %r15, %r12
shrq $0x7, %r11
orq %r12, %r11
shrq $0x8, %r10
orq %r14, %r10
orq %rbx, %r10
movq %r9, %rbx
shrq $0x9, %rbx
shrq %r9
orq %rbx, %r9
orq %r10, %r9
orq %r11, %r9
movq %r9, (%rdx,%r8,8)
incq %r8
jmp 0x2ad7
incq %rdi
addq $0x40, %rcx
addq $0x40, %rdx
jmp 0x2ace
popq %rbx
popq %r12
popq %r14
popq %r15
retq