// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_encode.c
// Function: cram_encode_slice_read
static int cram_encode_slice_read(cram_fd *fd,
                                  cram_container *c,
                                  cram_block_compression_hdr *h,
                                  cram_slice *s,
                                  cram_record *cr,
                                  int64_t *last_pos) {
    int r = 0;
    int32_t i32;
    int64_t i64;
    unsigned char uc;

    //fprintf(stderr, "Encode seq %d, %d/%d FN=%d, %s\n", rec, core->byte, core->bit, cr->nfeature, s->name_ds->str + cr->name);

    //printf("BF=0x%x\n", cr->flags);
    //      bf = cram_flag_swap[cr->flags];
    i32 = fd->cram_flag_swap[cr->flags & 0xfff];
    r |= h->codecs[DS_BF]->encode(s, h->codecs[DS_BF], (char *)&i32, 1);

    i32 = cr->cram_flags & CRAM_FLAG_MASK;
    r |= h->codecs[DS_CF]->encode(s, h->codecs[DS_CF], (char *)&i32, 1);

    if (CRAM_MAJOR_VERS(fd->version) != 1 && s->hdr->ref_seq_id == -2)
        r |= h->codecs[DS_RI]->encode(s, h->codecs[DS_RI], (char *)&cr->ref_id, 1);

    r |= h->codecs[DS_RL]->encode(s, h->codecs[DS_RL], (char *)&cr->len, 1);

    if (c->pos_sorted) {
        if (CRAM_MAJOR_VERS(fd->version) >= 4) {
            i64 = cr->apos - *last_pos;
            r |= h->codecs[DS_AP]->encode(s, h->codecs[DS_AP], (char *)&i64, 1);
        } else {
            i32 = cr->apos - *last_pos;
            r |= h->codecs[DS_AP]->encode(s, h->codecs[DS_AP], (char *)&i32, 1);
        }
        *last_pos = cr->apos;
    } else {
        if (CRAM_MAJOR_VERS(fd->version) >= 4) {
            i64 = cr->apos;
            r |= h->codecs[DS_AP]->encode(s, h->codecs[DS_AP], (char *)&i64, 1);
        } else {
            i32 = cr->apos;
            r |= h->codecs[DS_AP]->encode(s, h->codecs[DS_AP], (char *)&i32, 1);
        }
    }

    r |= h->codecs[DS_RG]->encode(s, h->codecs[DS_RG], (char *)&cr->rg, 1);

    if (cr->cram_flags & CRAM_FLAG_DETACHED) {
        i32 = cr->mate_flags;
        r |= h->codecs[DS_MF]->encode(s, h->codecs[DS_MF], (char *)&i32, 1);

        r |= h->codecs[DS_NS]->encode(s, h->codecs[DS_NS],
                                      (char *)&cr->mate_ref_id, 1);

        if (CRAM_MAJOR_VERS(fd->version) >= 4) {
            r |= h->codecs[DS_NP]->encode(s, h->codecs[DS_NP],
                                          (char *)&cr->mate_pos, 1);
            r |= h->codecs[DS_TS]->encode(s, h->codecs[DS_TS],
                                          (char *)&cr->tlen, 1);
        } else {
            i32 = cr->mate_pos;
            r |= h->codecs[DS_NP]->encode(s, h->codecs[DS_NP],
                                          (char *)&i32, 1);
            i32 = cr->tlen;
            r |= h->codecs[DS_TS]->encode(s, h->codecs[DS_TS],
                                          (char *)&i32, 1);
        }
    } else {
        if (cr->cram_flags & CRAM_FLAG_MATE_DOWNSTREAM) {
            r |= h->codecs[DS_NF]->encode(s, h->codecs[DS_NF],
                                          (char *)&cr->mate_line, 1);
        }
        if (cr->cram_flags & CRAM_FLAG_EXPLICIT_TLEN) {
            if (CRAM_MAJOR_VERS(fd->version) >= 4) {
                r |= h->codecs[DS_TS]->encode(s, h->codecs[DS_TS],
                                              (char *)&cr->tlen, 1);
            }
        }
    }

    /* Aux tags */
    if (CRAM_MAJOR_VERS(fd->version) == 1) {
        int j;
        uc = cr->ntags;
        r |= h->codecs[DS_TC]->encode(s, h->codecs[DS_TC], (char *)&uc, 1);

        for (j = 0; j < cr->ntags; j++) {
            uint32_t i32 = s->TN[cr->TN_idx + j]; // id
            r |= h->codecs[DS_TN]->encode(s, h->codecs[DS_TN], (char *)&i32, 1);
        }
    } else {
        r |= h->codecs[DS_TL]->encode(s, h->codecs[DS_TL], (char *)&cr->TL, 1);
    }

    // qual
    // QS codec : Already stored in block[2].

    // features (diffs)
    if (!(cr->flags & BAM_FUNMAP)) {
        int prev_pos = 0, j;

        r |= h->codecs[DS_FN]->encode(s, h->codecs[DS_FN],
                                      (char *)&cr->nfeature, 1);
        for (j = 0; j < cr->nfeature; j++) {
            cram_feature *f = &s->features[cr->feature + j];

            uc = f->X.code;
            r |= h->codecs[DS_FC]->encode(s, h->codecs[DS_FC], (char *)&uc, 1);
            i32 = f->X.pos - prev_pos;
            r |= h->codecs[DS_FP]->encode(s, h->codecs[DS_FP], (char *)&i32, 1);
            prev_pos = f->X.pos;

            switch(f->X.code) {
                //char *seq;

            case 'X':
                //fprintf(stderr, "    FC=%c FP=%d base=%d\n", f->X.code, i32, f->X.base);

                uc = f->X.base;
                r |= h->codecs[DS_BS]->encode(s, h->codecs[DS_BS],
                                              (char *)&uc, 1);
                break;
            case 'S':
                // Already done
                //r |= h->codecs[DS_SC]->encode(s, h->codecs[DS_SC],
                //                              BLOCK_DATA(s->soft_blk) + f->S.seq_idx,
                //                              f->S.len);

                //if (CRAM_MAJOR_VERS(fd->version) >= 3) {
                //    r |= h->codecs[DS_BB]->encode(s, h->codecs[DS_BB],
                //                                  BLOCK_DATA(s->seqs_blk) + f->S.seq_idx,
                //                                  f->S.len);
                //}
                break;
            case 'I':
                //seq = DSTRING_STR(s->seqs_ds) + f->S.seq_idx;
                //r |= h->codecs[DS_IN]->encode(s, h->codecs[DS_IN],
                //                           seq, f->S.len);
                //if (CRAM_MAJOR_VERS(fd->version) >= 3) {
                //    r |= h->codecs[DS_BB]->encode(s, h->codecs[DS_BB],
                //                                  BLOCK_DATA(s->seqs_blk) + f->I.seq_idx,
                //                                  f->I.len);
                //}
                break;
            case 'i':
                uc = f->i.base;
                r |= h->codecs[DS_BA]->encode(s, h->codecs[DS_BA],
                                              (char *)&uc, 1);
                //seq = DSTRING_STR(s->seqs_ds) + f->S.seq_idx;
                //r |= h->codecs[DS_IN]->encode(s, h->codecs[DS_IN],
                //                           seq, 1);
                break;
            case 'D':
                i32 = f->D.len;
                r |= h->codecs[DS_DL]->encode(s, h->codecs[DS_DL],
                                              (char *)&i32, 1);
                break;

            case 'B':
                //                  // Used when we try to store a non ACGTN base or an N
                //                  // that aligns against a non ACGTN reference

                uc  = f->B.base;
                r |= h->codecs[DS_BA]->encode(s, h->codecs[DS_BA],
                                              (char *)&uc, 1);

                //                  Already added
                //                  uc  = f->B.qual;
                //                  r |= h->codecs[DS_QS]->encode(s, h->codecs[DS_QS],
                //                                           (char *)&uc, 1);
                break;

            case 'b':
                // string of bases
                r |= h->codecs[DS_BB]->encode(s, h->codecs[DS_BB],
                                              (char *)BLOCK_DATA(s->seqs_blk)
                                                      + f->b.seq_idx,
                                              f->b.len);
                break;

            case 'Q':
                //                  Already added
                //                  uc  = f->B.qual;
                //                  r |= h->codecs[DS_QS]->encode(s, h->codecs[DS_QS],
                //                                           (char *)&uc, 1);
                break;

            case 'N':
                i32 = f->N.len;
                r |= h->codecs[DS_RS]->encode(s, h->codecs[DS_RS],
                                              (char *)&i32, 1);
                break;

            case 'P':
                i32 = f->P.len;
                r |= h->codecs[DS_PD]->encode(s, h->codecs[DS_PD],
                                              (char *)&i32, 1);
                break;

            case 'H':
                i32 = f->H.len;
                r |= h->codecs[DS_HC]->encode(s, h->codecs[DS_HC],
                                              (char *)&i32, 1);
                break;


            default:
                hts_log_error("Unhandled feature code %c", f->X.code);
                return -1;
            }
        }

        r |= h->codecs[DS_MQ]->encode(s, h->codecs[DS_MQ],
                                      (char *)&cr->mqual, 1);
    } else {
        char *seq = (char *)BLOCK_DATA(s->seqs_blk) + cr->seq;
        if (cr->len)
            r |= h->codecs[DS_BA]->encode(s, h->codecs[DS_BA], seq, cr->len);
    }

    return r ? -1 : 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movl 0xc(%rcx), %ecx
andl $0xfff, %ecx            # imm = 0xFFF
movslq %ecx, %rcx
movl 0x4270(%rax,%rcx,4), %eax
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x2f8(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x2f8(%rcx), %rsi
leaq -0x40(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x1f, %eax
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x300(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x300(%rcx), %rsi
leaq -0x40(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
sarl $0x8, %eax
cmpl $0x1, %eax
je 0x652d2
movq -0x28(%rbp), %rax
movq (%rax), %rax
cmpl $-0x2, 0x4(%rax)
jne 0x652d2
movq -0x20(%rbp), %rax
movq 0x388(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x388(%rcx), %rsi
movq -0x30(%rbp), %rdx
addq $0x8, %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x20(%rbp), %rax
movq 0x348(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x348(%rcx), %rsi
movq -0x30(%rbp), %rdx
addq $0x14, %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x98(%rax)
je 0x653be
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
sarl $0x8, %eax
cmpl $0x4, %eax
jl 0x65369
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x38(%rbp), %rcx
subq (%rcx), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq 0x308(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x308(%rcx), %rsi
leaq -0x48(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x653aa
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x38(%rbp), %rcx
subq (%rcx), %rax
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x308(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x308(%rcx), %rsi
leaq -0x40(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
jmp 0x65446
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
sarl $0x8, %eax
cmpl $0x4, %eax
jl 0x6540a
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq 0x308(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x308(%rcx), %rsi
leaq -0x48(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x65444
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x308(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x308(%rcx), %rsi
leaq -0x40(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x65446
movq -0x20(%rbp), %rax
movq 0x310(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x310(%rcx), %rsi
movq -0x30(%rbp), %rdx
addq $0x20, %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x655eb
movq -0x30(%rbp), %rax
movl 0x8c(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x328(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x328(%rcx), %rsi
leaq -0x40(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x20(%rbp), %rax
movq 0x320(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x320(%rcx), %rsi
movq -0x30(%rbp), %rdx
addq $0x30, %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
sarl $0x8, %eax
cmpl $0x4, %eax
jl 0x65572
movq -0x20(%rbp), %rax
movq 0x338(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x338(%rcx), %rsi
movq -0x30(%rbp), %rdx
addq $0x38, %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x20(%rbp), %rax
movq 0x330(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x330(%rcx), %rsi
movq -0x30(%rbp), %rdx
addq $0x40, %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x655e6
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rax
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x338(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x338(%rcx), %rsi
leaq -0x40(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x330(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x330(%rcx), %rsi
leaq -0x40(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x65682
movq -0x30(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x6562d
movq -0x20(%rbp), %rax
movq 0x340(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x340(%rcx), %rsi
movq -0x30(%rbp), %rdx
addq $0x2c, %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x65680
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
sarl $0x8, %eax
cmpl $0x4, %eax
jl 0x6567e
movq -0x20(%rbp), %rax
movq 0x330(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x330(%rcx), %rsi
movq -0x30(%rbp), %rdx
addq $0x40, %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x65680
jmp 0x65682
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
sarl $0x8, %eax
cmpl $0x1, %eax
jne 0x65738
movq -0x30(%rbp), %rax
movl 0x50(%rax), %eax
movb %al, -0x49(%rbp)
movq -0x20(%rbp), %rax
movq 0x3e0(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x3e0(%rcx), %rsi
leaq -0x49(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0x50(%rcx), %eax
jge 0x65736
movq -0x28(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x30(%rbp), %rcx
movl 0x5c(%rcx), %ecx
addl -0x50(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x54(%rbp)
movq -0x20(%rbp), %rax
movq 0x3b8(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x3b8(%rcx), %rsi
leaq -0x54(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x656d5
jmp 0x6576b
movq -0x20(%rbp), %rax
movq 0x380(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x380(%rcx), %rsi
movq -0x30(%rbp), %rdx
addq $0x60, %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x65b0f
movl $0x0, -0x58(%rbp)
movq -0x20(%rbp), %rax
movq 0x350(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x350(%rcx), %rsi
movq -0x30(%rbp), %rdx
addq $0x88, %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0x88(%rcx), %eax
jae 0x65ad7
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x30(%rbp), %rcx
movl 0x84(%rcx), %ecx
movl -0x5c(%rbp), %edx
addl %edx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movb 0x4(%rax), %al
movb %al, -0x49(%rbp)
movq -0x20(%rbp), %rax
movq 0x358(%rax), %rsi
movq 0x30(%rsi), %rax
movq -0x28(%rbp), %rdi
leaq -0x49(%rbp), %rdx
movl $0x1, %ecx
movl %ecx, -0x7c(%rbp)
callq *%rax
movl -0x7c(%rbp), %ecx
movl %eax, %edx
movl -0x3c(%rbp), %eax
orl %edx, %eax
movl %eax, -0x3c(%rbp)
movq -0x68(%rbp), %rax
movl (%rax), %eax
movl -0x58(%rbp), %edx
subl %edx, %eax
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x360(%rax), %rsi
movq 0x30(%rsi), %rax
movq -0x28(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq *%rax
movl %eax, %ecx
movl -0x3c(%rbp), %eax
orl %ecx, %eax
movl %eax, -0x3c(%rbp)
movq -0x68(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x58(%rbp)
movq -0x68(%rbp), %rax
movl 0x4(%rax), %eax
addl $-0x42, %eax
movl %eax, %ecx
movq %rcx, -0x78(%rbp)
subl $0x27, %eax
ja 0x65a9a
movq -0x78(%rbp), %rax
leaq 0x8e4cf(%rip), %rcx     # 0xf3d5c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x68(%rbp), %rax
movl 0x8(%rax), %eax
movb %al, -0x49(%rbp)
movq -0x20(%rbp), %rax
movq 0x378(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x378(%rcx), %rsi
leaq -0x49(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x65ac7
jmp 0x65ac7
jmp 0x65ac7
movq -0x68(%rbp), %rax
movl 0x8(%rax), %eax
movb %al, -0x49(%rbp)
movq -0x20(%rbp), %rax
movq 0x370(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x370(%rcx), %rsi
leaq -0x49(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x65ac7
movq -0x68(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x368(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x368(%rcx), %rsi
leaq -0x40(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x65ac7
movq -0x68(%rbp), %rax
movl 0x8(%rax), %eax
movb %al, -0x49(%rbp)
movq -0x20(%rbp), %rax
movq 0x370(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x370(%rcx), %rsi
leaq -0x49(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x65ac7
movq -0x20(%rbp), %rax
movq 0x3a8(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x3a8(%rcx), %rsi
movq -0x28(%rbp), %rcx
movq 0x70(%rcx), %rcx
movq 0x20(%rcx), %rdx
movq -0x68(%rbp), %rcx
movslq 0x8(%rcx), %rcx
addq %rcx, %rdx
movq -0x68(%rbp), %rcx
movl 0xc(%rcx), %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x65ac7
jmp 0x65ac7
movq -0x68(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x390(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x390(%rcx), %rsi
leaq -0x40(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x65ac7
movq -0x68(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x398(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x398(%rcx), %rsi
leaq -0x40(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x65ac7
movq -0x68(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x3a0(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x3a0(%rcx), %rsi
leaq -0x40(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x65ac7
movq -0x68(%rbp), %rax
movl 0x4(%rax), %ecx
movl $0x1, %edi
leaq 0x8ec5f(%rip), %rsi     # 0xf470c
leaq 0x8ec6f(%rip), %rdx     # 0xf4723
movb $0x0, %al
callq 0x1b030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x65b79
jmp 0x65ac9
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x657c2
movq -0x20(%rbp), %rax
movq 0x318(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x318(%rcx), %rsi
movq -0x30(%rbp), %rdx
addq $0x80, %rdx
movl $0x1, %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x65b66
movq -0x28(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x20(%rax), %rax
movq -0x30(%rbp), %rcx
movl 0x64(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, 0x14(%rax)
je 0x65b64
movq -0x20(%rbp), %rax
movq 0x370(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x370(%rcx), %rsi
movq -0x70(%rbp), %rdx
movq -0x30(%rbp), %rcx
movl 0x14(%rcx), %ecx
callq *%rax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x65b66
movl -0x3c(%rbp), %edx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)