// File: /workspace/github_c_makefile_star2_O3/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
movl 0x24c(%rdi), %eax
testl %eax, %eax
je 0x383ba
cmpl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
jne 0x383fb
movl $0x7fffffff, 0xd8(%rbx) # imm = 0x7FFFFFFF
movq (%rbx), %rax
cmpl $0x0, 0x28(%rax)
jle 0x383f4
xorl %r14d, %r14d
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x4ced7
testl %eax, %eax
jne 0x38a11
incq %r14
movq (%rbx), %rax
movslq 0x28(%rax), %rax
cmpq %rax, %r14
jl 0x383d0
xorl %ebp, %ebp
jmp 0x38a16
movq %rsi, %r14
movq %rdi, %r15
shll $0xf, %eax
movzwl %ax, %edx
movl %edx, 0xd8(%rbx)
movl 0x24c(%rdi), %eax
movl %eax, %edi
shrl %edi
andl $0x1, %edi
movl %eax, %esi
andl $0x10, %esi
shll $0x9, %esi
movd %eax, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa 0x60ced(%rip), %xmm1    # 0x99120
pand %xmm0, %xmm1
pand 0x60cf1(%rip), %xmm0    # 0x99130
pxor %xmm2, %xmm2
pcmpeqd %xmm2, %xmm0
pcmpeqd %xmm2, %xmm1
packssdw %xmm0, %xmm1
packsswb %xmm1, %xmm1
pmovmskb %xmm1, %ecx
testb $-0x80, %cl
movl $0x200001, %r8d         # imm = 0x200001
cmovnel %edi, %r8d
orl %edx, %r8d
movl %r8d, %edx
orl $0x3, %edx
testb $0x40, %cl
cmovnel %r8d, %edx
orl %esi, %edx
movl %edx, %esi
orl $0x3c00b1d, %esi        # imm = 0x3C00B1D
testb $0x20, %cl
cmovnel %edx, %esi
movl %esi, %edx
orl $0x310021, %edx         # imm = 0x310021
testb $0x10, %cl
cmovnel %esi, %edx
movl %edx, %esi
orl $0x120023, %esi         # imm = 0x120023
testb $0x8, %cl
cmovnel %edx, %esi
movl %esi, %edi
orl $0x3fc0b3f, %edi        # imm = 0x3FC0B3F
testb $0x4, %cl
cmovnel %esi, %edi
movl %edi, %edx
orl $0x7c00f5f, %edx        # imm = 0x7C00F5F
testb $0x2, %cl
cmovnel %edi, %edx
testb $0x1, %cl
jne 0x384c7
movl %edx, 0xd8(%rbx)
btl $0xb, %eax
jb 0x384d7
movl $0x0, 0xdc(%rbx)
testl $0x1c00, %eax           # imm = 0x1C00
je 0x38511
movl %edx, %ecx
orl $0x13c00b9f, %ecx       # imm = 0x13C00B9F
btl $0xa, %eax
cmovael %edx, %ecx
movl %ecx, %edx
orl $0x40005000, %edx       # imm = 0x40005000
btl $0xb, %eax
cmovael %ecx, %edx
movl %edx, %ecx
orl $0x1001, %ecx           # imm = 0x1001
btl $0xc, %eax
cmovael %edx, %ecx
movl %ecx, 0xd8(%rbx)
movq 0x10(%rbx), %rax
movq (%rax), %rdi
callq 0x4ced7
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x38a16
movq (%rbx), %rax
movslq 0x28(%rax), %rdi
incq %rdi
movl $0x4, %esi
callq 0x4300
testq %rax, %rax
je 0x38a16
movq %rax, %r12
movq %r15, 0x18(%rsp)
movq %r14, 0x20(%rsp)
movl 0xd8(%rbx), %r11d
movq $0x0, 0x8(%rsp)
movl $0x104, %ecx            # imm = 0x104
movl $0x400, %r10d           # imm = 0x400
movl %r11d, %edx
andl $0x400000, %edx         # imm = 0x400000
movl %r11d, %eax
orl %ecx, %eax
testl %edx, %edx
cmovnel %eax, %r11d
movl %r11d, %ecx
andl $0x800000, %ecx         # imm = 0x800000
movl %ecx, 0x4(%rsp)
cmovnel %eax, %r11d
movl %r11d, %esi
andl $0x1000000, %esi        # imm = 0x1000000
cmovnel %eax, %r11d
movl $0x104, %r15d           # imm = 0x104
movl %r11d, %edi
andl $0x80, %edi
movl %r11d, %eax
orl %r15d, %eax
testl %edi, %edi
cmovnel %eax, %r11d
movl %r11d, %r8d
andl $0x800, %r8d            # imm = 0x800
cmovnel %eax, %r11d
movl %r11d, %r9d
andl $0x2000000, %r9d        # imm = 0x2000000
cmovnel %eax, %r11d
movl %r11d, %r14d
andl %r10d, %r14d
movl %r11d, %eax
orl %r15d, %eax
testl %r14d, %r14d
cmovnel %eax, %r11d
movl %r11d, %ecx
andl $0x10, %ecx
cmovnel %eax, %r11d
movl %r11d, %r13d
andl $0x40, %r13d
cmovnel %eax, %r11d
movl %r11d, %ebp
andl $0x4000000, %ebp        # imm = 0x4000000
movl %r11d, %r10d
orl %r15d, %r10d
testl %ebp, %ebp
cmovnel %r10d, %r11d
movl %r11d, %eax
andl $0x10000000, %eax       # imm = 0x10000000
cmovnel %r10d, %r11d
movl %r11d, %r15d
andl $0x7c00f5f, %r15d       # imm = 0x7C00F5F
movl %r11d, %r10d
orl $0x8, %r10d
testl %r15d, %r15d
cmovel %r11d, %r10d
orl %r14d, %ecx
orl %r13d, %ecx
orl %ebp, %ecx
movl %r10d, %r11d
andl $0x4, %r11d
orl %eax, %ecx
orl %r15d, %ecx
orl %r11d, %ecx
movl %r11d, %eax
shll $0x6, %eax
orl %r10d, %eax
movl %r10d, %r11d
andl $0x40000000, %r11d      # imm = 0x40000000
orl %r11d, %ecx
shrl $0x10, %r11d
movl %eax, %r14d
andl $0x80100, %r14d         # imm = 0x80100
leal (%r11,%r14,2), %r11d
addl 0x4(%rsp), %r14d
orl %edx, %r14d
orl %esi, %r14d
orl %edi, %r14d
orl %r8d, %r14d
orl %r9d, %r14d
movl %r10d, %edx
andl $0x2000, %edx           # imm = 0x2000
orl %edx, %ecx
shrl $0xd, %edx
orl %r11d, %edx
movl $0x400, %esi            # imm = 0x400
andl %esi, %r10d
orl %r10d, %ecx
shll $0xb, %r10d
orl %edx, %r10d
orl %eax, %r10d
orl %r14d, %ecx
movl %r10d, %edx
andl $0xf0020, %edx          # imm = 0xF0020
movl %r10d, %eax
orl $0x100000, %eax         # imm = 0x100000
testl %edx, %edx
cmovel %r10d, %eax
orl %ecx, %edx
je 0x386d6
movl %eax, 0xd8(%rbx)
movq 0x20(%rsp), %rbp
cmpl $0x0, 0x28(%rbp)
sete %dl
testw %ax, %ax
sets %sil
movl %eax, %ecx
orl $0x100020, %ecx         # imm = 0x100020
testb %sil, %dl
cmovel %eax, %ecx
movl %ecx, %eax
andl $0x140000c0, %eax       # imm = 0x140000C0
movl %ecx, %edi
orl $0x100009, %edi         # imm = 0x100009
testl %eax, %eax
cmovel %ecx, %edi
movl %edi, %ecx
andl $0x200, %ecx            # imm = 0x200
movl %edi, %r8d
orl $0x6000800, %r8d        # imm = 0x6000800
testl %ecx, %ecx
cmovel %edi, %r8d
testb %sil, %dl
jne 0x3872e
orl %ecx, %eax
testl %eax, %eax
je 0x38735
movl %r8d, 0xd8(%rbx)
movl %r8d, 0x4(%rsp)
xorl %r14d, %r14d
movl 0xd8(%rbx), %eax
btl %r14d, %eax
jae 0x387dc
leaq 0x6093c(%rip), %rax     # 0x99090
movslq (%rax,%r14,4), %rax
movq 0x280(%rbp,%rax,8), %rdi
testq %rdi, %rdi
je 0x387dc
movq %rsp, %rsi
callq 0x928be
movl %eax, %r13d
cmpl $-0x2, %r13d
je 0x387cc
cmpl $-0x1, %r13d
jne 0x38788
movl $0x1, %eax
movq %rax, 0x8(%rsp)
jmp 0x387cc
movq (%rbx), %rax
cmpl $0x0, 0x28(%rax)
jle 0x387cc
xorl %r15d, %r15d
movq 0x10(%rbx), %rcx
movq (%rcx,%r15,8), %rdi
cmpl $0x4, 0x8(%rdi)
jne 0x387c0
cmpl %r13d, 0xc(%rdi)
jne 0x387c0
movl $0x1, (%r12,%r15,4)
callq 0x4ced7
testl %eax, %eax
jne 0x38a09
movq (%rbx), %rax
incq %r15
movslq 0x28(%rax), %rcx
cmpq %rcx, %r15
jl 0x38794
movl (%rsp), %eax
cmpl $-0x2, %eax
je 0x387dc
cmpl %eax, %r13d
movl %eax, %r13d
jne 0x38770
incq %r14
cmpq $0x1c, %r14
jne 0x3873d
movq 0x18(%rsp), %rax
testb $0x8, 0x24d(%rax)
jne 0x38955
testb $0x40, 0xdb(%rbx)
jne 0x38955
xorl %r13d, %r13d
movq 0x8(%rsp), %r14
leaq 0x60879(%rip), %rax     # 0x99090
movslq (%rax,%r13,4), %rax
movq 0x280(%rbp,%rax,8), %rdi
testq %rdi, %rdi
je 0x38898
movq %rsp, %rsi
callq 0x928be
movl (%rsp), %edx
movl $0x1, %esi
movl %r13d, %ecx
shll %cl, %esi
cmpl $-0x2, %eax
je 0x3888d
cmpl $-0x1, %eax
jne 0x38854
testl %r14d, %r14d
je 0x3888d
orl %esi, 0xd8(%rbx)
jmp 0x3888d
movq (%rbx), %rcx
movslq 0x28(%rcx), %rcx
testq %rcx, %rcx
jle 0x3888d
movq 0x10(%rbx), %rdi
xorl %r8d, %r8d
movq (%rdi,%r8,8), %r9
cmpl $0x4, 0x8(%r9)
jne 0x38885
cmpl %eax, 0xc(%r9)
jne 0x38885
cmpl $0x0, (%r12,%r8,4)
je 0x38885
orl %esi, 0xd8(%rbx)
incq %r8
cmpq %r8, %rcx
jne 0x38867
cmpl $-0x2, %edx
je 0x38898
cmpl %edx, %eax
movl %edx, %eax
jne 0x3883d
incq %r13
cmpq $0x1c, %r13
jne 0x38810
xorl %r14d, %r14d
movq 0x180(%rbp,%r14,8), %r13
testq %r13, %r13
je 0x38926
movq 0x10(%r13), %rdi
testq %rdi, %rdi
je 0x38920
movq %rsp, %rsi
callq 0x928be
movl (%rsp), %ecx
cmpl $-0x2, %eax
je 0x38915
cmpl $-0x1, %eax
jne 0x388dc
orb $0x40, 0xdb(%rbx)
jmp 0x38915
movq (%rbx), %rdx
movslq 0x28(%rdx), %rdx
testq %rdx, %rdx
jle 0x38915
movq 0x10(%rbx), %rsi
xorl %edi, %edi
movq (%rsi,%rdi,8), %r8
cmpl $0x4, 0x8(%r8)
jne 0x3890d
cmpl %eax, 0xc(%r8)
jne 0x3890d
cmpl $0x0, (%r12,%rdi,4)
je 0x3890d
orb $0x40, 0xdb(%rbx)
incq %rdi
cmpq %rdi, %rdx
jne 0x388ee
cmpl $-0x2, %ecx
je 0x38920
cmpl %ecx, %eax
movl %ecx, %eax
jne 0x388c9
movq 0x18(%r13), %r13
jmp 0x388b0
incq %r14
cmpq $0x20, %r14
jne 0x388a8
movl 0xd8(%rbx), %r11d
cmpl %r11d, 0x4(%rsp)
movl $0x104, %ecx            # imm = 0x104
movl $0x400, %r10d           # imm = 0x400
jne 0x3856f
jmp 0x38a27
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq 0x180(%rbp,%rax,8), %r14
testq %r14, %r14
je 0x389f2
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x389e9
movq %rsp, %rsi
callq 0x928be
movl %eax, %r13d
cmpl $-0x2, %r13d
je 0x389d9
cmpl $-0x1, %r13d
jne 0x38999
movl $0x1, %eax
movq %rax, 0x8(%rsp)
jmp 0x389d9
movq (%rbx), %rax
cmpl $0x0, 0x28(%rax)
jle 0x389d9
xorl %r15d, %r15d
movq 0x10(%rbx), %rcx
movq (%rcx,%r15,8), %rdi
cmpl $0x4, 0x8(%rdi)
jne 0x389cd
cmpl %r13d, 0xc(%rdi)
jne 0x389cd
movl $0x1, (%r12,%r15,4)
callq 0x4ced7
testl %eax, %eax
jne 0x38a09
movq (%rbx), %rax
incq %r15
movslq 0x28(%rax), %rcx
cmpq %rcx, %r15
jl 0x389a5
movl (%rsp), %eax
cmpl $-0x2, %eax
je 0x389e9
cmpl %eax, %r13d
movl %eax, %r13d
jne 0x38981
movq 0x18(%r14), %r14
jmp 0x38964
movq 0x10(%rsp), %rax
incq %rax
cmpq $0x20, %rax
jne 0x38957
jmp 0x38808
movq %r12, %rdi
callq 0x45c0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
callq 0x45c0
jmp 0x383f4