// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slghsymbol.cc
// Function: SymbolTable::restoreXml(Element const*, SleighBase*)
void SymbolTable::restoreXml(const Element *el,SleighBase *trans)

{
  {
    uint4 size;
    istringstream s(el->getAttributeValue("scopesize"));
    s.unsetf(ios::dec | ios::hex | ios::oct);
    s >> size;
    table.resize(size,(SymbolScope *)0);
  }
  {
    uint4 size;
    istringstream s(el->getAttributeValue("symbolsize"));
    s.unsetf(ios::dec | ios::hex | ios::oct);
    s >> size;
    symbollist.resize(size,(SleighSymbol *)0);
  }
  const List &list(el->getChildren());
  List::const_iterator iter;
  iter = list.begin();
  for(int4 i=0;i<table.size();++i) { // Restore the scopes
    Element *subel = *iter;
    if (subel->getName() != "scope")
      throw SleighError("Misnumbered symbol scopes");
    uintm id;
    uintm parent;
    {
      istringstream s(subel->getAttributeValue("id"));
      s.unsetf(ios::dec | ios::hex | ios::oct);
      s >> id;
    }
    {
      istringstream s(subel->getAttributeValue("parent"));
      s.unsetf(ios::dec | ios::hex | ios::oct);
      s >> parent;
    }
    SymbolScope *parscope = (parent==id) ? (SymbolScope *)0 : table[parent];
    table[id] = new SymbolScope( parscope, id );
    ++iter;
  }
  curscope = table[0];		// Current scope is global

				// Now restore the symbol shells
  for(int4 i=0;i<symbollist.size();++i) {
    restoreSymbolHeader(*iter);
    ++iter;
  }
				// Now restore the symbol content
  while(iter != list.end()) {
    Element *subel = *iter;
    uintm id;
    SleighSymbol *sym;
    {
      istringstream s(subel->getAttributeValue("id"));
      s.unsetf(ios::dec | ios::hex | ios::oct);
      s >> id;
    }
    sym = findSymbol(id);
    sym->restoreXml(subel,trans);
    ++iter;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movq %rdx, 0x50(%rsp)
movq %rsi, %r12
movq %rdi, %r13
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1c430(%rip), %rsi     # 0x810d4
leaq 0x1c432(%rip), %rdx     # 0x810dd
leaq 0x10(%rsp), %rdi
callq 0x3f8a0
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x40f80
leaq 0x68(%rsp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x41c90
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x64ceb
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x40880
leaq 0x68(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x80(%rsp,%rax)
leaq 0xc(%rsp), %rsi
callq 0x41ec0
leaq 0x18(%r13), %rdi
movl 0xc(%rsp), %esi
leaq 0x10(%rsp), %rdx
movq $0x0, (%rdx)
movq %rdi, 0x58(%rsp)
callq 0x419a0
movq 0x3dfe2(%rip), %rsi     # 0xa2d10
leaq 0x68(%rsp), %rdi
callq 0x41450
leaq 0xe0(%rsp), %rdi
callq 0x3f730
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x1c38a(%rip), %rsi     # 0x810de
leaq 0x1c38d(%rip), %rdx     # 0x810e8
callq 0x3f8a0
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x40f80
leaq 0x68(%rsp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x41c90
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x64d96
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x40880
leaq 0x68(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x80(%rsp,%rax)
leaq 0xc(%rsp), %rsi
callq 0x41ec0
movl 0xc(%rsp), %esi
leaq 0x10(%rsp), %rdx
movq $0x0, (%rdx)
movq %r13, %rdi
callq 0x40c80
movq 0x3df3d(%rip), %rsi     # 0xa2d10
leaq 0x68(%rsp), %rdi
callq 0x41450
leaq 0xe0(%rsp), %rdi
callq 0x3f730
movq 0x78(%r12), %rcx
movq 0x18(%r13), %rax
cmpq %rax, 0x20(%r13)
movq %r12, 0x38(%rsp)
je 0x64fdd
leaq 0x10(%rsp), %rbx
leaq 0x68(%rsp), %rbp
xorl %edx, %edx
xorl %r12d, %r12d
movq %r13, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
movq %rdx, 0x60(%rsp)
movq (%rcx,%r12,8), %r13
movq %r13, %rdi
leaq 0x1c2bb(%rip), %rsi     # 0x810e9
callq 0x3f590
testl %eax, %eax
jne 0x65117
movq %r15, 0x10(%rsp)
movq %rbx, %rdi
leaq 0x1aec6(%rip), %rsi     # 0x7fd10
leaq 0x1aec1(%rip), %rdx     # 0x7fd12
callq 0x3f8a0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x40f80
movq %rbp, %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x41c90
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x64e88
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x40880
movq 0x68(%rsp), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x80(%rsp,%rax)
movq %rbp, %rdi
leaq 0xc(%rsp), %rsi
callq 0x41ec0
movq %rbp, %rdi
movq 0x3de60(%rip), %rsi     # 0xa2d10
callq 0x41450
leaq 0xe0(%rsp), %rdi
callq 0x3f730
movq %r15, 0x10(%rsp)
movq %rbx, %rdi
leaq 0x1c830(%rip), %rsi     # 0x81701
leaq 0x1c82f(%rip), %rdx     # 0x81707
callq 0x3f8a0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x40f80
movq %rbp, %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x41c90
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x64f0f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x40880
movq %r15, %r14
movq 0x68(%rsp), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x80(%rsp,%rax)
movq %rbp, %rbx
movq %rbp, %rdi
leaq 0x34(%rsp), %rsi
callq 0x41ec0
movq %rbx, %rdi
movq 0x3ddd3(%rip), %rsi     # 0xa2d10
callq 0x41450
leaq 0xe0(%rsp), %rdi
callq 0x3f730
movl 0x34(%rsp), %eax
movl 0xc(%rsp), %r13d
movq 0x58(%rsp), %rcx
movq (%rcx), %r15
cmpl %r13d, %eax
jne 0x64f69
xorl %ebx, %ebx
jmp 0x64f6d
movq (%r15,%rax,8), %rbx
movl $0x40, %edi
callq 0x40810
leaq 0x10(%rax), %rcx
movl $0x0, 0x10(%rax)
xorl %edx, %edx
movq %rdx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq %rcx, 0x28(%rax)
movq %rdx, 0x30(%rax)
movq %rbx, (%rax)
movl %r13d, 0x38(%rax)
movq %rax, (%r15,%r13,8)
incq %r12
movq 0x48(%rsp), %r13
movq 0x18(%r13), %rax
movq 0x20(%r13), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movq 0x60(%rsp), %rdx
addq $0x8, %rdx
cmpq %r12, %rcx
movq %r14, %r15
movq 0x40(%rsp), %rcx
leaq 0x10(%rsp), %rbx
ja 0x64e1b
addq %rdx, %rcx
movq 0x38(%rsp), %r12
movq (%rax), %rax
movq %rax, 0x30(%r13)
movq 0x8(%r13), %rax
cmpq (%r13), %rax
je 0x6502b
movq %r15, %rbp
xorl %ebx, %ebx
xorl %r15d, %r15d
movq (%rcx,%r15,8), %rsi
movq %r13, %rdi
movq %rcx, %r14
callq 0x3f570
movq %r14, %rcx
movq 0x8(%r13), %rax
subq (%r13), %rax
incq %r15
sarq $0x3, %rax
addq $0x8, %rbx
cmpq %r15, %rax
ja 0x64ff6
movq %r13, %r14
addq %rbx, %rcx
movq %rbp, %r15
jmp 0x6502e
movq %r13, %r14
cmpq 0x80(%r12), %rcx
je 0x65105
leaq 0x10(%rsp), %r13
leaq 0x68(%rsp), %rbp
movq %rcx, %rbx
movq (%rcx), %r12
movq %r15, 0x10(%rsp)
movq %r13, %rdi
leaq 0x1acb5(%rip), %rsi     # 0x7fd10
leaq 0x1acb0(%rip), %rdx     # 0x7fd12
callq 0x3f8a0
movq %r12, %rdi
movq %r13, %rsi
callq 0x40f80
movq %rbp, %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x41c90
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x65099
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x40880
movq 0x68(%rsp), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x80(%rsp,%rax)
movq %rbp, %rdi
leaq 0xc(%rsp), %rsi
callq 0x41ec0
movq %rbp, %rdi
movq 0x3dc4f(%rip), %rsi     # 0xa2d10
callq 0x41450
leaq 0xe0(%rsp), %rdi
callq 0x3f730
movl 0xc(%rsp), %eax
movq (%r14), %rcx
movq (%rcx,%rax,8), %rdi
movq (%rdi), %rax
movq %r12, %rsi
movq 0x50(%rsp), %rdx
callq *0x28(%rax)
movq %rbx, %rcx
addq $0x8, %rcx
movq 0x38(%rsp), %rax
cmpq 0x80(%rax), %rcx
jne 0x65046
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x3fb00
movq %rax, %r14
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1bfbb(%rip), %rsi     # 0x810ef
leaq 0x1bfcd(%rip), %rdx     # 0x81108
leaq 0x68(%rsp), %rdi
callq 0x3f8a0
movb $0x1, %bpl
leaq 0x68(%rsp), %rsi
movq %r14, %rdi
callq 0x3f890
xorl %ebp, %ebp
movq 0x3dd32(%rip), %rsi     # 0xa2e90
movq 0x3dad3(%rip), %rdx     # 0xa2c38
movq %r14, %rdi
callq 0x41d70
jmp 0x651b8
jmp 0x651b8
jmp 0x651b3
jmp 0x651b8
jmp 0x651b8
jmp 0x651b3
jmp 0x651df
jmp 0x651df
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x65197
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x40880
testb %bpl, %bpl
jne 0x651a1
jmp 0x651f9
movq %rax, %rbx
movq %r14, %rdi
callq 0x40090
jmp 0x651f9
jmp 0x651b3
jmp 0x651b8
jmp 0x651b3
jmp 0x651b8
movq %rax, %rbx
jmp 0x651f9
movq %rax, %rbx
movq 0x3db4e(%rip), %rsi     # 0xa2d10
leaq 0x68(%rsp), %rdi
callq 0x41450
leaq 0xe0(%rsp), %rdi
callq 0x3f730
jmp 0x651f9
jmp 0x651df
jmp 0x651df
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x651f9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x40880
movq %rbx, %rdi
callq 0x41f10
nop