// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/cram/cram_io.c
// Function: cram_set_voption
int cram_set_voption(cram_fd *fd, enum hts_fmt_option opt, va_list args) {
    refs_t *refs;

    if (!fd) {
        errno = EBADF;
        return -1;
    }

    switch (opt) {
    case CRAM_OPT_DECODE_MD:
        fd->decode_md = va_arg(args, int);
        break;

    case CRAM_OPT_PREFIX:
        if (fd->prefix)
            free(fd->prefix);
        if (!(fd->prefix = strdup(va_arg(args, char *))))
            return -1;
        break;

    case CRAM_OPT_VERBOSITY:
        break;

    case CRAM_OPT_SEQS_PER_SLICE:
        fd->seqs_per_slice = va_arg(args, int);
        if (fd->bases_per_slice == BASES_PER_SLICE)
            fd->bases_per_slice = fd->seqs_per_slice * 500;
        break;

    case CRAM_OPT_BASES_PER_SLICE:
        fd->bases_per_slice = va_arg(args, int);
        break;

    case CRAM_OPT_SLICES_PER_CONTAINER:
        fd->slices_per_container = va_arg(args, int);
        break;

    case CRAM_OPT_EMBED_REF:
        fd->embed_ref = va_arg(args, int);
        break;

    case CRAM_OPT_NO_REF:
        fd->no_ref = va_arg(args, int);
        break;

    case CRAM_OPT_POS_DELTA:
        fd->ap_delta = va_arg(args, int);
        break;

    case CRAM_OPT_IGNORE_MD5:
        fd->ignore_md5 = va_arg(args, int);
        break;

    case CRAM_OPT_LOSSY_NAMES:
        fd->lossy_read_names = va_arg(args, int);
        // Currently lossy read names required paired (attached) reads.
        // TLEN 0 or being 1 out causes read pairs to be detached, breaking
        // the lossy read name compression, so we have extra options to
        // slacken the exact TLEN round-trip checks.
        fd->tlen_approx = fd->lossy_read_names;
        fd->tlen_zero = fd->lossy_read_names;
        break;

    case CRAM_OPT_USE_BZIP2:
        fd->use_bz2 = va_arg(args, int);
        break;

    case CRAM_OPT_USE_RANS:
        fd->use_rans = va_arg(args, int);
        break;

    case CRAM_OPT_USE_TOK:
        fd->use_tok = va_arg(args, int);
        break;

    case CRAM_OPT_USE_FQZ:
        fd->use_fqz = va_arg(args, int);
        break;

    case CRAM_OPT_USE_ARITH:
        fd->use_arith = va_arg(args, int);
        break;

    case CRAM_OPT_USE_LZMA:
        fd->use_lzma = va_arg(args, int);
        break;

    case CRAM_OPT_SHARED_REF:
        fd->shared_ref = 1;
        refs = va_arg(args, refs_t *);
        if (refs != fd->refs) {
            if (fd->refs)
                refs_free(fd->refs);
            fd->refs = refs;
            fd->refs->count++;
        }
        break;

    case CRAM_OPT_RANGE: {
        int r = cram_seek_to_refpos(fd, va_arg(args, cram_range *));
        pthread_mutex_lock(&fd->range_lock);
//        printf("opt range noseek to %p %d:%ld-%ld\n",
//               fd, fd->range.refid, fd->range.start, fd->range.end);
        if (fd->range.refid != -2)
            fd->required_fields |= SAM_POS;
        pthread_mutex_unlock(&fd->range_lock);
        return r;
    }

    case CRAM_OPT_RANGE_NOSEEK: {
        // As per CRAM_OPT_RANGE, but no seeking
        pthread_mutex_lock(&fd->range_lock);
        cram_range *r = va_arg(args, cram_range *);
        fd->range = *r;
        if (r->refid == HTS_IDX_NOCOOR) {
            fd->range.refid = -1;
            fd->range.start = 0;
        } else if (r->refid == HTS_IDX_START || r->refid == HTS_IDX_REST) {
            fd->range.refid = -2; // special case in cram_next_slice
        }
        if (fd->range.refid != -2)
            fd->required_fields |= SAM_POS;
        fd->ooc = 0;
        fd->eof = 0;
        pthread_mutex_unlock(&fd->range_lock);
        return 0;
    }

    case CRAM_OPT_REFERENCE:
        return cram_load_reference(fd, va_arg(args, char *));

    case CRAM_OPT_VERSION: {
        int major, minor;
        char *s = va_arg(args, char *);
        if (2 != sscanf(s, "%d.%d", &major, &minor)) {
            hts_log_error("Malformed version string %s", s);
            return -1;
        }
        if (!((major == 1 &&  minor == 0) ||
              (major == 2 && (minor == 0 || minor == 1)) ||
              (major == 3 && (minor == 0 || minor == 1)) ||
              (major == 4 &&  minor == 0))) {
            hts_log_error("Unknown version string; use 1.0, 2.0, 2.1, 3.0, 3.1 or 4.0");
            errno = EINVAL;
            return -1;
        }

        if (major > 3 || (major == 3 && minor > 1)) {
            hts_log_warning(
                "CRAM version %s is still a draft and subject to change.\n"
                "This is a technology demonstration that should not be "
                "used for archival data.", s);
        }

        fd->version = major*256 + minor;

        fd->use_rans = (CRAM_MAJOR_VERS(fd->version) >= 3) ? 1 : 0;

        fd->use_tok = ((CRAM_MAJOR_VERS(fd->version) == 3 &&
                        CRAM_MINOR_VERS(fd->version) >= 1) ||
                        CRAM_MAJOR_VERS(fd->version) >= 4) ? 1 : 0;
        cram_init_tables(fd);

        break;
    }

    case CRAM_OPT_MULTI_SEQ_PER_SLICE:
        fd->multi_seq_user = fd->multi_seq = va_arg(args, int);
        break;

    case CRAM_OPT_NTHREADS: {
        int nthreads =  va_arg(args, int);
        if (nthreads >= 1) {
            if (!(fd->pool = hts_tpool_init(nthreads)))
                return -1;

            fd->rqueue = hts_tpool_process_init(fd->pool, nthreads*2, 0);
            fd->shared_ref = 1;
            fd->own_pool = 1;
        }
        break;
    }

    case CRAM_OPT_THREAD_POOL: {
        htsThreadPool *p = va_arg(args, htsThreadPool *);
        fd->pool = p ? p->pool : NULL;
        if (fd->pool) {
            fd->rqueue = hts_tpool_process_init(fd->pool,
                                                p->qsize ? p->qsize : hts_tpool_size(fd->pool)*2,
                                                0);
        }
        fd->shared_ref = 1; // Needed to avoid clobbering ref between threads
        fd->own_pool = 0;

        //fd->qsize = 1;
        //fd->decoded = calloc(fd->qsize, sizeof(cram_container *));
        //hts_tpool_dispatch(fd->pool, cram_decoder_thread, fd);
        break;
    }

    case CRAM_OPT_REQUIRED_FIELDS:
        fd->required_fields = va_arg(args, int);
        if (fd->range.refid != -2)
            fd->required_fields |= SAM_POS;
        break;

    case CRAM_OPT_STORE_MD:
        fd->store_md = va_arg(args, int);
        break;

    case CRAM_OPT_STORE_NM:
        fd->store_nm = va_arg(args, int);
        break;

    case HTS_OPT_COMPRESSION_LEVEL:
        fd->level = va_arg(args, int);
        break;

    case HTS_OPT_PROFILE: {
        enum hts_profile_option prof = va_arg(args, int);
        switch (prof) {
        case HTS_PROFILE_FAST:
            if (fd->level == CRAM_DEFAULT_LEVEL) fd->level = 1;
            fd->use_tok = 0;
            fd->seqs_per_slice = 10000;
            break;

        case HTS_PROFILE_NORMAL:
            break;

        case HTS_PROFILE_SMALL:
            if (fd->level == CRAM_DEFAULT_LEVEL) fd->level = 6;
            fd->use_bz2 = 1;
            fd->use_fqz = 1;
            fd->seqs_per_slice = 25000;
            break;

        case HTS_PROFILE_ARCHIVE:
            if (fd->level == CRAM_DEFAULT_LEVEL) fd->level = 7;
            fd->use_bz2 = 1;
            fd->use_fqz = 1;
            fd->use_arith = 1;
            if (fd->level > 7)
                fd->use_lzma = 1;
            fd->seqs_per_slice = 100000;
            break;
        }

        if (fd->bases_per_slice == BASES_PER_SLICE)
            fd->bases_per_slice = fd->seqs_per_slice * 500;
        break;
    }

    default:
        hts_log_error("Unknown CRAM option code %d", opt);
        errno = EINVAL;
        return -1;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x5355a
movq %rdx, %r14
movl %esi, %ecx
movq %rdi, %rbx
cmpl $0x1b, %esi
ja 0x5356f
movl %ecx, %eax
leaq 0x46e2a(%rip), %rcx     # 0x9a35c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53b1e
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53b2a
callq 0x4050
movl $0x9, (%rax)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x53f83
cmpl $0x64, %ecx
je 0x53760
cmpl $0x6a, %ecx
jne 0x53881
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53cfd
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53d09
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53936
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53942
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x5394f
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x5395b
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53968
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53974
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x539c0
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x539cc
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x539d9
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x539e5
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x539f2
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x539fe
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53a0b
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53a17
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53a2c
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53a38
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53a45
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53a51
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x536c5
callq 0x45c0
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53a5e
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53a6a
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53a84
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53a90
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53ad6
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53ae2
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53b05
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53b11
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53b37
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53b43
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53b50
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53b5c
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53b69
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53b75
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53b7c
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53b88
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53bbc
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53bc8
movl $0x1, 0x248(%rbx)
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53bd5
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53be1
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53c08
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53c14
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53c96
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53ca2
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53cc5
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53cd1
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53ce4
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53cf0
leaq 0x47a6f(%rip), %rsi     # 0x9b2f7
leaq 0x47b56(%rip), %rdx     # 0x9b3e5
movl $0x1, %edi
xorl %eax, %eax
callq 0x13de5
callq 0x4050
movl $0x16, (%rax)
jmp 0x53565
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53d4c
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53d58
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53d65
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53d71
leaq 0x8918(%rbx), %r15
movq %r15, %rdi
callq 0x4750
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53d8a
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53d96
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x53ded
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x53df9
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
movl %eax, 0x8a10(%rbx)
jmp 0x53f81
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
movl %eax, 0x238(%rbx)
jmp 0x53f81
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %ebp
testl %ebp, %ebp
jle 0x53f81
movl %ebp, %edi
callq 0x364c9
movq %rax, 0x88b8(%rbx)
testq %rax, %rax
je 0x53565
addl %ebp, %ebp
movq %rax, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x361a9
movq %rax, 0x88c0(%rbx)
movl $0x1, %eax
movl %eax, 0x248(%rbx)
movl %eax, 0x88b0(%rbx)
jmp 0x53f81
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
movl %eax, 0x224(%rbx)
jmp 0x53f81
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
movl %eax, 0x21c(%rbx)
jmp 0x53f81
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
movl %eax, 0x230(%rbx)
jmp 0x53f81
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movq (%rax), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4f438
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
movl %eax, 0x23c(%rbx)
jmp 0x53f81
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
movl %eax, 0x240(%rbx)
jmp 0x53f81
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movq (%rax), %rdi
callq 0x4930
movq %rax, 0x20(%rbx)
testq %rax, %rax
jne 0x53f81
jmp 0x53565
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movq (%rax), %rax
testq %rax, %rax
je 0x53e06
movq (%rax), %r14
movq %r14, 0x88b8(%rbx)
testq %r14, %r14
je 0x53e11
movl 0x8(%rax), %esi
testl %esi, %esi
jne 0x53ac2
movq %r14, %rdi
callq 0x36af4
movl %eax, %esi
addl %eax, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x361a9
movl $0x88c0, %ecx           # imm = 0x88C0
jmp 0x53e0d
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
movl %eax, 0x214(%rbx)
cmpl $0x4c4b40, 0x218(%rbx)  # imm = 0x4C4B40
jne 0x53f81
imull $0x1f4, %eax, %eax      # imm = 0x1F4
jmp 0x53f7b
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
movl %eax, 0x220(%rbx)
jmp 0x53f81
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
movl %eax, 0x210(%rbx)
jmp 0x53f81
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
movl %eax, 0x234(%rbx)
jmp 0x53f81
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
movl %eax, 0x88(%rbx)
jmp 0x53f81
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
jmp 0x53f7b
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x4a08c
movl %eax, %ebp
leaq 0x8918(%rbx), %r14
movq %r14, %rdi
callq 0x4750
cmpl $-0x2, 0x258(%rbx)
je 0x53bb4
orb $0x8, 0x24c(%rbx)
movq %r14, %rdi
jmp 0x53eaf
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
movl %eax, 0x250(%rbx)
jmp 0x53f81
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movq (%rax), %r14
movq 0x50(%rbx), %rdi
cmpq %rdi, %r14
je 0x53f81
testq %rdi, %rdi
je 0x53bfb
callq 0x4de72
movq %r14, 0x50(%rbx)
incl 0x30(%r14)
jmp 0x53f81
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movq (%rax), %r14
leaq 0x4764e(%rip), %rsi     # 0x9b26c
xorl %ebp, %ebp
leaq 0x4(%rsp), %rdx
movq %rsp, %rcx
movq %r14, %rdi
xorl %eax, %eax
callq 0x44a0
cmpl $0x2, %eax
jne 0x53c74
movl 0x4(%rsp), %ecx
movl %ecx, %esi
xorl $0x1, %esi
movl (%rsp), %edx
movl $0x1, %eax
orl %edx, %esi
je 0x53ee8
cmpl $0x2, %edx
setb %al
movl %ecx, %esi
andl $-0x2, %esi
cmpl $0x2, %esi
sete %sil
testb %al, %sil
je 0x53eb9
movl %edx, %ebp
movl %ecx, %eax
jmp 0x53ee8
leaq 0x4767c(%rip), %rsi     # 0x9b2f7
leaq 0x47686(%rip), %rdx     # 0x9b308
movl $0x1, %edi
movq %r14, %rcx
xorl %eax, %eax
callq 0x13de5
jmp 0x53565
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
movl %eax, 0x24c(%rbx)
cmpl $-0x2, 0x258(%rbx)
je 0x53f81
orl $0x8, %eax
movl %eax, 0x24c(%rbx)
jmp 0x53f81
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
movl %eax, 0x889c(%rbx)
movl %eax, 0x88a0(%rbx)
jmp 0x53f81
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
movl %eax, 0x22c(%rbx)
jmp 0x53f81
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
cmpl $0x3, %eax
je 0x53e58
cmpl $0x2, %eax
je 0x53e2a
testl %eax, %eax
jne 0x53f65
cmpl $0x5, 0x88(%rbx)
jne 0x53d38
movl $0x1, 0x88(%rbx)
movl $0x0, 0x240(%rbx)
movl $0x2710, %eax           # imm = 0x2710
jmp 0x53f5f
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
movl %eax, 0x254(%rbx)
jmp 0x53f81
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
movl %eax, 0x897c(%rbx)
movl %eax, 0x8980(%rbx)
movl %eax, 0x8984(%rbx)
jmp 0x53f81
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movq (%rax), %rcx
leaq 0x258(%rbx), %rax
movq 0x10(%rcx), %rdx
movq %rdx, 0x268(%rbx)
movups (%rcx), %xmm0
movups %xmm0, 0x258(%rbx)
movl (%rcx), %ecx
leal 0x4(%rcx), %edx
cmpl $0x2, %edx
jae 0x53dca
movl $0xfffffffe, (%rax)     # imm = 0xFFFFFFFE
jmp 0x53e9e
cmpl $-0x2, %ecx
jne 0x53e92
movl $0xffffffff, 0x258(%rbx) # imm = 0xFFFFFFFF
movq $0x0, 0x260(%rbx)
jmp 0x53e97
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movl (%rax), %eax
movl %eax, 0x244(%rbx)
jmp 0x53f81
movl $0x88b8, %ecx           # imm = 0x88B8
xorl %eax, %eax
movq %rax, (%rbx,%rcx)
movl $0x1, 0x248(%rbx)
movl $0x0, 0x88b0(%rbx)
jmp 0x53f81
cmpl $0x5, 0x88(%rbx)
jne 0x53e3d
movl $0x6, 0x88(%rbx)
movl $0x1, %eax
movl %eax, 0x230(%rbx)
movl %eax, 0x23c(%rbx)
movl $0x61a8, %eax           # imm = 0x61A8
jmp 0x53f5f
movl 0x88(%rbx), %ecx
cmpl $0x5, %ecx
jne 0x53f34
movl $0x7, 0x88(%rbx)
movl $0x1, %eax
movl %eax, 0x230(%rbx)
movl %eax, 0x23c(%rbx)
movl %eax, 0x244(%rbx)
movl $0x186a0, %eax          # imm = 0x186A0
jmp 0x53f5f
cmpl $-0x2, (%rax)
je 0x53e9e
orb $0x8, 0x24c(%rbx)
xorl %ebp, %ebp
movl %ebp, 0x8978(%rbx)
movl %ebp, 0x8890(%rbx)
movq %r15, %rdi
callq 0x4340
jmp 0x53f83
xorl $0x4, %ecx
leaq 0x47434(%rip), %rsi     # 0x9b2f7
orl %edx, %ecx
jne 0x53f90
leaq 0x4748d(%rip), %rdx     # 0x9b35f
movl $0x3, %edi
movq %r14, %rcx
xorl %eax, %eax
callq 0x13de5
movl 0x4(%rsp), %eax
movl (%rsp), %ebp
shll $0x8, %eax
addl %ebp, %eax
movl %eax, 0xc(%rbx)
movl $0x300, %ecx            # imm = 0x300
xorl %edx, %edx
cmpl %ecx, %eax
setge %dl
movl %edx, 0x234(%rbx)
movl %eax, %edx
andl $0xffffff00, %edx       # imm = 0xFFFFFF00
cmpl %ecx, %edx
sete %cl
testb %bpl, %bpl
setne %dl
andb %cl, %dl
cmpl $0x400, %eax            # imm = 0x400
setge %al
orb %dl, %al
movzbl %al, %eax
movl %eax, 0x240(%rbx)
movq %rbx, %rdi
callq 0x52983
jmp 0x53f81
movl $0x1, %eax
movl %eax, 0x230(%rbx)
movl %eax, 0x23c(%rbx)
movl %eax, 0x244(%rbx)
movl $0x186a0, %eax          # imm = 0x186A0
cmpl $0x8, %ecx
jl 0x53f5f
movl $0x1, 0x238(%rbx)
movl %eax, 0x214(%rbx)
cmpl $0x4c4b40, 0x218(%rbx)  # imm = 0x4C4B40
jne 0x53f81
imull $0x1f4, 0x214(%rbx), %eax # imm = 0x1F4
movl %eax, 0x218(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4738d(%rip), %rdx     # 0x9b324
movl $0x1, %edi
xorl %eax, %eax
callq 0x13de5
jmp 0x5389b