// File: WShabti-Team[P]WShabtiPict/wshabtilib/api/model.cpp
// Function: pictcore::Model::generateFixedOrder()
void Model::generateFixedOrder()
{
    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
        Parameter *pseudo = new PseudoParameter( m_order, ++m_lastParamId, *im );
        AddParameter( pseudo );
    }

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

    for( ParamCollection::iterator ip = m_parameters.begin(); ip != m_parameters.end(); ++ip )
    {
        ( *ip )->SetOrder( m_order );
    }
    bool r1 = mapExclusionsToPseudoParameters();
    bool r2 = excludeConflictingParamValues();
    if( r1 || r2 ) deriveSubmodelExclusions();

    mapRowSeedsToPseudoParameters();

    Combination baseCombo( this );
    choose( m_parameters.begin(), m_parameters.end(), m_order, m_order, baseCombo, vecCombo );
    gcd( vecCombo );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
movl $0x0, (%rdi)
addq $0x50, %rdi
callq 0x1ca90
movq %rax, -0x10(%rbp)
movq -0xb8(%rbp), %rdi
addq $0x50, %rdi
callq 0x1caf0
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x1cac0
testb $0x1, %al
jne 0x18dd7
jmp 0x18e8a
movl $0xd8, %edi
callq 0x75e0
movq %rax, %rcx
movq -0xb8(%rbp), %rax
movq %rcx, -0xc8(%rbp)
movq %rcx, -0xd0(%rbp)
movl 0x108(%rax), %ecx
movl %ecx, -0xc0(%rbp)
movl 0x130(%rax), %ecx
incl %ecx
movl %ecx, -0xbc(%rbp)
movl %ecx, 0x130(%rax)
leaq -0x10(%rbp), %rdi
callq 0x1cb20
movq -0xc8(%rbp), %rdi
movl -0xc0(%rbp), %esi
movl -0xbc(%rbp), %edx
movq (%rax), %rcx
callq 0x2d8b0
jmp 0x18e3f
movq -0xb8(%rbp), %rdi
movq -0xd0(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
callq 0x1c940
leaq -0x10(%rbp), %rdi
callq 0x1cc90
jmp 0x18dad
movq -0xd0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0xd8, %esi
callq 0x7600
jmp 0x19045
leaq -0x48(%rbp), %rdi
callq 0x1ccd0
movq -0xb8(%rbp), %rdi
addq $0x8, %rdi
callq 0x8c90
movq %rax, -0x50(%rbp)
movq -0xb8(%rbp), %rdi
addq $0x8, %rdi
callq 0x8cc0
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x8cf0
testb $0x1, %al
jne 0x18ece
jmp 0x18f0f
leaq -0x50(%rbp), %rdi
callq 0x8d30
movq %rax, %rcx
movq -0xb8(%rbp), %rax
movq (%rcx), %rdi
movl 0x108(%rax), %esi
callq 0x1ce00
jmp 0x18ef1
jmp 0x18ef3
leaq -0x50(%rbp), %rdi
callq 0x8d70
jmp 0x18ea7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1903c
movq -0xb8(%rbp), %rdi
callq 0x1a270
movb %al, -0xd1(%rbp)
jmp 0x18f23
movq -0xb8(%rbp), %rdi
movb -0xd1(%rbp), %al
andb $0x1, %al
movb %al, -0x59(%rbp)
callq 0x18300
movb %al, -0xd2(%rbp)
jmp 0x18f42
movb -0xd2(%rbp), %al
andb $0x1, %al
movb %al, -0x5a(%rbp)
testb $0x1, -0x59(%rbp)
jne 0x18f59
testb $0x1, -0x5a(%rbp)
je 0x18f69
movq -0xb8(%rbp), %rdi
callq 0x1aa10
jmp 0x18f67
jmp 0x18f69
movq -0xb8(%rbp), %rdi
callq 0x1ac90
jmp 0x18f77
movq -0xb8(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x8b60
jmp 0x18f8c
movq -0xb8(%rbp), %rdi
addq $0x8, %rdi
movq %rdi, -0xe0(%rbp)
callq 0x8c90
movq -0xe0(%rbp), %rdi
movq %rax, -0xa8(%rbp)
callq 0x8cc0
movq -0xb8(%rbp), %rdi
movq %rax, -0xb0(%rbp)
movl 0x108(%rdi), %r8d
movq -0xa8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
movq %rsp, %rax
leaq -0x48(%rbp), %rcx
movq %rcx, (%rax)
leaq -0xa0(%rbp), %r9
movl %r8d, %ecx
callq 0x15100
jmp 0x18ff4
movq -0xb8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x15380
jmp 0x19006
leaq -0xa0(%rbp), %rdi
callq 0x8bd0
leaq -0x48(%rbp), %rdi
callq 0x1cd40
addq $0xf0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x8bd0
leaq -0x48(%rbp), %rdi
callq 0x1cd40
movq -0x28(%rbp), %rdi
callq 0x79d0
nop