// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/translate.cc
// Function: PcodeEmit::restoreXmlOp(Element const*, AddrSpaceManager const*)
void PcodeEmit::restoreXmlOp(const Element *el,const AddrSpaceManager *manage)

{ // Read a raw pcode op from DOM (and dump it)
  int4 opcode;
  VarnodeData outvar;
  VarnodeData invar[30];
  VarnodeData *outptr;

  istringstream i(el->getAttributeValue("code"));
  i >> opcode;
  const List &list(el->getChildren());
  List::const_iterator iter = list.begin();
  Address pc = Address::restoreXml(*iter,manage);
  ++iter;
  if ((*iter)->getName() == "void") 
    outptr = (VarnodeData *)0;
  else {
    outvar.restoreXml(*iter,manage);
    outptr = &outvar;
  }
  ++iter;
  int4 isize = 0;
  while(iter != list.end() && isize < 30) {
    if ((*iter)->getName() == "spaceid") {
      invar[isize].space = manage->getConstantSpace();
      invar[isize].offset = (uintb)(uintp)manage->getSpaceByName( (*iter)->getAttributeValue("name") );
      invar[isize].size = sizeof(void *);
    }
    else
      invar[isize].restoreXml(*iter,manage);
    isize += 1;
    ++iter;
  }
  dump(pc,(OpCode)opcode,outptr,invar,isize);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4d8, %rsp            # imm = 0x4D8
movq %rdx, 0x10(%rsp)
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x2b87a(%rip), %rsi     # 0x86ce1
leaq 0x48(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x515e0
leaq 0x48(%rsp), %rsi
movq %r12, %rdi
callq 0x50230
leaq 0x80(%rsp), %rdi
pushq $0x8
popq %rdx
movq %rax, %rsi
callq 0x51500
leaq 0x48(%rsp), %rdi
callq 0x4e020
leaq 0x80(%rsp), %rdi
leaq 0x1c(%rsp), %rsi
callq 0x4e750
movq 0x78(%r12), %r15
movq (%r15), %rsi
leaq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rdx
callq 0x51bd0
movq 0x8(%r15), %rdi
leaq 0x2b812(%rip), %rsi     # 0x86ce6
callq 0x520f0
testb %al, %al
je 0x5b4e8
movq $0x0, 0x20(%rsp)
jmp 0x5b500
movq 0x8(%r15), %rsi
leaq 0x68(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movq 0x10(%rsp), %rdx
callq 0x51aa0
movq %r12, 0x30(%rsp)
movq %rbx, 0x28(%rsp)
addq $0x10, %r15
leaq 0x200(%rsp), %rbp
xorl %r12d, %r12d
leaq 0x48(%rsp), %rbx
xorl %r13d, %r13d
leaq (%r15,%r12), %rax
movq 0x30(%rsp), %rcx
cmpq 0x80(%rcx), %rax
je 0x5b5cb
cmpq $0x1d, %r13
ja 0x5b5cb
movq (%r15,%r13,8), %rdi
leaq 0x2b79f(%rip), %rsi     # 0x86ceb
callq 0x520f0
testb %al, %al
je 0x5b5aa
movq 0x10(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, (%rbp)
movq (%r15,%r13,8), %r14
movq %rbx, %rdi
leaq 0x2aabe(%rip), %rsi     # 0x86031
leaq 0xf(%rsp), %rdx
callq 0x515e0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x50230
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x519f0
movq %rax, 0x8(%rbp)
movq %rbx, %rdi
callq 0x4e020
movl $0x8, 0x10(%rbp)
jmp 0x5b5bb
movq (%r15,%r13,8), %rsi
movq %rbp, %rdi
movq 0x10(%rsp), %rdx
callq 0x51aa0
incq %r13
addq $0x18, %rbp
addq $0x8, %r12
jmp 0x5b521
movl 0x1c(%rsp), %edx
movq 0x28(%rsp), %rdi
movq (%rdi), %rax
leaq 0x38(%rsp), %rsi
leaq 0x200(%rsp), %r8
movq 0x20(%rsp), %rcx
movl %r13d, %r9d
callq *0x10(%rax)
leaq 0x80(%rsp), %rdi
callq 0x4e070
addq $0x4d8, %rsp            # imm = 0x4D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5b62a
jmp 0x5b62a
movq %rax, %rbx
jmp 0x5b649
jmp 0x5b62a
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x4e020
jmp 0x5b649
jmp 0x5b62a
movq %rax, %rbx
jmp 0x5b63c
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x4e020
leaq 0x80(%rsp), %rdi
callq 0x4e070
movq %rbx, %rdi
callq 0x518c0
nop