// File: /workspace/github_c_makefile_star2_O3/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 $0x218, %rsp            # imm = 0x218
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, 0x60(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x150(%rsp)
movq $0x0, 0x160(%rsp)
leaq 0x170(%rsp), %rdi
movq $0x0, 0xd8(%rsp)
movl $0xa8, %edx
xorl %esi, %esi
callq 0x3080
movslq %ebp, %rbx
movl $0x8, %esi
movq %rbx, %rdi
callq 0x3610
movq %rax, 0x78(%rsp)
movl $0x8, %esi
movq %rbx, %rdi
callq 0x3610
movq %rax, 0xc0(%rsp)
movl $0x8, %esi
movq %rbx, %rdi
callq 0x3610
movq %rax, 0xe8(%rsp)
callq 0x166e8
movq %rax, 0x48(%rsp)
movl %ebp, 0x34(%rsp)
movl %ebp, %eax
testl %ebx, %ebx
movq %rax, 0x68(%rsp)
movq %r12, 0x70(%rsp)
jle 0x830c
leaq (,%rax,8), %r15
movl $0x20000000, 0x84(%rsp) # imm = 0x20000000
xorl %r14d, %r14d
movl $0xffffffff, 0x38(%rsp) # imm = 0xFFFFFFFF
leaq 0x3dc15(%rip), %rbx     # 0x45d4f
movq $0x0, 0xd8(%rsp)
movq $0x0, 0x58(%rsp)
movq $0x0, 0x98(%rsp)
movl $0x1, %edi
movl $0x30, %esi
callq 0x3610
movq 0x78(%rsp), %rcx
movq %rax, (%rcx,%r14)
movq (%r12,%r14), %rdi
cmpb $0x2d, (%rdi)
jne 0x8186
cmpb $0x0, 0x1(%rdi)
je 0x82ee
movq %rbx, %rsi
callq 0x20308
movq 0x78(%rsp), %r12
movq (%r12,%r14), %rcx
movq %rax, (%rcx)
movq (%r12,%r14), %rax
cmpq $0x0, (%rax)
je 0x98a9
movq 0x60(%rsp), %rbp
movq %rbp, 0x28(%rax)
movq (%r12,%r14), %rax
movq (%rax), %rdi
callq 0x235fb
testq %rax, %rax
je 0x98b6
movq %rax, %r13
testq %r14, %r14
cmovneq 0x58(%rsp), %rax
movq (%r12,%r14), %rcx
movq %rax, 0x10(%rcx)
testb $0x20, 0x9(%rbp)
jne 0x81e6
movq 0x38(%r13), %rdx
jmp 0x81e8
xorl %edx, %edx
movq 0x70(%rsp), %r12
movq (%r12,%r14), %rsi
movq 0x48(%rsp), %rdi
callq 0x1680a
movq 0x38(%r13), %rsi
movq 0x60(%rsp), %rbp
movq 0x48(%rbp), %rdx
movq 0x98(%rsp), %rdi
callq 0x13520
movq %rax, 0x98(%rsp)
cmpq $0x0, 0x40(%rbp)
je 0x82c6
movq (%r12,%r14), %rdi
callq 0x2a134
testq %rax, %rax
je 0x98c3
movq %rax, %r12
movq 0x60(%rsp), %rax
movq 0x40(%rax), %rsi
movq %r13, %rdi
leaq 0x30(%rsp), %rdx
leaq 0x100(%rsp), %rcx
leaq 0x10(%rsp), %r8
callq 0x22e08
testl %eax, %eax
js 0x98d0
testq %r14, %r14
movl 0x30(%rsp), %esi
movl 0x100(%rsp), %edx
movl 0x10(%rsp), %ecx
movl 0x84(%rsp), %eax
cmovel %ecx, %eax
movl %eax, 0x84(%rsp)
movq 0xd8(%rsp), %rax
cmovel %edx, %eax
movq %rax, 0xd8(%rsp)
movl 0x38(%rsp), %eax
cmovel %esi, %eax
movl %eax, 0x38(%rsp)
movq %r12, %rdi
callq 0x2a484
movq 0x78(%rsp), %rcx
movq (%rcx,%r14), %rcx
movq %rax, 0x8(%rcx)
movq %r12, %rdi
callq 0x298a9
testq %r14, %r14
je 0x82d5
movq %r13, %rdi
callq 0x23577
jmp 0x82da
movq %r13, 0x58(%rsp)
movq 0x70(%rsp), %r12
addq $0x8, %r14
cmpq %r14, %r15
jne 0x815b
jmp 0x8334
movq 0x47cdb(%rip), %rax     # 0x4ffd0
movq (%rax), %rdi
callq 0x3030
movl %eax, %edi
movq %rbx, %rsi
callq 0x20487
jmp 0x818e
movl $0xffffffff, 0x38(%rsp) # imm = 0xFFFFFFFF
movl $0x20000000, 0x84(%rsp) # imm = 0x20000000
movq $0x0, 0x98(%rsp)
movq $0x0, 0x58(%rsp)
movq 0x48(%rsp), %rax
movl (%rax), %eax
movq %rax, 0xa0(%rsp)
movslq %eax, %rbp
movl $0x4, %esi
movq %rbp, %rdi
callq 0x3610
movq %rax, 0x40(%rsp)
movl $0x4, %esi
movq %rbp, %rdi
callq 0x3610
movq %rax, 0x140(%rsp)
movl $0x8, %esi
movq %rbp, %rdi
callq 0x3610
movq %rax, 0x90(%rsp)
movq 0x47c5f(%rip), %r14     # 0x4ffe8
movq (%r14), %rdi
leaq 0x37b91(%rip), %rsi     # 0x3ff24
leaq 0x371e0(%rip), %rdx     # 0x3f57a
xorl %r12d, %r12d
movl %ebp, %ecx
movl 0x34(%rsp), %r8d
xorl %eax, %eax
callq 0x3750
movq 0x60(%rsp), %rax
movl 0x8(%rax), %ebx
testb $0x10, %bl
jne 0x83df
xorl %ecx, %ecx
movq $0x0, 0xb0(%rsp)
movq $0x0, 0x88(%rsp)
movq 0xe8(%rsp), %r15
jmp 0x8984
movl $0x1, %edi
movl $0x40, %esi
callq 0x3610
testb $0x20, %bl
leaq 0x36e62(%rip), %rcx     # 0x3f25a
leaq 0x37b48(%rip), %rsi     # 0x3ff47
cmoveq %rcx, %rsi
movq %rax, 0x88(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
leaq 0x37a6d(%rip), %rdi     # 0x3fe90
callq 0x3a7b4
movq %rax, 0xb0(%rsp)
movq 0x58(%rsp), %rsi
cmpl $0x0, (%rsi)
jle 0x8573
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x8(%rsi), %rax
movq (%rax,%r12,8), %rbx
movq %rbx, %rdi
callq 0x3360
movq 0x10(%rsp), %rdi
movslq %eax, %r13
leaq (%rdi,%r13), %rax
incq %rax
cmpq 0x18(%rsp), %rax
jae 0x8471
movq 0x20(%rsp), %rax
jmp 0x84be
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), %rdi
addq %rax, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x37d0
addq 0x10(%rsp), %r13
movq %r13, 0x10(%rsp)
movq 0x20(%rsp), %rax
movb $0x0, (%rax,%r13)
movq 0x10(%rsp), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x18(%rsp), %rcx
jae 0x84f7
movq 0x20(%rsp), %rax
jmp 0x8548
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0x3720
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rdx
leaq 0x1(%rdx), %rcx
movq 0x58(%rsp), %rsi
movq %rcx, 0x10(%rsp)
movb %r15b, (%rax,%rdx)
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
movb %r15b, (%rcx,%rax)
incq %r12
movslq (%rsi), %rax
cmpq %rax, %r12
jl 0x8444
movq 0x10(%rsp), %r13
movq 0x88(%rsp), %rbx
movl %r13d, 0x8(%rbx)
movq %r13, %rdi
callq 0x3240
movq %rax, 0x18(%rbx)
movq 0x20(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x37d0
movq $0x0, 0x10(%rsp)
movq 0x48(%rsp), %rax
cmpl $0x0, (%rax)
jle 0x8700
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x48(%rsp), %rsi
movq 0x8(%rsi), %rax
movq (%rax,%r12,8), %rbx
movq %rbx, %rdi
callq 0x3360
movq 0x10(%rsp), %rdi
movslq %eax, %r13
leaq (%rdi,%r13), %rax
incq %rax
cmpq 0x18(%rsp), %rax
jae 0x85f2
movq 0x20(%rsp), %rax
jmp 0x863f
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), %rdi
addq %rax, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x37d0
addq 0x10(%rsp), %r13
movq %r13, 0x10(%rsp)
movq 0x20(%rsp), %rax
movb $0x0, (%rax,%r13)
movq 0x10(%rsp), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x18(%rsp), %rcx
jae 0x8678
movq 0x20(%rsp), %rax
jmp 0x86c9
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0x3720
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rdx
leaq 0x1(%rdx), %rcx
movq 0x48(%rsp), %rsi
movq %rcx, 0x10(%rsp)
movb %r15b, (%rax,%rdx)
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
movb %r15b, (%rcx,%rax)
incq %r12
movslq (%rsi), %rax
cmpq %rax, %r12
jl 0x85c5
movq 0x10(%rsp), %r13
movq 0x20(%rsp), %rbx
jmp 0x8703
xorl %r13d, %r13d
movq 0x88(%rsp), %r15
movl %r13d, 0xc(%r15)
movq %r13, %rdi
callq 0x3240
movq %rax, 0x20(%r15)
movq %rax, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x37d0
leaq 0x10(%rsp), %rdi
movq $0x0, (%rdi)
leaq 0x3780e(%rip), %rsi     # 0x3ff4a
leaq 0x3781d(%rip), %rdx     # 0x3ff60
xorl %eax, %eax
callq 0x21b28
movq 0x60(%rsp), %rax
movq 0x50(%rax), %rdx
testq %rdx, %rdx
je 0x876b
leaq 0x37810(%rip), %rsi     # 0x3ff6f
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x21b28
movq 0x58(%rsp), %rbx
movq 0x38(%rbx), %rdi
callq 0x36cb0
movq %rax, 0x18(%rbx)
movq 0x475fc(%rip), %rax     # 0x4fd80
leaq 0x100(%rsp), %rdx
movq %rax, 0x20(%rdx)
movaps 0x475d9(%rip), %xmm0    # 0x4fd70
movaps %xmm0, 0x10(%rdx)
movaps 0x475be(%rip), %xmm0    # 0x4fd60
movaps %xmm0, (%rdx)
movq 0x18(%rbx), %rdi
leaq 0x377e2(%rip), %rsi     # 0x3ff92
leaq 0x54(%rsp), %rbx
movq %rbx, %rcx
callq 0x37f3e
cmpl $0x0, (%rbx)
jle 0x88d3
movq %rax, %r14
leaq 0x18(%rax), %r15
leaq 0x377c1(%rip), %r13     # 0x3ff95
leaq 0x10(%rsp), %rbx
xorl %r12d, %r12d
movq -0x18(%r15), %rdx
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x21b28
movq -0x10(%r15), %rdx
testq %rdx, %rdx
je 0x8807
movq %rbx, %rdi
leaq 0x377a5(%rip), %rsi     # 0x3ffa5
xorl %eax, %eax
callq 0x21b28
movq -0x8(%r15), %rdx
testq %rdx, %rdx
je 0x8821
movq %rbx, %rdi
leaq 0x37796(%rip), %rsi     # 0x3ffb0
xorl %eax, %eax
callq 0x21b28
movq (%r15), %rdx
testq %rdx, %rdx
je 0x883a
movq %rbx, %rdi
leaq 0x37785(%rip), %rsi     # 0x3ffb8
xorl %eax, %eax
callq 0x21b28
movq 0x10(%rsp), %rcx
leaq 0x3(%rcx), %rax
cmpq 0x18(%rsp), %rax
jae 0x8851
movq 0x20(%rsp), %rax
jmp 0x889e
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), %rcx
movw $0xa3e, (%rax,%rcx)     # 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 0x54(%rsp), %rax
addq $0x20, %r15
cmpq %rax, %r12
jl 0x87dc
jmp 0x88db
movq %rax, %r14
testq %rax, %rax
je 0x88e3
movq %r14, %rdi
callq 0x3350
movq 0x20(%rsp), %rax
movq 0x88(%rsp), %rbx
movq %rax, 0x28(%rbx)
movl 0x10(%rsp), %eax
incl %eax
movl %eax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x3aa0a
movq 0xb0(%rsp), %rdi
movq %rbx, %rsi
callq 0x3a864
movq 0x60(%rsp), %rbx
movl 0xc(%rbx), %edi
movsd 0x36b4b(%rip), %xmm0    # 0x3f470
callq 0x10d1c
movq %rax, %r12
movq 0x48(%rsp), %rax
movslq (%rax), %rdi
movl $0xc0, %esi
callq 0x3610
movq %rax, %rcx
movq 0x98(%rsp), %rax
movq %rax, 0x88(%r12)
movsd 0x38(%rbx), %xmm0
movsd %xmm0, 0x20(%r12)
movups 0x28(%rbx), %xmm0
movups %xmm0, 0x8(%r12)
movl $0x10000, %eax          # imm = 0x10000
andl 0x8(%rbx), %eax
movl %eax, 0x30(%r12)
movq 0xe8(%rsp), %r15
movq 0x47664(%rip), %r14     # 0x4ffe8
movq %rcx, 0xb8(%rsp)
movq %r12, 0xd0(%rsp)
movl $0xffffffff, 0x80(%rsp) # imm = 0xFFFFFFFF
movl 0x38(%rsp), %r12d
testl %r12d, %r12d
movq 0x68(%rsp), %rbx
movq %rbp, 0x130(%rsp)
js 0x8a18
movq 0x60(%rsp), %rax
movq 0x58(%rax), %rdi
testq %rdi, %rdi
je 0x8a18
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movl %r12d, %ecx
movq (%rax,%rcx,8), %rsi
leaq 0x54(%rsp), %r8
xorl %edx, %edx
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
callq 0x302fb
movq %rax, %r13
cmpl $0x0, 0x34(%rsp)
jle 0x8a0e
xorl %eax, %eax
movq 0x78(%rsp), %rdx
movq (%rdx,%rax,8), %rcx
movq %r13, 0x20(%rcx)
movq (%rdx,%rax,8), %rcx
movl %r12d, 0x18(%rcx)
incq %rax
cmpq %rax, %rbx
jne 0x89f6
movl %r12d, 0x80(%rsp)
jmp 0x8a1b
xorl %r13d, %r13d
leaq 0xebb(%rip), %rsi       # 0x98dd
movl 0x34(%rsp), %edi
movq 0x78(%rsp), %rdx
callq 0x2c059
movq %rax, 0xf0(%rsp)
movq 0x60(%rsp), %rbp
movl 0x14(%rbp), %ebx
movq 0x48(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x50(%rsp)
imull %ebx, %eax
cmpl $0x100001, %eax         # imm = 0x100001
movq 0xc0(%rsp), %r12
jge 0x9813
cmpl $0x1f3f, %eax           # imm = 0x1F3F
jle 0x983e
movl 0x50(%rsp), %eax
imull 0x18(%rbp), %eax
movl %eax, 0x50(%rsp)
movq 0xf0(%rsp), %r14
movq %r14, %rdi
movl %ebx, %esi
callq 0x2c124
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
movq %r15, %rcx
movq %r12, %r8
callq 0x2c19c
testl %eax, %eax
jle 0x96d4
movq 0x130(%rsp), %rax
leaq (,%rax,4), %rax
movq %rax, 0x138(%rsp)
movq 0x68(%rsp), %rbx
movq 0x40(%rsp), %r14
cmpq $0x0, 0x40(%rbp)
je 0x8af1
movl 0x10(%rsp), %eax
cmpl 0xd8(%rsp), %eax
jl 0x96af
cmpl 0x84(%rsp), %eax
jge 0x96af
movq 0x60(%rbp), %rdi
testq %rdi, %rdi
setne %cl
movl 0x30(%rsp), %eax
testl %eax, %eax
setns %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x8b32
movl %eax, %eax
movq 0x58(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq (%rcx,%rax,8), %rsi
movl 0x10(%rsp), %edx
leal 0x1(%rdx), %ecx
callq 0x30e93
testl %eax, %eax
je 0x96af
movl 0x30(%rsp), %eax
movl 0x80(%rsp), %esi
cmpl %esi, %eax
je 0x8ba2
movq %r13, %rdi
callq 0x3350
movq 0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x8b76
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
xorl %edx, %edx
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
leaq 0x54(%rsp), %r8
callq 0x302fb
movq %rax, %r13
jmp 0x8b79
xorl %r13d, %r13d
movq 0x78(%rsp), %rdx
movl 0x30(%rsp), %esi
cmpl $0x0, 0x34(%rsp)
jle 0x8ba2
xorl %eax, %eax
movq (%rdx,%rax,8), %rcx
movq %r13, 0x20(%rcx)
movq (%rdx,%rax,8), %rcx
movl %esi, 0x18(%rcx)
incq %rax
cmpq %rax, %rbx
jne 0x8b8b
movl 0x8(%rbp), %eax
movl %eax, 0xfc(%rsp)
testb $0x10, %al
movq %r13, 0x38(%rsp)
movl %esi, 0x80(%rsp)
jne 0x9245
movl 0x10(%rsp), %edx
movl $0x4e, %ecx
testq %r13, %r13
je 0x8bdd
cmpl 0x54(%rsp), %edx
jge 0x8bdd
movslq %edx, %rax
movsbl (%r13,%rax), %ecx
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movslq %esi, %rsi
movq (%rax,%rsi,8), %rsi
incl %edx
leaq 0x37420(%rip), %rdi     # 0x40016
xorl %eax, %eax
callq 0x3060
cmpl $0x0, 0x34(%rsp)
jle 0x922c
movq 0x38(%rsp), %rax
incq %rax
movq %rax, 0xe0(%rsp)
xorl %r13d, %r13d
movslq (%r15,%r13,4), %rdx
testq %rdx, %rdx
jle 0x8c87
movq (%r12,%r13,8), %rax
movl 0xc(%rbp), %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 0x8c37
jmp 0x8c89
xorl %esi, %esi
leaq 0x3738f(%rip), %rdi     # 0x4001f
xorl %eax, %eax
callq 0x3060
cmpl $0x0, (%r15,%r13,4)
je 0x91f9
jle 0x90df
xorl %ebx, %ebx
movq (%r12,%r13,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(%rbp)
jg 0x90cf
leaq (%rax,%rcx,8), %r15
movslq 0x10(%rsp), %rbp
movslq 0x54(%rsp), %rax
movq %rax, 0xa8(%rsp)
movl 0x14(%r15), %eax
testb $0x2, %al
je 0x8d34
movl $0x5e, %edi
callq 0x31e0
movq (%r15), %rax
movzbl 0xa(%rax), %eax
leal 0x21(%rax), %edi
cmpl $0x5e, %eax
movl $0x7e, %eax
cmovael %eax, %edi
callq 0x31e0
movl 0x14(%r15), %eax
testb $0x1, %al
jne 0x8dd1
movq (%r15), %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(%r15), %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 0x48363(%rip), %rcx     # 0x510e0
movq (%rcx), %rcx
movsbl (%rcx,%rdx), %edi
cmpq $0x0, 0x38(%rsp)
je 0x8df9
movl $0x4e, %ecx
cmpl 0xa8(%rsp), %ebp
jge 0x8da4
movq 0x38(%rsp), %rcx
movsbq (%rcx,%rbp), %rcx
movslq %edi, %rdx
cmpb $0x3d, %dl
je 0x8dff
leaq 0x4802d(%rip), %rsi     # 0x50de0
movb (%rsi,%rdx), %dl
cmpb (%rsi,%rcx), %dl
je 0x8dff
movabsq $0x1000000000, %rcx     # imm = 0x1000000000
testq %rcx, %rax
jne 0x8e1a
callq 0x3170
jmp 0x8e1f
movl $0x2a, %edi
testb $0x8, %al
je 0x8e21
movq (%r15), %rax
xorl %ecx, %ecx
movabsq $0x1000000000, %rdx     # imm = 0x1000000000
testq %rdx, 0x8(%rax)
sete %cl
leal 0x3c(,%rcx,2), %edi
jmp 0x8e21
cmpb $0x3d, %dil
jne 0x8dbb
xorl %ecx, %ecx
movabsq $0x1000000000, %rdx     # imm = 0x1000000000
testq %rdx, %rax
sete %cl
leal 0x2c(,%rcx,2), %edi
jmp 0x8e21
callq 0x35b0
movl %eax, %edi
callq 0x31e0
movl 0xc(%r15), %ecx
testl %ecx, %ecx
jle 0x8ef2
movl $0x2b, %edi
callq 0x31e0
movl 0xc(%r15), %ecx
movq 0x471b1(%rip), %rax     # 0x4fff8
movq (%rax), %rsi
testl %ecx, %ecx
je 0x9013
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 0x8e61
testl %ecx, %ecx
jns 0x8e9f
movl %eax, %ecx
incl %eax
movb $0x2d, 0x100(%rsp,%rcx)
cltq
movb $0x0, 0x100(%rsp,%rax)
cmpl $0x2, %eax
jl 0x8ee0
movl %eax, %ecx
shrl %ecx
leaq 0xff(%rsp), %rdx
addq %rdx, %rax
xorl %edx, %edx
movb 0x100(%rsp,%rdx), %dil
movb (%rax), %r8b
movb %r8b, 0x100(%rsp,%rdx)
movb %dil, (%rax)
incq %rdx
decq %rax
cmpq %rdx, %rcx
jne 0x8ebf
leaq 0x100(%rsp), %rdi
callq 0x34a0
jmp 0x901d
jns 0x90a9
movq 0x470f9(%rip), %rax     # 0x4fff8
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 0x8f11
movl %edx, %ecx
incl %edx
movb $0x2d, 0x100(%rsp,%rcx)
movslq %edx, %rcx
movb $0x0, 0x100(%rsp,%rcx)
movslq %eax, %rcx
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 0x8f6e
leaq 0x100(%rsp), %rdi
callq 0x34a0
cmpl $0x0, 0xc(%r15)
jns 0x90a9
movq 0xe0(%rsp), %rax
leaq (%rax,%rbp), %r14
incq %rbp
xorl %r12d, %r12d
movl $0x4e, %edi
cmpq $0x0, 0x38(%rsp)
je 0x8fd9
leaq (%r12,%rbp), %rax
cmpq 0xa8(%rsp), %rax
jge 0x8fd9
movsbl (%r14,%r12), %edi
movq (%r15), %rax
movabsq $0x1000000000, %rcx     # imm = 0x1000000000
testq %rcx, 0x8(%rax)
jne 0x8ff3
callq 0x3170
jmp 0x8ff8
callq 0x35b0
movl %eax, %edi
callq 0x31e0
movslq 0xc(%r15), %rax
negq %rax
incq %r12
cmpq %rax, %r12
jl 0x8fb9
jmp 0x90a9
movl $0x30, %edi
callq 0x3320
cmpl $0x0, 0xc(%r15)
jle 0x90a9
xorl %r14d, %r14d
movq (%r15), %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(%r15), %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 0x4806c(%rip), %rcx     # 0x510e0
movq (%rcx), %rcx
andl $0xf, %edx
movsbl (%rcx,%rdx), %edi
movabsq $0x1000000000, %rcx     # imm = 0x1000000000
testq %rcx, %rax
jne 0x9094
callq 0x3170
jmp 0x9099
callq 0x35b0
movl %eax, %edi
callq 0x31e0
incl %r14d
cmpl 0xc(%r15), %r14d
jl 0x902b
testb $0x4, 0x14(%r15)
movq 0xe8(%rsp), %r15
movq 0xc0(%rsp), %r12
movq 0x60(%rsp), %rbp
je 0x90cf
movl $0x24, %edi
callq 0x31e0
incq %rbx
movslq (%r15,%r13,4), %rax
cmpq %rax, %rbx
jl 0x8caa
movl $0x9, %edi
callq 0x31e0
movl (%r15,%r13,4), %eax
testl %eax, %eax
jle 0x915a
movl $0x8, %ebx
xorl %r14d, %r14d
movq (%r12,%r13,8), %rcx
movq -0x8(%rcx,%rbx), %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 (%rcx,%rbx), %rcx
movzbl (%rcx,%rdx), %edi
cmpl %edi, 0xc(%rbp)
jg 0x914b
cmpl $0x5d, %edi
jb 0x913f
movl $0x5d, %edi
addl $0x21, %edi
callq 0x31e0
movl (%r15,%r13,4), %eax
incq %r14
movslq %eax, %rcx
addq $0x18, %rbx
cmpq %rcx, %r14
jl 0x90f9
testb $-0x80, 0x9(%rbp)
je 0x91a4
movl $0x9, %edi
callq 0x31e0
cmpl $0x0, (%r15,%r13,4)
jle 0x91a4
xorl %ebx, %ebx
xorl %r14d, %r14d
movq (%r12,%r13,8), %rax
movq (%rax,%rbx), %rax
movzbl 0xa(%rax), %edi
cmpl $0x5d, %edi
jb 0x918c
movl $0x5d, %edi
addl $0x21, %edi
callq 0x31e0
incq %r14
movslq (%r15,%r13,4), %rax
addq $0x18, %rbx
cmpq %rax, %r14
jl 0x9176
testb $0x40, 0x9(%rbp)
je 0x921b
movl $0x9, %edi
callq 0x31e0
cmpl $0x0, (%r15,%r13,4)
jle 0x921b
xorl %ebx, %ebx
xorl %r14d, %r14d
testq %rbx, %rbx
je 0x91cf
movl $0x2c, %edi
callq 0x31e0
movq (%r12,%r13,8), %rax
movl 0x8(%rax,%rbx), %esi
incl %esi
leaq 0x3b194(%rip), %rdi     # 0x44374
xorl %eax, %eax
callq 0x3060
incq %r14
movslq (%r15,%r13,4), %rax
addq $0x18, %rbx
cmpq %rax, %r14
jl 0x91c0
jmp 0x921b
leaq 0x36e24(%rip), %rdi     # 0x40024
xorl %eax, %eax
callq 0x3060
testb $0x40, 0x9(%rbp)
je 0x921b
leaq 0x36e11(%rip), %rdi     # 0x40025
xorl %eax, %eax
callq 0x3060
incq %r13
movq 0x68(%rsp), %rbx
cmpq %rbx, %r13
jne 0x8c1b
movl $0xa, %edi
callq 0x31e0
movq 0x40(%rsp), %r14
movq 0x38(%rsp), %r13
jmp 0x96af
movl $0x1, %edi
movl $0x68, %esi
callq 0x3610
cmpl $0x0, 0x34(%rsp)
movq %rax, 0x148(%rsp)
jle 0x9416
xorl %eax, %eax
xorl %ecx, %ecx
addl (%r15,%rax,4), %ecx
incq %rax
cmpq %rax, %rbx
jne 0x926b
movl %ecx, 0xcc(%rsp)
movq %r14, %rdi
xorl %esi, %esi
movq 0x138(%rsp), %rdx
callq 0x3080
cmpl $0x0, 0x34(%rsp)
jle 0x9433
xorl %esi, %esi
leaq 0x150(%rsp), %r12
cmpl $0x0, (%r15,%rsi,4)
jle 0x9401
movq 0x70(%rsp), %rax
leaq (%rax,%rsi,8), %rax
movq %rax, 0xa8(%rsp)
xorl %ebp, %ebp
xorl %r14d, %r14d
movq %rsi, 0xe0(%rsp)
movq 0xc0(%rsp), %rax
movq (%rax,%rsi,8), %r15
addq %rbp, %r15
btl $0xd, 0xfc(%rsp)
movb $0x1, %r13b
jb 0x9329
movq (%r15), %rdi
leaq 0x38a9c(%rip), %rsi     # 0x41d91
callq 0x22374
testq %rax, %rax
je 0x9329
movq %rax, %rbx
movq 0xa8(%rsp), %rax
movq (%rax), %rsi
movq %rbx, %rdx
incq %rdx
movq 0x48(%rsp), %rdi
movq %r12, %rcx
callq 0x16ed6
xorl %r13d, %r13d
testl %eax, %eax
jns 0x934d
jmp 0x932b
xorl %ebx, %ebx
movq 0xa8(%rsp), %rax
movq (%rax), %rsi
movq 0x48(%rsp), %rdi
xorl %edx, %edx
movq %r12, %rcx
callq 0x16ed6
testl %eax, %eax
js 0x9875
cmpl 0xa0(%rsp), %eax
movq 0x140(%rsp), %rdx
jge 0x9875
movl %eax, %ebx
movq 0x40(%rsp), %r13
movl (%r13,%rbx,4), %ecx
cmpl (%rdx,%rbx,4), %ecx
jne 0x93b1
leal (%rcx,%rcx), %eax
testl %ecx, %ecx
movl $0x8, %ecx
cmovel %ecx, %eax
movl %eax, (%rdx,%rbx,4)
movq 0x90(%rsp), %r12
movq (%r12,%rbx,8), %rdi
cltq
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
callq 0x3720
movq %rax, (%r12,%rbx,8)
leaq 0x150(%rsp), %r12
movl (%r13,%rbx,4), %ecx
jmp 0x93bd
movq 0x90(%rsp), %rax
movq (%rax,%rbx,8), %rax
movq 0xe0(%rsp), %rsi
leal 0x1(%rcx), %edx
movl %edx, (%r13,%rbx,4)
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%r15), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movups (%r15), %xmm0
movups %xmm0, (%rax,%rcx,8)
incq %r14
movq 0xe8(%rsp), %r15
movslq (%r15,%rsi,4), %rax
addq $0x18, %rbp
cmpq %rax, %r14
jl 0x92ce
incq %rsi
cmpq 0x68(%rsp), %rsi
jne 0x92a5
movq 0x38(%rsp), %r13
jmp 0x9433
movl $0x0, 0xcc(%rsp)
movq %r14, %rdi
xorl %esi, %esi
movq 0x138(%rsp), %rdx
callq 0x3080
movl $0x4e, %eax
testq %r13, %r13
je 0x944e
movslq 0x10(%rsp), %rcx
cmpl 0x54(%rsp), %ecx
jge 0x944e
movsbq (%r13,%rcx), %rax
leaq 0x4798b(%rip), %rcx     # 0x50de0
movzbl (%rcx,%rax), %eax
movq 0xa0(%rsp), %rdi
testl %edi, %edi
movq 0x40(%rsp), %rdx
movq 0x90(%rsp), %r12
movq 0xd0(%rsp), %rbp
jle 0x94ba
movq 0xb8(%rsp), %r13
xorl %r14d, %r14d
movl (%rdx,%r14,4), %edi
movq (%r12,%r14,8), %rsi
movl %eax, %edx
movl %eax, %ebx
movq %rbp, %rcx
movq %r13, %r8
callq 0x10e31
movq 0x40(%rsp), %rdx
movl %ebx, %eax
movq 0xa0(%rsp), %rdi
incq %r14
addq $0xc0, %r13
cmpq %r14, %rdi
jne 0x9485
movq 0xb8(%rsp), %rbx
movq %rbx, %rsi
movq %rbp, %rdx
movl %eax, %ecx
leaq 0x170(%rsp), %r14
movq %r14, %r8
callq 0x117cf
movl 0x30(%rsp), %edi
movl 0x10(%rsp), %esi
movq 0x60(%rsp), %rbp
movl 0x1c(%rbp), %r9d
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdx
movq 0x148(%rsp), %r14
movq %r14, %rcx
movq %rbx, %r8
callq 0x11ba7
movq 0xb0(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq %r14, %rdx
callq 0x3ae94
movq %r14, %rdi
callq 0x3b0c5
testb $0x4, 0x9(%rbp)
jne 0x9687
movl 0xcc(%rsp), %eax
cmpl 0x50(%rsp), %eax
movq 0x68(%rsp), %rbx
movq 0x40(%rsp), %r14
movq 0x38(%rsp), %r13
movq 0xc0(%rsp), %r12
jge 0x96af
movl 0x10(%rsp), %ecx
movq 0x98(%rsp), %rax
movq %rax, (%rsp)
movq %r14, %rsi
movq 0xa0(%rsp), %r14
movl %r14d, %edi
movq 0x90(%rsp), %rdx
movq 0xd0(%rsp), %r8
movq %r13, %r9
callq 0x13bdb
testl %eax, %eax
js 0x96aa
testl %r14d, %r14d
movq %r14, %rdi
movq 0x90(%rsp), %rcx
movq 0xd0(%rsp), %r13
movq 0x40(%rsp), %rdx
jle 0x95fc
movq 0xb8(%rsp), %rbx
xorl %r14d, %r14d
movl (%rdx,%r14,4), %edi
movq (%rcx,%r14,8), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r13, %rcx
movq %rbx, %r8
callq 0x10e31
movq 0x40(%rsp), %rdx
movq 0x90(%rsp), %rcx
movq 0xa0(%rsp), %rdi
incq %r14
addq $0xc0, %rbx
cmpq %r14, %rdi
jne 0x95c0
movq 0xb8(%rsp), %r14
movq %r14, %rsi
movq %r13, %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
leaq 0x170(%rsp), %rbx
movq %rbx, %r8
callq 0x117cf
testl %eax, %eax
js 0x96a0
movl $0x1, %edi
movl $0x68, %esi
callq 0x3610
movq %rbx, %rdx
movq %rax, %rbx
movl 0x30(%rsp), %edi
movl 0x10(%rsp), %esi
movl 0x1c(%rbp), %r9d
movq %r13, %rax
movq 0x38(%rsp), %r13
movq %r13, 0x8(%rsp)
movq %rax, (%rsp)
movq %rbx, %rcx
movq %r14, %r8
callq 0x11ba7
movq 0xb0(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq %rbx, %rdx
callq 0x3ae94
movq %rbx, %rdi
callq 0x3b0c5
movq 0x68(%rsp), %rbx
jmp 0x96aa
movq 0x68(%rsp), %rbx
movq 0x40(%rsp), %r14
movq 0x38(%rsp), %r13
movq 0xc0(%rsp), %r12
jmp 0x96af
movq 0x68(%rsp), %rbx
movq 0x38(%rsp), %r13
movq 0x40(%rsp), %r14
movq 0xf0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x2c19c
testl %eax, %eax
jg 0x8acc
movq 0xb0(%rsp), %rdi
callq 0x3a83a
movq 0x48(%rsp), %rdi
callq 0x16726
movq 0x160(%rsp), %rdi
callq 0x3350
cmpl $0x0, 0xa0(%rsp)
movq 0x130(%rsp), %r14
movq 0x90(%rsp), %rbp
jle 0x9726
xorl %ebx, %ebx
movq (%rbp,%rbx,8), %rdi
callq 0x3350
incq %rbx
cmpq %rbx, %r14
jne 0x9714
movq %rbp, %rdi
callq 0x3350
movq 0x40(%rsp), %rdi
callq 0x3350
movq 0x140(%rsp), %rdi
callq 0x3350
movq 0x98(%rsp), %rdi
callq 0x13b61
movq 0x88(%rsp), %rdi
callq 0x3ab46
movq 0xd0(%rsp), %rdi
callq 0x10de1
movq 0x1f8(%rsp), %rdi
callq 0x3350
movq 0xb8(%rsp), %rdi
callq 0x3350
movq 0xf0(%rsp), %rdi
callq 0x2c142
movq 0x58(%rsp), %rdi
callq 0x23577
cmpl $0x0, 0x34(%rsp)
jle 0x97df
xorl %ebx, %ebx
movq 0x78(%rsp), %r14
movq (%r14,%rbx,8), %rax
movq (%rax), %rdi
callq 0x21311
movq (%r14,%rbx,8), %rdi
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x97d0
movq %rax, %rdi
callq 0x2ac9a
movq (%r14,%rbx,8), %rdi
callq 0x3350
incq %rbx
cmpq %rbx, 0x68(%rsp)
jne 0x97ab
movq 0x78(%rsp), %rdi
callq 0x3350
movq %r12, %rdi
callq 0x3350
movq %r13, %rdi
callq 0x3350
movq %r15, %rdi
callq 0x3350
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rdi
leaq 0x367a3(%rip), %rsi     # 0x3ffc0
leaq 0x35d56(%rip), %rdx     # 0x3f57a
xorl %eax, %eax
callq 0x3750
movq 0x48(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x50(%rsp)
imull %ebx, %eax
jmp 0x8a61
movl $0x1f40, %eax           # imm = 0x1F40
xorl %edx, %edx
idivl 0x50(%rsp)
movl %eax, %ebx
movq (%r14), %rdi
leaq 0x3679e(%rip), %rsi     # 0x3fff3
leaq 0x35d1e(%rip), %rdx     # 0x3f57a
movl %eax, %ecx
xorl %eax, %eax
callq 0x3750
movq 0x48(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x50(%rsp)
jmp 0x8a6c
testb %r13b, %r13b
je 0x9899
leaq 0x37d0b(%rip), %rdi     # 0x4158c
leaq 0x367a0(%rip), %rsi     # 0x40028
leaq 0x367a5(%rip), %rcx     # 0x40034
movl $0xa9, %edx
callq 0x31b0
movq %rbx, %rdi
movq 0xa8(%rsp), %rsi
callq 0x3999
movq 0x70(%rsp), %rdi
addq %r14, %rdi
callq 0x39f8
movq 0x70(%rsp), %rdi
addq %r14, %rdi
callq 0x39ca
movq 0x70(%rsp), %rdi
addq %r14, %rdi
callq 0x396b
movq 0x70(%rsp), %rdi
addq %r14, %rdi
callq 0x393d