// File: gcollet[P]MstatX/src/jensen.cpp
// Function: JensenStat::calculate(Msa&)
void
JensenStat :: calculate(Msa & msa)
{
	/* Init size */
	string alphabet = msa.getAlphabet();
	int L = msa.getNcol();
	int N = msa.getNseq();
	int K = (int) alphabet.size();
	
	/* Allocate proba array */
	float **proba = (float **) calloc(L, sizeof(float*));
	if (proba == NULL){
		fprintf(stderr,"Cannot Allocate probability matrix\n");
		exit(0);
	}
	for (int i(0); i < L; i++){
		proba[i] = (float *) calloc(K, sizeof(float));
		if (proba[i] == NULL){
			fprintf(stderr,"Cannot Allocate probability submatrix\n");
			exit(0);
		}
	}

	/* Calculate Sequence Weights */
	vector<float> w;
	for (int seq(0); seq < N; ++seq){
		w.push_back(calcSeqWeight(msa,seq));
	}

	/* Background distribution of amino acids 
	 * These background frequencies are used in sca paper
	 */
	map<char,float> q;
	q['A'] = 0.073;
	q['C'] = 0.025;
	q['D'] = 0.050;
	q['E'] = 0.061;
	q['F'] = 0.042;
	q['G'] = 0.072;
	q['H'] = 0.023;
	q['I'] = 0.053;
	q['K'] = 0.064;
	q['L'] = 0.089;
	q['M'] = 0.023;
	q['N'] = 0.043;
	q['P'] = 0.052;
	q['Q'] = 0.040;
	q['R'] = 0.052;
	q['S'] = 0.073;
	q['T'] = 0.056;
	q['V'] = 0.063;
	q['W'] = 0.013;
	q['Y'] = 0.033;
	
	/* Calculate aa proba by columns */
	float lambda = 0.5;
	
  for (int x(0); x < L; ++x){
		int nb_abs = 0;
		for (int a(0); a < K; a++){
		  for (int j(0); j < N; ++j){
				if(msa.getSymbol(j, x) == alphabet[a]){
					proba[x][a] += w[j];
				}
			}
			if (proba[x][a] == 0.0){
				proba[x][a] = pow(10.0,-6.0);
				nb_abs++;
			}
		}
		/* reduce by the pseudo counts in order to have sum-of-proba = 1 */
		float pseudo_counts = (float) nb_abs * pow(10.0,-6.0) / (float) (K - nb_abs);
		for (int a(0); a < K; a++){
			if (proba[x][a] > pow(10.0,-6.0)){
				proba[x][a] -= pseudo_counts;
			}
		}
	}
	
	/* Calculate conservation score by columns */
	for (int x(0); x < L; ++x){
		float score_left = 0.0;
		float score_right = 0.0;
		for (int a(0); a < K; a++){
			char aa = alphabet[a];
			if (aa != '-' && aa != 'X' && aa != 'Z' && aa != 'B'){
				score_left  += proba[x][a] * log(proba[x][a] / (lambda * proba[x][a] + (1.0 - lambda) * q[aa]));
				score_right += q[aa] * log(q[aa] / (lambda * proba[x][a] + (1.0 - lambda) * q[aa]));
			}
		}
		col_stat.push_back((1 - (lambda * score_left + (1.0 - lambda) * score_right)) * (1 - ((float) msa.getGap(x) / (float) N)));
	}
	
	/* Add Side columns effect */
	/*int window = Options::Get().window;
	for (int x(0); x < L; ++x){
		float score = col_stat[x];
		float side_score = 0.0;
		for (int i(x-1); i >= 0 && i >= x - window; i--) {
			side_score += col_stat[i];
		}
		for (int i(x+1); i < L && i <= x + window; i++) {
			side_score += col_stat[i];
		}
		side_score /= (2 * window);
		cout << 0.5 * (score + side_score) <<"\n";
		col_stat[x] = 0.5 * (score + side_score);
	}*/
	
	for (int i(0); i < L; ++i) {
		free (proba[i]);	
	}
	free(proba);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x71e0
movq -0x10(%rbp), %rdi
callq 0x4ae0
movl %eax, -0x100(%rbp)
jmp 0x654c
movl -0x100(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4b00
movl %eax, -0x10c(%rbp)
jmp 0x6566
movl -0x10c(%rbp), %eax
movl %eax, -0x48(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x4260
movl %eax, -0x4c(%rbp)
movslq -0x34(%rbp), %rdi
movl $0x8, %esi
callq 0x4220
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x65c4
movq 0x1fa2d(%rip), %rax     # 0x25fc8
movq (%rax), %rdi
leaq 0x14ad3(%rip), %rsi     # 0x1b078
movb $0x0, %al
callq 0x44d0
xorl %edi, %edi
callq 0x4400
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x715e
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x662b
movslq -0x4c(%rbp), %rdi
movl $0x4, %esi
callq 0x4220
movq %rax, %rdx
movq -0x58(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x58(%rbp), %rax
movslq -0x5c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x661e
movq 0x1f9c2(%rip), %rax     # 0x25fc8
movq (%rax), %rdi
leaq 0x14a8c(%rip), %rsi     # 0x1b09c
movb $0x0, %al
callq 0x44d0
xorl %edi, %edi
callq 0x4400
jmp 0x6620
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x65cb
leaq -0x78(%rbp), %rdi
callq 0x7210
movl $0x0, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
cmpl -0x48(%rbp), %eax
jge 0x669a
movq -0x108(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x7c(%rbp), %edx
callq 0x6410
movss %xmm0, -0x110(%rbp)
jmp 0x6660
movss -0x110(%rbp), %xmm0
movss %xmm0, -0x80(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x4b20
jmp 0x667c
jmp 0x667e
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x663b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x7155
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x7230
movq -0x120(%rbp), %rdi
movb $0x41, -0xb1(%rbp)
leaq -0xb1(%rbp), %rsi
callq 0x7250
movq %rax, -0x118(%rbp)
jmp 0x66d0
movq -0x118(%rbp), %rax
movl $0x3d958106, (%rax)     # imm = 0x3D958106
movb $0x43, -0xb2(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb2(%rbp), %rsi
callq 0x7250
movq %rax, -0x128(%rbp)
jmp 0x6700
movq -0x128(%rbp), %rax
movl $0x3ccccccd, (%rax)     # imm = 0x3CCCCCCD
movb $0x44, -0xb3(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb3(%rbp), %rsi
callq 0x7250
movq %rax, -0x130(%rbp)
jmp 0x6730
movq -0x130(%rbp), %rax
movl $0x3d4ccccd, (%rax)     # imm = 0x3D4CCCCD
movb $0x45, -0xb4(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb4(%rbp), %rsi
callq 0x7250
movq %rax, -0x138(%rbp)
jmp 0x6760
movq -0x138(%rbp), %rax
movl $0x3d79db23, (%rax)     # imm = 0x3D79DB23
movb $0x46, -0xb5(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb5(%rbp), %rsi
callq 0x7250
movq %rax, -0x140(%rbp)
jmp 0x6790
movq -0x140(%rbp), %rax
movl $0x3d2c0831, (%rax)     # imm = 0x3D2C0831
movb $0x47, -0xb6(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb6(%rbp), %rsi
callq 0x7250
movq %rax, -0x148(%rbp)
jmp 0x67c0
movq -0x148(%rbp), %rax
movl $0x3d9374bc, (%rax)     # imm = 0x3D9374BC
movb $0x48, -0xb7(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb7(%rbp), %rsi
callq 0x7250
movq %rax, -0x150(%rbp)
jmp 0x67f0
movq -0x150(%rbp), %rax
movl $0x3cbc6a7f, (%rax)     # imm = 0x3CBC6A7F
movb $0x49, -0xb8(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x7250
movq %rax, -0x158(%rbp)
jmp 0x6820
movq -0x158(%rbp), %rax
movl $0x3d591687, (%rax)     # imm = 0x3D591687
movb $0x4b, -0xb9(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb9(%rbp), %rsi
callq 0x7250
movq %rax, -0x160(%rbp)
jmp 0x6850
movq -0x160(%rbp), %rax
movl $0x3d83126f, (%rax)     # imm = 0x3D83126F
movb $0x4c, -0xba(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xba(%rbp), %rsi
callq 0x7250
movq %rax, -0x168(%rbp)
jmp 0x6880
movq -0x168(%rbp), %rax
movl $0x3db645a2, (%rax)     # imm = 0x3DB645A2
movb $0x4d, -0xbb(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xbb(%rbp), %rsi
callq 0x7250
movq %rax, -0x170(%rbp)
jmp 0x68b0
movq -0x170(%rbp), %rax
movl $0x3cbc6a7f, (%rax)     # imm = 0x3CBC6A7F
movb $0x4e, -0xbc(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xbc(%rbp), %rsi
callq 0x7250
movq %rax, -0x178(%rbp)
jmp 0x68e0
movq -0x178(%rbp), %rax
movl $0x3d3020c5, (%rax)     # imm = 0x3D3020C5
movb $0x50, -0xbd(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xbd(%rbp), %rsi
callq 0x7250
movq %rax, -0x180(%rbp)
jmp 0x6910
movq -0x180(%rbp), %rax
movl $0x3d54fdf4, (%rax)     # imm = 0x3D54FDF4
movb $0x51, -0xbe(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xbe(%rbp), %rsi
callq 0x7250
movq %rax, -0x188(%rbp)
jmp 0x6940
movq -0x188(%rbp), %rax
movl $0x3d23d70a, (%rax)     # imm = 0x3D23D70A
movb $0x52, -0xbf(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xbf(%rbp), %rsi
callq 0x7250
movq %rax, -0x190(%rbp)
jmp 0x6970
movq -0x190(%rbp), %rax
movl $0x3d54fdf4, (%rax)     # imm = 0x3D54FDF4
movb $0x53, -0xc0(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x7250
movq %rax, -0x198(%rbp)
jmp 0x69a0
movq -0x198(%rbp), %rax
movl $0x3d958106, (%rax)     # imm = 0x3D958106
movb $0x54, -0xc1(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xc1(%rbp), %rsi
callq 0x7250
movq %rax, -0x1a0(%rbp)
jmp 0x69d0
movq -0x1a0(%rbp), %rax
movl $0x3d656042, (%rax)     # imm = 0x3D656042
movb $0x56, -0xc2(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xc2(%rbp), %rsi
callq 0x7250
movq %rax, -0x1a8(%rbp)
jmp 0x6a00
movq -0x1a8(%rbp), %rax
movl $0x3d810625, (%rax)     # imm = 0x3D810625
movb $0x57, -0xc3(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xc3(%rbp), %rsi
callq 0x7250
movq %rax, -0x1b0(%rbp)
jmp 0x6a30
movq -0x1b0(%rbp), %rax
movl $0x3c54fdf4, (%rax)     # imm = 0x3C54FDF4
movb $0x59, -0xc4(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xc4(%rbp), %rsi
callq 0x7250
movq %rax, -0x1b8(%rbp)
jmp 0x6a60
movq -0x1b8(%rbp), %rax
movss 0x145ed(%rip), %xmm0    # 0x1b05c
movss %xmm0, (%rax)
movss 0x145dd(%rip), %xmm0    # 0x1b058
movss %xmm0, -0xc8(%rbp)
movl $0x0, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x6d34
movl $0x0, -0xd0(%rbp)
movl $0x0, -0xd4(%rbp)
movl -0xd4(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x6c1d
movl $0x0, -0xd8(%rbp)
movl -0xd8(%rbp), %eax
cmpl -0x48(%rbp), %eax
jge 0x6b9a
movq -0x10(%rbp), %rdi
movl -0xd8(%rbp), %esi
movl -0xcc(%rbp), %edx
callq 0x71a0
movb %al, -0x1b9(%rbp)
jmp 0x6af5
movb -0x1b9(%rbp), %al
movsbl %al, %eax
movl %eax, -0x1cc(%rbp)
movslq -0xd4(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x46c0
movq %rax, -0x1c8(%rbp)
jmp 0x6b1d
movl -0x1cc(%rbp), %eax
movq -0x1c8(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x6b84
movslq -0xd8(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x5180
movss (%rax), %xmm0
movq -0x58(%rbp), %rax
movslq -0xcc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0xd4(%rbp), %rcx
addss (%rax,%rcx,4), %xmm0
movss %xmm0, (%rax,%rcx,4)
jmp 0x6b84
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x7410
jmp 0x7155
jmp 0x6b86
movl -0xd8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd8(%rbp)
jmp 0x6ac9
movq -0x58(%rbp), %rax
movslq -0xcc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0xd4(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x6c07
jp 0x6c07
movsd 0x1449c(%rip), %xmm0    # 0x1b068
movsd 0x1449c(%rip), %xmm1    # 0x1b070
callq 0x45d0
cvtsd2ss %xmm0, %xmm0
movq -0x58(%rbp), %rax
movslq -0xcc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0xd4(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0xd0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd0(%rbp)
jmp 0x6c09
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0x6ab0
cvtsi2ssl -0xd0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x1d8(%rbp)
movsd 0x1442f(%rip), %xmm0    # 0x1b068
movsd 0x1442f(%rip), %xmm1    # 0x1b070
callq 0x45d0
movaps %xmm0, %xmm1
movsd -0x1d8(%rbp), %xmm0
mulsd %xmm1, %xmm0
movl -0x4c(%rbp), %eax
subl -0xd0(%rbp), %eax
cvtsi2ss %eax, %xmm1
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0xdc(%rbp)
movl $0x0, -0xe0(%rbp)
movl -0xe0(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x6d1e
movq -0x58(%rbp), %rax
movslq -0xcc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0xe0(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x1e0(%rbp)
movsd 0x143aa(%rip), %xmm0    # 0x1b068
movsd 0x143aa(%rip), %xmm1    # 0x1b070
callq 0x45d0
movaps %xmm0, %xmm1
movsd -0x1e0(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x6d08
movss -0xdc(%rbp), %xmm1
movq -0x58(%rbp), %rax
movslq -0xcc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0xe0(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
subss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
jmp 0x6d0a
movl -0xe0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe0(%rbp)
jmp 0x6c80
jmp 0x6d20
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
jmp 0x6a8d
movl $0x0, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x70eb
xorps %xmm0, %xmm0
movss %xmm0, -0xe8(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0xec(%rbp)
movl $0x0, -0xf0(%rbp)
movl -0xf0(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x700e
movslq -0xf0(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x46c0
movq %rax, -0x1e8(%rbp)
jmp 0x6d95
movq -0x1e8(%rbp), %rax
movb (%rax), %al
movb %al, -0xf1(%rbp)
movsbl -0xf1(%rbp), %eax
cmpl $0x2d, %eax
je 0x6ff8
movsbl -0xf1(%rbp), %eax
cmpl $0x58, %eax
je 0x6ff8
movsbl -0xf1(%rbp), %eax
cmpl $0x5a, %eax
je 0x6ff8
movsbl -0xf1(%rbp), %eax
cmpl $0x42, %eax
je 0x6ff8
movq -0x58(%rbp), %rax
movslq -0xe4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0xf0(%rbp), %rcx
movss (%rax,%rcx,4), %xmm2
cvtss2sd %xmm2, %xmm0
movsd %xmm0, -0x210(%rbp)
movsd %xmm0, -0x208(%rbp)
movss -0xc8(%rbp), %xmm0
movaps %xmm0, %xmm1
mulss %xmm2, %xmm1
cvtss2sd %xmm1, %xmm1
movsd %xmm1, -0x200(%rbp)
cvtss2sd %xmm0, %xmm1
movsd 0x14226(%rip), %xmm0    # 0x1b060
subsd %xmm1, %xmm0
movsd %xmm0, -0x1f8(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xf1(%rbp), %rsi
callq 0x7330
movq %rax, -0x1f0(%rbp)
jmp 0x6e62
movsd -0x210(%rbp), %xmm0
movsd -0x200(%rbp), %xmm2
movsd -0x1f8(%rbp), %xmm1
movq -0x1f0(%rbp), %rax
movss (%rax), %xmm3
cvtss2sd %xmm3, %xmm3
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
callq 0x42d0
movaps %xmm0, %xmm2
movsd -0x208(%rbp), %xmm0
movss -0xe8(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0xe8(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xf1(%rbp), %rsi
callq 0x7330
movq %rax, -0x218(%rbp)
jmp 0x6ee1
movq -0x218(%rbp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x228(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xf1(%rbp), %rsi
callq 0x7330
movq %rax, -0x220(%rbp)
jmp 0x6f14
movq -0x220(%rbp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x248(%rbp)
movss -0xc8(%rbp), %xmm0
movq -0x58(%rbp), %rax
movslq -0xe4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0xf0(%rbp), %rcx
movss (%rax,%rcx,4), %xmm2
movaps %xmm0, %xmm1
mulss %xmm2, %xmm1
cvtss2sd %xmm1, %xmm1
movsd %xmm1, -0x240(%rbp)
cvtss2sd %xmm0, %xmm1
movsd 0x140f3(%rip), %xmm0    # 0x1b060
subsd %xmm1, %xmm0
movsd %xmm0, -0x238(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xf1(%rbp), %rsi
callq 0x7330
movq %rax, -0x230(%rbp)
jmp 0x6f95
movsd -0x248(%rbp), %xmm0
movsd -0x240(%rbp), %xmm2
movsd -0x238(%rbp), %xmm1
movq -0x230(%rbp), %rax
movss (%rax), %xmm3
cvtss2sd %xmm3, %xmm3
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
callq 0x42d0
movaps %xmm0, %xmm2
movsd -0x228(%rbp), %xmm0
movss -0xec(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0xec(%rbp)
jmp 0x6ffa
movl -0xf0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xf0(%rbp)
jmp 0x6d6d
movq -0x108(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x260(%rbp)
movss -0xc8(%rbp), %xmm0
movss -0xe8(%rbp), %xmm2
movaps %xmm0, %xmm1
mulss %xmm2, %xmm1
cvtss2sd %xmm1, %xmm2
cvtss2sd %xmm0, %xmm3
movsd 0x14019(%rip), %xmm0    # 0x1b060
movaps %xmm0, %xmm1
subsd %xmm3, %xmm1
movss -0xec(%rbp), %xmm3
cvtss2sd %xmm3, %xmm3
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x258(%rbp)
movq -0x10(%rbp), %rdi
movl -0xe4(%rbp), %esi
callq 0x12c20
movl %eax, -0x24c(%rbp)
jmp 0x7085
movq -0x260(%rbp), %rdi
movsd -0x258(%rbp), %xmm0
movl -0x24c(%rbp), %eax
cvtsi2ss %eax, %xmm2
cvtsi2ssl -0x48(%rbp), %xmm1
divss %xmm1, %xmm2
movss 0x13fa5(%rip), %xmm1    # 0x1b054
subss %xmm2, %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0xf8(%rbp)
leaq -0xf8(%rbp), %rsi
callq 0x4b20
jmp 0x70d5
jmp 0x70d7
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x6d3e
movl $0x0, -0xfc(%rbp)
movl -0xfc(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x7125
movq -0x58(%rbp), %rax
movslq -0xfc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x43f0
movl -0xfc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xfc(%rbp)
jmp 0x70f5
movq -0x58(%rbp), %rdi
callq 0x43f0
leaq -0xb0(%rbp), %rdi
callq 0x7410
leaq -0x78(%rbp), %rdi
callq 0x4ea0
leaq -0x30(%rbp), %rdi
callq 0x41e0
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
leaq -0x78(%rbp), %rdi
callq 0x4ea0
leaq -0x30(%rbp), %rdi
callq 0x41e0
movq -0x40(%rbp), %rdi
callq 0x45e0