// File: /workspace/github_c_makefile_star2_O3/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 $0xa8, %rsp
movl %r9d, 0x28(%rsp)
movq %r8, %rbp
movl %ecx, 0x24(%rsp)
movsd %xmm0, 0x48(%rsp)
movq %rdx, %r14
movq %rsi, 0x40(%rsp)
movq %rdi, %rbx
leaq 0x68(%rsp), %rsi
callq 0x2e4c
movl %eax, 0x34(%rsp)
movq $0x2, 0x8(%rsp)
movl $0x2, %edi
callq 0x2360
movq %rax, %r13
movq %rax, 0x10(%rsp)
movq $0x1, (%rsp)
movw $0x0, (%rax)
movq 0x20(%rbx), %r12
movq %r12, %rdi
callq 0x2180
movslq %eax, %r15
cmpq $-0x3, %r15
ja 0x5ad2
leaq 0x2(%r15), %rax
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 %r13, %rdi
callq 0x23d0
movq %rax, %r13
movq %rax, 0x10(%rsp)
incq %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x22e0
addq (%rsp), %r15
movq %r15, (%rsp)
movq 0x10(%rsp), %rax
movb $0x0, (%rax,%r15)
movq (%rsp), %rcx
leaq 0x1(%rcx), %rdx
cmpq 0x8(%rsp), %rdx
jae 0x5b0b
movq 0x10(%rsp), %rax
jmp 0x5b5b
movq %rdx, %rax
shrq %rax
orq %rdx, %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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rsp)
xorl %edx, %edx
movb %dl, (%rax,%rcx)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb %dl, (%rcx,%rax)
movq 0x28(%rbx), %r12
movq %r12, %rdi
callq 0x2180
movq (%rsp), %rdi
movslq %eax, %r15
leaq (%rdi,%r15), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jae 0x5b98
movq 0x10(%rsp), %rax
jmp 0x5be4
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), %rdi
addq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x22e0
addq (%rsp), %r15
movq %r15, (%rsp)
movq 0x10(%rsp), %rax
movb $0x0, (%rax,%r15)
movq (%rsp), %rcx
leaq 0x1(%rcx), %rdx
cmpq 0x8(%rsp), %rdx
jae 0x5c1a
movq 0x10(%rsp), %rax
jmp 0x5c6a
movq %rdx, %rax
shrq %rax
orq %rdx, %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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rsp)
xorl %edx, %edx
movb %dl, (%rax,%rcx)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb %dl, (%rcx,%rax)
movq (%rsp), %rcx
leaq 0x1(%rcx), %rdx
cmpq 0x8(%rsp), %rdx
jae 0x5c95
movq 0x10(%rsp), %rax
jmp 0x5ce5
movq %rdx, %rax
shrq %rax
orq %rdx, %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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rsp)
xorl %edx, %edx
movb %dl, (%rax,%rcx)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb %dl, (%rcx,%rax)
movq 0x38(%rbx), %r12
movq %r12, %rdi
callq 0x2180
movq (%rsp), %rdi
movslq %eax, %r15
leaq (%rdi,%r15), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jae 0x5d22
movq 0x10(%rsp), %rax
jmp 0x5d6e
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), %rdi
addq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x22e0
addq (%rsp), %r15
movq %r15, (%rsp)
movq 0x10(%rsp), %rax
movb $0x0, (%rax,%r15)
movq 0x38(%rbx), %rax
cmpb $0x0, (%rax)
movl 0x34(%rsp), %r12d
je 0x5e17
movq (%rsp), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x8(%rsp), %rcx
jae 0x5db2
movq 0x10(%rsp), %rax
jmp 0x5e02
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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, (%rsp)
movb $0x3b, (%rax,%rdx)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb $0x0, (%rcx,%rax)
movsd (%rbp), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jb 0x5e47
movsd 0x1324a(%rip), %xmm0    # 0x19078
subsd %xmm1, %xmm0
leaq 0x14b91(%rip), %rsi     # 0x1a9ca
movq %rsp, %rdi
movb $0x1, %al
callq 0x7260
xorpd %xmm0, %xmm0
movsd 0x20(%rbp), %xmm3
ucomisd %xmm0, %xmm3
jb 0x5e80
movsd 0x1324e(%rip), %xmm0    # 0x190a8
ucomisd %xmm3, %xmm0
jb 0x5e80
movsd 0x18(%rbp), %xmm0
movsd 0x8(%rbp), %xmm2
movsd 0x10(%rbp), %xmm1
leaq 0x14b5d(%rip), %rsi     # 0x1a9d3
movq %rsp, %rdi
movb $0x4, %al
callq 0x7260
movsd 0x28(%rbp), %xmm2
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm2
jb 0x5ec3
movsd 0x30(%rbp), %xmm3
ucomisd %xmm1, %xmm3
jb 0x5ec3
movsd 0x131d6(%rip), %xmm1    # 0x19078
movapd %xmm1, %xmm0
subsd %xmm2, %xmm0
subsd %xmm3, %xmm1
leaq 0x14b3a(%rip), %rsi     # 0x1a9ef
movq %rsp, %rdi
movb $0x2, %al
callq 0x7260
xorpd %xmm1, %xmm1
movsd 0x38(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x5edf
leaq 0x14b29(%rip), %rsi     # 0x1a9fe
movq %rsp, %rdi
movb $0x1, %al
callq 0x7260
movsd 0x40(%rbp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x5eff
leaq 0x14b13(%rip), %rsi     # 0x1aa08
movq %rsp, %rdi
movb $0x1, %al
callq 0x7260
movl 0x28(%rsp), %edx
testl %edx, %edx
jle 0x5f7b
movq 0xe0(%rsp), %r15
leaq 0x14afd(%rip), %rsi     # 0x1aa13
movq %rsp, %rdi
xorl %eax, %eax
callq 0x7260
testq %r15, %r15
jle 0x5f7b
movl $0xff, %eax
movq %r15, %rdx
andq %rax, %rdx
movl %r15d, %ecx
shrl $0x8, %ecx
movl $0xff, %esi
andl %esi, %ecx
movl %r15d, %r8d
shrl $0x10, %r8d
andl %esi, %r8d
movq %r15, %r9
shrq $0x20, %r9
andq %rax, %r9
movq %r15, %r10
shrq $0x28, %r10
andq %rax, %r10
shrq $0x30, %r15
andq %rax, %r15
leaq 0x14ab2(%rip), %rsi     # 0x1aa1b
movq %rsp, %rdi
xorl %eax, %eax
pushq %r15
pushq %r10
callq 0x7260
addq $0x10, %rsp
testq %r14, %r14
je 0x6023
movsd 0x28(%r14), %xmm1
movsd 0x48(%rsp), %xmm0
ucomisd %xmm1, %xmm0
movsd %xmm1, 0x28(%rsp)
ja 0x5fa2
movsd 0x38(%r14), %xmm1
movsd %xmm1, 0x50(%rsp)
movl 0x8(%r14), %edx
leaq 0x14a7f(%rip), %rsi     # 0x1aa32
movq %rsp, %rdi
xorl %eax, %eax
callq 0x7260
testl %r12d, %r12d
js 0x6005
movl 0x88(%rsp), %r10d
movl 0x94(%rsp), %edx
movl 0x98(%rsp), %ecx
movl 0x9c(%rsp), %r8d
movl 0xa0(%rsp), %r9d
subq $0x8, %rsp
leaq 0x14a47(%rip), %rsi     # 0x1aa3a
leaq 0x8(%rsp), %rdi
xorl %eax, %eax
pushq %r10
callq 0x7260
addq $0x10, %rsp
movsd 0x20(%r14), %xmm0
movsd 0x1306d(%rip), %xmm1    # 0x19080
ucomisd %xmm0, %xmm1
jbe 0x6040
movsd 0x1308f(%rip), %xmm1    # 0x190b0
jmp 0x604e
movq (%rsp), %rcx
leaq 0x1(%rcx), %rdx
cmpq 0x8(%rsp), %rdx
jae 0x6493
movq 0x10(%rsp), %rax
jmp 0x64e3
movsd 0x30(%r14), %xmm0
movsd 0x1306a(%rip), %xmm1    # 0x190b8
movsd %xmm1, 0x38(%rsp)
callq 0x2210
mulsd 0x38(%rsp), %xmm0
movsd 0x13059(%rip), %xmm1    # 0x190c0
maxsd %xmm0, %xmm1
movsd 0x13055(%rip), %xmm0    # 0x190c8
minsd %xmm1, %xmm0
leaq 0x149d3(%rip), %rsi     # 0x1aa51
movq %rsp, %rdi
movb $0x1, %al
callq 0x7260
movsd 0x50(%r14), %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jb 0x613a
xorl %r15d, %r15d
movl $0xff, %ebp
movsd 0x12fd4(%rip), %xmm1    # 0x19080
movsd 0x50(%r14), %xmm0
mulsd %xmm1, %xmm0
addsd 0x58(%r14,%r15,8), %xmm0
ucomisd %xmm2, %xmm0
movl $0xff, %eax
jne 0x60ca
jnp 0x60f4
callq 0x2210
xorpd %xmm2, %xmm2
movsd 0x12fa5(%rip), %xmm1    # 0x19080
mulsd 0x12fcd(%rip), %xmm0    # 0x190b0
addsd 0x12f85(%rip), %xmm0    # 0x19070
cvttsd2si %xmm0, %eax
cmpl %ebp, %eax
cmovgel %ebp, %eax
movl %eax, 0x60(%rsp,%r15,4)
incq %r15
cmpq $0x2, %r15
jne 0x60ac
movl 0x4(%r14), %edx
testl %edx, %edx
js 0x611b
leaq 0x14949(%rip), %rsi     # 0x1aa5a
movq %rsp, %rdi
xorl %eax, %eax
callq 0x7260
movl 0x60(%rsp), %edx
movl 0x64(%rsp), %ecx
movsd 0x68(%r14), %xmm0
leaq 0x14931(%rip), %rsi     # 0x1aa61
movq %rsp, %rdi
movb $0x1, %al
callq 0x7260
testl %r12d, %r12d
js 0x6175
cmpl $0x0, 0x90(%rsp)
je 0x6175
movsd 0x68(%rsp), %xmm0
movsd 0x70(%rsp), %xmm1
movsd 0x78(%rsp), %xmm2
movsd 0x80(%rsp), %xmm3
leaq 0x1490c(%rip), %rsi     # 0x1aa77
movq %rsp, %rdi
movb $0x4, %al
callq 0x7260
movq (%rsp), %rcx
leaq 0x1(%rcx), %rdx
cmpq 0x8(%rsp), %rdx
jae 0x618b
movq 0x10(%rsp), %rax
jmp 0x61db
movq %rdx, %rax
shrq %rax
orq %rdx, %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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rcx
leaq 0x1(%rcx), %rdx
movq %rsp, %r13
movq %rdx, (%r13)
xorl %edx, %edx
movb %dl, (%rax,%rcx)
movq (%r13), %rax
movq 0x10(%r13), %rcx
movb %dl, (%rcx,%rax)
leaq 0x14897(%rip), %rsi     # 0x1aa90
movq %r13, %rdi
callq 0xcf62
leaq 0x12ff0(%rip), %rsi     # 0x191f8
movq %r13, %rdi
callq 0xcf62
movq 0x40(%rbx), %r12
movq %r12, %rdi
callq 0x2180
movq (%r13), %rdi
movslq %eax, %r15
leaq (%rdi,%r15), %rax
incq %rax
cmpq 0x8(%r13), %rax
jae 0x6237
movq 0x10(%rsp), %rax
jmp 0x6283
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), %rdi
movq 0x40(%rsp), %r13
addq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x22e0
addq (%rsp), %r15
movq %r15, (%rsp)
movq 0x10(%rsp), %rax
movb $0x0, (%rax,%r15)
movq (%rsp), %rcx
leaq 0x1(%rcx), %rdx
cmpq 0x8(%rsp), %rdx
jae 0x62be
movq 0x10(%rsp), %rax
jmp 0x630e
movq %rdx, %rax
shrq %rax
orq %rdx, %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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rsp)
xorl %edx, %edx
movb %dl, (%rax,%rcx)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb %dl, (%rcx,%rax)
movq 0x18(%rbx), %rdi
callq 0x2060
pshufd $0xe8, (%rsp), %xmm0    # xmm0 = mem[0,2,2,3]
movq %xmm0, 0x8(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rbx)
movss 0x12eac(%rip), %xmm2    # 0x191f4
movsd 0x12d80(%rip), %xmm1    # 0x190d0
movsd 0x50(%rsp), %xmm0
ucomisd %xmm0, %xmm1
movaps %xmm2, %xmm1
ja 0x637b
callq 0x2210
movss 0x12e88(%rip), %xmm2    # 0x191f4
mulsd 0x12d3c(%rip), %xmm0    # 0x190b0
xorps %xmm1, %xmm1
cvtsd2ss %xmm0, %xmm1
minss %xmm1, %xmm2
movss %xmm2, 0x10(%rbx)
movq %rbx, %rdi
callq 0xb8ba
movsd 0x48(%rsp), %xmm0
ucomisd 0x28(%rsp), %xmm0
jbe 0x6481
btl $0x8, 0x24(%rsp)
jb 0x63bf
movl (%r14), %eax
leal 0x1(%rax), %ecx
cmpl $0x2, %eax
movl $0x2, %esi
cmovgel %ecx, %esi
movq %rbx, %rdi
callq 0xecd5
btl $0xb, 0x24(%rsp)
jae 0x6710
movslq 0x48(%rbx), %r12
movslq 0xc(%rbx), %rsi
movq %rsi, 0x8(%rsp)
movslq 0x8(%rbx), %rdx
leaq -0x1(%rdx), %rcx
movq %rcx, (%rsp)
movq 0x18(%rbx), %rax
movq %rax, 0x10(%rsp)
addq $0x6, %rdx
cmpq %rsi, %rdx
jb 0x6440
movq %rdx, %rcx
shrq %rcx
orq %rdx, %rcx
movq %rcx, %rdx
shrq $0x2, %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x4, %rcx
orq %rdx, %rcx
movq %rcx, %rdx
shrq $0x8, %rdx
orq %rcx, %rdx
movq %rdx, %rsi
shrq $0x10, %rsi
orq %rdx, %rsi
incq %rsi
movq %rsi, 0x8(%rsp)
movq %rax, %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rcx
movw $0x5147, 0x4(%rax,%rcx) # imm = 0x5147
movl $0x3a54473a, (%rax,%rcx) # imm = 0x3A54473A
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x6(%rax), %rdx
movq %rdx, (%rsp)
movb $0x0, 0x6(%rcx,%rax)
movq (%rsp), %rcx
leaq 0x1(%rcx), %rdx
cmpq 0x8(%rsp), %rdx
jae 0x6631
movq 0x10(%rsp), %rax
jmp 0x6681
movq %rbx, %rdi
movl $0x1, %esi
callq 0xecd5
jmp 0x6710
movq %rdx, %rax
shrq %rax
orq %rdx, %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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rsp)
xorl %edx, %edx
movb %dl, (%rax,%rcx)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb %dl, (%rcx,%rax)
movq 0x40(%rbx), %r14
movq %r14, %rdi
callq 0x2180
movq (%rsp), %rdi
movslq %eax, %r15
leaq (%rdi,%r15), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jae 0x6520
movq 0x10(%rsp), %rax
jmp 0x656c
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), %rdi
addq %rax, %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), %rcx
leaq 0x1(%rcx), %rdx
cmpq 0x8(%rsp), %rdx
jae 0x65a2
movq 0x10(%rsp), %rax
jmp 0x65f2
movq %rdx, %rax
shrq %rax
orq %rdx, %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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rsp)
xorl %edx, %edx
movb %dl, (%rax,%rcx)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb %dl, (%rcx,%rax)
movq 0x18(%rbx), %rdi
callq 0x2060
pshufd $0xe8, (%rsp), %xmm0    # xmm0 = mem[0,2,2,3]
movq %xmm0, 0x8(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
callq 0xb8ba
jmp 0x6710
movq %rdx, %rax
shrq %rax
orq %rdx, %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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x23d0
movq %rax, 0x10(%rsp)
movq (%rsp), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rsp)
xorl %edx, %edx
movb %dl, (%rax,%rcx)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb %dl, (%rcx,%rax)
pshufd $0xe8, (%rsp), %xmm0    # xmm0 = mem[0,2,2,3]
movq %xmm0, 0x8(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
callq 0xb8ba
cmpl $0x0, 0x5c(%rbx)
jle 0x6710
xorl %r15d, %r15d
movl $0x9, %ebp
shlq $0x4, %r12
movq 0x10(%r14), %xmm0
movq %r13, %rdi
movl %r15d, %esi
callq 0x1308a
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,%r12), %rcx
movb %dl, (%rcx,%r15)
shrl $0x2, %eax
movq 0x50(%rbx), %rcx
movq 0x18(%rcx,%r12), %rcx
movb %al, (%rcx,%r15)
incq %r15
movslq 0x5c(%rbx), %rax
cmpq %rax, %r15
jl 0x66c4
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq