// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/space.cc
// Function: OverlaySpace::restoreXml(Element const*)
void OverlaySpace::restoreXml(const Element *el)

{
  name = el->getAttributeValue("name");
  istringstream s1(el->getAttributeValue("index"));
  s1.unsetf(ios::dec | ios::hex | ios::oct);
  s1 >> index;
  
  string basename = el->getAttributeValue("base");
  baseSpace = getManager()->getSpaceByName(basename);
  if (baseSpace == (AddrSpace *)0)
    throw LowlevelError("Base space does not exist for overlay space: "+name);
  addressSize = baseSpace->getAddrSize();
  wordsize = baseSpace->getWordSize();
  delay = baseSpace->getDelay();
  deadcodedelay = baseSpace->getDeadcodeDelay();
  calcScaleMask();

  if (baseSpace->isBigEndian())
    setFlags(big_endian);
  if (baseSpace->hasPhysical())
    setFlags(hasphysical);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x2cc21(%rip), %rsi     # 0x86031
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x515e0
leaq 0x48(%rsp), %rsi
movq %r15, %rdi
callq 0x50230
leaq 0x38(%rbx), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x4e400
leaq 0x48(%rsp), %rdi
callq 0x4e020
leaq 0x2d2da(%rip), %rsi     # 0x86726
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x515e0
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x50230
leaq 0x48(%rsp), %rdi
pushq $0x8
popq %rdx
movq %rax, %rsi
callq 0x51500
leaq 0x8(%rsp), %rdi
callq 0x4e020
leaq 0x48(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x60(%rsp,%rax)
leaq 0x60(%rbx), %rsi
callq 0x4e750
leaq 0x2d5e4(%rip), %rsi     # 0x86a87
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x515e0
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x50230
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x50630
leaq 0x28(%rsp), %rdi
callq 0x4e020
movq 0x10(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x519f0
movq %rax, 0x70(%rbx)
testq %rax, %rax
je 0x59543
movq 0x58(%rax), %rcx
movq %rcx, 0x58(%rbx)
movq 0x64(%rax), %rax
movq %rax, 0x64(%rbx)
movq %rbx, %rdi
callq 0x4e7c0
movq 0x70(%rbx), %rcx
movl 0x24(%rcx), %eax
testb $0x1, %al
je 0x59517
orb $0x1, 0x24(%rbx)
movl 0x24(%rcx), %eax
btl $0x8, %eax
jae 0x59521
orb $0x1, 0x25(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x4e020
leaq 0x48(%rsp), %rdi
callq 0x4e070
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %r15
leaq 0x2d398(%rip), %rsi     # 0x868ed
leaq 0x28(%rsp), %rdi
movq %r14, %rdx
callq 0x4f1c0
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x4ddf0
xorl %ebp, %ebp
movq 0x55925(%rip), %rsi     # 0xaeea0
movq 0x556b6(%rip), %rdx     # 0xaec38
movq %r15, %rdi
callq 0x51630
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x595a1
jmp 0x595ae
movq %rax, %rbx
movq %r15, %rdi
callq 0x4ea60
jmp 0x595ae
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x595cb
jmp 0x595b7
movq %rax, %rbx
jmp 0x595d0
jmp 0x595be
movq %rax, %rbx
jmp 0x595f3
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x4e020
leaq 0x48(%rsp), %rdi
callq 0x4e070
jmp 0x595f3
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x595ee
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x4e020
movq %rbx, %rdi
callq 0x518c0
nop