// 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+1, ndps_in_scaf)) {
			// Is this scaf part of the cluster before the addition of the dp?
			if(!is_scaf_part_of(ndps_in_cluster, ndps_in_scaf)) {
				ndps_in_scafs_that_belong += ndps_in_cluster;
				scafs_in++;
			}
			ndps_in_scafs_that_belong++;
		}
	}

	cluster += dp;

	if(ndps_in_scafs_that_belong < 0 || ndps_in_scafs_that_belong > cluster.ndps()) {
		cerr << "Fatal error (1): 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 0x145f6
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 0x145d1
cmpq %r15, %rdx
je 0x145f6
cmpq %rax, 0x20(%rdx)
cmovbeq %rdx, %r15
movq 0x8(%rbx), %rax
addq $0x10, %rax
cmpq %rax, %r15
je 0x14609
movq 0x28(%r15), %r12
jmp 0x1460c
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 0x146bc
incl 0x10(%rbx)
movq 0x20(%rbx), %rcx
leaq 0x1(%r12), %rdx
movq %rdx, %xmm0
movq 0x5b48(%rip), %xmm1     # 0x1a190
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x5b4c(%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 0x146bc
movq %r12, %xmm1
punpckldq 0x5afc(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x5b04(%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 0x146b7
addl %r12d, %eax
incl 0x18(%rbx)
incl %eax
movl %eax, 0x14(%rbx)
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x121cc
movslq 0x14(%rbx), %rax
testq %rax, %rax
js 0x146e7
movq 0x8(%rbx), %rcx
cmpq %rax, 0x50(%rcx)
jb 0x146e7
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xd8fa(%rip), %rdi      # 0x21fe8
leaq 0x5c10(%rip), %rsi      # 0x1a305
callq 0x5380
movl 0x14(%rbx), %esi
movq %rax, %rdi
callq 0x5670
movq %rax, %rdi
callq 0x51a0
movl $0x8, %edi
callq 0x51b0
movq 0xd88a(%rip), %rcx      # 0x21fa8
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0xd8a4(%rip), %rsi      # 0x21fd0
movq 0xd8bd(%rip), %rdx      # 0x21ff0
movq %rax, %rdi
callq 0x5660
nop