// File: /workspace/github_cpp_makefile_star2_O3/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 0x31962(%rip), %rsi     # 0x7fd01
leaq 0x3195f(%rip), %rdx     # 0x7fd05
leaq 0x8(%rsp), %rdi
callq 0x3f8a0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x40f80
leaq 0x80(%rsp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x41c90
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4e3ee
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40880
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 0x42120
movq 0x8(%r12), %rdi
leaq 0x318df(%rip), %rsi     # 0x7fd06
callq 0x3f590
xorl %r14d, %r14d
testl %eax, %eax
je 0x4e44b
movq 0x8(%r12), %rsi
leaq 0x68(%rsp), %rbp
movq %rbp, %rdi
movq (%rsp), %rdx
callq 0x42060
jmp 0x4e44d
xorl %ebp, %ebp
leaq 0x10(%r12), %rbx
movq 0x30(%rsp), %rax
cmpq 0x80(%rax), %rbx
je 0x4e573
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 0x3186d(%rip), %rsi     # 0x7fd0b
callq 0x3f590
testl %eax, %eax
je 0x4e4bc
movq (%rbx,%r13,8), %rsi
movq %rbp, %rdi
movq (%rsp), %rdx
callq 0x42060
jmp 0x4e542
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 0x30b49(%rip), %rsi     # 0x7f031
leaq 0x30b46(%rip), %rdx     # 0x7f035
callq 0x3f8a0
movq %r14, %rdi
movq %r15, %rsi
callq 0x40f80
movq 0x50(%rsp), %rdi
movq %rax, %rsi
callq 0x41ed0
cmpq 0x48(%rsp), %rax
je 0x4e519
movq 0x40(%rax), %rax
jmp 0x4e51b
xorl %eax, %eax
movq %rax, 0x8(%rbp)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4e53b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40880
movl $0x8, 0x10(%rbp)
leaq 0x1(%r13), %r14
movq 0x30(%rsp), %rax
cmpq 0x80(%rax), %r12
je 0x4e569
addq $0x18, %rbp
addq $0x8, %r12
cmpq $0x1d, %r13
movq %r14, %r13
jb 0x4e493
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 0x54775(%rip), %rsi     # 0xa2d10
leaq 0x80(%rsp), %rdi
callq 0x41450
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 0x4e5f5
jmp 0x4e5f5
movq %rax, %rbx
jmp 0x4e63a
jmp 0x4e5f5
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4e63a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40880
jmp 0x4e63a
jmp 0x4e5f5
movq %rax, %rbx
jmp 0x4e619
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4e619
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40880
movq 0x546f0(%rip), %rsi     # 0xa2d10
leaq 0x80(%rsp), %rdi
callq 0x41450
leaq 0xf8(%rsp), %rdi
callq 0x3f730
movq %rbx, %rdi
callq 0x41f10