// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/phase.c
// Function: main_phase
int main_phase(int argc, char *argv[])
{
	extern void bam_init_header_hash(bam_header_t *header);
	int c, tid, pos, vpos = 0, n, lasttid = -1, max_vpos = 0;
	const bam_pileup1_t *plp;
	bam_plp_t iter;
	bam_header_t *h;
	nseq_t *seqs;
	uint64_t *cns = 0;
	phaseg_t g;
	char *fn_list = 0;
	khash_t(set64) *set = 0;
	errmod_t *em;
	uint16_t *bases;

	memset(&g, 0, sizeof(phaseg_t));
	g.flag = FLAG_FIX_CHIMERA;
	g.min_varLOD = 37; g.k = 13; g.min_baseQ = 13; g.max_depth = 256;
	while ((c = getopt(argc, argv, "Q:eFq:k:b:l:D:A:")) >= 0) {
		switch (c) {
			case 'D': g.max_depth = atoi(optarg); break;
			case 'q': g.min_varLOD = atoi(optarg); break;
			case 'Q': g.min_baseQ = atoi(optarg); break;
			case 'k': g.k = atoi(optarg); break;
			case 'F': g.flag &= ~FLAG_FIX_CHIMERA; break;
			case 'e': g.flag |= FLAG_LIST_EXCL; break;
			case 'A': g.flag |= FLAG_DROP_AMBI; break;
			case 'b': g.pre = strdup(optarg); break;
			case 'l': fn_list = strdup(optarg); break;
		}
	}
	if (argc == optind) {
		fprintf(stderr, "\n");
		fprintf(stderr, "Usage:   samtools phase [options] <in.bam>\n\n");
		fprintf(stderr, "Options: -k INT    block length [%d]\n", g.k);
		fprintf(stderr, "         -b STR    prefix of BAMs to output [null]\n");
		fprintf(stderr, "         -q INT    min het phred-LOD [%d]\n", g.min_varLOD);
		fprintf(stderr, "         -Q INT    min base quality in het calling [%d]\n", g.min_baseQ);
		fprintf(stderr, "         -D INT    max read depth [%d]\n", g.max_depth);
//		fprintf(stderr, "         -l FILE   list of sites to phase [null]\n");
		fprintf(stderr, "         -F        do not attempt to fix chimeras\n");
		fprintf(stderr, "         -A        drop reads with ambiguous phase\n");
//		fprintf(stderr, "         -e        do not discover SNPs (effective with -l)\n");
		fprintf(stderr, "\n");
		return 1;
	}
	g.fp = strcmp(argv[optind], "-")? bam_open(argv[optind], "r") : bam_dopen(fileno(stdin), "r");
	h = bam_header_read(g.fp);
	if (fn_list) { // read the list of sites to phase
		bam_init_header_hash(h);
		set = loadpos(fn_list, h);
		free(fn_list);
	} else g.flag &= ~FLAG_LIST_EXCL;
	if (g.pre) { // open BAMs to write
		char *s = malloc(strlen(g.pre) + 20);
		strcpy(s, g.pre); strcat(s, ".0.bam"); g.out[0] = bam_open(s, "w");
		strcpy(s, g.pre); strcat(s, ".1.bam"); g.out[1] = bam_open(s, "w");
		strcpy(s, g.pre); strcat(s, ".chimera.bam"); g.out[2] = bam_open(s, "w");
		for (c = 0; c <= 2; ++c) bam_header_write(g.out[c], h);
		free(s);
	}

	iter = bam_plp_init(readaln, &g);
	g.vpos_shift = 0;
	seqs = kh_init(64);
	em = errmod_init(1. - 0.83);
	bases = calloc(g.max_depth, 2);
	printf("CC\n");
	printf("CC\tDescriptions:\nCC\n");
	printf("CC\t  CC      comments\n");
	printf("CC\t  PS      start of a phase set\n");
	printf("CC\t  FL      filtered region\n");
	printf("CC\t  M[012]  markers; 0 for singletons, 1 for phased and 2 for filtered\n");
	printf("CC\t  EV      supporting reads; SAM format\n");
	printf("CC\t  //      end of a phase set\nCC\n");
	printf("CC\tFormats of PS, FL and M[012] lines (1-based coordinates):\nCC\n");
	printf("CC\t  PS  chr  phaseSetStart  phaseSetEnd\n");
	printf("CC\t  FL  chr  filterStart    filterEnd\n");
	printf("CC\t  M?  chr  PS  pos  allele0  allele1  hetIndex  #supports0  #errors0  #supp1  #err1\n");
	printf("CC\nCC\n");
	fflush(stdout);
	while ((plp = bam_plp_auto(iter, &tid, &pos, &n)) != 0) {
		int i, k, c, tmp, dophase = 1, in_set = 0;
		float q[16];
		if (tid < 0) break;
		if (tid != lasttid) { // change of chromosome
			g.vpos_shift = 0;
			if (lasttid >= 0) {
				seqs = shrink_hash(seqs);
				phase(&g, h->target_name[lasttid], vpos, cns, seqs);
				update_vpos(0x7fffffff, seqs);
			}
			lasttid = tid;
			vpos = 0;
		}
		if (set && kh_get(set64, set, (uint64_t)tid<<32 | pos) != kh_end(set)) in_set = 1;
		if (n > g.max_depth) continue; // do not proceed if the depth is too high
		// fill the bases array and check if there is a variant
		for (i = k = 0; i < n; ++i) {
			const bam_pileup1_t *p = plp + i;
			uint8_t *seq;
			int q, baseQ, b;
			if (p->is_del || p->is_refskip) continue;
			baseQ = bam1_qual(p->b)[p->qpos];
			if (baseQ < g.min_baseQ) continue;
			seq = bam1_seq(p->b);
			b = bam_nt16_nt4_table[bam1_seqi(seq, p->qpos)];
			if (b > 3) continue;
			q = baseQ < p->b->core.qual? baseQ : p->b->core.qual;
			if (q < 4) q = 4;
			if (q > 63) q = 63;
			bases[k++] = q<<5 | (int)bam1_strand(p->b)<<4 | b;
		}
		if (k == 0) continue;
		errmod_cal(em, k, 4, bases, q); // compute genotype likelihood
		c = gl2cns(q); // get the consensus
		// tell if to proceed
		if (set && (g.flag&FLAG_LIST_EXCL) && !in_set) continue; // not in the list
		if (!in_set && (c&0xffff)>>2 < g.min_varLOD) continue; // not a variant
		// add the variant
		if (vpos == max_vpos) {
			max_vpos = max_vpos? max_vpos<<1 : 128;
			cns = realloc(cns, max_vpos * 8);
		}
		cns[vpos] = (uint64_t)pos<<32 | c;
		for (i = 0; i < n; ++i) {
			const bam_pileup1_t *p = plp + i;
			uint64_t key;
			khint_t k;
			uint8_t *seq = bam1_seq(p->b);
			frag_t *f;
			if (p->is_del || p->is_refskip) continue;
			if (p->b->core.qual == 0) continue;
			// get the base code
			c = nt16_nt4_table[(int)bam1_seqi(seq, p->qpos)];
			if (c == (cns[vpos]&3)) c = 1;
			else if (c == (cns[vpos]>>16&3)) c = 2;
			else c = 0;
			// write to seqs
			key = X31_hash_string(bam1_qname(p->b));
			k = kh_put(64, seqs, key, &tmp);
			f = &kh_val(seqs, k);
			if (tmp == 0) { // present in the hash table
				if (vpos - f->vpos + 1 < MAX_VARS) {
					f->vlen = vpos - f->vpos + 1;
					f->seq[f->vlen-1] = c;
					f->end = bam_calend(&p->b->core, bam1_cigar(p->b));
				}
				dophase = 0;
			} else { // absent
				memset(f->seq, 0, MAX_VARS);
				f->beg = p->b->core.pos;
				f->end = bam_calend(&p->b->core, bam1_cigar(p->b));
				f->vpos = vpos, f->vlen = 1, f->seq[0] = c, f->single = f->phased = f->flip = f->ambig = 0;
			}
		}
		if (dophase) {
			seqs = shrink_hash(seqs);
			phase(&g, h->target_name[tid], vpos, cns, seqs);
			update_vpos(vpos, seqs);
			cns[0] = cns[vpos];
			vpos = 0;
		}
		++vpos;
	}
	if (tid >= 0) phase(&g, h->target_name[tid], vpos, cns, seqs);
	bam_header_destroy(h);
	bam_plp_destroy(iter);
	bam_close(g.fp);
	kh_destroy(64, seqs);
	kh_destroy(set64, set);
	free(cns);
	errmod_destroy(em);
	free(bases);
	if (g.pre) {
		for (c = 0; c <= 2; ++c) bam_close(g.out[c]);
		free(g.pre); free(g.b);
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3a8, %rsp            # imm = 0x3A8
movq %rsi, %rbx
movl %edi, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xe0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0xc0(%rsp)
movapd 0x29759(%rip), %xmm0    # 0x41ef0
movapd %xmm0, 0xa0(%rsp)
movl $0x100, 0xb0(%rsp) # imm = 0x100
leaq 0x29766(%rip), %rdx     # 0x41f18
callq 0x3210
movl $0x1, %r13d
testl %eax, %eax
js 0x188f9
movl $0x25, 0x28(%rsp)
movl $0xd, 0x18(%rsp)
movl $0x100, 0x20(%rsp)      # imm = 0x100
xorl %r14d, %r14d
movq 0x377f9(%rip), %r15     # 0x4ffe0
leaq 0x2972a(%rip), %r12     # 0x41f18
movl $0xd, 0x50(%rsp)
movq $0x0, 0x38(%rsp)
cmpl $0x61, %eax
jle 0x1883c
cmpl $0x6a, %eax
jle 0x18883
cmpl $0x6b, %eax
je 0x188a7
cmpl $0x6c, %eax
je 0x188d1
cmpl $0x71, %eax
jne 0x188de
movq (%r15), %rdi
callq 0x34c0
movl %eax, 0x28(%rsp)
movl %eax, 0xac(%rsp)
jmp 0x188de
cmpl $0x45, %eax
jg 0x18864
cmpl $0x41, %eax
je 0x18893
cmpl $0x44, %eax
jne 0x188de
movq (%r15), %rdi
callq 0x34c0
movl %eax, 0x20(%rsp)
movl %eax, 0xb0(%rsp)
jmp 0x188de
cmpl $0x46, %eax
je 0x18899
cmpl $0x51, %eax
jne 0x188de
movq (%r15), %rdi
callq 0x34c0
movl %eax, 0x18(%rsp)
movl %eax, 0xa8(%rsp)
jmp 0x188de
cmpl $0x62, %eax
je 0x188bc
cmpl $0x65, %eax
jne 0x188de
orl $0x4, %r13d
jmp 0x1889d
orl $0x8, %r13d
jmp 0x1889d
andl $-0x2, %r13d
movl %r13d, 0xa0(%rsp)
jmp 0x188de
movq (%r15), %rdi
callq 0x34c0
movl %eax, 0x50(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x188de
movq (%r15), %rdi
callq 0x3570
movq %rax, %r14
movq %rax, 0xc0(%rsp)
jmp 0x188de
movq (%r15), %rdi
callq 0x3570
movq %rax, 0x38(%rsp)
movl %ebp, %edi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x3210
testl %eax, %eax
jns 0x187ff
andl $-0x5, %r13d
jmp 0x18925
movl $0x25, 0x28(%rsp)
movl $0xd, 0x18(%rsp)
movl $0x100, 0x20(%rsp)      # imm = 0x100
xorl %r14d, %r14d
movl $0xd, 0x50(%rsp)
movq $0x0, 0x38(%rsp)
movq 0x3768c(%rip), %rax     # 0x4ffb8
movslq (%rax), %rax
cmpl %ebp, %eax
je 0x19db6
movq (%rbx,%rax,8), %rdi
cmpb $0x2d, (%rdi)
jne 0x1894a
cmpb $0x0, 0x1(%rdi)
je 0x19d72
leaq 0x2d3fe(%rip), %rsi     # 0x45d4f
callq 0x20308
movq 0x38(%rsp), %rbx
movq %rax, 0xb8(%rsp)
movq %rax, %rdi
callq 0x235fb
movq %rax, %r15
testq %rbx, %rbx
movq %rax, 0x80(%rsp)
je 0x18ed0
movq %r15, %rdi
callq 0x22802
movl $0x1, %edi
movl $0x28, %esi
callq 0x3610
movq %rax, %r12
movl $0x1, %edi
movl $0x18, %esi
callq 0x3610
movq %rax, %r14
cmpb $0x2d, (%rbx)
jne 0x189ba
cmpb $0x0, 0x1(%rbx)
je 0x19d94
leaq 0x2d38e(%rip), %rsi     # 0x45d4f
movq %rbx, %rdi
callq 0x3420
movq %rax, %rbx
movl $0x1, %edi
movl $0x20, %esi
callq 0x3610
movq %rax, %r15
movq %rbx, 0x48(%rsp)
movq %rbx, 0x18(%rax)
movl $0x4000, %edi           # imm = 0x4000
callq 0x3240
movq %rax, (%r15)
leaq 0x13c(%rsp), %rdx
movq %r15, 0x28(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x1ac3b
testl %eax, %eax
js 0x18ef2
xorl %ebp, %ebp
xorl %r15d, %r15d
movl $0x0, 0x20(%rsp)
movq $0x0, 0x60(%rsp)
xorl %r13d, %r13d
xorl %ebx, %ebx
movl $0x0, 0x70(%rsp)
movq %r12, 0x30(%rsp)
movq %r14, 0x50(%rsp)
movq 0x10(%r14), %rsi
movq 0x80(%rsp), %rdi
callq 0x22ce3
testl %eax, %eax
setns %cl
movl 0x13c(%rsp), %esi
cmpl $0xa, %esi
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x18abb
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
movq %r14, %rsi
leaq 0x13c(%rsp), %rdx
callq 0x1ac3b
testl %eax, %eax
js 0x18ef2
movq 0x10(%r14), %rdi
callq 0x34c0
movl %eax, %edi
cmpl %ebx, 0x70(%rsp)
jae 0x18ad1
movq %r15, %r12
movl 0x20(%rsp), %eax
movl %eax, %r14d
movl %ebx, %eax
movq %rax, 0x18(%rsp)
xorl %ebx, %ebx
movq 0x10(%rsp), %r10
jmp 0x18ce2
movq %r15, %r12
movl 0x20(%rsp), %eax
movl %eax, %r14d
movl %ebx, %ecx
movq %rcx, 0x18(%rsp)
jmp 0x18e1f
movq 0x60(%rsp), %rax
addl %eax, %eax
cmpl %r13d, %eax
movl $0x0, %eax
sbbl %eax, %eax
orl $0x1, %eax
addl %r13d, %eax
movl $0x21, %ecx
leaq 0x2986c(%rip), %rsi     # 0x42360
movq 0x10(%rsp), %r10
leal -0x2(%rcx), %edx
decl %ecx
cmpl %eax, (%rsi,%rdx,4)
ja 0x18af9
movl %ecx, %eax
movl (%rsi,%rax,4), %r14d
cvtsi2sd %r14, %xmm0
mulsd 0x264fa(%rip), %xmm0    # 0x3f010
addsd 0x264fa(%rip), %xmm0    # 0x3f018
cvttsd2si %xmm0, %rax
movq %rax, 0x18(%rsp)
cmpl %eax, 0x60(%rsp)
jae 0x18ccf
movl %edi, 0x20(%rsp)
movl %r14d, %eax
shrl $0x4, %eax
leaq 0x4(,%rax,4), %rbx
movq %rbx, %rdi
callq 0x3240
movq %rax, %r12
movq %rax, %rdi
movl $0xaa, %esi
movq %rbx, %rdx
callq 0x3080
cmpl %r14d, %r13d
jae 0x18b84
leaq (,%r14,8), %rsi
movq %rbp, %rdi
callq 0x3720
movq %rax, %rbp
movq 0x30(%rsp), %rax
movq %rbp, 0x18(%rax)
movq 0x10(%rax), %r15
testl %r13d, %r13d
je 0x18c9a
leal -0x1(%r14), %edi
movl %r13d, %r8d
xorl %r9d, %r9d
movl %r9d, %eax
shrl $0x4, %eax
movl (%r15,%rax,4), %edx
leal (%r9,%r9), %ecx
andl $0x1e, %ecx
movl %edx, %esi
shrl %cl, %esi
testb $0x3, %sil
jne 0x18c69
leaq (%r15,%rax,4), %rax
movq (%rbp,%r9,8), %r10
btsl %ecx, %edx
movl %edx, (%rax)
movq %r10, %rcx
shrq $0x21, %rcx
movl %r10d, %eax
shll $0xb, %eax
xorl %eax, %ecx
xorl %r10d, %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %r14d
movl %edx, %esi
movl %ecx, %eax
xorl %edx, %edx
divl %edi
movl %esi, %eax
movl %esi, %ecx
addl %esi, %ecx
andl $0x1e, %ecx
movl $0x2, %ebx
shll %cl, %ebx
shrl $0x4, %eax
movl (%r12,%rax,4), %r11d
testl %r11d, %ebx
jne 0x18c2c
incl %edx
addl %edx, %esi
xorl %eax, %eax
cmpl %r14d, %esi
jb 0x18c0f
movl %r14d, %eax
subl %eax, %esi
movl %esi, %eax
shrl $0x4, %eax
movl (%r12,%rax,4), %r11d
leal (%rsi,%rsi), %ecx
andl $0x1e, %ecx
movl $0x2, %ebx
shll %cl, %ebx
testl %r11d, %ebx
je 0x18c03
notl %ebx
andl %r11d, %ebx
movl %ebx, (%r12,%rax,4)
cmpl %r13d, %esi
jae 0x18c62
movl (%r15,%rax,4), %edx
movl %edx, %r11d
shrl %cl, %r11d
testb $0x3, %r11b
jne 0x18c62
leaq (%r15,%rax,4), %rax
movl %esi, %esi
movq (%rbp,%rsi,8), %r11
movq %r10, (%rbp,%rsi,8)
movq %r11, %r10
jmp 0x18bbf
movl %esi, %eax
movq %r10, (%rbp,%rax,8)
incq %r9
cmpq %r8, %r9
jne 0x18b97
cmpl %r14d, %r13d
jbe 0x18c9a
leaq (,%r14,8), %rsi
movq %rbp, %rdi
callq 0x3720
movq %rax, %rbp
movq 0x30(%rsp), %rax
movq %rbp, 0x18(%rax)
movq 0x10(%rax), %r15
xorl %ebx, %ebx
movq %r15, %rdi
callq 0x3350
movq 0x30(%rsp), %rax
movq %r12, 0x10(%rax)
movl %r14d, (%rax)
movq 0x60(%rsp), %rcx
movl %ecx, 0x8(%rax)
movq 0x18(%rsp), %rdx
movl %edx, 0xc(%rax)
movl %ecx, 0x70(%rsp)
movq 0x10(%rsp), %r10
movl 0x20(%rsp), %edi
jmp 0x18ce2
movq %r15, %r12
movl 0x20(%rsp), %eax
movl %eax, %r14d
movl %ebx, %eax
movq %rax, 0x18(%rsp)
xorl %ebx, %ebx
shlq $0x20, %r10
decl %edi
movslq %edi, %rax
orq %rax, %r10
movq %r10, %rdi
shrq $0x21, %rdi
movl %eax, %ecx
shll $0xb, %ecx
xorl %ecx, %edi
xorl %eax, %edi
movl %edi, %eax
xorl %edx, %edx
divl %r14d
movl %edx, %esi
movl %edx, %eax
shrl $0x4, %eax
movl (%r12,%rax,4), %eax
leal (%rsi,%rsi), %ecx
shrl %cl, %eax
testb $0x2, %al
je 0x18d1d
movl %esi, %eax
jmp 0x18d98
leal -0x1(%r14), %ecx
movl %edi, %eax
xorl %edx, %edx
divl %ecx
incl %edx
movl %esi, %edi
movl %r14d, %eax
movl %edi, %ecx
shrl $0x4, %ecx
movl (%r12,%rcx,4), %r8d
leal (%rdi,%rdi), %ecx
andl $0x1e, %ecx
movl %r8d, %r9d
shrl %cl, %r9d
testb $0x2, %r9b
jne 0x18d7d
testb $0x1, %r9b
jne 0x18d59
movl %edi, %r9d
cmpq %r10, (%rbp,%r9,8)
je 0x18d7d
btl %ecx, %r8d
cmovbl %edi, %eax
addl %edx, %edi
cmpl %r14d, %edi
movl %r14d, %ecx
cmovbl %ebx, %ecx
subl %ecx, %edi
cmpl %esi, %edi
jne 0x18d2e
movb $0x1, %cl
movl %r14d, %edx
cmpl %r14d, %eax
je 0x18d8b
jmp 0x18d98
shrl %cl, %r8d
testb $0x2, %r8b
sete %cl
movl %eax, %edx
movl %edi, %esi
cmpl %r14d, %edx
cmovel %esi, %edx
testb %cl, %cl
cmovnel %esi, %edx
movl %edx, %eax
movl %eax, %edx
shrl $0x4, %edx
movl (%r12,%rdx,4), %esi
leal (%rax,%rax), %ecx
andl $0x1e, %ecx
movl %esi, %edi
shrl %cl, %edi
testb $0x2, %dil
jne 0x18de1
testb $0x1, %dil
je 0x18e15
movl $0x3, %edi
shll %cl, %edi
movl %eax, %eax
movq %r10, (%rbp,%rax,8)
notl %edi
andl %edi, %esi
movl %esi, (%r12,%rdx,4)
movq 0x30(%rsp), %rax
movl 0x4(%rax), %edx
incl %edx
movq %rdx, 0x60(%rsp)
movl %edx, 0x4(%rax)
jmp 0x18e15
movl %eax, %eax
movq %r10, (%rbp,%rax,8)
movl $0x3, %eax
shll %cl, %eax
notl %eax
andl %eax, %esi
movl %esi, (%r12,%rdx,4)
movq 0x30(%rsp), %rax
movl 0x4(%rax), %edx
movl 0x8(%rax), %esi
incl %edx
movq %rdx, 0x60(%rsp)
movl %edx, 0x4(%rax)
incl %esi
movl %esi, 0x70(%rsp)
movl %esi, 0x8(%rax)
movl 0x13c(%rsp), %esi
movl %r14d, %r13d
movq 0x28(%rsp), %rdi
cmpl $0xa, %esi
je 0x18e9a
movl 0x10(%rdi), %r15d
movl 0x8(%rdi), %ecx
movl 0xc(%rdi), %eax
testl %r15d, %r15d
je 0x18e40
cmpl %eax, %ecx
jge 0x18edd
movq (%rdi), %rbx
cmpl %eax, %ecx
jl 0x18e77
movq 0x18(%rdi), %rdi
movq %rbx, %rsi
movl $0x4000, %edx           # imm = 0x4000
callq 0x36d0
xorl %ecx, %ecx
cmpl $0x3fff, %eax           # imm = 0x3FFF
jg 0x18e72
movl $0x1, %r15d
testl %eax, %eax
movq 0x28(%rsp), %rdi
jne 0x18e77
jmp 0x18edd
movq 0x28(%rsp), %rdi
movslq %ecx, %rdx
incl %ecx
movzbl (%rbx,%rdx), %edx
movl %edx, 0x13c(%rsp)
cmpl $0xa, %edx
je 0x18e90
testl %edx, %edx
jne 0x18e33
movl %r15d, 0x10(%rdi)
movl %ecx, 0x8(%rdi)
movl %eax, 0xc(%rdi)
movq 0x50(%rsp), %rbx
movq %rbx, %rsi
leaq 0x13c(%rsp), %rdx
callq 0x1ac3b
movq %r12, %r15
movl %r14d, 0x20(%rsp)
movq %rbx, %r14
movq 0x18(%rsp), %rcx
movl %ecx, %ebx
testl %eax, %eax
movq 0x30(%rsp), %r12
jns 0x18a41
jmp 0x18ef2
movl %r13d, 0xa0(%rsp)
xorl %r12d, %r12d
jmp 0x18f3c
movl $0xffffffff, 0x13c(%rsp) # imm = 0xFFFFFFFF
movq 0x30(%rsp), %r12
movq 0x50(%rsp), %r14
movq 0x28(%rsp), %rbx
movq (%rbx), %rdi
callq 0x3350
movq %rbx, %rdi
callq 0x3350
movq 0x48(%rsp), %rdi
callq 0x31c0
movq 0x10(%r14), %rdi
callq 0x3350
movq %r14, %rdi
callq 0x3350
movq 0x38(%rsp), %rdi
callq 0x3350
movq 0xc0(%rsp), %r14
movq 0x80(%rsp), %r15
testq %r14, %r14
je 0x19038
movq %r14, %rdi
callq 0x3360
leaq 0x14(%rax), %rdi
callq 0x3240
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x35d0
movq %rbx, %rdi
callq 0x3360
movl $0x6d6162, %ebp         # imm = 0x6D6162
movl %ebp, 0x3(%rbx,%rax)
movl $0x622e302e, (%rbx,%rax) # imm = 0x622E302E
leaq 0x262d7(%rip), %r14     # 0x3f25a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20308
movq %rax, 0xc8(%rsp)
movq 0xc0(%rsp), %rsi
movq %rbx, %rdi
callq 0x35d0
movq %rbx, %rdi
callq 0x3360
movl %ebp, 0x3(%rbx,%rax)
movl $0x622e312e, (%rbx,%rax) # imm = 0x622E312E
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20308
movq %rax, 0xd0(%rsp)
movq 0xc0(%rsp), %rsi
movq %rbx, %rdi
callq 0x35d0
movq %rbx, %rdi
callq 0x3360
movabsq $0x6172656d6968632e, %rcx # imm = 0x6172656D6968632E
movq %rcx, (%rbx,%rax)
movabsq $0x6d61622e617265, %rcx # imm = 0x6D61622E617265
movq %rcx, 0x5(%rbx,%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20308
movq %rax, 0xd8(%rsp)
xorl %r14d, %r14d
movq 0xc8(%rsp,%r14,8), %rdi
movq %r15, %rsi
callq 0x237d0
incq %r14
cmpq $0x3, %r14
jne 0x19017
movq %rbx, %rdi
callq 0x3350
leaq 0xd93(%rip), %rdi       # 0x19dd2
leaq 0xa0(%rsp), %rbx
movq %rbx, %rsi
callq 0x2b2cc
movq %rax, %r14
movl $0x0, 0x14(%rbx)
movl $0x1, %edi
movl $0x28, %esi
callq 0x3610
movq %rax, %rbp
movss 0x28e9d(%rip), %xmm0    # 0x41f10
callq 0x16057
movq %rax, 0xf8(%rsp)
movslq 0x10(%rbx), %rdi
movl $0x2, %esi
callq 0x3610
movq %rax, 0x88(%rsp)
leaq 0x29208(%rip), %rdi     # 0x422a5
callq 0x3150
leaq 0x290c1(%rip), %rdi     # 0x4216a
callq 0x3150
leaq 0x290c9(%rip), %rdi     # 0x4217e
callq 0x3150
leaq 0x290d3(%rip), %rdi     # 0x42194
callq 0x3150
leaq 0x290e9(%rip), %rdi     # 0x421b6
callq 0x3150
leaq 0x290fa(%rip), %rdi     # 0x421d3
callq 0x3150
leaq 0x29136(%rip), %rdi     # 0x4221b
callq 0x3150
leaq 0x29154(%rip), %rdi     # 0x42245
callq 0x3150
leaq 0x2916b(%rip), %rdi     # 0x42268
callq 0x3150
leaq 0x2919f(%rip), %rdi     # 0x422a8
callq 0x3150
leaq 0x291bc(%rip), %rdi     # 0x422d1
callq 0x3150
leaq 0x291d7(%rip), %rdi     # 0x422f8
callq 0x3150
leaq 0x29222(%rip), %rdi     # 0x4234f
callq 0x3150
movq 0x36ebf(%rip), %rax     # 0x4fff8
movq (%rax), %rdi
callq 0x3800
leaq 0x44(%rsp), %rsi
leaq 0x6c(%rsp), %rdx
leaq 0x5c(%rsp), %rcx
movq %r14, 0x100(%rsp)
movq %r14, %rdi
callq 0x2bd1d
testq %rax, %rax
je 0x19c5e
movq %rax, %r11
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r14d, %r14d
xorl %edx, %edx
movq $0x0, 0xf0(%rsp)
xorl %r13d, %r13d
movq %rbp, 0x48(%rsp)
movq %r12, 0x30(%rsp)
movl 0x44(%rsp), %eax
testl %eax, %eax
js 0x19c8a
cmpl %r8d, %eax
movq %r11, 0x10(%rsp)
jne 0x191ac
movl %edx, 0xc(%rsp)
jmp 0x191fe
movl $0x0, 0xb4(%rsp)
movl $0x0, 0xc(%rsp)
testl %r8d, %r8d
js 0x191fb
movq 0x8(%r15), %rax
movl %r8d, %ecx
movq (%rax,%rcx,8), %rsi
leaq 0xa0(%rsp), %rdi
movq %r13, %rcx
movq %rbp, %r8
callq 0x19ed5
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
movq %rbp, %rsi
callq 0x1abcb
movq 0x10(%rsp), %r11
movl 0x44(%rsp), %r8d
jmp 0x191fe
movl %eax, %r8d
xorl %ebx, %ebx
testq %r12, %r12
movq %r8, 0x130(%rsp)
je 0x1929d
movl (%r12), %edi
testl %edi, %edi
je 0x192ac
shlq $0x20, %r8
movslq 0x6c(%rsp), %rax
orq %rax, %r8
movq %r8, %rdx
shrq $0x21, %rdx
movl %eax, %ecx
shll $0xb, %ecx
xorl %eax, %ecx
xorl %edx, %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %edi
movl %edx, %esi
leal -0x1(%rdi), %r9d
movl %ecx, %eax
xorl %edx, %edx
divl %r9d
incl %edx
movq 0x10(%r12), %rax
movl %esi, %ebx
movl %ebx, %ecx
shrl $0x4, %ecx
movl (%rax,%rcx,4), %r9d
leal (%rbx,%rbx), %ecx
andl $0x1e, %ecx
movl %r9d, %r10d
shrl %cl, %r10d
testb $0x2, %r10b
jne 0x192a2
testb $0x1, %r10b
jne 0x19289
movq 0x18(%r12), %r10
movl %ebx, %r11d
cmpq %r8, (%r10,%r11,8)
movq 0x10(%rsp), %r11
je 0x192a2
addl %edx, %ebx
cmpl %edi, %ebx
movl %edi, %ecx
cmovbl %r14d, %ecx
subl %ecx, %ebx
cmpl %esi, %ebx
jne 0x19255
movl %edi, %ebx
jmp 0x192ac
movb $0x1, %bpl
jmp 0x192b5
shrl %cl, %r9d
testb $0x3, %r9b
cmovnel %edi, %ebx
cmpl %edi, %ebx
sete %bpl
setne %bl
movl 0x5c(%rsp), %ecx
cmpl 0xb0(%rsp), %ecx
setg %al
testl %ecx, %ecx
setle %dl
orb %al, %dl
jne 0x194c0
movl 0xa8(%rsp), %eax
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rdx
xorl %edi, %edi
xorl %esi, %esi
testb $0x9, 0x14(%r11,%rdi)
jne 0x193b5
movq (%r11,%rdi), %rcx
movq 0x8(%rcx), %r8
movq %r8, %r9
shrq $0x30, %r9
shlq $0x2, %r9
addq 0x30(%rcx), %r9
movl %r8d, %r10d
shrl $0x18, %r10d
addq %r9, %r10
movl 0x10(%rcx), %ecx
incl %ecx
sarl %ecx
movslq %ecx, %r9
addq %r10, %r9
movslq 0x8(%r11,%rdi), %rcx
movzbl (%rcx,%r9), %r9d
cmpl %r9d, %eax
jg 0x193b5
movl %ecx, %r11d
sarl %r11d
movslq %r11d, %r11
movzbl (%r10,%r11), %r10d
shll $0x2, %ecx
notb %cl
andb $0x4, %cl
shrl %cl, %r10d
andl $0xf, %r10d
leaq 0x37d9c(%rip), %rcx     # 0x510f0
movsbl (%rcx,%r10), %ecx
cmpl $0x3, %ecx
jg 0x193b0
movl %r8d, %r10d
shrl $0x10, %r10d
movzbl %r10b, %r10d
cmpl %r9d, %r10d
cmovbl %r10d, %r9d
cmpl $0x5, %r9d
movl $0x4, %r10d
cmovbl %r10d, %r9d
cmpl $0x3f, %r9d
movl $0x3f, %r10d
cmovael %r10d, %r9d
shll $0x5, %r9d
shrq $0x20, %r8
andl $0x10, %r8d
orl %r9d, %r8d
orl %ecx, %r8d
movslq %esi, %rcx
incl %esi
movq 0x88(%rsp), %r9
movw %r8w, (%r9,%rcx,2)
movq 0x10(%rsp), %r11
addq $0x18, %rdi
cmpq %rdi, %rdx
jne 0x192e3
testl %esi, %esi
je 0x194c0
movq 0xf8(%rsp), %rdi
movl $0x4, %edx
movq 0x88(%rsp), %rcx
leaq 0x250(%rsp), %r14
movq %r14, %r8
callq 0x163bf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %edx, %edx
xorl %esi, %esi
movss 0x28b14(%rip), %xmm1    # 0x41f14
movaps %xmm1, %xmm0
xorl %edi, %edi
movaps %xmm1, %xmm2
movss (%r14,%rdi,4), %xmm3
ucomiss %xmm3, %xmm1
jbe 0x1941f
leaq (%rdx,%rdi), %rax
movaps %xmm3, %xmm1
movaps %xmm2, %xmm0
jmp 0x1942a
movaps %xmm2, %xmm1
ucomiss %xmm3, %xmm0
jbe 0x1942a
movaps %xmm3, %xmm0
leaq (%rsi,%rdi), %r8
incq %r8
incq %rdi
cmpq $0x4, %r8
jne 0x19405
incq %rsi
addq $0x5, %rdx
addq $0x14, %r14
cmpq $0x4, %rsi
jne 0x19403
movl %eax, %ecx
shrl $0x2, %ecx
andl $0x3, %ecx
andl $0x3, %eax
xorl %r14d, %r14d
cmpl %eax, %ecx
je 0x19486
shll $0x10, %ecx
subss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
addsd 0x25bc0(%rip), %xmm0    # 0x3f030
cvttsd2si %xmm0, %r14d
shll $0x2, %r14d
orl %ecx, %r14d
orl %eax, %r14d
orl $0x40000, %r14d         # imm = 0x40000
testq %r12, %r12
je 0x1949d
movb 0xa0(%rsp), %al
andb $0x4, %al
shrb $0x2, %al
notb %bl
testb %al, %bl
jne 0x194b6
testb %bpl, %bpl
je 0x19500
movl %r14d, %eax
shrl $0x2, %eax
andl $0x3fff, %eax           # imm = 0x3FFF
cmpl 0xac(%rsp), %eax
jge 0x19500
movq 0x48(%rsp), %rbp
xorl %r14d, %r14d
jmp 0x194c5
movq 0x48(%rsp), %rbp
movq 0x100(%rsp), %rdi
leaq 0x44(%rsp), %rsi
leaq 0x6c(%rsp), %rdx
leaq 0x5c(%rsp), %rcx
callq 0x2bd1d
movq %rax, %r11
movl 0xc(%rsp), %eax
movl %eax, %edx
testq %r11, %r11
movq 0x130(%rsp), %r8
jne 0x19190
jmp 0x19c63
movq 0xf0(%rsp), %rax
cmpl %eax, 0xc(%rsp)
movq 0x48(%rsp), %rbp
jne 0x1953d
leal (%rax,%rax), %ebx
testl %eax, %eax
movl $0x80, %eax
cmovel %eax, %ebx
leal (,%rbx,8), %eax
movslq %eax, %rsi
movq %r13, %rdi
callq 0x3720
movq %rax, %r13
movq %rbx, 0xf0(%rsp)
movq 0x10(%rsp), %r11
movl 0x6c(%rsp), %eax
shlq $0x20, %rax
movslq %r14d, %rcx
orq %rax, %rcx
movslq 0xc(%rsp), %rax
movq %rax, 0x90(%rsp)
movq %rcx, (%r13,%rax,8)
cmpl $0x0, 0x5c(%rsp)
movl $0x0, %r14d
jle 0x19c0a
movl $0x1, 0x78(%rsp)
xorl %r8d, %r8d
movq %r13, 0x108(%rsp)
leaq (%r8,%r8,2), %rax
movq (%r11,%rax,8), %rcx
movq 0x8(%rcx), %rdx
testb $0x9, 0x14(%r11,%rax,8)
setne %sil
testl $0xff0000, %edx         # imm = 0xFF0000
sete %dil
orb %sil, %dil
jne 0x19bf2
leaq (%r11,%rax,8), %rsi
movq 0x30(%rcx), %rax
movq %rdx, %rcx
shrq $0x30, %rcx
leaq (%rax,%rcx,4), %rcx
shrl $0x18, %edx
addq %rcx, %rdx
movq %rsi, 0x110(%rsp)
movl 0x8(%rsi), %ecx
movl %ecx, %esi
sarl %esi
movslq %esi, %rsi
movzbl (%rsi,%rdx), %edx
shll $0x2, %ecx
notb %cl
andb $0x4, %cl
shrl %cl, %edx
andl $0xf, %edx
leaq 0x2890e(%rip), %rcx     # 0x41f00
movsbq (%rdx,%rcx), %rcx
movq 0x90(%rsp), %rdx
movq (%r13,%rdx,8), %rdx
movl %edx, %esi
andl $0x3, %esi
shrl $0x10, %edx
andl $0x3, %edx
cmpq %rcx, %rdx
sete %dl
addb %dl, %dl
cmpq %rcx, %rsi
movzbl %dl, %edx
movl $0x1, %ecx
cmovel %ecx, %edx
movl %edx, 0x7c(%rsp)
movsbq (%rax), %rbx
testq %rbx, %rbx
je 0x19660
movb 0x1(%rax), %cl
testb %cl, %cl
leaq 0x28d22(%rip), %rdi     # 0x42360
je 0x19669
addq $0x2, %rax
movq %rbx, %rdx
shlq $0x5, %rdx
subq %rbx, %rdx
movsbq %cl, %rbx
addq %rdx, %rbx
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0x19644
jmp 0x19669
xorl %ebx, %ebx
leaq 0x28cf7(%rip), %rdi     # 0x42360
movl (%rbp), %r10d
movl 0x8(%rbp), %eax
cmpl 0xc(%rbp), %eax
movq %r8, 0x98(%rsp)
jb 0x199a9
movl 0x4(%rbp), %r9d
leal (%r9,%r9), %ecx
cmpl %r10d, %ecx
movl $0x0, %ecx
sbbl %ecx, %ecx
orl $0x1, %ecx
addl %r10d, %ecx
movl $0x21, %edx
leal -0x2(%rdx), %esi
decl %edx
cmpl %ecx, (%rdi,%rsi,4)
ja 0x1969e
movl %edx, %ecx
movl (%rdi,%rcx,4), %r13d
cvtsi2sd %r13, %xmm0
mulsd 0x25955(%rip), %xmm0    # 0x3f010
addsd 0x25955(%rip), %xmm0    # 0x3f018
cvttsd2si %xmm0, %rcx
cmpl %ecx, %r9d
jae 0x199a9
movq %rcx, 0x118(%rsp)
movq %r9, 0x120(%rsp)
movq %rbx, 0x128(%rsp)
movl %r13d, %eax
shrl $0x4, %eax
leaq 0x4(,%rax,4), %r15
movq %r15, %rdi
movl %r10d, 0x38(%rsp)
callq 0x3240
movq %rax, %rbx
movq %rax, %rdi
movl $0xaa, %esi
movq %r15, %rdx
callq 0x3080
movl 0x38(%rsp), %edx
cmpl %r13d, %edx
jae 0x1974d
movq 0x18(%rbp), %rdi
leaq (,%r13,8), %rsi
callq 0x3720
movq %rax, 0x18(%rbp)
movq 0x20(%rbp), %rdi
imulq $0x114, %r13, %rsi      # imm = 0x114
callq 0x3720
movl 0x38(%rsp), %edx
movq %rax, 0x20(%rbp)
movq 0x10(%rbp), %rdi
testl %edx, %edx
je 0x1996e
leal -0x1(%r13), %eax
movl %eax, 0x60(%rsp)
xorl %esi, %esi
movq %rdi, 0x18(%rsp)
movl %esi, %ebp
shrl $0x4, %ebp
movl (%rdi,%rbp,4), %r12d
leal (%rsi,%rsi), %r15d
andl $0x1e, %r15d
movl %r12d, %eax
movl %r15d, %ecx
shrl %cl, %eax
testb $0x3, %al
jne 0x19927
movq 0x48(%rsp), %rcx
movq 0x18(%rcx), %rdx
movq %rsi, 0x70(%rsp)
movl %esi, %eax
movq %rdx, 0x50(%rsp)
movq (%rdx,%rax,8), %r14
movq 0x20(%rcx), %rcx
imulq $0x114, %rax, %rsi      # imm = 0x114
movq %rcx, 0x20(%rsp)
addq %rcx, %rsi
movl $0x114, %edx            # imm = 0x114
leaq 0x13c(%rsp), %rdi
callq 0x37d0
movq 0x18(%rsp), %r9
btsl %r15d, %r12d
movl %r12d, (%r9,%rbp,4)
movq %r14, %rcx
shrq $0x21, %rcx
movl %r14d, %eax
shll $0xb, %eax
xorl %eax, %ecx
xorl %r14d, %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %r13d
movl %edx, %esi
movl %ecx, %eax
xorl %edx, %edx
divl 0x60(%rsp)
movl %esi, %ebp
movl %esi, %r15d
addl %esi, %r15d
andl $0x1e, %r15d
movl $0x2, %edi
movl %r15d, %ecx
shll %cl, %edi
shrl $0x4, %ebp
movl (%rbx,%rbp,4), %eax
testl %eax, %edi
je 0x1981e
movl 0x38(%rsp), %r8d
jmp 0x19851
incl %edx
movl 0x38(%rsp), %r8d
addl %edx, %esi
xorl %eax, %eax
cmpl %r13d, %esi
jb 0x19831
movl %r13d, %eax
subl %eax, %esi
movl %esi, %ebp
shrl $0x4, %ebp
movl (%rbx,%rbp,4), %eax
leal (%rsi,%rsi), %r15d
andl $0x1e, %r15d
movl $0x2, %edi
movl %r15d, %ecx
shll %cl, %edi
testl %eax, %edi
je 0x19825
notl %edi
andl %eax, %edi
movl %edi, (%rbx,%rbp,4)
movl %esi, %eax
cmpl %r8d, %esi
jae 0x198ec
movl (%r9,%rbp,4), %edx
movl %r15d, %ecx
shrl %cl, %edx
testb $0x3, %dl
jne 0x198ec
movq 0x50(%rsp), %rcx
movq (%rcx,%rax,8), %rdx
movq %rdx, 0x28(%rsp)
movq %r14, (%rcx,%rax,8)
imulq $0x114, %rax, %r14      # imm = 0x114
addq 0x20(%rsp), %r14
movl $0x114, %edx            # imm = 0x114
leaq 0x294(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x37d0
movl $0x114, %edx            # imm = 0x114
movq %r14, %rdi
leaq 0x13c(%rsp), %r14
movq %r14, %rsi
callq 0x37d0
movl $0x114, %edx            # imm = 0x114
movq %r14, %rdi
movq %r12, %rsi
callq 0x37d0
movq 0x18(%rsp), %r9
movl $0x1, %eax
movl %r15d, %ecx
shll %cl, %eax
orl %eax, (%r9,%rbp,4)
movq 0x28(%rsp), %r14
jmp 0x197d4
movq 0x50(%rsp), %rcx
movq %r14, (%rcx,%rax,8)
imulq $0x114, %rax, %rax      # imm = 0x114
movq 0x20(%rsp), %rdi
addq %rax, %rdi
movl $0x114, %edx            # imm = 0x114
leaq 0x13c(%rsp), %rsi
callq 0x37d0
movq 0x18(%rsp), %rdi
xorl %r14d, %r14d
movl 0x38(%rsp), %edx
movq 0x70(%rsp), %rsi
incl %esi
cmpl %edx, %esi
jne 0x19768
cmpl %r13d, %edx
movq 0x30(%rsp), %r12
movq 0x48(%rsp), %rbp
jbe 0x1996e
movq 0x18(%rbp), %rdi
leaq (,%r13,8), %rsi
callq 0x3720
movq %rax, 0x18(%rbp)
movq 0x20(%rbp), %rdi
imulq $0x114, %r13, %rsi      # imm = 0x114
callq 0x3720
movq 0x18(%rsp), %rdi
movq %rax, 0x20(%rbp)
callq 0x3350
movq %rbx, 0x10(%rbp)
movl %r13d, (%rbp)
movq 0x120(%rsp), %r9
movl %r9d, 0x8(%rbp)
movq 0x118(%rsp), %rax
movl %eax, 0xc(%rbp)
movq 0x80(%rsp), %r15
movq 0x10(%rsp), %r11
movq 0x128(%rsp), %rbx
jmp 0x199af
movl %eax, %r9d
movl %r10d, %r13d
movq %rbx, %rdi
shrq $0x21, %rdi
movl %ebx, %eax
shll $0xb, %eax
xorl %eax, %edi
xorl %ebx, %edi
movl %edi, %eax
xorl %edx, %edx
divl %r13d
movl %edx, %esi
movq 0x10(%rbp), %r8
movl %edx, %eax
shrl $0x4, %eax
movl (%r8,%rax,4), %eax
leal (%rsi,%rsi), %ecx
shrl %cl, %eax
testb $0x2, %al
je 0x199e5
movl %esi, %eax
jmp 0x19a85
movq %r15, %r12
movq %r9, %r15
leal -0x1(%r13), %ecx
movl %edi, %eax
xorl %edx, %edx
divl %ecx
incl %edx
movl %esi, %edi
movl %r13d, %eax
movl %edi, %ecx
shrl $0x4, %ecx
movl (%r8,%rcx,4), %r9d
leal (%rdi,%rdi), %ecx
andl $0x1e, %ecx
movl %r9d, %r10d
shrl %cl, %r10d
testb $0x2, %r10b
jne 0x19a5f
testb $0x1, %r10b
jne 0x19a2f
movq 0x18(%rbp), %r10
movl %edi, %r11d
cmpq %rbx, (%r10,%r11,8)
movq 0x10(%rsp), %r11
je 0x19a5f
btl %ecx, %r9d
cmovbl %edi, %eax
addl %edx, %edi
cmpl %r13d, %edi
movl %r13d, %ecx
cmovbl %r14d, %ecx
subl %ecx, %edi
cmpl %esi, %edi
jne 0x199fc
movb $0x1, %cl
movl %r13d, %edx
cmpl %r13d, %eax
movq %r15, %r9
movq %r12, %r15
movq 0x30(%rsp), %r12
je 0x19a78
jmp 0x19a85
shrl %cl, %r9d
testb $0x2, %r9b
sete %cl
movl %eax, %edx
movl %edi, %esi
movq %r15, %r9
movq %r12, %r15
movq 0x30(%rsp), %r12
cmpl %r13d, %edx
cmovel %esi, %edx
testb %cl, %cl
cmovnel %esi, %edx
movl %edx, %eax
movl %eax, %edx
shrl $0x4, %edx
movl (%r8,%rdx,4), %esi
leal (%rax,%rax), %ecx
andl $0x1e, %ecx
movl %esi, %edi
shrl %cl, %edi
movl %eax, %eax
testb $0x2, %dil
jne 0x19b26
testb $0x1, %dil
movq 0x108(%rsp), %r13
jne 0x19b51
movq 0x20(%rbp), %rbx
imulq $0x114, %rax, %rcx      # imm = 0x114
movslq 0x100(%rbx,%rcx), %rdx
movq 0x90(%rsp), %rax
subq %rdx, %rax
movl $0x0, 0x78(%rsp)
cmpl $0xfe, %eax
jg 0x19bea
addq %rcx, %rbx
incl %eax
movzwl %ax, %eax
movw %ax, 0x10c(%rbx)
movl 0x7c(%rsp), %ecx
movb %cl, -0x1(%rax,%rbx)
movq 0x110(%rsp), %rax
movq (%rax), %rdi
movzbl 0xb(%rdi), %esi
addq 0x30(%rdi), %rsi
callq 0x2343c
movq 0x10(%rsp), %r11
movl %eax, 0x108(%rbx)
jmp 0x19bea
movl $0x3, %edi
shll %cl, %edi
movq 0x18(%rbp), %rcx
movq %rbx, (%rcx,%rax,8)
notl %edi
andl %edi, %esi
movl %esi, (%r8,%rdx,4)
incl 0x4(%rbp)
incl %r9d
movl %r9d, 0x8(%rbp)
movq 0x108(%rsp), %r13
jmp 0x19b6b
movl $0x3, %edi
shll %cl, %edi
movq 0x18(%rbp), %rcx
movq %rbx, (%rcx,%rax,8)
notl %edi
andl %edi, %esi
movl %esi, (%r8,%rdx,4)
incl 0x4(%rbp)
movq 0x20(%rbp), %rbx
imulq $0x114, %rax, %r14      # imm = 0x114
leaq (%rbx,%r14), %rdi
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x3080
movq 0x110(%rsp), %rax
movq (%rax), %rdi
movl 0x4(%rdi), %eax
movl %eax, 0x104(%rbx,%r14)
movzbl 0xb(%rdi), %esi
addq 0x30(%rdi), %rsi
callq 0x2343c
movl %eax, 0x108(%rbx,%r14)
movl 0xc(%rsp), %eax
movl %eax, 0x100(%rbx,%r14)
movl 0x7c(%rsp), %eax
movb %al, (%rbx,%r14)
movq 0x10c(%rbx,%r14), %rax
movq $-0x1c0000, %rcx        # imm = 0xFFE40000
andq %rcx, %rax
incq %rax
movq %rax, 0x10c(%rbx,%r14)
xorl %r14d, %r14d
movq 0x10(%rsp), %r11
movq 0x98(%rsp), %r8
incq %r8
movslq 0x5c(%rsp), %rax
cmpq %rax, %r8
jl 0x19586
cmpl $0x0, 0x78(%rsp)
je 0x19c4f
movq 0x8(%r15), %rax
movslq 0x44(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xa0(%rsp), %rdi
movl 0xc(%rsp), %ebx
movl %ebx, %edx
movq %r13, %rcx
movq %rbp, %r8
callq 0x19ed5
movl %ebx, %edi
movq %rbp, %rsi
callq 0x1abcb
movq 0x90(%rsp), %rax
movq (%r13,%rax,8), %rax
movq %rax, (%r13)
xorl %eax, %eax
jmp 0x19c53
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
jmp 0x194c5
xorl %r13d, %r13d
xorl %eax, %eax
movl %eax, %edx
movslq 0x44(%rsp), %rax
testq %rax, %rax
js 0x19c8a
movq 0x8(%r15), %rcx
movq (%rcx,%rax,8), %rsi
leaq 0xa0(%rsp), %rdi
movq %r13, %rcx
movq %rbp, %r8
callq 0x19ed5
movq %r15, %rdi
callq 0x23577
movq 0x100(%rsp), %rdi
callq 0x2b378
movq 0xb8(%rsp), %rdi
callq 0x21311
testq %rbp, %rbp
je 0x19cd4
movq 0x18(%rbp), %rdi
callq 0x3350
movq 0x10(%rbp), %rdi
callq 0x3350
movq 0x20(%rbp), %rdi
callq 0x3350
movq %rbp, %rdi
callq 0x3350
testq %r12, %r12
je 0x19cff
movq 0x18(%r12), %rdi
callq 0x3350
movq 0x10(%r12), %rdi
callq 0x3350
movq 0x20(%r12), %rdi
callq 0x3350
movq %r12, %rdi
callq 0x3350
movq %r13, %rdi
callq 0x3350
movq 0xf8(%rsp), %rdi
callq 0x1637d
movq 0x88(%rsp), %rdi
callq 0x3350
cmpq $0x0, 0xc0(%rsp)
je 0x19d5e
xorl %ebx, %ebx
movq 0xc8(%rsp,%rbx,8), %rdi
callq 0x21311
incq %rbx
cmpq $0x3, %rbx
jne 0x19d2e
movq 0xc0(%rsp), %rdi
callq 0x3350
movq 0xe8(%rsp), %rdi
callq 0x3350
xorl %eax, %eax
addq $0x3a8, %rsp            # imm = 0x3A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x36257(%rip), %rax     # 0x4ffd0
movq (%rax), %rdi
callq 0x3030
leaq 0x2bfc7(%rip), %rsi     # 0x45d4f
movl %eax, %edi
callq 0x20487
jmp 0x18956
movq 0x36235(%rip), %rax     # 0x4ffd0
movq (%rax), %rdi
callq 0x3030
leaq 0x2bfa5(%rip), %rsi     # 0x45d4f
movl %eax, %edi
callq 0x33e0
jmp 0x189c9
movl 0x50(%rsp), %edi
movl 0x28(%rsp), %esi
movl 0x18(%rsp), %edx
movl 0x20(%rsp), %ecx
callq 0x4253
movl $0x1, %eax
jmp 0x19d60