// File: /workspace/github_cpp_makefile_star2_O1/WShabti-Team[P]WShabtiPict/wshabtilib/api/model.cpp
// Function: pictcore::Model::generateMixedOrder()
void Model::generateMixedOrder()
{
    GlobalZerosCount = 0;
    // turn each submodel's output into a PseudoParameter and add to model
    for( SubmodelCollection::iterator im = m_submodels.begin(); im != m_submodels.end(); ++im )
    {
        // make a pseudo-parameter from the submodel, add to this model
        // ignore first arg (order) - it'll be reset below
        Parameter *pseudo = new PseudoParameter( m_order, ++m_lastParamId, *im );
        AddParameter( pseudo );
    }

    // initialize combinations based on contents of m_parameters
    vector<Combination*> vecCombo;

    // sort parameter vector by order to generate parameter combinations
    sort( m_parameters.begin(), m_parameters.end(), GreaterThanByOrder() );

    bool r1 = mapExclusionsToPseudoParameters();
    bool r2 = excludeConflictingParamValues();
    // TODO: do we realy need to derive if the real exclusions were mapped?
    //       exclusions for conflicting param values don't conflict with one another
    if( r1 || r2 ) deriveSubmodelExclusions();

    mapRowSeedsToPseudoParameters();

    // for (each order, from highest to lowest)
    //   for every N-way combinations of these and higher-order parameters
    for( ParamCollection::iterator lastOrder = m_parameters.begin(); lastOrder != m_parameters.end(); /*increment in mid-loop*/ )
    {
        int order = ( *lastOrder )->GetOrder();
        // Get the range of each order
        while( lastOrder != m_parameters.end() && ( *lastOrder )->GetOrder() == order )
            ++lastOrder;
        Combination baseCombo( this );
        choose( m_parameters.begin(), lastOrder, order, order, baseCombo, vecCombo );
    }

    gcd( vecCombo );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
movl $0x0, (%rdi)
leaq 0x50(%rdi), %r15
movq 0x50(%rdi), %r12
cmpq %r15, %r12
je 0xa9f1
movl $0xd8, %edi
callq 0x53c0
movq %rax, %r14
movl 0x108(%rbx), %esi
movl 0x130(%rbx), %edx
incl %edx
movl %edx, 0x130(%rbx)
movq 0x10(%r12), %rcx
movq %rax, %rdi
callq 0xf24c
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc1c4
movq (%r12), %r12
jmp 0xa9ad
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x8(%rbx), %r14
movq 0x10(%rbx), %r15
cmpq %r15, %r14
je 0xaa3c
movq %r15, %rax
subq %r14, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0xe6bd
movq %r14, %rdi
movq %r15, %rsi
callq 0xe7a9
movq %rbx, %rdi
callq 0xb62a
movl %eax, %ebp
movq %rbx, %rdi
callq 0xa5ec
orb %al, %bpl
cmpb $0x1, %bpl
jne 0xaa5f
movq %rbx, %rdi
callq 0xba2c
movq %rbx, %rdi
callq 0xbb82
movq 0x8(%rbx), %r14
movq 0x10(%rbx), %rax
cmpq %rax, %r14
je 0xaacc
leaq 0x30(%rsp), %r15
leaq 0x10(%rsp), %r12
movq (%r14), %rcx
movl 0x28(%rcx), %ebp
movq (%r14), %rcx
cmpl %ebp, 0x28(%rcx)
jne 0xaa95
addq $0x8, %r14
cmpq %rax, %r14
jne 0xaa84
movq %r15, %rdi
movq %rbx, %rsi
callq 0x62c8
movq 0x8(%rbx), %rsi
movq %r12, (%rsp)
movq %rbx, %rdi
movq %r14, %rdx
movl %ebp, %ecx
movl %ebp, %r8d
movq %r15, %r9
callq 0x8d5c
movq %r15, %rdi
callq 0x62ec
movq 0x10(%rbx), %rax
cmpq %rax, %r14
jne 0xaa7e
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x8f5c
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xaaf0
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x53e0
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xab03
jmp 0xab03
jmp 0xab03
movq %rax, %rbx
jmp 0xab15
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x62ec
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xab39
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
jmp 0xab34
movq %rax, %rbx
movl $0xd8, %esi
movq %r14, %rdi
callq 0x53e0
movq %rbx, %rdi
callq 0x56a0
nop