// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x24c(%rax)
je 0x50d94
movq -0x10(%rbp), %rax
cmpl $0x7fffffff, 0x24c(%rax) # imm = 0x7FFFFFFF
je 0x50d94
movq -0x20(%rbp), %rax
movl $0x0, 0xd8(%rax)
movq -0x10(%rbp), %rax
movl 0x24c(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x50b69
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x8000, %ecx           # imm = 0x8000
movl %ecx, 0xd8(%rax)
movq -0x10(%rbp), %rax
movl 0x24c(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x50b8e
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0xd8(%rax)
movq -0x10(%rbp), %rax
movl 0x24c(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x50bb6
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x200001, %ecx         # imm = 0x200001
movl %ecx, 0xd8(%rax)
movq -0x10(%rbp), %rax
movl 0x24c(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x50bdb
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x3, %ecx
movl %ecx, 0xd8(%rax)
movq -0x10(%rbp), %rax
movl 0x24c(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x50c03
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x2000, %ecx           # imm = 0x2000
movl %ecx, 0xd8(%rax)
movq -0x10(%rbp), %rax
movl 0x24c(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x50c2b
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x3c00b1d, %ecx        # imm = 0x3C00B1D
movl %ecx, 0xd8(%rax)
movq -0x10(%rbp), %rax
movl 0x24c(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x50c53
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x310021, %ecx         # imm = 0x310021
movl %ecx, 0xd8(%rax)
movq -0x10(%rbp), %rax
movl 0x24c(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x50c7d
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x120023, %ecx         # imm = 0x120023
movl %ecx, 0xd8(%rax)
movq -0x10(%rbp), %rax
movl 0x24c(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x50ca7
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x3fc0b3f, %ecx        # imm = 0x3FC0B3F
movl %ecx, 0xd8(%rax)
movq -0x10(%rbp), %rax
movl 0x24c(%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x50cd1
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x7c00f5f, %ecx        # imm = 0x7C00F5F
movl %ecx, 0xd8(%rax)
movq -0x10(%rbp), %rax
movl 0x24c(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x50cf3
movq -0x20(%rbp), %rax
movl $0x0, 0xdc(%rax)
movq -0x10(%rbp), %rax
movl 0x24c(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x50d1d
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x13c00b9f, %ecx       # imm = 0x13C00B9F
movl %ecx, 0xd8(%rax)
movq -0x10(%rbp), %rax
movl 0x24c(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x50d47
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x40005000, %ecx       # imm = 0x40005000
movl %ecx, 0xd8(%rax)
movq -0x10(%rbp), %rax
movl 0x24c(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
je 0x50d71
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x1001, %ecx           # imm = 0x1001
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
callq 0x6f980
cmpl $0x0, %eax
je 0x50d92
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x517ca
jmp 0x50df7
movq -0x20(%rbp), %rax
movl $0x7fffffff, 0xd8(%rax) # imm = 0x7FFFFFFF
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x28(%rcx), %eax
jge 0x50deb
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x6f980
cmpl $0x0, %eax
je 0x50dde
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x517ca
jmp 0x50de0
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x50da9
movl $0x0, -0x4(%rbp)
jmp 0x517ca
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl 0x28(%rax), %eax
addl $0x1, %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x42f0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x50e28
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x517ca
jmp 0x50e2a
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x400000, %eax         # imm = 0x400000
cmpl $0x0, %eax
je 0x50e54
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x104, %ecx            # imm = 0x104
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x800000, %eax         # imm = 0x800000
cmpl $0x0, %eax
je 0x50e7e
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x104, %ecx            # imm = 0x104
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x0, %eax
je 0x50ea8
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x104, %ecx            # imm = 0x104
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x50ed2
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x104, %ecx            # imm = 0x104
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x50efc
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x104, %ecx            # imm = 0x104
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x2000000, %eax        # imm = 0x2000000
cmpl $0x0, %eax
je 0x50f26
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x104, %ecx            # imm = 0x104
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x50f50
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x104, %ecx            # imm = 0x104
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x50f78
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x104, %ecx            # imm = 0x104
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x50fa0
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x104, %ecx            # imm = 0x104
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x4000000, %eax        # imm = 0x4000000
cmpl $0x0, %eax
je 0x50fca
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x104, %ecx            # imm = 0x104
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x10000000, %eax       # imm = 0x10000000
cmpl $0x0, %eax
je 0x50ff4
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x104, %ecx            # imm = 0x104
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x7c00f5f, %eax        # imm = 0x7C00F5F
cmpl $0x0, %eax
je 0x5101b
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x8, %ecx
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x51043
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x100, %ecx            # imm = 0x100
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x5106d
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x200, %ecx            # imm = 0x200
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x40000000, %eax       # imm = 0x40000000
cmpl $0x0, %eax
je 0x51097
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x4000, %ecx           # imm = 0x4000
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x80000, %eax          # imm = 0x80000
cmpl $0x0, %eax
je 0x510c1
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x100000, %ecx         # imm = 0x100000
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x510e8
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x51112
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x200000, %ecx         # imm = 0x200000
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0xf0020, %eax          # imm = 0xF0020
cmpl $0x0, %eax
je 0x5113c
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x100000, %ecx         # imm = 0x100000
movl %ecx, 0xd8(%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x28(%rax)
jne 0x51170
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
je 0x51170
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x100020, %ecx         # imm = 0x100020
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x140000c0, %eax       # imm = 0x140000C0
cmpl $0x0, %eax
je 0x5119a
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x100009, %ecx         # imm = 0x100009
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x511c4
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x6000800, %ecx        # imm = 0x6000800
movl %ecx, 0xd8(%rax)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
movl %eax, -0x34(%rbp)
movl $0x0, -0x30(%rbp)
movslq -0x30(%rbp), %rax
cmpq $0x1c, %rax
jae 0x51332
movq -0x18(%rbp), %rax
movslq -0x30(%rbp), %rdx
leaq 0xbc6cb(%rip), %rcx     # 0x10d8c0
movslq (%rcx,%rdx,4), %rcx
movq 0x280(%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
movl -0x30(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x51227
jmp 0x51324
cmpq $0x0, -0x48(%rbp)
jne 0x51233
jmp 0x51324
movq -0x48(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0xec340
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0xa4(%rbp)
subl $-0x2, %eax
je 0x51260
jmp 0x51253
movl -0xa4(%rbp), %eax
subl $-0x1, %eax
je 0x51265
jmp 0x51271
jmp 0x51307
movl $0x1, -0x2c(%rbp)
jmp 0x51307
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x28(%rcx), %eax
jge 0x51305
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x4, 0x8(%rax)
jne 0x512f5
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0xc(%rax), %eax
cmpl -0x38(%rbp), %eax
jne 0x512f5
movq -0x28(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl $0x1, (%rax,%rcx,4)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x6f980
cmpl $0x0, %eax
je 0x512f3
movq -0x28(%rbp), %rdi
callq 0x45a0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x517ca
jmp 0x512f5
jmp 0x512f7
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x51278
jmp 0x51307
cmpl $-0x2, -0x3c(%rbp)
je 0x51315
movl -0x38(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jne 0x51317
jmp 0x51322
movl -0x3c(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x51243
jmp 0x51324
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x511d8
movq -0x10(%rbp), %rax
movl 0x24c(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x5135e
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %eax
andl $0x40000000, %eax       # imm = 0x40000000
cmpl $0x0, %eax
je 0x514c1
movl $0x0, -0x30(%rbp)
cmpl $0x20, -0x30(%rbp)
jge 0x514bf
movq -0x18(%rbp), %rax
movslq -0x30(%rbp), %rcx
movq 0x180(%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x514af
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
jne 0x513af
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x51383
movq -0x68(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xec340
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0xa8(%rbp)
subl $-0x2, %eax
je 0x513dc
jmp 0x513cf
movl -0xa8(%rbp), %eax
subl $-0x1, %eax
je 0x513e1
jmp 0x513ed
jmp 0x51483
movl $0x1, -0x2c(%rbp)
jmp 0x51483
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x28(%rcx), %eax
jge 0x51481
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x54(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x4, 0x8(%rax)
jne 0x51471
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x54(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0xc(%rax), %eax
cmpl -0x4c(%rbp), %eax
jne 0x51471
movq -0x28(%rbp), %rax
movslq -0x54(%rbp), %rcx
movl $0x1, (%rax,%rcx,4)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x54(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x6f980
cmpl $0x0, %eax
je 0x5146f
movq -0x28(%rbp), %rdi
callq 0x45a0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x517ca
jmp 0x51471
jmp 0x51473
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x513f4
jmp 0x51483
cmpl $-0x2, -0x50(%rbp)
je 0x51491
movl -0x4c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jne 0x51493
jmp 0x5149e
movl -0x50(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x513bf
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x51383
jmp 0x514b1
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x51365
jmp 0x514c1
movl $0x0, -0x30(%rbp)
movslq -0x30(%rbp), %rax
cmpq $0x1c, %rax
jae 0x51601
movq -0x18(%rbp), %rax
movslq -0x30(%rbp), %rdx
leaq 0xbc3db(%rip), %rcx     # 0x10d8c0
movslq (%rcx,%rdx,4), %rcx
movq 0x280(%rax,%rcx,8), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x80(%rbp)
jne 0x51501
jmp 0x515f3
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0xec340
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0xac(%rbp)
subl $-0x2, %eax
je 0x5152e
jmp 0x51521
movl -0xac(%rbp), %eax
subl $-0x1, %eax
je 0x51533
jmp 0x51557
jmp 0x515d6
cmpl $0x0, -0x2c(%rbp)
je 0x51555
movl -0x30(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
movq -0x20(%rbp), %rax
orl 0xd8(%rax), %ecx
movl %ecx, 0xd8(%rax)
jmp 0x515d6
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x28(%rcx), %eax
jge 0x515d4
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x4, 0x8(%rax)
jne 0x515c7
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0xc(%rax), %eax
cmpl -0x6c(%rbp), %eax
jne 0x515c7
movq -0x28(%rbp), %rax
movslq -0x74(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x515c5
movl -0x30(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
movq -0x20(%rbp), %rax
orl 0xd8(%rax), %ecx
movl %ecx, 0xd8(%rax)
jmp 0x515c7
jmp 0x515c9
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x5155e
jmp 0x515d6
cmpl $-0x2, -0x70(%rbp)
je 0x515e4
movl -0x6c(%rbp), %eax
cmpl -0x70(%rbp), %eax
jne 0x515e6
jmp 0x515f1
movl -0x70(%rbp), %eax
movl %eax, -0x6c(%rbp)
jmp 0x51511
jmp 0x515f3
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x514c8
movl $0x0, -0x30(%rbp)
cmpl $0x20, -0x30(%rbp)
jge 0x517a5
movq -0x18(%rbp), %rax
movslq -0x30(%rbp), %rcx
movq 0x180(%rax,%rcx,8), %rax
movq %rax, -0x98(%rbp)
cmpq $0x0, -0x98(%rbp)
je 0x51795
movq -0x98(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0xa0(%rbp)
cmpq $0x0, -0xa0(%rbp)
jne 0x51667
movq -0x98(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x98(%rbp)
jmp 0x51629
movq -0xa0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xec340
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %eax
movl %eax, -0xb0(%rbp)
subl $-0x2, %eax
je 0x516a0
jmp 0x51693
movl -0xb0(%rbp), %eax
subl $-0x1, %eax
je 0x516a5
jmp 0x516c0
jmp 0x51754
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x40000000, %ecx       # imm = 0x40000000
movl %ecx, 0xd8(%rax)
jmp 0x51754
movl $0x0, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x28(%rcx), %eax
jge 0x51752
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x8c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x4, 0x8(%rax)
jne 0x5173c
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x8c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0xc(%rax), %eax
cmpl -0x84(%rbp), %eax
jne 0x5173c
movq -0x28(%rbp), %rax
movslq -0x8c(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x5173a
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
orl $0x40000000, %ecx       # imm = 0x40000000
movl %ecx, 0xd8(%rax)
jmp 0x5173c
jmp 0x5173e
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
jmp 0x516ca
jmp 0x51754
cmpl $-0x2, -0x88(%rbp)
je 0x5176b
movl -0x84(%rbp), %eax
cmpl -0x88(%rbp), %eax
jne 0x5176d
jmp 0x5177e
movl -0x88(%rbp), %eax
movl %eax, -0x84(%rbp)
jmp 0x51680
movq -0x98(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x98(%rbp)
jmp 0x51629
jmp 0x51797
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x51608
jmp 0x517a7
movl -0x34(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0xd8(%rcx), %eax
jne 0x50e2a
movq -0x28(%rbp), %rdi
callq 0x45a0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)