// File: jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: MacroBuilder::dump(OpTpl*)
void MacroBuilder::dump(OpTpl *op)

{
  OpTpl *clone;
  VarnodeTpl *v_clone,*vn;
  
  clone = new OpTpl(op->getOpcode());
  vn = op->getOut();
  if (vn != (VarnodeTpl *)0) {
    v_clone = new VarnodeTpl(*vn);
    clone->setOutput(v_clone);
  }
  for(int4 i=0;i<op->numInput();++i) {
    vn = op->getIn(i);
    v_clone = new VarnodeTpl(*vn);
    if (v_clone->isRelative()) {
      // Adjust relative index, depending on the labelbase
      uintb val = v_clone->getOffset().getReal() + getLabelBase();
      v_clone->setRelative(val);
    }
    clone->addInput(v_clone);
  }
  if (!transferOp(clone,params))
    delete clone;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0x28, %edi
callq 0x11440
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3fd40
movl %eax, -0x44(%rbp)
jmp 0x60c17
movl -0x44(%rbp), %esi
movq -0x50(%rbp), %rdi
callq 0x3fbb0
jmp 0x60c25
movq -0x50(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3f7a0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x60cb5
movl $0x68, %edi
callq 0x11440
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rsi
callq 0x4bb20
jmp 0x60c60
movq -0x60(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x3fb90
jmp 0x60cb5
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x28, %esi
callq 0x11450
jmp 0x60dd9
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x68, %esi
callq 0x11450
jmp 0x60dd9
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x64(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3fcc0
movl %eax, %ecx
movl -0x64(%rbp), %eax
cmpl %ecx, %eax
jge 0x60d91
movq -0x10(%rbp), %rdi
movl -0x38(%rbp), %esi
callq 0x3fce0
movq %rax, -0x28(%rbp)
movl $0x68, %edi
callq 0x11440
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x70(%rbp)
movq -0x28(%rbp), %rsi
callq 0x4bb20
jmp 0x60d07
movq -0x70(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x52710
testb $0x1, %al
jne 0x60d1e
jmp 0x60d76
movq -0x20(%rbp), %rdi
callq 0x3fca0
movq %rax, %rdi
callq 0x3fc20
movq -0x58(%rbp), %rdi
movq %rax, -0x78(%rbp)
callq 0x52740
movl %eax, %ecx
movq -0x78(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x6b170
jmp 0x60d76
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x68, %esi
callq 0x11450
jmp 0x60dd9
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x3fa10
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x60cbc
movq -0x58(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq %rdi, %rdx
addq $0x30, %rdx
callq 0x605a0
testb $0x1, %al
jne 0x60dd0
movq -0x18(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, %rax
je 0x60dce
movq -0x80(%rbp), %rdi
callq 0x4c740
movq -0x80(%rbp), %rdi
movl $0x28, %esi
callq 0x11450
jmp 0x60dd0
addq $0x80, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x118b0
nopw %cs:(%rax,%rax)