// File: 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
movq %rsp, %rbp
subq $0x340, %rsp            # imm = 0x340
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x218(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x7210
leaq -0x40(%rbp), %rdi
callq 0x7210
leaq -0x58(%rbp), %rdi
callq 0x7210
leaq -0x70(%rbp), %rdi
callq 0x7210
movq -0x10(%rbp), %rdi
callq 0x4ae0
movl %eax, -0x210(%rbp)
jmp 0x18f63
movl -0x210(%rbp), %eax
movl %eax, -0x74(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4b00
movl %eax, -0x21c(%rbp)
jmp 0x18f7d
movl -0x21c(%rbp), %eax
movl %eax, -0x88(%rbp)
movq -0x10(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
callq 0x71e0
jmp 0x18f9b
leaq -0xa8(%rbp), %rdi
callq 0x4260
movl %eax, -0xac(%rbp)
movl $0x0, -0xb0(%rbp)
movl -0xb0(%rbp), %eax
cmpl -0x88(%rbp), %eax
jge 0x19042
movq -0x218(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0xb0(%rbp), %edx
callq 0x18d70
movss %xmm0, -0x220(%rbp)
jmp 0x18fe5
movss -0x220(%rbp), %xmm0
movss %xmm0, -0xb4(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0xb4(%rbp), %rsi
callq 0x4b20
jmp 0x19007
jmp 0x19009
movl -0xb0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb0(%rbp)
jmp 0x18fb7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x19c69
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x19c5d
movl -0xac(%rbp), %eax
cmpl -0x88(%rbp), %eax
jge 0x1905e
movl -0xac(%rbp), %eax
movl %eax, -0x224(%rbp)
jmp 0x1906a
movl -0x88(%rbp), %eax
movl %eax, -0x224(%rbp)
movl -0x224(%rbp), %edi
callq 0x19cc0
movsd %xmm0, -0x230(%rbp)
jmp 0x1907f
movsd -0x230(%rbp), %xmm1
movsd 0x1fd1(%rip), %xmm0     # 0x1b060
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0xb8(%rbp)
movl $0x0, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
cmpl -0x74(%rbp), %eax
jge 0x1927d
movl $0x0, -0xc0(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x4b20
jmp 0x190d4
movl $0x0, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
cmpl -0xac(%rbp), %eax
jge 0x19239
xorps %xmm0, %xmm0
movss %xmm0, -0xc8(%rbp)
movl $0x0, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
cmpl -0x88(%rbp), %eax
jge 0x191ad
movq -0x10(%rbp), %rdi
movl -0xcc(%rbp), %esi
movl -0xbc(%rbp), %edx
callq 0x71a0
movb %al, -0x231(%rbp)
jmp 0x19134
movb -0x231(%rbp), %al
movsbl %al, %eax
movl %eax, -0x244(%rbp)
movslq -0xc4(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
callq 0x46c0
movq %rax, -0x240(%rbp)
jmp 0x1915f
movl -0x244(%rbp), %eax
movq -0x240(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x19197
movslq -0xcc(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x5180
movss (%rax), %xmm0
addss -0xc8(%rbp), %xmm0
movss %xmm0, -0xc8(%rbp)
jmp 0x19199
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
jmp 0x19105
movss -0xc8(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x191c6
jp 0x191c6
jmp 0x19223
movss -0xc8(%rbp), %xmm0
movss %xmm0, -0x24c(%rbp)
callq 0x13900
movss %xmm0, -0x248(%rbp)
jmp 0x191e5
movslq -0xbc(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x5180
movss -0x24c(%rbp), %xmm0
movss -0x248(%rbp), %xmm2
movss (%rax), %xmm1
movd %xmm0, %ecx
xorl $0x80000000, %ecx       # imm = 0x80000000
movd %ecx, %xmm0
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax)
jmp 0x19225
movl -0xc4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc4(%rbp)
jmp 0x190de
movss -0xb8(%rbp), %xmm0
movss %xmm0, -0x250(%rbp)
movslq -0xbc(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x5180
movss -0x250(%rbp), %xmm0
mulss (%rax), %xmm0
movss %xmm0, (%rax)
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x190a9
movl $0x0, -0xd0(%rbp)
movl -0xd0(%rbp), %eax
cmpl -0x74(%rbp), %eax
jge 0x192ec
movq -0x10(%rbp), %rdi
movl -0xd0(%rbp), %esi
callq 0x12c20
movl %eax, -0x254(%rbp)
jmp 0x192a9
movl -0x254(%rbp), %eax
cvtsi2ss %eax, %xmm0
cvtsi2ssl -0x88(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0xd4(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0xd4(%rbp), %rsi
callq 0x4b20
jmp 0x192d9
jmp 0x192db
movl -0xd0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd0(%rbp)
jmp 0x19287
callq 0x5150
movq %rax, -0x260(%rbp)
jmp 0x192fa
movq -0x260(%rbp), %rsi
addq $0x88, %rsi
leaq -0x140(%rbp), %rdi
callq 0x4140
jmp 0x19316
leaq -0x120(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x169d0
jmp 0x1932b
leaq -0x140(%rbp), %rdi
callq 0x41e0
leaq -0x120(%rbp), %rdi
callq 0x19ce0
movl %eax, -0x264(%rbp)
jmp 0x1934b
movl -0x264(%rbp), %eax
movl %eax, -0x144(%rbp)
leaq -0x168(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x15440
jmp 0x1936c
movl $0x0, -0x16c(%rbp)
movl -0x16c(%rbp), %eax
cmpl -0x74(%rbp), %eax
jge 0x19a52
movq -0x10(%rbp), %rdi
movl -0x16c(%rbp), %esi
callq 0x7170
movl %eax, -0x268(%rbp)
jmp 0x1939c
movl -0x268(%rbp), %eax
movl %eax, -0x170(%rbp)
movq -0x10(%rbp), %rsi
movl -0x16c(%rbp), %edx
leaq -0x190(%rbp), %rdi
callq 0x9040
jmp 0x193c0
leaq -0x190(%rbp), %rdi
callq 0x4570
testb $0x1, %al
jne 0x193d5
jmp 0x19487
movq 0xcc0c(%rip), %rdi      # 0x25fe8
leaq 0x24b3(%rip), %rsi      # 0x1b896
callq 0x4330
movq %rax, -0x270(%rbp)
jmp 0x193f1
movq -0x270(%rbp), %rdi
movl -0x16c(%rbp), %esi
callq 0x45c0
movq %rax, -0x278(%rbp)
jmp 0x1940c
movq -0x278(%rbp), %rdi
leaq 0x20dc(%rip), %rsi      # 0x1b4f6
callq 0x4330
jmp 0x19421
movl $0x1, %edi
callq 0x4400
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x41e0
jmp 0x19c5d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x19c51
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x19c45
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x19a41
leaq -0x190(%rbp), %rdi
leaq 0x2296(%rip), %rsi      # 0x1b72b
xorl %eax, %eax
movl %eax, %edx
callq 0x46b0
movq %rax, -0x280(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x4260
movq %rax, %rcx
movq -0x280(%rbp), %rax
movslq %ecx, %rcx
cmpq %rcx, %rax
jae 0x19506
leaq 0x2261(%rip), %rsi      # 0x1b72b
xorl %eax, %eax
movl %eax, %edx
leaq -0x190(%rbp), %rdi
movq %rdi, -0x288(%rbp)
callq 0x46b0
movq -0x288(%rbp), %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x40a0
jmp 0x194f7
movl -0x170(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x170(%rbp)
cmpl $0x0, -0x170(%rbp)
je 0x19a03
movslq -0x144(%rbp), %rax
movq %rax, -0x298(%rbp)
movl $0x0, -0x1ac(%rbp)
leaq -0x1ad(%rbp), %rdi
movq %rdi, -0x290(%rbp)
callq 0x7510
movq -0x298(%rbp), %rsi
movq -0x290(%rbp), %rcx
leaq -0x1a8(%rbp), %rdi
leaq -0x1ac(%rbp), %rdx
callq 0x13880
jmp 0x19561
leaq -0x1ad(%rbp), %rdi
callq 0x5120
movl $0x0, -0x1b4(%rbp)
movl -0x1b4(%rbp), %eax
cmpl -0x170(%rbp), %eax
jge 0x19696
movl $0x0, -0x1b8(%rbp)
movl -0x1b8(%rbp), %eax
cmpl -0x144(%rbp), %eax
jge 0x19680
movslq -0x1b8(%rbp), %rsi
leaq -0x168(%rbp), %rdi
callq 0x46c0
movq %rax, -0x2a0(%rbp)
jmp 0x195c1
movq -0x2a0(%rbp), %rax
movb (%rax), %al
movb %al, -0x2a9(%rbp)
movslq -0x1b4(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x46c0
movq %rax, -0x2a8(%rbp)
jmp 0x195ec
movb -0x2a9(%rbp), %al
movq -0x2a8(%rbp), %rcx
movsbl (%rcx), %edx
movsbl %al, %esi
leaq -0x120(%rbp), %rdi
callq 0x17650
movss %xmm0, -0x2b0(%rbp)
jmp 0x19615
movslq -0x1b8(%rbp), %rsi
leaq -0x1a8(%rbp), %rdi
callq 0x5180
movss -0x2b0(%rbp), %xmm0
addss (%rax), %xmm0
movss %xmm0, (%rax)
movl -0x1b8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1b8(%rbp)
jmp 0x19593
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x1ad(%rbp), %rdi
callq 0x5120
jmp 0x19a41
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x199f5
jmp 0x19682
movl -0x1b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1b4(%rbp)
jmp 0x19577
movl $0x0, -0x1bc(%rbp)
movl -0x1bc(%rbp), %eax
cmpl -0x144(%rbp), %eax
jge 0x196f6
cvtsi2ssl -0x170(%rbp), %xmm0
movss %xmm0, -0x2b4(%rbp)
movslq -0x1bc(%rbp), %rsi
leaq -0x1a8(%rbp), %rdi
callq 0x5180
movss -0x2b4(%rbp), %xmm1
movss (%rax), %xmm0
divss %xmm1, %xmm0
movss %xmm0, (%rax)
movl -0x1bc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1bc(%rbp)
jmp 0x196a0
cvtsi2ssl -0x144(%rbp), %xmm0
movss %xmm0, -0x2bc(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x19d00
movss %xmm0, -0x2b8(%rbp)
jmp 0x1971c
leaq -0x120(%rbp), %rdi
callq 0x19d20
movss %xmm0, -0x2c0(%rbp)
jmp 0x19732
movss -0x2bc(%rbp), %xmm0
movss -0x2c0(%rbp), %xmm2
movss -0x2b8(%rbp), %xmm1
subss %xmm2, %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x2c8(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x19d00
movss %xmm0, -0x2c4(%rbp)
jmp 0x19770
leaq -0x120(%rbp), %rdi
callq 0x19d20
movss %xmm0, -0x2cc(%rbp)
jmp 0x19786
movss -0x2c8(%rbp), %xmm0
movss -0x2cc(%rbp), %xmm2
movss -0x2c4(%rbp), %xmm1
subss %xmm2, %xmm1
mulss %xmm1, %xmm0
callq 0x19ca0
movss %xmm0, -0x2d0(%rbp)
jmp 0x197b5
movss -0x2d0(%rbp), %xmm0
movss %xmm0, -0x1c0(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x1c4(%rbp)
movl $0x0, -0x1c8(%rbp)
movl -0x1c8(%rbp), %eax
cmpl -0x170(%rbp), %eax
jge 0x1999d
leaq -0x1e0(%rbp), %rdi
callq 0x7210
movl $0x0, -0x1e4(%rbp)
movl -0x1e4(%rbp), %eax
cmpl -0x144(%rbp), %eax
jge 0x198fe
movslq -0x1e4(%rbp), %rsi
leaq -0x1a8(%rbp), %rdi
callq 0x5180
movss (%rax), %xmm0
movss %xmm0, -0x2dc(%rbp)
movslq -0x1e4(%rbp), %rsi
leaq -0x168(%rbp), %rdi
callq 0x46c0
movq %rax, -0x2d8(%rbp)
jmp 0x1984f
movq -0x2d8(%rbp), %rax
movb (%rax), %al
movb %al, -0x2e9(%rbp)
movslq -0x1c8(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x46c0
movq %rax, -0x2e8(%rbp)
jmp 0x1987a
movb -0x2e9(%rbp), %al
movq -0x2e8(%rbp), %rcx
movsbl (%rcx), %edx
movsbl %al, %esi
leaq -0x120(%rbp), %rdi
callq 0x17650
movss %xmm0, -0x2f0(%rbp)
jmp 0x198a3
movss -0x2f0(%rbp), %xmm1
movss -0x2dc(%rbp), %xmm0
subss %xmm1, %xmm0
movss %xmm0, -0x1e8(%rbp)
leaq -0x1e0(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x4b20
jmp 0x198d4
jmp 0x198d6
movl -0x1e4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1e4(%rbp)
jmp 0x19802
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x1998f
leaq -0x200(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x19d40
jmp 0x19913
movq -0x218(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0x18e70
movss %xmm0, -0x2f4(%rbp)
jmp 0x19930
movss -0x2f4(%rbp), %xmm0
addss -0x1c4(%rbp), %xmm0
movss %xmm0, -0x1c4(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x4ea0
leaq -0x1e0(%rbp), %rdi
callq 0x4ea0
movl -0x1c8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c8(%rbp)
jmp 0x197da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x4ea0
leaq -0x1e0(%rbp), %rdi
callq 0x4ea0
jmp 0x199f5
cvtsi2ssl -0x170(%rbp), %xmm1
movss -0x1c4(%rbp), %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x1c4(%rbp)
movss -0x1c0(%rbp), %xmm1
movss -0x1c4(%rbp), %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x1c4(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x1c4(%rbp), %rsi
callq 0x19e30
jmp 0x199e7
leaq -0x1a8(%rbp), %rdi
callq 0x4ea0
jmp 0x19a21
leaq -0x1a8(%rbp), %rdi
callq 0x4ea0
jmp 0x19a41
movl $0x0, -0x204(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x204(%rbp), %rsi
callq 0x4b20
jmp 0x19a1f
jmp 0x19a21
leaq -0x190(%rbp), %rdi
callq 0x41e0
movl -0x16c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x16c(%rbp)
jmp 0x19376
leaq -0x190(%rbp), %rdi
callq 0x41e0
jmp 0x19c45
movl $0x0, -0x208(%rbp)
movl -0x208(%rbp), %eax
cmpl -0x74(%rbp), %eax
jge 0x19bf4
movq -0x218(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x310(%rbp)
movslq -0x208(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x5180
movss (%rax), %xmm1
movss 0x15bb(%rip), %xmm0     # 0x1b054
subss %xmm1, %xmm0
movss %xmm0, -0x304(%rbp)
callq 0x5150
movq %rax, -0x300(%rbp)
jmp 0x19ab3
movss -0x304(%rbp), %xmm0
movq -0x300(%rbp), %rax
movss 0xf4(%rax), %xmm1
callq 0x19ea0
movss %xmm0, -0x314(%rbp)
jmp 0x19ad9
movslq -0x208(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x5180
movss (%rax), %xmm1
movss 0x155f(%rip), %xmm0     # 0x1b054
subss %xmm1, %xmm0
movss %xmm0, -0x324(%rbp)
callq 0x5150
movq %rax, -0x320(%rbp)
jmp 0x19b0f
movss -0x324(%rbp), %xmm0
movq -0x320(%rbp), %rax
movss 0xf8(%rax), %xmm1
callq 0x19ea0
movss %xmm0, -0x328(%rbp)
jmp 0x19b35
movss -0x328(%rbp), %xmm1
movss -0x314(%rbp), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, -0x338(%rbp)
movslq -0x208(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x5180
movss (%rax), %xmm1
movss 0x14e7(%rip), %xmm0     # 0x1b054
subss %xmm1, %xmm0
movss %xmm0, -0x334(%rbp)
callq 0x5150
movq %rax, -0x330(%rbp)
jmp 0x19b87
movss -0x334(%rbp), %xmm0
movq -0x330(%rbp), %rax
movss 0xfc(%rax), %xmm1
callq 0x19ea0
movss %xmm0, -0x33c(%rbp)
jmp 0x19bad
movq -0x310(%rbp), %rdi
movss -0x33c(%rbp), %xmm1
movss -0x338(%rbp), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, -0x20c(%rbp)
leaq -0x20c(%rbp), %rsi
callq 0x4b20
jmp 0x19bde
jmp 0x19be0
movl -0x208(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x208(%rbp)
jmp 0x19a5c
leaq -0x168(%rbp), %rdi
callq 0x41e0
leaq -0x120(%rbp), %rdi
callq 0x174a0
leaq -0xa8(%rbp), %rdi
callq 0x41e0
leaq -0x70(%rbp), %rdi
callq 0x4ea0
leaq -0x58(%rbp), %rdi
callq 0x4ea0
leaq -0x40(%rbp), %rdi
callq 0x4ea0
leaq -0x28(%rbp), %rdi
callq 0x4ea0
addq $0x340, %rsp            # imm = 0x340
popq %rbp
retq
leaq -0x168(%rbp), %rdi
callq 0x41e0
leaq -0x120(%rbp), %rdi
callq 0x174a0
leaq -0xa8(%rbp), %rdi
callq 0x41e0
leaq -0x70(%rbp), %rdi
callq 0x4ea0
leaq -0x58(%rbp), %rdi
callq 0x4ea0
leaq -0x40(%rbp), %rdi
callq 0x4ea0
leaq -0x28(%rbp), %rdi
callq 0x4ea0
movq -0x80(%rbp), %rdi
callq 0x45e0
nopw %cs:(%rax,%rax)