// File: /workspace/github_cpp_makefile_star2_O1/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 0xcd08
movq 0x18(%r15), %rdx
addq $0x10, %r15
movq %r15, %rcx
testq %rdx, %rdx
je 0x149ce
movq %r15, %rcx
xorl %esi, %esi
cmpq %rax, 0x20(%rdx)
setb %sil
cmovaeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x149b6
cmpq %r15, %rcx
je 0x149db
cmpq %rax, 0x20(%rcx)
cmovbeq %rcx, %r15
movq 0x8(%rbx), %rax
addq $0x10, %rax
cmpq %rax, %r15
je 0x149ee
movq 0x28(%r15), %r12
jmp 0x149f1
xorl %r12d, %r12d
movq (%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xcd08
movq %r15, %rdi
movq %rax, %rsi
callq 0xcdbe
cmpq $0x2, %rax
jb 0x14aa6
decl 0x10(%rbx)
movq 0x20(%rbx), %rcx
movq %r12, %xmm0
movq 0x6778(%rip), %xmm1     # 0x1b1a0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x677c(%rip), %xmm2     # 0x1b1b0
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 0x14aa6
leaq -0x1(%r12), %rax
movq %rax, %xmm1
punpckldq 0x6727(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x672f(%rip), %xmm1     # 0x1b1b0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
movl 0x14(%rbx), %eax
jae 0x14aa1
subl %r12d, %eax
movl %eax, 0x14(%rbx)
decl 0x18(%rbx)
jmp 0x14aa6
decl %eax
movl %eax, 0x14(%rbx)
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x1248a
movslq 0x14(%rbx), %rax
testq %rax, %rax
js 0x14ad1
movq 0x8(%rbx), %rcx
cmpq %rax, 0x50(%rcx)
jb 0x14ad1
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xe510(%rip), %rdi      # 0x22fe8
leaq 0x6874(%rip), %rsi      # 0x1b353
callq 0x5380
movl 0x14(%rbx), %esi
movq %rax, %rdi
callq 0x5670
movq %rax, %rdi
callq 0x51a0
movl $0x8, %edi
callq 0x51b0
movq 0xe4a0(%rip), %rcx      # 0x22fa8
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0xe4ba(%rip), %rsi      # 0x22fd0
movq 0xe4d3(%rip), %rdx      # 0x22ff0
movq %rax, %rdi
callq 0x5660