// File: /workspace/github_cpp_makefile_star2_O3/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 0xcc30
movq 0x18(%r15), %rcx
addq $0x10, %r15
testq %rcx, %rcx
je 0x1478e
movq %r15, %rdx
xorl %esi, %esi
cmpq %rax, 0x20(%rcx)
setb %sil
cmovaeq %rcx, %rdx
movq 0x10(%rcx,%rsi,8), %rcx
testq %rcx, %rcx
jne 0x14769
cmpq %r15, %rdx
je 0x1478e
cmpq %rax, 0x20(%rdx)
cmovbeq %rdx, %r15
movq 0x8(%rbx), %rax
addq $0x10, %rax
cmpq %rax, %r15
je 0x147a1
movq 0x28(%r15), %r12
jmp 0x147a4
xorl %r12d, %r12d
movq (%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xcc30
movq %r15, %rdi
movq %rax, %rsi
callq 0xcce6
cmpq $0x2, %rax
jb 0x14859
decl 0x10(%rbx)
movq 0x20(%rbx), %rcx
movq %r12, %xmm0
movq 0x59b5(%rip), %xmm1     # 0x1a190
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x59b9(%rip), %xmm2     # 0x1a1a0
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 0x14859
leaq -0x1(%r12), %rax
movq %rax, %xmm1
punpckldq 0x5964(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x596c(%rip), %xmm1     # 0x1a1a0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
movl 0x14(%rbx), %eax
jae 0x14854
subl %r12d, %eax
movl %eax, 0x14(%rbx)
decl 0x18(%rbx)
jmp 0x14859
decl %eax
movl %eax, 0x14(%rbx)
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x122bc
movslq 0x14(%rbx), %rax
testq %rax, %rax
js 0x14884
movq 0x8(%rbx), %rcx
cmpq %rax, 0x50(%rcx)
jb 0x14884
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xd75d(%rip), %rdi      # 0x21fe8
leaq 0x5ab1(%rip), %rsi      # 0x1a343
callq 0x5380
movl 0x14(%rbx), %esi
movq %rax, %rdi
callq 0x5670
movq %rax, %rdi
callq 0x51a0
movl $0x8, %edi
callq 0x51b0
movq 0xd6ed(%rip), %rcx      # 0x21fa8
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0xd707(%rip), %rsi      # 0x21fd0
movq 0xd720(%rip), %rdx      # 0x21ff0
movq %rax, %rdi
callq 0x5660