// File: /workspace/github_cpp_makefile_star2_O1/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 $0x1d8, %rsp            # imm = 0x1D8
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %rbp
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1c196(%rip), %rsi     # 0x810d4
leaq 0x1c198(%rip), %rdx     # 0x810dd
leaq 0x8(%rsp), %rdi
callq 0x3f8a0
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x40f70
leaq 0x58(%rsp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x41c80
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x64f85
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
leaq 0x58(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x70(%rsp,%rax)
leaq 0x4(%rsp), %rsi
callq 0x41eb0
leaq 0x18(%rbp), %rdi
movl 0x4(%rsp), %esi
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
movq %rdi, 0x48(%rsp)
callq 0x41990
movq 0x3dd4b(%rip), %rsi     # 0xa2d10
leaq 0x58(%rsp), %rdi
callq 0x41440
leaq 0xd0(%rsp), %rdi
callq 0x3f730
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x1c0f3(%rip), %rsi     # 0x810de
leaq 0x1c0f6(%rip), %rdx     # 0x810e8
callq 0x3f8a0
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x40f70
leaq 0x58(%rsp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x41c80
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6502d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
leaq 0x58(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x70(%rsp,%rax)
leaq 0x4(%rsp), %rsi
callq 0x41eb0
movl 0x4(%rsp), %esi
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
movq %rbp, %rdi
callq 0x40c70
movq 0x3dca9(%rip), %rsi     # 0xa2d10
leaq 0x58(%rsp), %rdi
callq 0x41440
leaq 0xd0(%rsp), %rdi
callq 0x3f730
movq 0x78(%r12), %r14
movq 0x18(%rbp), %rax
cmpq %rax, 0x20(%rbp)
movq %r12, 0x28(%rsp)
movq %rbp, 0x30(%rsp)
je 0x65278
movq %rbx, 0x40(%rsp)
leaq 0x8(%rsp), %rbp
xorl %edx, %edx
xorl %r13d, %r13d
movq %rdx, 0x50(%rsp)
movq (%r14,%r13,8), %r12
movq %r12, %rdi
leaq 0x1c02c(%rip), %rsi     # 0x810e9
callq 0x3f590
testl %eax, %eax
jne 0x653a3
movq %r15, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x1ac37(%rip), %rsi     # 0x7fd10
leaq 0x1ac32(%rip), %rdx     # 0x7fd12
callq 0x3f8a0
movq %r12, %rdi
movq %rbp, %rsi
callq 0x40f70
leaq 0x58(%rsp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x41c80
movq 0x8(%rsp), %rdi
movq %r15, %rbx
cmpq %r15, %rdi
je 0x6511c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
movq 0x58(%rsp), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x70(%rsp,%rax)
leaq 0x58(%rsp), %r15
movq %r15, %rdi
leaq 0x4(%rsp), %rsi
callq 0x41eb0
movq %r15, %rdi
movq 0x3dbca(%rip), %rsi     # 0xa2d10
callq 0x41440
leaq 0xd0(%rsp), %rdi
callq 0x3f730
movq %rbx, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x1c59a(%rip), %rsi     # 0x81701
leaq 0x1c599(%rip), %rdx     # 0x81707
callq 0x3f8a0
movq %r12, %rdi
movq %rbp, %rsi
callq 0x40f70
leaq 0x58(%rsp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x41c80
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x651a7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
movq 0x58(%rsp), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x70(%rsp,%rax)
leaq 0x58(%rsp), %r15
movq %r15, %rdi
leaq 0x3c(%rsp), %rsi
callq 0x41eb0
movq %r15, %rdi
movq 0x3db3f(%rip), %rsi     # 0xa2d10
callq 0x41440
leaq 0xd0(%rsp), %rdi
callq 0x3f730
movl 0x3c(%rsp), %eax
movl 0x4(%rsp), %r12d
cmpl %r12d, %eax
jne 0x651f6
xorl %r15d, %r15d
jmp 0x65202
movq 0x48(%rsp), %rcx
movq (%rcx), %rcx
movq (%rcx,%rax,8), %r15
movl $0x40, %edi
callq 0x40800
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 %r15, (%rax)
movl %r12d, 0x38(%rax)
movq 0x30(%rsp), %rdx
movq 0x18(%rdx), %rcx
movq %rax, (%rcx,%r12,8)
incq %r13
movq 0x18(%rdx), %rax
movq 0x20(%rdx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movq 0x50(%rsp), %rdx
addq $0x8, %rdx
cmpq %r13, %rcx
leaq 0x18(%rsp), %r15
ja 0x650aa
addq %rdx, %r14
movq 0x40(%rsp), %rbx
movq 0x28(%rsp), %r12
movq 0x30(%rsp), %rbp
movq (%rax), %rax
movq %rax, 0x30(%rbp)
movq 0x8(%rbp), %rax
cmpq (%rbp), %rax
je 0x652c0
movq %rbx, %r13
xorl %ebx, %ebx
xorl %r12d, %r12d
movq (%r14,%r12,8), %rsi
movq %rbp, %rdi
callq 0x3f570
movq 0x8(%rbp), %rax
subq (%rbp), %rax
incq %r12
sarq $0x3, %rax
addq $0x8, %rbx
cmpq %r12, %rax
ja 0x65291
addq %rbx, %r14
movq %r13, %rbx
movq 0x28(%rsp), %r12
cmpq 0x80(%r12), %r14
je 0x65391
leaq 0x8(%rsp), %r13
leaq 0x58(%rsp), %rbp
movq (%r14), %r12
movq %r15, 0x8(%rsp)
movq %r13, %rdi
leaq 0x1aa26(%rip), %rsi     # 0x7fd10
leaq 0x1aa21(%rip), %rdx     # 0x7fd12
callq 0x3f8a0
movq %r12, %rdi
movq %r13, %rsi
callq 0x40f70
movq %rbp, %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x41c80
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x65328
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
movq 0x58(%rsp), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x70(%rsp,%rax)
movq %rbp, %rdi
leaq 0x4(%rsp), %rsi
callq 0x41eb0
movq %rbp, %rdi
movq 0x3d9c3(%rip), %rsi     # 0xa2d10
callq 0x41440
leaq 0xd0(%rsp), %rdi
callq 0x3f730
movl 0x4(%rsp), %eax
movq 0x30(%rsp), %rcx
movq (%rcx), %rcx
movq (%rcx,%rax,8), %rdi
movq (%rdi), %rax
movq %r12, %rsi
movq %rbx, %rdx
callq *0x28(%rax)
addq $0x8, %r14
movq 0x28(%rsp), %rax
cmpq 0x80(%rax), %r14
jne 0x652d8
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x3fb00
movq %rax, %r14
leaq 0x68(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1bd2e(%rip), %rsi     # 0x810ef
leaq 0x1bd40(%rip), %rdx     # 0x81108
leaq 0x58(%rsp), %rdi
callq 0x3f8a0
movb $0x1, %bl
leaq 0x58(%rsp), %rsi
movq %r14, %rdi
callq 0x3f890
xorl %ebx, %ebx
movq 0x3daa6(%rip), %rsi     # 0xa2e90
movq 0x3d847(%rip), %rdx     # 0xa2c38
movq %r14, %rdi
callq 0x41d60
jmp 0x65445
jmp 0x65445
jmp 0x65440
jmp 0x65445
jmp 0x65445
jmp 0x65440
jmp 0x6546a
jmp 0x6546a
movq %rax, %r15
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x6542a
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x40870
jmp 0x6542a
movq %rax, %r15
movb $0x1, %bl
testb %bl, %bl
je 0x65487
movq %r14, %rdi
callq 0x40080
jmp 0x65487
jmp 0x65440
jmp 0x65445
jmp 0x65440
jmp 0x65445
movq %rax, %r15
jmp 0x65487
movq %rax, %r15
movq 0x3d8c1(%rip), %rsi     # 0xa2d10
leaq 0x58(%rsp), %rdi
callq 0x41440
leaq 0xd0(%rsp), %rdi
callq 0x3f730
jmp 0x65487
jmp 0x6546a
movq %r15, %rcx
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %rcx, %rdi
je 0x65487
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
movq %r15, %rdi
callq 0x41f00
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
jne 0x6547a
jmp 0x65487