// File: /workspace/github_cpp_makefile_star2_O2/WShabti-Team[P]WShabtiPict/wshabtilib/api/model.cpp
// Function: pictcore::Model::mapRowSeedsToPseudoParameters()
void Model::mapRowSeedsToPseudoParameters()
{
    // for each pseudoparameter
    for( size_t index = 0; index < GetParameters().size(); ++index )
    {
        Parameter* param = GetParameters()[ index ];
        vector<Parameter*>* comps = param->GetComponents();
        if( comps )
        {
            // Prepare a temporary collection for all seeds being added
            RowSeedCollection newSeeds;
            // This parameter is really a pseudoparameter
            for( RowSeedCollection::iterator iseeds = m_rowSeeds.begin(); iseeds != m_rowSeeds.end(); )
            {
                // partition the seed terms into related, unrelated (to pseudoparam)
                RowSeed relatedTerms, unrelatedTerms;
                for( RowSeed::iterator iseed = iseeds->begin(); iseed != iseeds->end(); ++iseed )
                {
                    if( find( comps->begin(), comps->end(), iseed->first ) == comps->end() )
                    {
                        unrelatedTerms.insert( *iseed );
                    }
                    else
                    {
                        relatedTerms.insert( *iseed );
                    }
                }
                // if any of seed's terms relate to underlying parameters
                if( !relatedTerms.empty() )
                {
                    // Get rid of the seed, since we'll replace it
                    m_rowSeeds.erase( iseeds++ );
                    // for each value of the pseudoparameter
                    for( int vidx = 0; vidx < param->GetValueCount(); ++vidx )
                    {
                        RowSeed::iterator irel;
                        for( irel = relatedTerms.begin(); irel != relatedTerms.end(); ++irel )
                        {
                            vector<Parameter*>::iterator ip = find( comps->begin(), comps->end(), irel->first );
                            if( comps->end() == ip )
                            {
                                break;
                            }
                            int nParam = static_cast<int>( distance( comps->begin(), ip ) );
                            size_t nRealVal = param->GetModel()->GetResults()[ vidx ][ nParam ];
                            if( nRealVal != irel->second )
                            {
                                break;
                            }
                        }
                        // if value is excluded in overlapping underlying params
                        if( relatedTerms.end() == irel )
                        {
                            // generate a new seed using unrelated + this pseudo/value
                            RowSeed newSeed( unrelatedTerms );
                            newSeed.insert( make_pair( param, vidx ) );
                            // Put it into a temporary collection so we don't hit it again on this iteration
                            newSeeds.push_back( newSeed );
                        }
                    }
                }
                else
                {
                    // no new seed, just increment loop iterator
                    ++iseeds;
                }
            }

            // copy all new seeds to the main collection
            __push_back( m_rowSeeds, newSeeds.begin(), newSeeds.end() );
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, 0x50(%rsp)
leaq 0x68(%rdi), %rax
movq %rax, (%rsp)
xorl %edx, %edx
movq 0x50(%rsp), %rcx
movq 0x8(%rcx), %rax
movq 0x10(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %rdx
jae 0xc22e
movq %rdx, 0x58(%rsp)
movq (%rax,%rdx,8), %r14
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
testq %rax, %rax
je 0xc221
movq %rax, %r15
leaq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %rax, 0x8(%rsp)
andq $0x0, 0x18(%rsp)
movq (%rsp), %rax
movq (%rax), %r12
cmpq (%rsp), %r12
je 0xc203
andl $0x0, 0x28(%rsp)
andq $0x0, 0x30(%rsp)
leaq 0x28(%rsp), %rax
movq %rax, 0x38(%rsp)
movq %rax, 0x40(%rsp)
andq $0x0, 0x48(%rsp)
andl $0x0, 0x70(%rsp)
andq $0x0, 0x78(%rsp)
leaq 0x70(%rsp), %rax
movq %rax, 0x80(%rsp)
movq %rax, 0x88(%rsp)
andq $0x0, 0x90(%rsp)
movq 0x28(%r12), %r13
leaq 0x18(%r12), %rbp
cmpq %rbp, %r13
je 0xc0f5
movq (%r15), %rdi
movq 0x8(%r15), %rsi
leaq 0x20(%r13), %rbx
movq %rbx, %rdx
callq 0x707b
leaq 0x68(%rsp), %rdi
cmpq 0x8(%r15), %rax
je 0xc0e0
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0xf744
movq %r13, %rdi
callq 0x6500
movq %rax, %r13
jmp 0xc0b8
cmpq $0x0, 0x48(%rsp)
movq (%r12), %rax
movq %rax, 0x60(%rsp)
je 0xc1e5
movq (%rsp), %rdi
movq %r12, %rsi
callq 0xc76e
xorl %ebp, %ebp
movslq 0x38(%r14), %rax
cmpq %rax, %rbp
jge 0xc1e5
movq 0x38(%rsp), %rbx
leaq 0x28(%rsp), %rax
cmpq %rax, %rbx
je 0xc194
movq (%r15), %rdi
movq 0x8(%r15), %rsi
leaq 0x20(%rbx), %rdx
callq 0x707b
movq %rax, %r13
cmpq %rax, 0x8(%r15)
je 0xc18a
movq (%r15), %r12
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
subq %r12, %r13
movq 0xd0(%rax), %rax
imulq $0x18, %rbp, %rcx
movq (%rax,%rcx), %rax
shlq $0x1d, %r13
sarq $0x1d, %r13
movslq 0x28(%rbx), %rcx
cmpq %rcx, (%rax,%r13)
jne 0xc18a
movq %rbx, %rdi
callq 0x6500
movq %rax, %rbx
jmp 0xc12a
leaq 0x28(%rsp), %rax
cmpq %rbx, %rax
jne 0xc1dd
leaq 0xa8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x68(%rsp), %rsi
callq 0xd774
movq %r14, 0x98(%rsp)
movl %ebp, 0xa0(%rsp)
movq %rbx, %rdi
leaq 0x98(%rsp), %rsi
callq 0xf598
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0xc626
movq %rbx, %rdi
callq 0xd164
incq %rbp
jmp 0xc118
leaq 0x68(%rsp), %rdi
callq 0xd164
leaq 0x20(%rsp), %rdi
callq 0xd164
movq 0x60(%rsp), %r12
jmp 0xc05b
movq 0x8(%rsp), %rsi
movq (%rsp), %rdi
leaq 0x8(%rsp), %rbx
movq %rbx, %rdx
callq 0xc77c
movq %rbx, %rdi
callq 0xd90e
movq 0x58(%rsp), %rdx
incq %rdx
jmp 0xc004
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xc278
jmp 0xc249
jmp 0xc261
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0xd164
jmp 0xc264
jmp 0xc261
jmp 0xc261
jmp 0xc261
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0xd164
leaq 0x20(%rsp), %rdi
callq 0xd164
leaq 0x8(%rsp), %rdi
callq 0xd90e
movq %rbx, %rdi
callq 0x66e0