LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/combination.cpp
// Function: pictcore::Combination::SetOpen(int)
void Combination::SetOpen( int index )
{
    assert( index < m_range );
    if( OPEN != m_bitvec[ index ] )
    {
        m_bitvec[ index ] = OPEN;
        ++m_openCount;
        ++m_model->GlobalZerosCount;
    }
}

// Assembly:
cmpl %esi, 0x28(%rdi)
jle 0x62ee
movq 0x20(%rdi), %rax
movslq %esi, %rcx
cmpb $0x0, (%rax,%rcx)
je 0x62ed
movb $0x0, (%rax,%rcx)
incl 0x2c(%rdi)
movq 0x38(%rdi), %rax
incl (%rax)
retq
pushq %rax
leaq 0x1fe23(%rip), %rdi     # 0x26119
leaq 0x1fd22(%rip), %rsi     # 0x2601f
leaq 0x1fe25(%rip), %rcx     # 0x26129
movl $0xf9, %edx
callq 0x52c0
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/deriver.cpp
// Function: pictcore::ExclusionDeriver::AddExclusion(pictcore::Exclusion&, bool)
pair<ExclusionCollection::iterator, bool> ExclusionDeriver::AddExclusion( Exclusion& excl, bool checkIfInCollection )
{
    // if there's already an exclusion that's broader, do not add
    if( checkIfInCollection )
    {
        if( alreadyInCollection( excl ) )
        {
            return make_pair( m_exclusions.end(), false );
        }
    }

    // now add
    pair<ExclusionCollection::iterator, bool> result = m_exclusions.insert( excl );
    if( result.second )
    {
        // later, we will attempt to find sorted lists so 
        // the lookup structure should keep them sorted, too
        sort( excl.lbegin(), excl.lend() );
        m_lookup.insert( excl.GetList() );
    }

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
je 0x6545
movq 0x30(%r14), %r15
movq 0x38(%r14), %r12
cmpq %r12, %r15
je 0x6519
movq %r12, %rax
subq %r15, %rax
sarq $0x4, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x8152
movq %r15, %rdi
movq %r12, %rsi
callq 0x8205
leaq 0x30(%r14), %r15
leaq 0xb0(%rbx), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x72a2
testq %rax, %rax
jne 0x65ad
movq 0x30(%r14), %rdi
movq 0x38(%r14), %rsi
callq 0x7358
testb %al, %al
jne 0x6524
leaq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x7f84
movq %rax, %r15
movl %edx, %ebp
testb $0x1, %dl
je 0x65b6
leaq 0x30(%r14), %r12
movq 0x30(%r14), %r13
movq 0x38(%r14), %r14
cmpq %r14, %r13
je 0x6599
movq %r14, %rax
subq %r13, %rax
sarq $0x4, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r13, %rdi
movq %r14, %rsi
callq 0x8152
movq %r13, %rdi
movq %r14, %rsi
callq 0x8205
addq $0xb0, %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6a8a
jmp 0x65b6
addq $0x20, %rbx
xorl %ebp, %ebp
movq %rbx, %r15
movq %r15, %rax
movl %ebp, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/deriver.cpp
// Function: pictcore::ExclusionDeriver::peformDelete()
void ExclusionDeriver::peformDelete()
{
    if( !m_deletedAtLeastOne ) return;

    //
    // todo:
    // This approach must be changed, we should be removing unnecessary links instead of recreating them
    // For now however, the recreation seems safer and works fast enough
    //

    // actually delete all marked as deleted
    ExclusionCollection::iterator ie = m_exclusions.begin();
    while( ie != m_exclusions.end() )
    {
        if( ie->isDeleted() )
        {
            Exclusion* pExcl = const_cast<Exclusion*>( &*ie );
            m_lookup.erase( pExcl->GetList() );
            ie = __map_erase( m_exclusions, ie );
        }
        else
            ++ie;
    }

    // recreate links to params
    for( Parameter* param : m_parameters )
    {
        param->ClearExclusions();
    }

    for( ie = m_exclusions.begin(); ie != m_exclusions.end(); ++ie )
    {
        AddExclusionParamBackPtrs( ie );
    }

    // prepare for the next round
    m_deletedAtLeastOne = false;
    DOUT( L"obsolete exclusions removed, now have: " << static_cast<int>( m_exclusions.size() ) << L"\n" );
}

// Assembly:
cmpb $0x1, 0xb8(%rdi)
jne 0x6764
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %r15
leaq 0x20(%rdi), %rbp
cmpq %rbp, %r15
je 0x66fb
leaq 0x18(%rbx), %r14
leaq 0xb0(%rbx), %r12
cmpb $0x1, 0x68(%r15)
jne 0x66eb
leaq 0x50(%r15), %rsi
movq %r12, %rdi
callq 0x87d8
testq %rax, %rax
je 0x66cb
movb $0x0, 0x30(%rax)
cmpq %r15, %rbp
je 0x66fb
movq %r15, %rdi
callq 0x54b0
movq %rax, %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0x882e
movq %r13, %r15
jmp 0x66f6
movq %r15, %rdi
callq 0x54b0
movq %rax, %r15
cmpq %rbp, %r15
jne 0x66af
movq (%rbx), %r14
movq 0x8(%rbx), %r15
cmpq %r15, %r14
je 0x6723
movq (%r14), %rdi
movl $0x0, 0xc8(%rdi)
addq $0x58, %rdi
callq 0x7238
addq $0x8, %r14
jmp 0x6702
movq 0x30(%rbx), %r14
movq %r14, (%rsp)
cmpq %rbp, %r14
je 0x674f
movq %rsp, %r15
movq %r15, %rdi
callq 0x663c
movq %r14, %rdi
callq 0x54b0
movq %rax, %r14
movq %rax, (%rsp)
cmpq %rbp, %rax
jne 0x6733
movb $0x0, 0xb8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/trie.h
// Function: trie<std::vector<std::pair<pictcore::Parameter*, int>, std::allocator<std::pair<pictcore::Parameter*, int>>>>::pfind_prefix(std::vector<std::pair<pictcore::Parameter*, int>, std::allocator<std::pair<pictcore::Parameter*, int>>>&)
trienode<typename Col::value_type>* pfind_prefix( Col &t )
    {
        trienode<typename Col::value_type> *current = m_root;
        for( typename Col::iterator ic = t.begin(); ic != t.end(); ++ic )
        {
            typename TNodeCol::iterator found = current->children.find( *ic );
            if( found == current->children.end() ) return( NULL );

            current = found->second;

            if( current->valid ) return( current );
        }

        return( current->valid ? current : NULL );
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rdi), %rbx
movq (%rsi), %r15
cmpq 0x8(%rsi), %r15
je 0x72e2
movq %rsi, %r14
movq %rbx, %rdi
movq %r15, %rsi
callq 0x72f6
addq $0x8, %rbx
cmpq %rbx, %rax
je 0x72de
movq 0x30(%rax), %rbx
cmpb $0x1, 0x30(%rbx)
je 0x72ec
addq $0x10, %r15
cmpq 0x8(%r14), %r15
jne 0x72b6
xorl %ebx, %ebx
jmp 0x72ec
xorl %eax, %eax
testb $0x1, 0x30(%rbx)
cmoveq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/generator.h
// Function: pictcore::Exclusion::insert(std::pair<pictcore::Parameter*, int> const&)
std::pair<iterator, bool> insert( const ExclusionTerm& Term )
    {
        std::pair<iterator, bool> ret = col.insert( Term );
        if( ret.second ) vec.push_back( Term );
        assert( col.size() == vec.size() );
        return ret;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
callq 0x7890
movq %rax, %r14
movl %edx, %ebp
testb $0x1, %dl
je 0x74a6
movq 0x38(%rbx), %rsi
cmpq 0x40(%rbx), %rsi
je 0x749a
movups (%r15), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x38(%rbx)
jmp 0x74a6
leaq 0x30(%rbx), %rdi
movq %r15, %rdx
callq 0x79cc
movq 0x38(%rbx), %rax
subq 0x30(%rbx), %rax
sarq $0x4, %rax
cmpq %rax, 0x28(%rbx)
jne 0x74c8
movq %r14, %rax
movl %ebp, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1ed9f(%rip), %rdi     # 0x2626e
leaq 0x1ed0c(%rip), %rsi     # 0x261e2
leaq 0x1edaa(%rip), %rcx     # 0x26287
movl $0x10a, %edx            # imm = 0x10A
callq 0x52c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/exclusion.cpp
// Function: contained
bool contained( Exclusion &a, Exclusion &b )
{
    if( b.size() < a.size() ) return( false );

    Exclusion::iterator ib = b.begin();
    for( Exclusion::iterator ia = a.begin(); ia != a.end(); ++ia )
    {
        // move ib until pointers of ia and ib match
        while( ib != b.end() && ( ia->first )->GetSequence() != ( ib->first )->GetSequence() )
        {
            ++ib;
        }

        // end of b, return true only if also end of a
        if( ib == b.end() ) return ia == a.end();

        // pointers match, what about values
        if( ia->second != ib->second ) return false;
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x28(%rsi), %rax
cmpq 0x28(%rdi), %rax
jae 0x8a1e
xorl %ebp, %ebp
jmp 0x8a97
movq %rdi, %rbx
movq 0x18(%rdi), %r15
addq $0x8, %rbx
cmpq %rbx, %r15
je 0x8a87
movq %rsi, %r14
movq 0x18(%rsi), %r12
addq $0x8, %r14
cmpq %r14, %r12
je 0x8a5f
movq 0x20(%r15), %rax
movl 0x2c(%rax), %ebp
movq 0x20(%r12), %rax
cmpl 0x2c(%rax), %ebp
je 0x8a5f
movq %r12, %rdi
callq 0x54b0
movq %rax, %r12
cmpq %r14, %rax
jne 0x8a45
cmpq %r14, %r12
je 0x8a8c
movl 0x28(%r15), %eax
cmpl 0x28(%r12), %eax
sete %bpl
jne 0x8a83
movq %r15, %rdi
callq 0x54b0
movq %rax, %r15
cmpq %rbx, %rax
jne 0x8a39
xorl %eax, %eax
jmp 0x8a94
movb $0x1, %bpl
jmp 0x8a94
cmpq %rbx, %r15
sete %al
xorl %ebp, %ebp
orb %al, %bpl
andb $0x1, %bpl
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/exclusion.cpp
// Function: compareExclusionTerms
int compareExclusionTerms( const ExclusionTerm& op1, const ExclusionTerm& op2 )
{
    assert( (( op1.first == op2.first ) && ( ( op1.first )->GetSequence() == ( op2.first )->GetSequence() ))
         || (( op1.first != op2.first ) && ( ( op1.first )->GetSequence() != ( op2.first )->GetSequence() )) );

    if( op1.first != op2.first )
        // return op1.first < op2.first ? -1 : 1;
        return ( op1.first )->GetSequence() < ( op2.first )->GetSequence() ? -1 : 1;
    else
        if( op1.second != op2.second )
            return op1.second < op2.second ? -1 : 1;
        else
            return 0;
}

// Assembly:
movq (%rdi), %rdx
movq (%rsi), %r8
movl 0x2c(%rdx), %eax
movl 0x2c(%r8), %ecx
cmpq %r8, %rdx
je 0x8abe
cmpl %ecx, %eax
jne 0x8acc
jmp 0x8ada
cmpl %ecx, %eax
jne 0x8ada
movl 0x8(%rsi), %ecx
xorl %eax, %eax
cmpl %ecx, 0x8(%rdi)
je 0x8ad9
setge %al
movzbl %al, %eax
leal -0x1(,%rax,2), %eax
retq
pushq %rax
leaq 0x1d8d4(%rip), %rdi     # 0x263b6
leaq 0x1d992(%rip), %rsi     # 0x2647b
leaq 0x1d9a8(%rip), %rcx     # 0x26498
movl $0x29, %edx
callq 0x52c0
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/exclusion.cpp
// Function: compareExclusions
int compareExclusions(const Exclusion& op1, const Exclusion& op2)
{
    Exclusion::const_iterator i_op1 = op1.begin();
    Exclusion::const_iterator i_op2 = op2.begin();

    int comp = 0;
    while( i_op1 != op1.end() &&
           i_op2 != op2.end() )
    {
        comp = compareExclusionTerms( *i_op1, *i_op2 );
        if( comp != 0 ) break;
        ++i_op1;
        ++i_op2;
    }
    if( comp != 0 )
        return( comp );
    else
        if( op1.size() != op2.size() )
            return op1.size() < op2.size() ? -1 : 1;
        else
            return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %r15
movq 0x18(%rsi), %r12
leaq 0x8(%rdi), %r13
leaq 0x8(%rsi), %rbp
cmpq %r13, %r15
setne %al
cmpq %rbp, %r12
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x8b60
leaq 0x20(%r15), %rdi
leaq 0x20(%r12), %rsi
callq 0x8aa6
testl %eax, %eax
jne 0x8b79
movq %r15, %rdi
callq 0x54b0
movq %rax, %r15
movq %r12, %rdi
callq 0x54b0
cmpq %r13, %r15
je 0x8b60
movq %rax, %r12
cmpq %rbp, %rax
jne 0x8b2e
movq 0x28(%r14), %rcx
movq 0x28(%rbx), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x8b79
xorl %eax, %eax
cmpq %rdx, %rcx
sbbl %eax, %eax
orl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/exclusion.cpp
// Function: pictcore::Exclusion::ResultParamCount() const
size_t Exclusion::ResultParamCount() const
{
    size_t count = 0;
    for( auto & term : col )
    {
        if( term.first->IsExpectedResultParam() )
        {
            ++count;
        }
    }
    return( count );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rax
addq $0x8, %rbx
xorl %r14d, %r14d
cmpq %rbx, %rax
je 0x8bb4
movq 0x20(%rax), %rcx
movzbl 0x3c(%rcx), %ecx
addq %rcx, %r14
movq %rax, %rdi
callq 0x54b0
jmp 0x8b9a
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/model.cpp
// Function: pictcore::Model::generateRandomRow()
Exclusion Model::generateRandomRow()
{
    Exclusion row;
    for( ParamCollection::iterator ip = m_parameters.begin(); ip != m_parameters.end(); ++ip )
    {
        int sum = 0;
        for( int i = 0; i < ( *ip )->GetValueCount(); ++i )
        {
            sum += ( *ip )->GetWeight( i );
        }
        int idx = rand() % sum;

        int n;
        int val = 0;
        for( n = 0; n < ( *ip )->GetValueCount(); ++n )
        {
            if( val < idx )
            {
                val += ( *ip )->GetWeight( n );
            }
            else
            {
                break;
            }
        }

        row.insert( make_pair( *ip, n ) );
    }
    return( row );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
movl $0x0, 0x8(%rdi)
movq $0x0, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movb $0x0, 0x48(%rdi)
movq 0x8(%rsi), %r12
cmpq 0x10(%rsi), %r12
je 0x9f44
movq %rsi, %r14
leaq 0x8(%rsp), %r15
movq (%r12), %rdx
movslq 0x38(%rdx), %rax
xorl %r13d, %r13d
movl $0x0, %ebp
testq %rax, %rax
jle 0x9ecb
movq 0xa8(%rdx), %rcx
movq 0xb0(%rdx), %rdx
subq %rcx, %rdx
shrq $0x2, %rdx
movslq %edx, %rdx
xorl %esi, %esi
xorl %ebp, %ebp
movl $0x1, %edi
cmpq %rdx, %rsi
jge 0x9ec1
movl (%rcx,%rsi,4), %edi
addl %edi, %ebp
incq %rsi
cmpq %rsi, %rax
jne 0x9eb4
callq 0x5100
cltd
idivl %ebp
movq (%r12), %rax
movslq 0x38(%rax), %rcx
testq %rcx, %rcx
jle 0x9f21
testl %edx, %edx
jle 0x9f21
movq 0xa8(%rax), %rsi
movq 0xb0(%rax), %rdi
subq %rsi, %rdi
shrq $0x2, %rdi
movslq %edi, %rdi
xorl %r13d, %r13d
xorl %r8d, %r8d
movl $0x1, %r9d
cmpq %rdi, %r13
jge 0x9f11
movl (%rsi,%r13,4), %r9d
incq %r13
cmpq %rcx, %r13
jae 0x9f21
addl %r9d, %r8d
cmpl %edx, %r8d
jl 0x9f02
movq %rax, 0x8(%rsp)
movl %r13d, 0x10(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7466
addq $0x8, %r12
cmpq 0x10(%r14), %r12
jne 0x9e83
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x709e
movq %r14, %rdi
callq 0x56a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/model.cpp
// Function: pictcore::Model::rowViolatesExclusion(pictcore::Exclusion&)
bool Model::rowViolatesExclusion( Exclusion& row )
{
    for( ExclusionCollection::iterator ie = m_exclusions.begin(); ie != m_exclusions.end(); ++ie )
    {
        if( contained( const_cast<Exclusion&> ( *ie ), row ) )
        {
            return( true );
        }
    }
    return( false );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x38(%rdi), %r15
addq $0x28, %r14
cmpq %r14, %r15
je 0x9fa8
movq %rsi, %rbx
leaq 0x20(%r15), %rdi
movq %rbx, %rsi
callq 0x8a08
movl %eax, %ebp
testb %al, %al
jne 0x9faa
movq %r15, %rdi
callq 0x54b0
movq %rax, %r15
cmpq %r14, %rax
jne 0x9f84
jmp 0x9faa
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/model.cpp
// Function: pictcore::Model::rowViolatesExclusion(std::vector<unsigned long, std::allocator<unsigned long>>&)
bool Model::rowViolatesExclusion( ResultRow& row )
{
    for( ExclusionCollection::iterator ie = m_exclusions.begin(); ie != m_exclusions.end(); ++ie )
    {
        bool matches = true;
        for( Exclusion::iterator it = ie->begin(); it != ie->end(); ++it )
        {
            if( row[ it->first->GetSequence() ] != it->second )
            {
                matches = false;
                break;
            }
        }
        if( matches ) return( true );
    }
    return( false );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x38(%rdi), %r14
addq $0x28, %rbx
cmpq %rbx, %r14
je 0xa1ac
movq (%rsi), %r15
movq 0x38(%r14), %rax
leaq 0x28(%r14), %r12
cmpq %r12, %rax
sete %bpl
je 0xa1a7
movq 0x20(%rax), %rcx
movslq 0x2c(%rcx), %rcx
movslq 0x28(%rax), %rdx
cmpq %rdx, (%r15,%rcx,8)
jne 0xa195
movq %rax, %rdi
callq 0x54b0
cmpq %r12, %rax
jne 0xa174
jmp 0xa1a7
movq %r14, %rdi
callq 0x54b0
movq %rax, %r14
cmpq %rbx, %rax
jne 0xa163
jmp 0xa1ae
movb $0x1, %bpl
jmp 0xa1ae
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/model.cpp
// Function: pictcore::Model::generateFixedOrder()
void Model::generateFixedOrder()
{
    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( m_order, ++m_lastParamId, *im );
        AddParameter( pseudo );
    }

    // initialize combinations based on contents of m_parameters
    vector<Combination*> vecCombo;

    for( ParamCollection::iterator ip = m_parameters.begin(); ip != m_parameters.end(); ++ip )
    {
        ( *ip )->SetOrder( m_order );
    }
    bool r1 = mapExclusionsToPseudoParameters();
    bool r2 = excludeConflictingParamValues();
    if( r1 || r2 ) deriveSubmodelExclusions();

    mapRowSeedsToPseudoParameters();

    Combination baseCombo( this );
    choose( m_parameters.begin(), m_parameters.end(), m_order, m_order, baseCombo, vecCombo );
    gcd( vecCombo );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
movl $0x0, (%rdi)
leaq 0x50(%rdi), %r15
movq 0x50(%rdi), %r12
cmpq %r15, %r12
je 0xaa5d
movl $0xd8, %edi
callq 0x53c0
movq %rax, %r14
movl 0x108(%rbx), %esi
movl 0x130(%rbx), %edx
incl %edx
movl %edx, 0x130(%rbx)
movq 0x10(%r12), %rcx
movq %rax, %rdi
callq 0xf068
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc0a4
movq (%r12), %r12
jmp 0xaa19
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
cmpq %rcx, %rax
je 0xaa90
movl 0x108(%rbx), %edx
movq (%rax), %rsi
movl %edx, 0x28(%rsi)
addq $0x8, %rax
cmpq %rcx, %rax
jne 0xaa81
movq %rbx, %rdi
callq 0xb4fe
movl %eax, %ebp
movq %rbx, %rdi
callq 0xa49c
orb %al, %bpl
cmpb $0x1, %bpl
jne 0xaab3
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
movl 0x108(%rbx), %ecx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
leaq 0x30(%rsp), %r9
movq %rbx, %rdi
movl %ecx, %r8d
callq 0x8c4c
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x8e46
leaq 0x30(%rsp), %rdi
callq 0x6332
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xab1d
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x53e0
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xab4f
jmp 0xab4f
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x6332
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xab64
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
jmp 0xab5f
movq %rax, %rbx
jmp 0xab64
movq %rax, %rbx
movl $0xd8, %esi
movq %r14, %rdi
callq 0x53e0
movq %rbx, %rdi
callq 0x56a0
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/model.cpp
// Function: pictcore::Model::deriveSubmodelExclusions()
void Model::deriveSubmodelExclusions()
{
    ExclusionDeriver deriver( GetTask() );

    // the deriver must know about pseudo parameters
    ParamCollection params;
    GetAllParameters( params );
    for( ParamCollection::iterator ip = params.begin(); ip != params.end(); ++ip )
    {
        deriver.AddParameter( *ip );
    }

    // run the deriver on the newly created set of exclusions
    if( !deriver.GetParameters().empty() )
    {
        for( ExclusionCollection::iterator i_e = m_exclusions.begin(); i_e != m_exclusions.end(); ++i_e )
        {
            deriver.AddExclusion( const_cast<Exclusion&> ( *i_e ), true );
        }
        deriver.DeriveExclusions();

        // must clear because some initial exclusions may have been removed during derivation as obsolete
        m_exclusions.clear();
        __insert( m_exclusions, deriver.GetExclusions().begin(), deriver.GetExclusions().end() );
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
movq 0x148(%rdi), %rsi
leaq 0x18(%rsp), %rdi
callq 0xc112
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq %rbx, %rdi
callq 0xc1e4
movq (%rsp), %r15
cmpq 0x8(%rsp), %r15
je 0xb979
leaq 0x18(%rsp), %r14
movq (%r15), %rsi
movq %r14, %rdi
callq 0xc224
addq $0x8, %r15
cmpq 0x8(%rsp), %r15
jne 0xb963
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
je 0xb9df
movq 0x38(%rbx), %r14
leaq 0x28(%rbx), %r12
cmpq %r12, %r14
je 0xb9b8
leaq 0x18(%rsp), %r15
leaq 0x20(%r14), %rsi
movq %r15, %rdi
movl $0x1, %edx
callq 0x64ca
movq %r14, %rdi
callq 0x54b0
movq %rax, %r14
cmpq %r12, %rax
jne 0xb997
leaq 0x18(%rsp), %rdi
callq 0x6766
addq $0x20, %rbx
movq %rbx, %rdi
callq 0xeb12
leaq 0x38(%rsp), %rdx
movq 0x10(%rdx), %rsi
movq %rbx, %rdi
callq 0xc0dc
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xb9f5
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x53e0
leaq 0xc8(%rsp), %rdi
callq 0xcc00
leaq 0x78(%rsp), %rdi
callq 0xd344
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0xcb60
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xba2f
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x53e0
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0xba42
jmp 0xba42
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xba5b
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x53e0
leaq 0x18(%rsp), %rdi
callq 0xc24a
movq %rbx, %rdi
callq 0x56a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/model.cpp
// Function: pictcore::seedContained(std::set<std::pair<pictcore::Parameter*, int>, std::less<std::pair<pictcore::Parameter*, int>>, std::allocator<std::pair<pictcore::Parameter*, int>>>&, std::set<std::pair<pictcore::Parameter*, int>, std::less<std::pair<pictcore::Parameter*, int>>, std::allocator<std::pair<pictcore::Parameter*, int>>>&)
bool seedContained( RowSeed &container, RowSeed &containee )
{
    // containee has to have all its elements matching exacly some element in the container
    for( RowSeed::iterator ic = containee.begin(); ic != containee.end(); ++ic )
    {
        if( container.find( *ic ) == container.end() ) return( false );
    }
    return( true );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq 0x18(%rsi), %r15
addq $0x8, %rbx
cmpq %rbx, %r15
je 0xbd9f
movq %rdi, %r14
leaq 0x8(%rdi), %r12
leaq 0x20(%r15), %rsi
movq %r14, %rdi
callq 0xec00
cmpq %r12, %rax
setne %bpl
je 0xbda2
movq %r15, %rdi
callq 0x54b0
movq %rax, %r15
cmpq %rbx, %rax
jne 0xbd78
jmp 0xbda2
movb $0x1, %bpl
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/model.cpp
// Function: pictcore::seedViolatesExclusion(std::set<std::pair<pictcore::Parameter*, int>, std::less<std::pair<pictcore::Parameter*, int>>, std::allocator<std::pair<pictcore::Parameter*, int>>>&, pictcore::Exclusion&)
bool seedViolatesExclusion( RowSeed &seed, Exclusion &exclusion )
{
    // exclusion has to have all its elements matching exacly some element in the seed
    for( Exclusion::iterator ie = exclusion.begin(); ie != exclusion.end(); ++ie )
    {
        // translate exclusion item into seed item
        // currently they are the same thing
        RowSeedTerm term = make_pair( ie->first, ie->second );
        if( seed.find( term ) == seed.end() ) return( false );
    }
    return( true );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq 0x18(%rsi), %r15
addq $0x8, %rbx
cmpq %rbx, %r15
je 0xbe0e
movq %rdi, %r14
leaq 0x8(%rdi), %r13
leaq 0x8(%rsp), %r12
movq 0x20(%r15), %rax
movl 0x28(%r15), %ecx
movq %rax, 0x8(%rsp)
movl %ecx, 0x10(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0xec00
cmpq %r13, %rax
setne %bpl
je 0xbe11
movq %r15, %rdi
callq 0x54b0
movq %rax, %r15
cmpq %rbx, %rax
jne 0xbdd7
jmp 0xbe11
movb $0x1, %bpl
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/generator.h
// Function: pictcore::Model::AddParameter(pictcore::Parameter*)
void AddParameter( Parameter* param )
    {
        // parameter names should be unique but we can't assert it here
        // as there are cases where we add same name params to the collection
        // internally and delete the duplicate almost immediately
        param->WireTask( GetTask() );
        m_parameters.push_back( param );
    }

// Assembly:
pushq %rax
movq %rsi, %rax
movq %rsi, (%rsp)
movq 0x148(%rdi), %rcx
movq %rcx, 0xc0(%rsi)
movq 0x10(%rdi), %rsi
cmpq 0x18(%rdi), %rsi
je 0xc0ce
movq %rax, (%rsi)
addq $0x8, 0x10(%rdi)
jmp 0xc0da
addq $0x8, %rdi
movq %rsp, %rdx
callq 0xc462
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/parameter.cpp
// Function: pictcore::Parameter::CleanUp()
void Parameter::CleanUp()
{
    m_pending = false;
    m_bound   = false;

    m_combinations.clear();
    m_result.clear();
    m_exclusions.clear();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movw $0x0, 0x3d(%rdi)
movq 0x40(%rdi), %rax
cmpq %rax, 0x48(%rdi)
je 0xecb8
movq %rax, 0x48(%rbx)
leaq 0x90(%rbx), %rdi
callq 0xf20a
addq $0x58, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x7238
nop
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/parameter.cpp
// Function: pictcore::Parameter::Bind(int, pictcore::WorkList&)
bool Parameter::Bind(int value, WorkList& worklist)
{
    DOUT(L"Binding " << m_name << L" to value " << value << L".\n");
    assert(!m_bound);
    assert(value < m_valueCount);

    m_result.push_back(value);
    m_currentValue = value;
    m_bound = true;

    for( auto & combination : m_combinations )
    {
        if( combination->AddBinding() == combination->GetParameterCount() - 1 )
        {
            // Add any parameter that completes a combination to work list
            for( int n = 0; n < combination->GetParameterCount(); ++n )
            {
                if( !( (*combination)[ n ] ).GetBoundCount() )
                {
                    worklist.AddItem( &( *combination )[ n ] );
                }
            }
        }
    }

    worklist.Print();
    
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x1, 0x3d(%rdi)
je 0xeda5
movq %rdi, %r14
cmpl %esi, 0x38(%rdi)
jle 0xedc4
movq %rdx, %rbx
leaq 0x90(%r14), %r15
movslq %esi, %r12
movl $0x18, %edi
callq 0x53c0
movq %r12, 0x10(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x5080
incq 0xa0(%r14)
movq %r12, 0x30(%r14)
movb $0x1, 0x3d(%r14)
movq 0x40(%r14), %r15
movq 0x48(%r14), %r14
cmpq %r14, %r15
je 0xed8f
movq (%r15), %rdi
callq 0x606c
movq (%r15), %rcx
movq 0x8(%rcx), %rdx
movq 0x10(%rcx), %rsi
subq %rdx, %rsi
shrq $0x3, %rsi
leal -0x1(%rsi), %edi
cmpl %edi, %eax
jne 0xed89
testl %esi, %esi
jle 0xed89
xorl %r12d, %r12d
movq (%rdx,%r12,8), %rsi
cmpb $0x0, 0x3d(%rsi)
jne 0xed70
movq %rbx, %rdi
callq 0x104dc
movq (%r15), %rcx
incq %r12
movq 0x8(%rcx), %rdx
movq 0x10(%rcx), %rax
subq %rdx, %rax
shrq $0x3, %rax
cltq
cmpq %rax, %r12
jl 0xed5b
addq $0x8, %r15
jmp 0xed2e
movq %rbx, %rdi
callq 0x1057e
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x17b53(%rip), %rdi     # 0x268ff
leaq 0x17b55(%rip), %rsi     # 0x26908
leaq 0x17b6b(%rip), %rcx     # 0x26925
movl $0x1d, %edx
callq 0x52c0
leaq 0x17b8a(%rip), %rdi     # 0x26955
leaq 0x17b36(%rip), %rsi     # 0x26908
leaq 0x17b4c(%rip), %rcx     # 0x26925
movl $0x1e, %edx
callq 0x52c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/parameter.cpp
// Function: pictcore::PseudoParameter::PseudoParameter(int, unsigned int, pictcore::Model*)
PseudoParameter::PseudoParameter( int order, unsigned int sequence, Model *model ) :
        Parameter( order, sequence, static_cast<int>( model->GetResultCount() ), wstring(), false ),
        m_model( model )
{
    m_name = L"";
    for( vector<Parameter*>::iterator ip =  model->GetParameters().begin();
                                      ip != model->GetParameters().end();
                                    ++ip )
    {
        if( ip != model->GetParameters().begin() )
        {
            m_name += L" ";
        }
        m_name += ( *ip )->GetName();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movl %edx, 0x4(%rsp)
movl %esi, (%rsp)
movq %rdi, %rbx
movq 0xd0(%rcx), %r13
movq 0xd8(%rcx), %rbp
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movl $0x0, (%r12)
leaq 0x25a15(%rip), %rax     # 0x34ac8
movq %rax, (%rdi)
leaq 0x8(%rdi), %r15
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
movq %r15, %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0xe46e
subq %r13, %rbp
shrq $0x3, %rbp
imull $0xaaaaaaab, %ebp, %eax # imm = 0xAAAAAAAB
movl (%rsp), %ecx
movl %ecx, 0x28(%rbx)
movl 0x4(%rsp), %ecx
movl %ecx, 0x2c(%rbx)
movl %eax, 0x38(%rbx)
movb $0x0, 0x3c(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
xorl %eax, %eax
movq %rax, 0x50(%rbx)
leaq 0x60(%rbx), %rcx
movl $0x0, 0x60(%rbx)
movq %rax, 0x68(%rbx)
movq %rcx, 0x70(%rbx)
movq %rcx, 0x78(%rbx)
leaq 0x90(%rbx), %rax
movups %xmm0, 0x80(%rbx)
movq %rax, 0x98(%rbx)
movq %rax, 0x90(%rbx)
movups %xmm0, 0xa0(%rbx)
movups %xmm0, 0xb0(%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xf15b
movq 0x18(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x53e0
leaq 0x2590e(%rip), %rax     # 0x34a70
movq %rax, (%rbx)
movq %r14, 0xd0(%rbx)
movq 0x10(%rbx), %rdx
leaq 0x17881(%rip), %rcx     # 0x269f8
movq %r15, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x56c0
movq 0x8(%r14), %r13
cmpq 0x10(%r14), %r13
je 0xf1c4
leaq 0x1785f(%rip), %r12     # 0x269f4
cmpq 0x8(%r14), %r13
je 0xf1a6
movq %r15, %rdi
movq %r12, %rsi
callq 0x56e0
movq (%r13), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %r15, %rdi
callq 0x5430
addq $0x8, %r13
cmpq 0x10(%r14), %r13
jne 0xf195
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf1f6
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xf201
movq 0x18(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x53e0
jmp 0xf201
movq %rax, %r14
movq %rbx, %rdi
callq 0xf32a
movq %r14, %rdi
callq 0x56a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/pictapi.cpp
// Function: PictAddExclusion
PICT_RET_CODE
API_SPEC
PictAddExclusion
    (
    IN const PICT_HANDLE         task,
    IN const PICT_EXCLUSION_ITEM exclusionItems[],
    IN       size_t              exclusionItemCount
    )
{
    Task* taskObj = static_cast<Task*>( NO_CONST_HANDLE( task ));
    
    try
    {
        Exclusion exclusion;
        for( size_t index = 0; index < exclusionItemCount; ++index )
        {
            exclusion.insert( make_pair( 
                static_cast<Parameter*> ( NO_CONST_HANDLE( exclusionItems[ index ].Parameter  )),
                static_cast<int>        (                  exclusionItems[ index ].ValueIndex ))
                );
        }
        bool ret = taskObj->AddExclusion( exclusion );
        return( ret ? PICT_SUCCESS : PICT_OUT_OF_MEMORY );
    }
    catch( ... )
    {
        return( PICT_OUT_OF_MEMORY );
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movl $0x0, (%rax)
movq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
movb $0x0, 0x40(%rax)
testq %rdx, %rdx
je 0xf4dd
movq %rdx, %r14
movq %rsi, %r15
addq $0x8, %r15
leaq 0x10(%rsp), %r12
movq %rsp, %r13
movq -0x8(%r15), %rax
movl (%r15), %ecx
movq %rax, (%rsp)
movl %ecx, 0x8(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x7466
addq $0x10, %r15
decq %r14
jne 0xf4ba
addq $0x8, %rbx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x7f84
xorl %eax, %eax
testb $0x1, %dl
movl $0xc0000001, %ebx       # imm = 0xC0000001
cmovnel %eax, %ebx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xf512
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x53e0
leaq 0x10(%rsp), %rdi
callq 0x787c
movl %ebx, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0xf52e
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x709e
movq %rbx, %rdi
callq 0x5190
callq 0x5650
movl $0xc0000001, %ebx       # imm = 0xC0000001
jmp 0xf51c
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/pictapi.cpp
// Function: PictAddSeed
PICT_RET_CODE
API_SPEC
PictAddSeed
    (
    IN const PICT_HANDLE     task,
    IN const PICT_SEED_ITEM  seedItems[],
    IN       size_t          seedItemCount
    )
{
    Task* taskObj = static_cast<Task*>( NO_CONST_HANDLE( task ));
    
    try
    {
        RowSeed seed;
        for( size_t index = 0; index < seedItemCount; ++index )
        {
            seed.insert( make_pair( 
                static_cast<Parameter*> ( NO_CONST_HANDLE( seedItems[ index ].Parameter  )),
                static_cast<int>        (                  seedItems[ index ].ValueIndex ))
                );
        }
        taskObj->AddRowSeed( seed );
        return( PICT_SUCCESS );
    }
    catch( ... )
    {
        return( PICT_OUT_OF_MEMORY );
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
testq %rdx, %rdx
je 0xf5b6
movq %rdx, %r14
movq %rsi, %r15
addq $0x8, %r15
leaq 0x10(%rsp), %r12
movq %rsp, %r13
movq -0x8(%r15), %rax
movl (%r15), %ecx
movq %rax, (%rsp)
movl %ecx, 0x8(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0xe9ce
addq $0x10, %r15
decq %r14
jne 0xf593
leaq 0x38(%rbx), %r14
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0xd39c
movq %rax, %rdi
movq %r14, %rsi
callq 0x5080
incq 0x48(%rbx)
leaq 0x10(%rsp), %rdi
callq 0xcb10
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0xf5f2
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xcb10
movq %rbx, %rdi
callq 0x5190
callq 0x5650
movl $0xc0000001, %eax       # imm = 0xC0000001
jmp 0xf5e2
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/pictapi.cpp
// Function: PictGenerate
PICT_RET_CODE
API_SPEC
PictGenerate
    (
    IN const PICT_HANDLE task
    )
{
    Task* taskObj = static_cast<Task*>( NO_CONST_HANDLE( task ));
    try
    {
        taskObj->PrepareForGeneration();
    }
    catch( ... )
    {
        return( PICT_GENERATION_ERROR );
    }
    
    Model* root = taskObj->GetRootModel();
    try
    {
        generate( root );
    }
    catch( GenerationError e )
    {
        switch( e.GetErrorType() )
        {
        case OutOfMemory:
            return( PICT_OUT_OF_MEMORY );
        case GenerationCancelled:
        case TooManyRows:        
        case Unknown:
        case GenerationFailure:
        default:
            return( PICT_GENERATION_ERROR );
        }
    }
    return( PICT_SUCCESS );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
callq 0x1018a
movq (%rbx), %rdi
xorl %ebx, %ebx
callq 0xf6d4
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
cmpl $0x2, %edx
jne 0xf6ad
movq %rbx, %rdi
callq 0x54f0
movq %rax, %r14
movl (%rax), %eax
leaq 0x8(%rsp), %rdi
movl %eax, -0x8(%rdi)
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
addq %rsi, %rdx
callq 0x757e
movl 0x28(%r14), %eax
movl %eax, 0x28(%rsp)
movq %rbx, %rdi
callq 0x5190
xorl %ebx, %ebx
cmpl $0x3, (%rsp)
setne %bl
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0xf6a0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x53e0
addl $0xc0000001, %ebx       # imm = 0xC0000001
callq 0x5650
jmp 0xf62e
movq %rbx, %rdi
callq 0x56a0
movq %rax, %rdi
callq 0x722c
movq %rax, %rdi
callq 0x5190
callq 0x5650
movl $0xc0000002, %ebx       # imm = 0xC0000002
jmp 0xf62e
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/pictapi.cpp
// Function: PictGetNextResultRow
size_t
API_SPEC
PictGetNextResultRow
    (
    IN  const PICT_HANDLE     task,
    OUT       PICT_RESULT_ROW resultRow
    )
{
    Task* taskObj = static_cast<Task*>( NO_CONST_HANDLE( task ));
    
    ResultCollection::iterator i_row = taskObj->GetNextResultRow();

    if( i_row != taskObj->GetResults().end() )
    {
        for( size_t index = 0; index < i_row->size(); ++index )
        {
            resultRow[ index ] = (*i_row)[ index ];
        }
    }
    
    return( distance( i_row, taskObj->GetResults().end() ));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x10416
movq (%r14), %rcx
movq 0xd8(%rcx), %rcx
cmpq %rcx, %rax
je 0xf766
movq (%rax), %rdx
movq 0x8(%rax), %rsi
subq %rdx, %rsi
je 0xf766
sarq $0x3, %rsi
cmpq $0x1, %rsi
adcq $0x0, %rsi
xorl %edi, %edi
movq (%rdx,%rdi,8), %r8
movq %r8, (%rbx,%rdi,8)
incq %rdi
cmpq %rdi, %rsi
jne 0xf756
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/pictapi.cpp
// Function: PictCreateModel
PICT_HANDLE
API_SPEC
PictCreateModel
    (
    IN OPT unsigned int randomSeed
    )
{
    Model* modelObj = new Model( L"",
                                 MixedOrder, 
                                 0,
                                 randomSeed );
    
    return( static_cast<PICT_HANDLE>( modelObj ));   
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edi, %ebp
movl $0x150, %edi            # imm = 0x150
callq 0x53c0
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1722d(%rip), %rdx     # 0x269f8
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0xfe1a
movl %ebp, %r8d
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xfb38
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0xf808
movq 0x18(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x53e0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0xf83a
movq 0x18(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x53e0
jmp 0xf83a
movq %rax, %r14
movl $0x150, %esi            # imm = 0x150
movq %rbx, %rdi
callq 0x53e0
movq %r14, %rdi
callq 0x56a0
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/pictapi.cpp
// Function: PictAttachChildModel
PICT_RET_CODE
API_SPEC
PictAttachChildModel
    (
    IN const PICT_HANDLE modelParent,
    IN const PICT_HANDLE modelChild,
    IN OPT unsigned int  order
    )
{
    Model* parent = static_cast<Model*>( NO_CONST_HANDLE( modelParent ));
    Model* child  = static_cast<Model*>( NO_CONST_HANDLE( modelChild  ));
    try
    {
        child->SetOrder( order );
        if ( parent->GetOrder() < static_cast<int>( order ))
        {
            parent->SetOrder( order );
        }
        
        parent->AddSubmodel( child );
        return( PICT_SUCCESS );
    }
    catch( ... )
    {
        return( PICT_OUT_OF_MEMORY );
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, 0x108(%rsi)
cmpl %edx, 0x108(%rdi)
jge 0xfab8
movl %edx, 0x108(%rbx)
movl $0x18, %edi
callq 0x53c0
leaq 0x50(%rbx), %rsi
movq %r14, 0x10(%rax)
movq %rax, %rdi
callq 0x5080
incq 0x60(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x5190
callq 0x5650
movl $0xc0000001, %eax       # imm = 0xC0000001
jmp 0xfad8
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/pictapi.cpp
// Function: PictDeleteModel
void
API_SPEC
PictDeleteModel
    (
    IN const PICT_HANDLE model
    )
{
    Model* modelObj = static_cast<Model*>( NO_CONST_HANDLE( model ));

    // delete all params first
    // since GetParameters() will return all params for this and all submodels, do it here
    for( Parameter* param : modelObj->GetParameters() )
    {
        delete( param );
    }

    // and this model, Model::~Model will clean up all submodels too
    delete( modelObj );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movq 0x10(%rdi), %r15
cmpq %r15, %r14
je 0xfb1d
movq (%r14), %rdi
testq %rdi, %rdi
je 0xfb17
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %r14
jmp 0xfb04
movq %rbx, %rdi
callq 0xbe24
movl $0x150, %esi            # imm = 0x150
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x53e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/task.cpp
// Function: pictcore::Task::~Task()
Task::~Task()
{
    DeallocWorkbuf();

#if ( defined(_DOUT) && defined(_FILE) )
    logfile.close();
#endif
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x68(%rdi), %rdi
testq %rdi, %rdi
je 0x10116
callq 0x5520
movq $0x0, 0x68(%rbx)
leaq 0x38(%rbx), %rdi
callq 0xd1d0
addq $0x8, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0xcb60
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/task.cpp
// Function: pictcore::Task::PrepareForGeneration()
void Task::PrepareForGeneration()
{
    // new models could have been added to the root
    // repropagate the task pointer to all models
    m_rootModel->WireTask(this);

    // run the deriver on exclusions
    deriveExclusions();

    // propagate exclusions wiring to appropriate submodel
    // add each exclusion to that model in the hierarchy which is the most suitable:
    //  1. a subtree of that model must have all the parameters of the exclusion
    //  2. no lower subtree satisfies the condition 1)
    //
    for ( auto & excl : m_exclusions )
    {
        Model* found = findMatchingNode(const_cast<Exclusion&>( excl ), m_rootModel);
        assert( NULL != found );
        found->AddExclusion( const_cast<Exclusion&>( excl ));
    }

    // propagate all row seeds
    m_rootModel->AddRowSeeds( m_rowSeeds.begin(), m_rowSeeds.end() );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
movq %rbx, %rsi
callq 0xfd88
movq %rbx, %rdi
callq 0x1023e
movq 0x20(%rbx), %r14
leaq 0x10(%rbx), %r12
cmpq %r12, %r14
je 0x101eb
leaq 0x20(%r14), %r15
movq (%rbx), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x10388
testq %rax, %rax
je 0x1021e
addq $0x20, %rax
movq %rax, %rdi
movq %r15, %rsi
callq 0x7f84
movq %r14, %rdi
callq 0x54b0
movq %rax, %r14
cmpq %r12, %rax
jne 0x101b5
movq 0x38(%rbx), %rsi
leaq 0x38(%rbx), %r14
cmpq %r14, %rsi
je 0x10212
movq (%rbx), %rbx
movq (%rsi), %r15
addq $0x10, %rsi
movq %rbx, %rdi
callq 0x10492
movq %r15, %rsi
cmpq %r14, %r15
jne 0x101fb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x16832(%rip), %rdi     # 0x26a57
leaq 0x16839(%rip), %rsi     # 0x26a65
leaq 0x1684a(%rip), %rcx     # 0x26a7d
movl $0x53, %edx
callq 0x52c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/task.cpp
// Function: pictcore::Task::deriveExclusions()
void Task::deriveExclusions()
{
    ExclusionDeriver deriver(this);
    ParamCollection params;
    m_rootModel->GetAllParameters(params);

    for( auto p : params )
    {
        deriver.AddParameter( p );
    }

    for( auto & excl : m_exclusions )
    {
        deriver.AddExclusion( const_cast<Exclusion&>( excl ), true );
    }

    deriver.DeriveExclusions();
    
    // must clear and repopulate the collection with the result of the derivation
    m_exclusions.clear();
    __insert( m_exclusions, deriver.GetExclusions().begin(), deriver.GetExclusions().end() );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0xc112
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq (%rbx), %rdi
callq 0xc1e4
movq (%rsp), %r15
movq 0x8(%rsp), %r12
cmpq %r12, %r15
je 0x1029c
leaq 0x18(%rsp), %r14
movq (%r15), %rsi
movq %r14, %rdi
callq 0xc224
addq $0x8, %r15
cmpq %r12, %r15
jne 0x10288
movq 0x20(%rbx), %r14
leaq 0x10(%rbx), %r12
cmpq %r12, %r14
je 0x102cf
leaq 0x18(%rsp), %r15
leaq 0x20(%r14), %rsi
movq %r15, %rdi
movl $0x1, %edx
callq 0x64ca
movq %r14, %rdi
callq 0x54b0
movq %rax, %r14
cmpq %r12, %rax
jne 0x102ae
leaq 0x18(%rsp), %rdi
callq 0x6766
addq $0x8, %rbx
movq %rbx, %rdi
callq 0xeb12
leaq 0x38(%rsp), %rdx
movq 0x10(%rdx), %rsi
movq %rbx, %rdi
callq 0xc0dc
leaq 0x30(%rsp), %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x10311
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x53e0
leaq 0xc8(%rsp), %rdi
callq 0xcc00
leaq 0x78(%rsp), %r14
movq %r14, %rdi
callq 0xd344
movq %rbx, %rdi
callq 0xcb60
movq -0x60(%r14), %rdi
testq %rdi, %rdi
je 0x10349
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x53e0
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x1035c
jmp 0x1035c
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x10375
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x53e0
leaq 0x18(%rsp), %rdi
callq 0xc24a
movq %rbx, %rdi
callq 0x56a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/task.cpp
// Function: pictcore::Task::findMatchingNode(pictcore::Exclusion&, pictcore::Model*)
Model* Task::findMatchingNode( Exclusion& exclusion, Model* root )
{
    // can any of the subnodes accommodate the exclusion?
    for( auto & submodel : root->GetSubmodels() )
    {
        Model* foundNode = findMatchingNode( exclusion, submodel );
        if ( NULL != foundNode ) return( foundNode );
    }

    // none of the subnodes matches the exclusion so let's try the current one
    bool foundParams = true;
    for( auto & term : exclusion )
    {
        foundParams = findParamInSubtree( term.first, root );
        if ( ! foundParams ) break;
    }
    if ( foundParams )
    {
        return( root );
    }
    else
    {
        return( NULL );
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x50(%rdx), %r12
movq %r12, %r13
movq (%r13), %r13
cmpq %r12, %r13
je 0x103c3
movq 0x10(%r13), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x10388
testq %rax, %rax
je 0x103a1
movq %rax, %rbx
jmp 0x103f8
movq 0x18(%r14), %r12
addq $0x8, %r14
cmpq %r14, %r12
je 0x103f8
movq 0x20(%r12), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x10430
testb %al, %al
je 0x103f6
movq %r12, %rdi
callq 0x54b0
movq %rax, %r12
cmpq %r14, %rax
jne 0x103d0
jmp 0x103f8
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/WShabti-Team[P]WShabtiPict/wshabtilib/api/task.cpp
// Function: pictcore::Task::findParamInSubtree(pictcore::Parameter*, pictcore::Model*)
bool Task::findParamInSubtree( Parameter* parameter, Model* root )
{
    // check if exists in current node collection
    for( auto p : root->GetParameters() )
    {
        if ( p == parameter ) return( true );
    }

    // check if exists in any of the children
    for( auto & submodel : root->GetSubmodels() )
    {
        bool found = findParamInSubtree( parameter, submodel );
        if ( found ) return( true );
    }

    return( false );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdx), %rax
movq 0x10(%rdx), %rcx
cmpq %rcx, %rax
je 0x10459
cmpq %r14, (%rax)
je 0x10483
addq $0x8, %rax
jmp 0x10449
addq $0x50, %rbx
movq %rbx, %r12
movq (%r12), %r12
cmpq %rbx, %r12
setne %bpl
je 0x10486
movq 0x10(%r12), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x10430
testb %al, %al
je 0x10460
jmp 0x10486
movb $0x1, %bpl
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop