// File: jstaursky[P]hutch/src/Sleigh/pcoderaw.cc
// Function: VarnodeData::restoreXml(Element const*, AddrSpaceManager const*)
void VarnodeData::restoreXml(const Element *el,const AddrSpaceManager *manage)

{
  space = (AddrSpace *)0;
  size = 0;
  int4 num = el->getNumAttributes();
  for(int4 i=0;i<num;++i) {
    if (el->getAttributeName(i)=="space") {
      space = manage->getSpaceByName(el->getAttributeValue(i));
      if (space == (AddrSpace *)0)
	throw LowlevelError("Unknown space name: "+el->getAttributeValue(i));
      offset = space->restoreXmlAttributes(el,size);
      return;
    }
    else if (el->getAttributeName(i)=="name") {
      const Translate *trans = manage->getDefaultSpace()->getTrans();
      const VarnodeData &point(trans->getRegister(el->getAttributeValue(i)));
      *this = point;
      return;
    }
  }
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x20(%rsp)
movq $0x0, (%rax)
movl $0x0, 0x10(%rax)
movq 0x78(%rsp), %rdi
callq 0xd2b80
movl %eax, 0x6c(%rsp)
movl $0x0, 0x68(%rsp)
movl 0x68(%rsp), %eax
cmpl 0x6c(%rsp), %eax
jge 0xf53b0
movq 0x78(%rsp), %rdi
movl 0x68(%rsp), %esi
callq 0xd5520
movq %rax, %rdi
leaq 0x92929(%rip), %rsi     # 0x187b19
callq 0xe30f0
testb $0x1, %al
jne 0xf51fe
jmp 0xf5314
movq 0x70(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x78(%rsp), %rdi
movl 0x68(%rsp), %esi
callq 0xd9670
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0xe10d0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
cmpq $0x0, (%rax)
jne 0xf52ec
movb $0x1, 0x3b(%rsp)
movl $0x20, %edi
callq 0xd2b40
movq %rax, 0x8(%rsp)
movq 0x78(%rsp), %rdi
movl 0x68(%rsp), %esi
callq 0xd9670
movq %rax, 0x10(%rsp)
jmp 0xf5261
movq 0x10(%rsp), %rdx
leaq 0x92524(%rip), %rsi     # 0x187791
leaq 0x48(%rsp), %rdi
callq 0xd7370
jmp 0xf5279
movq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xd1ae0
jmp 0xf528a
movq 0x8(%rsp), %rdi
movb $0x0, 0x3b(%rsp)
movq 0xd2bf5(%rip), %rsi     # 0x1c7e90
movq 0xd292e(%rip), %rdx     # 0x1c7bd0
callq 0xe01f0
jmp 0xf53c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
jmp 0xf52d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0xd4550
testb $0x1, 0x3b(%rsp)
jne 0xf52dd
jmp 0xf52e7
movq 0x8(%rsp), %rdi
callq 0xd5400
jmp 0xf53b8
movq 0x20(%rsp), %rdx
movq (%rdx), %rdi
movq 0x78(%rsp), %rsi
addq $0x10, %rdx
movq (%rdi), %rax
callq *0x48(%rax)
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0xf53b0
movq 0x78(%rsp), %rdi
movl 0x68(%rsp), %esi
callq 0xd5520
movq %rax, %rdi
leaq 0x91d05(%rip), %rsi     # 0x187031
callq 0xe30f0
testb $0x1, %al
jne 0xf5337
jmp 0xf539c
movq 0x70(%rsp), %rdi
callq 0xd9770
movq %rax, %rdi
callq 0xdf7e0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movq 0x78(%rsp), %rdi
movl 0x68(%rsp), %esi
callq 0xd9670
movq (%rsp), %rdi
movq %rax, %rsi
movq (%rdi), %rax
callq *0x38(%rax)
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x28(%rsp)
movq 0x28(%rsp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0xf53b0
jmp 0xf539e
jmp 0xf53a0
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0xf51ca
addq $0x88, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0xe0be0
nopw %cs:(%rax,%rax)
nopl (%rax)