// File: karel-brinda[P]ococo/ext/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:
	fd->verbose = va_arg(args, int);
	break;

    case CRAM_OPT_SEQS_PER_SLICE:
	fd->seqs_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_IGNORE_MD5:
	fd->ignore_md5 = va_arg(args, int);
	break;

    case CRAM_OPT_LOSSY_NAMES:
	fd->lossy_read_names = va_arg(args, int);
	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_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:
	fd->range = *va_arg(args, cram_range *);
	return cram_seek_to_refpos(fd, &fd->range);

    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)) {
	    fprintf(stderr, "Malformed version string %s\n", s);
	    return -1;
	}
	if (!((major == 1 &&  minor == 0) ||
	      (major == 2 && (minor == 0 || minor == 1)) ||
	      (major == 3 &&  minor == 0))) {
	    fprintf(stderr, "Unknown version string; "
		    "use 1.0, 2.0, 2.1 or 3.0\n");
	    errno = EINVAL;
	    return -1;
	}
	fd->version = major*256 + minor;

	if (CRAM_MAJOR_VERS(fd->version) >= 3)
	    fd->use_rans = 1;
	break;
    }

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

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

	    fd->rqueue = t_results_queue_init();
	    pthread_mutex_init(&fd->metrics_lock, NULL);
	    pthread_mutex_init(&fd->ref_lock, NULL);
	    pthread_mutex_init(&fd->bam_list_lock, NULL);
	    fd->shared_ref = 1;
	    fd->own_pool = 1;
        }
	break;
    }

    case CRAM_OPT_THREAD_POOL:
	fd->pool = va_arg(args, t_pool *);
	if (fd->pool) {
	    fd->rqueue = t_results_queue_init();
	    pthread_mutex_init(&fd->metrics_lock, NULL);
	    pthread_mutex_init(&fd->ref_lock, NULL);
	    pthread_mutex_init(&fd->bam_list_lock, NULL);
	}
	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 *));
	//t_pool_dispatch(fd->pool, cram_decoder_thread, fd);
	break;

    case CRAM_OPT_REQUIRED_FIELDS:
	fd->required_fields = va_arg(args, int);
	break;

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

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

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x52af4
callq 0x4070
movl $0x9, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x536cc
movl -0x14(%rbp), %eax
movq %rax, -0x48(%rbp)
subq $0x64, %rax
ja 0x53696
movq -0x48(%rbp), %rax
leaq 0x29f18(%rip), %rcx     # 0x7ca28
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
cmpl $0x28, %eax
ja 0x52b44
movq -0x58(%rbp), %rcx
movl -0x4c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x60(%rbp)
jmp 0x52b5b
movq -0x58(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x1f8(%rax)
jmp 0x536c5
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x52b88
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x46a0
movq -0x20(%rbp), %rax
movq %rax, -0x70(%rbp)
movl (%rax), %eax
movl %eax, -0x64(%rbp)
cmpl $0x28, %eax
ja 0x52bb3
movq -0x70(%rbp), %rcx
movl -0x64(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x78(%rbp)
jmp 0x52bca
movq -0x70(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq (%rax), %rdi
callq 0x4aa0
movq -0x10(%rbp), %rcx
movq %rax, 0x20(%rcx)
cmpq $0x0, %rax
jne 0x52bf0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x536cc
jmp 0x536c5
movq -0x20(%rbp), %rax
movq %rax, -0x88(%rbp)
movl (%rax), %eax
movl %eax, -0x7c(%rbp)
cmpl $0x28, %eax
ja 0x52c29
movq -0x88(%rbp), %rcx
movl -0x7c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x90(%rbp)
jmp 0x52c46
movq -0x88(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x1fc(%rax)
jmp 0x536c5
movq -0x20(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl (%rax), %eax
movl %eax, -0x94(%rbp)
cmpl $0x28, %eax
ja 0x52c98
movq -0xa0(%rbp), %rcx
movl -0x94(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0xa8(%rbp)
jmp 0x52cb5
movq -0xa0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x200(%rax)
jmp 0x536c5
movq -0x20(%rbp), %rax
movq %rax, -0xb8(%rbp)
movl (%rax), %eax
movl %eax, -0xac(%rbp)
cmpl $0x28, %eax
ja 0x52d07
movq -0xb8(%rbp), %rcx
movl -0xac(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0xc0(%rbp)
jmp 0x52d24
movq -0xb8(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x204(%rax)
jmp 0x536c5
movq -0x20(%rbp), %rax
movq %rax, -0xd0(%rbp)
movl (%rax), %eax
movl %eax, -0xc4(%rbp)
cmpl $0x28, %eax
ja 0x52d76
movq -0xd0(%rbp), %rcx
movl -0xc4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0xd8(%rbp)
jmp 0x52d93
movq -0xd0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x208(%rax)
jmp 0x536c5
movq -0x20(%rbp), %rax
movq %rax, -0xe8(%rbp)
movl (%rax), %eax
movl %eax, -0xdc(%rbp)
cmpl $0x28, %eax
ja 0x52de5
movq -0xe8(%rbp), %rcx
movl -0xdc(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0xf0(%rbp)
jmp 0x52e02
movq -0xe8(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20c(%rax)
jmp 0x536c5
movq -0x20(%rbp), %rax
movq %rax, -0x100(%rbp)
movl (%rax), %eax
movl %eax, -0xf4(%rbp)
cmpl $0x28, %eax
ja 0x52e54
movq -0x100(%rbp), %rcx
movl -0xf4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x108(%rbp)
jmp 0x52e71
movq -0x100(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x210(%rax)
jmp 0x536c5
movq -0x20(%rbp), %rax
movq %rax, -0x118(%rbp)
movl (%rax), %eax
movl %eax, -0x10c(%rbp)
cmpl $0x28, %eax
ja 0x52ec3
movq -0x118(%rbp), %rcx
movl -0x10c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x120(%rbp)
jmp 0x52ee0
movq -0x118(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x88fc(%rax)
jmp 0x536c5
movq -0x20(%rbp), %rax
movq %rax, -0x130(%rbp)
movl (%rax), %eax
movl %eax, -0x124(%rbp)
cmpl $0x28, %eax
ja 0x52f32
movq -0x130(%rbp), %rcx
movl -0x124(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x138(%rbp)
jmp 0x52f4f
movq -0x130(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x214(%rax)
jmp 0x536c5
movq -0x20(%rbp), %rax
movq %rax, -0x148(%rbp)
movl (%rax), %eax
movl %eax, -0x13c(%rbp)
cmpl $0x28, %eax
ja 0x52fa1
movq -0x148(%rbp), %rcx
movl -0x13c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x150(%rbp)
jmp 0x52fbe
movq -0x148(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x218(%rax)
jmp 0x536c5
movq -0x20(%rbp), %rax
movq %rax, -0x160(%rbp)
movl (%rax), %eax
movl %eax, -0x154(%rbp)
cmpl $0x28, %eax
ja 0x53010
movq -0x160(%rbp), %rcx
movl -0x154(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x168(%rbp)
jmp 0x5302d
movq -0x160(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x168(%rbp)
movq -0x168(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x21c(%rax)
jmp 0x536c5
movq -0x10(%rbp), %rax
movl $0x1, 0x220(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x178(%rbp)
movl (%rax), %eax
movl %eax, -0x16c(%rbp)
cmpl $0x28, %eax
ja 0x5308d
movq -0x178(%rbp), %rcx
movl -0x16c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x180(%rbp)
jmp 0x530aa
movq -0x178(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x180(%rbp)
movq -0x180(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x48(%rcx), %rax
je 0x530fb
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x530de
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x48510
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movl 0x30(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x30(%rax)
jmp 0x536c5
movq -0x10(%rbp), %rax
addq $0x228, %rax            # imm = 0x228
movq %rax, -0x198(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x190(%rbp)
movl (%rax), %eax
movl %eax, -0x184(%rbp)
cmpl $0x28, %eax
ja 0x5314b
movq -0x190(%rbp), %rcx
movl -0x184(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x1a0(%rbp)
jmp 0x53168
movq -0x190(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x1a0(%rbp)
movq -0x198(%rbp), %rax
movq -0x1a0(%rbp), %rcx
movq (%rcx), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x228, %rsi            # imm = 0x228
callq 0x42750
movl %eax, -0x4(%rbp)
jmp 0x536cc
movq -0x10(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movl (%rax), %eax
movl %eax, -0x1a4(%rbp)
cmpl $0x28, %eax
ja 0x531e6
movq -0x1b0(%rbp), %rcx
movl -0x1a4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x1c0(%rbp)
jmp 0x53203
movq -0x1b0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x1c0(%rbp)
movq -0x1b8(%rbp), %rdi
movq -0x1c0(%rbp), %rax
movq (%rax), %rsi
callq 0x4a770
movl %eax, -0x4(%rbp)
jmp 0x536cc
movq -0x20(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movl (%rax), %eax
movl %eax, -0x1c4(%rbp)
cmpl $0x28, %eax
ja 0x5325b
movq -0x1d0(%rbp), %rcx
movl -0x1c4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x1d8(%rbp)
jmp 0x53278
movq -0x1d0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x1d8(%rbp)
movq -0x1d8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
leaq 0x2bcd9(%rip), %rsi     # 0x7ef6a
leaq -0x2c(%rbp), %rdx
leaq -0x30(%rbp), %rcx
movb $0x0, %al
callq 0x4560
movl %eax, %ecx
movl $0x2, %eax
cmpl %ecx, %eax
je 0x532d3
movq 0x36d1e(%rip), %rax     # 0x89fd0
movq (%rax), %rdi
movq -0x38(%rbp), %rdx
leaq 0x29dd5(%rip), %rsi     # 0x7d095
movb $0x0, %al
callq 0x4830
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x536cc
cmpl $0x1, -0x2c(%rbp)
jne 0x532df
cmpl $0x0, -0x30(%rbp)
je 0x5332c
cmpl $0x2, -0x2c(%rbp)
jne 0x532f1
cmpl $0x0, -0x30(%rbp)
je 0x5332c
cmpl $0x1, -0x30(%rbp)
je 0x5332c
cmpl $0x3, -0x2c(%rbp)
jne 0x532fd
cmpl $0x0, -0x30(%rbp)
je 0x5332c
movq 0x36ccc(%rip), %rax     # 0x89fd0
movq (%rax), %rdi
leaq 0x29da4(%rip), %rsi     # 0x7d0b2
movb $0x0, %al
callq 0x4830
callq 0x4070
movl $0x16, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x536cc
movl -0x2c(%rbp), %ecx
shll $0x8, %ecx
addl -0x30(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
sarl $0x8, %eax
cmpl $0x3, %eax
jl 0x53359
movq -0x10(%rbp), %rax
movl $0x1, 0x218(%rax)
jmp 0x536c5
movq -0x20(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movl (%rax), %eax
movl %eax, -0x1dc(%rbp)
cmpl $0x28, %eax
ja 0x53398
movq -0x1e8(%rbp), %rcx
movl -0x1dc(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x1f0(%rbp)
jmp 0x533b5
movq -0x1e8(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x1f0(%rbp)
movq -0x1f0(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8850(%rax)
jmp 0x536c5
movq -0x20(%rbp), %rax
movq %rax, -0x200(%rbp)
movl (%rax), %eax
movl %eax, -0x1f4(%rbp)
cmpl $0x28, %eax
ja 0x53407
movq -0x200(%rbp), %rcx
movl -0x1f4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x208(%rbp)
jmp 0x53424
movq -0x200(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x208(%rbp)
movq -0x208(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
cmpl $0x1, -0x3c(%rbp)
jle 0x534cf
movl -0x3c(%rbp), %edi
shll %edi
movl -0x3c(%rbp), %esi
callq 0x605e0
movq -0x10(%rbp), %rcx
movq %rax, 0x8860(%rcx)
cmpq $0x0, %rax
jne 0x53464
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x536cc
callq 0x604f0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8868(%rax)
movq -0x10(%rbp), %rdi
addq $0x8870, %rdi           # imm = 0x8870
xorl %eax, %eax
movl %eax, %esi
callq 0x48a0
movq -0x10(%rbp), %rdi
addq $0x8898, %rdi           # imm = 0x8898
xorl %eax, %eax
movl %eax, %esi
callq 0x48a0
movq -0x10(%rbp), %rdi
addq $0x88c8, %rdi           # imm = 0x88C8
xorl %eax, %eax
movl %eax, %esi
callq 0x48a0
movq -0x10(%rbp), %rax
movl $0x1, 0x220(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x885c(%rax)
jmp 0x536c5
movq -0x20(%rbp), %rax
movq %rax, -0x218(%rbp)
movl (%rax), %eax
movl %eax, -0x20c(%rbp)
cmpl $0x28, %eax
ja 0x5350e
movq -0x218(%rbp), %rcx
movl -0x20c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x220(%rbp)
jmp 0x5352b
movq -0x218(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x220(%rbp)
movq -0x220(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8860(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8860(%rax)
je 0x5359d
callq 0x604f0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8868(%rax)
movq -0x10(%rbp), %rdi
addq $0x8870, %rdi           # imm = 0x8870
xorl %eax, %eax
movl %eax, %esi
callq 0x48a0
movq -0x10(%rbp), %rdi
addq $0x8898, %rdi           # imm = 0x8898
xorl %eax, %eax
movl %eax, %esi
callq 0x48a0
movq -0x10(%rbp), %rdi
addq $0x88c8, %rdi           # imm = 0x88C8
xorl %eax, %eax
movl %eax, %esi
callq 0x48a0
movq -0x10(%rbp), %rax
movl $0x1, 0x220(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x885c(%rax)
jmp 0x536c5
movq -0x20(%rbp), %rax
movq %rax, -0x230(%rbp)
movl (%rax), %eax
movl %eax, -0x224(%rbp)
cmpl $0x28, %eax
ja 0x535f8
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 0x53615
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
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x224(%rax)
jmp 0x536c5
movq -0x20(%rbp), %rax
movq %rax, -0x248(%rbp)
movl (%rax), %eax
movl %eax, -0x23c(%rbp)
cmpl $0x28, %eax
ja 0x53667
movq -0x248(%rbp), %rcx
movl -0x23c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x250(%rbp)
jmp 0x53684
movq -0x248(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x250(%rbp)
movq -0x250(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x78(%rax)
jmp 0x536c5
movq 0x36933(%rip), %rax     # 0x89fd0
movq (%rax), %rdi
movl -0x14(%rbp), %edx
leaq 0x29a3a(%rip), %rsi     # 0x7d0e4
movb $0x0, %al
callq 0x4830
callq 0x4070
movl $0x16, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x536cc
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
nopl (%rax,%rax)