// File: /workspace/github_cpp_makefile_star2_O3/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
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
cmpq %rcx, %rax
je 0xb021
xorl %edx, %edx
movq %rax, %rsi
movq (%rsi), %rdi
movzbl 0x3c(%rdi), %edi
addq %rdi, %rdx
addq $0x8, %rsi
cmpq %rcx, %rsi
jne 0xb005
testq %rdx, %rdx
jne 0xb190
movl $0x0, (%rbx)
leaq 0x50(%rbx), %r15
movq 0x50(%rbx), %r12
cmpq %r15, %r12
je 0xb07d
movl $0xd8, %edi
callq 0x53c0
movq %rax, %r14
movl 0x130(%rbx), %edx
incl %edx
movl %edx, 0x130(%rbx)
movq 0x10(%r12), %rcx
movq %rax, %rdi
movl $0x1, %esi
callq 0xf068
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc0a4
movq (%r12), %r12
cmpq %r15, %r12
jne 0xb034
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
cmpq %rcx, %rax
je 0xb0a3
movq (%rax), %rdx
movl $0x1, 0x28(%rdx)
addq $0x8, %rax
jmp 0xb08e
movq %rbx, %rdi
callq 0xb4fe
movl %eax, %ebp
movq %rbx, %rdi
callq 0xa49c
orb %al, %bpl
cmpb $0x1, %bpl
jne 0xb0c6
movq %rbx, %rdi
callq 0xb918
movq %rbx, %rdi
callq 0xba6e
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0x630e
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
leaq 0x30(%rsp), %r9
movq %rbx, %rdi
movl $0x1, %ecx
movl $0x1, %r8d
callq 0x8c4c
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x8e46
movq 0x118(%rbx), %rax
testq %rax, %rax
jle 0xb162
movq 0xd0(%rbx), %rcx
movq 0xd8(%rbx), %rdx
subq %rcx, %rdx
movq %rdx, %rsi
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %rdi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rdi
cmpq %rdi, %rax
jge 0xb162
addq $0xd0, %rbx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rsi
addq %rcx, %rdx
movq %rbx, %rdi
callq 0xe8c0
leaq 0x30(%rsp), %rdi
callq 0x6332
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xb183
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x53e0
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b633(%rip), %rdi     # 0x267ca
leaq 0x1b49f(%rip), %rsi     # 0x2663d
leaq 0x1b695(%rip), %rcx     # 0x2683a
movl $0x380, %edx            # imm = 0x380
callq 0x52c0
jmp 0xb1b5
jmp 0xb1d6
jmp 0xb1d6
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x6332
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xb1eb
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
jmp 0xb1e6
movq %rax, %rbx
jmp 0xb1eb
movq %rax, %rbx
movl $0xd8, %esi
movq %r14, %rdi
callq 0x53e0
movq %rbx, %rdi
callq 0x56a0
nop