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

	struct SpanningtreeTree spTree = getSampledSpanningtreeTree(getBlockTreeT(g, sgp), sampleSize, 1, gp, 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 += weightedBinarySearchEvaluationLE(&spTree, p, path, weights, gp);
			free(path);
			free(weights);
		}
	}

	dumpSpanningtreeTree(spTree, gp);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %r8, %r13
movq %rcx, %r12
movl %edx, 0x40(%rsp)
movl %esi, %ebx
movq %rdi, %rsi
leaq 0x140(%rsp), %r15
leaq 0xe0(%rsp), %r14
movq %r14, %rdi
movq %r8, %rdx
callq 0xbe98
movq 0x20(%r14), %rax
movq %rax, 0x20(%rsp)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0x78(%rsp), %rdi
pushq $0x1
popq %rdx
movl %ebx, %esi
movq %r12, 0x48(%rsp)
movq %r12, %rcx
movq %r13, 0x60(%rsp)
movq %r13, %r8
callq 0xc605
movaps (%r15), %xmm0
movaps 0x10(%r15), %xmm1
movaps 0x20(%r15), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x1206c
xorl %r13d, %r13d
pushq $0x1
popq %r14
leaq 0x58(%rsp), %r12
leaq 0x70(%rsp), %rbx
movq (%r15), %rax
movslq (%rax), %rcx
cmpq %rcx, %r14
jge 0x16992
movq 0x10(%rax), %rax
movq (%rax,%r14,8), %rdi
callq 0x1209e
testl %eax, %eax
jne 0x1698a
movl %r13d, 0x44(%rsp)
movq (%r15), %rsi
movq 0x10(%rsi), %rax
movq %r14, 0x68(%rsp)
movq (%rax,%r14,8), %rdi
movq 0x60(%rsp), %rdx
callq 0x15b8b
movq %rax, %rbp
movq (%r15), %rdi
movq %rax, %rsi
movl 0x40(%rsp), %edx
callq 0x15f2c
movq %rax, %r14
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movaps %xmm2, 0xd0(%rsp)
movaps %xmm1, 0xc0(%rsp)
movaps %xmm0, 0xb0(%rsp)
movq $0x1, 0x58(%rsp)
movslq (%rbp), %r13
decq %r13
movq %r13, 0x70(%rsp)
andq $0x0, 0x50(%rsp)
movl $0x0, 0x3c(%rsp)
movq %r14, %rdi
leaq 0x50(%rsp), %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x16a1a
cmpq %r13, 0x58(%rsp)
ja 0x16963
movq 0xb0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x50(%rsp), %rcx
movslq (%rbp,%rcx,4), %r15
movq (%rax,%r15,8), %rdi
callq 0x1209e
movq 0xb0(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq (%rcx,%r15,8), %rdi
testl %eax, %eax
je 0x168dc
callq 0x120a8
jmp 0x16884
movq (%rdi), %rsi
leaq 0x78(%rsp), %rdi
movq 0x48(%rsp), %rdx
callq 0xcfbf
movb %al, 0x3b(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x30(%rsp)
movups 0x78(%rsp), %xmm0
movups 0x88(%rsp), %xmm1
movups 0x98(%rsp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0xc9af
incl 0x3c(%rsp)
movaps 0xb0(%rsp), %xmm0
movaps 0xc0(%rsp), %xmm1
movaps 0xd0(%rsp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movsbl 0x3b(%rsp), %esi
movl %r15d, %edi
callq 0x120b2
jmp 0x16884
movl 0x44(%rsp), %r13d
addl 0x3c(%rsp), %r13d
movq %rbp, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
leaq 0x140(%rsp), %r15
movq 0x68(%rsp), %r14
incq %r14
jmp 0x167e3
movq 0xa8(%rsp), %rax
movq %rax, 0x30(%rsp)
movups 0x78(%rsp), %xmm0
movups 0x88(%rsp), %xmm1
movups 0x98(%rsp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq 0x48(%rsp), %rdi
callq 0xca2f
movq 0x13625(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
leaq 0x6659(%rip), %rsi      # 0x1d036
movl %r13d, %edx
xorl %eax, %eax
callq 0x1150
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x121ee
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq