LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/treeKernels.c
// Function: edgeSort
struct ShallowGraph* edgeSort(struct Vertex* v, int maxDepth, struct ShallowGraphPool* sgp) {
	struct VertexList* e;
	struct VertexList* f;
	struct VertexList* first = getVertexList(sgp->listPool);
	struct ShallowGraph* output = getShallowGraph(sgp);
	struct ShallowGraph* fifo = getShallowGraph(sgp);

	/* create artificial edge to start bfs */
	first->endPoint = v;
	first->startPoint = v;
	appendEdge(fifo, first);

	/* bfs */
	while((e = popEdge(fifo))) {

		/* breaking condition */
		if (e->startPoint->visited > maxDepth) {
			dumpVertexList(sgp->listPool, e);
			break;
		}

		/* store distance */
		e->endPoint->visited = e->startPoint->visited + 1;
		appendEdge(output, e);

		/* put children in fifo queue */
		for (f=e->endPoint->neighborhood; f; f = f->next) {
			if (f->endPoint->visited == 0) {
				appendEdge(fifo, shallowCopyEdge(f, sgp->listPool));
			}
		}
	}

	dumpShallowGraph(sgp, fifo);

	return output;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r12
movq 0x10(%rdx), %rdi
callq 0x141f1
movq %rax, %r13
movq %rbx, %rdi
callq 0x1498d
movq %rax, %r14
movq %rbx, %rdi
callq 0x1498d
movq %rax, %r15
movq %r12, 0x18(%r13)
movq %r12, 0x10(%r13)
movq %rax, %rdi
movq %r13, %rsi
callq 0x8916
movq %r15, %rdi
callq 0x88ee
testq %rax, %rax
je 0x1de2b
movq %rax, %r12
movq 0x10(%r12), %rax
movl 0x1c(%rax), %eax
cmpl %ebp, %eax
jg 0x1de1f
incl %eax
movq 0x18(%r12), %rcx
movl %eax, 0x1c(%rcx)
movq %r14, %rdi
movq %r12, %rsi
callq 0x8916
movq 0x18(%r12), %rax
movq 0x8(%rax), %r12
testq %r12, %r12
je 0x1de0d
movq 0x18(%r12), %rax
cmpl $0x0, 0x1c(%rax)
jne 0x1de06
movq 0x10(%rbx), %rsi
movq %r12, %rdi
callq 0x7bec
movq %r15, %rdi
movq %rax, %rsi
callq 0x8916
movq 0x8(%r12), %r12
jmp 0x1dddf
movq %r15, %rdi
callq 0x88ee
movq %rax, %r12
testq %rax, %rax
jne 0x1ddb5
jmp 0x1de2b
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x14250
movq %rbx, %rdi
movq %r15, %rsi
callq 0x149f4
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/treeKernels.c
// Function: bfsSubtreeEnumeration
struct ShallowGraph* bfsSubtreeEnumeration(struct Graph* t, int maxDepth, struct ShallowGraphPool* sgp) {
	int i;
	struct ShallowGraph* results = NULL;

	for (i=0; i<t->n; ++i) {
		if (t->vertices[i]) {

			int j;
			struct ShallowGraph* sorted = edgeSort(t->vertices[i], maxDepth, sgp);

			/* if maxDepth is too large, the for loop below will return
			 * multiple copies of the largest level tree. */
			if (maxDepth > sorted->lastEdge->endPoint->visited) {
				maxDepth = sorted->lastEdge->endPoint->visited;
			}

			/* compute and store canonical string of the tree rooted at v for each level
			 * TODO This can change. Maybe compute canonical string for free tree... */
			for (j=1; j<=maxDepth; ++j) {
				struct ShallowGraph* level = canonicalStringOfRootedLevelTree(t->vertices[i], NULL, j, sgp);
				level->next = results;
				results = level;
			}

			cleanUpEdgeSort(t->vertices[i], sgp);
			dumpShallowGraph(sgp, sorted);
		}
	}
	return results;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl (%rdi), %eax
testl %eax, %eax
jle 0x1df43
movl %esi, %ebp
movq %rdi, %r14
xorl %ebx, %ebx
xorl %r15d, %r15d
movq %rdi, 0x8(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%r14), %rcx
movq (%rcx,%rbx,8), %rdi
testq %rdi, %rdi
je 0x1df32
movq %rbx, 0x10(%rsp)
movl %ebp, %esi
callq 0x1dd5d
movq %rax, 0x20(%rsp)
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
movl 0x1c(%rax), %eax
cmpl %eax, %ebp
cmovll %ebp, %eax
testl %eax, %eax
movl %eax, 0x4(%rsp)
jle 0x1def6
movl %eax, %r12d
negl %r12d
movl $0x1, %ebp
movq 0x8(%rsp), %r14
movq 0x10(%rsp), %rbx
movq 0x10(%r14), %rax
movq (%rax,%rbx,8), %rdi
xorl %esi, %esi
movl %ebp, %edx
movq 0x18(%rsp), %rcx
callq 0x7555
movq %rax, %r13
movq %r15, 0x18(%rax)
leal (%r12,%rbp), %eax
incl %eax
movl %ebp, %ecx
incl %ecx
movl %ecx, %ebp
movq %r13, %r15
cmpl $0x1, %eax
jne 0x1dec3
jmp 0x1df03
movq %r15, %r13
movq 0x8(%rsp), %r14
movq 0x10(%rsp), %rbx
movq 0x10(%r14), %rax
movq (%rax,%rbx,8), %rdi
movq 0x18(%rsp), %r12
movq %r12, %rsi
callq 0x1dca4
movq %r12, %rdi
movq 0x20(%rsp), %rsi
callq 0x149f4
movl (%r14), %eax
movq %r13, %r15
movl 0x4(%rsp), %ebp
movq %r12, %rdx
incq %rbx
movslq %eax, %rcx
cmpq %rcx, %rbx
jl 0x1de74
jmp 0x1df46
xorl %r15d, %r15d
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/treeKernels.c
// Function: fullSubtreeEnumeration
int fullSubtreeEnumeration(struct Graph* t, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	int numberOfTrees = 0;

	/* get initially empty list of forbidden edges and E(t) */
	struct ShallowGraph* allEdges = getGraphEdges(t, sgp);
	struct ShallowGraph* forbiddenEdges = getShallowGraph(sgp);

	/* create $ current = (V(t), \emptyset) $ */
	struct Graph* current = getGraph(gp);
	int i;
	setVertexNumber(current, t->n);
	for (i=0; i<t->n; ++i) {
		current->vertices[i] = shallowCopyVertex(t->vertices[i], gp->vertexPool);
	}

	recSubtreeEnum(current, forbiddenEdges, allEdges, &numberOfTrees, sgp);


	/* garbage collection */
	dumpShallowGraph(sgp, allEdges);
	dumpShallowGraph(sgp, forbiddenEdges);
	dumpGraph(gp, current);

	return numberOfTrees;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %rbp
movl $0x0, 0xc(%rsp)
movq %rdx, %rsi
callq 0x83ed
movq %rax, 0x10(%rsp)
movq %r14, %rdi
callq 0x1498d
movq %rax, %r12
movq %rbx, %rdi
callq 0x146a9
movq %rax, %r13
movl (%rbp), %esi
movq %rax, %rdi
callq 0x7e6c
cmpl $0x0, (%rbp)
jle 0x1e28b
xorl %r15d, %r15d
movq 0x10(%rbp), %rax
movq (%rax,%r15,8), %rdi
movq 0x10(%rbx), %rsi
callq 0x7c34
movq 0x10(%r13), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
movslq (%rbp), %rax
cmpq %rax, %r15
jl 0x1e266
leaq 0xc(%rsp), %rbp
movq %r13, %rdi
movq %r12, %rsi
movq 0x10(%rsp), %r15
movq %r15, %rdx
movq %rbp, %rcx
movq %r14, %r8
callq 0x1e04d
movq %r14, %rdi
movq %r15, %rsi
callq 0x149f4
movq %r14, %rdi
movq %r12, %rsi
callq 0x149f4
movq %rbx, %rdi
movq %r13, %rsi
callq 0x14700
movl (%rbp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/upperBoundsForSpanningTrees.c
// Function: nCr
long nCr(long n, long r) {
	long numer = 1;
	long denom = 1;
	int i;
	if (n - r < r) {
		r = n - r;
	}
	if (r == 0) {
		return 1;
	}
	for (i=n; i>n-r; --i) {
		numer *= i;
	}
	for (i=1; i<r+1; ++i) {
		denom *= i;
	}
	return numer / denom;
}

// Assembly:
movq %rdi, %rcx
subq %rsi, %rcx
cmpq %rsi, %rcx
cmovgeq %rsi, %rcx
testq %rcx, %rcx
je 0x1e33b
movq %rdi, %rdx
subq %rcx, %rdx
movslq %edi, %rdi
movl $0x1, %esi
movl $0x1, %eax
cmpq %rdi, %rdx
jge 0x1e30f
imulq %rdi, %rax
decq %rdi
jmp 0x1e301
testq %rcx, %rcx
jle 0x1e335
negq %rcx
movl $0x1, %edx
movl $0x1, %esi
imulq %rdx, %rsi
leaq (%rcx,%rdx), %rdi
incq %rdi
incq %rdx
cmpq $0x1, %rdi
jne 0x1e321
cqto
idivq %rsi
retq
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/upperBoundsForSpanningTrees.c
// Function: nCr2
long nCr2(long n, long r) {
	long numer = 1;
	long denom = 1;
	int i;
	if (n - r < r) {
		r = n - r;
	}
	if (r == 0) {
		return 1;
	}
	for (i=n; i>n-r; --i) {
		/* avoid overflowing */
		if (numer >= LONG_MAX / i) {
			return -1;
		}
		numer *= i;
	}
	/* r! is always smaller than (n-r)*...*(r+1) */
	for (i=1; i<r+1; ++i) {
		denom *= i;
	}
	return numer / denom;
}

// Assembly:
movq %rdi, %r8
subq %rsi, %r8
cmpq %rsi, %r8
cmovgeq %rsi, %r8
testq %r8, %r8
je 0x1e3bd
movq %rdi, %r9
subq %r8, %r9
movslq %edi, %r10
movl $0x1, %edi
movl $0x1, %ecx
cmpq %r10, %r9
jge 0x1e38e
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
movq %rsi, %rax
xorl %edx, %edx
idivq %r10
cmpq %rax, %rcx
jge 0x1e3c3
imulq %r10, %rcx
decq %r10
cmpq %r10, %r9
jl 0x1e375
testq %r8, %r8
jle 0x1e3b4
negq %r8
movl $0x1, %eax
movl $0x1, %edi
imulq %rax, %rdi
leaq (%r8,%rax), %rdx
incq %rdx
incq %rax
cmpq $0x1, %rdx
jne 0x1e3a0
movq %rcx, %rax
cqto
idivq %rdi
retq
movl $0x1, %eax
retq
movq $-0x1, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/upperBoundsForSpanningTrees.c
// Function: outerplanarBound
long outerplanarBound(long m, long n) {
	double estimate = 0.0;
	long i;
	long k = m-n;
	for (i=0; i<k+1; ++i) {
		double mean = n / (double)(i+1);
		double meanPot = 1.0;
		int j;
		long bin;

		for (j=0; j<i+1; ++j) {
			meanPot *= mean;
		}

		if (meanPot >= DBL_MAX) {
			return (long)-1;
		}
		
		bin = nCr2(k, i);
		if (bin < 0) {
			/* there was an overflow in nCr2 */
			return (long)-1;
		} else {
			estimate += bin * meanPot;
		}
	}
	if (estimate > LONG_MAX) {
		return (unsigned long)-1;
	} else {
		return (unsigned long)estimate;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
subq %rsi, %rbx
js 0x1e488
cvtsi2sd %rsi, %xmm0
movsd %xmm0, (%rsp)
leaq 0x1(%rbx), %r15
xorpd %xmm2, %xmm2
movl $0x1, %r12d
xorl %esi, %esi
movq $-0x1, %r14
leaq 0x1(%rsi), %r13
xorps %xmm1, %xmm1
cvtsi2sd %r13, %xmm1
movsd (%rsp), %xmm0
divsd %xmm1, %xmm0
movq %r12, %rax
movsd 0x290b(%rip), %xmm1     # 0x20d38
mulsd %xmm0, %xmm1
decq %rax
jne 0x1e42d
ucomisd 0x2c92(%rip), %xmm1     # 0x210d0
jae 0x1e4ab
movsd %xmm1, 0x8(%rsp)
movapd %xmm2, 0x10(%rsp)
movq %rbx, %rdi
callq 0x1e341
testq %rax, %rax
js 0x1e4ab
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x8(%rsp), %xmm0
movapd 0x10(%rsp), %xmm2
addsd %xmm0, %xmm2
incq %r12
movq %r13, %rsi
cmpq %r15, %r13
jne 0x1e40d
ucomisd 0x2c54(%rip), %xmm2     # 0x210d8
jbe 0x1e48c
jmp 0x1e4ab
xorpd %xmm2, %xmm2
cvttsd2si %xmm2, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x2c38(%rip), %xmm2     # 0x210d8
cvttsd2si %xmm2, %r14
andq %rcx, %r14
orq %rax, %r14
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/upperBoundsForSpanningTrees.c
// Function: getVertexNumberOfInducedGraph
int getVertexNumberOfInducedGraph(struct ShallowGraph* g, int n, int* vertices) {
	int i;
	struct VertexList* e;
	int nInd = 0;
	for(i=0; i<n; ++i) { vertices[i] = 0; }
	for(e=g->edges; e!=NULL; e=e->next) {
		vertices[e->startPoint->number] = 1;
		vertices[e->endPoint->number] = 1;
	}
	for (i=0; i<n; ++i) {
		if (vertices[i] != 0) {
			++nInd;
		}
	}
	return nInd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl %esi, %r15d
testl %esi, %esi
jle 0x1e4e4
leaq (,%r15,4), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10d0
movq (%r14), %rax
testq %rax, %rax
je 0x1e510
movl $0x1, %ecx
movq 0x10(%rax), %rdx
movslq 0x18(%rdx), %rdx
movl %ecx, (%rbx,%rdx,4)
movq 0x18(%rax), %rdx
movslq 0x18(%rdx), %rdx
movl %ecx, (%rbx,%rdx,4)
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x1e4f1
testl %ebp, %ebp
jle 0x1e529
xorl %ecx, %ecx
xorl %eax, %eax
cmpl $0x1, (%rbx,%rcx,4)
sbbl $-0x1, %eax
incq %rcx
cmpq %rcx, %r15
jne 0x1e518
jmp 0x1e52b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/upperBoundsForSpanningTrees.c
// Function: getGoodEstimate
long int getGoodEstimate(struct Graph* g, struct ShallowGraphPool* sgp, struct GraphPool* gp) {
	struct ShallowGraph* biconnectedComponents = listBiconnectedComponents(g, sgp);
	long int estimate = getGoodEstimatePrecomputedBlocks(g, biconnectedComponents, sgp, gp);
	dumpShallowGraphCycle(sgp, biconnectedComponents);
	return estimate;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0xb23b
movq %rax, %r12
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1e57d
movq %rax, %rbx
movq %r14, %rdi
movq %r12, %rsi
callq 0x14a56
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/upperBoundsForSpanningTrees.c
// Function: getGoodEstimatePrecomputedBlocks
long int getGoodEstimatePrecomputedBlocks(struct Graph* g, struct ShallowGraph* biconnectedComponents, struct ShallowGraphPool* sgp, struct GraphPool* gp) {
	struct ShallowGraph* idx;
	long estimate = 1;
	int* vertices = malloc(g->n * sizeof(int));

	for (idx=biconnectedComponents; idx!=NULL; idx=idx->next) {
		if (idx->m != 1) {
			int nInd = getVertexNumberOfInducedGraph(idx, g->n, vertices);
			if (!isOuterplanarBlockShallow(idx, sgp, gp)) {
				long bound = trivialBound(idx->m, nInd);
				if (bound == -1){
					free(vertices);
					return -1;
				} else {
					estimate *= bound;
				}
			} else {
				long bound = outerplanarBound(idx->m, nInd);
				if (bound == -1) {
					free(vertices);
					return -1;
				} else {
					estimate *= bound;
				}
			}
		} else {
			/* Biconnected Component idx is a bridge. Computation would be:
			estimate *= 1;
			However, we do not want to waste time doing nothing */
		}
	}
	free(vertices);
	return estimate;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbp
movslq (%rdi), %rdi
shlq $0x2, %rdi
callq 0x1190
movq %rax, %rbx
movl $0x1, %r12d
testq %r13, %r13
je 0x1e607
cmpl $0x1, 0x10(%r13)
je 0x1e5fa
movl (%rbp), %esi
movq %r13, %rdi
movq %rbx, %rdx
callq 0x1e4bc
movl %eax, %r14d
movq %r13, %rdi
movq %r15, %rsi
movq (%rsp), %rdx
callq 0x16d78
movslq 0x10(%r13), %rdi
movslq %r14d, %rsi
testb %al, %al
je 0x1e5e8
callq 0x1e3d3
jmp 0x1e5f0
decq %rsi
callq 0x1e341
cmpq $-0x1, %rax
je 0x1e600
imulq %rax, %r12
movq 0x18(%r13), %r13
jmp 0x1e5aa
movq $-0x1, %r12
movq %rbx, %rdi
callq 0x1030
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/upperBoundsForSpanningTrees.c
// Function: getEstimate
long int getEstimate(struct Graph* g, long int estimateFunction(long int, long int), char checkOuterplanarity, struct ShallowGraphPool* sgp, struct GraphPool* gp) {
	struct ShallowGraph* biconnectedComponents = listBiconnectedComponents(g, sgp);
	struct ShallowGraph* idx;
	long int estimate = 1;
	int* vertices = malloc(g->n * sizeof(int));

	for (idx=biconnectedComponents; idx!=NULL; idx=idx->next) {
		if (idx->m != 1) {
			int nInd;
			if (checkOuterplanarity) {
				if (!isOuterplanarBlockShallow(idx, sgp, gp)) {
					dumpShallowGraphCycle(sgp, biconnectedComponents);
					return -1;
				} else {
					
				}

			}
			nInd = getVertexNumberOfInducedGraph(idx, g->n, vertices);
			/* printf("(%li %i %i) ", estimateFunction(idx->m, nInd), nInd, idx->m); */
			estimate *= estimateFunction(idx->m, nInd);
		}
	}

	dumpShallowGraphCycle(sgp, biconnectedComponents);
	free(vertices);
	return estimate;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x10(%rsp)
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %r13
movq %rcx, (%rsp)
movq %rcx, %rsi
callq 0xb23b
movq %rax, %rbx
movslq (%r13), %rdi
shlq $0x2, %rdi
callq 0x1190
movq %rax, %r15
testq %rbx, %rbx
movq %rbx, 0x8(%rsp)
movl $0x1, %r14d
je 0x1e6b1
cmpl $0x1, 0x10(%rbx)
je 0x1e6a8
testb %bpl, %bpl
je 0x1e68b
movq %rbx, %rdi
movq (%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x16d78
testb %al, %al
je 0x1e6d9
movl (%r13), %esi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x1e4bc
movslq 0x10(%rbx), %rdi
movslq %eax, %rsi
callq *%r12
imulq %rax, %r14
movq 0x18(%rbx), %rbx
testq %rbx, %rbx
jne 0x1e66b
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x14a56
movq %r15, %rdi
callq 0x1030
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x14a56
movq $-0x1, %r14
jmp 0x1e6c7
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/vertexQueue.c
// Function: popFromVertexQueue
struct Vertex* popFromVertexQueue(struct ShallowGraph* queue, struct ShallowGraphPool* sgp) {
	struct VertexList* e = popEdge(queue);
	if (e != NULL) {
		struct Vertex* v = e->endPoint;
		dumpVertexList(sgp->listPool, e);
		return v;
	} else {
		return NULL;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
callq 0x88ee
testq %rax, %rax
je 0x1e73c
movq 0x18(%rax), %rbx
movq 0x10(%r14), %rdi
movq %rax, %rsi
callq 0x14250
jmp 0x1e73e
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/weisfeilerLehman.c
// Function: getWLLabel
char* getWLLabel(struct Vertex* v, struct Vertex* trie, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	char* resultingLabel;
	struct Vertex* local = getVertex(gp->vertexPool);
	struct ShallowGraph* string = getShallowGraph(sgp);
	struct ShallowGraph* copy;
	int deg = degree(v);
	char** neighborlabels = malloc(deg * sizeof(char*));
	int i = 0;
	struct VertexList* e;

	for (e=v->neighborhood; e!=NULL; e=e->next) {
		neighborlabels[i] = e->endPoint->label;
		++i;
	}
	qsort(neighborlabels, deg, sizeof(char*), &compare);

	e = getVertexList(sgp->listPool);
	e->label = v->label;
	appendEdge(string, e);
	for (i=0; i<deg; ++i) {
		e = getVertexList(sgp->listPool);
		e->label = neighborlabels[i];
		appendEdge(string, e);
	}
	// fprintf(stderr, "adding string ");
	// printCanonicalString(string, stdout);
	copy = cloneShallowGraph(string, sgp);
	// fprintf(stderr, "copy          ");
	// printCanonicalString(copy, stdout);
	addToSearchTree(local, copy, gp, sgp);
	mergeSearchTrees(trie, local, 1, NULL, 0, trie, 0, gp);
	i = getID(trie, string);
	// fprintf(stderr, "resulting label %i\n", i);
	resultingLabel = intLabel(i);
	dumpShallowGraphCycle(sgp, string);
	free(neighborlabels);
	return resultingLabel;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, 0x10(%rsp)
movq %rdi, %r15
movq 0x10(%rdx), %rdi
callq 0x1447e
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
callq 0x1498d
movq %rax, %r14
movq %r15, %rdi
callq 0x7c4e
movslq %eax, %rbp
leaq (,%rbp,8), %rdi
callq 0x1190
movq %rax, %r13
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x1e7cf
movq %r13, %rcx
movq 0x18(%rax), %rdx
movq (%rdx), %rdx
movq %rdx, (%rcx)
movq 0x8(%rax), %rax
addq $0x8, %rcx
testq %rax, %rax
jne 0x1e7b8
leaq 0xd5(%rip), %rcx        # 0x1e8ab
movl $0x8, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1080
movq 0x10(%rbx), %rdi
callq 0x141f1
movq (%r15), %rcx
movq %rcx, (%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x8916
testl %ebp, %ebp
jle 0x1e82b
xorl %r15d, %r15d
movq 0x10(%rbx), %rdi
callq 0x141f1
movq (%r13,%r15,8), %rcx
movq %rcx, (%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x8916
incq %r15
cmpq %r15, %rbp
jne 0x1e807
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8872
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x1ae1e
movq 0x10(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r15, %r9
pushq %r12
pushq $0x0
callq 0x1aefc
addq $0x10, %rsp
movq %r15, %rdi
movq %r14, %rsi
callq 0x1ad58
movl %eax, %edi
callq 0xdcf9
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x14a56
movq %r13, %rdi
callq 0x1030
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/weisfeilerLehman.c
// Function: weisfeilerLehmanRelabel
struct Graph* weisfeilerLehmanRelabel(struct Graph* g, struct Vertex* wlLabels, struct GraphPool* gp, struct ShallowGraphPool* sgp) {
	struct Graph* h = cloneGraph(g, gp);
	int v;

	for (v=0; v<g->n; ++v) {
		h->vertices[v]->label = getWLLabel(g->vertices[v], wlLabels, gp, sgp);
		h->vertices[v]->isStringMaster = 1;
	}
	// fprintf(stderr, "\n\n\n");
	// printStringsInSearchTree(wlLabels, stderr, sgp);
	return h;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rdx, %rsi
callq 0x7fc9
movq %rax, %r13
cmpl $0x0, (%r12)
jle 0x1e91a
xorl %ebp, %ebp
movq 0x10(%r12), %rax
movq (%rax,%rbp,8), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1e75c
movq 0x10(%r13), %rcx
movq (%rcx,%rbp,8), %rdx
movq %rax, (%rdx)
movq (%rcx,%rbp,8), %rax
movl $0x1, 0x24(%rax)
incq %rbp
movslq (%r12), %rax
cmpq %rax, %rbp
jl 0x1e8e1
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/wilsonsAlgorithm.c
// Function: ias_shuffleArray
void ias_shuffleArray(struct IntegerArrayStack* ias) {
	int i;
	for (i = ias->capacity - 1; i > 0; i--)
	{
		int index = rand() % (i + 1);
		// Simple swap
		int a = ias->stackData[index];
		ias->stackData[index] = ias->stackData[i];
		ias->stackData[i] = a;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movslq 0xc(%rdi), %r14
cmpq $0x2, %r14
jl 0x1e9f1
movq %rdi, %rbx
leaq -0x1(%r14), %r15
callq 0x1250
cltd
idivl %r14d
movq (%rbx), %rax
movslq %edx, %rcx
movl (%rax,%rcx,4), %edx
movl -0x4(%rax,%r14,4), %esi
movl %esi, (%rax,%rcx,4)
movl %edx, -0x4(%rax,%r14,4)
cmpq $0x2, %r14
movq %r15, %r14
ja 0x1e9c5
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/wilsonsAlgorithm.c
// Function: randomSpanningTreeAsShallowGraph
struct ShallowGraph* randomSpanningTreeAsShallowGraph(struct Graph* g, struct ShallowGraphPool* sgp) {
	if (g->m == 0) {
		return getShallowGraph(sgp);
	} else {
		return _randomSpanningTreeAsShallowGraph(g, sgp);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
cmpl $0x0, 0x4(%rdi)
je 0x1eb71
movq %rdi, %r13
movslq (%rdi), %rbx
leaq (,%rbx,8), %rdi
callq 0x1190
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
callq 0x1190
movq %rax, %r12
movq %r14, %rdi
callq 0x1498d
movq %rax, 0x10(%rsp)
movslq (%r13), %r15
movl $0x10, %edi
callq 0x1190
movq %rax, %rbp
leaq (,%r15,4), %rdi
callq 0x1190
movq %rax, (%rbp)
movl $0xffffffff, 0x8(%rbp)  # imm = 0xFFFFFFFF
movl %r15d, 0xc(%rbp)
testq %r15, %r15
jle 0x1eb87
movq %rax, %rbx
movq %r13, 0x18(%rsp)
movq %r14, 0x20(%rsp)
leaq (,%r15,8), %rdx
xorl %r13d, %r13d
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x10d0
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x10d0
negq %r15
movq $-0x1, %r14
movl %r13d, 0x4(%rbx,%r14,4)
leaq (%r15,%r14), %rax
incq %rax
incq %r14
incl %r13d
cmpq $-0x1, %rax
jne 0x1eb39
movl %r14d, 0x8(%rbp)
movq %rbp, %rdi
callq 0x1e9b3
cmpq $-0x1, %r14
je 0x1eb98
addl $-0x2, %r13d
movl %r13d, 0x8(%rbp)
movslq (%rbx,%r14,4), %rax
jmp 0x1eb9f
movq %r14, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1498d
movq %rbp, %rdi
callq 0x1e9b3
movq $-0x1, %rax
jmp 0x1eba9
movq $-0x1, %rax
movq 0x20(%rsp), %r14
movq 0x18(%rsp), %r13
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %r15
movb $0x1, (%r12,%rax)
movq 0x10(%r14), %r9
movq %r13, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
movq %r12, %rcx
movq %r15, %r8
callq 0x1ec27
testb %al, %al
je 0x1ebb8
movq %rbp, %rdi
callq 0x1e999
movq %rbx, %rdi
callq 0x1030
movq %r12, %rdi
callq 0x1030
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/executables/outerplanaritytest.c
// Function: addSpiderWebEdges
void addSpiderWebEdges(struct BBTree* bbTree, struct ShallowGraphPool* sgp) {
    printf(", \"spiderweb\": {");
    if (bbTree->tree->n > 0) {
        computeDistanceToCenter(bbTree->tree, sgp);
        char first = 1;
        for (int v=0; v<bbTree->tree->n; ++v) {
            if (first) {
                first = 0;
            } else {
                printf(", ");
            }
            printf("\"%d\": %d", bbTree->originalIDs[v], bbTree->tree->vertices[v]->lowPoint);
        }
    }
    putc('}', stdout);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x243e(%rip), %rdi      # 0x21674
xorl %eax, %eax
callq 0x10b0
movq (%rbx), %rdi
cmpl $0x0, (%rdi)
jle 0x1f2a7
movq %r14, %rsi
callq 0x1d383
movq (%rbx), %rax
cmpl $0x0, (%rax)
jle 0x1f2a7
xorl %ecx, %ecx
leaq 0x118f(%rip), %r14      # 0x203ed
leaq 0x2420(%rip), %r15      # 0x21685
xorl %r12d, %r12d
testb $0x1, %cl
je 0x1f27a
movq %r14, %rdi
xorl %eax, %eax
callq 0x10b0
movq (%rbx), %rax
movq 0x18(%rbx), %rcx
movl (%rcx,%r12,4), %esi
movq 0x10(%rax), %rax
movq (%rax,%r12,8), %rax
movl 0x20(%rax), %edx
movq %r15, %rdi
xorl %eax, %eax
callq 0x10b0
incq %r12
movq (%rbx), %rax
movslq (%rax), %rdx
movb $0x1, %cl
cmpq %rdx, %r12
jl 0x1f268
movq 0xdd1a(%rip), %rax      # 0x2cfc8
movq (%rax), %rsi
movl $0x7d, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1130
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/executables/outerplanaritytest.c
// Function: printInterestingEdges
char printInterestingEdges(struct Vertex* lastInteresting, struct Vertex* v, char notFirst, int* originalIDs, char printAll) {
    v->visited = 1;
    if (v->lowPoint) {
        if (lastInteresting) {
            char isNeighbor = 0;
            for (struct VertexList* e=v->neighborhood; e!=NULL; e=e->next) {
                if (e->endPoint == lastInteresting) {
                    isNeighbor = 1;
                    break;
                }
            }
            if (printAll || !isNeighbor) {
                if (notFirst) {
                    printf(", ");
                }
                printf("[%d, %d]", originalIDs[lastInteresting->number], originalIDs[v->number]);
                notFirst = 1;
            }
        }
    }
    for (struct VertexList* e=v->neighborhood; e!=NULL; e=e->next) {
        if (e->endPoint->visited == 0) {
            if (v->lowPoint) {
                notFirst = printInterestingEdges(v, e->endPoint, notFirst, originalIDs, printAll);
            } else {
                notFirst = printInterestingEdges(lastInteresting, e->endPoint, notFirst, originalIDs, printAll);
            }
        }
    }
    return notFirst;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebp
movq %rcx, %rbx
movl %edx, %eax
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, 0x1c(%rsi)
testq %rdi, %rdi
je 0x1f336
cmpl $0x0, 0x20(%r14)
je 0x1f336
movq %r14, %rcx
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
je 0x1f306
cmpq %r15, 0x18(%rcx)
jne 0x1f2f2
testb %bpl, %bpl
je 0x1f336
testb %al, %al
je 0x1f318
leaq 0x10dc(%rip), %rdi      # 0x203ed
xorl %eax, %eax
callq 0x10b0
movslq 0x18(%r15), %rax
movl (%rbx,%rax,4), %esi
movslq 0x18(%r14), %rax
movl (%rbx,%rax,4), %edx
leaq 0x2361(%rip), %rdi      # 0x2168e
xorl %eax, %eax
callq 0x10b0
movb $0x1, %al
movq 0x8(%r14), %r12
testq %r12, %r12
je 0x1f378
movsbl %bpl, %ebp
movq 0x18(%r12), %rsi
cmpl $0x0, 0x1c(%rsi)
jne 0x1f36e
cmpl $0x0, 0x20(%r14)
je 0x1f35d
movsbl %al, %edx
movq %r14, %rdi
jmp 0x1f363
movsbl %al, %edx
movq %r15, %rdi
movq %rbx, %rcx
movl %ebp, %r8d
callq 0x1f2c6
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x1f343
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/executables/outerplanaritytest.c
// Function: addShortcutEdges
void addShortcutEdges(struct BBTree* bbTree, char printAll) {
    int root = 0;
    /* mark interesting vertices, keep the last leaf or join as root */
    for (int v=0; v<bbTree->tree->n; ++v) {
        bbTree->tree->vertices[v]->visited = 0;
        if (degree(bbTree->tree->vertices[v]) != 2) {
            bbTree->tree->vertices[v]->lowPoint = 1;
            root = v;
        } else {
            bbTree->tree->vertices[v]->lowPoint = 0;
        } 
    }
    if (bbTree->blocks) {
        for (int v=0; v<bbTree->blocks->n; ++v) {
            bbTree->blocks->vertices[v]->lowPoint = 2;
        }
    }

    printf(", \"shortcutEdges\": [");
    printInterestingEdges(NULL, bbTree->tree->vertices[root], 0, bbTree->originalIDs, printAll);
    printf("]");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq (%rdi), %rcx
xorl %r15d, %r15d
cmpl $0x0, (%rcx)
jle 0x1f3e1
xorl %r12d, %r12d
movq 0x10(%rcx), %rax
movq (%rax,%r12,8), %rdi
movl $0x0, 0x1c(%rdi)
callq 0x7c4e
movq (%r14), %rcx
movq 0x10(%rcx), %rdx
movq (%rdx,%r12,8), %rdx
cmpl $0x2, %eax
jne 0x1f3c9
movl $0x0, 0x20(%rdx)
jmp 0x1f3d3
movl $0x1, 0x20(%rdx)
movl %r12d, %r15d
incq %r12
movslq (%rcx), %rax
cmpq %rax, %r12
jl 0x1f39c
movslq %r15d, %r15
movq 0x8(%r14), %rcx
testq %rcx, %rcx
je 0x1f40b
movslq (%rcx), %rax
testq %rax, %rax
jle 0x1f40b
movq 0x10(%rcx), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movl $0x2, 0x20(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x1f3f8
leaq 0x2285(%rip), %rdi      # 0x21697
xorl %eax, %eax
callq 0x10b0
movq (%r14), %rax
movq 0x18(%r14), %rcx
movq 0x10(%rax), %rax
movq (%rax,%r15,8), %rsi
movsbl %bl, %r8d
xorl %edi, %edi
xorl %edx, %edx
callq 0x1f2c6
movl $0x5d, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/executables/outerplanaritytest.c
// Function: printBBTreeEdges
void printBBTreeEdges(struct BBTree* bbTree) {
    int root = 0;
    /* mark all vertices as interesting */
    for (int v=0; v<bbTree->tree->n; ++v) {
        bbTree->tree->vertices[v]->visited = 0;
        bbTree->tree->vertices[v]->lowPoint = 1;
    }

    printf(", \"CATree\": [");
    printInterestingEdges(NULL, bbTree->tree->vertices[root], 0, bbTree->originalIDs, 1);
    printf("]");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rcx
movslq (%rcx), %rax
testq %rax, %rax
jle 0x1f479
movq 0x10(%rcx), %rcx
xorl %edx, %edx
movabsq $0x100000000, %rsi      # imm = 0x100000000
movq (%rcx,%rdx,8), %rdi
movq %rsi, 0x1c(%rdi)
incq %rdx
cmpq %rdx, %rax
jne 0x1f469
leaq 0x222c(%rip), %rdi      # 0x216ac
xorl %eax, %eax
callq 0x10b0
movq (%rbx), %rax
movq 0x18(%rbx), %rcx
movq 0x10(%rax), %rax
movq (%rax), %rsi
xorl %edi, %edi
xorl %edx, %edx
movl $0x1, %r8d
callq 0x1f2c6
movl $0x5d, %edi
popq %rbx
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O3/ataradov[P]edbg/dap.c
// Function: dap_led
void dap_led(int index, int state)
{
  uint8_t buf[3];

  buf[0] = ID_DAP_LED;
  buf[1] = index;
  buf[2] = state;
  dbg_dap_cmd(buf, sizeof(buf), 3);

  check(DAP_OK == buf[0], "DAP_LED failed");
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0xd(%rsp), %rbx
movb $0x1, (%rbx)
movb %dil, 0x1(%rbx)
movb %sil, 0x2(%rbx)
movq %rbx, %rdi
movl $0x3, %esi
movl $0x3, %edx
callq 0xf472
xorl %edi, %edi
cmpb $0x0, (%rbx)
sete %dil
leaq 0x9adf(%rip), %rsi      # 0x10020
xorl %eax, %eax
callq 0x7bcc
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/ataradov[P]edbg/dap.c
// Function: dap_swd_configure
void dap_swd_configure(int cfg)
{
  uint8_t buf[2];

  buf[0] = ID_DAP_SWD_CONFIGURE;
  buf[1] = cfg;
  dbg_dap_cmd(buf, sizeof(buf), 2);

  check(DAP_OK == buf[0], "SWD_CONFIGURE failed");
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0xe(%rsp), %rbx
movb $0x13, (%rbx)
movb %dil, 0x1(%rbx)
movq %rbx, %rdi
movl $0x2, %esi
movl $0x2, %edx
callq 0xf472
xorl %edi, %edi
cmpb $0x0, (%rbx)
sete %dil
leaq 0x99c8(%rip), %rsi      # 0x1006d
xorl %eax, %eax
callq 0x7bcc
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/ataradov[P]edbg/dap.c
// Function: dap_read_idcode
uint32_t dap_read_idcode(void)
{
  if (DAP_INTERFACE_SWD == dap_interface)
  {
    dap_read_idcode_req();
    dap_transfer();
    return dap_response[0];
  }
  else if (DAP_INTERFACE_JTAG == dap_interface)
  {
    uint8_t buf[16];

    buf[0] = ID_DAP_JTAG_IDCODE;
    buf[1] = dap_jtag_index;

    dbg_dap_cmd(buf, sizeof(buf), 2);
    check(DAP_OK == buf[0], "JTAG_IDCODE failed");

    return *((uint32_t *)&buf[1]);
  }

  return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl 0x157a7(%rip), %ecx     # 0x1c150
cmpl $0x2, %ecx
je 0x69d5
xorl %eax, %eax
cmpl $0x1, %ecx
jne 0x6a10
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x6a16
callq 0x6a6f
movl 0x4602d(%rip), %eax     # 0x4ca00
jmp 0x6a10
movq %rsp, %rbx
movb $0x16, (%rbx)
movb 0x15773(%rip), %al      # 0x1c154
movb %al, 0x1(%rbx)
movq %rbx, %rdi
movl $0x10, %esi
movl $0x2, %edx
callq 0xf472
xorl %edi, %edi
cmpb $0x0, (%rbx)
sete %dil
leaq 0x9811(%rip), %rsi      # 0x10217
xorl %eax, %eax
callq 0x7bcc
movl 0x1(%rbx), %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/ataradov[P]edbg/dap.c
// Function: dap_reset_target_hw
void dap_reset_target_hw(int state)
{
  uint8_t buf[7];
  int value = state ? (DAP_SWJ_SWCLK_TCK | DAP_SWJ_SWDIO_TMS) : 0;

  //-------------
  buf[0] = ID_DAP_SWJ_PINS;
  buf[1] = value; // Value
  buf[2] = DAP_SWJ_nRESET | DAP_SWJ_SWCLK_TCK | DAP_SWJ_SWDIO_TMS; // Select
  buf[3] = 0; // Wait
  buf[4] = 0;
  buf[5] = 0;
  buf[6] = 0;
  dbg_dap_cmd(buf, sizeof(buf), 7);

  sleep_ms(10);

  //-------------
  buf[0] = ID_DAP_SWJ_PINS;
  buf[1] = DAP_SWJ_nRESET | value; // Value
  buf[2] = DAP_SWJ_nRESET | DAP_SWJ_SWCLK_TCK | DAP_SWJ_SWDIO_TMS; // Select
  buf[3] = 0; // Wait
  buf[4] = 0;
  buf[5] = 0;
  buf[6] = 0;
  dbg_dap_cmd(buf, sizeof(buf), 7);

  sleep_ms(10);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
xorl %eax, %eax
testl %edi, %edi
movb $0x10, %bpl
leaq 0x9(%rsp), %rbx
movb %bpl, (%rbx)
setne %al
leal (%rax,%rax,2), %r14d
movb %r14b, 0x1(%rbx)
movb $-0x7d, %r15b
movb %r15b, 0x2(%rbx)
xorl %r12d, %r12d
movl %r12d, 0x3(%rbx)
movq %rbx, %rdi
movl $0x7, %esi
movl $0x7, %edx
callq 0xf472
movl $0xa, %edi
callq 0x7d8c
movb %bpl, (%rbx)
orb $-0x80, %r14b
movb %r14b, 0x1(%rbx)
movb %r15b, 0x2(%rbx)
movl %r12d, 0x3(%rbx)
movq %rbx, %rdi
movl $0x7, %esi
movl $0x7, %edx
callq 0xf472
movl $0xa, %edi
callq 0x7d8c
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ataradov[P]edbg/dap.c
// Function: dap_reset_pin
void dap_reset_pin(int state)
{
  uint8_t buf[7];

  buf[0] = ID_DAP_SWJ_PINS;
  buf[1] = state ? DAP_SWJ_nRESET : 0; // Value
  buf[2] = DAP_SWJ_nRESET; // Select
  buf[3] = 0; // Wait
  buf[4] = 0;
  buf[5] = 0;
  buf[6] = 0;
  dbg_dap_cmd(buf, sizeof(buf), 7);
}

// Assembly:
pushq %rax
testl %edi, %edi
setne %al
leaq 0x1(%rsp), %rdi
movb $0x10, (%rdi)
shlb $0x7, %al
movb %al, 0x1(%rdi)
movb $-0x80, 0x2(%rdi)
movl $0x0, 0x3(%rdi)
movl $0x7, %esi
movl $0x7, %edx
callq 0xf472
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/ataradov[P]edbg/dap.c
// Function: dap_read_block
void dap_read_block(uint32_t addr, uint8_t *data, int size)
{
  uint32_t ptr = addr;
  uint32_t rem = size;
  int cnt = 0;

  if (size == 0)
    return;

  while (rem && (ptr % sizeof(uint32_t)))
  {
    dap_read_byte_req(ptr);
    ptr += sizeof(uint8_t);
    rem -= sizeof(uint8_t);
  }

  while (rem >= sizeof(uint32_t))
  {
    dap_read_word_req(ptr);
    ptr += sizeof(uint32_t);
    rem -= sizeof(uint32_t);
  }

  while (rem)
  {
    dap_read_byte_req(ptr);
    ptr += sizeof(uint8_t);
    rem -= sizeof(uint8_t);
  }

  dap_transfer();

  while (size && (addr % sizeof(uint32_t)))
  {
    *data = dap_response[cnt++];
    data += sizeof(uint8_t);
    addr += sizeof(uint8_t);
    size -= sizeof(uint8_t);
  }

  while (size >= (int)sizeof(uint32_t))
  {
    *(uint32_t *)data = dap_response[cnt++];
    data += sizeof(uint32_t);
    size -= sizeof(uint32_t);
  }

  while (size)
  {
    *data = dap_response[cnt++];
    data += sizeof(uint8_t);
    size -= sizeof(uint8_t);
  }
}

// Assembly:
testl %edx, %edx
je 0x73de
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %rbx
movl %edi, %r15d
movl %edi, %ebp
movl %edx, %r12d
testb $0x3, %r15b
je 0x72d3
movl %r14d, %r12d
movl %r15d, %ebp
movl %r12d, %r13d
xorl %edi, %edi
xorl %esi, %esi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x6a16
incl %ebp
leal -0x1(%r13), %r12d
cmpl $0x1, %r13d
je 0x72d3
movl %ebp, %eax
andl $0x3, %eax
jne 0x72b0
cmpl $0x4, %r12d
jb 0x72f6
xorl %edi, %edi
movl $0x2, %esi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x6a16
addl $0x4, %ebp
addl $-0x4, %r12d
cmpl $0x3, %r12d
ja 0x72d9
testl %r12d, %r12d
je 0x730f
xorl %edi, %edi
xorl %esi, %esi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x6a16
incl %ebp
decl %r12d
jne 0x72fb
callq 0x6a6f
testb $0x3, %r15b
je 0x7354
movl %r14d, %eax
decq %rax
incl %r15d
leaq 0x456d6(%rip), %rcx     # 0x4ca00
xorl %r12d, %r12d
movq %r12, %rdx
incq %r12
movb (%rcx), %sil
movb %sil, (%rbx,%rdx)
cmpl %edx, %eax
je 0x734c
addl %r15d, %edx
andl $0x3, %edx
addq $0x4, %rcx
testl %edx, %edx
jne 0x732d
subl %r12d, %r14d
addq %r12, %rbx
jmp 0x7357
xorl %r12d, %r12d
cmpl $0x4, %r14d
jl 0x73a5
movl %r12d, %eax
xorl %ecx, %ecx
movl %r14d, %edx
subl $0x7, %edx
cmovbl %ecx, %edx
leaq 0x4568e(%rip), %rcx     # 0x4ca00
leaq (%rcx,%rax,4), %rsi
addl $0x3, %edx
andl $-0x4, %edx
addq $0x4, %rdx
movq %rbx, %rdi
callq 0x6190
leal -0x4(%r14), %eax
shrl $0x2, %eax
addl %eax, %r12d
incl %r12d
movl %r14d, %eax
addq $0x4, %rbx
leal -0x4(%rax), %r14d
cmpl $0x7, %eax
ja 0x7395
testl %r14d, %r14d
je 0x73d0
movl %r12d, %eax
shlq $0x2, %rax
movl %r14d, %ecx
xorl %edx, %edx
leaq 0x45643(%rip), %rsi     # 0x4ca00
leaq (%rax,%rdx,4), %rdi
movb (%rsi,%rdi), %dil
movb %dil, (%rbx,%rdx)
incq %rdx
cmpl %edx, %ecx
jne 0x73bd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ataradov[P]edbg/dap.c
// Function: dap_write_block
void dap_write_block(uint32_t addr, uint8_t *data, int size)
{
  if (size == 0)
    return;

  while (size && (addr % sizeof(uint32_t)))
  {
    dap_write_byte_req(addr, *data);
    data += sizeof(uint8_t);
    addr += sizeof(uint8_t);
    size -= sizeof(uint8_t);
  }

  while (size >= (int)sizeof(uint32_t))
  {
    dap_write_word_req(addr, *(uint32_t *)data);
    data += sizeof(uint32_t);
    addr += sizeof(uint32_t);
    size -= sizeof(uint32_t);
  }

  while (size)
  {
    dap_write_byte_req(addr, *data);
    data += sizeof(uint8_t);
    addr += sizeof(uint8_t);
    size -= sizeof(uint8_t);
  }

  dap_transfer();
}

// Assembly:
testl %edx, %edx
je 0x7452
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %rbx
movl %edi, %ebp
testb $0x3, %bpl
je 0x7423
movl %r14d, %r15d
movzbl (%rbx), %ecx
movl $0x1, %edi
xorl %esi, %esi
movl %ebp, %edx
callq 0x6a16
incq %rbx
incl %ebp
leal -0x1(%r15), %r14d
cmpl $0x1, %r15d
je 0x7423
movl %ebp, %eax
andl $0x3, %eax
jne 0x73f9
cmpl $0x4, %r14d
jl 0x7453
movl (%rbx), %ecx
movl $0x1, %edi
movl $0x2, %esi
movl %ebp, %edx
callq 0x6a16
addq $0x4, %rbx
addl $0x4, %ebp
leal -0x4(%r14), %eax
cmpl $0x7, %r14d
movl %eax, %r14d
ja 0x7429
jmp 0x7456
retq
movl %r14d, %eax
testl %eax, %eax
je 0x7480
movl %eax, %r14d
movl %ebp, %r15d
xorl %r12d, %r12d
leal (%r15,%r12), %edx
movzbl (%rbx,%r12), %ecx
movl $0x1, %edi
xorl %esi, %esi
callq 0x6a16
incq %r12
cmpl %r12d, %r14d
jne 0x7463
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6a6f
// File: /workspace/github_c_makefile_star2_O3/ataradov[P]edbg/dap.c
// Function: dap_jtag_add_req
static void dap_jtag_add_req(int tdi, int tms, int tdo)
{
  dap_jtag_request_t req;
  req.tdi = tdi ? 1 : 0;
  req.opt = (tms ? JTAG_SEQUENCE_TMS : 0) | (tdo ? JTAG_SEQUENCE_TDO : 0);
  assert(dap_request_count < TRANSFER_SIZE);
  dap_jtag_request[dap_jtag_request_count++] = req;
}

// Assembly:
cmpl $0x4000, 0x14cbd(%rip)  # imm = 0x4000
jge 0x74d1
testl %edx, %edx
setne %al
testl %esi, %esi
setne %cl
shlb $0x6, %cl
shlb $0x7, %al
orb %cl, %al
movslq 0x5554a(%rip), %rcx     # 0x5ca00
leal 0x1(%rcx), %edx
testl %edi, %edi
movl %edx, 0x5553f(%rip)     # 0x5ca00
leaq 0x57558(%rip), %rdx     # 0x5ea20
movb %al, (%rdx,%rcx,2)
setne 0x1(%rdx,%rcx,2)
retq
pushq %rax
leaq 0x8dae(%rip), %rdi      # 0x10287
leaq 0x8c60(%rip), %rsi      # 0x10140
leaq 0x8df1(%rip), %rcx      # 0x102d8
movl $0x3f6, %edx            # imm = 0x3F6
callq 0x60d0
// File: /workspace/github_c_makefile_star2_O3/ataradov[P]edbg/dap.c
// Function: dap_jtag_read
void dap_jtag_read(int offset, uint8_t *data, int size)
{
  dap_jtag_flush();

  for (int i = 0; i < size; i++)
  {
    int index = offset + i;
    int bit;

    assert(index < dap_jtag_response_count);

    bit = (dap_jtag_response_buf[index / 8] & (1 << (index % 8))) ? 1 : 0;

    if ((i % 8) == 0)
      data[i / 8] = 0;

    data[i / 8] |= (bit << (i % 8));
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %r15d
callq 0x74f8
testl %ebx, %ebx
jle 0x77e4
movl 0x5728a(%rip), %eax     # 0x5ea10
cmpl %r15d, %eax
cmovlel %r15d, %eax
subl %r15d, %eax
xorl %edx, %edx
leaq 0x55277(%rip), %rsi     # 0x5ca10
cmpl %edx, %eax
je 0x77ea
movl %r15d, %ecx
addl %edx, %ecx
leal 0x7(%r15,%rdx), %edi
cmovnsl %ecx, %edi
sarl $0x3, %edi
movslq %edi, %rdi
movzbl (%rdi,%rsi), %r8d
andl $0x7, %ecx
xorl %edi, %edi
btl %ecx, %r8d
setb %r9b
movl %edx, %r8d
shrl $0x3, %r8d
movl %edx, %ecx
andl $0x7, %ecx
jne 0x77d5
movb $0x0, (%r14,%r8)
movb %r9b, %dil
shll %cl, %edi
orb %dil, (%r14,%r8)
incl %edx
cmpl %edx, %ebx
jne 0x7799
popq %rbx
popq %r14
popq %r15
retq
leaq 0x8a4e(%rip), %rdi      # 0x1023f
leaq 0x8948(%rip), %rsi      # 0x10140
leaq 0x8a60(%rip), %rcx      # 0x1025f
movl $0x467, %edx            # imm = 0x467
callq 0x60d0
// File: /workspace/github_c_makefile_star2_O3/ataradov[P]edbg/dap.c
// Function: dap_jtag_write_ir
void dap_jtag_write_ir(int ir, int size)
{
  dap_jtag_clk(0, 1);
  dap_jtag_clk(0, 1);
  dap_jtag_clk(0, 0);
  dap_jtag_clk(0, 0);

  for (int i = 0; i < size; i++)
    dap_jtag_clk((ir >> i) & 1, i == (size-1));

  dap_jtag_clk(0, 1);
  dap_jtag_clk(0, 0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edi, %ebp
xorl %r14d, %r14d
xorl %edi, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x7491
xorl %edi, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x7491
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7491
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7491
testl %ebx, %ebx
jle 0x78b0
negl %ebx
leal (%rbx,%r14), %eax
xorl %edi, %edi
btl %r14d, %ebp
setb %dil
xorl %esi, %esi
cmpl $-0x1, %eax
sete %sil
xorl %edx, %edx
callq 0x7491
incl %r14d
movl %ebx, %eax
addl %r14d, %eax
jne 0x7888
xorl %edi, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x7491
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x7491
// File: /workspace/github_c_makefile_star2_O3/ataradov[P]edbg/dap.c
// Function: dap_jtag_write_dr
void dap_jtag_write_dr(uint8_t *data, int size)
{
  dap_jtag_clk(0, 1);
  dap_jtag_clk(0, 0);
  dap_jtag_clk(0, 0);

  for (int i = 0; i < size; i++)
    dap_jtag_clk((data[i / 8] >> (i % 8)) & 1, i == (size-1));

  dap_jtag_clk(0, 1);
  dap_jtag_clk(0, 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
xorl %edi, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x7491
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7491
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7491
testl %ebx, %ebx
jle 0x793c
negl %ebx
leal (%rbx,%r15), %eax
movl %r15d, %ecx
shrl $0x3, %ecx
movzbl (%r14,%rcx), %ecx
movl %r15d, %edx
andl $0x7, %edx
xorl %edi, %edi
btl %edx, %ecx
setb %dil
xorl %esi, %esi
cmpl $-0x1, %eax
sete %sil
xorl %edx, %edx
callq 0x7491
incl %r15d
movl %ebx, %eax
addl %r15d, %eax
jne 0x7904
xorl %edi, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x7491
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
popq %rbx
popq %r14
popq %r15
jmp 0x7491
// File: /workspace/github_c_makefile_star2_O3/ataradov[P]edbg/dap.c
// Function: dap_jtag_read_dr
void dap_jtag_read_dr(uint8_t *data, int size)
{
  dap_jtag_clk(0, 1);
  dap_jtag_clk(0, 0);
  dap_jtag_clk(0, 0);

  for (int i = 0; i < size; i++)
    dap_jtag_clk_read(0, i == (size-1));

  dap_jtag_clk(0, 1);
  dap_jtag_clk(0, 0);

  dap_jtag_read(0, data, size);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %edi, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x7491
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7491
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7491
testl %ebx, %ebx
jle 0x79a6
movl %ebx, %ebp
xorl %esi, %esi
cmpl $0x1, %ebp
sete %sil
xorl %edi, %edi
movl $0x1, %edx
callq 0x7491
decl %ebp
jne 0x798d
xorl %edi, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x7491
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7491
xorl %edi, %edi
movq %r14, %rsi
movl %ebx, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x776a
// File: /workspace/github_c_makefile_star2_O3/ataradov[P]edbg/dap.c
// Function: dap_jtag_scan_chain
int dap_jtag_scan_chain(uint32_t *idcode, int size)
{
  int count = 0;

  dap_jtag_reset();

  dap_jtag_clk(1, 1);
  dap_jtag_clk(1, 0);
  dap_jtag_clk(1, 0);

  for (int i = 0; i < size; i++)
  {
    for (int j = 0; j < 32; j++)
      dap_jtag_clk_read(0, 0);

    dap_jtag_read(0, (uint8_t *)&idcode[count], 32);

    if (idcode[count])
      count++;
    else
      break;
  }

  dap_jtag_clk(1, 1);
  dap_jtag_clk(1, 1);
  dap_jtag_clk(1, 0);

  return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x7821
xorl %ebx, %ebx
movl $0x1, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x7491
movl $0x1, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7491
movl $0x1, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7491
testl %ebp, %ebp
jle 0x7a55
movl %ebp, %r12d
xorl %ebx, %ebx
movl $0x20, %r15d
xorl %edi, %edi
xorl %esi, %esi
movl $0x1, %edx
callq 0x7491
decl %r15d
jne 0x7a1f
leaq (%r14,%rbx,4), %r15
xorl %edi, %edi
movq %r15, %rsi
movl $0x20, %edx
callq 0x776a
cmpl $0x0, (%r15)
je 0x7a55
incq %rbx
cmpq %r12, %rbx
jne 0x7a19
movl %ebp, %ebx
movl $0x1, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x7491
movl $0x1, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x7491
movl $0x1, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7491
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ataradov[P]edbg/edbg.c
// Function: verbose
void verbose(char *fmt, ...)
{
  va_list args;

  if (g_verbose)
  {
    va_start(args, fmt);
    vprintf(fmt, args);
    va_end(args);

    fflush(stdout);
  }
}

// Assembly:
subq $0xd8, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x7aeb
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
cmpb $0x1, 0x76f3e(%rip)     # 0x7ea30
jne 0x7b2d
leaq 0x20(%rsp), %rax
movq %rsp, %rsi
movq %rax, 0x10(%rsi)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsi)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsi)
callq 0x61c0
movq 0x1349b(%rip), %rax     # 0x1afc0
movq (%rax), %rdi
callq 0x61b0
addq $0xd8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/ataradov[P]edbg/edbg.c
// Function: check
void check(bool cond, char *fmt, ...)
{
  if (cond)
    return;

  va_list args;

  va_start(args, fmt);
  fprintf(stderr, "Error: ");
  vfprintf(stderr, fmt, args);
  fprintf(stderr, "\n");
  va_end(args);

  exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x7c27
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
testl %edi, %edi
je 0x7c38
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rsi, %rbx
leaq 0x20(%rsp), %rax
movq %rsp, %r14
movq %rax, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%r14)
movq 0x13389(%rip), %r15     # 0x1aff0
movq (%r15), %rcx
leaq 0x8919(%rip), %rdi      # 0x1058a
movl $0x7, %esi
movl $0x1, %edx
callq 0x6280
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6230
movq (%r15), %rsi
movl $0xa, %edi
callq 0x6130
movl $0x1, %edi
callq 0x6270