// File: /workspace/github_cpp_makefile_star2_O1/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)
movq %rbx, 0xb0(%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 0x5841e
movq %rax, 0x40(%rbx)
movq 0x20(%rbx), %rdx
movq 0x30(%rbx), %rdi
movq %r15, %rsi
callq 0x421b0
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 0x58473
leaq 0x10(%rsp), %r15
movq (%r12), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0x28(%rax)
addq $0x8, %r12
cmpq 0x50(%r14), %r12
jne 0x5845c
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x585ff
leaq 0x10(%rsp), %r14
movq (%rax), %rcx
movslq 0x28(%rsp), %rax
movl 0x2c(%rsp,%rax,4), %ebp
movq 0x20(%rcx), %r15
movq %rcx, 0x8(%rsp)
subq 0x18(%rcx), %r15
shrq $0x3, %r15
cmpl %r15d, %ebp
jge 0x585ac
movslq %ebp, %rax
movq 0x8(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq (%rcx,%rax,8), %r13
movslq 0x34(%r13), %rcx
movq 0x20(%rsp), %rdx
testq %rcx, %rcx
js 0x584da
movq 0x40(%rdx), %rdx
movq (%rdx,%rcx,8), %rdx
movl 0x60(%rdx), %ecx
addl 0x64(%rdx), %ecx
jmp 0x584dd
movl 0x64(%rdx), %ecx
addl 0x30(%r13), %ecx
movslq 0xa0(%rbx), %rdx
leal 0x1(%rdx), %esi
movl %esi, 0xa0(%rbx)
movq 0x80(%rbx), %rsi
imulq $0x68, %rdx, %rdx
leaq (%rsi,%rdx), %rdi
movq 0x20(%rsp), %r8
movq %r8, 0x58(%rsi,%rdx)
movq $0x0, (%rsi,%rdx)
movq 0x40(%r8), %r8
movq %rdi, (%r8,%rax,8)
movslq 0x28(%rsp), %rax
leal 0x1(%rax), %r8d
movl %r8d, 0x28(%rsp)
incl 0x2c(%rsp,%rax,4)
movq %rdi, 0x20(%rsp)
movslq 0x28(%rsp), %rax
movl $0x0, 0x2c(%rsp,%rax,4)
movl %ecx, 0x64(%rsi,%rdx)
movq 0x48(%r13), %rdi
testq %rdi, %rdi
je 0x58583
movq (%rdi), %rax
movq %r14, %rsi
callq *0x30(%rax)
testq %rax, %rax
je 0x58583
movq %rax, %r12
movq 0x20(%rsp), %rax
movq %r12, (%rax)
movq 0x48(%r12), %r13
cmpq 0x50(%r12), %r13
je 0x585a2
movq (%r13), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x28(%rax)
addq $0x8, %r13
jmp 0x58569
movl 0x38(%r13), %eax
movq 0x20(%rsp), %rcx
movl %eax, 0x60(%rcx)
movq 0x58(%rcx), %rax
movq %rax, 0x20(%rsp)
decl 0x28(%rsp)
incl %ebp
movb $0x1, %al
jmp 0x585a4
xorl %eax, %eax
testb %al, %al
jne 0x584a3
cmpl %r15d, %ebp
jl 0x585f1
movq 0x8(%rsp), %r12
movl 0x80(%r12), %esi
movq %r14, %rdi
movl %r15d, %edx
callq 0x423b0
movq 0x20(%rsp), %rax
movq 0x58(%rax), %rax
movq %rax, 0x20(%rsp)
decl 0x28(%rsp)
movq 0x60(%r12), %rax
testq %rax, %rax
je 0x585f1
movl (%rax), %eax
testl %eax, %eax
je 0x585f1
movl %eax, 0xa4(%rbx)
movq 0x20(%rsp), %rax
testq %rax, %rax
jne 0x58486
movq 0x50(%rbx), %rcx
movq 0x98(%rbx), %rax
movslq 0x60(%rax), %rax
addq 0x58(%rbx), %rax
movq 0x28(%rcx), %rsi
cmpq %rax, %rsi
jae 0x58630
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