// File: 0asa[P]TTree-source/Scorer.cpp
// Function: Scorer::getSNPScore(std::vector<unsigned int, std::allocator<unsigned int>>&, unsigned int)
ScoreInfo Scorer::getSNPScore(std::vector<unsigned int> &ind, unsigned int snp) {
	Score score;
	ScoreInfo si;	
	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]);
		si.update(snp,th[t],score.getScore(ctable));
	}
	return si;
}

// Assembly:
subq $0x158, %rsp            # imm = 0x158
movq %rdi, 0x78(%rsp)
movq %rdi, %rax
movq %rax, 0x68(%rsp)
movq %rdi, 0x150(%rsp)
movq %rsi, 0x148(%rsp)
movq %rdx, 0x140(%rsp)
movl %ecx, 0x13c(%rsp)
movq 0x148(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x138(%rsp), %rdi
callq 0xcdf0
movq 0x78(%rsp), %rdi
movb $0x0, 0x137(%rsp)
callq 0x26ba0
jmp 0x27e71
leaq 0xa8(%rsp), %rdi
movl $0x2, %esi
movl $0x3, %edx
callq 0x16b40
jmp 0x27e8a
movl $0x0, 0xa4(%rsp)
movslq 0xa4(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x140(%rsp), %rdi
callq 0x8bf0
movq %rax, %rcx
movq 0x60(%rsp), %rax
cmpq %rcx, %rax
jae 0x27fff
movq 0x70(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x140(%rsp), %rdi
movslq 0xa4(%rsp), %rsi
callq 0xcd80
movq 0x50(%rsp), %rdi
movl (%rax), %esi
callq 0xcdc0
movw %ax, 0x5e(%rsp)
jmp 0x27ef5
movq 0x70(%rsp), %rax
movw 0x5e(%rsp), %cx
movswl %cx, %ecx
movl %ecx, 0x3c(%rsp)
movq (%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x140(%rsp), %rdi
movslq 0xa4(%rsp), %rsi
callq 0xcd80
movq 0x40(%rsp), %rdi
movl (%rax), %esi
movl 0x13c(%rsp), %edx
callq 0x16a20
movw %ax, 0x4e(%rsp)
jmp 0x27f3d
movq 0x70(%rsp), %rax
movw 0x4e(%rsp), %cx
movswl %cx, %ecx
movl %ecx, 0x24(%rsp)
movq (%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x140(%rsp), %rdi
movslq 0xa4(%rsp), %rsi
callq 0xcd80
movq 0x28(%rsp), %rdi
movl (%rax), %esi
callq 0xcd50
movsd %xmm0, 0x30(%rsp)
jmp 0x27f7f
movsd 0x30(%rsp), %xmm0
movl 0x24(%rsp), %edx
movl 0x3c(%rsp), %esi
leaq 0xa8(%rsp), %rdi
callq 0x16f30
jmp 0x27f9c
jmp 0x27f9e
movl 0xa4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xa4(%rsp)
jmp 0x27e95
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x128(%rsp)
movl %eax, 0x124(%rsp)
jmp 0x2817d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x128(%rsp)
movl %eax, 0x124(%rsp)
jmp 0x28173
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x128(%rsp)
movl %eax, 0x124(%rsp)
jmp 0x28140
leaq 0x88(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x17400
jmp 0x28016
movl $0x0, 0x84(%rsp)
movslq 0x84(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x88(%rsp), %rdi
callq 0xab40
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
jae 0x28112
movslq 0x84(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0xcda0
movsd (%rax), %xmm0
leaq 0xa8(%rsp), %rdi
callq 0x16f90
jmp 0x28074
movl 0x13c(%rsp), %eax
movl %eax, 0x4(%rsp)
movslq 0x84(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0xcda0
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x26490
movsd %xmm0, 0x10(%rsp)
jmp 0x280bb
movsd 0x10(%rsp), %xmm1
movsd 0x8(%rsp), %xmm0
movl 0x4(%rsp), %esi
movq 0x78(%rsp), %rdi
callq 0x26be0
jmp 0x280d7
jmp 0x280d9
movl 0x84(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x84(%rsp)
jmp 0x28021
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x128(%rsp)
movl %eax, 0x124(%rsp)
leaq 0x88(%rsp), %rdi
callq 0xcaa0
jmp 0x28140
movb $0x1, 0x137(%rsp)
leaq 0x88(%rsp), %rdi
callq 0xcaa0
leaq 0xa8(%rsp), %rdi
callq 0x16d70
testb $0x1, 0x137(%rsp)
jne 0x28159
jmp 0x2814f
leaq 0xa8(%rsp), %rdi
callq 0x16d70
jmp 0x28173
movq 0x78(%rsp), %rdi
callq 0x12640
leaq 0x138(%rsp), %rdi
callq 0xd410
movq 0x68(%rsp), %rax
addq $0x158, %rsp            # imm = 0x158
retq
movq 0x78(%rsp), %rdi
callq 0x12640
leaq 0x138(%rsp), %rdi
callq 0xd410
movq 0x128(%rsp), %rdi
callq 0x33e0
nopw (%rax,%rax)