// File: /workspace/github_cpp_makefile_star2_O1/dtsaras[P]GCW/./hypergraph.hpp
// Function: addHyperedge(Graph&, HyperGraph&, int, long long, bool, sampler<int>&, int)
long long addHyperedge(Graph & g, HyperGraph & hg, int t, long long num, bool lt, sampler<int> &samp, int p)
{
	int numNodes = g.getSize();

	omp_set_num_threads(t);
	
	long long iter = 0;
	int c = 100;
	// cout << "@@@@@@@@@@ 1" << endl;
    #pragma omp parallel
	{
		vector<int> visit_mark(numNodes+1,0);
		vector<bool> visit(numNodes+1,false);
		vector<unsigned int> link;
		// cout << "@@@@@@@@@@ 2" << endl;     
		if (lt == 0){
			while (iter < num){
				// cout << "@@@@@@@@@@ 3" << endl;
            	for (int i = 0; i < c; ++i){
					vector<int> he;
           	        hg.pollingLT1(g,visit,visit_mark, samp, p);
               	}
               	// cout << "@@@@@@@@@@ 4" << endl;
				#pragma omp atomic
				iter += c;
			}
		} else {
			while (iter < num){
                for (int i = 0; i < c; ++i){
                    vector<int> he;
                    hg.pollingIC1(g,visit,visit_mark, samp, p);
                }
                #pragma omp atomic
                iter += c;
        	}
		}
	}
	// cout << "@@@@@@@@@@ 5" << endl;
	hg.updateDeg();
	// cout << "@@@@@@@@@@ 6" << endl;
	return hg.getNumEdge();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %r14
movl %r8d, %r13d
movq %rcx, 0x10(%rsp)
movq %rsi, %rbx
movq %rdi, %r12
callq 0xe16e
incl %eax
movslq %eax, %r15
leaq 0x18(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x40(%rsp), %rdi
leaq 0x6(%rsp), %rbp
movq %r15, %rsi
movq %rbp, %rcx
callq 0xa3da
movb $0x0, (%rbp)
leaq 0x18(%rsp), %rdi
leaq 0x6(%rsp), %rdx
leaq 0x7(%rsp), %rcx
movq %r15, %rsi
callq 0xa54e
movl 0x90(%rsp), %ebp
testb %r13b, %r13b
je 0x3a31
cmpq $0x0, 0x10(%rsp)
jle 0x3a80
movq $0x0, 0x8(%rsp)
leaq 0x40(%rsp), %r15
movl $0x64, %r13d
movq %rbx, %rdi
movq %r12, %rsi
leaq 0x18(%rsp), %rdx
movq %r15, %rcx
movq %r14, %r8
movl %ebp, %r9d
callq 0xfc8e
decl %r13d
jne 0x39fc
movq 0x8(%rsp), %rcx
addq $0x64, %rcx
movq %rcx, 0x8(%rsp)
cmpq 0x10(%rsp), %rcx
jl 0x39f6
jmp 0x3a80
cmpq $0x0, 0x10(%rsp)
jle 0x3a80
movq $0x0, 0x8(%rsp)
leaq 0x40(%rsp), %r15
movl $0x64, %r13d
movq %rbx, %rdi
movq %r12, %rsi
leaq 0x18(%rsp), %rdx
movq %r15, %rcx
movq %r14, %r8
movl %ebp, %r9d
callq 0xf71a
decl %r13d
jne 0x3a4d
movq 0x8(%rsp), %rcx
addq $0x64, %rcx
movq %rcx, 0x8(%rsp)
cmpq 0x10(%rsp), %rcx
jl 0x3a47
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x3aa8
callq 0x3340
xorl %eax, %eax
movq %rax, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movl %eax, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x3ab7
callq 0x3340
movq %rbx, %rdi
callq 0xf190
movq %rbx, %rdi
callq 0xf41a
cltq
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x3b0a
jmp 0x3adf
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x3b0a
callq 0x3340
xorl %eax, %eax
movq %rax, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movl %eax, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x3b19
callq 0x3340
movq %rbx, %rdi
callq 0x35c0