// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: Sleigh::resolve(ParserContext&) const
void Sleigh::resolve (ParserContext& pos) const
// Resolve ALL the constructors involved in the
{
    // instruction at this address
    loader->loadFill (pos.getBuffer (), 16, pos.getAddr ());
    ParserWalkerChange walker (&pos);
    // Clear the previous resolve and initialize the walker
    pos.deallocateState (walker);
    Constructor *ct, *subct;
    uint4 off;
    int4 oper, numoper;

    pos.setDelaySlot (0);
    walker.setOffset (0);        // Initial offset
    pos.clearCommits ();         // Clear any old context commits
    pos.loadContext ();          // Get context for current address
    ct = root->resolve (walker); // Base constructor
    walker.setConstructor (ct);
    ct->applyContext (walker);
    while (walker.isState ()) {
        ct = walker.getConstructor ();
        oper = walker.getOperand ();
        numoper = ct->getNumOperands ();
        while (oper < numoper) {
            OperandSymbol* sym = ct->getOperand (oper);
            off = walker.getOffset (sym->getOffsetBase ()) +
                  sym->getRelativeOffset ();
            // Descend into new operand and reserve space
            pos.allocateOperand (oper, walker);
            walker.setOffset (off);
            TripleSymbol* tsym = sym->getDefiningSymbol ();
            if (tsym != (TripleSymbol*)0) {
                subct = tsym->resolve (walker);
                if (subct != (Constructor*)0) {
                    walker.setConstructor (subct);
                    subct->applyContext (walker);
                    break;
                }
            }
            walker.setCurrentLength (sym->getMinimumLength ());
            walker.popOperand ();
            oper += 1;
        }
        if (oper >= numoper) { // Finished processing constructor
            walker.calcCurrentLength (ct->getMinimumLength (), numoper);
            walker.popOperand ();
            // Check for use of delayslot
            ConstructTpl* templ = ct->getTempl ();
            if ((templ != (ConstructTpl*)0) && (templ->delaySlot () > 0))
                pos.setDelaySlot (templ->delaySlot ());
        }
    }
    // Update Naddr to pointer after instruction
    pos.setNaddr (pos.getAddr () + pos.getLength ());
    pos.setParserState (ParserContext::disassembly);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x1e0(%rdi), %rdi
addq $0x10, %rsi
leaq 0x50(%rbx), %r15
movq (%rdi), %rax
movl $0x10, %edx
movq %r15, %rcx
callq *0x10(%rax)
movq %rbx, 0x10(%rsp)
xorl %eax, %eax
movq %rax, 0x18(%rsp)
movl $0x1, 0xa0(%rbx)
movq %rbx, 0xb0(%rsp)
movq 0x98(%rbx), %rcx
movq %rcx, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movl %eax, 0xa4(%rbx)
movl %eax, 0x64(%rcx)
movq 0x38(%rbx), %rax
cmpq %rax, 0x40(%rbx)
je 0x58146
movq %rax, 0x40(%rbx)
movq 0x20(%rbx), %rdx
movq 0x30(%rbx), %rdi
movq %r15, %rsi
callq 0x421c0
movq 0x190(%r14), %rdi
movq (%rdi), %rax
leaq 0x10(%rsp), %r15
movq %r15, %rsi
callq *0x30(%rax)
movq %rax, %r14
movq 0x10(%r15), %rax
movq %r14, (%rax)
movq 0x48(%r14), %r12
cmpq 0x50(%r14), %r12
je 0x581a9
leaq 0x10(%rsp), %r15
movq (%r12), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0x28(%rax)
addq $0x8, %r12
cmpq 0x50(%r14), %r12
jne 0x58184
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x58322
leaq 0x10(%rsp), %r12
movq (%rax), %rdx
movslq 0x28(%rsp), %rcx
movl 0x2c(%rsp,%rcx,4), %ebp
movq 0x20(%rdx), %r15
movq %rdx, 0x8(%rsp)
subq 0x18(%rdx), %r15
shrq $0x3, %r15
cmpl %r15d, %ebp
jge 0x582cf
movslq %ebp, %rbp
movq 0x8(%rsp), %rdx
movq 0x18(%rdx), %rdx
movq (%rdx,%rbp,8), %r14
movslq 0x34(%r14), %rdx
testq %rdx, %rdx
js 0x581fd
movq 0x40(%rax), %rdi
movq (%rdi,%rdx,8), %rsi
movl 0x60(%rsi), %edx
addl 0x64(%rsi), %edx
jmp 0x58204
movl 0x64(%rax), %edx
movq 0x40(%rax), %rdi
addl 0x30(%r14), %edx
movslq 0xa0(%rbx), %rsi
leal 0x1(%rsi), %r8d
movl %r8d, 0xa0(%rbx)
movq 0x80(%rbx), %r8
imulq $0x68, %rsi, %r9
leaq (%r8,%r9), %rsi
movq %rax, 0x58(%r8,%r9)
movq $0x0, (%r8,%r9)
movq %rsi, (%rdi,%rbp,8)
leal 0x1(%rcx), %eax
movl %eax, 0x28(%rsp)
movslq %ecx, %rax
incl 0x2c(%rsp,%rax,4)
movq %rsi, 0x20(%rsp)
movslq 0x28(%rsp), %rax
movl $0x0, 0x2c(%rsp,%rax,4)
movl %edx, 0x64(%r8,%r9)
movq 0x48(%r14), %rdi
testq %rdi, %rdi
je 0x58281
movq (%rdi), %rax
movq %r12, %r13
movq %r12, %rsi
callq *0x30(%rax)
movq 0x20(%rsp), %rsi
testq %rax, %rax
jne 0x582a9
movq %r13, %r12
movl 0x38(%r14), %eax
movl %eax, 0x60(%rsi)
movq 0x58(%rsi), %rax
movq %rax, 0x20(%rsp)
movl 0x28(%rsp), %ecx
decl %ecx
movl %ecx, 0x28(%rsp)
incq %rbp
cmpl %ebp, %r15d
jne 0x581d7
jmp 0x582db
movq %rax, %r12
movq %rax, (%rsi)
movq 0x48(%rax), %r14
cmpq 0x50(%r12), %r14
je 0x582cc
movq (%r14), %rdi
movq (%rdi), %rax
movq %r13, %rsi
callq *0x28(%rax)
addq $0x8, %r14
jmp 0x582b3
movq %r13, %r12
cmpl %r15d, %ebp
jge 0x582db
movq 0x20(%rsp), %rax
jmp 0x58319
movq 0x8(%rsp), %r14
movl 0x80(%r14), %esi
movq %r12, %rdi
movl %r15d, %edx
callq 0x423c0
movq 0x20(%rsp), %rax
movq 0x58(%rax), %rax
movq %rax, 0x20(%rsp)
decl 0x28(%rsp)
movq 0x60(%r14), %rcx
testq %rcx, %rcx
je 0x58319
movl (%rcx), %ecx
testl %ecx, %ecx
je 0x58319
movl %ecx, 0xa4(%rbx)
testq %rax, %rax
jne 0x581ae
movq 0x50(%rbx), %rcx
movq 0x98(%rbx), %rax
movslq 0x60(%rax), %rax
addq 0x58(%rbx), %rax
movq 0x28(%rcx), %rsi
cmpq %rax, %rsi
jae 0x58353
incq %rsi
cqto
idivq %rsi
movq %rdx, %rax
sarq $0x3f, %rax
andq %rsi, %rax
addq %rdx, %rax
movq %rcx, 0x60(%rbx)
movq %rax, 0x68(%rbx)
movl $0x1, (%rbx)
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop