// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: SleighBuilder::dump(OpTpl*)
void SleighBuilder::dump (OpTpl* op)

{ // Dump on op through low-level dump interface
    // filling in dynamic loads and stores if necessary
    PcodeData* thisop;
    VarnodeData* invars;
    VarnodeData* loadvars;
    VarnodeData* storevars;
    VarnodeTpl *vn, *outvn;
    int4 isize = op->numInput ();
    // First build all the inputs
    invars = cache->allocateVarnodes (isize);
    for (int4 i = 0; i < isize; ++i) {
        vn = op->getIn (i);
        if (vn->isDynamic (*walker)) {
            // Input of -op- is really temporary storage
            generateLocation (vn, invars[i]);
            PcodeData* load_op = cache->allocateInstruction ();
            load_op->opc = CPUI_LOAD;
            load_op->outvar = invars + i;
            load_op->isize = 2;
            loadvars = load_op->invar = cache->allocateVarnodes (2);
            AddrSpace* spc = generatePointer (vn, loadvars[1]);
            loadvars[0].space = const_space;
            loadvars[0].offset = (uintb) (uintp)spc;
            loadvars[0].size = sizeof (spc);
        } else
            generateLocation (vn, invars[i]);
    }
    if ((isize > 0) && (op->getIn (0)->isRelative ())) {
        invars->offset += getLabelBase ();
        cache->addLabelRef (invars);
    }
    thisop = cache->allocateInstruction ();
    thisop->opc = op->getOpcode ();
    thisop->invar = invars;
    thisop->isize = isize;
    outvn = op->getOut ();
    if (outvn != (VarnodeTpl*)0) {
        if (outvn->isDynamic (*walker)) {
            storevars = cache->allocateVarnodes (3);
            generateLocation (
                outvn,
                storevars[2]); // Output of -op- is really temporary storage
            thisop->outvar = storevars + 2;
            PcodeData* store_op = cache->allocateInstruction ();
            store_op->opc = CPUI_STORE;
            store_op->isize = 3;
            // store_op->outvar = (VarnodeData *)0;
            store_op->invar = storevars;
            AddrSpace* spc = generatePointer (outvn, storevars[1]); // pointer
            storevars[0].space = const_space;
            storevars[0].offset = (uintb) (uintp)spc; // space in which to store
            storevars[0].size = sizeof (spc);
        } else {
            thisop->outvar = cache->allocateVarnodes (1);
            generateLocation (outvn, *thisop->outvar);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rsi), %r15
subq 0x10(%rsi), %r15
shrq $0x3, %r15
movq 0x40(%rdi), %rdi
movl %r15d, %esi
callq 0x51370
movq %rax, %r13
xorl %ebp, %ebp
testl %r15d, %r15d
movl $0x0, %ecx
movq %r15, 0x10(%rsp)
cmovgl %r15d, %ecx
movq %rcx, 0x20(%rsp)
movq %rax, 0x8(%rsp)
movq %r14, 0x18(%rsp)
cmpq %rbp, 0x20(%rsp)
je 0x6371d
movq 0x10(%r14), %rax
movq (%rax,%rbp,8), %r12
movq 0x10(%rbx), %rsi
movq %r12, %rdi
callq 0x51c00
movl %eax, %r15d
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x4f890
testb %r15b, %r15b
je 0x63711
movq 0x40(%rbx), %rdi
callq 0x50ec0
movq %rax, %r15
pushq $0x2
popq %rsi
movl %esi, (%rax)
movq %r13, 0x8(%rax)
movl %esi, 0x18(%rax)
movq 0x40(%rbx), %rdi
callq 0x51370
movq %rax, %r14
movq %rax, 0x10(%r15)
leaq 0x18(%rax), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4d180
movq 0x18(%rbx), %rcx
movq %rcx, (%r14)
movq %rax, 0x8(%r14)
movl $0x8, 0x10(%r14)
movq 0x18(%rsp), %r14
incq %rbp
addq $0x18, %r13
jmp 0x6368d
movq 0x10(%rsp), %r15
testl %r15d, %r15d
movq 0x8(%rsp), %r12
jle 0x6374d
movq 0x10(%r14), %rax
movq (%rax), %rax
cmpl $0x7, 0x20(%rax)
jne 0x6374d
movl 0x8(%rbx), %eax
addq %rax, 0x8(%r12)
movq 0x40(%rbx), %rdi
movq %r12, %rsi
callq 0x51e50
movq 0x40(%rbx), %rdi
callq 0x50ec0
movq %rax, %r13
movl 0x8(%r14), %eax
movl %eax, (%r13)
movq %r12, 0x10(%r13)
movl %r15d, 0x18(%r13)
movq (%r14), %r14
testq %r14, %r14
je 0x637dc
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x51c00
movq 0x40(%rbx), %rdi
testb %al, %al
je 0x637eb
pushq $0x3
popq %rbp
movl %ebp, %esi
callq 0x51370
movq %rax, %r15
leaq 0x30(%rax), %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x4f890
movq %r12, 0x8(%r13)
movq 0x40(%rbx), %rdi
callq 0x50ec0
movl %ebp, (%rax)
movl %ebp, 0x18(%rax)
movq %r15, 0x10(%rax)
leaq 0x18(%r15), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4d180
movq 0x18(%rbx), %rcx
movq %rcx, (%r15)
movq %rax, 0x8(%r15)
movl $0x8, 0x10(%r15)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rsi
callq 0x51370
movq %rax, 0x8(%r13)
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4f890
nop