// File: /workspace/github_cpp_makefile_star2_O1/gcollet[P]MstatX/src/trident.cpp
// Function: TridStat::calculate(Msa&)
void
TridStat :: calculate(Msa & msa)
{
	/* Declare the vectors */
	vector<float> w;					/**< Weight of each sequence in the msa (size = nb sequences) */
	vector<float> t;					/**< t(x) = Shannon entropy score  + Weighted sequence Score */
	vector<float> r;					/**< r(x) = Stereochemical score */
	vector<float> g;					/**< g(x) = Gap Score */

	/* Init size */
	int L = msa.getNcol();
	int N = msa.getNseq();
	string alphabet = msa.getAlphabet();
	int K = (int) alphabet.size();

  //cerr << "Seq Weights\n";
	/* Calculate Sequence Weights */
	for (int seq(0); seq < N; ++seq){
		w.push_back(calcSeqWeight(msa,seq));
	}

	/* Calculate t(x) = \frac{\sum_{a=1}^{K}p_a log(p_a)}{log(min(N,K))}
	 *						p_a = \sum_{i \in \{i|s(i) = a\}} w_i
	 *						w_i = \frac{1}{L} \sum_{x=1}^{L}\frac{1}{K_x n_{x_i}}
	 * Like in wentropy
	 */
	float lambda = 1.0 / log(MIN(K,N));

  for (int x(0); x < L; x++){
		t.push_back(0.0);
		for (int a(0); a < K; a++){
			float tmp_proba(0.0);
		  for (int j(0); j < N; j++){
				if(msa.getSymbol(j, x) == alphabet[a]){
					tmp_proba += w[j];
				}
			}
			if (tmp_proba != 0.0){
				t[x] -= tmp_proba * log(tmp_proba);
			}
		}
		t[x] *= lambda;
    //cerr << "t[" << x << "] = " << t[x] << "\n";
	}

	/* Calculate g(x) = nb_gap / nb_seq
	 * Represents the proportion of gaps in the column
	 */
	for (int x(0); x < L; x++){
		g.push_back((float) msa.getGap(x) / (float) N);
		//cerr << "g[" << x << "] = " << g[x] << "\n";
	}


	/* Calculate r(x) = \lambda_r \frac{1}{k_x}\sum_{a=1}^{k_x}|\bar{X}(x) - X_a|
	 *      \lambda_r = \frac{1}{\sqrt{20(max(M)-min(M))^2}}
	 *					  X_a = \left[ \begin{array}{c}M(a,a_1)\\M(a,a_2)\\.\\.\\.\\M(a,a_{20})\end{array}\right]
	 *							M is a normalized scoring matrix
	 */
	ScoringMatrix score_mat(Options::Get().matrix_fname);
	int alph_size = score_mat.getAlphabetSize();
	string sm_alphabet = score_mat.getAlphabet();

	//msa.fitToAlphabet(sm_alphabet);

	for (int x(0); x < L; x++){

		int ntype = msa.getNtype(x);
		string type_list = msa.getTypeList(x);
		if (type_list.empty()) {
			std::cerr << "Error: No amino acid type found in column " << x << "\n";
			exit(1);
		}
		if (type_list.find("-") < (int) type_list.size()){
			type_list.erase(type_list.find("-"), 1);
			ntype--;
		}
		if (ntype){
			/* Calculate Mean vector */
			vector<float> mean(alph_size, 0.0);
			for (int i(0); i < ntype; ++i){
				for (int a(0); a < alph_size; ++a){
					mean[a] += score_mat.normScore(sm_alphabet[a], type_list[i]);
				}
			}
			for (int a(0); a < alph_size; ++a){
				mean[a] /= ntype;
			}

			/* Calculate Score */
			float lambda = sqrt(alph_size * (score_mat.getMax() - score_mat.getMin()) * (score_mat.getMax() - score_mat.getMin()));
			float tmp_score = 0.0;
			for (int i(0); i < ntype; ++i){
				vector<float> diff_vect;
				for(int a(0); a < alph_size; ++a){
					diff_vect.push_back(mean[a] - score_mat.normScore(sm_alphabet[a], type_list[i]));
				}
				tmp_score += normVect(diff_vect);
			}
			tmp_score /= ntype;
			tmp_score /= lambda;
			r.push_back(tmp_score);
		} else {
			r.push_back(0.0);
		}
    //cerr << "r[" << x << "] = " << r[x] << "\n";
	}


	/*
	 * Combine the three scores
	 */
	for (int x(0); x < L; x++){
		col_stat.push_back(pow((1-t[x]),Options::Get().factor_a)*pow((1-r[x]),Options::Get().factor_b)*pow((1-g[x]),Options::Get().factor_c));
	}

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movq %rsi, %rcx
movq %rdi, %rbp
xorps %xmm0, %xmm0
movaps %xmm0, 0xe0(%rsp)
xorl %eax, %eax
movq %rax, 0xf0(%rsp)
movq %rax, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movq %rax, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq %rax, 0xd0(%rsp)
movaps %xmm0, 0xc0(%rsp)
movl 0xc8(%rsi), %r14d
movl 0xcc(%rsi), %eax
movq %rax, 0x10(%rsp)
leaq 0x140(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%rsi), %rsi
movq %rcx, 0x40(%rsp)
movq 0x8(%rcx), %rdx
addq %rsi, %rdx
leaq 0x130(%rsp), %rdi
callq 0x5ccc
movq 0x138(%rsp), %r13
testl %r14d, %r14d
jle 0xe4ba
xorl %ebx, %ebx
leaq 0xe0(%rsp), %r15
leaq 0x1a0(%rsp), %r12
movq 0x40(%rsp), %rsi
movl %ebx, %edx
callq 0xe2d8
movss %xmm0, 0x1a0(%rsp)
movq 0xe8(%rsp), %rsi
cmpq 0xf0(%rsp), %rsi
je 0xe4a8
movss %xmm0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0xe8(%rsp)
jmp 0xe4b3
movq %r15, %rdi
movq %r12, %rdx
callq 0x51ca
incl %ebx
cmpl %ebx, %r14d
jne 0xe46f
movq %rbp, 0x158(%rsp)
cmpl %r13d, %r14d
movl %r13d, %eax
cmovll %r14d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
callq 0x41d0
cmpl $0x0, 0x10(%rsp)
jle 0xe5ed
movsd 0x1b85(%rip), %xmm1     # 0x10070
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
movss %xmm0, 0x8(%rsp)
movl %r13d, %r12d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
leaq (,%r14,4), %rbp
xorl %ebx, %ebx
movl $0x0, 0x1a0(%rsp)
movq 0x58(%rsp), %rsi
cmpq 0x60(%rsp), %rsi
je 0xe538
movl $0x0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x58(%rsp)
jmp 0xe54a
leaq 0x50(%rsp), %rdi
leaq 0x1a0(%rsp), %rdx
callq 0x51ca
testl %r13d, %r13d
jle 0xe5ca
xorl %r15d, %r15d
testl %r14d, %r14d
jle 0xe592
movq 0x40(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x130(%rsp), %rcx
movb (%rcx,%r15), %cl
xorps %xmm0, %xmm0
movq 0xe0(%rsp), %rdx
xorl %esi, %esi
movq (%rax,%rsi,8), %rdi
cmpb %cl, (%rdi,%rbx)
jne 0xe587
addss (%rdx,%rsi), %xmm0
addq $0x4, %rsi
cmpq %rsi, %rbp
jne 0xe579
jmp 0xe595
xorps %xmm0, %xmm0
ucomiss 0x22f0(%rip), %xmm0     # 0x1088c
jne 0xe5a0
jnp 0xe5c2
movss %xmm0, (%rsp)
callq 0x44b0
movq 0x50(%rsp), %rax
movss (%rax,%rbx,4), %xmm1
mulss (%rsp), %xmm0
subss %xmm0, %xmm1
movss %xmm1, (%rax,%rbx,4)
incq %r15
cmpq %r12, %r15
jne 0xe552
movq 0x50(%rsp), %rax
movss (%rax,%rbx,4), %xmm0
mulss 0x8(%rsp), %xmm0
movss %xmm0, (%rax,%rbx,4)
incq %rbx
cmpq 0x10(%rsp), %rbx
jne 0xe510
cmpl $0x0, 0x10(%rsp)
jle 0xe66b
xorps %xmm0, %xmm0
cvtsi2ss %r14d, %xmm0
movss %xmm0, (%rsp)
xorl %ebx, %ebx
leaq 0xc0(%rsp), %r15
leaq 0x1a0(%rsp), %r12
movq 0x40(%rsp), %rdi
movl %ebx, %esi
callq 0xbeb4
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss (%rsp), %xmm0
movss %xmm0, 0x1a0(%rsp)
movq 0xc8(%rsp), %rsi
cmpq 0xd0(%rsp), %rsi
je 0xe658
movss %xmm0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0xc8(%rsp)
jmp 0xe663
movq %r15, %rdi
movq %r12, %rdx
callq 0x51ca
incl %ebx
cmpl %ebx, 0x10(%rsp)
jne 0xe613
callq 0x4f1c
leaq 0x178(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x88(%rax), %rsi
movq 0x90(%rax), %rdx
addq %rsi, %rdx
leaq 0x168(%rsp), %rdi
callq 0x5ccc
leaq 0x1a0(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0xd344
movq 0x168(%rsp), %rdi
cmpq %r14, %rdi
je 0xe6cc
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x4250
movq 0x1a8(%rsp), %rsi
movq 0x1b0(%rsp), %rcx
leaq 0x120(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rcx, 0x8(%rsp)
leaq (%rsi,%rcx), %rdx
leaq 0x110(%rsp), %rdi
callq 0x5ccc
cmpl $0x0, 0x10(%rsp)
jle 0xeb54
movq 0x8(%rsp), %r13
movslq %r13d, %rax
movq %rax, 0x160(%rsp)
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x94(%rsp)
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %r14d, %r14d
leaq 0x70(%rsp), %rdi
leaq 0xa0(%rsp), %r12
leaq 0x1a0(%rsp), %rbp
leaq 0x9c(%rsp), %rbx
movq 0x40(%rsp), %rcx
movq 0xb0(%rcx), %rax
movl (%rax,%r14,4), %eax
movl %eax, (%rsp)
movq 0x50(%rcx), %rax
movq %r14, %rcx
shlq $0x5, %rcx
leaq 0x80(%rsp), %rdx
movq %rdx, 0x70(%rsp)
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
addq %rsi, %rdx
callq 0x5ccc
cmpq $0x0, 0x78(%rsp)
leaq 0x1f92(%rip), %rsi      # 0x1072b
je 0xed33
movl $0x1, %ecx
leaq 0x70(%rsp), %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0x4430
movslq 0x78(%rsp), %rcx
cmpq %rcx, %rax
jae 0xe7ec
movl $0x1, %ecx
movq %r15, %rdi
leaq 0x1f5f(%rip), %rsi      # 0x1072b
xorl %edx, %edx
callq 0x4430
movl $0x1, %edx
movq %r15, %rdi
movq %rax, %rsi
callq 0x4060
movl (%rsp), %r15d
decl %r15d
jmp 0xe7f0
movl (%rsp), %r15d
testl %r15d, %r15d
je 0xe8f5
movl %r15d, (%rsp)
movq %r14, 0x150(%rsp)
movl $0x0, 0xa0(%rsp)
leaq 0xf8(%rsp), %rdi
movq 0x160(%rsp), %rsi
movq %r12, %rdx
leaq 0x4(%rsp), %rcx
callq 0xc666
movl (%rsp), %ecx
movl %ecx, %eax
movq %rax, 0x48(%rsp)
testl %ecx, %ecx
jle 0xe88d
xorl %r14d, %r14d
cmpl $0x0, 0x8(%rsp)
jle 0xe883
xorl %r15d, %r15d
movq 0x110(%rsp), %rax
movsbl (%rax,%r15), %esi
movq 0x70(%rsp), %rax
movsbl (%rax,%r14), %edx
movq %rbp, %rdi
callq 0xdbde
movq 0xf8(%rsp), %rax
addss (%rax,%r15,4), %xmm0
movss %xmm0, (%rax,%r15,4)
incq %r15
cmpq %r15, %r13
jne 0xe848
incq %r14
cmpq 0x48(%rsp), %r14
jne 0xe83e
movl (%rsp), %edx
cvtsi2ss %edx, %xmm1
cmpl $0x0, 0x8(%rsp)
jle 0xe8bb
movq 0xf8(%rsp), %rax
xorl %ecx, %ecx
movss (%rax,%rcx,4), %xmm0
divss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
incq %rcx
cmpq %rcx, %r13
jne 0xe8a5
movss %xmm1, 0x98(%rsp)
movss 0x1e0(%rsp), %xmm1
subss 0x1e4(%rsp), %xmm1
movaps %xmm1, %xmm0
mulss 0x94(%rsp), %xmm0
mulss %xmm1, %xmm0
ucomiss 0x1f9f(%rip), %xmm0     # 0x1088c
jb 0xe924
sqrtss %xmm0, %xmm0
jmp 0xe92c
movl $0x0, 0xf8(%rsp)
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0xeb0d
movl $0x0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x28(%rsp)
jmp 0xeb1f
callq 0x4470
movl (%rsp), %edx
movss %xmm0, 0x1c(%rsp)
movl $0x0, 0x4(%rsp)
testl %edx, %edx
jle 0xea99
xorl %r15d, %r15d
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movq $0x0, 0xb0(%rsp)
cmpl $0x0, 0x8(%rsp)
jle 0xe9e1
xorl %r14d, %r14d
movq 0xf8(%rsp), %rax
movss (%rax,%r14,4), %xmm0
movss %xmm0, (%rsp)
movq 0x110(%rsp), %rax
movsbl (%rax,%r14), %esi
movq 0x70(%rsp), %rax
movsbl (%rax,%r15), %edx
movq %rbp, %rdi
callq 0xdbde
movss (%rsp), %xmm1
subss %xmm0, %xmm1
movss %xmm1, 0x9c(%rsp)
movq 0xa8(%rsp), %rsi
cmpq 0xb0(%rsp), %rsi
je 0xe9ce
movss %xmm1, (%rsi)
addq $0x4, %rsi
movq %rsi, 0xa8(%rsp)
jmp 0xe9d9
movq %r12, %rdi
movq %rbx, %rdx
callq 0x51ca
incq %r14
cmpq %r14, %r13
jne 0xe966
leaq 0x188(%rsp), %rdi
movq %r12, %rsi
callq 0xeefe
movq 0x188(%rsp), %rax
movq 0x190(%rsp), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
testl %ecx, %ecx
jle 0xea2e
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
xorps %xmm0, %xmm0
xorl %edx, %edx
movss (%rax,%rdx,4), %xmm1
mulss %xmm1, %xmm1
addss %xmm1, %xmm0
incq %rdx
cmpq %rdx, %rcx
jne 0xea17
jmp 0xea31
xorps %xmm0, %xmm0
ucomiss 0x1e54(%rip), %xmm0     # 0x1088c
jb 0xea40
sqrtss %xmm0, %xmm0
jmp 0xea45
callq 0x4470
addss 0x4(%rsp), %xmm0
movss %xmm0, 0x4(%rsp)
movq 0x188(%rsp), %rdi
testq %rdi, %rdi
je 0xea6e
movq 0x198(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0xea8b
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
incq %r15
cmpq 0x48(%rsp), %r15
jne 0xe945
movss 0x4(%rsp), %xmm0
divss 0x98(%rsp), %xmm0
divss 0x1c(%rsp), %xmm0
movss %xmm0, 0x4(%rsp)
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0xead7
movss %xmm0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x28(%rsp)
movq 0x150(%rsp), %r14
jmp 0xeaee
leaq 0x20(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0xefb0
movq 0x150(%rsp), %r14
movq 0xf8(%rsp), %rdi
testq %rdi, %rdi
je 0xeb1f
movq 0x108(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
jmp 0xeb1f
leaq 0x20(%rsp), %rdi
leaq 0xf8(%rsp), %rdx
callq 0x51ca
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0xeb41
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4250
incq %r14
cmpq 0x10(%rsp), %r14
leaq 0x70(%rsp), %rdi
jne 0xe750
cmpl $0x0, 0x10(%rsp)
movq 0x158(%rsp), %r12
jle 0xec62
leaq 0x8(%r12), %rbx
xorl %r15d, %r15d
leaq 0x70(%rsp), %r14
movq 0x50(%rsp), %rax
movss (%rax,%r15,4), %xmm0
movss %xmm0, (%rsp)
callq 0x4f1c
movss 0x14c3(%rip), %xmm0     # 0x10054
subss (%rsp), %xmm0
movss 0xf4(%rax), %xmm1
callq 0x43a0
movss %xmm0, (%rsp)
movq 0x20(%rsp), %rax
movss (%rax,%r15,4), %xmm0
movss %xmm0, 0x8(%rsp)
callq 0x4f1c
movss 0x148e(%rip), %xmm0     # 0x10054
subss 0x8(%rsp), %xmm0
movss 0xf8(%rax), %xmm1
callq 0x43a0
movss %xmm0, 0x8(%rsp)
movq 0xc0(%rsp), %rax
movss (%rax,%r15,4), %xmm0
movss %xmm0, 0x48(%rsp)
callq 0x4f1c
movss 0x1454(%rip), %xmm0     # 0x10054
subss 0x48(%rsp), %xmm0
movss (%rsp), %xmm1
mulss 0x8(%rsp), %xmm1
movss %xmm1, (%rsp)
movss 0xfc(%rax), %xmm1
callq 0x43a0
mulss (%rsp), %xmm0
movss %xmm0, 0x70(%rsp)
movq 0x10(%r12), %rsi
cmpq 0x18(%r12), %rsi
je 0xec49
movss %xmm0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x10(%r12)
jmp 0xec54
movq %rbx, %rdi
movq %r14, %rdx
callq 0x51ca
incq %r15
cmpq %r15, 0x10(%rsp)
jne 0xeb74
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0xec87
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x4250
leaq 0x1a0(%rsp), %rdi
callq 0xdadc
movq 0x130(%rsp), %rdi
leaq 0x140(%rsp), %rax
cmpq %rax, %rdi
je 0xecb9
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x4250
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0xecd6
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xeced
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0xed04
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0xed21
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rbx
movq 0x72ab(%rip), %rdi      # 0x15fe8
leaq 0x1b5c(%rip), %rsi      # 0x108a0
movl $0x2a, %edx
callq 0x42a0
movq 0x7293(%rip), %rdi      # 0x15fe8
movl %ebx, %esi
callq 0x4420
leaq 0x1789(%rip), %rsi      # 0x104ec
movq %rax, %rdi
callq 0x4230
movl $0x1, %edi
callq 0x42e0
movq %rax, %rbx
jmp 0xee5b
movq %rax, %rbx
movq 0x168(%rsp), %rdi
cmpq %r14, %rdi
je 0xee68
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x4250
jmp 0xee68
movq %rax, %rbx
jmp 0xee8d
jmp 0xedc3
jmp 0xedbc
jmp 0xedd2
jmp 0xedc3
jmp 0xedc3
jmp 0xedbc
jmp 0xedbc
movq %rax, %rbx
jmp 0xee14
jmp 0xedcb
movq %rax, %rbx
jmp 0xee68
movq %rax, %rbx
jmp 0xee36
jmp 0xedd7
movq %rax, %rbx
jmp 0xedf7
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0xedf7
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
movq 0xf8(%rsp), %rdi
testq %rdi, %rdi
je 0xee14
movq 0x108(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0xee36
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x4250
leaq 0x120(%rsp), %rax
movq 0x110(%rsp), %rdi
cmpq %rax, %rdi
je 0xee5b
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x4250
leaq 0x1a0(%rsp), %rdi
callq 0xdadc
leaq 0x140(%rsp), %rax
movq 0x130(%rsp), %rdi
cmpq %rax, %rdi
je 0xee8d
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x4250
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0xeeaa
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xeec1
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0xeed8
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0xeef5
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4250
movq %rbx, %rdi
callq 0x4440
nop