// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_plcmd.c
// Function: mpileup
static int mpileup(mplp_conf_t *conf, int n, char **fn)
{
	extern void *bcf_call_add_rg(void *rghash, const char *hdtext, const char *list);
	extern void bcf_call_del_rghash(void *rghash);
	mplp_aux_t **data;
	int i, tid, pos, *n_plp, tid0 = -1, beg0 = 0, end0 = 1u<<29, ref_len, ref_tid = -1, max_depth, max_indel_depth;
	const bam_pileup1_t **plp;
	bam_mplp_t iter;
	bam_header_t *h = 0;
	char *ref;
	void *rghash = 0;

	bcf_callaux_t *bca = 0;
	bcf_callret1_t *bcr = 0;
	bcf_call_t bc;
	bcf_t *bp = 0;
	bcf_hdr_t *bh = 0;

	bam_sample_t *sm = 0;
	kstring_t buf;
	mplp_pileup_t gplp;

	memset(&gplp, 0, sizeof(mplp_pileup_t));
	memset(&buf, 0, sizeof(kstring_t));
	memset(&bc, 0, sizeof(bcf_call_t));
	data = calloc(n, sizeof(void*));
	plp = calloc(n, sizeof(void*));
	n_plp = calloc(n, sizeof(int*));
	sm = bam_smpl_init();

	// read the header and initialize data
	for (i = 0; i < n; ++i) {
		bam_header_t *h_tmp;
		data[i] = calloc(1, sizeof(mplp_aux_t));
		data[i]->fp = strcmp(fn[i], "-") == 0? bam_dopen(fileno(stdin), "r") : bam_open(fn[i], "r");
        if ( !data[i]->fp )
        {
            fprintf(stderr, "[%s] failed to open %s: %s\n", __func__, fn[i], strerror(errno));
            exit(1);
        }
		data[i]->conf = conf;
		h_tmp = bam_header_read(data[i]->fp);
        if ( !h_tmp ) {
            fprintf(stderr,"[%s] fail to read the header of %s\n", __func__, fn[i]);
            exit(1);
        }
		data[i]->h = i? h : h_tmp; // for i==0, "h" has not been set yet
		bam_smpl_add(sm, fn[i], (conf->flag&MPLP_IGNORE_RG)? 0 : h_tmp->text);
		rghash = bcf_call_add_rg(rghash, h_tmp->text, conf->pl_list);
		if (conf->reg) {
			int beg, end;
			bam_index_t *idx;
			idx = bam_index_load(fn[i]);
			if (idx == 0) {
				fprintf(stderr, "[%s] fail to load index for %s\n", __func__, fn[i]);
				exit(1);
			}
			if (bam_parse_region(h_tmp, conf->reg, &tid, &beg, &end) < 0) {
				fprintf(stderr, "[%s] malformatted region or wrong seqname for %s\n", __func__, fn[i]);
				exit(1);
			}
			if (i == 0) tid0 = tid, beg0 = beg, end0 = end;
			data[i]->iter = bam_iter_query(idx, tid, beg, end);
			bam_index_destroy(idx);
		}
		if (i == 0) h = h_tmp;
		else {
			// FIXME: to check consistency
			bam_header_destroy(h_tmp);
		}
	}
	gplp.n = sm->n;
	gplp.n_plp = calloc(sm->n, sizeof(int));
	gplp.m_plp = calloc(sm->n, sizeof(int));
	gplp.plp = calloc(sm->n, sizeof(void*));

	fprintf(stderr, "[%s] %d samples in %d input files\n", __func__, sm->n, n);
	// write the VCF header
	if (conf->flag & MPLP_GLF) {
		kstring_t s;
		bh = calloc(1, sizeof(bcf_hdr_t));
		s.l = s.m = 0; s.s = 0;
		bp = bcf_open("-", (conf->flag&MPLP_NO_COMP)? "wu" : "w");
		for (i = 0; i < h->n_targets; ++i) {
			kputs(h->target_name[i], &s);
			kputc('\0', &s);
		}
		bh->l_nm = s.l;
		bh->name = malloc(s.l);
		memcpy(bh->name, s.s, s.l);
		s.l = 0;
		for (i = 0; i < sm->n; ++i) {
			kputs(sm->smpl[i], &s); kputc('\0', &s);
		}
		bh->l_smpl = s.l;
		bh->sname = malloc(s.l);
		memcpy(bh->sname, s.s, s.l);
        s.l = 0;
        ksprintf(&s, "##samtoolsVersion=%s\n", BAM_VERSION);
        if (conf->fai_fname) ksprintf(&s, "##reference=file://%s\n", conf->fai_fname);
        h->dict = sam_header_parse2(h->text);
        int nseq;
        const char *tags[] = {"SN","LN","UR","M5",NULL};
        char **tbl = sam_header2tbl_n(h->dict, "SQ", tags, &nseq);
        for (i=0; i<nseq; i++)
        {
            ksprintf(&s, "##contig=<ID=%s", tbl[4*i]);
            if ( tbl[4*i+1] ) ksprintf(&s, ",length=%s", tbl[4*i+1]);
            if ( tbl[4*i+2] ) ksprintf(&s, ",URL=%s", tbl[4*i+2]);
            if ( tbl[4*i+3] ) ksprintf(&s, ",md5=%s", tbl[4*i+3]);
            kputs(">\n", &s);
        }
        if (tbl) free(tbl);
		bh->txt = s.s;
		bh->l_txt = 1 + s.l;
		bcf_hdr_sync(bh);
		bcf_hdr_write(bp, bh);
		bca = bcf_call_init(-1., conf->min_baseQ);
		bcr = calloc(sm->n, sizeof(bcf_callret1_t));
		bca->rghash = rghash;
		bca->openQ = conf->openQ, bca->extQ = conf->extQ, bca->tandemQ = conf->tandemQ;
		bca->min_frac = conf->min_frac;
		bca->min_support = conf->min_support;
        bca->per_sample_flt = conf->flag & MPLP_PER_SAMPLE;
	}
	if (tid0 >= 0 && conf->fai) { // region is set
		ref = faidx_fetch_seq(conf->fai, h->target_name[tid0], 0, 0x7fffffff, &ref_len);
		ref_tid = tid0;
		for (i = 0; i < n; ++i) data[i]->ref = ref, data[i]->ref_id = tid0;
	} else ref_tid = -1, ref = 0;
	iter = bam_mplp_init(n, mplp_func, (void**)data);
	max_depth = conf->max_depth;
	if (max_depth * sm->n > 1<<20)
		fprintf(stderr, "(%s) Max depth is above 1M. Potential memory hog!\n", __func__);
	if (max_depth * sm->n < 8000) {
		max_depth = 8000 / sm->n;
		fprintf(stderr, "<%s> Set max per-file depth to %d\n", __func__, max_depth);
	}
	max_indel_depth = conf->max_indel_depth * sm->n;
	bam_mplp_set_maxcnt(iter, max_depth);
	while (bam_mplp_auto(iter, &tid, &pos, n_plp, plp) > 0) {
		if (conf->reg && (pos < beg0 || pos >= end0)) continue; // out of the region requested
		if (conf->bed && tid >= 0 && !bed_overlap(conf->bed, h->target_name[tid], pos, pos+1)) continue;
		if (tid != ref_tid) {
			free(ref); ref = 0;
			if (conf->fai) ref = faidx_fetch_seq(conf->fai, h->target_name[tid], 0, 0x7fffffff, &ref_len);
			for (i = 0; i < n; ++i) data[i]->ref = ref, data[i]->ref_id = tid;
			ref_tid = tid;
		}
		if (conf->flag & MPLP_GLF) {
			int total_depth, _ref0, ref16;
			bcf1_t *b = calloc(1, sizeof(bcf1_t));
			for (i = total_depth = 0; i < n; ++i) total_depth += n_plp[i];
			group_smpl(&gplp, sm, &buf, n, fn, n_plp, plp, conf->flag & MPLP_IGNORE_RG);
			_ref0 = (ref && pos < ref_len)? ref[pos] : 'N';
			ref16 = bam_nt16_table[_ref0];
			for (i = 0; i < gplp.n; ++i)
				bcf_call_glfgen(gplp.n_plp[i], gplp.plp[i], ref16, bca, bcr + i);
			bcf_call_combine(gplp.n, bcr, bca, ref16, &bc);
			bcf_call2bcf(tid, pos, &bc, b, bcr, conf->fmt_flag, 0, 0);
			bcf_write(bp, bh, b);
			bcf_destroy(b);
			// call indels
			if (!(conf->flag&MPLP_NO_INDEL) && total_depth < max_indel_depth && bcf_call_gap_prep(gplp.n, gplp.n_plp, gplp.plp, pos, bca, ref, rghash) >= 0) {
				for (i = 0; i < gplp.n; ++i)
					bcf_call_glfgen(gplp.n_plp[i], gplp.plp[i], -1, bca, bcr + i);
				if (bcf_call_combine(gplp.n, bcr, bca, -1, &bc) >= 0) {
					b = calloc(1, sizeof(bcf1_t));
					bcf_call2bcf(tid, pos, &bc, b, bcr, conf->fmt_flag, bca, ref);
					bcf_write(bp, bh, b);
					bcf_destroy(b);
				}
			}
		} else {
			printf("%s\t%d\t%c", h->target_name[tid], pos + 1, (ref && pos < ref_len)? ref[pos] : 'N');
			for (i = 0; i < n; ++i) {
				int j, cnt;
				for (j = cnt = 0; j < n_plp[i]; ++j) {
					const bam_pileup1_t *p = plp[i] + j;
					if (bam1_qual(p->b)[p->qpos] >= conf->min_baseQ) ++cnt;
				}
				printf("\t%d\t", cnt);
				if (n_plp[i] == 0) {
					printf("*\t*"); // FIXME: printf() is very slow...
					if (conf->flag & MPLP_PRINT_POS) printf("\t*");
				} else {
					for (j = 0; j < n_plp[i]; ++j) {
						const bam_pileup1_t *p = plp[i] + j;
						if (bam1_qual(p->b)[p->qpos] >= conf->min_baseQ)
							pileup_seq(plp[i] + j, pos, ref_len, ref);
					}
					putchar('\t');
					for (j = 0; j < n_plp[i]; ++j) {
						const bam_pileup1_t *p = plp[i] + j;
						int c = bam1_qual(p->b)[p->qpos];
						if (c >= conf->min_baseQ) {
							c = c + 33 < 126? c + 33 : 126;
							putchar(c);
						}
					}
					if (conf->flag & MPLP_PRINT_MAPQ) {
						putchar('\t');
						for (j = 0; j < n_plp[i]; ++j) {
							int c = plp[i][j].b->core.qual + 33;
							if (c > 126) c = 126;
							putchar(c);
						}
					}
					if (conf->flag & MPLP_PRINT_POS) {
						putchar('\t');
						for (j = 0; j < n_plp[i]; ++j) {
							if (j > 0) putchar(',');
							printf("%d", plp[i][j].qpos + 1); // FIXME: printf() is very slow...
						}
					}
				}
			}
			putchar('\n');
		}
	}

	bcf_close(bp);
	bam_smpl_destroy(sm); free(buf.s);
	for (i = 0; i < gplp.n; ++i) free(gplp.plp[i]);
	free(gplp.plp); free(gplp.n_plp); free(gplp.m_plp);
	bcf_call_del_rghash(rghash);
	bcf_hdr_destroy(bh); bcf_call_destroy(bca); free(bc.PL); free(bcr);
	bam_mplp_destroy(iter);
	bam_header_destroy(h);
	for (i = 0; i < n; ++i) {
		bam_close(data[i]->fp);
		if (data[i]->iter) bam_iter_destroy(data[i]->iter);
		free(data[i]);
	}
	free(data); free(plp); free(ref); free(n_plp);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdx, 0x88(%rsp)
movl %esi, %r14d
movq %rdi, 0x50(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x140(%rsp)
movq $0x0, 0x150(%rsp)
leaq 0x160(%rsp), %rdi
movq $0x0, 0xd0(%rsp)
movl $0xa8, %edx
xorl %esi, %esi
callq 0x3080
movslq %r14d, %rbx
movl $0x8, %esi
movq %rbx, %rdi
callq 0x3610
movq %rax, %rbp
movl $0x8, %esi
movq %rbx, %rdi
callq 0x3610
movq %rax, 0xb0(%rsp)
movl $0x8, %esi
movq %rbx, %rdi
callq 0x3610
movq %rax, 0xd8(%rsp)
callq 0x16404
movq %rax, 0x78(%rsp)
movl %r14d, 0x34(%rsp)
movl %r14d, %eax
testl %ebx, %ebx
movq %rbp, 0x70(%rsp)
movq %rax, 0x68(%rsp)
jle 0x80ec
leaq (,%rax,8), %r14
movl $0x20000000, 0x84(%rsp) # imm = 0x20000000
xorl %r15d, %r15d
movl $0xffffffff, 0x58(%rsp) # imm = 0xFFFFFFFF
leaq 0x3cd61(%rip), %r12     # 0x44c6f
movq $0x0, 0xd0(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0xa0(%rsp)
movl $0x1, %edi
movl $0x30, %esi
callq 0x3610
movq %rax, (%rbp,%r15)
movq 0x88(%rsp), %rax
movq (%rax,%r15), %r13
movq %r13, %rdi
leaq 0x36eff(%rip), %rsi     # 0x3ee58
callq 0x35a0
testl %eax, %eax
je 0x7f6f
movq %r13, %rdi
movq %r12, %rsi
callq 0x1fdb8
jmp 0x7f88
movq 0x4705a(%rip), %rax     # 0x4efd0
movq (%rax), %rdi
callq 0x3030
movl %eax, %edi
movq %r12, %rsi
callq 0x1ff6b
movq (%rbp,%r15), %rcx
movq %rax, (%rcx)
movq (%rbp,%r15), %rax
cmpq $0x0, (%rax)
je 0x963f
movq 0x50(%rsp), %rbx
movq %rbx, 0x28(%rax)
movq (%rbp,%r15), %rax
movq (%rax), %rdi
callq 0x22efa
testq %rax, %rax
je 0x964f
movq %rax, %r13
testq %r15, %r15
cmovneq 0x48(%rsp), %rax
movq (%rbp,%r15), %rcx
movq %rax, 0x10(%rcx)
testb $0x20, 0x9(%rbx)
jne 0x7fdf
movq 0x38(%r13), %rdx
jmp 0x7fe1
xorl %edx, %edx
movq 0x88(%rsp), %rbp
movq (%rbp,%r15), %rsi
movq 0x78(%rsp), %rdi
callq 0x1652b
movq 0x38(%r13), %rsi
movq 0x50(%rsp), %rbx
movq 0x48(%rbx), %rdx
movq 0xa0(%rsp), %rdi
callq 0x131b3
movq %rax, 0xa0(%rsp)
cmpq $0x0, 0x40(%rbx)
je 0x80c4
movq (%rbp,%r15), %rdi
callq 0x29a74
testq %rax, %rax
je 0x965f
movq %rax, %rbp
movq 0x50(%rsp), %rax
movq 0x40(%rax), %rsi
movq %r13, %rdi
leaq 0x30(%rsp), %rdx
leaq 0x100(%rsp), %rcx
leaq 0x10(%rsp), %r8
callq 0x22482
testl %eax, %eax
js 0x966f
testq %r15, %r15
movl 0x30(%rsp), %esi
movl 0x100(%rsp), %edx
movl 0x10(%rsp), %ecx
movl 0x84(%rsp), %eax
cmovel %ecx, %eax
movl %eax, 0x84(%rsp)
movq 0xd0(%rsp), %rax
cmovel %edx, %eax
movq %rax, 0xd0(%rsp)
movl 0x58(%rsp), %eax
cmovel %esi, %eax
movl %eax, 0x58(%rsp)
movq %rbp, %rdi
callq 0x29dc7
movq 0x70(%rsp), %rcx
movq (%rcx,%r15), %rcx
movq %rax, 0x8(%rcx)
movq %rbp, %rdi
callq 0x291f9
testq %r15, %r15
je 0x80d3
movq %r13, %rdi
callq 0x22e78
jmp 0x80d8
movq %r13, 0x48(%rsp)
movq 0x70(%rsp), %rbp
addq $0x8, %r15
cmpq %r15, %r14
jne 0x7f2f
jmp 0x8114
movl $0xffffffff, 0x58(%rsp) # imm = 0xFFFFFFFF
movl $0x20000000, 0x84(%rsp) # imm = 0x20000000
movq $0x0, 0xa0(%rsp)
movq $0x0, 0x48(%rsp)
movq 0x78(%rsp), %rax
movl (%rax), %eax
movq %rax, 0xa8(%rsp)
movslq %eax, %r15
movl $0x4, %esi
movq %r15, %rdi
callq 0x3610
movq %rax, 0x60(%rsp)
movl $0x4, %esi
movq %r15, %rdi
callq 0x3610
movq %rax, 0xf0(%rsp)
movl $0x8, %esi
movq %r15, %rdi
callq 0x3610
movq %rax, 0x98(%rsp)
movq 0x46e7f(%rip), %rax     # 0x4efe8
movq (%rax), %rdi
leaq 0x36d79(%rip), %rsi     # 0x3eeec
leaq 0x363c8(%rip), %rdx     # 0x3e542
movl %r15d, %ecx
movl 0x34(%rsp), %r8d
xorl %eax, %eax
callq 0x3750
movq 0x50(%rsp), %rax
movl 0x8(%rax), %ebx
testb $0x10, %bl
jne 0x81d1
movq $0x0, 0xc0(%rsp)
xorl %edx, %edx
movq $0x0, 0xb8(%rsp)
movq $0x0, 0x90(%rsp)
movq 0xd8(%rsp), %r12
movq 0xb0(%rsp), %r13
jmp 0x8770
movl $0x1, %edi
movl $0x40, %esi
callq 0x3610
testb $0x20, %bl
leaq 0x36050(%rip), %rcx     # 0x3e23a
leaq 0x36d1e(%rip), %rsi     # 0x3ef0f
cmoveq %rcx, %rsi
movq %rax, 0x90(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
leaq 0x36c43(%rip), %rdi     # 0x3ee58
callq 0x3a05c
movq %rax, 0xb8(%rsp)
movq 0x48(%rsp), %rcx
cmpl $0x0, (%rcx)
jle 0x835c
xorl %r14d, %r14d
xorl %r12d, %r12d
movq 0x8(%rcx), %rax
movq (%rax,%r12,8), %rbx
movq %rbx, %rdi
callq 0x3360
movq 0x10(%rsp), %rcx
movslq %eax, %rbp
leaq (%rcx,%rbp), %rax
incq %rax
cmpq 0x18(%rsp), %rax
jb 0x82a4
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0x3720
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
addq 0x10(%rsp), %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x37d0
addq 0x10(%rsp), %rbp
movq %rbp, 0x10(%rsp)
movq 0x20(%rsp), %rax
movb $0x0, (%rax,%rbp)
movq 0x10(%rsp), %rax
incq %rax
cmpq 0x18(%rsp), %rax
jb 0x8323
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0x3720
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x10(%rsp)
movb %r14b, (%rcx,%rax)
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
movb %r14b, (%rcx,%rax)
incq %r12
movq 0x48(%rsp), %rcx
movslq (%rcx), %rax
cmpq %rax, %r12
jl 0x8236
movq 0x10(%rsp), %rbx
movq 0x90(%rsp), %r14
movl %ebx, 0x8(%r14)
movq %rbx, %rdi
callq 0x3240
movq %rax, 0x18(%r14)
movq 0x20(%rsp), %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x37d0
movq $0x0, 0x10(%rsp)
movq 0x78(%rsp), %rcx
cmpl $0x0, (%rcx)
movq 0xb0(%rsp), %r13
jle 0x84d4
xorl %r14d, %r14d
xorl %r12d, %r12d
movq 0x8(%rcx), %rax
movq (%rax,%r12,8), %rbx
movq %rbx, %rdi
callq 0x3360
movq 0x10(%rsp), %rcx
movslq %eax, %rbp
leaq (%rcx,%rbp), %rax
incq %rax
cmpq 0x18(%rsp), %rax
jb 0x841c
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0x3720
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
addq 0x10(%rsp), %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x37d0
addq 0x10(%rsp), %rbp
movq %rbp, 0x10(%rsp)
movq 0x20(%rsp), %rax
movb $0x0, (%rax,%rbp)
movq 0x10(%rsp), %rax
incq %rax
cmpq 0x18(%rsp), %rax
jb 0x849b
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0x3720
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x10(%rsp)
movb %r14b, (%rcx,%rax)
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
movb %r14b, (%rcx,%rax)
incq %r12
movq 0x78(%rsp), %rcx
movslq (%rcx), %rax
cmpq %rax, %r12
jl 0x83ae
leaq 0x10(%rsp), %rbx
movq (%rbx), %rbp
movq 0x90(%rsp), %r14
movl %ebp, 0xc(%r14)
movq %rbp, %rdi
callq 0x3240
movq %rax, 0x20(%r14)
movq 0x10(%rbx), %rsi
movq %rax, %rdi
movq %rbp, %rdx
callq 0x37d0
movq $0x0, (%rbx)
leaq 0x36a01(%rip), %rsi     # 0x3ef12
leaq 0x36a10(%rip), %rdx     # 0x3ef28
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21558
movq 0x50(%rsp), %rax
movq 0x50(%rax), %rdx
testq %rdx, %rdx
je 0x8543
leaq 0x36a00(%rip), %rsi     # 0x3ef37
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x21558
movq 0x48(%rsp), %rbx
movq 0x38(%rbx), %rdi
callq 0x363c3
movq %rax, 0x18(%rbx)
movq 0x46824(%rip), %rax     # 0x4ed80
leaq 0x100(%rsp), %rdx
movq %rax, 0x20(%rdx)
movaps 0x46801(%rip), %xmm0    # 0x4ed70
movaps %xmm0, 0x10(%rdx)
movaps 0x467e6(%rip), %xmm0    # 0x4ed60
movaps %xmm0, (%rdx)
movq 0x18(%rbx), %rdi
leaq 0x369d2(%rip), %rsi     # 0x3ef5a
leaq 0x44(%rsp), %rbx
movq %rbx, %rcx
callq 0x3747a
movq %rax, 0x38(%rsp)
cmpl $0x0, (%rbx)
movq 0x70(%rsp), %rbp
jle 0x86b0
movq 0x38(%rsp), %rax
leaq 0x18(%rax), %r14
leaq 0x10(%rsp), %rbx
xorl %r12d, %r12d
movq -0x18(%r14), %rdx
movq %rbx, %rdi
leaq 0x36996(%rip), %rsi     # 0x3ef5d
xorl %eax, %eax
callq 0x21558
movq -0x10(%r14), %rdx
testq %rdx, %rdx
je 0x85e8
movq %rbx, %rdi
leaq 0x3698c(%rip), %rsi     # 0x3ef6d
xorl %eax, %eax
callq 0x21558
movq -0x8(%r14), %rdx
testq %rdx, %rdx
je 0x8602
movq %rbx, %rdi
leaq 0x3697d(%rip), %rsi     # 0x3ef78
xorl %eax, %eax
callq 0x21558
movq (%r14), %rdx
testq %rdx, %rdx
je 0x861b
movq %rbx, %rdi
leaq 0x3696c(%rip), %rsi     # 0x3ef80
xorl %eax, %eax
callq 0x21558
movq 0x10(%rsp), %rax
addq $0x3, %rax
cmpq 0x18(%rsp), %rax
jb 0x8673
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0x3720
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
movw $0xa3e, (%rcx,%rax)     # imm = 0xA3E
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
leaq 0x2(%rax), %rdx
movq %rdx, 0x10(%rsp)
movb $0x0, 0x2(%rcx,%rax)
incq %r12
movslq 0x44(%rsp), %rax
addq $0x20, %r14
cmpq %rax, %r12
jl 0x85b9
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x86bf
callq 0x3350
movq 0x20(%rsp), %rax
movq 0x90(%rsp), %rbx
movq %rax, 0x28(%rbx)
movl 0x10(%rsp), %eax
incl %eax
movl %eax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x3a2ba
movq 0xb8(%rsp), %rdi
movq %rbx, %rsi
callq 0x3a114
movq 0x50(%rsp), %rbx
movl 0xc(%rbx), %edi
movsd 0x35d27(%rip), %xmm0    # 0x3e428
callq 0x10978
movq %rax, %r14
movq 0x78(%rsp), %rax
movslq (%rax), %rdi
movl $0xc0, %esi
callq 0x3610
movq %rax, %rdx
movq 0xa0(%rsp), %rax
movq %rax, 0x88(%r14)
movl 0x28(%rbx), %eax
movl %eax, 0x8(%r14)
movl 0x2c(%rbx), %eax
movl %eax, 0xc(%r14)
movl 0x30(%rbx), %eax
movl %eax, 0x10(%r14)
movsd 0x38(%rbx), %xmm0
movsd %xmm0, 0x20(%r14)
movl 0x34(%rbx), %eax
movl %eax, 0x14(%r14)
movl $0x10000, %eax          # imm = 0x10000
andl 0x8(%rbx), %eax
movq %r14, 0xc0(%rsp)
movl %eax, 0x30(%r14)
movq 0xd8(%rsp), %r12
movq 0x68(%rsp), %r14
movq %rdx, 0xc8(%rsp)
movl $0xffffffff, 0x80(%rsp) # imm = 0xFFFFFFFF
movl 0x58(%rsp), %ebx
testl %ebx, %ebx
movq 0x48(%rsp), %rax
movq %r15, 0x128(%rsp)
js 0x87f6
movq 0x50(%rsp), %rcx
movq 0x58(%rcx), %rdi
testq %rdi, %rdi
je 0x87f6
movq 0x8(%rax), %rax
movl %ebx, %ecx
movq (%rax,%rcx,8), %rsi
leaq 0x44(%rsp), %r8
xorl %edx, %edx
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
callq 0x2f75a
cmpl $0x0, 0x34(%rsp)
movq %rax, 0x38(%rsp)
jle 0x87ed
xorl %edx, %edx
movq (%rbp,%rdx,8), %rcx
movq %rax, 0x20(%rcx)
movq (%rbp,%rdx,8), %rcx
movl %ebx, 0x18(%rcx)
incq %rdx
cmpq %rdx, %r14
jne 0x87d4
movl %ebx, 0x80(%rsp)
jmp 0x87ff
movq $0x0, 0x38(%rsp)
leaq 0xe79(%rip), %rsi       # 0x967f
movl 0x34(%rsp), %edi
movq %rbp, %rdx
callq 0x2b6af
movq %rax, 0xe0(%rsp)
movq 0x50(%rsp), %rax
movl 0x14(%rax), %esi
movq 0x78(%rsp), %r15
movl (%r15), %eax
imull %esi, %eax
cmpl $0x100001, %eax         # imm = 0x100001
jge 0x95cd
movl (%r15), %ecx
movl %ecx, %eax
imull %esi, %eax
cmpl $0x1f3f, %eax           # imm = 0x1F3F
jle 0x95db
movl (%r15), %eax
movq 0x50(%rsp), %r15
imull 0x18(%r15), %eax
movl %eax, 0xf8(%rsp)
movq 0xe0(%rsp), %rbx
movq %rbx, %rdi
callq 0x2b77a
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movq %r12, %rcx
movq %r13, %r8
callq 0x2b7f2
testl %eax, %eax
jle 0x9491
movq 0x128(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x130(%rsp)
cmpq $0x0, 0x40(%r15)
movq 0x38(%rsp), %rsi
je 0x88d1
movl 0x10(%rsp), %eax
cmpl 0xd0(%rsp), %eax
jl 0x9456
cmpl 0x84(%rsp), %eax
jge 0x9456
movq 0x60(%r15), %rdi
testq %rdi, %rdi
setne %cl
movl 0x30(%rsp), %eax
testl %eax, %eax
setns %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x8913
movl %eax, %eax
movq 0x48(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq (%rcx,%rax,8), %rsi
movl 0x10(%rsp), %edx
leal 0x1(%rdx), %ecx
callq 0x305ac
movq 0x38(%rsp), %rsi
testl %eax, %eax
je 0x9456
movl 0x80(%rsp), %eax
cmpl %eax, 0x30(%rsp)
je 0x898c
movq %rsi, %rdi
callq 0x3350
movq 0x58(%r15), %rdi
testq %rdi, %rdi
je 0x8959
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
xorl %edx, %edx
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
leaq 0x44(%rsp), %r8
callq 0x2f75a
movq %rax, %rsi
jmp 0x895b
xorl %esi, %esi
cmpl $0x0, 0x34(%rsp)
jle 0x8981
movl 0x30(%rsp), %eax
xorl %ecx, %ecx
movq (%rbp,%rcx,8), %rdx
movq %rsi, 0x20(%rdx)
movq (%rbp,%rcx,8), %rdx
movl %eax, 0x18(%rdx)
incq %rcx
cmpq %rcx, %r14
jne 0x8968
movl 0x30(%rsp), %eax
movl %eax, 0x80(%rsp)
movl 0x8(%r15), %ebx
testb $0x10, %bl
movq %rsi, 0x38(%rsp)
jne 0x902c
movl 0x10(%rsp), %edx
movl $0x4e, %ecx
testq %rsi, %rsi
je 0x89b9
cmpl 0x44(%rsp), %edx
jge 0x89b9
movslq %edx, %rax
movsbl (%rsi,%rax), %ecx
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x30(%rsp), %rsi
movq (%rax,%rsi,8), %rsi
incl %edx
leaq 0x3660a(%rip), %rdi     # 0x3efde
xorl %eax, %eax
callq 0x3060
cmpl $0x0, 0x34(%rsp)
jle 0x901d
movq 0x38(%rsp), %rax
incq %rax
movq %rax, 0xe8(%rsp)
xorl %ebp, %ebp
movslq (%r12,%rbp,4), %rdx
testq %rdx, %rdx
jle 0x8a66
movq (%r13,%rbp,8), %rax
movl 0xc(%r15), %ecx
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %edi, %edi
xorl %esi, %esi
movq (%rax,%rdi), %r8
movq 0x8(%r8), %r9
movq %r9, %r10
shrq $0x30, %r10
shlq $0x2, %r10
addq 0x30(%r8), %r10
shrl $0x18, %r9d
movl 0x10(%r8), %r8d
incl %r8d
sarl %r8d
movslq %r8d, %r8
addq %r9, %r8
addq %r10, %r8
movslq 0x8(%rax,%rdi), %r9
movzbl (%r9,%r8), %r8d
xorl %r9d, %r9d
cmpl %r8d, %ecx
setle %r9b
addl %r9d, %esi
addq $0x18, %rdi
cmpq %rdi, %rdx
jne 0x8a16
jmp 0x8a68
xorl %esi, %esi
leaq 0x36578(%rip), %rdi     # 0x3efe7
xorl %eax, %eax
callq 0x3060
cmpl $0x0, (%r12,%rbp,4)
je 0x8fe9
cmpl $0x0, (%r12,%rbp,4)
jle 0x8ecd
xorl %ebx, %ebx
movq (%r13,%rbp,8), %rax
leaq (%rbx,%rbx,2), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x8(%rdx), %rsi
movq %rsi, %rdi
shrq $0x30, %rdi
shlq $0x2, %rdi
addq 0x30(%rdx), %rdi
shrl $0x18, %esi
movl 0x10(%rdx), %edx
incl %edx
sarl %edx
movslq %edx, %rdx
addq %rsi, %rdx
addq %rdi, %rdx
movslq 0x8(%rax,%rcx,8), %rsi
movzbl (%rsi,%rdx), %edx
cmpl %edx, 0xc(%r15)
jg 0x8ebd
leaq (%rax,%rcx,8), %r12
movslq 0x10(%rsp), %r15
movslq 0x44(%rsp), %rax
movq %rax, 0x58(%rsp)
testb $0x2, 0x14(%r12)
je 0x8b14
movl $0x5e, %edi
callq 0x31e0
movq (%r12), %rax
movzbl 0xa(%rax), %eax
leal 0x21(%rax), %edi
cmpl $0x5e, %eax
movl $0x7e, %eax
cmovael %eax, %edi
callq 0x31e0
movl 0x14(%r12), %eax
testb $0x1, %al
jne 0x8bb3
movq (%r12), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
shrq $0x30, %rdx
shlq $0x2, %rdx
addq 0x30(%rcx), %rdx
movl %eax, %esi
shrl $0x18, %esi
addq %rdx, %rsi
movl 0x8(%r12), %ecx
movl %ecx, %edx
sarl %edx
movslq %edx, %rdx
movzbl (%rdx,%rsi), %edx
shll $0x2, %ecx
notb %cl
andb $0x4, %cl
shrl %cl, %edx
andl $0xf, %edx
leaq 0x4757c(%rip), %rcx     # 0x500e0
movq (%rcx), %rcx
movsbl (%rcx,%rdx), %edi
movq 0x38(%rsp), %rdx
testq %rdx, %rdx
je 0x8bdc
movl $0x4e, %ecx
cmpl 0x58(%rsp), %r15d
jge 0x8b86
movsbq (%rdx,%r15), %rcx
movslq %edi, %rdx
cmpb $0x3d, %dl
je 0x8be2
leaq 0x4724b(%rip), %rsi     # 0x4fde0
movb (%rsi,%rdx), %dl
cmpb (%rsi,%rcx), %dl
je 0x8be2
movabsq $0x1000000000, %rcx     # imm = 0x1000000000
testq %rcx, %rax
jne 0x8bfd
callq 0x3170
jmp 0x8c02
movl $0x2a, %edi
testb $0x8, %al
je 0x8c04
movq (%r12), %rax
xorl %ecx, %ecx
movabsq $0x1000000000, %rdx     # imm = 0x1000000000
testq %rdx, 0x8(%rax)
sete %cl
leal 0x3c(,%rcx,2), %edi
jmp 0x8c04
cmpb $0x3d, %dil
jne 0x8b9d
xorl %ecx, %ecx
movabsq $0x1000000000, %rdx     # imm = 0x1000000000
testq %rdx, %rax
sete %cl
leal 0x2c(,%rcx,2), %edi
jmp 0x8c04
callq 0x35b0
movl %eax, %edi
callq 0x31e0
movl 0xc(%r12), %ecx
testl %ecx, %ecx
jle 0x8cd8
movl $0x2b, %edi
callq 0x31e0
movl 0xc(%r12), %ecx
movq 0x463cc(%rip), %rax     # 0x4eff8
movq (%rax), %rsi
testl %ecx, %ecx
je 0x8df8
movl %ecx, %edx
negl %edx
cmovsl %ecx, %edx
xorl %eax, %eax
movl $0xcccccccd, %r10d      # imm = 0xCCCCCCCD
movl %edx, %edi
imulq %r10, %rdi
shrq $0x23, %rdi
leal (%rdi,%rdi), %r8d
leal (%r8,%r8,4), %r8d
movl %edx, %r9d
subl %r8d, %r9d
orb $0x30, %r9b
movb %r9b, 0x100(%rsp,%rax)
incq %rax
cmpl $0x9, %edx
movl %edi, %edx
ja 0x8c46
testl %ecx, %ecx
jns 0x8c84
movl %eax, %ecx
incl %eax
movb $0x2d, 0x100(%rsp,%rcx)
movslq %eax, %rcx
movb $0x0, 0x100(%rsp,%rcx)
cmpl $0x2, %ecx
jl 0x8cc6
movl %eax, %ecx
shrl %eax
leaq 0xff(%rsp), %rdx
addq %rdx, %rcx
xorl %edx, %edx
movb 0x100(%rsp,%rdx), %dil
movb (%rcx), %r8b
movb %r8b, 0x100(%rsp,%rdx)
movb %dil, (%rcx)
incq %rdx
decq %rcx
cmpq %rdx, %rax
jne 0x8ca5
leaq 0x100(%rsp), %rdi
callq 0x34a0
jmp 0x8e02
jns 0x8e96
movq 0x46313(%rip), %rax     # 0x4eff8
movq (%rax), %rsi
negl %ecx
movl $0x2, %edi
xorl %edx, %edx
movl $0xcccccccd, %r10d      # imm = 0xCCCCCCCD
movl %edi, %eax
movl %ecx, %r8d
imulq %r10, %r8
shrq $0x23, %r8
leal (%r8,%r8), %edi
leal (%rdi,%rdi,4), %edi
movl %ecx, %r9d
subl %edi, %r9d
orb $0x30, %r9b
movb %r9b, 0x100(%rsp,%rdx)
incq %rdx
leal 0x1(%rax), %edi
cmpl $0x9, %ecx
movl %r8d, %ecx
ja 0x8cf7
movl %edx, %ecx
incl %edx
movb $0x2d, 0x100(%rsp,%rcx)
movslq %edx, %rcx
movb $0x0, 0x100(%rsp,%rcx)
movl %eax, %ecx
shrl %eax
leaq 0xff(%rsp), %rdx
addq %rdx, %rcx
xorl %edx, %edx
movb 0x100(%rsp,%rdx), %dil
movb (%rcx), %r8b
movb %r8b, 0x100(%rsp,%rdx)
movb %dil, (%rcx)
incq %rdx
decq %rcx
cmpq %rdx, %rax
jne 0x8d53
leaq 0x100(%rsp), %rdi
callq 0x34a0
cmpl $0x0, 0xc(%r12)
jns 0x8e96
movq 0xe8(%rsp), %rax
leaq (%rax,%r15), %r14
incq %r15
xorl %r13d, %r13d
movl $0x4e, %edi
cmpq $0x0, 0x38(%rsp)
je 0x8dbc
leaq (%r15,%r13), %rax
cmpq 0x58(%rsp), %rax
jge 0x8dbc
movsbl (%r14,%r13), %edi
movq (%r12), %rax
movabsq $0x1000000000, %rcx     # imm = 0x1000000000
testq %rcx, 0x8(%rax)
jne 0x8dd7
callq 0x3170
jmp 0x8ddc
callq 0x35b0
movl %eax, %edi
callq 0x31e0
movslq 0xc(%r12), %rax
negq %rax
incq %r13
cmpq %rax, %r13
jl 0x8d9f
jmp 0x8e96
movl $0x30, %edi
callq 0x3320
cmpl $0x0, 0xc(%r12)
jle 0x8e96
xorl %r14d, %r14d
movq (%r12), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
shrq $0x30, %rdx
shlq $0x2, %rdx
addq 0x30(%rcx), %rdx
movl %eax, %ecx
shrl $0x18, %ecx
addq %rdx, %rcx
movl 0x8(%r12), %edx
leal (%r14,%rdx), %esi
addl %r14d, %edx
incl %edx
sarl %edx
movslq %edx, %rdx
movzbl (%rdx,%rcx), %edx
leal 0x4(,%rsi,4), %ecx
notb %cl
andb $0x4, %cl
shrl %cl, %edx
leaq 0x47284(%rip), %rcx     # 0x500e0
movq (%rcx), %rcx
andl $0xf, %edx
movsbl (%rcx,%rdx), %edi
movabsq $0x1000000000, %rcx     # imm = 0x1000000000
testq %rcx, %rax
jne 0x8e7c
callq 0x3170
jmp 0x8e81
callq 0x35b0
movl %eax, %edi
callq 0x31e0
incl %r14d
cmpl 0xc(%r12), %r14d
jl 0x8e11
testb $0x4, 0x14(%r12)
movq 0xd8(%rsp), %r12
movq 0xb0(%rsp), %r13
movq 0x50(%rsp), %r15
je 0x8ebd
movl $0x24, %edi
callq 0x31e0
incq %rbx
movslq (%r12,%rbp,4), %rax
cmpq %rax, %rbx
jl 0x8a8e
movl $0x9, %edi
callq 0x31e0
cmpl $0x0, (%r12,%rbp,4)
jle 0x8f46
movl $0x8, %ebx
xorl %r14d, %r14d
movq (%r13,%rbp,8), %rax
movq -0x8(%rax,%rbx), %rcx
movq 0x8(%rcx), %rdx
movq %rdx, %rsi
shrq $0x30, %rsi
shlq $0x2, %rsi
addq 0x30(%rcx), %rsi
shrl $0x18, %edx
movl 0x10(%rcx), %ecx
incl %ecx
sarl %ecx
movslq %ecx, %rcx
addq %rdx, %rcx
addq %rsi, %rcx
movslq (%rax,%rbx), %rax
movzbl (%rax,%rcx), %edi
cmpl %edi, 0xc(%r15)
jg 0x8f36
cmpl $0x5d, %edi
jb 0x8f2e
movl $0x5d, %edi
addl $0x21, %edi
callq 0x31e0
incq %r14
movslq (%r12,%rbp,4), %rax
addq $0x18, %rbx
cmpq %rax, %r14
jl 0x8ee6
testb $-0x80, 0x9(%r15)
je 0x8f92
movl $0x9, %edi
callq 0x31e0
cmpl $0x0, (%r12,%rbp,4)
jle 0x8f92
xorl %ebx, %ebx
xorl %r14d, %r14d
movq (%r13,%rbp,8), %rax
movq (%rax,%rbx), %rax
movzbl 0xa(%rax), %edi
cmpl $0x5d, %edi
jb 0x8f7a
movl $0x5d, %edi
addl $0x21, %edi
callq 0x31e0
incq %r14
movslq (%r12,%rbp,4), %rax
addq $0x18, %rbx
cmpq %rax, %r14
jl 0x8f63
testb $0x40, 0x9(%r15)
je 0x900c
movl $0x9, %edi
callq 0x31e0
cmpl $0x0, (%r12,%rbp,4)
jle 0x900c
xorl %ebx, %ebx
xorl %r14d, %r14d
testq %rbx, %rbx
je 0x8fbe
movl $0x2c, %edi
callq 0x31e0
movq (%r13,%rbp,8), %rax
movl 0x8(%rax,%rbx), %esi
incl %esi
leaq 0x3a2c2(%rip), %rdi     # 0x43292
xorl %eax, %eax
callq 0x3060
incq %r14
movslq (%r12,%rbp,4), %rax
addq $0x18, %rbx
cmpq %rax, %r14
jl 0x8faf
jmp 0x900c
leaq 0x35ffc(%rip), %rdi     # 0x3efec
xorl %eax, %eax
callq 0x3060
testb $0x40, 0x9(%r15)
je 0x900c
leaq 0x35fe8(%rip), %rdi     # 0x3efed
xorl %eax, %eax
callq 0x3060
incq %rbp
movq 0x68(%rsp), %r14
cmpq %r14, %rbp
jne 0x89f8
movl $0xa, %edi
callq 0x31e0
jmp 0x9451
movl $0x1, %edi
movl $0x68, %esi
callq 0x3610
cmpl $0x0, 0x34(%rsp)
movq %rax, 0x138(%rsp)
jle 0x905c
xorl %eax, %eax
xorl %ecx, %ecx
addl (%r12,%rax,4), %ecx
incq %rax
cmpq %rax, %r14
jne 0x904e
jmp 0x905e
xorl %ecx, %ecx
movl %ecx, 0xfc(%rsp)
movq 0x60(%rsp), %rdi
xorl %esi, %esi
movq 0x130(%rsp), %rdx
callq 0x3080
movq 0x60(%rsp), %rsi
cmpl $0x0, 0x34(%rsp)
jle 0x91ff
xorl %r13d, %r13d
cmpl $0x0, (%r12,%r13,4)
jle 0x91f1
movq 0x88(%rsp), %rax
leaq (%rax,%r13,8), %rax
movq %rax, 0x58(%rsp)
xorl %r15d, %r15d
xorl %r14d, %r14d
movq %r13, 0xe8(%rsp)
movq 0xb0(%rsp), %rax
movq (%rax,%r13,8), %r12
addq %r15, %r12
btl $0xd, %ebx
jb 0x90e0
movq (%r12), %rdi
leaq 0x37c73(%rip), %rsi     # 0x40d49
callq 0x21c82
movq %rax, %rbp
jmp 0x90e2
xorl %ebp, %ebp
testq %rbp, %rbp
je 0x9107
movq 0x58(%rsp), %rax
movq (%rax), %rsi
leaq 0x1(%rbp), %rdx
movq 0x78(%rsp), %rdi
leaq 0x140(%rsp), %rcx
callq 0x16c05
jmp 0x910c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq 0x60(%rsp), %rsi
testl %eax, %eax
jns 0x9136
movq 0x58(%rsp), %rax
movq (%rax), %rsi
movq 0x78(%rsp), %rdi
xorl %edx, %edx
leaq 0x140(%rsp), %rcx
callq 0x16c05
movq 0x60(%rsp), %rsi
testl %eax, %eax
js 0x960e
cmpl 0xa8(%rsp), %eax
jge 0x960e
movl %eax, %ebp
movq 0xf0(%rsp), %rax
movl (%rax,%rbp,4), %eax
cmpl %eax, (%rsi,%rbp,4)
jne 0x91a8
movl %ebx, %r13d
movl $0x8, %ecx
testl %eax, %eax
je 0x916d
addl %eax, %eax
movl %eax, %ecx
movq 0xf0(%rsp), %rax
movl %ecx, (%rax,%rbp,4)
movq 0x98(%rsp), %rbx
movq (%rbx,%rbp,8), %rdi
movslq %ecx, %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
callq 0x3720
movq %rax, (%rbx,%rbp,8)
movq 0x60(%rsp), %rsi
movl %r13d, %ebx
movq 0xe8(%rsp), %r13
movq 0x98(%rsp), %rax
movq (%rax,%rbp,8), %rax
movslq (%rsi,%rbp,4), %rcx
leal 0x1(%rcx), %edx
movl %edx, (%rsi,%rbp,4)
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%r12), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movups (%r12), %xmm0
movups %xmm0, (%rax,%rcx,8)
incq %r14
movq 0xd8(%rsp), %r12
movslq (%r12,%r13,4), %rax
addq $0x18, %r15
cmpq %rax, %r14
jl 0x90b6
incq %r13
cmpq 0x68(%rsp), %r13
jne 0x908c
movl $0x4e, %eax
cmpq $0x0, 0x38(%rsp)
je 0x9221
movslq 0x10(%rsp), %rcx
cmpl 0x44(%rsp), %ecx
jge 0x9221
movq 0x38(%rsp), %rax
movsbq (%rax,%rcx), %rax
leaq 0x46bb8(%rip), %rcx     # 0x4fde0
movzbl (%rcx,%rax), %ecx
movq 0xa8(%rsp), %rdi
testl %edi, %edi
movq 0x98(%rsp), %r15
movq 0xc0(%rsp), %r13
jle 0x9288
movq 0xc8(%rsp), %rbp
xorl %r14d, %r14d
movl (%rsi,%r14,4), %edi
movq (%r15,%r14,8), %rsi
movl %ecx, %edx
movl %ecx, %ebx
movq %r13, %rcx
movq %rbp, %r8
callq 0x10aa9
movq 0x60(%rsp), %rsi
movl %ebx, %ecx
movq 0xa8(%rsp), %rdi
incq %r14
addq $0xc0, %rbp
cmpq %r14, %rdi
jne 0x9253
movq 0xc8(%rsp), %rbx
movq %rbx, %rsi
movq %r13, %rdx
leaq 0x160(%rsp), %r14
movq %r14, %r8
callq 0x1142f
movl 0x30(%rsp), %edi
movl 0x10(%rsp), %esi
movq 0x50(%rsp), %r15
movl 0x1c(%r15), %r9d
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdx
movq 0x138(%rsp), %r14
movq %r14, %rcx
movq %rbx, %r8
callq 0x117d4
movq 0xb8(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq %r14, %rdx
callq 0x3a729
movq %r14, %rdi
callq 0x3a949
testb $0x4, 0x9(%r15)
jne 0x947d
movl 0xfc(%rsp), %eax
cmpl 0xf8(%rsp), %eax
movq 0x70(%rsp), %rbp
movq 0x68(%rsp), %r14
movq 0xb0(%rsp), %r13
jge 0x9456
movl 0x10(%rsp), %ecx
movq 0xa0(%rsp), %rax
movq %rax, (%rsp)
movq 0xa8(%rsp), %rbx
movl %ebx, %edi
movq 0x60(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq 0xc0(%rsp), %r8
movq 0x38(%rsp), %r9
callq 0x1367e
testl %eax, %eax
js 0x9456
testl %ebx, %ebx
movq 0x60(%rsp), %rcx
movq %rbx, %rdi
movq 0x98(%rsp), %rdx
movq 0xc0(%rsp), %rbp
jle 0x93c9
movq 0xc8(%rsp), %rbx
xorl %r14d, %r14d
movl (%rcx,%r14,4), %edi
movq (%rdx,%r14,8), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rbp, %rcx
movq %rbx, %r8
callq 0x10aa9
movq 0x98(%rsp), %rdx
movq 0x60(%rsp), %rcx
movq 0xa8(%rsp), %rdi
incq %r14
addq $0xc0, %rbx
cmpq %r14, %rdi
jne 0x938d
movq 0xc8(%rsp), %r14
movq %r14, %rsi
movq %rbp, %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
leaq 0x160(%rsp), %r8
callq 0x1142f
testl %eax, %eax
js 0x944c
movl $0x1, %edi
movl $0x68, %esi
callq 0x3610
movq %rax, %rbx
movl 0x30(%rsp), %edi
movl 0x10(%rsp), %esi
movl 0x1c(%r15), %r9d
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbp, (%rsp)
leaq 0x160(%rsp), %rdx
movq %rbx, %rcx
movq %r14, %r8
callq 0x117d4
movq 0xb8(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq %rbx, %rdx
callq 0x3a729
movq %rbx, %rdi
callq 0x3a949
movq 0x68(%rsp), %r14
movq 0x70(%rsp), %rbp
movq 0xe0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %r12, %rcx
movq %r13, %r8
callq 0x2b7f2
testl %eax, %eax
jg 0x88a7
jmp 0x9491
movq 0x70(%rsp), %rbp
movq 0x68(%rsp), %r14
movq 0xb0(%rsp), %r13
jmp 0x9456
movq 0xb8(%rsp), %rdi
callq 0x3a0ea
movq 0x78(%rsp), %rdi
callq 0x16442
movq 0x150(%rsp), %rdi
callq 0x3350
cmpl $0x0, 0xa8(%rsp)
movq 0x128(%rsp), %r15
movq 0x98(%rsp), %r14
jle 0x94e2
xorl %ebx, %ebx
movq (%r14,%rbx,8), %rdi
callq 0x3350
incq %rbx
cmpq %rbx, %r15
jne 0x94d1
movq %r14, %rdi
callq 0x3350
movq 0x60(%rsp), %rdi
callq 0x3350
movq 0xf0(%rsp), %rdi
callq 0x3350
movq 0xa0(%rsp), %rdi
callq 0x13609
movq 0x90(%rsp), %rdi
callq 0x3a3f6
movq 0xc0(%rsp), %rdi
callq 0x10a59
movq 0x1e8(%rsp), %rdi
callq 0x3350
movq 0xc8(%rsp), %rdi
callq 0x3350
movq 0xe0(%rsp), %rdi
callq 0x2b798
movq 0x48(%rsp), %rdi
callq 0x22e78
cmpl $0x0, 0x34(%rsp)
movq 0x68(%rsp), %r14
jle 0x9599
xorl %ebx, %ebx
movq (%rbp,%rbx,8), %rax
movq (%rax), %rdi
callq 0x20aae
movq (%rbp,%rbx,8), %rax
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0x9587
callq 0x2a2f1
movq (%rbp,%rbx,8), %rdi
callq 0x3350
incq %rbx
cmpq %rbx, %r14
jne 0x9567
movq %rbp, %rdi
callq 0x3350
movq %r13, %rdi
callq 0x3350
movq 0x38(%rsp), %rdi
callq 0x3350
movq %r12, %rdi
callq 0x3350
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %esi, %ebx
callq 0x3999
movl %ebx, %esi
jmp 0x8838
movl $0x1f40, %eax           # imm = 0x1F40
xorl %edx, %edx
idivl %ecx
movl %eax, %ebx
movq 0x459fb(%rip), %rax     # 0x4efe8
movq (%rax), %rdi
leaq 0x359c4(%rip), %rsi     # 0x3efbb
leaq 0x34f44(%rip), %rdx     # 0x3e542
movl %ebx, %ecx
xorl %eax, %eax
callq 0x3750
movl %ebx, %esi
jmp 0x884b
testq %rbp, %rbp
jne 0x9632
leaq 0x36f32(%rip), %rdi     # 0x4054c
leaq 0x359cf(%rip), %rsi     # 0x3eff0
leaq 0x359d4(%rip), %rcx     # 0x3effc
movl $0xa9, %edx
callq 0x31b0
movq %rbp, %rdi
movq 0x58(%rsp), %rsi
callq 0x39be
movq 0x88(%rsp), %rdi
addq %r15, %rdi
callq 0x3a1d
movq 0x88(%rsp), %rdi
addq %r15, %rdi
callq 0x39ef
movq 0x88(%rsp), %rdi
addq %r15, %rdi
callq 0x396b
movq 0x88(%rsp), %rdi
addq %r15, %rdi
callq 0x393d