// File: jstaursky[P]hutch/src/Sleigh/sleighbase.cc
// Function: SleighBase::saveXml(std::ostream&) const
void SleighBase::saveXml(ostream &s) const

{
  s << "<sleigh";
  a_v_i(s,"version",SLA_FORMAT_VERSION);
  a_v_b(s,"bigendian",isBigEndian());
  a_v_i(s,"align",alignment);
  a_v_u(s,"uniqbase",getUniqueBase());
  if (maxdelayslotbytes > 0)
    a_v_u(s,"maxdelay",maxdelayslotbytes);
  if (unique_allocatemask != 0)
    a_v_u(s,"uniqmask",unique_allocatemask);
  if (numSections != 0)
    a_v_u(s,"numsections",numSections);
  s << ">\n";

  s << "<spaces";
  a_v(s,"defaultspace",getDefaultSpace()->getName());
  s << ">\n";
  for(int4 i=0;i<numSpaces();++i) {
    AddrSpace *spc = getSpace(i);
    if (spc == (AddrSpace *)0) continue;
    if ((spc->getType()==IPTR_CONSTANT) || 
	(spc->getType()==IPTR_FSPEC)||
	(spc->getType()==IPTR_IOP)||
	(spc->getType()==IPTR_JOIN))
      continue;
    spc->saveXml(s);
  }
  s << "</spaces>\n";
  symtab.saveXml(s);
  s << "</sleigh>\n";
}

// Assembly:
subq $0x218, %rsp            # imm = 0x218
movq %rdi, 0x210(%rsp)
movq %rsi, 0x208(%rsp)
movq 0x210(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x208(%rsp), %rdi
leaq 0x66ab1(%rip), %rsi     # 0x1885e7
callq 0xd8300
movq 0x208(%rsp), %rax
movq %rax, 0xa0(%rsp)
leaq 0x1e7(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
callq 0xe0c80
movq 0xa8(%rsp), %rdx
leaq 0x66a80(%rip), %rsi     # 0x1885ef
leaq 0x1e8(%rsp), %rdi
callq 0xe00a0
jmp 0x121b7e
movq 0xa0(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
movl $0x2, %edx
callq 0xde2b0
jmp 0x121b9a
leaq 0x1e8(%rsp), %rdi
callq 0xd4550
leaq 0x1e7(%rsp), %rdi
callq 0xd8ec0
movq 0x208(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x1af(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq 0xe0c80
movq 0x90(%rsp), %rdx
leaq 0x65bc4(%rip), %rsi     # 0x1877ac
leaq 0x1b0(%rsp), %rdi
callq 0xe00a0
jmp 0x121bf7
movq 0x98(%rsp), %rdi
callq 0xd2330
movb %al, 0x87(%rsp)
jmp 0x121c0d
movq 0x88(%rsp), %rdi
movb 0x87(%rsp), %al
movzbl %al, %edx
andl $0x1, %edx
leaq 0x1b0(%rsp), %rsi
callq 0xd0a30
jmp 0x121c31
leaq 0x1b0(%rsp), %rdi
callq 0xd4550
leaq 0x1af(%rsp), %rdi
callq 0xd8ec0
movq 0x208(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x187(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0xe0c80
movq 0x78(%rsp), %rdx
leaq 0x66981(%rip), %rsi     # 0x1885f7
leaq 0x188(%rsp), %rdi
callq 0xe00a0
jmp 0x121c85
movq 0x70(%rsp), %rdi
movq 0x98(%rsp), %rax
movslq 0x128(%rax), %rdx
leaq 0x188(%rsp), %rsi
callq 0xde2b0
jmp 0x121ca8
leaq 0x188(%rsp), %rdi
callq 0xd4550
leaq 0x187(%rsp), %rdi
callq 0xd8ec0
movq 0x208(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0x15f(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0xe0c80
movq 0x68(%rsp), %rdx
leaq 0x66910(%rip), %rsi     # 0x1885fd
leaq 0x160(%rsp), %rdi
callq 0xe00a0
jmp 0x121cfc
movq 0x98(%rsp), %rdi
callq 0xe2c40
movl %eax, 0x5c(%rsp)
jmp 0x121d0f
movq 0x60(%rsp), %rdi
movl 0x5c(%rsp), %eax
movl %eax, %eax
movl %eax, %edx
leaq 0x160(%rsp), %rsi
callq 0xd7c30
jmp 0x121d2b
leaq 0x160(%rsp), %rdi
callq 0xd4550
leaq 0x15f(%rsp), %rdi
callq 0xd8ec0
movq 0x98(%rsp), %rax
cmpl $0x0, 0x1d0(%rax)
jbe 0x121f44
movq 0x208(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x137(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0xe0c80
movq 0x50(%rsp), %rdx
leaq 0x66881(%rip), %rsi     # 0x188606
leaq 0x138(%rsp), %rdi
callq 0xe00a0
jmp 0x121d94
movq 0x48(%rsp), %rdi
movq 0x98(%rsp), %rax
movl 0x1d0(%rax), %eax
movl %eax, %edx
leaq 0x138(%rsp), %rsi
callq 0xd7c30
jmp 0x121db8
leaq 0x138(%rsp), %rdi
callq 0xd4550
leaq 0x137(%rsp), %rdi
callq 0xd8ec0
jmp 0x121f44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
jmp 0x121e0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
leaq 0x1e8(%rsp), %rdi
callq 0xd4550
leaq 0x1e7(%rsp), %rdi
callq 0xd8ec0
jmp 0x12232a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
jmp 0x121e57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
leaq 0x1b0(%rsp), %rdi
callq 0xd4550
leaq 0x1af(%rsp), %rdi
callq 0xd8ec0
jmp 0x12232a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
jmp 0x121ea0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
leaq 0x188(%rsp), %rdi
callq 0xd4550
leaq 0x187(%rsp), %rdi
callq 0xd8ec0
jmp 0x12232a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
jmp 0x121ee9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
leaq 0x160(%rsp), %rdi
callq 0xd4550
leaq 0x15f(%rsp), %rdi
callq 0xd8ec0
jmp 0x12232a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
jmp 0x121f32
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
leaq 0x138(%rsp), %rdi
callq 0xd4550
leaq 0x137(%rsp), %rdi
callq 0xd8ec0
jmp 0x12232a
movq 0x98(%rsp), %rax
cmpl $0x0, 0x1d4(%rax)
je 0x12201c
movq 0x208(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x10f(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0xe0c80
movq 0x40(%rsp), %rdx
leaq 0x6668b(%rip), %rsi     # 0x18860f
leaq 0x110(%rsp), %rdi
callq 0xe00a0
jmp 0x121f93
movq 0x38(%rsp), %rdi
movq 0x98(%rsp), %rax
movl 0x1d4(%rax), %eax
movl %eax, %edx
leaq 0x110(%rsp), %rsi
callq 0xd7c30
jmp 0x121fb7
leaq 0x110(%rsp), %rdi
callq 0xd4550
leaq 0x10f(%rsp), %rdi
callq 0xd8ec0
jmp 0x12201c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
jmp 0x12200a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
leaq 0x110(%rsp), %rdi
callq 0xd4550
leaq 0x10f(%rsp), %rdi
callq 0xd8ec0
jmp 0x12232a
movq 0x98(%rsp), %rax
cmpl $0x0, 0x1d8(%rax)
je 0x1220f4
movq 0x208(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0xe7(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xe0c80
movq 0x30(%rsp), %rdx
leaq 0x665bc(%rip), %rsi     # 0x188618
leaq 0xe8(%rsp), %rdi
callq 0xe00a0
jmp 0x12206b
movq 0x28(%rsp), %rdi
movq 0x98(%rsp), %rax
movl 0x1d8(%rax), %eax
movl %eax, %edx
leaq 0xe8(%rsp), %rsi
callq 0xd7c30
jmp 0x12208f
leaq 0xe8(%rsp), %rdi
callq 0xd4550
leaq 0xe7(%rsp), %rdi
callq 0xd8ec0
jmp 0x1220f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
jmp 0x1220e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0xd4550
leaq 0xe7(%rsp), %rdi
callq 0xd8ec0
jmp 0x12232a
movq 0x208(%rsp), %rdi
leaq 0x6756b(%rip), %rsi     # 0x18966e
callq 0xd8300
movq 0x208(%rsp), %rdi
leaq 0x6650d(%rip), %rsi     # 0x188624
callq 0xd8300
movq 0x208(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0xbf(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xe0c80
movq 0x20(%rsp), %rdx
leaq 0x6596f(%rip), %rsi     # 0x187ab6
leaq 0xc0(%rsp), %rdi
callq 0xe00a0
jmp 0x122156
movq 0x98(%rsp), %rdi
callq 0xd9770
movq %rax, 0x10(%rsp)
jmp 0x12216a
movq 0x10(%rsp), %rdi
callq 0xd06f0
movq %rax, 0x8(%rsp)
jmp 0x12217b
movq 0x8(%rsp), %rdx
movq 0x18(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0xd18c0
jmp 0x122194
leaq 0xc0(%rsp), %rdi
callq 0xd4550
leaq 0xbf(%rsp), %rdi
callq 0xd8ec0
movq 0x208(%rsp), %rdi
leaq 0x674b1(%rip), %rsi     # 0x18966e
callq 0xd8300
movl $0x0, 0xb8(%rsp)
movq 0x98(%rsp), %rdi
movl 0xb8(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0xde730
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x1222de
movq 0x98(%rsp), %rdi
movl 0xb8(%rsp), %esi
callq 0xd8ac0
movq %rax, 0xb0(%rsp)
cmpq $0x0, 0xb0(%rsp)
jne 0x122268
jmp 0x1222c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
jmp 0x122256
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1d8(%rsp)
movl %eax, 0x1d4(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0xd4550
leaq 0xbf(%rsp), %rdi
callq 0xd8ec0
jmp 0x12232a
movq 0xb0(%rsp), %rdi
callq 0xcfb80
cmpl $0x0, %eax
je 0x1222b0
movq 0xb0(%rsp), %rdi
callq 0xcfb80
cmpl $0x4, %eax
je 0x1222b0
movq 0xb0(%rsp), %rdi
callq 0xcfb80
cmpl $0x5, %eax
je 0x1222b0
movq 0xb0(%rsp), %rdi
callq 0xcfb80
cmpl $0x6, %eax
jne 0x1222b2
jmp 0x1222c8
movq 0xb0(%rsp), %rdi
movq 0x208(%rsp), %rsi
movq (%rdi), %rax
callq *0x60(%rax)
movl 0xb8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xb8(%rsp)
jmp 0x1221cd
movq 0x208(%rsp), %rdi
leaq 0x6633f(%rip), %rsi     # 0x18862c
callq 0xd8300
movq 0x98(%rsp), %rdi
addq $0x198, %rdi            # imm = 0x198
movq 0x208(%rsp), %rsi
callq 0xe18c0
movq 0x208(%rsp), %rdi
leaq 0x6631a(%rip), %rsi     # 0x188637
callq 0xd8300
addq $0x218, %rsp            # imm = 0x218
retq
movq 0x1d8(%rsp), %rdi
callq 0xe0be0
nopw (%rax,%rax)