// File: /workspace/github_cpp_makefile_star2_O3/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 0xa8ab
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 0xf068
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc0a4
movq (%r12), %r12
jmp 0xa867
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x8(%rbx), %r14
movq 0x10(%rbx), %r15
cmpq %r15, %r14
je 0xa8f6
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 0xe53b
movq %r14, %rdi
movq %r15, %rsi
callq 0xe627
movq %rbx, %rdi
callq 0xb4fe
movl %eax, %ebp
movq %rbx, %rdi
callq 0xa49c
orb %al, %bpl
cmpb $0x1, %bpl
jne 0xa919
movq %rbx, %rdi
callq 0xb918
movq %rbx, %rdi
callq 0xba6e
movq 0x8(%rbx), %r14
movq 0x10(%rbx), %rax
cmpq %rax, %r14
je 0xa986
leaq 0x30(%rsp), %r15
leaq 0x10(%rsp), %r12
movq (%r14), %rcx
movl 0x28(%rcx), %ebp
movq (%r14), %rcx
cmpl %ebp, 0x28(%rcx)
jne 0xa94f
addq $0x8, %r14
cmpq %rax, %r14
jne 0xa93e
movq %r15, %rdi
movq %rbx, %rsi
callq 0x630e
movq 0x8(%rbx), %rsi
movq %r12, (%rsp)
movq %rbx, %rdi
movq %r14, %rdx
movl %ebp, %ecx
movl %ebp, %r8d
movq %r15, %r9
callq 0x8c4c
movq %r15, %rdi
callq 0x6332
movq 0x10(%rbx), %rax
cmpq %rax, %r14
jne 0xa938
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x8e46
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xa9aa
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x53e0
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa9bd
jmp 0xa9bd
jmp 0xa9bd
movq %rax, %rbx
jmp 0xa9cf
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x6332
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xa9f3
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
jmp 0xa9ee
movq %rax, %rbx
movl $0xd8, %esi
movq %r14, %rdi
callq 0x53e0
movq %rbx, %rdi
callq 0x56a0
nop