// File: 0asa[P]TTree-source/Scorer.cpp
// Function: Scorer::getSNPScore(std::vector<unsigned int, std::allocator<unsigned int>>&, unsigned int, ScoreInfo&)
void Scorer::getSNPScore(std::vector<unsigned int> &ind, unsigned int snp, ScoreInfo &si) {
	Score score;
	ContingencyTable ctable(2,3); 
	for (int i = 0 ; i < ind.size() ; ++i)
		ctable.addToTable(db->getOutput(ind[i]), db->getAttVal(ind[i], snp),db->getWeight(ind[i]));
	std::vector<double> th = ctable.getPossibleTh();
	for (int t = 0 ; t < th.size() ; ++t) {
		ctable.compact(th[t]);
		//ctable.print();
		si.update(snp,th[t],score.getScore(ctable));
	}
}

// Assembly:
subq $0x148, %rsp            # imm = 0x148
movq %rdi, 0x140(%rsp)
movq %rsi, 0x138(%rsp)
movl %edx, 0x134(%rsp)
movq %rcx, 0x128(%rsp)
movq 0x140(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x124(%rsp), %rdi
callq 0xcdf0
leaq 0xa8(%rsp), %rdi
movl $0x2, %esi
movl $0x3, %edx
callq 0x16b40
jmp 0x27b49
movl $0x0, 0x98(%rsp)
movslq 0x98(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x138(%rsp), %rdi
callq 0x8bf0
movq %rax, %rcx
movq 0x68(%rsp), %rax
cmpq %rcx, %rax
jae 0x27ca5
movq 0x70(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x138(%rsp), %rdi
movslq 0x98(%rsp), %rsi
callq 0xcd80
movq 0x58(%rsp), %rdi
movl (%rax), %esi
callq 0xcdc0
movw %ax, 0x66(%rsp)
jmp 0x27bb4
movq 0x70(%rsp), %rax
movw 0x66(%rsp), %cx
movswl %cx, %ecx
movl %ecx, 0x44(%rsp)
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x138(%rsp), %rdi
movslq 0x98(%rsp), %rsi
callq 0xcd80
movq 0x48(%rsp), %rdi
movl (%rax), %esi
movl 0x134(%rsp), %edx
callq 0x16a20
movw %ax, 0x56(%rsp)
jmp 0x27bfc
movq 0x70(%rsp), %rax
movw 0x56(%rsp), %cx
movswl %cx, %ecx
movl %ecx, 0x2c(%rsp)
movq (%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x138(%rsp), %rdi
movslq 0x98(%rsp), %rsi
callq 0xcd80
movq 0x30(%rsp), %rdi
movl (%rax), %esi
callq 0xcd50
movsd %xmm0, 0x38(%rsp)
jmp 0x27c3e
movsd 0x38(%rsp), %xmm0
movl 0x2c(%rsp), %edx
movl 0x44(%rsp), %esi
leaq 0xa8(%rsp), %rdi
callq 0x16f30
jmp 0x27c5b
jmp 0x27c5d
movl 0x98(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x98(%rsp)
jmp 0x27b54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
jmp 0x27ded
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
jmp 0x27de0
leaq 0x80(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x17400
jmp 0x27cbc
movl $0x0, 0x7c(%rsp)
movslq 0x7c(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x80(%rsp), %rdi
callq 0xab40
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
jae 0x27db1
movslq 0x7c(%rsp), %rsi
leaq 0x80(%rsp), %rdi
callq 0xcda0
movsd (%rax), %xmm0
leaq 0xa8(%rsp), %rdi
callq 0x16f90
jmp 0x27d11
movq 0x128(%rsp), %rax
movq %rax, (%rsp)
movl 0x134(%rsp), %eax
movl %eax, 0xc(%rsp)
movslq 0x7c(%rsp), %rsi
leaq 0x80(%rsp), %rdi
callq 0xcda0
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0x124(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x26490
movsd %xmm0, 0x18(%rsp)
jmp 0x27d61
movsd 0x18(%rsp), %xmm1
movsd 0x10(%rsp), %xmm0
movl 0xc(%rsp), %esi
movq (%rsp), %rdi
callq 0x26be0
jmp 0x27d7c
jmp 0x27d7e
movl 0x7c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7c(%rsp)
jmp 0x27cc4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0x80(%rsp), %rdi
callq 0xcaa0
jmp 0x27de0
leaq 0x80(%rsp), %rdi
callq 0xcaa0
leaq 0xa8(%rsp), %rdi
callq 0x16d70
leaq 0x124(%rsp), %rdi
callq 0xd410
addq $0x148, %rsp            # imm = 0x148
retq
leaq 0xa8(%rsp), %rdi
callq 0x16d70
leaq 0x124(%rsp), %rdi
callq 0xd410
movq 0xa0(%rsp), %rdi
callq 0x33e0
nopw (%rax,%rax)