// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x350, %rsp            # imm = 0x350
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x7a034
callq 0x4050
movl $0x9, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7b31c
movl -0x14(%rbp), %eax
movq %rax, -0x68(%rbp)
subq $0x6a, %rax
ja 0x7b2e4
movq -0x68(%rbp), %rax
leaq 0x7ac8c(%rip), %rcx     # 0xf4cdc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
movl (%rax), %eax
movl %eax, -0x6c(%rbp)
cmpl $0x28, %eax
ja 0x7a084
movq -0x78(%rbp), %rcx
movl -0x6c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x80(%rbp)
jmp 0x7a09b
movq -0x78(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x210(%rax)
jmp 0x7b315
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x7a0c8
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x45a0
movq -0x20(%rbp), %rax
movq %rax, -0x90(%rbp)
movl (%rax), %eax
movl %eax, -0x84(%rbp)
cmpl $0x28, %eax
ja 0x7a102
movq -0x90(%rbp), %rcx
movl -0x84(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x98(%rbp)
jmp 0x7a11f
movq -0x90(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq (%rax), %rdi
callq 0x4920
movq -0x10(%rbp), %rcx
movq %rax, 0x20(%rcx)
cmpq $0x0, %rax
jne 0x7a148
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7b31c
jmp 0x7b315
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0xa8(%rbp)
movl (%rax), %eax
movl %eax, -0x9c(%rbp)
cmpl $0x28, %eax
ja 0x7a18c
movq -0xa8(%rbp), %rcx
movl -0x9c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0xb0(%rbp)
jmp 0x7a1a9
movq -0xa8(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x214(%rax)
movq -0x10(%rbp), %rax
cmpl $0x4c4b40, 0x218(%rax)  # imm = 0x4C4B40
jne 0x7a1e4
movq -0x10(%rbp), %rax
imull $0x1f4, 0x214(%rax), %ecx # imm = 0x1F4
movq -0x10(%rbp), %rax
movl %ecx, 0x218(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl (%rax), %eax
movl %eax, -0xb4(%rbp)
cmpl $0x28, %eax
ja 0x7a223
movq -0xc0(%rbp), %rcx
movl -0xb4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0xc8(%rbp)
jmp 0x7a240
movq -0xc0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x218(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0xd8(%rbp)
movl (%rax), %eax
movl %eax, -0xcc(%rbp)
cmpl $0x28, %eax
ja 0x7a292
movq -0xd8(%rbp), %rcx
movl -0xcc(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0xe0(%rbp)
jmp 0x7a2af
movq -0xd8(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x21c(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl (%rax), %eax
movl %eax, -0xe4(%rbp)
cmpl $0x28, %eax
ja 0x7a301
movq -0xf0(%rbp), %rcx
movl -0xe4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0xf8(%rbp)
jmp 0x7a31e
movq -0xf0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x220(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0x108(%rbp)
movl (%rax), %eax
movl %eax, -0xfc(%rbp)
cmpl $0x28, %eax
ja 0x7a370
movq -0x108(%rbp), %rcx
movl -0xfc(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x110(%rbp)
jmp 0x7a38d
movq -0x108(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x224(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0x120(%rbp)
movl (%rax), %eax
movl %eax, -0x114(%rbp)
cmpl $0x28, %eax
ja 0x7a3df
movq -0x120(%rbp), %rcx
movl -0x114(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x128(%rbp)
jmp 0x7a3fc
movq -0x120(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8a10(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0x138(%rbp)
movl (%rax), %eax
movl %eax, -0x12c(%rbp)
cmpl $0x28, %eax
ja 0x7a44e
movq -0x138(%rbp), %rcx
movl -0x12c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x140(%rbp)
jmp 0x7a46b
movq -0x138(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x22c(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0x150(%rbp)
movl (%rax), %eax
movl %eax, -0x144(%rbp)
cmpl $0x28, %eax
ja 0x7a4bd
movq -0x150(%rbp), %rcx
movl -0x144(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x158(%rbp)
jmp 0x7a4da
movq -0x150(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x897c(%rax)
movq -0x10(%rbp), %rax
movl 0x897c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8980(%rax)
movq -0x10(%rbp), %rax
movl 0x897c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8984(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0x168(%rbp)
movl (%rax), %eax
movl %eax, -0x15c(%rbp)
cmpl $0x28, %eax
ja 0x7a554
movq -0x168(%rbp), %rcx
movl -0x15c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x170(%rbp)
jmp 0x7a571
movq -0x168(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x230(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0x180(%rbp)
movl (%rax), %eax
movl %eax, -0x174(%rbp)
cmpl $0x28, %eax
ja 0x7a5c3
movq -0x180(%rbp), %rcx
movl -0x174(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x188(%rbp)
jmp 0x7a5e0
movq -0x180(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x234(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0x198(%rbp)
movl (%rax), %eax
movl %eax, -0x18c(%rbp)
cmpl $0x28, %eax
ja 0x7a632
movq -0x198(%rbp), %rcx
movl -0x18c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x1a0(%rbp)
jmp 0x7a64f
movq -0x198(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x1a0(%rbp)
movq -0x1a0(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x240(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movl (%rax), %eax
movl %eax, -0x1a4(%rbp)
cmpl $0x28, %eax
ja 0x7a6a1
movq -0x1b0(%rbp), %rcx
movl -0x1a4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x1b8(%rbp)
jmp 0x7a6be
movq -0x1b0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x1b8(%rbp)
movq -0x1b8(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x23c(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movl (%rax), %eax
movl %eax, -0x1bc(%rbp)
cmpl $0x28, %eax
ja 0x7a710
movq -0x1c8(%rbp), %rcx
movl -0x1bc(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x1d0(%rbp)
jmp 0x7a72d
movq -0x1c8(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x1d0(%rbp)
movq -0x1d0(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x244(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movl (%rax), %eax
movl %eax, -0x1d4(%rbp)
cmpl $0x28, %eax
ja 0x7a77f
movq -0x1e0(%rbp), %rcx
movl -0x1d4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x1e8(%rbp)
jmp 0x7a79c
movq -0x1e0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x1e8(%rbp)
movq -0x1e8(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x238(%rax)
jmp 0x7b315
movq -0x10(%rbp), %rax
movl $0x1, 0x248(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movl (%rax), %eax
movl %eax, -0x1ec(%rbp)
cmpl $0x28, %eax
ja 0x7a7fc
movq -0x1f8(%rbp), %rcx
movl -0x1ec(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x200(%rbp)
jmp 0x7a819
movq -0x1f8(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x200(%rbp)
movq -0x200(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x50(%rcx), %rax
je 0x7a86a
movq -0x10(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x7a84d
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x717d0
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movl 0x30(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x30(%rax)
jmp 0x7b315
movq -0x10(%rbp), %rax
movq %rax, -0x218(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x210(%rbp)
movl (%rax), %eax
movl %eax, -0x204(%rbp)
cmpl $0x28, %eax
ja 0x7a8b4
movq -0x210(%rbp), %rcx
movl -0x204(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x220(%rbp)
jmp 0x7a8d1
movq -0x210(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x220(%rbp)
movq -0x218(%rbp), %rdi
movq -0x220(%rbp), %rax
movq (%rax), %rsi
callq 0x6b660
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8918, %rdi           # imm = 0x8918
callq 0x4730
movq -0x10(%rbp), %rax
cmpl $-0x2, 0x258(%rax)
je 0x7a91a
movq -0x10(%rbp), %rax
movl 0x24c(%rax), %ecx
orl $0x8, %ecx
movl %ecx, 0x24c(%rax)
movq -0x10(%rbp), %rdi
addq $0x8918, %rdi           # imm = 0x8918
callq 0x4330
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x7b31c
movq -0x10(%rbp), %rdi
addq $0x8918, %rdi           # imm = 0x8918
callq 0x4730
movq -0x20(%rbp), %rax
movq %rax, -0x230(%rbp)
movl (%rax), %eax
movl %eax, -0x224(%rbp)
cmpl $0x28, %eax
ja 0x7a97f
movq -0x230(%rbp), %rcx
movl -0x224(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x238(%rbp)
jmp 0x7a99c
movq -0x230(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x238(%rbp)
movq -0x238(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x258(%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x260(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x268(%rax)
movq -0x38(%rbp), %rax
cmpl $-0x2, (%rax)
jne 0x7a9fa
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x258(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movq $0x0, 0x260(%rax)
jmp 0x7aa1c
movq -0x38(%rbp), %rax
cmpl $-0x3, (%rax)
je 0x7aa0c
movq -0x38(%rbp), %rax
cmpl $-0x4, (%rax)
jne 0x7aa1a
movq -0x10(%rbp), %rax
movl $0xfffffffe, 0x258(%rax) # imm = 0xFFFFFFFE
jmp 0x7aa1c
movq -0x10(%rbp), %rax
cmpl $-0x2, 0x258(%rax)
je 0x7aa3c
movq -0x10(%rbp), %rax
movl 0x24c(%rax), %ecx
orl $0x8, %ecx
movl %ecx, 0x24c(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x8978(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x8890(%rax)
movq -0x10(%rbp), %rdi
addq $0x8918, %rdi           # imm = 0x8918
callq 0x4330
movl $0x0, -0x4(%rbp)
jmp 0x7b31c
movq -0x10(%rbp), %rax
movq %rax, -0x250(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x248(%rbp)
movl (%rax), %eax
movl %eax, -0x23c(%rbp)
cmpl $0x28, %eax
ja 0x7aab9
movq -0x248(%rbp), %rcx
movl -0x23c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x258(%rbp)
jmp 0x7aad6
movq -0x248(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x258(%rbp)
movq -0x250(%rbp), %rdi
movq -0x258(%rbp), %rax
movq (%rax), %rsi
callq 0x73a80
movl %eax, -0x4(%rbp)
jmp 0x7b31c
movq -0x20(%rbp), %rax
movq %rax, -0x268(%rbp)
movl (%rax), %eax
movl %eax, -0x25c(%rbp)
cmpl $0x28, %eax
ja 0x7ab2e
movq -0x268(%rbp), %rcx
movl -0x25c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x270(%rbp)
jmp 0x7ab4b
movq -0x268(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x270(%rbp)
movq -0x270(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
leaq 0x7aedb(%rip), %rsi     # 0xf5a3f
leaq -0x3c(%rbp), %rdx
leaq -0x40(%rbp), %rcx
movb $0x0, %al
callq 0x4490
movl %eax, %ecx
movl $0x2, %eax
cmpl %ecx, %eax
je 0x7aba8
movq -0x48(%rbp), %rcx
movl $0x1, %edi
leaq 0x7af3c(%rip), %rsi     # 0xf5aca
leaq 0x7af46(%rip), %rdx     # 0xf5adb
movb $0x0, %al
callq 0x1b030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7b31c
cmpl $0x1, -0x3c(%rbp)
jne 0x7abb4
cmpl $0x0, -0x40(%rbp)
je 0x7ac15
cmpl $0x2, -0x3c(%rbp)
jne 0x7abc6
cmpl $0x0, -0x40(%rbp)
je 0x7ac15
cmpl $0x1, -0x40(%rbp)
je 0x7ac15
cmpl $0x3, -0x3c(%rbp)
jne 0x7abd8
cmpl $0x0, -0x40(%rbp)
je 0x7ac15
cmpl $0x1, -0x40(%rbp)
je 0x7ac15
cmpl $0x4, -0x3c(%rbp)
jne 0x7abe4
cmpl $0x0, -0x40(%rbp)
je 0x7ac15
movl $0x1, %edi
leaq 0x7aeda(%rip), %rsi     # 0xf5aca
leaq 0x7af00(%rip), %rdx     # 0xf5af7
movb $0x0, %al
callq 0x1b030
callq 0x4050
movl $0x16, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7b31c
cmpl $0x3, -0x3c(%rbp)
jg 0x7ac27
cmpl $0x3, -0x3c(%rbp)
jne 0x7ac45
cmpl $0x1, -0x40(%rbp)
jle 0x7ac45
movq -0x48(%rbp), %rcx
movl $0x3, %edi
leaq 0x7ae93(%rip), %rsi     # 0xf5aca
leaq 0x7aef4(%rip), %rdx     # 0xf5b32
movb $0x0, %al
callq 0x1b030
movl -0x3c(%rbp), %ecx
shll $0x8, %ecx
addl -0x40(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %edx
sarl $0x8, %edx
xorl %ecx, %ecx
movl $0x1, %eax
cmpl $0x3, %edx
cmovgel %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x234(%rax)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
sarl $0x8, %eax
cmpl $0x3, %eax
jne 0x7ac9f
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0xff, %ecx
movb $0x1, %al
cmpl $0x1, %ecx
movb %al, -0x271(%rbp)
jge 0x7acb5
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
sarl $0x8, %eax
cmpl $0x4, %eax
setge %al
movb %al, -0x271(%rbp)
movb -0x271(%rbp), %dl
xorl %ecx, %ecx
movl $0x1, %eax
testb $0x1, %dl
cmovnel %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x240(%rax)
movq -0x10(%rbp), %rdi
callq 0x791a0
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0x280(%rbp)
movl (%rax), %eax
movl %eax, -0x278(%rbp)
cmpl $0x28, %eax
ja 0x7ad1a
movq -0x280(%rbp), %rcx
movl -0x278(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x288(%rbp)
jmp 0x7ad37
movq -0x280(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x288(%rbp)
movq -0x288(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x889c(%rax)
movq -0x10(%rbp), %rax
movl %ecx, 0x88a0(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0x298(%rbp)
movl (%rax), %eax
movl %eax, -0x28c(%rbp)
cmpl $0x28, %eax
ja 0x7ad93
movq -0x298(%rbp), %rcx
movl -0x28c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x2a0(%rbp)
jmp 0x7adb0
movq -0x298(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x2a0(%rbp)
movq -0x2a0(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
cmpl $0x1, -0x4c(%rbp)
jl 0x7ae28
movl -0x4c(%rbp), %edi
callq 0x4daa0
movq -0x10(%rbp), %rcx
movq %rax, 0x88b8(%rcx)
cmpq $0x0, %rax
jne 0x7ade7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7b31c
movq -0x10(%rbp), %rax
movq 0x88b8(%rax), %rdi
movl -0x4c(%rbp), %esi
shll %esi
xorl %edx, %edx
callq 0x4d480
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x88c0(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x248(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x88b0(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0x2b0(%rbp)
movl (%rax), %eax
movl %eax, -0x2a4(%rbp)
cmpl $0x28, %eax
ja 0x7ae67
movq -0x2b0(%rbp), %rcx
movl -0x2a4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x2b8(%rbp)
jmp 0x7ae84
movq -0x2b0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x2b8(%rbp)
movq -0x2b8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x7aea9
movq -0x58(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x2c0(%rbp)
jmp 0x7aeb4
xorl %eax, %eax
movq %rax, -0x2c0(%rbp)
jmp 0x7aeb4
movq -0x2c0(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x88b8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x88b8(%rax)
je 0x7af39
movq -0x10(%rbp), %rax
movq 0x88b8(%rax), %rax
movq %rax, -0x2c8(%rbp)
movq -0x58(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x7aeff
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x2cc(%rbp)
jmp 0x7af17
movq -0x10(%rbp), %rax
movq 0x88b8(%rax), %rdi
callq 0x4e270
shll %eax
movl %eax, -0x2cc(%rbp)
movq -0x2c8(%rbp), %rdi
movl -0x2cc(%rbp), %esi
xorl %edx, %edx
callq 0x4d480
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x88c0(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x248(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x88b0(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0x2d8(%rbp)
movl (%rax), %eax
movl %eax, -0x2d0(%rbp)
cmpl $0x28, %eax
ja 0x7af94
movq -0x2d8(%rbp), %rcx
movl -0x2d0(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x2e0(%rbp)
jmp 0x7afb1
movq -0x2d8(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x2e0(%rbp)
movq -0x2e0(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x24c(%rax)
movq -0x10(%rbp), %rax
cmpl $-0x2, 0x258(%rax)
je 0x7afe4
movq -0x10(%rbp), %rax
movl 0x24c(%rax), %ecx
orl $0x8, %ecx
movl %ecx, 0x24c(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0x2f0(%rbp)
movl (%rax), %eax
movl %eax, -0x2e4(%rbp)
cmpl $0x28, %eax
ja 0x7b023
movq -0x2f0(%rbp), %rcx
movl -0x2e4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x2f8(%rbp)
jmp 0x7b040
movq -0x2f0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x2f8(%rbp)
movq -0x2f8(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x250(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0x308(%rbp)
movl (%rax), %eax
movl %eax, -0x2fc(%rbp)
cmpl $0x28, %eax
ja 0x7b092
movq -0x308(%rbp), %rcx
movl -0x2fc(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x310(%rbp)
jmp 0x7b0af
movq -0x308(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x310(%rbp)
movq -0x310(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x254(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0x320(%rbp)
movl (%rax), %eax
movl %eax, -0x314(%rbp)
cmpl $0x28, %eax
ja 0x7b101
movq -0x320(%rbp), %rcx
movl -0x314(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x328(%rbp)
jmp 0x7b11e
movq -0x320(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x328(%rbp)
movq -0x328(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x88(%rax)
jmp 0x7b315
movq -0x20(%rbp), %rax
movq %rax, -0x338(%rbp)
movl (%rax), %eax
movl %eax, -0x32c(%rbp)
cmpl $0x28, %eax
ja 0x7b170
movq -0x338(%rbp), %rcx
movl -0x32c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x340(%rbp)
jmp 0x7b18d
movq -0x338(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x340(%rbp)
movq -0x340(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq %rax, -0x348(%rbp)
subq $0x3, %rax
ja 0x7b2ba
movq -0x348(%rbp), %rax
leaq 0x79ccd(%rip), %rcx     # 0xf4e88
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
cmpl $0x5, 0x88(%rax)
jne 0x7b1df
movq -0x10(%rbp), %rax
movl $0x1, 0x88(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x240(%rax)
movq -0x10(%rbp), %rax
movl $0x2710, 0x214(%rax)    # imm = 0x2710
jmp 0x7b2ba
jmp 0x7b2ba
movq -0x10(%rbp), %rax
cmpl $0x5, 0x88(%rax)
jne 0x7b220
movq -0x10(%rbp), %rax
movl $0x6, 0x88(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x230(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x23c(%rax)
movq -0x10(%rbp), %rax
movl $0x61a8, 0x214(%rax)    # imm = 0x61A8
jmp 0x7b2ba
movq -0x10(%rbp), %rax
cmpl $0x5, 0x88(%rax)
jne 0x7b267
movq -0x10(%rbp), %rax
movl $0x7, 0x88(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x230(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x23c(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x244(%rax)
movq -0x10(%rbp), %rax
cmpl $0x7, 0x88(%rax)
jle 0x7b2ac
movq -0x10(%rbp), %rax
movl $0x1, 0x238(%rax)
movq -0x10(%rbp), %rax
movl $0x186a0, 0x214(%rax)   # imm = 0x186A0
movq -0x10(%rbp), %rax
cmpl $0x4c4b40, 0x218(%rax)  # imm = 0x4C4B40
jne 0x7b2e2
movq -0x10(%rbp), %rax
imull $0x1f4, 0x214(%rax), %ecx # imm = 0x1F4
movq -0x10(%rbp), %rax
movl %ecx, 0x218(%rax)
jmp 0x7b315
movl -0x14(%rbp), %ecx
movl $0x1, %edi
leaq 0x7a7d7(%rip), %rsi     # 0xf5aca
leaq 0x7a8be(%rip), %rdx     # 0xf5bb8
movb $0x0, %al
callq 0x1b030
callq 0x4050
movl $0x16, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7b31c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x350, %rsp            # imm = 0x350
popq %rbp
retq
nopl (%rax,%rax)