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

{
  const List &list(el->getChildren());
  List::const_iterator iter = list.begin();

  while(iter != list.end()) {
    const Element *subel = *iter;
    if (subel->getName() == "context_pointset") {
      if (subel->getNumAttributes()==0) {
	restoreContext(subel,Address(),Address());	// Restore the default value
      }
      else {
	Address addr = Address::restoreXml(subel,manage);
	restoreContext(subel,addr,Address());
      }
    }
    else if (subel->getName() == "tracked_pointset") {
      Address addr = Address::restoreXml(subel,manage);
      restoreTracked(subel,manage,trackbase.split(addr) );
    }
    else
      throw LowlevelError("Bad <context_points> tag: "+subel->getName());
    ++iter;
  }
}

// Assembly:
subq $0xf8, %rsp
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
movq %rdx, 0xe0(%rsp)
movq 0xf0(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xe8(%rsp), %rdi
callq 0xde930
movq %rax, 0xd8(%rsp)
movq 0xd8(%rsp), %rdi
callq 0xd4960
movq %rax, 0xd0(%rsp)
movq 0xd8(%rsp), %rdi
callq 0xd7a70
movq %rax, 0xc8(%rsp)
leaq 0xd0(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0xd72b0
testb $0x1, %al
jne 0xecc59
jmp 0xece8f
leaq 0xd0(%rsp), %rdi
callq 0xddc90
movq (%rax), %rax
movq %rax, 0xc0(%rsp)
movq 0xc0(%rsp), %rdi
callq 0xcea10
movq %rax, %rdi
leaq 0x9a585(%rip), %rsi     # 0x18720d
callq 0xe30f0
testb $0x1, %al
jne 0xecc96
jmp 0xecd4b
movq 0xc0(%rsp), %rdi
callq 0xd2b80
cmpl $0x0, %eax
jne 0xeccf0
movq 0xc0(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0xe1dc0
leaq 0xa0(%rsp), %rdi
callq 0xe1dc0
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
leaq 0xa0(%rsp), %rcx
callq 0xd03d0
jmp 0xecd46
movq 0xc0(%rsp), %rsi
movq 0xe0(%rsp), %rdx
leaq 0x90(%rsp), %rdi
callq 0xe1830
movq 0xc0(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x80(%rsp), %rdi
callq 0xe1dc0
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rsi
leaq 0x90(%rsp), %rdx
leaq 0x80(%rsp), %rcx
callq 0xd03d0
jmp 0xece7d
movq 0xc0(%rsp), %rdi
callq 0xcea10
movq %rax, %rdi
leaq 0x9a484(%rip), %rsi     # 0x1871e6
callq 0xe30f0
testb $0x1, %al
jne 0xecd6d
jmp 0xecdce
movq 0xc0(%rsp), %rsi
movq 0xe0(%rsp), %rdx
leaq 0x70(%rsp), %rdi
callq 0xe1830
movq 0x38(%rsp), %rdi
movq 0xc0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x20(%rsp)
addq $0x88, %rdi
leaq 0x70(%rsp), %rsi
callq 0xd08e0
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rax, %rdx
callq 0xd95a0
jmp 0xece7b
movb $0x1, 0x43(%rsp)
movl $0x20, %edi
callq 0xd2b40
movq %rax, 0x8(%rsp)
movq 0xc0(%rsp), %rdi
callq 0xcea10
movq %rax, 0x10(%rsp)
jmp 0xecdf6
movq 0x10(%rsp), %rdx
leaq 0x9a4eb(%rip), %rsi     # 0x1872ed
leaq 0x50(%rsp), %rdi
callq 0xd7370
jmp 0xece0e
movq 0x8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xd1ae0
jmp 0xece1f
movq 0x8(%rsp), %rdi
movb $0x0, 0x43(%rsp)
movq 0xdb060(%rip), %rsi     # 0x1c7e90
movq 0xdad99(%rip), %rdx     # 0x1c7bd0
callq 0xe01f0
jmp 0xecea1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0xece66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xd4550
testb $0x1, 0x43(%rsp)
jne 0xece6f
jmp 0xece79
movq 0x8(%rsp), %rdi
callq 0xd5400
jmp 0xece97
jmp 0xece7d
leaq 0xd0(%rsp), %rdi
callq 0xd0700
jmp 0xecc26
addq $0xf8, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0xe0be0
nopw %cs:(%rax,%rax)