// File: 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:
subq $0xb78, %rsp            # imm = 0xB78
movq %rdi, 0xb70(%rsp)
movq %rsi, 0xb68(%rsp)
movq 0xb70(%rsp), %rax
movq %rax, 0x118(%rsp)
movl $0x0, 0x1d0(%rax)
movl $0x0, 0x1d4(%rax)
movl $0x0, 0x1d8(%rax)
movl $0x0, 0xb64(%rsp)
movq 0xb68(%rsp), %rax
movq %rax, 0x120(%rsp)
leaq 0xb3f(%rsp), %rdi
movq %rdi, 0x128(%rsp)
callq 0xe0c80
movq 0x128(%rsp), %rdx
leaq 0x653e8(%rip), %rsi     # 0x1877ac
leaq 0xb40(%rsp), %rdi
callq 0xe00a0
jmp 0x1223d3
movq 0x120(%rsp), %rdi
leaq 0xb40(%rsp), %rsi
callq 0xdb6f0
movq %rax, 0x110(%rsp)
jmp 0x1223f2
movq 0x110(%rsp), %rdi
callq 0xd9e90
movb %al, 0x10f(%rsp)
jmp 0x122408
movq 0x118(%rsp), %rdi
movb 0x10f(%rsp), %al
movzbl %al, %esi
andl $0x1, %esi
callq 0xd7ec0
jmp 0x122424
leaq 0xb40(%rsp), %rdi
callq 0xd4550
leaq 0xb3f(%rsp), %rdi
callq 0xd8ec0
movq 0xb68(%rsp), %rax
movq %rax, 0xf8(%rsp)
leaq 0x987(%rsp), %rdi
movq %rdi, 0x100(%rsp)
callq 0xe0c80
movq 0x100(%rsp), %rdx
leaq 0x66185(%rip), %rsi     # 0x1885f7
leaq 0x988(%rsp), %rdi
callq 0xe00a0
jmp 0x122481
movq 0xf8(%rsp), %rdi
leaq 0x988(%rsp), %rsi
callq 0xdb6f0
movq %rax, 0xf0(%rsp)
jmp 0x1224a0
movq 0xf0(%rsp), %rsi
leaq 0x9a8(%rsp), %rdi
movl $0x8, %edx
callq 0xdfcc0
jmp 0x1224bc
leaq 0x988(%rsp), %rdi
callq 0xd4550
leaq 0x987(%rsp), %rdi
callq 0xd8ec0
movq 0x9a8(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x9a8(%rsp,%rax), %rax
movq %rax, 0xe0(%rsp)
movl $0x2, %edi
movl $0x8, %esi
callq 0xe0e70
movl %eax, 0xec(%rsp)
jmp 0x12250a
movl 0xec(%rsp), %edi
movl $0x40, %esi
callq 0xe0e70
movl %eax, 0xdc(%rsp)
jmp 0x122524
movl 0xdc(%rsp), %esi
movq 0xe0(%rsp), %rdi
callq 0xda6e0
jmp 0x12253a
movq 0x118(%rsp), %rsi
addq $0x128, %rsi            # imm = 0x128
leaq 0x9a8(%rsp), %rdi
callq 0xd4480
jmp 0x122558
leaq 0x9a8(%rsp), %rdi
callq 0xd25a0
movq 0xb68(%rsp), %rax
movq %rax, 0xc8(%rsp)
leaq 0x7df(%rsp), %rdi
movq %rdi, 0xd0(%rsp)
callq 0xe0c80
movq 0xd0(%rsp), %rdx
leaq 0x66064(%rip), %rsi     # 0x1885fd
leaq 0x7e0(%rsp), %rdi
callq 0xe00a0
jmp 0x1225a8
movq 0xc8(%rsp), %rdi
leaq 0x7e0(%rsp), %rsi
callq 0xdb6f0
movq %rax, 0xc0(%rsp)
jmp 0x1225c7
movq 0xc0(%rsp), %rsi
leaq 0x800(%rsp), %rdi
movl $0x8, %edx
callq 0xdfcc0
jmp 0x1225e3
leaq 0x7e0(%rsp), %rdi
callq 0xd4550
leaq 0x7df(%rsp), %rdi
callq 0xd8ec0
movq 0x800(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x800(%rsp,%rax), %rax
movq %rax, 0xb0(%rsp)
movl $0x2, %edi
movl $0x8, %esi
callq 0xe0e70
movl %eax, 0xbc(%rsp)
jmp 0x122631
movl 0xbc(%rsp), %edi
movl $0x40, %esi
callq 0xe0e70
movl %eax, 0xac(%rsp)
jmp 0x12264b
movl 0xac(%rsp), %esi
movq 0xb0(%rsp), %rdi
callq 0xda6e0
jmp 0x122661
leaq 0x800(%rsp), %rdi
leaq 0x7d8(%rsp), %rsi
callq 0xceae0
jmp 0x122678
movq 0x118(%rsp), %rdi
movl 0x7d8(%rsp), %esi
callq 0xd17c0
jmp 0x12268e
leaq 0x800(%rsp), %rdi
callq 0xd25a0
movq 0xb68(%rsp), %rdi
callq 0xd2b80
movl %eax, 0x7d4(%rsp)
movl $0x0, 0x7d0(%rsp)
movl 0x7d0(%rsp), %eax
cmpl 0x7d4(%rsp), %eax
jge 0x122c19
movq 0xb68(%rsp), %rdi
movl 0x7d0(%rsp), %esi
callq 0xd5520
movq %rax, 0x7c8(%rsp)
movq 0x7c8(%rsp), %rdi
leaq 0x65f0d(%rip), %rsi     # 0x188606
callq 0xe30f0
testb $0x1, %al
jne 0x122707
jmp 0x12291a
movq 0xb68(%rsp), %rdi
movl 0x7d0(%rsp), %esi
callq 0xd9670
movq %rax, %rsi
leaq 0x648(%rsp), %rdi
movl $0x8, %edx
movl %edx, 0x9c(%rsp)
callq 0xdfcc0
movl 0x9c(%rsp), %esi
movq 0x648(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x648(%rsp,%rax), %rax
movq %rax, 0xa0(%rsp)
movl $0x2, %edi
callq 0xe0e70
movl %eax, 0xa8(%rsp)
jmp 0x12276d
movl 0xa8(%rsp), %edi
movl $0x40, %esi
callq 0xe0e70
movl %eax, 0x98(%rsp)
jmp 0x122787
movl 0x98(%rsp), %esi
movq 0xa0(%rsp), %rdi
callq 0xda6e0
jmp 0x12279d
movq 0x118(%rsp), %rsi
addq $0x1d0, %rsi            # imm = 0x1D0
leaq 0x648(%rsp), %rdi
callq 0xceae0
jmp 0x1227bb
leaq 0x648(%rsp), %rdi
callq 0xd25a0
jmp 0x122c01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
jmp 0x122804
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
leaq 0xb40(%rsp), %rdi
callq 0xd4550
leaq 0xb3f(%rsp), %rdi
callq 0xd8ec0
jmp 0x122f35
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
jmp 0x12284d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
leaq 0x988(%rsp), %rdi
callq 0xd4550
leaq 0x987(%rsp), %rdi
callq 0xd8ec0
jmp 0x122f35
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
leaq 0x9a8(%rsp), %rdi
callq 0xd25a0
jmp 0x122f35
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
jmp 0x1228bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
leaq 0x7e0(%rsp), %rdi
callq 0xd4550
leaq 0x7df(%rsp), %rdi
callq 0xd8ec0
jmp 0x122f35
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
leaq 0x800(%rsp), %rdi
callq 0xd25a0
jmp 0x122f35
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
leaq 0x648(%rsp), %rdi
callq 0xd25a0
jmp 0x122f35
movq 0x7c8(%rsp), %rdi
leaq 0x65ce6(%rip), %rsi     # 0x18860f
callq 0xe30f0
testb $0x1, %al
jne 0x122937
jmp 0x122a23
movq 0xb68(%rsp), %rdi
movl 0x7d0(%rsp), %esi
callq 0xd9670
movq %rax, %rsi
leaq 0x4c8(%rsp), %rdi
movl $0x8, %edx
movl %edx, 0x84(%rsp)
callq 0xdfcc0
movl 0x84(%rsp), %esi
movq 0x4c8(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x4c8(%rsp,%rax), %rax
movq %rax, 0x88(%rsp)
movl $0x2, %edi
callq 0xe0e70
movl %eax, 0x94(%rsp)
jmp 0x12299d
movl 0x94(%rsp), %edi
movl $0x40, %esi
callq 0xe0e70
movl %eax, 0x80(%rsp)
jmp 0x1229b7
movl 0x80(%rsp), %esi
movq 0x88(%rsp), %rdi
callq 0xda6e0
jmp 0x1229cd
movq 0x118(%rsp), %rsi
addq $0x1d4, %rsi            # imm = 0x1D4
leaq 0x4c8(%rsp), %rdi
callq 0xceae0
jmp 0x1229eb
leaq 0x4c8(%rsp), %rdi
callq 0xd25a0
jmp 0x122bff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
leaq 0x4c8(%rsp), %rdi
callq 0xd25a0
jmp 0x122f35
movq 0x7c8(%rsp), %rdi
leaq 0x65be6(%rip), %rsi     # 0x188618
callq 0xe30f0
testb $0x1, %al
jne 0x122a40
jmp 0x122b14
movq 0xb68(%rsp), %rdi
movl 0x7d0(%rsp), %esi
callq 0xd9670
movq %rax, %rsi
leaq 0x348(%rsp), %rdi
movl $0x8, %edx
movl %edx, 0x6c(%rsp)
callq 0xdfcc0
movl 0x6c(%rsp), %esi
movq 0x348(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x348(%rsp,%rax), %rax
movq %rax, 0x70(%rsp)
movl $0x2, %edi
callq 0xe0e70
movl %eax, 0x7c(%rsp)
jmp 0x122a9a
movl 0x7c(%rsp), %edi
movl $0x40, %esi
callq 0xe0e70
movl %eax, 0x68(%rsp)
jmp 0x122aae
movl 0x68(%rsp), %esi
movq 0x70(%rsp), %rdi
callq 0xda6e0
jmp 0x122abe
movq 0x118(%rsp), %rsi
addq $0x1d8, %rsi            # imm = 0x1D8
leaq 0x348(%rsp), %rdi
callq 0xceae0
jmp 0x122adc
leaq 0x348(%rsp), %rdi
callq 0xd25a0
jmp 0x122bfd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
leaq 0x348(%rsp), %rdi
callq 0xd25a0
jmp 0x122f35
movq 0x7c8(%rsp), %rdi
leaq 0x65acc(%rip), %rsi     # 0x1885ef
callq 0xe30f0
testb $0x1, %al
jne 0x122b31
jmp 0x122bfb
movq 0xb68(%rsp), %rdi
movl 0x7d0(%rsp), %esi
callq 0xd9670
movq %rax, %rsi
leaq 0x1c8(%rsp), %rdi
movl $0x8, %edx
movl %edx, 0x54(%rsp)
callq 0xdfcc0
movl 0x54(%rsp), %esi
movq 0x1c8(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x1c8(%rsp,%rax), %rax
movq %rax, 0x58(%rsp)
movl $0x2, %edi
callq 0xe0e70
movl %eax, 0x64(%rsp)
jmp 0x122b8b
movl 0x64(%rsp), %edi
movl $0x40, %esi
callq 0xe0e70
movl %eax, 0x50(%rsp)
jmp 0x122b9f
movl 0x50(%rsp), %esi
movq 0x58(%rsp), %rdi
callq 0xda6e0
jmp 0x122baf
leaq 0x1c8(%rsp), %rdi
leaq 0xb64(%rsp), %rsi
callq 0xd4480
jmp 0x122bc6
leaq 0x1c8(%rsp), %rdi
callq 0xd25a0
jmp 0x122bfb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
leaq 0x1c8(%rsp), %rdi
callq 0xd25a0
jmp 0x122f35
jmp 0x122bfd
jmp 0x122bff
jmp 0x122c01
jmp 0x122c03
movl 0x7d0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7d0(%rsp)
jmp 0x1226ba
cmpl $0x2, 0xb64(%rsp)
je 0x122d03
movb $0x1, 0x1a6(%rsp)
movl $0x20, %edi
callq 0xd2b40
movq %rax, 0x40(%rsp)
leaq 0x1a7(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0xe0c80
movq 0x48(%rsp), %rdx
leaq 0x659e6(%rip), %rsi     # 0x188642
leaq 0x1a8(%rsp), %rdi
callq 0xe00a0
jmp 0x122c6b
movq 0x40(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0xd1ae0
jmp 0x122c7f
movq 0x40(%rsp), %rdi
movb $0x0, 0x1a6(%rsp)
movq 0xa51fd(%rip), %rsi     # 0x1c7e90
movq 0xa4f36(%rip), %rdx     # 0x1c7bd0
callq 0xe01f0
jmp 0x122f42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
jmp 0x122cdb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
leaq 0x1a8(%rsp), %rdi
callq 0xd4550
leaq 0x1a7(%rsp), %rdi
callq 0xd8ec0
testb $0x1, 0x1a6(%rsp)
jne 0x122cf4
jmp 0x122cfe
movq 0x40(%rsp), %rdi
callq 0xd5400
jmp 0x122f35
movq 0xb68(%rsp), %rdi
callq 0xde930
movq %rax, 0x198(%rsp)
leaq 0x190(%rsp), %rdi
callq 0xd03e0
movq 0x198(%rsp), %rdi
callq 0xd4960
movq %rax, 0x188(%rsp)
movq 0x188(%rsp), %rax
movq %rax, 0x190(%rsp)
leaq 0x190(%rsp), %rdi
callq 0xddc90
movq (%rax), %rdi
callq 0xcea10
movq %rax, %rdi
leaq 0x64428(%rip), %rsi     # 0x187191
callq 0xe30f0
testb $0x1, %al
jne 0x122d74
jmp 0x122deb
movq 0x118(%rsp), %rax
addq $0x130, %rax            # imm = 0x130
movq %rax, 0x30(%rsp)
leaq 0x164(%rsp), %rdi
callq 0xd5a50
movq 0x30(%rsp), %rdi
leaq 0x164(%rsp), %rsi
callq 0xe0ad0
movq 0x118(%rsp), %rdi
addq $0x130, %rdi            # imm = 0x130
callq 0xe24c0
movq %rax, 0x38(%rsp)
leaq 0x190(%rsp), %rdi
callq 0xddc90
movq 0x38(%rsp), %rdi
movq (%rax), %rsi
callq 0xdd060
leaq 0x190(%rsp), %rdi
callq 0xd0700
jmp 0x122d4a
leaq 0x190(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xddc90
movq 0x118(%rsp), %rdx
movq (%rax), %rsi
movq %rdx, %rdi
callq 0xd76d0
movq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0xe29a0
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movq 0x118(%rsp), %rax
movq %rcx, 0x158(%rsp)
addq $0x198, %rax            # imm = 0x198
movq %rax, 0x18(%rsp)
callq 0xddc90
movq 0x118(%rsp), %rdx
movq 0x18(%rsp), %rdi
movq (%rax), %rsi
callq 0xdcff0
movq 0x18(%rsp), %rdi
callq 0xd7210
movq %rax, 0x20(%rsp)
leaq 0x137(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0xe0c80
movq 0x28(%rsp), %rdx
leaq 0x65620(%rip), %rsi     # 0x1884a6
leaq 0x138(%rsp), %rdi
callq 0xe00a0
jmp 0x122e95
movq 0x20(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0xdc7e0
movq %rax, 0x8(%rsp)
jmp 0x122eae
movq 0x118(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x190(%rax)
leaq 0x138(%rsp), %rdi
callq 0xd4550
leaq 0x137(%rsp), %rdi
callq 0xd8ec0
movq 0x118(%rsp), %rdi
callq 0xdc910
addq $0xb78, %rsp            # imm = 0xB78
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
jmp 0x122f28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb30(%rsp)
movl %eax, 0xb2c(%rsp)
leaq 0x138(%rsp), %rdi
callq 0xd4550
leaq 0x137(%rsp), %rdi
callq 0xd8ec0
movq 0xb30(%rsp), %rdi
callq 0xe0be0
nopw %cs:(%rax,%rax)
nopl (%rax)