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

{
  s << "<symbol_table";
  s << " scopesize=\"" << dec << table.size() << "\"";
  s << " symbolsize=\"" << symbollist.size() << "\">\n";
  for(int4 i=0;i<table.size();++i) {
    s << "<scope id=\"0x" << hex << table[i]->getId() << "\"";
    s << " parent=\"0x";
    if (table[i]->getParent() == (SymbolScope *)0)
      s << "0";
    else
      s << hex << table[i]->getParent()->getId();
    s << "\"/>\n";
  }

				// First save the headers
  for(int4 i=0;i<symbollist.size();++i)
    symbollist[i]->saveXmlHeader(s);

				// Now save the content of each symbol
  for(int4 i=0;i<symbollist.size();++i) // Must save IN ORDER
    symbollist[i]->saveXml(s);
  s << "</symbol_table>\n";
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x58(%rsp), %rdi
leaq 0x4b47c(%rip), %rsi     # 0x188f20
callq 0xd8300
movq 0x58(%rsp), %rdi
leaq 0x4b479(%rip), %rsi     # 0x188f2e
callq 0xd8300
movq %rax, %rdi
movq 0x8a2d4(%rip), %rsi     # 0x1c7d98
callq 0xd1180
movq 0x38(%rsp), %rdi
movq %rax, 0x30(%rsp)
addq $0x18, %rdi
callq 0xdd9b0
movq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0xd0050
movq %rax, %rdi
leaq 0x4b999(%rip), %rsi     # 0x18948c
callq 0xd8300
movq 0x58(%rsp), %rdi
leaq 0x4b437(%rip), %rsi     # 0x188f3b
callq 0xd8300
movq 0x38(%rsp), %rdi
movq %rax, 0x40(%rsp)
callq 0xd6170
movq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0xd0050
movq %rax, %rdi
leaq 0x4b2ed(%rip), %rsi     # 0x188e1c
callq 0xd8300
movl $0x0, 0x54(%rsp)
movq 0x38(%rsp), %rdi
movslq 0x54(%rsp), %rax
movq %rax, 0x28(%rsp)
addq $0x18, %rdi
callq 0xdd9b0
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
jae 0x13dc6b
movq 0x58(%rsp), %rdi
leaq 0x4b3d8(%rip), %rsi     # 0x188f49
callq 0xd8300
movq %rax, %rdi
movq 0x8a448(%rip), %rsi     # 0x1c7fc8
callq 0xd1180
movq 0x38(%rsp), %rdi
movq %rax, 0x20(%rsp)
addq $0x18, %rdi
movslq 0x54(%rsp), %rsi
callq 0xdcda0
movq (%rax), %rdi
callq 0xcf6c0
movq 0x20(%rsp), %rdi
movl %eax, %esi
callq 0xdbce0
movq %rax, %rdi
leaq 0x4b8d1(%rip), %rsi     # 0x18948c
callq 0xd8300
movq 0x58(%rsp), %rdi
leaq 0x4b38b(%rip), %rsi     # 0x188f57
callq 0xd8300
movq 0x38(%rsp), %rdi
addq $0x18, %rdi
movslq 0x54(%rsp), %rsi
callq 0xdcda0
movq (%rax), %rdi
callq 0xdbcc0
cmpq $0x0, %rax
jne 0x13dc05
movq 0x58(%rsp), %rdi
leaq 0x49f44(%rip), %rsi     # 0x187b42
callq 0xd8300
jmp 0x13dc4a
movq 0x58(%rsp), %rdi
movq 0x8a3b7(%rip), %rsi     # 0x1c7fc8
callq 0xd1180
movq 0x38(%rsp), %rdi
movq %rax, 0x18(%rsp)
addq $0x18, %rdi
movslq 0x54(%rsp), %rsi
callq 0xdcda0
movq (%rax), %rdi
callq 0xdbcc0
movq %rax, %rdi
callq 0xcf6c0
movq 0x18(%rsp), %rdi
movl %eax, %esi
callq 0xdbce0
movq 0x58(%rsp), %rdi
leaq 0x4abc6(%rip), %rsi     # 0x18881c
callq 0xd8300
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x13db3c
movl $0x0, 0x50(%rsp)
movq 0x38(%rsp), %rdi
movslq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0xd6170
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jae 0x13dcbe
movq 0x38(%rsp), %rdi
movslq 0x50(%rsp), %rsi
callq 0xd39d0
movq (%rax), %rdi
movq 0x58(%rsp), %rsi
movq (%rdi), %rax
callq *0x18(%rax)
movl 0x50(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x50(%rsp)
jmp 0x13dc73
movl $0x0, 0x4c(%rsp)
movq 0x38(%rsp), %rdi
movslq 0x4c(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0xd6170
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x13dd11
movq 0x38(%rsp), %rdi
movslq 0x4c(%rsp), %rsi
callq 0xd39d0
movq (%rax), %rdi
movq 0x58(%rsp), %rsi
movq (%rdi), %rax
callq *0x20(%rax)
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x13dcc6
movq 0x58(%rsp), %rdi
leaq 0x4b246(%rip), %rsi     # 0x188f63
callq 0xd8300
addq $0x68, %rsp
retq
nopw (%rax,%rax)