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

{
  JoinRecord *rec = getManager()->findJoin(offset); // Record must already exist
  a_v(s,"space",getName());
  int4 num = rec->numPieces();
  int4 count = 0;
  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 << '\"';
    count += vdata.size;
    s << t.str();
  }
  if (num == 1)
    a_v_i(s,"logicalsize",rec->getUnified().size);
  if ((count != size)&&(num>1))
    throw LowlevelError("size attribute in join tag does not match size of pieces");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movl %ecx, %ebp
movq %rsi, %rbx
movq %rdi, %r15
movq 0x10(%rdi), %rdi
movq %rdx, %rsi
callq 0x41420
movq %rax, 0x8(%rsp)
leaq 0x60(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x352f9(%rip), %rsi     # 0x7fb1d
leaq 0x352f7(%rip), %rdx     # 0x7fb22
leaq 0x50(%rsp), %rdi
callq 0x3f8a0
leaq 0x18(%rsp), %rsi
movb $0x20, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x40b90
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq %rax, %rdi
callq 0x40b90
leaq 0x36ef5(%rip), %rsi     # 0x81758
movl $0x2, %edx
movq %rax, %rdi
callq 0x40b90
movq 0x38(%r15), %rsi
movq %rbx, %rdi
callq 0x3f3d0
leaq 0x36d64(%rip), %rsi     # 0x815e7
movl $0x1, %edx
movq %rbx, %rdi
callq 0x40b90
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x4a8a7
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x40880
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rcx
testl %ecx, %ecx
jle 0x4ab28
movl %ebp, 0x14(%rsp)
movq %rbx, 0x38(%rsp)
movq %rcx, 0x40(%rsp)
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq %rcx, 0x48(%rsp)
xorl %r13d, %r13d
movl $0x10, %r14d
leaq 0x50(%rsp), %rbp
leaq 0x18(%rsp), %r12
xorl %ebx, %ebx
movq 0x8(%rsp), %rax
movq (%rax), %r15
movq %rbp, %rdi
callq 0x41120
movl $0x6, %edx
movq %rbp, %rdi
leaq 0x34ee1(%rip), %rsi     # 0x7f7fb
callq 0x40b90
movq 0x50(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x68(%rsp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x68(%rsp,%rax)
incq %r13
movq %rbp, %rdi
movl %r13d, %esi
callq 0x41db0
movl $0x2, %edx
movq %rax, %rdi
leaq 0x36e05(%rip), %rsi     # 0x81758
callq 0x40b90
movq -0x10(%r15,%r14), %rax
movq 0x38(%rax), %rsi
movq 0x40(%rax), %rdx
movq %rbp, %rdi
callq 0x40b90
movl $0x3, %edx
movq %rax, %rdi
leaq 0x34e86(%rip), %rsi     # 0x7f802
callq 0x40b90
movq 0x50(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x68(%rsp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x68(%rsp,%rax)
movq -0x8(%r15,%r14), %rsi
movq %rbp, %rdi
callq 0x3ffc0
movb $0x3a, 0x18(%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 (%r15,%r14), %esi
movq %rax, %rdi
callq 0x3ffc0
movb $0x22, 0x18(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x40b90
addl (%r15,%r14), %ebx
movq %r12, %rdi
leaq 0x58(%rsp), %rsi
callq 0x418c0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x38(%rsp), %rdi
callq 0x40b90
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x4aa31
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x40880
movq %rbp, %rdi
movq 0x58345(%rip), %rsi     # 0xa2d80
callq 0x3fc30
leaq 0xc0(%rsp), %rdi
callq 0x3f730
addq $0x18, %r14
cmpq %r13, 0x48(%rsp)
jne 0x4a8fb
cmpl $0x1, 0x40(%rsp)
jne 0x4ab1d
leaq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %r15
movq %r15, (%rdi)
leaq 0x34d8b(%rip), %rsi     # 0x7f806
leaq 0x34d8f(%rip), %rdx     # 0x7f811
callq 0x3f8a0
movq 0x8(%rsp), %rax
movl 0x28(%rax), %r14d
leaq 0x18(%rsp), %rsi
movb $0x20, (%rsi)
movl $0x1, %edx
movq 0x38(%rsp), %rdi
callq 0x40b90
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq %rax, %rdi
callq 0x40b90
movq %rax, %rbx
leaq 0x36c95(%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 0x36af0(%rip), %rsi     # 0x815e7
movl $0x1, %edx
movq %rax, %rdi
callq 0x40b90
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x4ab28
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x40880
jmp 0x4ab28
cmpl 0x14(%rsp), %ebx
leaq 0x60(%rsp), %rbx
jne 0x4ab3a
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x3fb00
movq %rax, %r14
leaq 0x50(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x34cbc(%rip), %rsi     # 0x7f812
leaq 0x34ced(%rip), %rdx     # 0x7f84a
callq 0x3f8a0
movb $0x1, %bpl
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0x3f890
xorl %ebp, %ebp
movq 0x5832d(%rip), %rsi     # 0xa2ea8
movq 0x580b6(%rip), %rdx     # 0xa2c38
movq %r14, %rdi
callq 0x41d70
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x4aba9
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x40880
testb %bpl, %bpl
jne 0x4abb6
jmp 0x4ac36
movq %rax, %rbx
movq %r14, %rdi
callq 0x40090
jmp 0x4ac36
jmp 0x4abc2
movq %rax, %rbx
jmp 0x4ac36
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
jne 0x4abe3
jmp 0x4ac36
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x4ac36
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x40880
jmp 0x4ac36
jmp 0x4ac15
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x4ac18
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x40880
jmp 0x4ac18
movq %rax, %rbx
movq 0x58161(%rip), %rsi     # 0xa2d80
leaq 0x50(%rsp), %rdi
callq 0x3fc30
leaq 0xc0(%rsp), %rdi
callq 0x3f730
movq %rbx, %rdi
callq 0x41f10