// File: /workspace/github_cpp_makefile_star2_O2/WShabti-Team[P]WShabtiPict/wshabtilib/api/model.cpp
// Function: pictcore::Model::resolvePseudoParams()
void Model::resolvePseudoParams()
{
    // translate pseudo-parameters into collections of actual parameters
    // perform value translation on the translated parameters
    // reverse iteration by index because I'm modifying the vector as I go
    for( size_t index = GetParameters().size(); index--; )
    {
        Parameter* param = GetParameters()[ index ];
        vector<Parameter*>* comps = param->GetComponents();
        if( comps )
        {
            // this parameter is really a pseudoparameter
            for( size_t nComp = 0; nComp < comps->size(); ++nComp )
            {
                // do we have this parameter already?
                // it's fine to skip it as we're running into an exact duplicate
                ParamCollection::iterator p;
                for( p = m_parameters.begin(); p != m_parameters.end(); ++p )
                {
                    if( *p == ( *comps )[ nComp ] ) break;
                }
                if( p != m_parameters.end() ) continue;

                // map values using results in param
                for( ParamResult::iterator ir = param->GetTempResults().begin(); ir != param->GetTempResults().end(); ++ir )
                {
                    size_t nMappedValue = param->GetModel()->GetResults()[ ( *ir ) ][ nComp ];
                    ( *comps )[ nComp ]->GetTempResults().push_back( nMappedValue );
                }
                // add to the model
                AddParameter( ( *comps )[ nComp ] );
            }
            // delete, erase, and otherwise destroy evidence of pseudoparameter
            delete param;
            GetParameters().erase( GetParameters().begin() + index );
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbp
movq 0x10(%rdi), %rbx
subq 0x8(%rdi), %rbx
leaq 0x8(%rdi), %r14
sarq $0x3, %rbx
leaq 0x20(%rsp), %r15
movq %rdi, 0x18(%rsp)
movq %r14, 0x8(%rsp)
subq $0x1, %rbx
jb 0xab12
movq (%r14), %rax
movq (%rax,%rbx,8), %r12
movq (%r12), %rax
movq %r12, %rdi
callq *0x18(%rax)
testq %rax, %rax
je 0xaa1a
movq %rax, %r13
movq %rbx, 0x10(%rsp)
leaq 0x90(%r12), %r14
xorl %ebx, %ebx
movq (%r13), %rax
movq 0x8(%r13), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %rbx
jae 0xaae6
movq 0x8(%rbp), %rcx
movq 0x10(%rbp), %rdx
cmpq %rdx, %rcx
je 0xaa80
movq (%rcx), %rsi
addq $0x8, %rcx
cmpq (%rax,%rbx,8), %rsi
jne 0xaa6c
jmp 0xaade
movq %r14, %rbp
movq (%rbp), %rbp
cmpq %r14, %rbp
je 0xaac9
movq (%r12), %rax
movq %r12, %rdi
callq *0x10(%rax)
movq 0xd0(%rax), %rax
imulq $0x18, 0x10(%rbp), %rcx
movq (%rax,%rcx), %rax
movq (%rax,%rbx,8), %rax
movq %rax, 0x20(%rsp)
movq (%r13), %rax
movq (%rax,%rbx,8), %rdi
movl $0x90, %eax
addq %rax, %rdi
movq %r15, %rsi
callq 0xc5b6
jmp 0xaa83
movq (%r13), %rax
movq (%rax,%rbx,8), %rsi
movq 0x18(%rsp), %rbp
movq %rbp, %rdi
callq 0xc5c2
incq %rbx
jmp 0xaa4c
movq (%r12), %rax
movq %r12, %rdi
callq *0x8(%rax)
movq 0x10(%rsp), %rbx
leaq (,%rbx,8), %rsi
movq 0x8(%rsp), %r14
addq (%r14), %rsi
movq %r14, %rdi
callq 0xc5e6
jmp 0xaa1a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop