// File: /workspace/github_cpp_makefile_star2_O1/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 0xb152
xorl %edx, %edx
movq (%rax), %rsi
movzbl 0x3c(%rsi), %esi
addq %rsi, %rdx
addq $0x8, %rax
cmpq %rcx, %rax
jne 0xb136
testq %rdx, %rdx
jne 0xb2be
movl $0x0, (%rbx)
leaq 0x50(%rbx), %r15
movq 0x50(%rbx), %r12
cmpq %r15, %r12
je 0xb1a3
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 0xf24c
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc1c4
movq (%r12), %r12
jmp 0xb160
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
cmpq %rcx, %rax
je 0xb1d1
movq (%rax), %rdx
movl $0x1, 0x28(%rdx)
addq $0x8, %rax
jmp 0xb1bc
movq %rbx, %rdi
callq 0xb62a
movl %eax, %ebp
movq %rbx, %rdi
callq 0xa5ec
orb %al, %bpl
cmpb $0x1, %bpl
jne 0xb1f4
movq %rbx, %rdi
callq 0xba2c
movq %rbx, %rdi
callq 0xbb82
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0x62c8
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 0x8d5c
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x8f5c
movq 0x118(%rbx), %rax
testq %rax, %rax
jle 0xb290
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 0xb290
addq $0xd0, %rbx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rsi
addq %rcx, %rdx
movq %rbx, %rdi
callq 0xea66
leaq 0x30(%rsp), %rdi
callq 0x62ec
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xb2b1
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x53e0
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b505(%rip), %rdi     # 0x267ca
leaq 0x1b371(%rip), %rsi     # 0x2663d
leaq 0x1b567(%rip), %rcx     # 0x2683a
movl $0x380, %edx            # imm = 0x380
callq 0x52c0
jmp 0xb2e3
jmp 0xb2f2
jmp 0xb2f2
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x62ec
jmp 0xb2f5
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xb319
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
jmp 0xb314
movq %rax, %rbx
movl $0xd8, %esi
movq %r14, %rdi
callq 0x53e0
movq %rbx, %rdi
callq 0x56a0
nop