// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_decode.c
// Function: cram_dependent_data_series
int cram_dependent_data_series(cram_fd *fd,
                               cram_block_compression_hdr *hdr,
                               cram_slice *s) {
    int *block_used;
    int core_used = 0;
    int i;
    static int i_to_id[] = {
        DS_BF, DS_AP, DS_FP, DS_RL, DS_DL, DS_NF, DS_BA, DS_QS,
        DS_FC, DS_FN, DS_BS, DS_IN, DS_RG, DS_MQ, DS_TL, DS_RN,
        DS_NS, DS_NP, DS_TS, DS_MF, DS_CF, DS_RI, DS_RS, DS_PD,
        DS_HC, DS_SC, DS_BB, DS_QQ,
    };
    uint32_t orig_ds;

    /*
     * Set the data_series bit field based on fd->required_fields
     * contents.
     */
    if (fd->required_fields && fd->required_fields != INT_MAX) {
        s->data_series = 0;

        if (fd->required_fields & SAM_QNAME)
            s->data_series |= CRAM_RN;

        if (fd->required_fields & SAM_FLAG)
            s->data_series |= CRAM_BF;

        if (fd->required_fields & SAM_RNAME)
            s->data_series |= CRAM_RI | CRAM_BF;

        if (fd->required_fields & SAM_POS)
            s->data_series |= CRAM_AP | CRAM_BF;

        if (fd->required_fields & SAM_MAPQ)
            s->data_series |= CRAM_MQ;

        if (fd->required_fields & SAM_CIGAR)
            s->data_series |= CRAM_CIGAR;

        if (fd->required_fields & SAM_RNEXT)
            s->data_series |= CRAM_CF | CRAM_NF | CRAM_RI | CRAM_NS |CRAM_BF;

        if (fd->required_fields & SAM_PNEXT)
            s->data_series |= CRAM_CF | CRAM_NF | CRAM_AP | CRAM_NP | CRAM_BF;

        if (fd->required_fields & SAM_TLEN)
            s->data_series |= CRAM_CF | CRAM_NF | CRAM_AP | CRAM_TS |
                CRAM_BF | CRAM_MF | CRAM_RI | CRAM_CIGAR;

        if (fd->required_fields & SAM_SEQ)
            s->data_series |= CRAM_SEQ;

        if (!(fd->required_fields & SAM_AUX))
            // No easy way to get MD/NM without other tags at present
            s->decode_md = 0;

        if (fd->required_fields & SAM_QUAL)
            s->data_series |= CRAM_QUAL;

        if (fd->required_fields & SAM_AUX)
            s->data_series |= CRAM_RG | CRAM_TL | CRAM_aux;

        if (fd->required_fields & SAM_RGAUX)
            s->data_series |= CRAM_RG | CRAM_BF;

        // Always uncompress CORE block
        if (cram_uncompress_block(s->block[0]))
            return -1;
    } else {
        s->data_series = CRAM_ALL;

        for (i = 0; i < s->hdr->num_blocks; i++) {
            if (cram_uncompress_block(s->block[i]))
                return -1;
        }

        return 0;
    }

    block_used = calloc(s->hdr->num_blocks+1, sizeof(int));
    if (!block_used)
        return -1;

    do {
        /*
         * Also set data_series based on code prerequisites. Eg if we need
         * CRAM_QS then we also need to know CRAM_RL so we know how long it
         * is, or if we need FC/FP then we also need FN (number of features).
         *
         * It's not reciprocal though. We may be needing to decode FN
         * but have no need to decode FC, FP and cigar ops.
         */
        if (s->data_series & CRAM_RS)    s->data_series |= CRAM_FC|CRAM_FP;
        if (s->data_series & CRAM_PD)    s->data_series |= CRAM_FC|CRAM_FP;
        if (s->data_series & CRAM_HC)    s->data_series |= CRAM_FC|CRAM_FP;
        if (s->data_series & CRAM_QS)    s->data_series |= CRAM_FC|CRAM_FP;
        if (s->data_series & CRAM_IN)    s->data_series |= CRAM_FC|CRAM_FP;
        if (s->data_series & CRAM_SC)    s->data_series |= CRAM_FC|CRAM_FP;
        if (s->data_series & CRAM_BS)    s->data_series |= CRAM_FC|CRAM_FP;
        if (s->data_series & CRAM_DL)    s->data_series |= CRAM_FC|CRAM_FP;
        if (s->data_series & CRAM_BA)    s->data_series |= CRAM_FC|CRAM_FP;
        if (s->data_series & CRAM_BB)    s->data_series |= CRAM_FC|CRAM_FP;
        if (s->data_series & CRAM_QQ)    s->data_series |= CRAM_FC|CRAM_FP;

        // cram_decode_seq() needs seq[] array
        if (s->data_series & (CRAM_SEQ|CRAM_CIGAR)) s->data_series |= CRAM_RL;

        if (s->data_series & CRAM_FP)    s->data_series |= CRAM_FC;
        if (s->data_series & CRAM_FC)    s->data_series |= CRAM_FN;
        if (s->data_series & CRAM_aux)   s->data_series |= CRAM_TL;
        if (s->data_series & CRAM_MF)    s->data_series |= CRAM_CF;
        if (s->data_series & CRAM_MQ)    s->data_series |= CRAM_BF;
        if (s->data_series & CRAM_BS)    s->data_series |= CRAM_RI;
        if (s->data_series & (CRAM_MF |CRAM_NS |CRAM_NP |CRAM_TS |CRAM_NF))
            s->data_series |= CRAM_CF;
        if (!hdr->read_names_included && s->data_series & CRAM_RN)
            s->data_series |= CRAM_CF | CRAM_NF;
        if (s->data_series & (CRAM_BA | CRAM_QS | CRAM_BB | CRAM_QQ))
            s->data_series |= CRAM_BF | CRAM_CF | CRAM_RL;
        if (s->data_series & CRAM_FN) {
            // The CRAM_FN loop checks for reference length boundaries,
            // which needs a working seq_pos.  Some fields are fixed size
            // irrespective of if we decode (BS), but others need to know
            // the size of the string fetched back (SC, IN, BB).
            s->data_series |= CRAM_SC | CRAM_IN | CRAM_BB;
        }

        orig_ds = s->data_series;

        // Find which blocks are in use.
        for (i = 0; i < sizeof(i_to_id)/sizeof(*i_to_id); i++) {
            int bnum1, bnum2, j;
            cram_codec *c = hdr->codecs[i_to_id[i]];

            if (!(s->data_series & (1<<i)))
                continue;

            if (!c)
                continue;

            bnum1 = cram_codec_to_id(c, &bnum2);

            for (;;) {
                switch (bnum1) {
                case -2:
                    break;

                case -1:
                    core_used = 1;
                    break;

                default:
                    for (j = 0; j < s->hdr->num_blocks; j++) {
                        if (s->block[j]->content_type == EXTERNAL &&
                            s->block[j]->content_id == bnum1) {
                            block_used[j] = 1;
                            if (cram_uncompress_block(s->block[j])) {
                                free(block_used);
                                return -1;
                            }
                        }
                    }
                    break;
                }

                if (bnum2 == -2 || bnum1 == bnum2)
                    break;

                bnum1 = bnum2; // 2nd pass
            }
        }

        // Tags too
        if ((fd->required_fields & SAM_AUX) ||
            (s->data_series & CRAM_aux)) {
            for (i = 0; i < CRAM_MAP_HASH; i++) {
                int bnum1, bnum2, j;
                cram_map *m = hdr->tag_encoding_map[i];

                while (m) {
                    cram_codec *c = m->codec;
                    if (!c) {
                        m = m->next;
                        continue;
                    }

                    bnum1 = cram_codec_to_id(c, &bnum2);

                    for (;;) {
                        switch (bnum1) {
                        case -2:
                            break;

                        case -1:
                            core_used = 1;
                            break;

                        default:
                            for (j = 0; j < s->hdr->num_blocks; j++) {
                                if (s->block[j]->content_type == EXTERNAL &&
                                    s->block[j]->content_id == bnum1) {
                                    block_used[j] = 1;
                                    if (cram_uncompress_block(s->block[j])) {
                                        free(block_used);
                                        return -1;
                                    }
                                }
                            }
                            break;
                        }

                        if (bnum2 == -2 || bnum1 == bnum2)
                            break;

                        bnum1 = bnum2; // 2nd pass
                    }

                    m = m->next;
                }
            }
        }

        // We now know which blocks are in used, so repeat and find
        // which other data series need to be added.
        for (i = 0; i < sizeof(i_to_id)/sizeof(*i_to_id); i++) {
            int bnum1, bnum2, j;
            cram_codec *c = hdr->codecs[i_to_id[i]];

            if (!c)
                continue;

            bnum1 = cram_codec_to_id(c, &bnum2);

            for (;;) {
                switch (bnum1) {
                case -2:
                    break;

                case -1:
                    if (core_used) {
                        //printf(" + data series %08x:\n", 1<<i);
                        s->data_series |= 1<<i;
                    }
                    break;

                default:
                    for (j = 0; j < s->hdr->num_blocks; j++) {
                        if (s->block[j]->content_type == EXTERNAL &&
                            s->block[j]->content_id == bnum1) {
                            if (block_used[j]) {
                                //printf(" + data series %08x:\n", 1<<i);
                                s->data_series |= 1<<i;
                            }
                        }
                    }
                    break;
                }

                if (bnum2 == -2 || bnum1 == bnum2)
                    break;

                bnum1 = bnum2; // 2nd pass
            }
        }

        // Tags too
        for (i = 0; i < CRAM_MAP_HASH; i++) {
            int bnum1, bnum2, j;
            cram_map *m = hdr->tag_encoding_map[i];

            while (m) {
                cram_codec *c = m->codec;
                if (!c) {
                    m = m->next;
                    continue;
                }

                bnum1 = cram_codec_to_id(c, &bnum2);

                for (;;) {
                    switch (bnum1) {
                    case -2:
                        break;

                    case -1:
                        //printf(" + data series %08x:\n", CRAM_aux);
                        s->data_series |= CRAM_aux;
                        break;

                    default:
                        for (j = 0; j < s->hdr->num_blocks; j++) {
                            if (s->block[j]->content_type == EXTERNAL &&
                                s->block[j]->content_id == bnum1) {
                                if (block_used[j]) {
                                    //printf(" + data series %08x:\n",
                                    //       CRAM_aux);
                                    s->data_series |= CRAM_aux;
                                }
                            }
                        }
                        break;
                    }

                    if (bnum2 == -2 || bnum1 == bnum2)
                        break;

                    bnum1 = bnum2; // 2nd pass
                }

                m = m->next;
            }
        }
    } while (orig_ds != s->data_series);

    free(block_used);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, 0x8(%rsp)
movl 0x24c(%rdi), %eax
testl %eax, %eax
je 0x39916
cmpl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
jne 0x39957
movl $0x7fffffff, 0xd8(%rbx) # imm = 0x7FFFFFFF
movq (%rbx), %rax
cmpl $0x0, 0x28(%rax)
jle 0x39950
xorl %r14d, %r14d
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x4f84e
testl %eax, %eax
jne 0x39f9c
incq %r14
movq (%rbx), %rax
movslq 0x28(%rax), %rax
cmpq %rax, %r14
jl 0x3992c
xorl %ebp, %ebp
jmp 0x39fa1
movq %rdi, %r14
shll $0xf, %eax
movzwl %ax, %ecx
movl %ecx, 0xd8(%rbx)
movl 0x24c(%rdi), %eax
testb $0x2, %al
je 0x39979
orl $0x1, %ecx
movl %ecx, 0xd8(%rbx)
testb $0x4, %al
je 0x39987
orl $0x200001, 0xd8(%rbx)   # imm = 0x200001
testb $0x8, %al
je 0x39992
orb $0x3, 0xd8(%rbx)
testb $0x10, %al
je 0x3999d
orb $0x20, 0xd9(%rbx)
testb $0x20, %al
je 0x399ab
orl $0x3c00b1d, 0xd8(%rbx)  # imm = 0x3C00B1D
testb $0x40, %al
je 0x399b9
orl $0x310021, 0xd8(%rbx)   # imm = 0x310021
testb %al, %al
jns 0x399c7
orl $0x120023, 0xd8(%rbx)   # imm = 0x120023
btl $0x8, %eax
jae 0x399d7
orl $0x3fc0b3f, 0xd8(%rbx)  # imm = 0x3FC0B3F
btl $0x9, %eax
jae 0x399e7
orl $0x7c00f5f, 0xd8(%rbx)  # imm = 0x7C00F5F
btl $0xb, %eax
jb 0x399f7
movl $0x0, 0xdc(%rbx)
btl $0xa, %eax
jae 0x39a07
orl $0x13c00b9f, 0xd8(%rbx) # imm = 0x13C00B9F
btl $0xb, %eax
jae 0x39a17
orl $0x40005000, 0xd8(%rbx) # imm = 0x40005000
btl $0xc, %eax
jae 0x39a27
orl $0x1001, 0xd8(%rbx)     # imm = 0x1001
movq 0x10(%rbx), %rax
movq (%rax), %rdi
callq 0x4f84e
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x39fa1
movq (%rbx), %rax
movslq 0x28(%rax), %rdi
incq %rdi
movl $0x4, %esi
callq 0x4300
testq %rax, %rax
je 0x39fa1
movq %rax, %r12
movq %r14, 0x18(%rsp)
xorl %r15d, %r15d
leaq 0x4(%rsp), %rbp
movl 0xd8(%rbx), %eax
btl $0x16, %eax
jae 0x39a84
orl $0x104, %eax            # imm = 0x104
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
btl $0x17, %eax
jae 0x39a9b
orl $0x104, %eax            # imm = 0x104
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
btl $0x18, %eax
jae 0x39ab2
orl $0x104, %eax            # imm = 0x104
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
testb %al, %al
jns 0x39ac7
orl $0x104, %eax            # imm = 0x104
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
btl $0xb, %eax
jae 0x39ade
orl $0x104, %eax            # imm = 0x104
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
btl $0x19, %eax
jae 0x39af5
orl $0x104, %eax            # imm = 0x104
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
btl $0xa, %eax
jae 0x39b0c
orl $0x104, %eax            # imm = 0x104
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
testb $0x10, %al
je 0x39b21
orl $0x104, %eax            # imm = 0x104
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
testb $0x40, %al
je 0x39b36
orl $0x104, %eax            # imm = 0x104
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
btl $0x1a, %eax
jae 0x39b4d
orl $0x104, %eax            # imm = 0x104
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
btl $0x1c, %eax
jae 0x39b64
orl $0x104, %eax            # imm = 0x104
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
testl $0x7c00f5f, %eax        # imm = 0x7C00F5F
je 0x39b7a
orl $0x8, %eax
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
testb $0x4, %al
je 0x39b8f
orl $0x100, %eax            # imm = 0x100
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
btl $0x8, %eax
jae 0x39ba6
orl $0x200, %eax            # imm = 0x200
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
btl $0x1e, %eax
jae 0x39bbd
orl $0x4000, %eax           # imm = 0x4000
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
btl $0x13, %eax
jae 0x39bd4
orl $0x100000, %eax         # imm = 0x100000
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
btl $0xd, %eax
jae 0x39be9
orl $0x1, %eax
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
btl $0xa, %eax
jae 0x39c00
orl $0x200000, %eax         # imm = 0x200000
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
testl $0xf0020, %eax          # imm = 0xF0020
je 0x39c18
orl $0x100000, %eax         # imm = 0x100000
movl %eax, 0xd8(%rbx)
movq 0x8(%rsp), %rax
cmpl $0x0, 0x28(%rax)
jne 0x39c39
movl 0xd8(%rbx), %eax
testw %ax, %ax
jns 0x39c39
orl $0x100020, %eax         # imm = 0x100020
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
testl $0x140000c0, %eax       # imm = 0x140000C0
je 0x39c51
orl $0x100009, %eax         # imm = 0x100009
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
btl $0x9, %eax
jae 0x39c68
orl $0x6000800, %eax        # imm = 0x6000800
movl %eax, 0xd8(%rbx)
movl 0xd8(%rbx), %eax
movl %eax, 0x14(%rsp)
xorl %r14d, %r14d
movl 0xd8(%rbx), %eax
btl %r14d, %eax
movl $0x9, %eax
jae 0x39d22
leaq 0x623cf(%rip), %rcx     # 0x9c060
movslq (%rcx,%r14,4), %rcx
movq 0x8(%rsp), %rdx
movq 0x280(%rdx,%rcx,8), %rdi
testq %rdi, %rdi
je 0x39d22
movq %rbp, %rsi
callq 0x95214
movl %eax, %ebp
cmpl $-0x2, %ebp
je 0x39d02
cmpl $-0x1, %ebp
jne 0x39cc3
movl $0x1, %r15d
jmp 0x39d02
movq (%rbx), %rax
cmpl $0x0, 0x28(%rax)
jle 0x39d02
xorl %r13d, %r13d
movq 0x10(%rbx), %rax
movq (%rax,%r13,8), %rdi
cmpl $0x4, 0x8(%rdi)
jne 0x39cf3
cmpl %ebp, 0xc(%rdi)
jne 0x39cf3
movl $0x1, (%r12,%r13,4)
callq 0x4f84e
testl %eax, %eax
jne 0x39d15
incq %r13
movq (%rbx), %rax
movslq 0x28(%rax), %rax
cmpq %rax, %r13
jl 0x39ccf
movl 0x4(%rsp), %ecx
xorl %eax, %eax
cmpl $-0x2, %ecx
je 0x39d22
cmpl %ecx, %ebp
movl %ecx, %ebp
jne 0x39cb1
jmp 0x39d22
movq %r12, %rdi
callq 0x45c0
movl $0x1, %eax
cmpl $0x9, %eax
je 0x39d2f
testl %eax, %eax
jne 0x39f9c
incq %r14
cmpq $0x1c, %r14
leaq 0x4(%rsp), %rbp
jne 0x39c75
movq 0x18(%rsp), %rax
testb $0x8, 0x24d(%rax)
jne 0x39d5c
testb $0x40, 0xdb(%rbx)
je 0x39e48
xorl %ecx, %ecx
movq 0x8(%rsp), %rax
movq %rcx, 0x20(%rsp)
movq 0x180(%rax,%rcx,8), %r13
testq %r13, %r13
je 0x39e2c
movq 0x10(%r13), %rdi
testq %rdi, %rdi
je 0x39df4
movq %rbp, %rsi
callq 0x95214
movl %eax, %ebp
cmpl $-0x2, %ebp
je 0x39ddd
cmpl $-0x1, %ebp
jne 0x39d9e
movl $0x1, %r15d
jmp 0x39ddd
movq (%rbx), %rax
cmpl $0x0, 0x28(%rax)
jle 0x39ddd
xorl %r14d, %r14d
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
cmpl $0x4, 0x8(%rdi)
jne 0x39dce
cmpl %ebp, 0xc(%rdi)
jne 0x39dce
movl $0x1, (%r12,%r14,4)
callq 0x4f84e
testl %eax, %eax
jne 0x39dff
incq %r14
movq (%rbx), %rax
movslq 0x28(%rax), %rax
cmpq %rax, %r14
jl 0x39daa
movl 0x4(%rsp), %eax
cmpl $-0x2, %eax
je 0x39dec
cmpl %eax, %ebp
movl %eax, %ebp
jne 0x39d8c
movq 0x18(%r13), %r13
xorl %eax, %eax
jmp 0x39e0c
movq 0x18(%r13), %r13
movl $0x13, %eax
jmp 0x39e11
movq %r12, %rdi
callq 0x45c0
movl $0x1, %eax
leaq 0x4(%rsp), %rbp
cmpl $0x13, %eax
je 0x39e1a
testl %eax, %eax
jne 0x39e25
testq %r13, %r13
jne 0x39d79
xorl %eax, %eax
testl %eax, %eax
sete %al
jmp 0x39e2e
movb $0x1, %al
testb %al, %al
movq 0x20(%rsp), %rcx
je 0x39f9c
incq %rcx
cmpq $0x20, %rcx
jne 0x39d5e
xorl %ebp, %ebp
leaq 0x6220f(%rip), %rax     # 0x9c060
movslq (%rax,%rbp,4), %rax
movq 0x8(%rsp), %rcx
movq 0x280(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x39ed9
leaq 0x4(%rsp), %rsi
callq 0x95214
movl 0x4(%rsp), %edx
movl $0x1, %esi
movl %ebp, %ecx
shll %cl, %esi
cmpl $-0x2, %eax
je 0x39ece
cmpl $-0x1, %eax
jne 0x39e95
testl %r15d, %r15d
je 0x39ece
orl %esi, 0xd8(%rbx)
jmp 0x39ece
movq (%rbx), %rcx
movslq 0x28(%rcx), %rcx
testq %rcx, %rcx
jle 0x39ece
movq 0x10(%rbx), %rdi
xorl %r8d, %r8d
movq (%rdi,%r8,8), %r9
cmpl $0x4, 0x8(%r9)
jne 0x39ec6
cmpl %eax, 0xc(%r9)
jne 0x39ec6
cmpl $0x0, (%r12,%r8,4)
je 0x39ec6
orl %esi, 0xd8(%rbx)
incq %r8
cmpq %r8, %rcx
jne 0x39ea8
cmpl $-0x2, %edx
je 0x39ed9
cmpl %edx, %eax
movl %edx, %eax
jne 0x39e7e
incq %rbp
cmpq $0x1c, %rbp
jne 0x39e4a
xorl %r14d, %r14d
leaq 0x4(%rsp), %rbp
movq 0x8(%rsp), %rax
movq 0x180(%rax,%r14,8), %r13
testq %r13, %r13
je 0x39f72
movq 0x10(%r13), %rdi
testq %rdi, %rdi
je 0x39f6c
movq %rbp, %rsi
callq 0x95214
movl 0x4(%rsp), %ecx
cmpl $-0x2, %eax
je 0x39f61
cmpl $-0x1, %eax
jne 0x39f28
orb $0x40, 0xdb(%rbx)
jmp 0x39f61
movq (%rbx), %rdx
movslq 0x28(%rdx), %rdx
testq %rdx, %rdx
jle 0x39f61
movq 0x10(%rbx), %rsi
xorl %edi, %edi
movq (%rsi,%rdi,8), %r8
cmpl $0x4, 0x8(%r8)
jne 0x39f59
cmpl %eax, 0xc(%r8)
jne 0x39f59
cmpl $0x0, (%r12,%rdi,4)
je 0x39f59
orb $0x40, 0xdb(%rbx)
incq %rdi
cmpq %rdi, %rdx
jne 0x39f3a
cmpl $-0x2, %ecx
je 0x39f6c
cmpl %ecx, %eax
movl %ecx, %eax
jne 0x39f15
movq 0x18(%r13), %r13
jmp 0x39efb
incq %r14
cmpq $0x20, %r14
jne 0x39eee
movl 0x14(%rsp), %eax
cmpl 0xd8(%rbx), %eax
jne 0x39a6d
movq %r12, %rdi
callq 0x45c0
jmp 0x39950
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq