// File: /workspace/github_cpp_makefile_star2_O1/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 $0x118, %rsp            # imm = 0x118
movsd %xmm0, 0x78(%rsp)
movl %esi, %r8d
movq 0x2cd0(%rdi), %rax
movq %rdi, (%rsp)
movq 0x2cd8(%rdi), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
testl %ecx, %ecx
jle 0x1075a
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
xorl %esi, %esi
xorl %edx, %edx
addl (%rax,%rsi,4), %edx
incq %rsi
cmpq %rsi, %rcx
jne 0x1074d
jmp 0x1075c
xorl %edx, %edx
movq (%rsp), %rax
addl 0x2bc8(%rax), %r8d
movslq 0x2d1c(%rax), %rax
movslq %edx, %rsi
imulq %rax, %rsi
leaq 0x20(%rsp), %rdx
movl $0x1, (%rdx)
movl %r8d, %ebx
leaq 0x90(%rsp), %r15
leaq 0xb8(%rsp), %rcx
movq %r15, %rdi
callq 0xed32
leaq 0xb8(%rsp), %rdi
movq %r15, %rsi
callq 0x6b8e
movslq %ebx, %r14
leaq 0xf0(%rsp), %rdi
leaq 0x20(%rsp), %rdx
movq %r14, %rsi
callq 0xb4ea
leaq 0xd8(%rsp), %rdi
leaq 0x20(%rsp), %rdx
movq %r14, 0x18(%rsp)
movq %r14, %rsi
callq 0xb5ac
testl %ebx, %ebx
movl %ebx, 0x58(%rsp)
jle 0x109b5
movl %ebx, %eax
movq %rax, 0x10(%rsp)
xorl %r14d, %r14d
leaq 0x60(%rsp), %r12
leaq 0x20(%rsp), %rbp
movq (%rsp), %rax
movslq 0x2d1c(%rax), %rsi
movq %r12, %rdi
leaq 0xf(%rsp), %rdx
callq 0xb5ac
movq 0xf0(%rsp), %rax
leaq (%r14,%r14,2), %r13
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movups (%rax,%r13,8), %xmm0
movq 0x10(%rax,%r13,8), %rcx
movaps 0x60(%rsp), %xmm1
movups %xmm1, (%rax,%r13,8)
movq 0x70(%rsp), %rdx
movq %rdx, 0x10(%rax,%r13,8)
movq 0x30(%rsp), %rax
movq %rcx, 0x30(%rsp)
movaps 0x20(%rsp), %xmm1
movaps %xmm0, 0x20(%rsp)
movaps %xmm1, 0x60(%rsp)
movq %rax, 0x70(%rsp)
movq %rbp, %rdi
callq 0xb634
movq %r12, %rdi
callq 0xb634
movq (%rsp), %rax
movslq 0x2d1c(%rax), %rsi
movq %rbp, %rdi
movq %r12, %rdx
callq 0x6b04
movq 0xd8(%rsp), %rax
movq (%rax,%r13,8), %rdi
movapd 0x20(%rsp), %xmm0
movupd 0x8(%rax,%r13,8), %xmm1
movupd %xmm0, (%rax,%r13,8)
movq 0x30(%rsp), %rcx
movq %rcx, 0x10(%rax,%r13,8)
movq %rdi, 0x20(%rsp)
movupd %xmm1, 0x28(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
testq %rdi, %rdi
je 0x108e7
callq 0x3310
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x108f6
callq 0x3310
movq (%rsp), %rax
cmpl $0x0, 0x2d1c(%rax)
jle 0x109a3
xorl %ebx, %ebx
xorl %r15d, %r15d
movq (%rsp), %rax
movq 0x2d20(%rax), %rax
movslq (%rax,%r15,4), %rsi
movq %rbp, %rdi
movq %r12, %rdx
callq 0x6b04
movq 0xf0(%rsp), %rax
movq (%rax,%r13,8), %rax
movq (%rax,%rbx), %rdi
movapd 0x20(%rsp), %xmm0
movupd 0x8(%rax,%rbx), %xmm1
movupd %xmm0, (%rax,%rbx)
movq 0x30(%rsp), %rcx
movq %rcx, 0x10(%rax,%rbx)
movq %rdi, 0x20(%rsp)
movupd %xmm1, 0x28(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
testq %rdi, %rdi
je 0x10979
callq 0x3310
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x10988
callq 0x3310
incq %r15
movq (%rsp), %rax
movslq 0x2d1c(%rax), %rax
addq $0x18, %rbx
cmpq %rax, %r15
jl 0x1090c
incq %r14
cmpq 0x10(%rsp), %r14
movl 0x58(%rsp), %ebx
jne 0x107fd
movq (%rsp), %rax
movslq 0x2d18(%rax), %r12
leaq 0x60(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq 0x18(%rsp), %rsi
callq 0x6b04
leaq 0x20(%rsp), %rdi
leaq 0x60(%rsp), %rdx
leaq 0x5f(%rsp), %rcx
movq %r12, %rsi
callq 0xb674
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x109fa
callq 0x3310
movq (%rsp), %rax
movslq 0x2d18(%rax), %rsi
leaq 0x60(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6b04
movq (%rsp), %rax
cmpl $0x0, 0x2d18(%rax)
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movsd %xmm0, 0xb0(%rsp)
xorpd %xmm1, %xmm1
jle 0x10cdc
movsd %xmm1, 0x10(%rsp)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %r15d, %r15d
movapd %xmm0, %xmm1
mulsd 0x78(%rsp), %xmm1
movsd %xmm1, 0x80(%rsp)
movq (%rsp), %rax
cmpl $0x0, 0x2d1c(%rax)
jle 0x10cc3
leaq (%r15,%r15,2), %rax
movq %rax, 0x48(%rsp)
leaq (,%r15,8), %rax
leaq (%rax,%rax,2), %rax
movq %rax, 0x88(%rsp)
xorl %ebp, %ebp
movq (%rsp), %rax
movq 0x2cd0(%rax), %rax
cmpl $0x0, (%rax,%r15,4)
jle 0x10cac
movl %ecx, 0x40(%rsp)
movslq %ecx, %rax
leaq 0x4(,%rax,4), %rbx
leaq (,%rbp,2), %rax
addq %rbp, %rax
movq %rax, 0x50(%rsp)
leaq (,%rbp,8), %rax
leaq (%rax,%rax,2), %r13
xorl %r12d, %r12d
movq (%rsp), %rax
movq 0x2d00(%rax), %rax
movq 0x48(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x50(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq (%rax,%r12,4), %rax
testq %rax, %rax
je 0x10c8a
movq 0x90(%rsp), %rcx
addq %rbx, %rcx
movslq (%rcx,%r12,4), %rcx
movq 0xf0(%rsp), %rdx
leaq (%rcx,%rcx,2), %rcx
movq -0x18(%rdx,%rcx,8), %rcx
movq (%rcx,%r13), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl -0x4(%rcx,%rax,4), %xmm0
movq (%rsp), %r14
addsd 0x2c50(%r14), %xmm0
callq 0x3290
movq 0x90(%rsp), %rax
addq %rbx, %rax
movslq (%rax,%r12,4), %rax
movq 0xd8(%rsp), %rcx
leaq (%rax,%rax,2), %rax
movq -0x18(%rcx,%rax,8), %rax
xorps %xmm2, %xmm2
cvtsi2sdl (%rax,%rbp,4), %xmm2
movq 0x2d20(%r14), %rax
xorps %xmm1, %xmm1
cvtsi2sdl (%rax,%rbp,4), %xmm1
movsd %xmm0, 0x18(%rsp)
mulsd 0x2c50(%r14), %xmm1
addsd %xmm2, %xmm1
movapd %xmm1, %xmm0
callq 0x3290
movq 0x90(%rsp), %rax
addq %rbx, %rax
movslq (%rax,%r12,4), %rcx
movq 0xf0(%rsp), %rdx
leaq (%rcx,%rcx,2), %rcx
movq -0x18(%rdx,%rcx,8), %rcx
movq 0x2d00(%r14), %rdx
movq 0x88(%rsp), %r14
movq (%rdx,%r14), %rdx
movq (%rdx,%r13), %rdx
movslq (%rdx,%r12,4), %rdx
movq (%rcx,%r13), %rcx
incl -0x4(%rcx,%rdx,4)
movslq (%rax,%r12,4), %rcx
movq 0xd8(%rsp), %rdx
leaq (%rcx,%rcx,2), %rcx
movq -0x18(%rdx,%rcx,8), %rcx
incl (%rcx,%rbp,4)
movsd 0x18(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rcx
movslq (%rax,%r12,4), %rax
movq (%rcx,%r14), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl -0x4(%rcx,%rax,4), %xmm0
addsd 0x78(%rsp), %xmm0
callq 0x3290
movsd %xmm0, 0x18(%rsp)
movq 0x60(%rsp), %rax
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%r15,4), %xmm0
addsd 0x80(%rsp), %xmm0
callq 0x3290
movsd 0x18(%rsp), %xmm2
subsd %xmm0, %xmm2
movsd 0xb0(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
addsd %xmm2, %xmm1
movsd %xmm1, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x90(%rsp), %rcx
addq %rbx, %rcx
movslq (%rcx,%r12,4), %rcx
movq (%rax,%r14), %rax
incl -0x4(%rax,%rcx,4)
movq 0x60(%rsp), %rax
incl (%rax,%r15,4)
incq %r12
movq (%rsp), %rax
movq 0x2cd0(%rax), %rax
movslq (%rax,%r15,4), %rax
cmpq %rax, %r12
jl 0x10ace
movl 0x40(%rsp), %ecx
addl %r12d, %ecx
incq %rbp
movq (%rsp), %rax
movslq 0x2d1c(%rax), %rax
cmpq %rax, %rbp
jl 0x10a8a
incq %r15
movq (%rsp), %rax
movslq 0x2d18(%rax), %rax
cmpq %rax, %r15
jl 0x10a5a
jmp 0x10ce2
movsd %xmm1, 0x10(%rsp)
callq 0x3290
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0xa8(%rsp)
movsd 0x26562(%rip), %xmm0    # 0x37260
movsd 0xb0(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x108(%rsp)
leaq 0xb8(%rsp), %r15
movapd %xmm1, %xmm0
mulsd 0x78(%rsp), %xmm0
movsd %xmm0, 0x80(%rsp)
movl 0x58(%rsp), %ebx
movq 0x90(%rsp), %rax
cmpl $0x0, (%rax)
je 0x11291
movq %r15, %rdi
movl %ebx, %esi
callq 0x1c517
movq 0xb8(%rsp), %rax
cmpl $0x0, (%rax)
je 0x11291
movq (%rsp), %rax
cmpl $0x0, 0x2d18(%rax)
jle 0x111c5
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %r13d, %r13d
movq (%rsp), %rax
cmpl $0x0, 0x2d1c(%rax)
jle 0x111ae
leaq (,%r13,2), %rsi
addq %r13, %rsi
leaq (,%r13,8), %rax
leaq (%rax,%rax,2), %rax
movq %rax, 0x110(%rsp)
movq $0x0, 0x48(%rsp)
movq %rsi, 0x50(%rsp)
movq (%rsp), %rax
movq 0x2cd0(%rax), %rax
cmpl $0x0, (%rax,%r13,4)
jle 0x1118d
movl %ecx, 0xd4(%rsp)
movslq %ecx, %rax
leaq 0x4(,%rax,4), %rbp
movq 0x48(%rsp), %rax
leaq (%rax,%rax,2), %rcx
movq %rcx, 0x18(%rsp)
leaq (,%rax,8), %rax
leaq (%rax,%rax,2), %rax
movq %rax, 0x88(%rsp)
xorl %ebx, %ebx
movq 0xb8(%rsp), %rcx
addq %rbp, %rcx
movq 0x90(%rsp), %rax
addq %rbp, %rax
movslq (%rax,%rbx,4), %rdx
cmpl %edx, (%rcx,%rbx,4)
je 0x11169
movq (%rsp), %rcx
movq 0x2d00(%rcx), %rcx
movq (%rcx,%rsi,8), %rcx
movq 0x18(%rsp), %rdi
movq (%rcx,%rdi,8), %rcx
cmpl $0x0, (%rcx,%rbx,4)
je 0x10fa9
movq 0xd8(%rsp), %rsi
leaq (%rdx,%rdx,2), %rdx
movq -0x18(%rsi,%rdx,8), %rdx
movq 0x48(%rsp), %r15
decl (%rdx,%r15,4)
movslq (%rax,%rbx,4), %rdx
movq 0xf0(%rsp), %rsi
leaq (%rdx,%rdx,2), %rdx
movq -0x18(%rsi,%rdx,8), %rdx
movslq (%rcx,%rbx,4), %rdi
movq 0x88(%rsp), %r8
movq (%rdx,%r8), %rdx
decl -0x4(%rdx,%rdi,4)
movslq (%rax,%rbx,4), %rax
leaq (%rax,%rax,2), %rax
movq -0x18(%rsi,%rax,8), %rax
movslq (%rcx,%rbx,4), %rcx
movq (%rax,%r8), %rax
xorps %xmm0, %xmm0
cvtsi2sdl -0x4(%rax,%rcx,4), %xmm0
movq (%rsp), %r14
addsd 0x2c50(%r14), %xmm0
callq 0x3290
movq 0x90(%rsp), %rax
addq %rbp, %rax
movslq (%rax,%rbx,4), %rax
movq 0xd8(%rsp), %rcx
leaq (%rax,%rax,2), %rax
movq -0x18(%rcx,%rax,8), %rax
cvtsi2sdl (%rax,%r15,4), %xmm2
movq 0x2d20(%r14), %rax
xorps %xmm1, %xmm1
cvtsi2sdl (%rax,%r15,4), %xmm1
movsd %xmm0, 0x40(%rsp)
mulsd 0x2c50(%r14), %xmm1
addsd %xmm2, %xmm1
movapd %xmm1, %xmm0
callq 0x3290
movsd 0x40(%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 0x20(%rsp), %rax
movq 0x90(%rsp), %rcx
addq %rbp, %rcx
movslq (%rcx,%rbx,4), %rdx
movq 0x50(%rsp), %rsi
movq (%rax,%rsi,8), %rax
decl -0x4(%rax,%rdx,4)
movslq (%rcx,%rbx,4), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl -0x4(%rax,%rcx,4), %xmm0
addsd 0x78(%rsp), %xmm0
callq 0x3290
movsd %xmm0, 0x40(%rsp)
movq 0x60(%rsp), %rax
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%r13,4), %xmm0
addsd 0x80(%rsp), %xmm0
callq 0x3290
movq 0x50(%rsp), %rsi
movsd 0x40(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movq (%rsp), %rax
movq 0x2d00(%rax), %rax
movq (%rax,%rsi,8), %rax
movq 0x18(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq (%rax,%rbx,4), %rax
testq %rax, %rax
je 0x11169
movq 0xb8(%rsp), %rcx
addq %rbp, %rcx
movslq (%rcx,%rbx,4), %rcx
movq 0xf0(%rsp), %rdx
leaq (%rcx,%rcx,2), %rcx
movq -0x18(%rdx,%rcx,8), %rcx
movq 0x88(%rsp), %r12
movq (%rcx,%r12), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl -0x4(%rcx,%rax,4), %xmm0
movq (%rsp), %r14
addsd 0x2c50(%r14), %xmm0
callq 0x3290
movq 0xb8(%rsp), %rax
addq %rbp, %rax
movslq (%rax,%rbx,4), %rax
movq 0xd8(%rsp), %rcx
leaq (%rax,%rax,2), %rax
movq -0x18(%rcx,%rax,8), %rax
movq 0x48(%rsp), %r15
cvtsi2sdl (%rax,%r15,4), %xmm2
movq 0x2d20(%r14), %rax
xorps %xmm1, %xmm1
cvtsi2sdl (%rax,%r15,4), %xmm1
movsd %xmm0, 0x40(%rsp)
mulsd 0x2c50(%r14), %xmm1
addsd %xmm2, %xmm1
movapd %xmm1, %xmm0
callq 0x3290
movq 0xb8(%rsp), %rax
addq %rbp, %rax
movslq (%rax,%rbx,4), %rcx
movq 0xf0(%rsp), %rdx
leaq (%rcx,%rcx,2), %rcx
movq -0x18(%rdx,%rcx,8), %rcx
movq 0x2d00(%r14), %rdx
movq 0x110(%rsp), %r14
movq (%rdx,%r14), %rdx
movq (%rdx,%r12), %rdx
movslq (%rdx,%rbx,4), %rdx
movq (%rcx,%r12), %rcx
incl -0x4(%rcx,%rdx,4)
movslq (%rax,%rbx,4), %rcx
movq 0xd8(%rsp), %rdx
leaq (%rcx,%rcx,2), %rcx
movq -0x18(%rdx,%rcx,8), %rcx
incl (%rcx,%r15,4)
movsd 0x40(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rcx
movslq (%rax,%rbx,4), %rax
movq (%rcx,%r14), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl -0x4(%rcx,%rax,4), %xmm0
addsd 0x78(%rsp), %xmm0
callq 0x3290
movsd %xmm0, 0x40(%rsp)
movq 0x60(%rsp), %rax
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%r13,4), %xmm0
addsd 0x80(%rsp), %xmm0
callq 0x3290
movq 0x50(%rsp), %rsi
movsd 0x40(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0xb8(%rsp), %rcx
addq %rbp, %rcx
movslq (%rcx,%rbx,4), %rcx
movq (%rax,%r14), %rax
incl -0x4(%rax,%rcx,4)
movq 0x60(%rsp), %rax
incl (%rax,%r13,4)
incq %rbx
movq (%rsp), %rax
movq 0x2cd0(%rax), %rax
movslq (%rax,%r13,4), %rax
cmpq %rax, %rbx
jl 0x10e02
movl 0xd4(%rsp), %ecx
addl %ebx, %ecx
movq 0x48(%rsp), %rdi
incq %rdi
movq (%rsp), %rax
movslq 0x2d1c(%rax), %rax
movq %rdi, 0x48(%rsp)
cmpq %rax, %rdi
jl 0x10db6
incq %r13
movq (%rsp), %rax
movslq 0x2d18(%rax), %rax
cmpq %rax, %r13
jl 0x10d78
leaq 0x90(%rsp), %rdi
leaq 0xb8(%rsp), %r15
movq %r15, %rsi
callq 0xb2d4
movl 0x58(%rsp), %ebx
movq 0x90(%rsp), %rdx
movq 0x98(%rsp), %rax
cmpq %rax, %rdx
sete %sil
movq %rdx, %rcx
addq $0x4, %rcx
cmpq %rax, %rcx
sete %dil
orb %sil, %dil
je 0x11210
movq %rdx, %rsi
jmp 0x11228
movl (%rdx), %edi
movq %rcx, %rsi
cmpl (%rcx), %edi
jl 0x1121c
movq %rdx, %rsi
addq $0x4, %rcx
movq %rsi, %rdx
cmpq %rax, %rcx
jne 0x11210
xorps %xmm0, %xmm0
cvtsi2sdl (%rsi), %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0x108(%rsp), %xmm0
callq 0x3260
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0xb0(%rsp), %xmm0
subsd 0x50(%rsp), %xmm0
addsd 0x25ffa(%rip), %xmm0    # 0x37260
callq 0x3260
movsd 0x18(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0xa8(%rsp), %xmm0
callq 0x1aa59
movsd %xmm0, 0xa8(%rsp)
jmp 0x10d33
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x112a0
callq 0x3310
leaq 0x20(%rsp), %rdi
callq 0xb634
leaq 0xd8(%rsp), %rdi
callq 0xb634
leaq 0xf0(%rsp), %rdi
callq 0xb572
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x112d6
callq 0x3310
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x112e8
callq 0x3310
movsd 0xa8(%rsp), %xmm0
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x11343
movq %rax, %rbx
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x11352
callq 0x3310
jmp 0x11352
jmp 0x1134f
movq %rax, %rbx
jmp 0x1135f
movq %rax, %rbx
jmp 0x1136c
movq %rax, %rbx
jmp 0x1137e
jmp 0x1134f
jmp 0x1134f
movq %rax, %rbx
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x11343
callq 0x3310
leaq 0x20(%rsp), %rdi
callq 0xb634
jmp 0x11352
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0xb634
leaq 0xf0(%rsp), %rdi
callq 0xb572
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x1137e
callq 0x3310
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x11390
callq 0x3310
movq %rbx, %rdi
callq 0x3580