// File: 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
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x1c780
movq %rax, %rdi
callq 0x8fd0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x10(%rbp)
cmpq $0x0, %rax
je 0x17a1e
movq -0x88(%rbp), %rdi
callq 0x1c780
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x1c7a0
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x17a19
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x20(%rbp), %rdi
callq 0x8fd0
movq %rax, %rcx
movq -0x90(%rbp), %rax
cmpq %rcx, %rax
jae 0x1799e
leaq -0x30(%rbp), %rdi
callq 0x1c7c0
movq -0x88(%rbp), %rdi
addq $0x8, %rdi
callq 0x8c90
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x88(%rbp), %rdi
addq $0x8, %rdi
callq 0x8cc0
movq %rax, -0x40(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x8cf0
testb $0x1, %al
jne 0x17857
jmp 0x17895
leaq -0x30(%rbp), %rdi
callq 0x8d30
movq (%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1c7a0
movq %rax, %rcx
movq -0x98(%rbp), %rax
cmpq (%rcx), %rax
jne 0x17888
jmp 0x17895
jmp 0x1788a
leaq -0x30(%rbp), %rdi
callq 0x8d70
jmp 0x17830
movq -0x88(%rbp), %rdi
addq $0x8, %rdi
callq 0x8cc0
movq %rax, -0x48(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x8cf0
testb $0x1, %al
jne 0x178bc
jmp 0x178c1
jmp 0x1798d
movq -0x18(%rbp), %rdi
callq 0x1c7e0
movq %rax, %rdi
callq 0x1c800
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1c7e0
movq %rax, %rdi
callq 0x1c860
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x1c830
testb $0x1, %al
jne 0x178fe
jmp 0x17971
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, %rdi
callq 0x1c890
movq %rax, -0xa0(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x1c8b0
movq -0xa0(%rbp), %rdi
movq (%rax), %rsi
callq 0x1c6c0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
callq 0x1c6e0
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1c7a0
movq (%rax), %rdi
callq 0x1c7e0
movq %rax, %rdi
leaq -0x60(%rbp), %rsi
callq 0x1c8e0
leaq -0x50(%rbp), %rdi
callq 0x1c920
jmp 0x178d6
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1c7a0
movq -0x88(%rbp), %rdi
movq (%rax), %rsi
callq 0x1c940
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x177e4
movq -0x18(%rbp), %rax
movq %rax, -0xa8(%rbp)
cmpq $0x0, %rax
je 0x179bc
movq -0xa8(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x88(%rbp), %rdi
callq 0x1c780
movq -0x88(%rbp), %rdi
movq %rax, -0xb0(%rbp)
callq 0x1c780
movq %rax, %rdi
callq 0x8c90
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x9180
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x1ca00
movq -0xb0(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x1c990
movq %rax, -0x80(%rbp)
jmp 0x1778b
addq $0xb0, %rsp
popq %rbp
retq
nopw (%rax,%rax)