// File: /workspace/github_cpp_makefile_star2_O2/WShabti-Team[P]WShabtiPict/wshabtilib/api/model.cpp
// Function: pictcore::Model::generateRandom()
void Model::generateRandom()
{
    // no support for result rows in this generation mode
    assert( 0 == GetResultParameterCount() );

    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( 1, ++m_lastParamId, *im );
        AddParameter( pseudo );
    }

    // Initialize combinations based on contents of m_parameters
    vector<Combination*> vecCombo;
    for( vector<Parameter*>::iterator ip = m_parameters.begin(); ip != m_parameters.end(); ++ip )
    {
        ( *ip )->SetOrder( 1 );
    }
    bool r1 = mapExclusionsToPseudoParameters();
    bool r2 = excludeConflictingParamValues();
    if( r1 || r2 ) deriveSubmodelExclusions();

    mapRowSeedsToPseudoParameters();

    Combination baseCombo( this );
    choose( m_parameters.begin(), m_parameters.end(), 1, 1, baseCombo, vecCombo );
    gcd( vecCombo );
    if( m_maxRows > 0 && m_maxRows < static_cast<long>( m_results.size() ) )
    {
        m_results.erase( m_results.begin() + m_maxRows, m_results.end() );
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
callq 0xc4cc
testq %rax, %rax
jne 0xb92e
andl $0x0, (%rbx)
leaq 0x50(%rbx), %r15
pushq $0x1
popq %rbp
movq %r15, %r12
movq (%r12), %r12
cmpq %r15, %r12
je 0xb832
movl $0xd8, %edi
callq 0x6440
movq %rax, %r14
movl 0x130(%rbx), %edx
incl %edx
movl %edx, 0x130(%rbx)
movq 0x10(%r12), %rcx
movq %rax, %rdi
movl %ebp, %esi
callq 0xfc02
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc5c2
jmp 0xb7f2
andq $0x0, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
cmpq %rcx, %rax
je 0xb85d
movq (%rax), %rdx
movl $0x1, 0x28(%rdx)
addq $0x8, %rax
jmp 0xb848
movq %rbx, %rdi
callq 0xbbce
movl %eax, %ebp
movq %rbx, %rdi
callq 0xadee
orb %al, %bpl
cmpb $0x1, %bpl
jne 0xb880
movq %rbx, %rdi
callq 0xbee2
movq %rbx, %rdi
callq 0xbfe4
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0x6fa6
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
pushq $0x1
popq %rcx
leaq 0x30(%rsp), %r9
movq %rbx, %rdi
movl %ecx, %r8d
callq 0x9b4c
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x9ce0
movq 0x118(%rbx), %rdi
testq %rdi, %rdi
jle 0xb90d
movq 0xd0(%rbx), %rsi
movq 0xd8(%rbx), %rcx
movq %rcx, %rax
subq %rsi, %rax
pushq $0x18
popq %r8
cqto
idivq %r8
cmpq %rax, %rdi
jge 0xb90d
addq $0xd0, %rbx
imulq $0x18, %rdi, %rax
addq %rax, %rsi
movq %rbx, %rdi
movq %rcx, %rdx
callq 0xc620
leaq 0x30(%rsp), %rdi
callq 0x6fca
leaq 0x10(%rsp), %rdi
callq 0xd978
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x16e8d(%rip), %rdi     # 0x227c2
leaq 0x16cf9(%rip), %rsi     # 0x22635
leaq 0x16eef(%rip), %rcx     # 0x22832
movl $0x380, %edx            # imm = 0x380
callq 0x6310
jmp 0xb953
jmp 0xb962
jmp 0xb962
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x6fca
jmp 0xb965
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xd978
jmp 0xb981
movq %rax, %rbx
movl $0xd8, %esi
movq %r14, %rdi
callq 0x6460
movq %rbx, %rdi
callq 0x66e0
nop