// File: /workspace/github_c_makefile_star2_O1/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, 0x18(%rsp)
movq %r8, %r12
movq %rcx, %r14
movq %rdx, %r13
movl %esi, %r15d
movq %rdi, %rbx
movq 0xa0(%rsp), %rbp
movq 0x10(%rbp), %rdi
callq 0x145b2
movq %rax, (%r14)
movq 0x10(%rbp), %rdi
callq 0x145b2
movq %rax, (%r12)
movq (%r14), %rdx
movq %rbx, 0x50(%rsp)
movq %rbx, %rdi
movl %r15d, 0x8(%rsp)
movl %r15d, %esi
movq %rbp, %rcx
callq 0x112d6
movl %eax, %ebx
movq (%r14), %rdi
movq %r13, 0x30(%rsp)
movl %r13d, %esi
movq %rdi, %rdx
movq %rbp, %rcx
callq 0x1b23e
movq (%r14), %rax
movl 0x28(%rax), %edx
leaq 0xf0fb(%rip), %rsi      # 0x20943
movq 0x18(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x1160
movq %r15, %rdi
callq 0x11a0
movq (%r12), %rdi
movq (%r14), %rax
movl 0x20(%rax), %esi
callq 0x1b1ae
movq %r12, 0x38(%rsp)
movq (%r12), %rax
movq %rax, 0x48(%rsp)
testl %ebx, %ebx
je 0x1188f
movl %ebx, %edi
callq 0x1ae92
movq %rax, %r15
movl %ebx, %r14d
jmp 0x11895
xorl %r15d, %r15d
xorl %r14d, %r14d
movl 0x8(%rsp), %eax
testl %eax, %eax
jle 0x11a5a
movl %eax, %eax
movq %rax, 0x40(%rsp)
xorl %ecx, %ecx
movq 0x50(%rsp), %rax
movq %rcx, 0x58(%rsp)
movq (%rax,%rcx,8), %r12
movq 0x10(%rbp), %rdi
callq 0x145b2
movq %rax, 0x8(%rsp)
movl 0x4(%r12), %ebx
movl $0x0, 0x14(%rsp)
cmpl %r14d, %ebx
jle 0x118fa
testq %r15, %r15
je 0x118e5
movq %r15, %rdi
callq 0x1030
movl %ebx, %edi
callq 0x1ae92
movq %rax, 0x20(%rsp)
movl %ebx, %eax
movq %rax, 0x28(%rsp)
jmp 0x11904
movq %r15, 0x20(%rsp)
movq %r14, 0x28(%rsp)
cmpl $0x0, (%r12)
jle 0x11a01
xorl %r15d, %r15d
movq %r12, 0x60(%rsp)
movq 0x10(%r12), %rax
movq (%rax,%r15,8), %rax
movq 0x8(%rax), %r12
testq %r12, %r12
je 0x119ec
movq 0x18(%r12), %rax
movslq 0x18(%rax), %rcx
cmpq %rcx, %r15
jge 0x119e2
movq 0x10(%r12), %rcx
movq (%rcx), %rdi
movq (%rax), %rsi
callq 0x1140
movl %eax, %ebx
movq 0x18(%rbp), %rdi
callq 0x1432b
movq %rax, %r13
movl %ebx, %eax
shrl $0x1f, %eax
notl %ebx
shrl $0x1f, %ebx
movq 0x10(%r12,%rax,8), %rax
movq (%rax), %rax
movq %rax, (%r13)
movq 0x18(%rbp), %rdi
callq 0x704e
movq %rax, 0x8(%r13)
movq 0x18(%rbp), %rdi
callq 0x1432b
movq %rbp, %r14
movq %rax, %rbp
movq (%r12), %rax
movq %rax, (%rbp)
movq %r13, 0x8(%rbp)
movq 0x18(%r14), %rdi
callq 0x7060
movq %rax, %r13
movq %rbp, 0x8(%rax)
movq %r14, %rbp
movq 0x18(%r14), %rdi
callq 0x1432b
movq 0x10(%r12,%rbx,8), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq %r13, 0x8(%rax)
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x1ab28
movsbl %al, %eax
addl %eax, 0x28(%rbx)
incl 0x18(%rbx)
movq 0x8(%r12), %r12
jmp 0x11924
incq %r15
movq 0x60(%rsp), %r12
movslq (%r12), %rax
cmpq %rax, %r15
jl 0x11917
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x1b15f
movq 0x48(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
movq 0x20(%rsp), %r15
movq %r15, %rcx
leaq 0x14(%rsp), %r8
movq %rdi, %r9
pushq %rbp
pushq $0x0
callq 0x1afe3
addq $0x10, %rsp
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x1b644
movq 0x58(%rsp), %rcx
incq %rcx
cmpq 0x40(%rsp), %rcx
movq 0x28(%rsp), %r14
jne 0x118aa
testq %r15, %r15
je 0x11a67
movq %r15, %rdi
callq 0x1030
movq 0x38(%rsp), %rbx
movq (%rbx), %rdi
movq 0x30(%rsp), %rsi
movq %rdi, %rdx
movq %rbp, %rcx
callq 0x1b23e
movq (%rbx), %rax
movl 0x28(%rax), %edx
leaq 0xeed8(%rip), %rsi      # 0x20964
movq 0x18(%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