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

{
  maxdelayslotbytes = 0;
  unique_allocatemask = 0;
  numSections = 0;
  int4 version = 0;
  setBigEndian(xml_readbool(el->getAttributeValue("bigendian")));
  {
    istringstream s(el->getAttributeValue("align"));
    s.unsetf(ios::dec | ios::hex | ios::oct);
    s >> alignment;
  }
  {
    istringstream s(el->getAttributeValue("uniqbase"));
    s.unsetf(ios::dec | ios::hex | ios::oct);
    uintm ubase;
    s >> ubase;
    setUniqueBase(ubase);
  }
  int4 numattr = el->getNumAttributes();
  for(int4 i=0;i<numattr;++i) {
    const string &attrname( el->getAttributeName(i) );
    if (attrname == "maxdelay") {
      istringstream s1(el->getAttributeValue(i));
      s1.unsetf(ios::dec | ios::hex | ios::oct);
      s1 >> maxdelayslotbytes;
    }
    else if (attrname == "uniqmask") {
      istringstream s2(el->getAttributeValue(i));
      s2.unsetf(ios::dec | ios::hex | ios::oct);
      s2 >> unique_allocatemask;
    }
    else if (attrname == "numsections") {
      istringstream s3(el->getAttributeValue(i));
      s3.unsetf(ios::dec | ios::hex | ios::oct);
      s3 >> numSections;
    }
    else if (attrname == "version") {
      istringstream s(el->getAttributeValue(i));
      s.unsetf(ios::dec | ios::hex | ios::oct);
      s >> version;
    }
  }
  if (version != SLA_FORMAT_VERSION)
    throw LowlevelError(".sla file has wrong format");
  const List &list(el->getChildren());
  List::const_iterator iter;
  iter = list.begin();
  while((*iter)->getName() == "floatformat") {
    floatformats.push_back(FloatFormat());
    floatformats.back().restoreXml(*iter);
    ++iter;
  }
  restoreXmlSpaces(*iter,this);
  iter++;
  symtab.restoreXml(*iter,this);
  root = (SubtableSymbol *)symtab.getGlobalScope()->findSymbol("instruction");
  buildXrefs();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rdi, %rbx
andq $0x0, 0x1d0(%rdi)
andl $0x0, 0x1d8(%rdi)
movq %rsi, %r14
andl $0x0, 0xc(%rsp)
leaq 0x20a64(%rip), %rsi     # 0x8672c
leaq 0x48(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x515e0
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
callq 0x50230
movq %rax, %rdi
callq 0x4fb70
movb %al, 0x120(%rbx)
leaq 0x48(%rsp), %rdi
callq 0x4e020
leaq 0x218cc(%rip), %rsi     # 0x875cf
leaq 0x10(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x515e0
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x50230
leaq 0x48(%rsp), %rdi
pushq $0x8
popq %rdx
movq %rax, %rsi
callq 0x51500
leaq 0x10(%rsp), %rdi
callq 0x4e020
leaq 0x48(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x60(%rsp,%rax)
leaq 0x128(%rbx), %rsi
callq 0x4e750
leaq 0x48(%rsp), %rdi
callq 0x4e070
leaq 0x2186e(%rip), %rsi     # 0x875d5
leaq 0x10(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x515e0
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x50230
leaq 0x48(%rsp), %rdi
pushq $0x8
popq %rdx
movq %rax, %rsi
callq 0x51500
leaq 0x10(%rsp), %rdi
callq 0x4e020
leaq 0x48(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x60(%rsp,%rax)
leaq 0x10(%rsp), %rsi
callq 0x51830
movl 0x10(%rsp), %eax
cmpl %eax, 0x124(%rbx)
jae 0x65dca
movl %eax, 0x124(%rbx)
leaq 0x1d0(%rbx), %rax
movq %rax, 0x40(%rsp)
leaq 0x1d4(%rbx), %rax
movq %rax, 0x38(%rsp)
leaq 0x1d8(%rbx), %rax
movq %rax, 0x30(%rsp)
leaq 0x48(%rsp), %rbp
movq %rbp, %rdi
callq 0x4e070
movq 0x48(%r14), %r12
subq 0x40(%r14), %r12
shrq $0x5, %r12
xorl %r13d, %r13d
testl %r12d, %r12d
cmovlel %r13d, %r12d
shlq $0x5, %r12
cmpq %r13, %r12
je 0x65f42
movq 0x40(%r14), %r15
addq %r13, %r15
movq %r15, %rdi
leaq 0x217af(%rip), %rsi     # 0x875de
callq 0x520f0
testb %al, %al
je 0x65e6a
movq 0x58(%r14), %rsi
addq %r13, %rsi
movq %rbp, %rdi
pushq $0x8
popq %rdx
callq 0x51500
movq 0x48(%rsp), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x60(%rsp,%rax)
movq %rbp, %rdi
movq 0x40(%rsp), %rsi
callq 0x51830
jmp 0x65f31
movq %r15, %rdi
leaq 0x21773(%rip), %rsi     # 0x875e7
callq 0x520f0
testb %al, %al
je 0x65eaf
movq 0x58(%r14), %rsi
addq %r13, %rsi
movq %rbp, %rdi
pushq $0x8
popq %rdx
callq 0x51500
movq 0x48(%rsp), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x60(%rsp,%rax)
movq %rbp, %rdi
movq 0x38(%rsp), %rsi
callq 0x51830
jmp 0x65f31
movq %r15, %rdi
leaq 0x21737(%rip), %rsi     # 0x875f0
callq 0x520f0
testb %al, %al
je 0x65ef1
movq 0x58(%r14), %rsi
addq %r13, %rsi
movq %rbp, %rdi
pushq $0x8
popq %rdx
callq 0x51500
movq 0x48(%rsp), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x60(%rsp,%rax)
movq %rbp, %rdi
movq 0x30(%rsp), %rsi
callq 0x51830
jmp 0x65f31
movq %r15, %rdi
leaq 0x216cc(%rip), %rsi     # 0x875c7
callq 0x520f0
testb %al, %al
je 0x65f39
movq 0x58(%r14), %rsi
addq %r13, %rsi
movq %rbp, %rdi
pushq $0x8
popq %rdx
callq 0x51500
movq 0x48(%rsp), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x60(%rsp,%rax)
movq %rbp, %rdi
leaq 0xc(%rsp), %rsi
callq 0x4e750
movq %rbp, %rdi
callq 0x4e070
addq $0x20, %r13
jmp 0x65e15
cmpl $0x2, 0xc(%rsp)
jne 0x66013
movq 0x78(%r14), %r13
leaq 0x130(%rbx), %r14
leaq 0x201ea(%rip), %r15     # 0x86149
leaq 0x48(%rsp), %r12
movq (%r13), %rdi
movq %r15, %rsi
callq 0x520f0
testb %al, %al
je 0x65f99
movq %r14, %rdi
movq %r12, %rsi
callq 0x4f4e0
movq 0x138(%rbx), %rdi
addq $-0x24, %rdi
movq (%r13), %rsi
callq 0x50960
addq $0x8, %r13
jmp 0x65f64
movq (%r13), %rsi
movq %rbx, %rdi
movq %rbx, %rdx
callq 0x4f2d0
leaq 0x198(%rbx), %rdi
movq 0x8(%r13), %rsi
movq %rbx, %rdx
callq 0x50930
movq 0x1b0(%rbx), %rax
movq (%rax), %r14
leaq 0x214be(%rip), %rsi     # 0x8748a
leaq 0x48(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x515e0
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
callq 0x50720
movq %rax, 0x190(%rbx)
leaq 0x48(%rsp), %rdi
callq 0x4e020
movq %rbx, %rdi
callq 0x507b0
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %r14
leaq 0x215f5(%rip), %rsi     # 0x8761a
leaq 0x48(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x515e0
movb $0x1, %bpl
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
callq 0x4ddf0
xorl %ebp, %ebp
movq 0x48e53(%rip), %rsi     # 0xaeea0
movq 0x48be4(%rip), %rdx     # 0xaec38
movq %r14, %rdi
callq 0x51630
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x66073
jmp 0x660bc
movq %rax, %rbx
movq %r14, %rdi
callq 0x4ea60
jmp 0x660bc
jmp 0x66089
jmp 0x66093
jmp 0x660af
jmp 0x66093
jmp 0x660af
jmp 0x66093
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0x660a4
movq %rax, %rbx
jmp 0x660bc
jmp 0x660af
jmp 0x6609c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4e020
jmp 0x660bc
jmp 0x660af
jmp 0x660af
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x4e070
movq %rbx, %rdi
callq 0x518c0