// File: /workspace/github_cpp_makefile_star2_O1/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, (%rsp)
movq %rsi, %rbx
movq %rdi, %r13
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x31856(%rip), %rsi     # 0x7fd01
leaq 0x31853(%rip), %rdx     # 0x7fd05
leaq 0x8(%rsp), %rdi
callq 0x3f8a0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x40f70
leaq 0x80(%rsp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x41c80
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4e4fa
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
leaq 0x80(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
callq 0x3fe80
movq %rbx, 0x30(%rsp)
movq 0x78(%rbx), %r12
movq (%r12), %rsi
leaq 0x58(%rsp), %rdi
movq (%rsp), %rdx
callq 0x42110
movq 0x8(%r12), %rdi
leaq 0x317d3(%rip), %rsi     # 0x7fd06
callq 0x3f590
xorl %r14d, %r14d
testl %eax, %eax
je 0x4e557
movq 0x8(%r12), %rsi
leaq 0x68(%rsp), %rbp
movq %rbp, %rdi
movq (%rsp), %rdx
callq 0x42050
jmp 0x4e559
xorl %ebp, %ebp
leaq 0x10(%r12), %rbx
movq 0x30(%rsp), %rax
cmpq 0x80(%rax), %rbx
je 0x4e67f
movq %rbp, 0x38(%rsp)
movq %r13, 0x40(%rsp)
movq (%rsp), %rax
leaq 0x38(%rax), %rcx
movq %rcx, 0x50(%rsp)
addq $0x40, %rax
movq %rax, 0x48(%rsp)
addq $0x18, %r12
leaq 0x200(%rsp), %rbp
xorl %r13d, %r13d
movq (%rbx,%r13,8), %rdi
leaq 0x31761(%rip), %rsi     # 0x7fd0b
callq 0x3f590
testl %eax, %eax
je 0x4e5c8
movq (%rbx,%r13,8), %rsi
movq %rbp, %rdi
movq (%rsp), %rdx
callq 0x42050
jmp 0x4e64e
movq (%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, (%rbp)
movq (%rbx,%r13,8), %r14
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
leaq 0x30a3d(%rip), %rsi     # 0x7f031
leaq 0x30a3a(%rip), %rdx     # 0x7f035
callq 0x3f8a0
movq %r14, %rdi
movq %r15, %rsi
callq 0x40f70
movq 0x50(%rsp), %rdi
movq %rax, %rsi
callq 0x41ec0
cmpq 0x48(%rsp), %rax
je 0x4e625
movq 0x40(%rax), %rax
jmp 0x4e627
xorl %eax, %eax
movq %rax, 0x8(%rbp)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4e647
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
movl $0x8, 0x10(%rbp)
leaq 0x1(%r13), %r14
movq 0x30(%rsp), %rax
cmpq 0x80(%rax), %r12
je 0x4e675
addq $0x18, %rbp
addq $0x8, %r12
cmpq $0x1d, %r13
movq %r14, %r13
jb 0x4e59f
movq 0x40(%rsp), %r13
movq 0x38(%rsp), %rbp
movl 0x2c(%rsp), %edx
movq (%r13), %rax
leaq 0x58(%rsp), %rsi
leaq 0x200(%rsp), %r8
movq %r13, %rdi
movq %rbp, %rcx
movl %r14d, %r9d
callq *0x10(%rax)
movq 0x54669(%rip), %rsi     # 0xa2d10
leaq 0x80(%rsp), %rdi
callq 0x41440
leaq 0xf8(%rsp), %rdi
callq 0x3f730
addq $0x4d8, %rsp            # imm = 0x4D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4e701
jmp 0x4e701
movq %rax, %rbx
jmp 0x4e746
jmp 0x4e701
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4e746
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
jmp 0x4e746
jmp 0x4e701
movq %rax, %rbx
jmp 0x4e725
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4e725
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
movq 0x545e4(%rip), %rsi     # 0xa2d10
leaq 0x80(%rsp), %rdi
callq 0x41440
leaq 0xf8(%rsp), %rdi
callq 0x3f730
movq %rbx, %rdi
callq 0x41f00