// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/space.cc
// Function: JoinSpace::saveXmlAttributes(std::ostream&, unsigned long) const
void JoinSpace::saveXmlAttributes(ostream &s,uintb offset) const

{
  JoinRecord *rec = getManager()->findJoin(offset); // Record must already exist
  a_v(s,"space",getName());
  int4 num = rec->numPieces();
  for(int4 i=0;i<num;++i) {
    const VarnodeData &vdata( rec->getPiece(i) );
    ostringstream t;
    t << " piece" << dec << (i+1) << "=\"";
    t << vdata.space->getName() << ":0x";
    t << hex << vdata.offset << ':' << dec << vdata.size << '\"';
    s << t.str();
  }
  if (num == 1)
    a_v_i(s,"logicalsize",rec->getUnified().size);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rsi, %rbx
movq %rdi, %r15
movq 0x10(%rdi), %rdi
movq %rdx, %rsi
callq 0x41420
movq %rax, 0x8(%rsp)
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x356af(%rip), %rsi     # 0x7fb1d
leaq 0x356ad(%rip), %rdx     # 0x7fb22
leaq 0x40(%rsp), %rdi
callq 0x3f8a0
leaq 0x10(%rsp), %rsi
movb $0x20, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x40b90
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq %rax, %rdi
callq 0x40b90
leaq 0x372ab(%rip), %rsi     # 0x81758
movl $0x2, %edx
movq %rax, %rdi
callq 0x40b90
movq 0x38(%r15), %rsi
movq %rbx, %rdi
callq 0x3f3d0
leaq 0x3711a(%rip), %rsi     # 0x815e7
movl $0x1, %edx
movq %rbx, %rdi
callq 0x40b90
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x4a4f1
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x40880
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r15
testl %r15d, %r15d
jle 0x4a759
movq %rbx, 0x30(%rsp)
movq %r15, 0x38(%rsp)
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movl $0x10, %r14d
xorl %r13d, %r13d
leaq 0x40(%rsp), %rbp
leaq 0x10(%rsp), %r12
movq 0x8(%rsp), %rax
movq (%rax), %rbx
movq %rbp, %rdi
callq 0x41120
movl $0x6, %edx
movq %rbp, %rdi
leaq 0x352a0(%rip), %rsi     # 0x7f7fb
callq 0x40b90
movq 0x40(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x58(%rsp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x58(%rsp,%rax)
incq %r13
movq %rbp, %rdi
movl %r13d, %esi
callq 0x41db0
movl $0x2, %edx
movq %rax, %rdi
leaq 0x371c4(%rip), %rsi     # 0x81758
callq 0x40b90
movq -0x10(%rbx,%r14), %rax
movq 0x38(%rax), %rsi
movq 0x40(%rax), %rdx
movq %rbp, %rdi
callq 0x40b90
movl $0x3, %edx
movq %rax, %rdi
leaq 0x35245(%rip), %rsi     # 0x7f802
callq 0x40b90
movq 0x40(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x58(%rsp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x58(%rsp,%rax)
movq -0x8(%rbx,%r14), %rsi
movq %rbp, %rdi
callq 0x3ffc0
movb $0x3a, 0x10(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x40b90
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movl (%rbx,%r14), %esi
movq %rax, %rdi
callq 0x3ffc0
movb $0x22, 0x10(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x40b90
movq %r12, %rdi
leaq 0x48(%rsp), %rsi
callq 0x418c0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x30(%rsp), %rdi
callq 0x40b90
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x4a66e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x40880
movq %rbp, %rdi
movq 0x58708(%rip), %rsi     # 0xa2d80
callq 0x3fc30
leaq 0xb0(%rsp), %rdi
callq 0x3f730
addq $0x18, %r14
cmpq %r13, %r15
jne 0x4a53c
cmpl $0x1, 0x38(%rsp)
leaq 0x50(%rsp), %r15
movq 0x30(%rsp), %rbx
jne 0x4a759
leaq 0x40(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x3514b(%rip), %rsi     # 0x7f806
leaq 0x3514f(%rip), %rdx     # 0x7f811
callq 0x3f8a0
movq 0x8(%rsp), %rax
movl 0x28(%rax), %r14d
leaq 0x10(%rsp), %rsi
movb $0x20, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x40b90
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq %rax, %rdi
callq 0x40b90
movq %rax, %rbx
leaq 0x37057(%rip), %rsi     # 0x81758
movl $0x2, %edx
movq %rax, %rdi
callq 0x40b90
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40700
leaq 0x36eb2(%rip), %rsi     # 0x815e7
movl $0x1, %edx
movq %rax, %rdi
callq 0x40b90
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x4a759
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x40880
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4a76d
movq %rax, %rbx
jmp 0x4a7e1
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
jne 0x4a78e
jmp 0x4a7e1
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x4a7e1
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x40880
jmp 0x4a7e1
jmp 0x4a7c0
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x4a7c3
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x40880
jmp 0x4a7c3
movq %rax, %rbx
movq 0x585b6(%rip), %rsi     # 0xa2d80
leaq 0x40(%rsp), %rdi
callq 0x3fc30
leaq 0xb0(%rsp), %rdi
callq 0x3f730
movq %rbx, %rdi
callq 0x41f10
nop