// File: /workspace/github_cpp_makefile_star2_O1/dtsaras[P]GCW/GCW.cpp
// Function: DSSA(Graph&, int, int, int, std::vector<int, std::allocator<int>>&, float, float, sampler<int>&, int, int)
void DSSA(Graph & g, int n, int k, int t, vector<int> &seeds, float epsilon, float delta, sampler<int> &samp, int p, int m){
	// cout << "################## 1" << endl;
	HyperGraph hg(n);
	vector<double> degree(k+1,0);

	double f = (log(6/delta)+lgamma(n+1)-lgamma(k+1)-lgamma(n-k+1))*n/(k*log(6*log2(n)/delta));
	// cout << "################## 2" << endl;
	double lambda = (2+2*epsilon/3)*log(3*log2(f)/delta)/(epsilon*epsilon);

	long long int totalSamples = (long long int)lambda;

	int iter = 1;

	// cout << "################## 2" << endl;
	addHyperedge(g,hg,t,totalSamples,m, samp, p);
	double nmax = (2+2*epsilon/3)*(lgamma(n+1)-lgamma(k+1)-lgamma(n-k+1) + log(6/delta))*n/(epsilon*epsilon*k);

	// cout << "################## 3" << endl;
	while (totalSamples < nmax){
		seeds.clear();
		totalSamples = hg.getNumEdge();
		buildSeedSet(hg,seeds,n,k,degree);
		// cout << "$$$$$$$$$$$$$$ 1" << endl;
		if (calculateInfluence_DSSA(hg,g,seeds,t,degree[k],epsilon,delta,m,totalSamples,iter, samp, p)){
           	break;
        }
        // cout << "$$$$$$$$$$$$$$ 2" << endl;
		iter++;
	}
	// cout << "################## 3" << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa98, %rsp            # imm = 0xA98
movq %r9, 0x48(%rsp)
movss %xmm1, 0x20(%rsp)
movss %xmm0, 0x1c(%rsp)
movq %r8, %r14
movl %ecx, 0x44(%rsp)
movl %edx, %r15d
movl %esi, %r13d
movq %rdi, %r12
leaq 0x90(%rsp), %rdi
callq 0xf0c8
leal 0x1(%r15), %ebx
movslq %ebx, %rsi
leaq 0x88(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x70(%rsp), %rdi
leaq 0x27(%rsp), %rcx
callq 0xab6e
movss 0x1321d(%rip), %xmm0    # 0x180b8
divss 0x20(%rsp), %xmm0
movss %xmm0, 0x40(%rsp)
callq 0x3640
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x30(%rsp)
leal 0x1(%r13), %ebp
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movsd %xmm0, 0x60(%rsp)
callq 0x32a0
addsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movsd %xmm0, 0x58(%rsp)
callq 0x32a0
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
subl %r15d, %ebp
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movsd %xmm0, 0x50(%rsp)
callq 0x32a0
movq %r13, 0x30(%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %r13d, %xmm1
movsd 0x10(%rsp), %xmm2
subsd %xmm0, %xmm2
mulsd %xmm1, %xmm2
movsd %xmm2, 0x10(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
movsd %xmm0, 0x28(%rsp)
movsd %xmm1, 0x68(%rsp)
movapd %xmm1, %xmm0
callq 0x35d0
mulsd 0x13123(%rip), %xmm0    # 0x18078
xorps %xmm1, %xmm1
cvtss2sd 0x20(%rsp), %xmm1
movsd %xmm1, 0x8(%rsp)
divsd %xmm1, %xmm0
callq 0x32d0
mulsd 0x28(%rsp), %xmm0
movss 0x1c(%rsp), %xmm1
addss %xmm1, %xmm1
divss 0x1313b(%rip), %xmm1    # 0x180c0
movsd 0x10(%rsp), %xmm2
divsd %xmm0, %xmm2
addss 0x1312d(%rip), %xmm1    # 0x180c4
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
movapd %xmm2, %xmm0
callq 0x35d0
mulsd 0x130cb(%rip), %xmm0    # 0x18080
divsd 0x8(%rsp), %xmm0
callq 0x32d0
mulsd 0x28(%rsp), %xmm0
movss 0x1c(%rsp), %xmm1
mulss %xmm1, %xmm1
movss %xmm1, 0x3c(%rsp)
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %rbx
xorl %r8d, %r8d
cmpl $0x0, 0xad8(%rsp)
setne %r8b
subq $0x8, %rsp
leaq 0x98(%rsp), %rsi
movq %r12, 0x18(%rsp)
movq %r12, %rdi
movq %rbx, %rcx
movq %r15, %r13
movq 0x50(%rsp), %r9
movl 0xad8(%rsp), %eax
pushq %rax
callq 0x396c
addq $0x10, %rsp
movsd 0x60(%rsp), %xmm0
callq 0x32a0
movsd %xmm0, 0x8(%rsp)
movsd 0x58(%rsp), %xmm0
callq 0x32a0
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x50(%rsp), %xmm0
callq 0x32a0
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movss 0x40(%rsp), %xmm0
callq 0x3640
xorps %xmm1, %xmm1
cvtss2sd %xmm0, %xmm1
addsd 0x8(%rsp), %xmm1
mulsd 0x28(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2ss %r13d, %xmm0
mulsd 0x68(%rsp), %xmm1
movss 0x3c(%rsp), %xmm2
mulss %xmm0, %xmm2
xorps %xmm0, %xmm0
cvtss2sd %xmm2, %xmm0
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %rbx, %xmm0
movsd %xmm1, 0x8(%rsp)
ucomisd %xmm0, %xmm1
jbe 0x516e
movq %r13, %r15
movslq %r15d, %r12
movl $0x1, %ebx
leaq 0x90(%rsp), %rbp
shlq $0x3, %r12
movq (%r14), %rax
cmpq %rax, 0x8(%r14)
je 0x50e6
movq %rax, 0x8(%r14)
movq %rbp, %rdi
callq 0xf41a
movl %eax, %r13d
movq %rbp, %rdi
movq %r14, %rsi
movq 0x30(%rsp), %rdx
movl %r15d, %ecx
leaq 0x70(%rsp), %r8
callq 0x3b21
movslq %r13d, %rax
movq 0x70(%rsp), %r8
addq %r12, %r8
movq %rbp, %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
movl 0x44(%rsp), %ecx
movss 0x1c(%rsp), %xmm0
movss 0x20(%rsp), %xmm1
movl 0xad8(%rsp), %r9d
movl 0xad0(%rsp), %r10d
pushq %r10
pushq 0x50(%rsp)
pushq %rbx
pushq %rax
callq 0x41c1
addq $0x20, %rsp
testb %al, %al
jne 0x516e
incl %ebx
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x50d9
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x517d
callq 0x3340
leaq 0xa8(%rsp), %rdi
callq 0xaf12
leaq 0x90(%rsp), %rdi
callq 0xaf12
addq $0xa98, %rsp            # imm = 0xA98
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x51b0
movq %rax, %rbx
jmp 0x51c2
movq %rax, %rbx
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x51c2
callq 0x3340
leaq 0xa8(%rsp), %rdi
callq 0xaf12
leaq 0x90(%rsp), %rdi
callq 0xaf12
movq %rbx, %rdi
callq 0x35c0