// File: 0asa[P]TTree-source/Scorer.cpp
// Function: Scorer::getRandSNPScore(std::vector<unsigned int, std::allocator<unsigned int>>&, unsigned int, ScoreInfo&)
void Scorer::getRandSNPScore(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();
	if (th.size() > 0) {
		int t = rand() % th.size();
		ctable.compact(th[t]);
		si.update(snp,th[t],score.getScore(ctable));
	}
}

// Assembly:
subq $0x158, %rsp            # imm = 0x158
movq %rdi, 0x150(%rsp)
movq %rsi, 0x148(%rsp)
movl %edx, 0x144(%rsp)
movq %rcx, 0x138(%rsp)
movq 0x150(%rsp), %rax
movq %rax, 0x80(%rsp)
leaq 0x134(%rsp), %rdi
callq 0xcdf0
leaq 0xb8(%rsp), %rdi
movl $0x2, %esi
movl $0x3, %edx
callq 0x16b40
jmp 0x2771c
movl $0x0, 0xa8(%rsp)
movslq 0xa8(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x148(%rsp), %rdi
callq 0x8bf0
movq %rax, %rcx
movq 0x78(%rsp), %rax
cmpq %rcx, %rax
jae 0x27881
movq 0x80(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x68(%rsp)
movq 0x148(%rsp), %rdi
movslq 0xa8(%rsp), %rsi
callq 0xcd80
movq 0x68(%rsp), %rdi
movl (%rax), %esi
callq 0xcdc0
movw %ax, 0x76(%rsp)
jmp 0x2778a
movq 0x80(%rsp), %rax
movw 0x76(%rsp), %cx
movswl %cx, %ecx
movl %ecx, 0x54(%rsp)
movq (%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x148(%rsp), %rdi
movslq 0xa8(%rsp), %rsi
callq 0xcd80
movq 0x58(%rsp), %rdi
movl (%rax), %esi
movl 0x144(%rsp), %edx
callq 0x16a20
movw %ax, 0x66(%rsp)
jmp 0x277d5
movq 0x80(%rsp), %rax
movw 0x66(%rsp), %cx
movswl %cx, %ecx
movl %ecx, 0x3c(%rsp)
movq (%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x148(%rsp), %rdi
movslq 0xa8(%rsp), %rsi
callq 0xcd80
movq 0x40(%rsp), %rdi
movl (%rax), %esi
callq 0xcd50
movsd %xmm0, 0x48(%rsp)
jmp 0x2781a
movsd 0x48(%rsp), %xmm0
movl 0x3c(%rsp), %edx
movl 0x54(%rsp), %esi
leaq 0xb8(%rsp), %rdi
callq 0x16f30
jmp 0x27837
jmp 0x27839
movl 0xa8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xa8(%rsp)
jmp 0x27727
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0x279d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0x279cc
leaq 0x90(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x17400
jmp 0x27898
leaq 0x90(%rsp), %rdi
callq 0xab40
cmpq $0x0, %rax
jbe 0x2799d
callq 0x30b0
cltq
movq %rax, 0x30(%rsp)
leaq 0x90(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0xab40
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movq 0x30(%rsp), %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x8c(%rsp)
movslq 0x8c(%rsp), %rsi
callq 0xcda0
movsd (%rax), %xmm0
leaq 0xb8(%rsp), %rdi
callq 0x16f90
jmp 0x27908
movq 0x138(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x144(%rsp), %eax
movl %eax, 0x14(%rsp)
movslq 0x8c(%rsp), %rsi
leaq 0x90(%rsp), %rdi
callq 0xcda0
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0x134(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x26490
movsd %xmm0, 0x20(%rsp)
jmp 0x2795c
movsd 0x20(%rsp), %xmm1
movsd 0x18(%rsp), %xmm0
movl 0x14(%rsp), %esi
movq 0x8(%rsp), %rdi
callq 0x26be0
jmp 0x27978
jmp 0x2799d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0x90(%rsp), %rdi
callq 0xcaa0
jmp 0x279cc
leaq 0x90(%rsp), %rdi
callq 0xcaa0
leaq 0xb8(%rsp), %rdi
callq 0x16d70
leaq 0x134(%rsp), %rdi
callq 0xd410
addq $0x158, %rsp            # imm = 0x158
retq
leaq 0xb8(%rsp), %rdi
callq 0x16d70
leaq 0x134(%rsp), %rdi
callq 0xd410
movq 0xb0(%rsp), %rdi
callq 0x33e0
nopw %cs:(%rax,%rax)