// File: /workspace/github_cpp_makefile_star2_O1/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, %r13
movq %rdi, 0x60(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x6260
movq 0xa78(%r13), %rbx
cmpq 0xa80(%r13), %rbx
je 0x11011
movsd 0x1934c(%rip), %xmm0    # 0x2a2e8
movsd %xmm0, 0x8(%rsp)
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb208
movq 0x40(%rsp), %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb214
cmpq 0x40(%rsp), %r15
je 0x10ff1
movq %r15, %rdi
callq 0xae12
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x10feb
movq %r15, %rdi
callq 0xae12
movsd %xmm0, 0x8(%rsp)
addq $0x60, %r15
jmp 0x10fb7
addq $0x75330, %rbx          # imm = 0x75330
cmpq 0xa80(%r13), %rbx
jne 0x10fa7
movsd 0x8(%rsp), %xmm0
mulsd 0x18019(%rip), %xmm0    # 0x29028
jmp 0x11019
movsd 0x192cf(%rip), %xmm0    # 0x2a2e8
movsd %xmm0, 0x8(%rsp)
leaq 0xa0(%rsp), %r14
leaq 0x19797(%rip), %rsi     # 0x2a7c5
movl $0x12, %edx
movq %r14, %rdi
callq 0x6370
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r14, %rdi
callq 0x6370
movq %rax, %rbx
leaq 0x19783(%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(%r13), %r15
movq %r13, 0x88(%rsp)
cmpq 0xa80(%r13), %r15
je 0x114f1
xorl %ebx, %ebx
leaq 0x18(%rsp), %r12
movq $0x0, 0x10(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xb208
movq 0x18(%rsp), %rbp
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xb214
cmpq 0x18(%rsp), %rbp
je 0x114d5
movl %ebx, 0x3c(%rsp)
movl $0xc, %edx
movq %r14, %r13
movq %r14, %rdi
leaq 0x196cc(%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 0x196b3(%rip), %rsi     # 0x2a7e8
callq 0x6370
movq %rbp, %rdi
callq 0xae00
movq %r14, %rdi
callq 0x64d0
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x19692(%rip), %rsi     # 0x2a7ee
callq 0x6370
movq %rbp, %rdi
callq 0xae06
movq %r14, %rdi
callq 0x64d0
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x19671(%rip), %rsi     # 0x2a7f4
callq 0x6370
movq %rbp, %rdi
callq 0xae0c
movq %r14, %rdi
callq 0x64d0
movq %rax, %r14
movl $0xa, %edx
movq %rax, %rdi
leaq 0x19650(%rip), %rsi     # 0x2a7fa
callq 0x6370
movq %rbp, %rdi
callq 0xae12
movq %r14, %rdi
callq 0x64d0
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x19634(%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 0x19613(%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 0x195f2(%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 0x195d1(%rip), %rsi     # 0x2a817
callq 0x6370
movq %r12, %rdi
movq %r15, %rsi
callq 0xb1e4
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %r14, %rdi
callq 0x6370
movq %rax, %r14
movl $0xa, %edx
movq %rax, %rdi
leaq 0x195a7(%rip), %rsi     # 0x2a821
callq 0x6370
leaq 0x68(%rsp), %rdi
movq %rbp, %rsi
callq 0xae24
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq %r14, %rdi
callq 0x6370
movq %rax, %r14
movl $0x3, %edx
movq %rax, %rdi
leaq 0x1957c(%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 0x112f8
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6310
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x11314
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6310
movq %r12, %rdi
movq %r15, %rsi
callq 0xb1e4
movq 0x48(%rsp), %rdx
cmpq 0x20(%rsp), %rdx
jne 0x11347
testq %rdx, %rdx
je 0x1134c
movq 0x18(%rsp), %rsi
movq 0x40(%rsp), %rdi
callq 0x6320
testl %eax, %eax
sete %r14b
jmp 0x1134f
xorl %r14d, %r14d
jmp 0x1134f
movb $0x1, %r14b
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x1136b
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6310
testb %r14b, %r14b
je 0x1148b
movl $0xb, %edx
movq %r13, %rdi
leaq 0x194ad(%rip), %rsi     # 0x2a830
callq 0x6370
movl 0x3c(%rsp), %esi
movq %r13, %rdi
callq 0x6230
movq %rax, %r14
movl $0x7, %edx
movq %rax, %rdi
leaq 0x19496(%rip), %rsi     # 0x2a83c
callq 0x6370
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6230
movq %rax, %rbx
movl $0x5, %edx
movq %rax, %rdi
leaq 0x1943d(%rip), %rsi     # 0x2a805
callq 0x6370
cvtss2sd (%rbp), %xmm0
movq %rbx, %rdi
callq 0x64d0
movq %rax, %rbx
movl $0x5, %edx
movq %rax, %rdi
leaq 0x1941f(%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 0x193fe(%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 0x193c0(%rip), %rsi     # 0x2a7fa
callq 0x6370
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x64d0
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
leaq 0x193cd(%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 0xb1e4
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0x63b0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x114bf
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6310
movq 0x10(%rsp), %rcx
leal 0x1(%rcx), %eax
addq $0x60, %rbp
movl %ecx, %ebx
movq %r13, %r14
jmp 0x110de
addq $0x75330, %r15          # imm = 0x75330
movq 0x88(%rsp), %rax
cmpq 0xa80(%rax), %r15
jne 0x110c9
leaq 0x1934c(%rip), %rsi     # 0x2a844
movl $0xd, %edx
movq %r14, %rdi
callq 0x6370
movq 0xa0(%rsp), %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
leaq 0xa8(%rsp), %rsi
movq 0x60(%rsp), %rdi
callq 0x64b0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x1155f
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6310
movq 0x269aa(%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 0x115f2
jmp 0x115ab
jmp 0x115f2
jmp 0x115ab
jmp 0x115f2
jmp 0x115f2
jmp 0x115f2
jmp 0x115b0
jmp 0x115f2
jmp 0x115ab
movq %rax, %rbx
jmp 0x11611
movq %rax, %rbx
jmp 0x115d4
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x115d4
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6310
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x115f5
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6310
jmp 0x115f5
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x11611
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6310
movq 0x268f8(%rip), %rsi     # 0x37f10
leaq 0x90(%rsp), %rdi
callq 0x6290
leaq 0x110(%rsp), %rdi
callq 0x6120
movq %rbx, %rdi
callq 0x65b0