// File: /workspace/github_cpp_makefile_star2_O3/bobverity[P]MavericK/exhaustive.cpp
// Function: exhaustive_admix_fixedAlpha(globals&, int, double)
double exhaustive_admix_fixedAlpha(globals &globals, int Kindex, double alpha) {
    int K = globals.Kmin+Kindex;
    
    // initialise group
    int geneCopies = sum(globals.ploidy_vec)*globals.loci;
    vector<int> group(geneCopies,1);
    vector<int> newGroup = group;
    
    // initialise alleleCounts array
    vector< vector< vector<int> > > alleleCounts(K);
    vector< vector<int> > alleleCountsTotals(K);
    for (int k=0; k<K; k++) {
        alleleCounts[k] = vector< vector<int> >(globals.loci);
        alleleCountsTotals[k] = vector<int>(globals.loci);
        for (int l=0; l<globals.loci; l++) {
            alleleCounts[k][l] = vector<int>(globals.J[l]);
        }
    }
    
    // initialise admixCounts array
    vector< vector<int> > admixCounts(globals.n, vector<int>(K));
    vector<int> admixCountsTotals(globals.n);
    
    // populate alleleCounts and admixCounts arrays and calculate starting likelihood
    double logLike=0;
    int linearIndex=-1;
    for (int ind=0; ind<globals.n; ind++) {
        for (int l=0; l<globals.loci; l++) {
            for (int p=0; p<globals.ploidy_vec[ind]; p++) {
                linearIndex++;
                if (globals.data[ind][l][p]!=0) {
                    logLike += log(alleleCounts[group[linearIndex]-1][l][globals.data[ind][l][p]-1] + globals.lambda) - log(alleleCountsTotals[group[linearIndex]-1][l] + globals.J[l]*globals.lambda);
                    alleleCounts[group[linearIndex]-1][l][globals.data[ind][l][p]-1]++;
                    alleleCountsTotals[group[linearIndex]-1][l]++;
                    
                    logLike += log(admixCounts[ind][group[linearIndex]-1] + alpha) - log(admixCountsTotals[ind] + K*alpha);
                    admixCounts[ind][group[linearIndex]-1]++;
                    admixCountsTotals[ind]++;
                }
            }
        }
    }
    double combined_logLike = logLike + log(double(K));
    
    // loop through all possible groupings
    int uniques = 0;  // number of unique elements in group. Forms part of combinatorial constant needed to calculate correct likelihood when only searching over unique partitions (see Notes.c for details)
    double logLike_total = combined_logLike;
    while (group[0]!=0) {
        
        increment_restrictedGrowth(newGroup,K);
        if (newGroup[0]==0)
            break;
        
        // loop through all gene copies
        linearIndex=-1;
        for (int ind=0; ind<globals.n; ind++) {
            for (int l=0; l<globals.loci; l++) {
                for (int p=0; p<globals.ploidy_vec[ind]; p++) {
                    linearIndex++;
                    
                    // if group allocation for this gene copy has changed
                    if (newGroup[linearIndex]!=group[linearIndex]) {
                        
                        // subtract old group from allele counts, admix counts and likelihood
                        if (globals.data[ind][l][p]!=0) {
                            alleleCountsTotals[group[linearIndex]-1][l]--;
                            alleleCounts[group[linearIndex]-1][l][globals.data[ind][l][p]-1]--;
                            logLike -= log(alleleCounts[group[linearIndex]-1][l][globals.data[ind][l][p]-1] + globals.lambda) - log(alleleCountsTotals[group[linearIndex]-1][l] + globals.J[l]*globals.lambda);
                            
                            admixCountsTotals[ind]--;
                            admixCounts[ind][group[linearIndex]-1]--;
                            logLike -= log(admixCounts[ind][group[linearIndex]-1] + alpha) - log(admixCountsTotals[ind] + K*alpha);
                        }
                        
                        // add new group to allele counts, admix counts and likelihood
                        if (globals.data[ind][l][p]!=0) {
                            logLike += log(alleleCounts[newGroup[linearIndex]-1][l][globals.data[ind][l][p]-1] + globals.lambda) - log(alleleCountsTotals[newGroup[linearIndex]-1][l] + globals.J[l]*globals.lambda);
                            alleleCounts[newGroup[linearIndex]-1][l][globals.data[ind][l][p]-1]++;
                            alleleCountsTotals[newGroup[linearIndex]-1][l]++;
                            
                            logLike += log(admixCounts[ind][newGroup[linearIndex]-1] + alpha) - log(admixCountsTotals[ind] + K*alpha);
                            admixCounts[ind][newGroup[linearIndex]-1]++;
                            admixCountsTotals[ind]++;
                        }
                        
                    }
                    
                } // p
            } // l
        } // ind
        
        // update group
        group = newGroup;
        
        // some combinatorics to account for searching unique partitions only (see Notes.c for details)
        uniques = *max_element(begin(group),end(group));
        combined_logLike = logLike + my_lgamma(double(K)+1)-my_lgamma(double(K)-double(uniques)+1);
        
        // add to running sum
        logLike_total = logSum(logLike_total, combined_logLike);
    }
    
    return(logLike_total);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movsd %xmm0, 0x88(%rsp)
movl %esi, %ebx
movq %rdi, %r14
movq 0x2cd0(%rdi), %rax
movq 0x2cd8(%rdi), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
testl %ecx, %ecx
jle 0x103f0
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
xorl %esi, %esi
xorl %edx, %edx
addl (%rax,%rsi,4), %edx
incq %rsi
cmpq %rsi, %rcx
jne 0x103e3
jmp 0x103f2
xorl %edx, %edx
addl 0x2bc8(%r14), %ebx
movslq 0x2d1c(%r14), %rax
movslq %edx, %rsi
imulq %rax, %rsi
leaq 0x30(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0xa8(%rsp), %r15
leaq 0xe0(%rsp), %rcx
movq %r15, %rdi
callq 0xe8e0
leaq 0xe0(%rsp), %rdi
movq %r15, %rsi
callq 0x6ad4
movslq %ebx, %r15
leaq 0x110(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movq %r15, %rsi
callq 0xb22a
movq %r14, 0x28(%rsp)
leaq 0xf8(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movq %r15, 0x20(%rsp)
movq %r15, %rsi
callq 0xb2e8
testl %ebx, %ebx
movl %ebx, 0x50(%rsp)
jle 0x10617
movl %ebx, %eax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movl 0x2d1c(%rax), %eax
xorl %r14d, %r14d
leaq 0x60(%rsp), %r12
leaq 0x30(%rsp), %rbp
movslq %eax, %rsi
movq %r12, %rdi
leaq 0xf(%rsp), %rdx
callq 0xb2e8
movq 0x110(%rsp), %rax
leaq (%r14,%r14,2), %r15
movq 0x10(%rax,%r15,8), %rcx
movaps 0x60(%rsp), %xmm0
movupd (%rax,%r15,8), %xmm1
movups %xmm0, (%rax,%r15,8)
movq 0x70(%rsp), %rdx
movq %rdx, 0x10(%rax,%r15,8)
movapd %xmm1, 0x30(%rsp)
movq %rcx, 0x40(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movq $0x0, 0x70(%rsp)
movq %rbp, %rdi
callq 0xb366
movq %r12, %rdi
callq 0xb366
movq 0x28(%rsp), %rax
movslq 0x2d1c(%rax), %rsi
movq %rbp, %rdi
movq %r12, %rdx
callq 0x6a48
movq 0xf8(%rsp), %rax
movq (%rax,%r15,8), %rdi
movapd 0x30(%rsp), %xmm0
movupd %xmm0, (%rax,%r15,8)
movq 0x40(%rsp), %rcx
movq %rcx, 0x10(%rax,%r15,8)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
testq %rdi, %rdi
je 0x10568
callq 0x3310
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x10568
callq 0x3310
movq 0x28(%rsp), %rax
movl 0x2d1c(%rax), %eax
testl %eax, %eax
jle 0x10605
xorl %r13d, %r13d
xorl %ebx, %ebx
movq 0x28(%rsp), %rcx
movq 0x2d20(%rcx), %rax
movslq (%rax,%rbx,4), %rsi
movq %rbp, %rdi
movq %r12, %rdx
callq 0x6a48
movq 0x110(%rsp), %rax
movq (%rax,%r15,8), %rax
movq (%rax,%r13), %rdi
movapd 0x30(%rsp), %xmm0
movupd %xmm0, (%rax,%r13)
movq 0x40(%rsp), %rcx
movq %rcx, 0x10(%rax,%r13)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
testq %rdi, %rdi
je 0x105ed
callq 0x3310
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x105ed
callq 0x3310
incq %rbx
movq 0x28(%rsp), %rcx
movslq 0x2d1c(%rcx), %rax
addq $0x18, %r13
cmpq %rax, %rbx
jl 0x10585
incq %r14
cmpq 0x10(%rsp), %r14
movl 0x50(%rsp), %ebx
jne 0x1049c
movq 0x28(%rsp), %r14
movslq 0x2d18(%r14), %r12
leaq 0x60(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq 0x20(%rsp), %rsi
callq 0x6a48
leaq 0x30(%rsp), %rdi
leaq 0x60(%rsp), %rdx
leaq 0x57(%rsp), %rcx
movq %r12, %rsi
callq 0xb3ac
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x1065d
callq 0x3310
movslq 0x2d18(%r14), %rsi
leaq 0x60(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6a48
movl 0x2d18(%r14), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
testl %ecx, %ecx
jle 0x1098a
movl 0x2d1c(%r14), %eax
xorpd %xmm1, %xmm1
movsd %xmm1, 0x10(%rsp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edi, %edi
movapd %xmm0, %xmm1
mulsd 0x88(%rsp), %xmm1
movsd %xmm1, 0x80(%rsp)
movsd %xmm0, 0x90(%rsp)
movq 0x28(%rsp), %r15
testl %eax, %eax
jle 0x10979
movq 0x2cd0(%r14), %rcx
leaq (%rdi,%rdi,2), %rdx
movq %rdx, 0xa0(%rsp)
leaq (,%rdi,8), %rdx
leaq (%rdx,%rdx,2), %rdx
movq %rdx, 0xc8(%rsp)
movq $0x0, 0x58(%rsp)
movq %rdi, 0x20(%rsp)
cmpl $0x0, (%rcx,%rdi,4)
jle 0x10955
movl %esi, 0xc0(%rsp)
movslq %esi, %rax
leaq 0x4(,%rax,4), %rax
movq %rax, 0xd0(%rsp)
movq 0x58(%rsp), %rax
leaq (%rax,%rax,2), %rdx
movq %rdx, 0xd8(%rsp)
leaq (,%rax,8), %rax
leaq (%rax,%rax,2), %rax
movq %rax, 0x98(%rsp)
xorl %r14d, %r14d
movq 0x2d00(%r15), %rax
movq 0xa0(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movq 0xd8(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movslq (%rax,%r14,4), %rax
testq %rax, %rax
je 0x1092f
movq 0xa8(%rsp), %rcx
movq 0xd0(%rsp), %r12
addq %r12, %rcx
movslq (%rcx,%r14,4), %rcx
movq 0x110(%rsp), %rdx
leaq (%rcx,%rcx,2), %rcx
movq -0x18(%rdx,%rcx,8), %rcx
movq 0x98(%rsp), %rbp
movq (%rcx,%rbp), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl -0x4(%rcx,%rax,4), %xmm0
addsd 0x2c50(%r15), %xmm0
callq 0x3290
movq 0xa8(%rsp), %rax
addq %r12, %rax
movslq (%rax,%r14,4), %rax
movq 0xf8(%rsp), %rcx
leaq (%rax,%rax,2), %rax
movq -0x18(%rcx,%rax,8), %rax
movq 0x58(%rsp), %rbx
xorps %xmm2, %xmm2
cvtsi2sdl (%rax,%rbx,4), %xmm2
movq 0x2d20(%r15), %rax
xorps %xmm1, %xmm1
cvtsi2sdl (%rax,%rbx,4), %xmm1
movsd %xmm0, 0x18(%rsp)
mulsd 0x2c50(%r15), %xmm1
addsd %xmm2, %xmm1
movapd %xmm1, %xmm0
callq 0x3290
movq 0xa8(%rsp), %rax
addq %r12, %rax
movslq (%rax,%r14,4), %rcx
movq 0x110(%rsp), %rdx
leaq (%rcx,%rcx,2), %rcx
movq -0x18(%rdx,%rcx,8), %rcx
movq 0x2d00(%r15), %rdx
movq 0xc8(%rsp), %r13
movq (%rdx,%r13), %rdx
movq (%rdx,%rbp), %rdx
movslq (%rdx,%r14,4), %rdx
movq (%rcx,%rbp), %rcx
incl -0x4(%rcx,%rdx,4)
movslq (%rax,%r14,4), %rcx
movq 0xf8(%rsp), %rdx
leaq (%rcx,%rcx,2), %rcx
movq -0x18(%rdx,%rcx,8), %rcx
incl (%rcx,%rbx,4)
movsd 0x18(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x30(%rsp), %rcx
movslq (%rax,%r14,4), %rax
movq (%rcx,%r13), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl -0x4(%rcx,%rax,4), %xmm0
addsd 0x88(%rsp), %xmm0
callq 0x3290
movsd %xmm0, 0x18(%rsp)
movq 0x60(%rsp), %rax
movq 0x20(%rsp), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%rcx,4), %xmm0
addsd 0x80(%rsp), %xmm0
callq 0x3290
movq 0x20(%rsp), %rdi
movsd 0x18(%rsp), %xmm2
subsd %xmm0, %xmm2
movsd 0x90(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
addsd %xmm2, %xmm1
movsd %xmm1, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq 0xa8(%rsp), %rcx
addq %r12, %rcx
movslq (%rcx,%r14,4), %rcx
movq (%rax,%r13), %rax
incl -0x4(%rax,%rcx,4)
movq 0x60(%rsp), %rax
incl (%rax,%rdi,4)
movq 0x2cd0(%r15), %rcx
incq %r14
movslq (%rcx,%rdi,4), %rax
cmpq %rax, %r14
jl 0x1074e
movl 0xc0(%rsp), %esi
addl %r14d, %esi
movq 0x28(%rsp), %r14
movl 0x2d1c(%r14), %eax
movq 0x58(%rsp), %r9
incq %r9
movslq %eax, %rdx
movq %r9, 0x58(%rsp)
cmpq %rdx, %r9
jl 0x10702
movl 0x2d18(%r14), %ecx
movl 0x50(%rsp), %ebx
incq %rdi
movslq %ecx, %rdx
cmpq %rdx, %rdi
jl 0x106c5
jmp 0x10994
xorpd %xmm1, %xmm1
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x90(%rsp)
callq 0x3290
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x80(%rsp)
movsd 0x258a7(%rip), %xmm0    # 0x36260
movsd 0x90(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0xc0(%rsp)
leaq 0xe0(%rsp), %r15
movapd %xmm1, %xmm0
mulsd 0x88(%rsp), %xmm0
movsd %xmm0, 0xa0(%rsp)
movq 0xa8(%rsp), %rax
cmpl $0x0, (%rax)
je 0x10f35
movq %r15, %rdi
movl %ebx, %esi
callq 0x1c1eb
movq 0xe0(%rsp), %rax
cmpl $0x0, (%rax)
je 0x10f35
movl 0x2d18(%r14), %ecx
testl %ecx, %ecx
jle 0x10e70
movl 0x2d1c(%r14), %eax
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %r13d, %r13d
testl %eax, %eax
jle 0x10e61
movq 0x2cd0(%r14), %rcx
leaq (,%r13,2), %rdx
addq %r13, %rdx
movq %rdx, 0x58(%rsp)
leaq (,%r13,8), %rdx
leaq (%rdx,%rdx,2), %rdi
xorl %r8d, %r8d
movq %rdi, 0xd0(%rsp)
cmpl $0x0, (%rcx,%r13,4)
jle 0x10e4b
movl %esi, 0xc8(%rsp)
movslq %esi, %rax
leaq 0x4(,%rax,4), %rbp
leaq (%r8,%r8,2), %rax
movq %rax, 0xd8(%rsp)
movq %r8, 0x98(%rsp)
leaq (,%r8,8), %rax
leaq (%rax,%rax,2), %r8
xorl %r12d, %r12d
movq %r8, 0x20(%rsp)
movq 0xe0(%rsp), %rcx
addq %rbp, %rcx
movq 0xa8(%rsp), %rax
addq %rbp, %rax
movslq (%rax,%r12,4), %rdx
cmpl %edx, (%rcx,%r12,4)
je 0x10e11
movq 0x28(%rsp), %rbx
movq 0x2d00(%rbx), %rcx
movq 0x58(%rsp), %rsi
movq (%rcx,%rsi,8), %rcx
movq 0xd8(%rsp), %rsi
movq (%rcx,%rsi,8), %rcx
cmpl $0x0, (%rcx,%r12,4)
je 0x10e11
movq 0xf8(%rsp), %rsi
leaq (%rdx,%rdx,2), %rdx
movq -0x18(%rsi,%rdx,8), %rdx
movq 0x98(%rsp), %r15
decl (%rdx,%r15,4)
movslq (%rax,%r12,4), %rdx
movq 0x110(%rsp), %rsi
leaq (%rdx,%rdx,2), %rdx
movq -0x18(%rsi,%rdx,8), %rdx
movslq (%rcx,%r12,4), %rdi
movq (%rdx,%r8), %rdx
decl -0x4(%rdx,%rdi,4)
movslq (%rax,%r12,4), %rax
leaq (%rax,%rax,2), %rax
movq -0x18(%rsi,%rax,8), %rax
movslq (%rcx,%r12,4), %rcx
movq (%rax,%r8), %rax
xorps %xmm0, %xmm0
cvtsi2sdl -0x4(%rax,%rcx,4), %xmm0
addsd 0x2c50(%rbx), %xmm0
callq 0x3290
movq 0xa8(%rsp), %rax
addq %rbp, %rax
movslq (%rax,%r12,4), %rax
movq 0xf8(%rsp), %rcx
leaq (%rax,%rax,2), %rax
movq -0x18(%rcx,%rax,8), %rax
cvtsi2sdl (%rax,%r15,4), %xmm2
movq 0x2d20(%rbx), %rax
xorps %xmm1, %xmm1
cvtsi2sdl (%rax,%r15,4), %xmm1
movsd %xmm0, 0x18(%rsp)
mulsd 0x2c50(%rbx), %xmm1
addsd %xmm2, %xmm1
movapd %xmm1, %xmm0
callq 0x3290
movsd 0x18(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x60(%rsp), %rax
decl (%rax,%r13,4)
movq 0x30(%rsp), %rax
movq 0xa8(%rsp), %rcx
addq %rbp, %rcx
movslq (%rcx,%r12,4), %rdx
movq %r13, %r14
movq 0xd0(%rsp), %r13
movq (%rax,%r13), %rax
decl -0x4(%rax,%rdx,4)
movslq (%rcx,%r12,4), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl -0x4(%rax,%rcx,4), %xmm0
addsd 0x88(%rsp), %xmm0
callq 0x3290
movsd %xmm0, 0x18(%rsp)
movq 0x60(%rsp), %rax
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%r14,4), %xmm0
addsd 0xa0(%rsp), %xmm0
callq 0x3290
movq 0x20(%rsp), %r8
movsd 0x18(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x2d00(%rbx), %rax
movq (%rax,%r13), %rax
movq (%rax,%r8), %rax
movslq (%rax,%r12,4), %rax
testq %rax, %rax
je 0x10e0e
movq 0xe0(%rsp), %rcx
addq %rbp, %rcx
movslq (%rcx,%r12,4), %rcx
movq 0x110(%rsp), %rdx
leaq (%rcx,%rcx,2), %rcx
movq -0x18(%rdx,%rcx,8), %rcx
movq (%rcx,%r8), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl -0x4(%rcx,%rax,4), %xmm0
addsd 0x2c50(%rbx), %xmm0
callq 0x3290
movq 0xe0(%rsp), %rax
addq %rbp, %rax
movslq (%rax,%r12,4), %rax
movq 0xf8(%rsp), %rcx
leaq (%rax,%rax,2), %rax
movq -0x18(%rcx,%rax,8), %rax
xorps %xmm2, %xmm2
cvtsi2sdl (%rax,%r15,4), %xmm2
movq 0x2d20(%rbx), %rax
xorps %xmm1, %xmm1
cvtsi2sdl (%rax,%r15,4), %xmm1
movsd %xmm0, 0x18(%rsp)
mulsd 0x2c50(%rbx), %xmm1
addsd %xmm2, %xmm1
movapd %xmm1, %xmm0
callq 0x3290
movq 0xe0(%rsp), %rax
addq %rbp, %rax
movslq (%rax,%r12,4), %rcx
movq 0x110(%rsp), %rdx
leaq (%rcx,%rcx,2), %rcx
movq -0x18(%rdx,%rcx,8), %rcx
movq 0x2d00(%rbx), %rdx
movq (%rdx,%r13), %rdx
movq 0x20(%rsp), %rsi
movq (%rdx,%rsi), %rdx
movslq (%rdx,%r12,4), %rdx
movq 0x20(%rsp), %rsi
movq (%rcx,%rsi), %rcx
incl -0x4(%rcx,%rdx,4)
movslq (%rax,%r12,4), %rcx
movq 0xf8(%rsp), %rdx
leaq (%rcx,%rcx,2), %rcx
movq -0x18(%rdx,%rcx,8), %rcx
incl (%rcx,%r15,4)
movsd 0x18(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x30(%rsp), %rcx
movslq (%rax,%r12,4), %rax
movq (%rcx,%r13), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl -0x4(%rcx,%rax,4), %xmm0
addsd 0x88(%rsp), %xmm0
callq 0x3290
movsd %xmm0, 0x18(%rsp)
movq 0x60(%rsp), %rax
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%r14,4), %xmm0
addsd 0xa0(%rsp), %xmm0
callq 0x3290
movq 0x20(%rsp), %r8
movsd 0x18(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq 0xe0(%rsp), %rcx
addq %rbp, %rcx
movslq (%rcx,%r12,4), %rcx
movq (%rax,%r13), %rax
incl -0x4(%rax,%rcx,4)
movq 0x60(%rsp), %rax
incl (%rax,%r14,4)
movq %r14, %r13
incq %r12
movq 0x28(%rsp), %rax
movq 0x2cd0(%rax), %rcx
movslq (%rcx,%r13,4), %rax
cmpq %rax, %r12
jl 0x10ab2
movl 0xc8(%rsp), %esi
addl %r12d, %esi
movq 0x28(%rsp), %r14
movl 0x2d1c(%r14), %eax
movq 0x98(%rsp), %r8
incq %r8
movslq %eax, %rdx
cmpq %rdx, %r8
jl 0x10a6d
movl 0x2d18(%r14), %ecx
incq %r13
movslq %ecx, %rdx
cmpq %rdx, %r13
jl 0x10a37
leaq 0xa8(%rsp), %rdi
leaq 0xe0(%rsp), %r15
movq %r15, %rsi
callq 0xafde
movl 0x50(%rsp), %ebx
movq 0xa8(%rsp), %rax
movq 0xb0(%rsp), %rcx
cmpq %rcx, %rax
sete %sil
movq %rax, %rdx
addq $0x4, %rdx
cmpq %rcx, %rdx
sete %dil
orb %sil, %dil
jne 0x10ecc
movl (%rax), %esi
movl (%rdx), %edi
cmpl %edi, %esi
cmovlel %edi, %esi
cmovlq %rdx, %rax
addq $0x4, %rdx
cmpq %rcx, %rdx
jne 0x10eb8
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0xc0(%rsp), %xmm0
callq 0x3260
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x90(%rsp), %xmm0
subsd 0x18(%rsp), %xmm0
addsd 0x25356(%rip), %xmm0    # 0x36260
callq 0x3260
movsd 0x20(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x80(%rsp), %xmm0
callq 0x1a75d
movsd %xmm0, 0x80(%rsp)
jmp 0x109ed
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x10f44
callq 0x3310
leaq 0x30(%rsp), %rdi
callq 0xb366
leaq 0xf8(%rsp), %rdi
callq 0xb366
leaq 0x110(%rsp), %rdi
callq 0xb2a8
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0x10f7a
callq 0x3310
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x10f8c
callq 0x3310
movsd 0x80(%rsp), %xmm0
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x10fe7
movq %rax, %rbx
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x10ff6
callq 0x3310
jmp 0x10ff6
jmp 0x10ff3
movq %rax, %rbx
jmp 0x11003
movq %rax, %rbx
jmp 0x11010
movq %rax, %rbx
jmp 0x11022
jmp 0x10ff3
jmp 0x10ff3
movq %rax, %rbx
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x10fe7
callq 0x3310
leaq 0x30(%rsp), %rdi
callq 0xb366
jmp 0x10ff6
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0xb366
leaq 0x110(%rsp), %rdi
callq 0xb2a8
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0x11022
callq 0x3310
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x11034
callq 0x3310
movq %rbx, %rdi
callq 0x3580