// File: /workspace/github_cpp_makefile_star2_O2/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, %rbp
movq %rdi, 0x20(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x6290
leaq 0x8(%rsp), %rbx
andq $0x0, (%rbx)
movq 0xa78(%rbp), %r14
movsd 0x12374(%rip), %xmm0    # 0x21420
movsd %xmm0, 0x10(%rsp)
leaq 0x30(%rsp), %r15
cmpq 0xa80(%rbp), %r14
je 0xf125
movq %r15, %rdi
movq %r14, %rsi
callq 0xa778
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0xa784
movq 0x8(%rsp), %rdi
cmpq 0x30(%rsp), %rdi
je 0xf11c
callq 0xa3e8
movsd 0x10(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0xf10d
movq 0x8(%rsp), %rdi
callq 0xa3e8
movsd %xmm0, 0x10(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xb1ee
jmp 0xf0d5
addq $0x75330, %r14          # imm = 0x75330
jmp 0xf0b7
leaq 0xa0(%rsp), %rdi
leaq 0x127f1(%rip), %rsi     # 0x21925
callq 0x6330
movq %rax, %rdi
movq %rbp, %rsi
callq 0x6320
leaq 0x127ed(%rip), %rsi     # 0x21938
movq %rax, %rdi
callq 0x6330
movq %rax, %rdi
callq 0x61d0
movsd 0x10(%rsp), %xmm0
mulsd 0x10ebf(%rip), %xmm0    # 0x20028
movsd %xmm0, 0x10(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0xa78(%rbp), %r13
xorl %r14d, %r14d
leaq 0x50(%rsp), %rbx
xorl %r12d, %r12d
movq %rbp, 0x28(%rsp)
cmpq 0xa80(%rbp), %r13
je 0xf4d0
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa778
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movl %r14d, %eax
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa784
movq 0x8(%rsp), %rax
cmpq 0x50(%rsp), %rax
je 0xf4b7
movq %rbx, %rbp
leaq 0xa0(%rsp), %rdi
leaq 0x1274d(%rip), %rsi     # 0x2193b
callq 0x6330
movl 0x18(%rsp), %r15d
movq %rax, %rdi
movq %r15, %rsi
callq 0x6270
movq %rax, %rdi
leaq 0x1273b(%rip), %rsi     # 0x21948
callq 0x6330
movq %rax, %r14
movq 0x8(%rsp), %rdi
callq 0xa3d6
movq %r14, %rdi
callq 0x6500
movq %rax, %rdi
leaq 0x1271d(%rip), %rsi     # 0x2194e
callq 0x6330
movq %rax, %r14
movq 0x8(%rsp), %rdi
callq 0xa3dc
movq %r14, %rdi
callq 0x6500
movq %rax, %rdi
leaq 0x126ff(%rip), %rsi     # 0x21954
callq 0x6330
movq %rax, %r14
movq 0x8(%rsp), %rdi
callq 0xa3e2
movq %r14, %rdi
callq 0x6500
movq %rax, %rdi
leaq 0x126e1(%rip), %rsi     # 0x2195a
callq 0x6330
movq %rax, %r14
movq 0x8(%rsp), %rdi
callq 0xa3e8
movq %r14, %rdi
callq 0x6500
movq %rax, %rdi
leaq 0x126c8(%rip), %rsi     # 0x21965
callq 0x6330
movq 0x8(%rsp), %rcx
movss (%rcx), %xmm0
movq %rax, %rdi
callq 0x62c0
movq %rax, %rdi
leaq 0x126ae(%rip), %rsi     # 0x2196b
callq 0x6330
movq 0x8(%rsp), %rcx
movss 0x4(%rcx), %xmm0
movq %rax, %rdi
callq 0x62c0
movq %rax, %rdi
leaq 0x12693(%rip), %rsi     # 0x21971
callq 0x6330
movq 0x8(%rsp), %rcx
movss 0x8(%rcx), %xmm0
movq %rax, %rdi
callq 0x62c0
movq %rax, %rdi
leaq 0x12678(%rip), %rsi     # 0x21977
callq 0x6330
movq %rax, %r14
movq %rbp, %rbx
movq %rbp, %rdi
movq %r13, %rsi
callq 0xa766
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6320
movq %rax, %rdi
leaq 0x12657(%rip), %rsi     # 0x21981
callq 0x6330
movq %rax, %r14
movq 0x8(%rsp), %rsi
leaq 0x70(%rsp), %rbx
movq %rbx, %rdi
callq 0xa3fa
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6320
movq %rax, %rdi
leaq 0x12633(%rip), %rsi     # 0x2198c
callq 0x6330
movq %rax, %rdi
callq 0x61d0
movq %rbx, %rdi
callq 0x66d0
movq %rbp, %rbx
movq %rbp, %rdi
callq 0x66d0
movq %rbp, %rdi
movq %r13, %rsi
callq 0xa766
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0xa491
movl %eax, %r14d
movq %rbx, %rdi
callq 0x66d0
testb %r14b, %r14b
je 0xf474
leaq 0xa0(%rsp), %rdi
leaq 0x125dc(%rip), %rsi     # 0x21990
callq 0x6330
movl %r12d, %esi
movq %rax, %rdi
callq 0x6270
movq %rax, %rdi
leaq 0x125ce(%rip), %rsi     # 0x2199c
callq 0x6330
movq %rax, %rdi
movq %r15, %rsi
callq 0x6270
movq %rax, %rdi
leaq 0x1257d(%rip), %rsi     # 0x21965
callq 0x6330
movq 0x8(%rsp), %rcx
movss (%rcx), %xmm0
movq %rax, %rdi
callq 0x62c0
movq %rax, %rdi
leaq 0x12563(%rip), %rsi     # 0x2196b
callq 0x6330
movq 0x8(%rsp), %rcx
movss 0x4(%rcx), %xmm0
movq %rax, %rdi
callq 0x62c0
movq %rax, %rdi
leaq 0x12548(%rip), %rsi     # 0x21971
callq 0x6330
movq 0x8(%rsp), %rcx
movss 0x8(%rcx), %xmm0
movq %rax, %rdi
callq 0x62c0
movq %rax, %rdi
leaq 0x12510(%rip), %rsi     # 0x2195a
callq 0x6330
movq %rax, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x6500
movq %rax, %rdi
leaq 0x12525(%rip), %rsi     # 0x2198c
callq 0x6330
movq %rax, %rdi
callq 0x61d0
movq %rbp, %rbx
movq %rbp, %rdi
movq %r13, %rsi
callq 0xa766
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0x63d0
movq %rbx, %rdi
callq 0x66d0
movq 0x18(%rsp), %r15
leal 0x1(%r15), %r14d
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0xb1ee
movl %r15d, %r12d
jmp 0xf1b9
addq $0x75330, %r13          # imm = 0x75330
movq 0x18(%rsp), %rax
movl %eax, %r14d
movq 0x28(%rsp), %rbp
jmp 0xf197
leaq 0x124cd(%rip), %rsi     # 0x219a4
leaq 0xa0(%rsp), %rdi
callq 0x6330
movq %rax, %rdi
callq 0x61d0
leaq 0xa8(%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x64d0
leaq 0x30(%rsp), %rdi
callq 0x66d0
leaq 0x90(%rsp), %rdi
callq 0x62d0
movq 0x20(%rsp), %rax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf563
jmp 0xf540
jmp 0xf563
jmp 0xf540
jmp 0xf545
jmp 0xf563
jmp 0xf563
jmp 0xf563
jmp 0xf563
jmp 0xf540
movq %rax, %rbx
jmp 0xf570
movq %rax, %rbx
jmp 0xf557
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x66d0
leaq 0x50(%rsp), %rdi
callq 0x66d0
jmp 0xf566
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x66d0
leaq 0x90(%rsp), %rdi
callq 0x62d0
movq %rbx, %rdi
callq 0x65d0
nop