// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/poset_pathCover.c
// Function: latticeLongestWeightedPathEmbeddingForTrees
struct IntSet* latticeLongestWeightedPathEmbeddingForTrees(struct Graph* g, struct EvaluationPlan p, int databaseSize, struct GraphPool* gp, struct ShallowGraphPool* sgp) {

	int nEvaluations = 0;
	cleanEvaluationPlan(p);

	for (int i=1; i<p.poset->n; ++i) {
		if (!embeddingValueKnown(p.poset->vertices[i])) {
			int* path = getLongestPathInDAG(p.poset->vertices[i], p.poset, sgp);
			double* weights = getWeightsOfPath(p.poset, path, databaseSize);
			nEvaluations += weightedBinarySearchEvaluation(g, p, path, weights, gp);
			free(path);
			free(weights);
		}
	}

	fprintf(stderr, "%i\n", nEvaluations);
	return patternPosetInfoToFeatureSet(p);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rcx, 0x48(%rsp)
movq %rdx, 0x68(%rsp)
movl %esi, 0x3c(%rsp)
movq %rdi, 0x60(%rsp)
movapd 0xe0(%rsp), %xmm0
movapd 0xf0(%rsp), %xmm1
movapd 0x100(%rsp), %xmm2
movupd %xmm2, 0x20(%rsp)
movupd %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
callq 0x15298
movq 0xe0(%rsp), %rax
xorl %r15d, %r15d
cmpl $0x2, (%rax)
jl 0x252a
leaq 0xe0(%rsp), %r14
xorl %r15d, %r15d
pushq $0x1
popq %r12
movq 0x10(%rax), %rax
movq (%rax,%r12,8), %rdi
callq 0x152d3
testl %eax, %eax
jne 0x2518
movq (%r14), %rsi
movq 0x10(%rsi), %rax
movq (%rax,%r12,8), %rdi
movq 0x48(%rsp), %rdx
callq 0x189fd
movq %rax, %r13
movq (%r14), %rdi
movq %rax, %rsi
movl 0x3c(%rsp), %edx
callq 0x18b15
movq %rax, %rbx
movupd (%r14), %xmm0
movupd 0x10(%r14), %xmm1
movupd 0x20(%r14), %xmm2
movapd %xmm2, 0x90(%rsp)
movapd %xmm1, 0x80(%rsp)
movapd %xmm0, 0x70(%rsp)
movq %r13, 0x40(%rsp)
movslq (%r13), %r14
decq %r14
movq %r12, 0x58(%rsp)
je 0x24f3
movq %r15, 0x50(%rsp)
movsd (%rbx), %xmm0
xorl %r15d, %r15d
movq %r14, %rax
movsd 0x1e961(%rip), %xmm1    # 0x20d38
pushq $0x1
popq %rcx
movsd 0x1e95e(%rip), %xmm3    # 0x20d40
movapd 0x1e966(%rip), %xmm4    # 0x20d50
movsd (%rbx,%rcx,8), %xmm2
divsd %xmm0, %xmm2
addsd %xmm3, %xmm2
andpd %xmm4, %xmm2
ucomisd %xmm2, %xmm1
cmovaq %rcx, %r15
cmovaq %r14, %rax
minsd %xmm1, %xmm2
incq %rcx
movapd %xmm2, %xmm1
cmpq %rax, %rcx
jbe 0x23ea
xorl %r12d, %r12d
movq 0x70(%rsp), %r13
movq 0x10(%r13), %rax
movq 0x40(%rsp), %rcx
movslq (%rcx,%r15,4), %rbp
movq (%rax,%rbp,8), %rdi
callq 0x152d3
movq 0x10(%r13), %rcx
movq (%rcx,%rbp,8), %rdi
testl %eax, %eax
je 0x2448
callq 0x152dd
jmp 0x2490
movq (%rdi), %rsi
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rdx
callq 0xabef
incl %r12d
movapd 0x70(%rsp), %xmm0
movapd 0x80(%rsp), %xmm1
movapd 0x90(%rsp), %xmm2
movupd %xmm2, 0x20(%rsp)
movupd %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
movsbl %al, %esi
movl %ebp, %edi
callq 0x152e7
leaq 0x1(%r15), %rax
cmpq %r14, %rax
movsd 0x1e8a1(%rip), %xmm3    # 0x20d40
movapd 0x1e8a9(%rip), %xmm4    # 0x20d50
ja 0x24ec
movsd (%rbx,%r15,8), %xmm0
movq %r14, %rcx
movsd 0x1e87e(%rip), %xmm1    # 0x20d38
movsd (%rbx,%rax,8), %xmm2
divsd %xmm0, %xmm2
addsd %xmm3, %xmm2
andpd %xmm4, %xmm2
ucomisd %xmm2, %xmm1
cmovaq %rax, %r15
cmovaq %r14, %rcx
minsd %xmm1, %xmm2
incq %rax
movapd %xmm2, %xmm1
cmpq %rcx, %rax
jbe 0x24ba
jmp 0x241a
movq 0x50(%rsp), %r15
jmp 0x24f6
xorl %r12d, %r12d
addl %r12d, %r15d
movq 0x40(%rsp), %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
leaq 0xe0(%rsp), %r14
movq 0x58(%rsp), %r12
incq %r12
movq (%r14), %rax
movslq (%rax), %rcx
cmpq %rcx, %r12
jl 0x2341
movq 0x2aac7(%rip), %rax     # 0x2cff8
movq (%rax), %rdi
leaq 0x1dafb(%rip), %rsi     # 0x20036
movl %r15d, %edx
xorl %eax, %eax
callq 0x1160
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1543e