// File: Chrom3D[P]Chrom3D/src/Model.cpp
// Function: Model::getLossScore()
double Model::getLossScore() {
  map<string,vector<Constraint> >::iterator it1;
  vector<Constraint>::iterator it2;  
  double res = 0;
  string constraintType;
  for(it1 = constraints.begin(); it1 != constraints.end(); it1++) {
      for(it2 = it1->second.begin(); it2 != it1->second.end(); it2++) {
	constraintType = it2->getConstraintType();
	if(constraintType == "INTERACTION" || constraintType == "INTERACTION_DIST" || constraintType == "INTERACTION_INTRA" || constraintType == "INTERACTION_INTER") {
	  res += it2->eval()/2;
	}
	else {
	  res += it2->eval();
	}
      }
  }
  return res; 
}

// Assembly:
subq $0xe8, %rsp
movq %rdi, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x28220
leaq 0xd0(%rsp), %rdi
callq 0x28240
xorps %xmm0, %xmm0
movsd %xmm0, 0xc8(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x8670
movq 0x40(%rsp), %rdi
addq $0x9e8, %rdi            # imm = 0x9E8
callq 0x28260
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x40(%rsp), %rdi
addq $0x9e8, %rdi            # imm = 0x9E8
callq 0x282b0
movq %rax, 0x98(%rsp)
leaq 0xd8(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x28290
testb $0x1, %al
jne 0x1d47f
jmp 0x1d68c
leaq 0xd8(%rsp), %rdi
callq 0x282e0
movq %rax, %rdi
addq $0x20, %rdi
callq 0x28300
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0xd0(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x282e0
movq %rax, %rdi
addq $0x20, %rdi
callq 0x28370
movq %rax, 0x88(%rsp)
leaq 0xd0(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x28330
testb $0x1, %al
jne 0x1d4ef
jmp 0x1d671
leaq 0xd0(%rsp), %rdi
callq 0x283a0
movq %rax, %rsi
leaq 0x68(%rsp), %rdi
callq 0x1ac30
jmp 0x1d50b
leaq 0xa8(%rsp), %rdi
movq %rdi, 0x30(%rsp)
leaq 0x68(%rsp), %rsi
movq %rsi, 0x28(%rsp)
callq 0x85b0
movq 0x28(%rsp), %rdi
callq 0x8998
movq 0x30(%rsp), %rdi
leaq 0x32fe7(%rip), %rsi     # 0x50524
callq 0x28560
movb %al, 0x3f(%rsp)
jmp 0x1d548
movb 0x3f(%rsp), %al
testb $0x1, %al
jne 0x1d5be
jmp 0x1d552
leaq 0x3300b(%rip), %rsi     # 0x50564
leaq 0xa8(%rsp), %rdi
callq 0x28560
movb %al, 0x27(%rsp)
jmp 0x1d56c
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0x1d5be
jmp 0x1d576
leaq 0x32fd5(%rip), %rsi     # 0x50552
leaq 0xa8(%rsp), %rdi
callq 0x28560
movb %al, 0x26(%rsp)
jmp 0x1d590
movb 0x26(%rsp), %al
testb $0x1, %al
jne 0x1d5be
jmp 0x1d59a
leaq 0x332b4(%rip), %rsi     # 0x50855
leaq 0xa8(%rsp), %rdi
callq 0x28560
movb %al, 0x25(%rsp)
jmp 0x1d5b4
movb 0x25(%rsp), %al
testb $0x1, %al
jne 0x1d5be
jmp 0x1d621
leaq 0xd0(%rsp), %rdi
callq 0x283a0
movq %rax, %rdi
callq 0x1ab90
movsd %xmm0, 0x18(%rsp)
jmp 0x1d5db
movsd 0x18(%rsp), %xmm0
movsd 0x31a37(%rip), %xmm1    # 0x4f020
divsd %xmm1, %xmm0
addsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0xc8(%rsp)
jmp 0x1d656
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x8998
jmp 0x1d6b6
leaq 0xd0(%rsp), %rdi
callq 0x283a0
movq %rax, %rdi
callq 0x1ab90
movsd %xmm0, 0x10(%rsp)
jmp 0x1d63e
movsd 0x10(%rsp), %xmm0
addsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0xc8(%rsp)
jmp 0x1d658
leaq 0xd0(%rsp), %rdi
xorl %esi, %esi
callq 0x283b0
movq %rax, 0x50(%rsp)
jmp 0x1d4b0
jmp 0x1d673
leaq 0xd8(%rsp), %rdi
xorl %esi, %esi
callq 0x283f0
movq %rax, 0x48(%rsp)
jmp 0x1d448
movsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x8998
movsd 0x8(%rsp), %xmm0
addq $0xe8, %rsp
retq
movq 0x60(%rsp), %rdi
callq 0x8870