// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/lwm_initAndCollect.c
// Function: getFrequentVerticesAndEdges
static void getFrequentVerticesAndEdges(struct Graph** db, int nGraphs, size_t threshold, struct Vertex** frequentVertices, struct Vertex** frequentEdges, FILE* logStream, struct GraphPool* gp) {
	*frequentVertices = getVertex(gp->vertexPool);
	*frequentEdges = getVertex(gp->vertexPool);

	/* get frequent vertices */
	int tmpResultSetSize = getFrequentVertices(db, nGraphs, *frequentVertices, gp);
	filterSearchTree(*frequentVertices, threshold, *frequentVertices, gp);
	fprintf(logStream, "Number of frequent vertices: %i\n", (*frequentVertices)->d); fflush(logStream);

	/* get frequent edges: first edge id is given by number of frequent vertices */
	offsetSearchTreeIds(*frequentEdges, (*frequentVertices)->lowPoint);
	getFrequentEdges(db, nGraphs, tmpResultSetSize, *frequentEdges, gp);
	filterSearchTree(*frequentEdges, threshold, *frequentEdges, gp);
	fprintf(logStream, "Number of frequent edges: %i\n", (*frequentEdges)->d); fflush(logStream);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, 0x28(%rsp)
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r13
movl %esi, %r15d
movq %rdi, %r14
movq 0xa0(%rsp), %rbp
movq 0x10(%rbp), %rdi
callq 0x1447e
movq %rax, (%rbx)
movq 0x10(%rbp), %rdi
callq 0x1447e
movq %rax, (%r12)
movq (%rbx), %rdx
movq %r14, 0x58(%rsp)
movq %r14, %rdi
movl %r15d, 0x10(%rsp)
movl %r15d, %esi
movq %rbp, %rcx
callq 0x11202
movl %eax, %r14d
movq (%rbx), %rdi
movq %r13, 0x38(%rsp)
movl %r13d, %esi
movq %rdi, %rdx
movq %rbp, %rcx
callq 0x1b14b
movq (%rbx), %rax
movl 0x28(%rax), %edx
leaq 0xf1d7(%rip), %rsi      # 0x20943
movq 0x28(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x1160
movq %r15, %rdi
callq 0x11a0
movq (%r12), %rdi
movq (%rbx), %rax
movl 0x20(%rax), %esi
callq 0x1b0bb
movq %r12, 0x40(%rsp)
movq (%r12), %rax
movq %rax, 0x50(%rsp)
testl %r14d, %r14d
je 0x117b2
movl %r14d, %edi
callq 0x1ada1
movq %rax, %rbx
jmp 0x117b4
xorl %ebx, %ebx
movl 0x10(%rsp), %eax
testl %eax, %eax
jle 0x11980
movl %eax, %eax
movq %rax, 0x48(%rsp)
xorl %ecx, %ecx
movq 0x58(%rsp), %rax
movq %rcx, 0x60(%rsp)
movq (%rax,%rcx,8), %r15
movq 0x10(%rbp), %rdi
callq 0x1447e
movq %rax, 0x10(%rsp)
movq %r15, 0x18(%rsp)
movl 0x4(%r15), %r13d
movl $0x0, 0x24(%rsp)
cmpl %r14d, %r13d
jle 0x1181c
testq %rbx, %rbx
je 0x11808
movq %rbx, %rdi
callq 0x1030
movl %r13d, %edi
callq 0x1ada1
movq %rax, 0x30(%rsp)
movl %r13d, 0xc(%rsp)
jmp 0x11826
movq %rbx, 0x30(%rsp)
movl %r14d, 0xc(%rsp)
movq 0x18(%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
jle 0x11927
xorl %r15d, %r15d
movq 0x18(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq (%rcx,%r15,8), %rcx
movq 0x8(%rcx), %r12
testq %r12, %r12
je 0x11918
movq 0x18(%r12), %rax
movslq 0x18(%rax), %rcx
cmpq %rcx, %r15
jge 0x11903
movq 0x10(%r12), %rcx
movq (%rcx), %rdi
movq (%rax), %rsi
callq 0x1140
movl %eax, %r13d
movq 0x18(%rbp), %rdi
callq 0x141f1
movq %rax, %r14
movl %r13d, %eax
shrl $0x1f, %eax
notl %r13d
shrl $0x1f, %r13d
movq 0x10(%r12,%rax,8), %rax
movq (%rax), %rax
movq %rax, (%r14)
movq 0x18(%rbp), %rdi
callq 0x708a
movq %rax, 0x8(%r14)
movq 0x18(%rbp), %rdi
callq 0x141f1
movq %rax, %rbx
movq (%r12), %rax
movq %rax, (%rbx)
movq %r14, 0x8(%rbx)
movq 0x18(%rbp), %rdi
callq 0x709c
movq %rax, %r14
movq %rbx, 0x8(%rax)
movq 0x18(%rbp), %rdi
callq 0x141f1
movq 0x10(%r12,%r13,8), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq %r14, 0x8(%rax)
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
movq %rbp, %rdx
callq 0x1aa50
movsbl %al, %eax
addl %eax, 0x28(%rbx)
incl 0x18(%rbx)
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x11852
movq 0x18(%rsp), %rax
movl (%rax), %eax
incq %r15
movslq %eax, %rcx
cmpq %rcx, %r15
jl 0x11838
movq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x1b06c
movq 0x50(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %edx
movq 0x30(%rsp), %rbx
movq %rbx, %rcx
leaq 0x24(%rsp), %r8
movq %rdi, %r9
pushq %rbp
pushq $0x0
callq 0x1aefc
addq $0x10, %rsp
movq %rbp, %rdi
movq %r14, %rsi
callq 0x1b546
movq 0x60(%rsp), %rcx
incq %rcx
cmpq 0x48(%rsp), %rcx
movl 0xc(%rsp), %r14d
jne 0x117c9
testq %rbx, %rbx
je 0x1198d
movq %rbx, %rdi
callq 0x1030
movq 0x40(%rsp), %rbx
movq (%rbx), %rdi
movq 0x38(%rsp), %rsi
movq %rdi, %rdx
movq %rbp, %rcx
callq 0x1b14b
movq (%rbx), %rax
movl 0x28(%rax), %edx
leaq 0xefb2(%rip), %rsi      # 0x20964
movq 0x28(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq %rbx, %rdi
callq 0x11a0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq