// File: /workspace/github_c_makefile_star2_O1/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 $0x98, %rsp
movq %rcx, 0x38(%rsp)
movq %rdx, 0x58(%rsp)
movl %esi, 0x34(%rsp)
movq %rdi, 0x50(%rsp)
movapd 0xd0(%rsp), %xmm0
movapd 0xe0(%rsp), %xmm1
movapd 0xf0(%rsp), %xmm2
movupd %xmm2, 0x20(%rsp)
movupd %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
callq 0x1539d
movq 0xd0(%rsp), %rax
xorl %r14d, %r14d
cmpl $0x2, (%rax)
jl 0x257b
leaq 0xd0(%rsp), %r15
xorl %r14d, %r14d
pushq $0x1
popq %rbx
movq 0x10(%rax), %rax
movq (%rax,%rbx,8), %rdi
callq 0x153d8
testl %eax, %eax
jne 0x2569
movq %r14, 0x48(%rsp)
movq (%r15), %rsi
movq 0x10(%rsi), %rax
movq %rbx, 0x40(%rsp)
movq (%rax,%rbx,8), %rdi
movq 0x38(%rsp), %rdx
callq 0x18acf
movq %rax, %r13
movq (%r15), %rdi
movq %rax, %rsi
movl 0x34(%rsp), %edx
callq 0x18be7
movq %rax, %rbx
movupd (%r15), %xmm0
movupd 0x10(%r15), %xmm1
movupd 0x20(%r15), %xmm2
movapd %xmm2, 0x80(%rsp)
movapd %xmm1, 0x70(%rsp)
movapd %xmm0, 0x60(%rsp)
movslq (%r13), %r14
decq %r14
je 0x2465
movsd (%rbx), %xmm0
xorl %r15d, %r15d
movsd 0x1e911(%rip), %xmm1    # 0x20d38
pushq $0x1
popq %rax
movsd 0x1e90e(%rip), %xmm3    # 0x20d40
movapd 0x1e916(%rip), %xmm4    # 0x20d50
movsd (%rbx,%rax,8), %xmm2
divsd %xmm0, %xmm2
addsd %xmm3, %xmm2
andpd %xmm4, %xmm2
ucomisd %xmm2, %xmm1
cmovaq %rax, %r15
minsd %xmm1, %xmm2
incq %rax
movapd %xmm2, %xmm1
cmpq %r14, %rax
jbe 0x243a
jmp 0x2468
xorl %r15d, %r15d
xorl %r12d, %r12d
testq %r14, %r14
je 0x2544
movq 0x60(%rsp), %rax
movq 0x10(%rax), %rax
movslq (%r13,%r15,4), %rbp
movq (%rax,%rbp,8), %rdi
callq 0x153d8
movq 0x60(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq (%rcx,%rbp,8), %rdi
testl %eax, %eax
je 0x24a3
callq 0x153e2
jmp 0x24e8
movq (%rdi), %rsi
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rdx
callq 0xabfd
incq %r12
movapd 0x60(%rsp), %xmm0
movapd 0x70(%rsp), %xmm1
movapd 0x80(%rsp), %xmm2
movupd %xmm2, 0x20(%rsp)
movupd %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
movsbl %al, %esi
movl %ebp, %edi
callq 0x153ec
leaq 0x1(%r15), %rax
cmpq %r14, %rax
movsd 0x1e849(%rip), %xmm3    # 0x20d40
movapd 0x1e851(%rip), %xmm4    # 0x20d50
ja 0x253b
movsd (%rbx,%r15,8), %xmm0
movsd 0x1e829(%rip), %xmm1    # 0x20d38
movq %rax, %rcx
movsd (%rbx,%rcx,8), %xmm2
divsd %xmm0, %xmm2
addsd %xmm3, %xmm2
andpd %xmm4, %xmm2
ucomisd %xmm2, %xmm1
cmovaq %rcx, %r15
minsd %xmm1, %xmm2
incq %rcx
movapd %xmm2, %xmm1
cmpq %r14, %rcx
jbe 0x2512
cmpq %r14, %rax
jbe 0x2474
movq 0x48(%rsp), %r14
addl %r12d, %r14d
movq %r13, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
leaq 0xd0(%rsp), %r15
movq 0x40(%rsp), %rbx
incq %rbx
movq (%r15), %rax
movslq (%rax), %rcx
cmpq %rcx, %rbx
jl 0x23a0
movq 0x2aa76(%rip), %rax     # 0x2cff8
movq (%rax), %rdi
leaq 0x1daaa(%rip), %rsi     # 0x20036
movl %r14d, %edx
xorl %eax, %eax
callq 0x1160
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x15543