// File: jstaursky[P]hutch/src/Sleigh/globalcontext.cc
// Function: ContextInternal::saveContext(std::ostream&, Address const&, unsigned int const*) const
void ContextInternal::saveContext(ostream &s,const Address &addr,
				  const uintm *vec) const
{
  s << "<context_pointset";
  addr.getSpace()->saveXmlAttributes(s,addr.getOffset() );
  s << ">\n";
  map<string,ContextBitRange>::const_iterator iter;
  for(iter=variables.begin();iter!=variables.end();++iter) {
    uintm val = (*iter).second.getValue(vec);
    s << "  <set";
    a_v(s,"name",(*iter).first);
    a_v_u(s,"val",val);
    s << "/>\n";
  }
  s << "</context_pointset>\n";
}

// Assembly:
subq $0xd8, %rsp
movq %rdi, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
movq %rdx, 0xc0(%rsp)
movq %rcx, 0xb8(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xc8(%rsp), %rdi
leaq 0x9b8b9(%rip), %rsi     # 0x18720c
callq 0xd8300
movq 0xc0(%rsp), %rdi
callq 0xd9cf0
movq %rax, 0x20(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xc0(%rsp), %rdi
callq 0xe03b0
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %rax, %rdx
movq (%rdi), %rax
callq *0x38(%rax)
movq 0xc8(%rsp), %rdi
leaq 0x9dcc8(%rip), %rsi     # 0x18966e
callq 0xd8300
leaq 0xb0(%rsp), %rdi
callq 0xd7380
movq 0x30(%rsp), %rdi
addq $0x10, %rdi
callq 0xe1a70
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x30(%rsp), %rdi
addq $0x10, %rdi
callq 0xd8700
movq %rax, 0xa0(%rsp)
leaq 0xb0(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0xd1230
testb $0x1, %al
jne 0xeba12
jmp 0xebba5
leaq 0xb0(%rsp), %rdi
callq 0xdf500
movq %rax, %rdi
addq $0x20, %rdi
movq 0xb8(%rsp), %rsi
callq 0xd9100
movl %eax, 0x9c(%rsp)
movq 0xc8(%rsp), %rdi
leaq 0x9b7d5(%rip), %rsi     # 0x18721e
callq 0xd8300
movq 0xc8(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x77(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xe0c80
movq 0x18(%rsp), %rdx
leaq 0x9b5bb(%rip), %rsi     # 0x187031
leaq 0x78(%rsp), %rdi
callq 0xe00a0
jmp 0xeba82
leaq 0xb0(%rsp), %rdi
callq 0xdf500
movq 0x10(%rsp), %rdi
movq %rax, %rdx
leaq 0x78(%rsp), %rsi
callq 0xd18c0
jmp 0xebaa3
leaq 0x78(%rsp), %rdi
callq 0xd4550
leaq 0x77(%rsp), %rdi
callq 0xd8ec0
movq 0xc8(%rsp), %rax
movq %rax, (%rsp)
leaq 0x3f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xe0c80
movq 0x8(%rsp), %rdx
leaq 0x9b703(%rip), %rsi     # 0x1871e1
leaq 0x40(%rsp), %rdi
callq 0xe00a0
jmp 0xebaea
movq (%rsp), %rdi
movl 0x9c(%rsp), %eax
movl %eax, %edx
leaq 0x40(%rsp), %rsi
callq 0xd7c30
jmp 0xebb03
leaq 0x40(%rsp), %rdi
callq 0xd4550
leaq 0x3f(%rsp), %rdi
callq 0xd8ec0
movq 0xc8(%rsp), %rdi
leaq 0x9ccf7(%rip), %rsi     # 0x18881d
callq 0xd8300
leaq 0xb0(%rsp), %rdi
callq 0xd8c80
jmp 0xeb9de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
jmp 0xebb65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x78(%rsp), %rdi
callq 0xd4550
leaq 0x77(%rsp), %rdi
callq 0xd8ec0
jmp 0xebbc1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
jmp 0xebb99
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x40(%rsp), %rdi
callq 0xd4550
leaq 0x3f(%rsp), %rdi
callq 0xd8ec0
jmp 0xebbc1
movq 0xc8(%rsp), %rdi
leaq 0x9b671(%rip), %rsi     # 0x187225
callq 0xd8300
addq $0xd8, %rsp
retq
movq 0x68(%rsp), %rdi
callq 0xe0be0
nopl (%rax,%rax)