// File: /workspace/github_cpp_makefile_star2_O3/Chrom3D[P]Chrom3D/src/Model.cpp
// Function: Model::getCMM[abi:cxx11]()
string Model::getCMM() {
  stringstream res;

  vector<Chromosome>::iterator chriter;
  boost::container::static_vector<Bead,MAXSIZE>::iterator beaditer;
  double smallestBead = numeric_limits<double>::infinity();
  for(chriter = chromosomes.begin(); chriter != chromosomes.end(); chriter++) {
    for(beaditer = chriter->begin(); beaditer != chriter->end(); beaditer++) {
      if(beaditer->getRadius() < smallestBead) {
	smallestBead = beaditer->getRadius();
      }
    }
  }
  
  double linkRadius = smallestBead * 0.5;

  res << "<marker_set name=\"" <<  this->name << "\">" << endl;
  uint counter = 0;
  string prevChr;
  uint prevId=0;
  for(chriter = chromosomes.begin(); chriter != chromosomes.end(); chriter++) {
    for(beaditer = chriter->begin(); beaditer != chriter->end(); beaditer++) {
      res << "<marker id=\"" << counter << "\" x=\"" << beaditer->getX() << "\" y=\"" << beaditer->getY() << "\" z=\"" << beaditer->getZ() << "\" radius=\"" << beaditer->getRadius() << "\" r=\"" << beaditer->color[0] << "\" g=\"" << beaditer->color[1] << "\" b=\"" << beaditer->color[2] << "\" chrID=\"" << chriter->getName() << "\" beadID=\"" << beaditer->getID() << "\"/>" << endl;

      if(prevChr == chriter->getName()) {
	res << "<link id1=\"" << prevId << "\" id2=\"" << counter << "\" r=\"" << beaditer->color[0] << "\" g=\"" << beaditer->color[1] << "\" b=\"" << beaditer->color[2] << "\" radius=\"" << linkRadius << "\"/>" << endl;
      }
      prevChr = chriter->getName();
      prevId = counter;
      counter++;
    }    
  }
  res << "</marker_set>" << endl;
  return res.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %r12
movq %rdi, 0x60(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x6260
movq 0xa78(%r12), %rbx
cmpq 0xa80(%r12), %rbx
je 0x10f1a
movsd 0x19444(%rip), %xmm0    # 0x2a2e8
movsd %xmm0, 0x8(%rsp)
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb164
movq 0x40(%rsp), %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb170
cmpq 0x40(%rsp), %r15
je 0x10ef9
movq %r15, %rdi
callq 0xad7e
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x10ef3
movq %r15, %rdi
callq 0xad7e
movsd %xmm0, 0x8(%rsp)
addq $0x60, %r15
jmp 0x10ebf
addq $0x75330, %rbx          # imm = 0x75330
cmpq 0xa80(%r12), %rbx
jne 0x10eaf
movsd 0x8(%rsp), %xmm0
mulsd 0x18110(%rip), %xmm0    # 0x29028
jmp 0x10f22
movsd 0x193c6(%rip), %xmm0    # 0x2a2e8
movsd %xmm0, 0x8(%rsp)
leaq 0xa0(%rsp), %r13
leaq 0x1988e(%rip), %rsi     # 0x2a7c5
movl $0x12, %edx
movq %r13, %rdi
callq 0x6370
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r13, %rdi
callq 0x6370
movq %rax, %rbx
leaq 0x19879(%rip), %rsi     # 0x2a7d8
movl $0x2, %edx
movq %rax, %rdi
callq 0x6370
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x62f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6240
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0xa78(%r12), %r15
movq %r12, 0x88(%rsp)
cmpq 0xa80(%r12), %r15
je 0x11405
xorl %ebx, %ebx
leaq 0x18(%rsp), %r12
movq $0x0, 0x10(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xb164
movq 0x18(%rsp), %rbp
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xb170
cmpq 0x18(%rsp), %rbp
je 0x113e9
movl %ebx, 0x3c(%rsp)
movl $0xc, %edx
movq %r13, %rdi
leaq 0x197c3(%rip), %rsi     # 0x2a7db
callq 0x6370
movl 0x10(%rsp), %ebx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x6230
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x197aa(%rip), %rsi     # 0x2a7e8
callq 0x6370
movq %rbp, %rdi
callq 0xad6c
movq %r14, %rdi
callq 0x64d0
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x19789(%rip), %rsi     # 0x2a7ee
callq 0x6370
movq %rbp, %rdi
callq 0xad72
movq %r14, %rdi
callq 0x64d0
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x19768(%rip), %rsi     # 0x2a7f4
callq 0x6370
movq %rbp, %rdi
callq 0xad78
movq %r14, %rdi
callq 0x64d0
movq %rax, %r14
movl $0xa, %edx
movq %rax, %rdi
leaq 0x19747(%rip), %rsi     # 0x2a7fa
callq 0x6370
movq %rbp, %rdi
callq 0xad7e
movq %r14, %rdi
callq 0x64d0
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x1972b(%rip), %rsi     # 0x2a805
callq 0x6370
xorps %xmm0, %xmm0
cvtss2sd (%rbp), %xmm0
movq %r14, %rdi
callq 0x64d0
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x1970a(%rip), %rsi     # 0x2a80b
callq 0x6370
xorps %xmm0, %xmm0
cvtss2sd 0x4(%rbp), %xmm0
movq %r14, %rdi
callq 0x64d0
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x196e9(%rip), %rsi     # 0x2a811
callq 0x6370
xorps %xmm0, %xmm0
cvtss2sd 0x8(%rbp), %xmm0
movq %r14, %rdi
callq 0x64d0
movq %rax, %r14
movl $0x9, %edx
movq %rax, %rdi
leaq 0x196c8(%rip), %rsi     # 0x2a817
callq 0x6370
movq %r12, %rdi
movq %r15, %rsi
callq 0xb140
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %r14, %rdi
callq 0x6370
movq %rax, %r14
movl $0xa, %edx
movq %rax, %rdi
leaq 0x1969e(%rip), %rsi     # 0x2a821
callq 0x6370
leaq 0x68(%rsp), %rdi
movq %rbp, %rsi
callq 0xad90
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq %r14, %rdi
callq 0x6370
movq %rax, %r14
movl $0x3, %edx
movq %rax, %rdi
leaq 0x19673(%rip), %rsi     # 0x2a82c
callq 0x6370
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x62f0
movsbl %al, %esi
movq %r14, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6240
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x11201
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6310
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x1121d
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6310
movq %r12, %rdi
movq %r15, %rsi
callq 0xb140
movq 0x48(%rsp), %rdx
cmpq 0x20(%rsp), %rdx
jne 0x11253
movq 0x18(%rsp), %r14
testq %rdx, %rdx
je 0x1125d
movq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x6320
testl %eax, %eax
sete %r13b
jmp 0x11260
movq 0x18(%rsp), %r14
xorl %r13d, %r13d
jmp 0x11260
movb $0x1, %r13b
leaq 0x28(%rsp), %rax
cmpq %rax, %r14
je 0x1127a
movq 0x28(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x6310
testb %r13b, %r13b
leaq 0xa0(%rsp), %r13
je 0x113a2
movl $0xb, %edx
movq %r13, %rdi
leaq 0x19596(%rip), %rsi     # 0x2a830
callq 0x6370
movl 0x3c(%rsp), %esi
movq %r13, %rdi
callq 0x6230
movq %rax, %r14
movl $0x7, %edx
movq %rax, %rdi
leaq 0x1957f(%rip), %rsi     # 0x2a83c
callq 0x6370
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6230
movq %rax, %rbx
movl $0x5, %edx
movq %rax, %rdi
leaq 0x19526(%rip), %rsi     # 0x2a805
callq 0x6370
cvtss2sd (%rbp), %xmm0
movq %rbx, %rdi
callq 0x64d0
movq %rax, %rbx
movl $0x5, %edx
movq %rax, %rdi
leaq 0x19508(%rip), %rsi     # 0x2a80b
callq 0x6370
xorps %xmm0, %xmm0
cvtss2sd 0x4(%rbp), %xmm0
movq %rbx, %rdi
callq 0x64d0
movq %rax, %rbx
movl $0x5, %edx
movq %rax, %rdi
leaq 0x194e7(%rip), %rsi     # 0x2a811
callq 0x6370
xorps %xmm0, %xmm0
cvtss2sd 0x8(%rbp), %xmm0
movq %rbx, %rdi
callq 0x64d0
movq %rax, %rbx
movl $0xa, %edx
movq %rax, %rdi
leaq 0x194a9(%rip), %rsi     # 0x2a7fa
callq 0x6370
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x64d0
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
leaq 0x194b6(%rip), %rsi     # 0x2a82c
callq 0x6370
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x62f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6240
movq %r12, %rdi
movq %r15, %rsi
callq 0xb140
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0x63b0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x113d6
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6310
movq 0x10(%rsp), %rcx
leal 0x1(%rcx), %eax
addq $0x60, %rbp
movl %ecx, %ebx
jmp 0x10fea
addq $0x75330, %r15          # imm = 0x75330
movq 0x88(%rsp), %rax
cmpq 0xa80(%rax), %r15
jne 0x10fd5
leaq 0x19438(%rip), %rsi     # 0x2a844
movl $0xd, %edx
movq %r13, %rdi
callq 0x6370
movq 0xa0(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x62f0
movsbl %al, %esi
movq %r13, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6240
leaq 0xa8(%rsp), %rsi
movq 0x60(%rsp), %rdi
callq 0x64b0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x11473
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6310
movq 0x26a96(%rip), %rsi     # 0x37f10
leaq 0x90(%rsp), %rdi
callq 0x6290
leaq 0x110(%rsp), %rdi
callq 0x6120
movq 0x60(%rsp), %rax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11506
jmp 0x114bf
jmp 0x11506
jmp 0x114bf
jmp 0x11506
jmp 0x11506
jmp 0x11506
jmp 0x114c4
jmp 0x11506
jmp 0x114bf
movq %rax, %rbx
jmp 0x11525
movq %rax, %rbx
jmp 0x114e8
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x114e8
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6310
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x11509
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6310
jmp 0x11509
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x11525
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6310
movq 0x269e4(%rip), %rsi     # 0x37f10
leaq 0x90(%rsp), %rdi
callq 0x6290
leaq 0x110(%rsp), %rdi
callq 0x6120
movq %rbx, %rdi
callq 0x65b0