// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bcftools/call1.c
// Function: update_bcf1
static int update_bcf1(bcf1_t *b, const bcf_p1aux_t *pa, const bcf_p1rst_t *pr, double pref, int flag, double em[10], int cons_llr, int64_t cons_gt)
{
	kstring_t s;
	int has_I16, is_var;
	double fq, r;
	anno16_t a;

	has_I16 = test16(b, &a) >= 0? 1 : 0;
	//rm_info(b, "I16="); // FIXME: probably this function has a bug. If I move it below, I16 will not be removed!

	memset(&s, 0, sizeof(kstring_t));
	kputc('\0', &s); kputs(b->ref, &s); kputc('\0', &s);
	kputs(b->alt, &s); kputc('\0', &s); kputc('\0', &s);
	kputs(b->info, &s);
	if (b->info[0]) kputc(';', &s);
	{ // print EM
		if (em[0] >= 0) ksprintf(&s, "AF1=%.4g", 1 - em[0]);
		if (em[4] >= 0 && em[4] <= 0.05) ksprintf(&s, ";G3=%.4g,%.4g,%.4g;HWE=%.3g", em[3], em[2], em[1], em[4]);
		if (em[5] >= 0 && em[6] >= 0) ksprintf(&s, ";AF2=%.4g,%.4g", 1 - em[5], 1 - em[6]);
		if (em[7] >= 0) ksprintf(&s, ";LRT=%.3g", em[7]);
		if (em[8] >= 0) ksprintf(&s, ";LRT2=%.3g", em[8]);
	}
	if (cons_llr > 0) {
		ksprintf(&s, ";CLR=%d", cons_llr);
		if (cons_gt > 0)
			ksprintf(&s, ";UGT=%c%c%c;CGT=%c%c%c", cons_gt&0xff, cons_gt>>8&0xff, cons_gt>>16&0xff,
				     cons_gt>>32&0xff, cons_gt>>40&0xff, cons_gt>>48&0xff);
	}
	if (pr == 0) { // if pr is unset, return
		kputc('\0', &s); kputs(b->fmt, &s); kputc('\0', &s);
		free(b->str);
		b->m_str = s.m; b->l_str = s.l; b->str = s.s;
		bcf_sync(b);
		return 1;
	}

	is_var = (pr->p_ref < pref);
	r = is_var? pr->p_ref : pr->p_var;

//	ksprintf(&s, ";CI95=%.4g,%.4g", pr->cil, pr->cih); // FIXME: when EM is not used, ";" should be omitted!
	ksprintf(&s, ";AC1=%d", pr->ac);
	if (has_I16) ksprintf(&s, ";DP4=%d,%d,%d,%d;MQ=%d", a.d[0], a.d[1], a.d[2], a.d[3], a.mq);
	fq = pr->p_ref_folded < 0.5? -4.343 * log(pr->p_ref_folded) : 4.343 * log(pr->p_var_folded);
	if (fq < -999) fq = -999;
	if (fq > 999) fq = 999;
	ksprintf(&s, ";FQ=%.3g", fq);
	if (pr->cmp[0] >= 0.) { // two sample groups
		int i, q[3];
		for (i = 1; i < 3; ++i) {
			double x = pr->cmp[i] + pr->cmp[0]/2.;
			q[i] = x == 0? 255 : (int)(-4.343 * log(x) + .499);
			if (q[i] > 255) q[i] = 255;
		}
		if (pr->perm_rank >= 0) ksprintf(&s, ";PR=%d", pr->perm_rank);
		// ksprintf(&s, ";LRT3=%.3g", pr->lrt);
		ksprintf(&s, ";PCHI2=%.3g;PC2=%d,%d", q[1], q[2], pr->p_chi2);
	}
	if (has_I16 && a.is_tested) ksprintf(&s, ";PV4=%.2g,%.2g,%.2g,%.2g", a.p[0], a.p[1], a.p[2], a.p[3]);
	kputc('\0', &s);
    rm_info(&s, "QS=");
    rm_info(&s, "I16=");
	kputs(b->fmt, &s); kputc('\0', &s);
	free(b->str);
	b->m_str = s.m; b->l_str = s.l; b->str = s.s;
	b->qual = r < 1e-100? 999 : -4.343 * log(r);
	if (b->qual > 999) b->qual = 999;
	bcf_sync(b);
	if (!is_var) bcf_shrink_alt(b, 1);
	else if (!(flag&VC_KEEPALT))
		bcf_shrink_alt(b, pr->rank0 < 2? 2 : pr->rank0+1);
	if (is_var && (flag&VC_CALL_GT)) { // call individual genotype
		int i, x, old_n_gi = b->n_gi;
		s.m = b->m_str; s.l = b->l_str - 1; s.s = b->str;
		kputs(":GT:GQ", &s); kputc('\0', &s);
		b->m_str = s.m; b->l_str = s.l; b->str = s.s;
		bcf_sync(b);
		for (i = 0; i < b->n_smpl; ++i) {
			x = bcf_p1_call_gt(pa, pr->f_exp, i);
			((uint8_t*)b->gi[old_n_gi].data)[i] = (x&3) == 0? 1<<3|1 : (x&3) == 1? 1 : 0;
			((uint8_t*)b->gi[old_n_gi+1].data)[i] = x>>2;
		}
	}
	return is_var;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %r9d, 0x20(%rsp)
movq %r8, %rbp
movl %ecx, 0x30(%rsp)
movsd %xmm0, 0x28(%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x58(%rsp), %rsi
callq 0x2e7c
movl %eax, 0x34(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
cmpq $0x1, 0x8(%rsp)
ja 0x5b40
movq $0x2, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movl $0x2, %esi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rsp)
xorl %edx, %edx
movb %dl, (%rcx,%rax)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb %dl, (%rcx,%rax)
movq 0x20(%rbx), %r12
movq %r12, %rdi
callq 0x2180
movq (%rsp), %rcx
movslq %eax, %r13
leaq (%rcx,%r13), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x5bcb
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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
addq (%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22e0
addq (%rsp), %r13
movq %r13, (%rsp)
movq 0x10(%rsp), %rax
movb $0x0, (%rax,%r13)
movq (%rsp), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x5c47
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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rsp)
xorl %edx, %edx
movb %dl, (%rcx,%rax)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb %dl, (%rcx,%rax)
movq 0x28(%rbx), %r12
movq %r12, %rdi
callq 0x2180
movq (%rsp), %rcx
movslq %eax, %r13
leaq (%rcx,%r13), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x5cd2
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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
addq (%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22e0
addq (%rsp), %r13
movq %r13, (%rsp)
movq 0x10(%rsp), %rax
movb $0x0, (%rax,%r13)
movq (%rsp), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x5d4e
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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rsp)
xorl %edx, %edx
movb %dl, (%rcx,%rax)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb %dl, (%rcx,%rax)
movq (%rsp), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x5dc6
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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rsp)
xorl %edx, %edx
movb %dl, (%rcx,%rax)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb %dl, (%rcx,%rax)
movq 0x38(%rbx), %r12
movq %r12, %rdi
callq 0x2180
movq (%rsp), %rcx
movslq %eax, %r13
leaq (%rcx,%r13), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x5e51
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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
addq (%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22e0
addq (%rsp), %r13
movq %r13, (%rsp)
movq 0x10(%rsp), %rax
movb $0x0, (%rax,%r13)
movq 0x38(%rbx), %rax
cmpb $0x0, (%rax)
movl 0x34(%rsp), %r13d
je 0x5efd
movq (%rsp), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x5edb
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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rsp)
movb $0x3b, (%rcx,%rax)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb $0x0, (%rcx,%rax)
movsd (%rbp), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jb 0x5f2d
movsd 0x130fc(%rip), %xmm0    # 0x19010
subsd %xmm1, %xmm0
leaq 0x14a55(%rip), %rsi     # 0x1a974
movq %rsp, %rdi
movb $0x1, %al
callq 0x7328
xorpd %xmm0, %xmm0
movsd 0x20(%rbp), %xmm3
ucomisd %xmm0, %xmm3
jb 0x5f66
movsd 0x13100(%rip), %xmm0    # 0x19040
ucomisd %xmm3, %xmm0
jb 0x5f66
movsd 0x18(%rbp), %xmm0
movsd 0x8(%rbp), %xmm2
movsd 0x10(%rbp), %xmm1
leaq 0x14a21(%rip), %rsi     # 0x1a97d
movq %rsp, %rdi
movb $0x4, %al
callq 0x7328
movsd 0x28(%rbp), %xmm2
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm2
jb 0x5fa9
movsd 0x30(%rbp), %xmm3
ucomisd %xmm1, %xmm3
jb 0x5fa9
movsd 0x13088(%rip), %xmm1    # 0x19010
movapd %xmm1, %xmm0
subsd %xmm2, %xmm0
subsd %xmm3, %xmm1
leaq 0x149fe(%rip), %rsi     # 0x1a999
movq %rsp, %rdi
movb $0x2, %al
callq 0x7328
xorpd %xmm1, %xmm1
movsd 0x38(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x5fc5
leaq 0x149ed(%rip), %rsi     # 0x1a9a8
movq %rsp, %rdi
movb $0x1, %al
callq 0x7328
movsd 0x40(%rbp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x5fe5
leaq 0x149d7(%rip), %rsi     # 0x1a9b2
movq %rsp, %rdi
movb $0x1, %al
callq 0x7328
movl 0x20(%rsp), %edx
testl %edx, %edx
jle 0x6061
movq 0xd0(%rsp), %r12
leaq 0x149c1(%rip), %rsi     # 0x1a9bd
movq %rsp, %rdi
xorl %eax, %eax
callq 0x7328
testq %r12, %r12
jle 0x6061
movl $0xff, %eax
movq %r12, %rdx
andq %rax, %rdx
movl %r12d, %ecx
shrl $0x8, %ecx
movl $0xff, %esi
andl %esi, %ecx
movl %r12d, %r8d
shrl $0x10, %r8d
andl %esi, %r8d
movq %r12, %r9
shrq $0x20, %r9
andq %rax, %r9
movq %r12, %r10
shrq $0x28, %r10
andq %rax, %r10
shrq $0x30, %r12
andq %rax, %r12
leaq 0x14976(%rip), %rsi     # 0x1a9c5
movq %rsp, %rdi
xorl %eax, %eax
pushq %r12
pushq %r10
callq 0x7328
addq $0x10, %rsp
testq %r14, %r14
je 0x610d
movsd 0x28(%r14), %xmm1
movsd 0x28(%rsp), %xmm0
ucomisd %xmm1, %xmm0
movsd %xmm1, 0x20(%rsp)
ja 0x6088
movsd 0x38(%r14), %xmm1
movsd %xmm1, 0x40(%rsp)
movl 0x8(%r14), %edx
leaq 0x14943(%rip), %rsi     # 0x1a9dc
movq %rsp, %rdi
xorl %eax, %eax
callq 0x7328
testl %r13d, %r13d
js 0x60e8
movl 0x78(%rsp), %r10d
movl 0x84(%rsp), %edx
movl 0x88(%rsp), %ecx
movl 0x8c(%rsp), %r8d
movl 0x90(%rsp), %r9d
subq $0x8, %rsp
leaq 0x1490e(%rip), %rsi     # 0x1a9e4
leaq 0x8(%rsp), %rdi
xorl %eax, %eax
pushq %r10
callq 0x7328
addq $0x10, %rsp
movsd 0x20(%r14), %xmm0
movsd 0x12f22(%rip), %xmm1    # 0x19018
ucomisd %xmm0, %xmm1
jbe 0x62b8
movsd 0x12f40(%rip), %xmm1    # 0x19048
jmp 0x62c6
movq (%rsp), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x6163
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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rsp)
xorl %edx, %edx
movb %dl, (%rcx,%rax)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb %dl, (%rcx,%rax)
movq 0x40(%rbx), %r14
movq %r14, %rdi
callq 0x2180
movq (%rsp), %rcx
movslq %eax, %r15
leaq (%rcx,%r15), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x61ee
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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
addq (%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x22e0
addq (%rsp), %r15
movq %r15, (%rsp)
movq 0x10(%rsp), %rax
movb $0x0, (%rax,%r15)
movq (%rsp), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x626a
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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rsp)
xorl %edx, %edx
movb %dl, (%rcx,%rax)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb %dl, (%rcx,%rax)
movq 0x18(%rbx), %rdi
callq 0x2060
movl 0x8(%rsp), %eax
movl %eax, 0xc(%rbx)
movl (%rsp), %eax
movl %eax, 0x8(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
callq 0xb77e
jmp 0x67d3
movsd 0x30(%r14), %xmm0
movsd 0x12d8a(%rip), %xmm1    # 0x19050
movsd %xmm1, 0x38(%rsp)
callq 0x2210
mulsd 0x38(%rsp), %xmm0
movsd 0x12d79(%rip), %xmm1    # 0x19058
maxsd %xmm0, %xmm1
movsd 0x12d75(%rip), %xmm0    # 0x19060
minsd %xmm1, %xmm0
leaq 0x14705(%rip), %rsi     # 0x1a9fb
movq %rsp, %rdi
movb $0x1, %al
callq 0x7328
movsd 0x50(%r14), %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jb 0x63b2
xorl %r12d, %r12d
movl $0xff, %ebp
movsd 0x12cf4(%rip), %xmm1    # 0x19018
movsd 0x50(%r14), %xmm0
mulsd %xmm1, %xmm0
addsd 0x58(%r14,%r12,8), %xmm0
ucomisd %xmm2, %xmm0
movl $0xff, %eax
jne 0x6342
jnp 0x6367
callq 0x2210
xorpd %xmm2, %xmm2
movsd 0x12cc5(%rip), %xmm1    # 0x19018
mulsd 0x12ced(%rip), %xmm0    # 0x19048
addsd 0x12ca5(%rip), %xmm0    # 0x19008
cvttsd2si %xmm0, %eax
cmpl %ebp, %eax
cmovgel %ebp, %eax
movl %eax, 0x50(%rsp,%r12,4)
incq %r12
cmpq $0x2, %r12
jne 0x6324
movl 0x4(%r14), %edx
testl %edx, %edx
js 0x6393
leaq 0x1467b(%rip), %rsi     # 0x1aa04
movq %rsp, %rdi
xorl %eax, %eax
callq 0x7328
movl 0x50(%rsp), %edx
movl 0x54(%rsp), %ecx
movsd 0x68(%r14), %xmm0
leaq 0x14663(%rip), %rsi     # 0x1aa0b
movq %rsp, %rdi
movb $0x1, %al
callq 0x7328
testl %r13d, %r13d
js 0x63ea
cmpl $0x0, 0x80(%rsp)
je 0x63ea
movsd 0x58(%rsp), %xmm0
movsd 0x60(%rsp), %xmm1
movsd 0x68(%rsp), %xmm2
movsd 0x70(%rsp), %xmm3
leaq 0x14641(%rip), %rsi     # 0x1aa21
movq %rsp, %rdi
movb $0x4, %al
callq 0x7328
movq (%rsp), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x6440
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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq %rsp, %rbp
movq (%rbp), %rax
movq 0x10(%rbp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rbp)
xorl %edx, %edx
movb %dl, (%rcx,%rax)
movq (%rbp), %rax
movq 0x10(%rbp), %rcx
movb %dl, (%rcx,%rax)
leaq 0x145d0(%rip), %rsi     # 0x1aa3a
movq %rbp, %rdi
callq 0xcdb9
leaq 0x12d27(%rip), %rsi     # 0x191a0
movq %rbp, %rdi
callq 0xcdb9
movq 0x40(%rbx), %r12
movq %r12, %rdi
callq 0x2180
movq (%rbp), %rcx
movslq %eax, %r13
leaq (%rcx,%r13), %rax
incq %rax
cmpq 0x8(%rbp), %rax
jb 0x64e9
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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
addq (%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22e0
addq (%rsp), %r13
movq %r13, (%rsp)
movq 0x10(%rsp), %rax
movb $0x0, (%rax,%r13)
movq (%rsp), %rax
incq %rax
cmpq 0x8(%rsp), %rax
movl 0x30(%rsp), %ebp
jb 0x6569
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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rsp)
xorl %edx, %edx
movb %dl, (%rcx,%rax)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb %dl, (%rcx,%rax)
movq 0x18(%rbx), %rdi
callq 0x2060
movl 0x8(%rsp), %eax
movl %eax, 0xc(%rbx)
movl (%rsp), %eax
movl %eax, 0x8(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rbx)
movss 0x12bea(%rip), %xmm2    # 0x1919c
movsd 0x12aae(%rip), %xmm1    # 0x19068
movsd 0x40(%rsp), %xmm0
ucomisd %xmm0, %xmm1
movaps %xmm2, %xmm1
ja 0x65e5
callq 0x2210
movss 0x12bc6(%rip), %xmm2    # 0x1919c
mulsd 0x12a6a(%rip), %xmm0    # 0x19048
xorps %xmm1, %xmm1
cvtsd2ss %xmm0, %xmm1
minss %xmm1, %xmm2
movss %xmm2, 0x10(%rbx)
movq %rbx, %rdi
callq 0xb77e
movsd 0x28(%rsp), %xmm0
ucomisd 0x20(%rsp), %xmm0
movl $0x1, %esi
jbe 0x6620
btl $0x8, %ebp
jb 0x6628
movl (%r14), %eax
leal 0x1(%rax), %ecx
cmpl $0x2, %eax
movl $0x2, %esi
cmovgel %ecx, %esi
movq %rbx, %rdi
callq 0xeaa7
btl $0xb, %ebp
jae 0x67d3
movsd 0x28(%rsp), %xmm0
ucomisd 0x20(%rsp), %xmm0
jbe 0x67d3
movslq 0x48(%rbx), %r13
movslq 0xc(%rbx), %rcx
movq %rcx, 0x8(%rsp)
movslq 0x8(%rbx), %rax
leaq -0x1(%rax), %rdx
movq %rdx, (%rsp)
movq 0x18(%rbx), %rdi
movq %rdi, 0x10(%rsp)
addq $0x6, %rax
cmpq %rcx, %rax
jb 0x66b2
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, 0x8(%rsp)
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movw $0x5147, 0x4(%rcx,%rax) # imm = 0x5147
movl $0x3a54473a, (%rcx,%rax) # imm = 0x3A54473A
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x6(%rax), %rdx
movq %rdx, (%rsp)
movb $0x0, 0x6(%rcx,%rax)
movq (%rsp), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x6735
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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rsp)
xorl %edx, %edx
movb %dl, (%rcx,%rax)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb %dl, (%rcx,%rax)
movl 0x8(%rsp), %eax
movl %eax, 0xc(%rbx)
movl (%rsp), %eax
movl %eax, 0x8(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
callq 0xb77e
cmpl $0x0, 0x5c(%rbx)
jle 0x67d3
xorl %r12d, %r12d
movl $0x9, %ebp
shlq $0x4, %r13
movsd 0x10(%r14), %xmm0
movq %r15, %rdi
movl %r12d, %esi
callq 0x12c04
movl %eax, %ecx
andl $0x3, %ecx
xorl %edx, %edx
cmpl $0x1, %ecx
sete %dl
testl %ecx, %ecx
cmovel %ebp, %edx
movq 0x50(%rbx), %rcx
movq 0x8(%rcx,%r13), %rcx
movb %dl, (%rcx,%r12)
shrl $0x2, %eax
movq 0x50(%rbx), %rcx
movq 0x18(%rcx,%r13), %rcx
movb %al, (%rcx,%r12)
incq %r12
movslq 0x5c(%rbx), %rax
cmpq %rax, %r12
jl 0x6787
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq