// File: /workspace/github_cpp_makefile_star2_O2/CK7[P]abawaca/src/ClusterSeparatorSplitScafs.cpp
// Function: ClusterSeparatorSplitScafs::ClusterStats::operator-=(unsigned long)
const ClusterSeparatorSplitScafs::ClusterStats& ClusterSeparatorSplitScafs::ClusterStats::operator -= (size_t dp)
{
	auto	mit = cluster.scafs_find(this->scaf_db.dp2scaf(dp));
	size_t	ndps_in_cluster = (mit != cluster.scafs_end())? mit->second : 0;
	size_t	ndps_in_scaf = scaf_db.ndps(this->scaf_db.dp2scaf(dp));

	if(ndps_in_scaf > 1) {
		this->cluster_useful_ndps--;
		// Is this scaf part of the cluster after the addition of the dp?
		if(is_scaf_part_of(ndps_in_cluster, ndps_in_scaf)) {
			// Is this scaf part of the cluster before the addition of the dp?
			if(!is_scaf_part_of(ndps_in_cluster-1, ndps_in_scaf)) {
				ndps_in_scafs_that_belong -= ndps_in_cluster;
				scafs_in--;
			}
			else
				ndps_in_scafs_that_belong--;
		}
	}
	cluster -= dp;

	if(ndps_in_scafs_that_belong < 0 || ndps_in_scafs_that_belong > cluster.ndps()) {
		cerr << "Fatal error (2): illegal number of dps in scafs that belong: " << ndps_in_scafs_that_belong << endl;
		throw exception();
	}

	return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x8(%rbx), %r15
callq 0x9b48
movq %r15, %rdi
movq %rax, %rsi
callq 0xffb4
movq 0x8(%rbx), %rcx
addq $0x10, %rcx
cmpq %rcx, %rax
je 0x10ceb
movq 0x28(%rax), %r12
jmp 0x10cee
xorl %r12d, %r12d
movq (%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x9b48
movq %r15, %rdi
movq %rax, %rsi
callq 0x9bec
cmpq $0x2, %rax
jb 0x10da3
decl 0x10(%rbx)
movq 0x20(%rbx), %rcx
movq %r12, %xmm0
movq 0x543b(%rip), %xmm1     # 0x16160
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x543f(%rip), %xmm2     # 0x16170
subpd %xmm2, %xmm0
movapd %xmm0, %xmm3
unpckhpd %xmm0, %xmm3            # xmm3 = xmm3[1],xmm0[1]
addsd %xmm0, %xmm3
movq %rax, %xmm4
punpckldq %xmm1, %xmm4    # xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1]
subpd %xmm2, %xmm4
movapd %xmm4, %xmm0
unpckhpd %xmm4, %xmm0            # xmm0 = xmm0[1],xmm4[1]
addsd %xmm4, %xmm0
mulsd (%rcx), %xmm0
ucomisd %xmm0, %xmm3
jb 0x10da3
leaq -0x1(%r12), %rax
movq %rax, %xmm1
punpckldq 0x53ea(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x53f2(%rip), %xmm1     # 0x16170
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
movl 0x14(%rbx), %eax
jae 0x10d9e
subl %r12d, %eax
movl %eax, 0x14(%rbx)
decl 0x18(%rbx)
jmp 0x10da3
decl %eax
movl %eax, 0x14(%rbx)
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0xea48
movslq 0x14(%rbx), %rax
testq %rax, %rax
js 0x10dce
movq 0x8(%rbx), %rcx
cmpq %rax, 0x50(%rcx)
jb 0x10dce
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xe213(%rip), %rdi      # 0x1efe8
leaq 0x5537(%rip), %rsi      # 0x16313
callq 0x4340
movl 0x14(%rbx), %esi
movq %rax, %rdi
callq 0x4630
movq %rax, %rdi
callq 0x41a0
pushq $0x8
popq %rdi
callq 0x41b0
movq 0xe1a5(%rip), %rcx      # 0x1efa8
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0xe1bf(%rip), %rsi      # 0x1efd0
movq 0xe1d8(%rip), %rdx      # 0x1eff0
movq %rax, %rdi
callq 0x4620