// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x334d9(%rip), %rsi     # 0x7f031
leaq 0x334d6(%rip), %rdx     # 0x7f035
leaq 0x48(%rsp), %rdi
callq 0x3f8a0
leaq 0x48(%rsp), %rsi
movq %r15, %rdi
callq 0x40f70
leaq 0x38(%rbx), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x3fc60
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x4bb9c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x40870
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x33b79(%rip), %rsi     # 0x7f726
leaq 0x33b77(%rip), %rdx     # 0x7f72b
leaq 0x8(%rsp), %rdi
callq 0x3f8a0
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x40f70
leaq 0x48(%rsp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x41c80
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4bbf4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
leaq 0x48(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x60(%rsp,%rax)
leaq 0x60(%rbx), %rsi
callq 0x3fe80
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x33e89(%rip), %rsi     # 0x7faa7
leaq 0x33e86(%rip), %rdx     # 0x7faab
leaq 0x28(%rsp), %rdi
callq 0x3f8a0
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x40f70
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
callq 0x3f8e0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4bc6a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x40870
movq 0x10(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x41fd0
movq %rax, 0x70(%rbx)
testq %rax, %rax
je 0x4bd18
movl 0x58(%rax), %ecx
movl %ecx, 0x58(%rbx)
movl 0x5c(%rax), %edx
movl %edx, 0x5c(%rbx)
movq 0x64(%rax), %rsi
movq %rsi, 0x64(%rbx)
cmpl $0x8, %ecx
movl $0x8, %esi
cmovll %ecx, %esi
movslq %esi, %rcx
movq 0x56f22(%rip), %rsi     # 0xa2bd0
leal -0x1(%rdx), %edi
imulq (%rsi,%rcx,8), %rdx
addq %rdx, %rdi
movq %rdi, 0x28(%rbx)
testb $0x1, 0x24(%rax)
je 0x4bcc7
orb $0x1, 0x24(%rbx)
testb $0x1, 0x25(%rax)
je 0x4bcd1
orb $0x1, 0x25(%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4bce8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
movq 0x57021(%rip), %rsi     # 0xa2d10
leaq 0x48(%rsp), %rdi
callq 0x41440
leaq 0xc0(%rsp), %rdi
callq 0x3f730
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x3fb00
movq %rax, %r15
leaq 0x33bc1(%rip), %rsi     # 0x7f8ed
leaq 0x28(%rsp), %rdi
movq %r14, %rdx
callq 0x40500
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x3f890
xorl %ebp, %ebp
movq 0x57156(%rip), %rsi     # 0xa2ea8
movq 0x56edf(%rip), %rdx     # 0xa2c38
movq %r15, %rdi
callq 0x41d60
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4bd83
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x40870
jmp 0x4bd83
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x4bd95
movq %r15, %rdi
callq 0x40080
jmp 0x4bd95
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4bdce
movq 0x18(%rsp), %rsi
jmp 0x4bdc6
jmp 0x4bda8
movq %rax, %rbx
jmp 0x4bdce
jmp 0x4bdaf
movq %rax, %rbx
jmp 0x4be1c
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4bdce
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x40870
movq 0x56f3b(%rip), %rsi     # 0xa2d10
leaq 0x48(%rsp), %rdi
callq 0x41440
leaq 0xc0(%rsp), %rdi
callq 0x3f730
jmp 0x4be1c
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4be1c
movq 0x18(%rsp), %rsi
jmp 0x4be14
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x4be1c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x40870
movq %rbx, %rdi
callq 0x41f00