// File: /workspace/github_cpp_makefile_star2_O3/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 $0x48, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rsi), %r12
subq 0x10(%rsi), %r12
shrq $0x3, %r12
movq 0x40(%rdi), %rdi
movq 0x8(%rdi), %rbp
movl %r12d, %eax
leaq (%rax,%rax,2), %rax
leaq (,%rax,8), %rax
addq %rbp, %rax
cmpq 0x10(%rdi), %rax
jbe 0x572f9
movl %r12d, %esi
callq 0x40c60
movq %rax, %rbp
jmp 0x572fd
movq %rax, 0x8(%rdi)
testl %r12d, %r12d
jle 0x5741e
movq %r12, 0x8(%rsp)
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movq %r12, 0x18(%rsp)
xorl %r14d, %r14d
movq %rbp, (%rsp)
movq %r15, 0x10(%rsp)
movq 0x10(%r15), %rax
movq (%rax,%r14,8), %r12
movq 0x10(%rbx), %rsi
movq %r12, %rdi
callq 0x42140
movl %eax, %r13d
movq %rbx, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x409e0
testb %r13b, %r13b
je 0x573de
movq 0x40(%rbx), %r15
leaq 0x18(%r15), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
leaq 0x20(%rsp), %rsi
callq 0x423e0
movq 0x20(%r15), %r15
movq $0x0, -0x10(%r15)
movl $0x2, %eax
movl %eax, -0x20(%r15)
movq %rbp, -0x18(%r15)
movl %eax, -0x8(%r15)
movq 0x40(%rbx), %rdi
movq 0x8(%rdi), %r13
leaq 0x30(%r13), %rax
cmpq 0x10(%rdi), %rax
jbe 0x573ae
movl $0x2, %esi
callq 0x40c60
movq %rax, %r13
jmp 0x573b2
movq %rax, 0x8(%rdi)
movq %r13, -0x10(%r15)
leaq 0x18(%r13), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3f110
movq 0x18(%rbx), %rcx
movq %rcx, (%r13)
movq %rax, 0x8(%r13)
movl $0x8, 0x10(%r13)
movq 0x10(%rsp), %r15
incq %r14
addq $0x18, %rbp
cmpq %r14, 0x18(%rsp)
jne 0x57323
movq 0x8(%rsp), %r12
testl %r12d, %r12d
movq (%rsp), %rbp
jle 0x5741e
movq 0x10(%r15), %rax
movq (%rax), %rax
cmpl $0x7, 0x20(%rax)
jne 0x5741e
movl 0x8(%rbx), %eax
addq %rax, 0x8(%rbp)
movq 0x40(%rbx), %rdi
movq %rbp, %rsi
callq 0x422e0
movq 0x40(%rbx), %r14
leaq 0x18(%r14), %rdi
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
callq 0x423e0
movq 0x20(%r14), %r13
xorps %xmm0, %xmm0
movups %xmm0, -0x18(%r13)
movl 0x8(%r15), %eax
movl %eax, -0x20(%r13)
movq %rbp, -0x10(%r13)
movl %r12d, -0x8(%r13)
movq (%r15), %r14
testq %r14, %r14
je 0x57543
addq $-0x18, %r13
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x42140
movq 0x40(%rbx), %rdi
movq 0x8(%rdi), %r15
movq 0x10(%rdi), %rcx
testb %al, %al
je 0x5749a
leaq 0x48(%r15), %rax
cmpq %rcx, %rax
jbe 0x574b6
movl $0x3, %esi
callq 0x40c60
movq %rax, %r15
jmp 0x574ba
leaq 0x18(%r15), %rax
cmpq %rcx, %rax
jbe 0x5752d
movl $0x1, %esi
callq 0x40c60
movq %rax, %r15
jmp 0x57531
movq %rax, 0x8(%rdi)
leaq 0x30(%r15), %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x409e0
movq %r12, (%r13)
movq 0x40(%rbx), %r12
leaq 0x18(%r12), %rdi
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
callq 0x423e0
movq 0x20(%r12), %rax
movq $0x0, -0x18(%rax)
movl $0x3, %ecx
movl %ecx, -0x20(%rax)
movl %ecx, -0x8(%rax)
movq %r15, -0x10(%rax)
leaq 0x18(%r15), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3f110
movq 0x18(%rbx), %rcx
movq %rcx, (%r15)
movq %rax, 0x8(%r15)
movl $0x8, 0x10(%r15)
jmp 0x57543
movq %rax, 0x8(%rdi)
movq %r15, (%r13)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x409e0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq