LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/SNUCSE-CTA[P]GI/src/heap.cpp
// Function: Heap::insert(int*, int)
void Heap::insert(int32_t* aValue, int32_t aVertex)
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	int32_t i, p, t;
	++size;
	heap[size] = aVertex;
	locate[aVertex] = size;
	i = size;
	while( i > 1 ) {
		p = PARENT(i);
		if( aValue[heap[p]] > aValue[heap[i]] ) {
			t = heap[p];
			heap[p] = heap[i];
			heap[i] = t;

			locate[ heap[p] ] = p;
			locate[ heap[i] ] = i;

			i = p;
		}
		else {
			break;
		}
	}
}

// Assembly:
movslq 0x10(%rdi), %rcx
leaq 0x1(%rcx), %rax
movl %eax, 0x10(%rdi)
movq (%rdi), %rax
movl %edx, 0x4(%rax,%rcx,4)
movl 0x10(%rdi), %r8d
movq 0x8(%rdi), %rcx
movslq %edx, %rdx
movl %r8d, (%rcx,%rdx,4)
movl 0x10(%rdi), %edx
cmpl $0x2, %edx
jl 0x92bf
movl %edx, %edi
shrl %edi
movslq (%rax,%rdi,4), %r9
movl (%rsi,%r9,4), %r11d
movl %edx, %r8d
movslq (%rax,%r8,4), %r10
cmpl (%rsi,%r10,4), %r11d
jle 0x92bf
movl %r10d, (%rax,%rdi,4)
movl %r9d, (%rax,%r8,4)
movslq (%rax,%rdi,4), %r9
movl %edi, (%rcx,%r9,4)
movslq (%rax,%r8,4), %r8
movl %edx, (%rcx,%r8,4)
cmpl $0x3, %edx
movl %edi, %edx
ja 0x9289
retq
// File: /workspace/github_cpp_makefile_star2_O1/SNUCSE-CTA[P]GI/src/heap.cpp
// Function: Heap::erase(int*, int)
void Heap::erase(int32_t* aValue, int32_t aVertex)
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	int32_t i = locate[aVertex];
	if( i < 0 )
		return;
	
	locate[aVertex] = -1;
	heap[i] = heap[size];
	locate[ heap[i] ] = i;
	--size;
	if( size > 0 )
		minHeapify(aValue, i);
}

// Assembly:
movq 0x8(%rdi), %rax
movslq %edx, %rcx
movslq (%rax,%rcx,4), %rdx
testq %rdx, %rdx
js 0x92fd
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
movq (%rdi), %rcx
movslq 0x10(%rdi), %r8
movslq (%rcx,%r8,4), %r8
movl %r8d, (%rcx,%rdx,4)
movl %edx, (%rax,%r8,4)
movl 0x10(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rdi)
cmpl $0x2, %eax
jl 0x92fd
jmp 0x918e
retq
// File: /workspace/github_cpp_makefile_star2_O1/SNUCSE-CTA[P]GI/src/heap.cpp
// Function: Heap::extractMin(int*)
int32_t Heap::extractMin(int32_t* aValue)
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	if( size < 1 ) {
		return -1;
	}
	
	int32_t min = heap[1];
	locate[min] = -1;
	heap[1] = heap[size];
	locate[ heap[1] ] = 1;
	--size;

	if( size > 0 )
		minHeapify(aValue, 1);
	
	return min;
}

// Assembly:
pushq %rbx
cmpl $0x0, 0x10(%rdi)
jle 0x9343
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movslq 0x4(%rax), %rbx
movl $0xffffffff, (%rcx,%rbx,4) # imm = 0xFFFFFFFF
movslq 0x10(%rdi), %rdx
movslq (%rax,%rdx,4), %rdx
movl %edx, 0x4(%rax)
movl $0x1, (%rcx,%rdx,4)
movl 0x10(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rdi)
cmpl $0x2, %eax
jl 0x9348
movl $0x1, %edx
callq 0x918e
jmp 0x9348
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/SNUCSE-CTA[P]GI/src/refine.cpp
// Function: Refinement::~Refinement()
Refinement::~Refinement()
{
	if (stableColoring != NULL) {
		delete stableColoring;
		stableColoring = NULL;
	}
	clearWorkspace();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x93c9
movq %r14, %rdi
callq 0xb460
movl $0x28, %esi
movq %r14, %rdi
callq 0x2190
movq $0x0, (%rbx)
movq %rbx, %rdi
callq 0x93e2
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x31e1
nop
// File: /workspace/github_cpp_makefile_star2_O1/SNUCSE-CTA[P]GI/src/refine.cpp
// Function: Refinement::clearWorkspace()
void Refinement::clearWorkspace()
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	if (cellStack != NULL) {
		global_memory->returnLLArray(cellStack, n2);
		cellStack = NULL;
	}
	if (neighCount != NULL) {
		global_memory->returnLLArray(neighCount, n2);
		neighCount = NULL;
	}
	if (visitCell != NULL) {
		global_memory->returnLLArray(visitCell, n2);
		visitCell = NULL;
	}
	if (visitNode != NULL) {
		global_memory->returnLLArray(visitNode, n2);
		visitNode = NULL;
	}
	if (numVisitNode != NULL) {
		global_memory->returnLLArray(numVisitNode, n2);
		numVisitNode = NULL;
	}
	if (splitCell != NULL) {
		global_memory->returnLLArray(splitCell, n2);
		splitCell = NULL;
	}
	if (splitCount != NULL) {
		global_memory->returnLLArray(splitCount, n2);
		splitCount = NULL;
	}
	if (splitPos != NULL) {
		global_memory->returnLLArray(splitPos, n2);
		splitPos = NULL;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rsi
testq %rsi, %rsi
je 0x9403
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %edx
callq 0x4cf0
movq $0x0, 0x20(%rbx)
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0x9420
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %edx
callq 0x4cf0
movq $0x0, 0x30(%rbx)
movq 0x38(%rbx), %rsi
testq %rsi, %rsi
je 0x943d
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %edx
callq 0x4cf0
movq $0x0, 0x38(%rbx)
movq 0x40(%rbx), %rsi
testq %rsi, %rsi
je 0x945a
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %edx
callq 0x4cf0
movq $0x0, 0x40(%rbx)
movq 0x48(%rbx), %rsi
testq %rsi, %rsi
je 0x9477
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %edx
callq 0x4cf0
movq $0x0, 0x48(%rbx)
movq 0x50(%rbx), %rsi
testq %rsi, %rsi
je 0x9494
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %edx
callq 0x4cf0
movq $0x0, 0x50(%rbx)
movq 0x58(%rbx), %rsi
testq %rsi, %rsi
je 0x94b1
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %edx
callq 0x4cf0
movq $0x0, 0x58(%rbx)
movq 0x60(%rbx), %rsi
testq %rsi, %rsi
je 0x94ce
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %edx
callq 0x4cf0
movq $0x0, 0x60(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/SNUCSE-CTA[P]GI/src/refine.cpp
// Function: Refinement::run(Graph*, Graph*)
bool Refinement::run(Graph* aG1, Graph* aG2)
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	n = aG1->numNode;
	e = aG1->numEdge;
	n2 = n * 2;
	e2 = e * 2;

	if (stableColoring != NULL) {
		delete stableColoring;
	}
	stableColoring = new Coloring(n2);
	// Allocate workspace variables
	initWorkspace();

	// Initial coloring
	bool ret = colorByDegreeAndLabel(stableColoring, aG1, aG2);
	if (ret) {
		// Process coreness-1 vertices
		numTreeNode = prepCoreOne(stableColoring, aG1, aG2);

		// Refine coloring
		ret = refine(stableColoring, aG1, aG2);
	}

	// Free workspace variables
	clearWorkspace();

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0xc(%rsi), %eax
movl %eax, 0xc(%rdi)
movl 0x10(%rsi), %ecx
movl %ecx, 0x14(%rdi)
addl %eax, %eax
movl %eax, 0x10(%rdi)
addl %ecx, %ecx
movl %ecx, 0x18(%rdi)
movq (%rdi), %r12
testq %r12, %r12
je 0x9514
movq %r12, %rdi
callq 0xb460
movl $0x28, %esi
movq %r12, %rdi
callq 0x2190
movl $0x28, %edi
callq 0x2180
movq %rax, %r12
movl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0xb370
movq %r12, (%rbx)
movq %rbx, %rdi
callq 0x959e
movq (%rbx), %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x9630
movl %eax, %ebp
testb %al, %al
je 0x9572
movq (%rbx), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x981a
movl %eax, 0x8(%rbx)
movq (%rbx), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0xa0bc
movl %eax, %ebp
movq %rbx, %rdi
callq 0x93e2
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x28, %esi
movq %r12, %rdi
callq 0x2190
movq %rbx, %rdi
callq 0x22f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/SNUCSE-CTA[P]GI/src/refine.cpp
// Function: Refinement::initWorkspace()
void Refinement::initWorkspace()
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	clearWorkspace(); //avoid double allocation

	cellStack = global_memory->getLLArray(n2);
	stackSize = 0;
	neighCount = global_memory->getLLArray(n2);
	visitCell = global_memory->getLLArray(n2);
	visitNode = global_memory->getLLArray(n2);
	numVisitNode = global_memory->getLLArray(n2);
	splitCell = global_memory->getLLArray(n2);
	splitCount = global_memory->getLLArray(n2);
	splitPos = global_memory->getLLArray(n2);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x93e2
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4b34
movq %rax, 0x20(%rbx)
movl $0x0, 0x28(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4b34
movq %rax, 0x30(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4b34
movq %rax, 0x38(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4b34
movq %rax, 0x40(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4b34
movq %rax, 0x48(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4b34
movq %rax, 0x50(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4b34
movq %rax, 0x58(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4b34
movq %rax, 0x60(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/SNUCSE-CTA[P]GI/src/refine.cpp
// Function: Refinement::checkColoring(Coloring*)
bool Refinement::checkColoring(Coloring* coloring)
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	for (int32_t i = 0; i < coloring->numNode; i += coloring->cellSize[i]) {
		int32_t acc = 0;
		for (int32_t j = 0; j < coloring->cellSize[i]; ++j) {
			acc += (coloring->perm[i+j] < n) ? 1 : -1;
		}

		if (acc != 0) return false;
	}

	return true;
}

// Assembly:
movl (%rsi), %ecx
testl %ecx, %ecx
setle %al
jle 0xacbd
pushq %r14
pushq %rbx
movq 0x20(%rsi), %rdx
movl 0xc(%rdi), %edi
xorl %r8d, %r8d
movslq %r8d, %r10
movslq (%rdx,%r10,4), %r9
testq %r9, %r9
jle 0xacac
shlq $0x2, %r10
addq 0x10(%rsi), %r10
xorl %r11d, %r11d
xorl %ebx, %ebx
xorl %r14d, %r14d
cmpl %edi, (%r10,%r11,4)
setl %r14b
leal (%rbx,%r14,2), %ebx
decl %ebx
incq %r11
cmpq %r11, %r9
jne 0xac8f
testl %ebx, %ebx
jne 0xacba
addl %r8d, %r9d
movl %r9d, %r8d
cmpl %ecx, %r9d
setge %al
jl 0xac76
popq %rbx
popq %r14
andb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/SNUCSE-CTA[P]GI/src/refine.cpp
// Function: Refinement::selectFromStack(Coloring*)
int32_t Refinement::selectFromStack(Coloring* coloring)
{
	int32_t ret = stackSize - 1;
	int32_t idx = stackSize - 2;
	while (idx >= 0) {
		if (coloring->cellSize[cellStack[idx]] < coloring->cellSize[cellStack[ret]]) {
			ret = idx;
		}

		if (coloring->cellSize[cellStack[ret]] == 2 || idx < stackSize - 13) {
			break;
		}

		--idx;
	}

	return ret;
}

// Assembly:
movl 0x28(%rdi), %ecx
leal -0x1(%rcx), %r9d
cmpl $0x2, %ecx
jl 0xad1a
leal -0x2(%rcx), %r8d
movq 0x20(%rsi), %rdx
movq 0x20(%rdi), %rsi
addl $-0xd, %ecx
movl %r8d, %eax
movslq (%rsi,%rax,4), %rax
movl (%rdx,%rax,4), %edi
movslq %r9d, %rax
movslq (%rsi,%rax,4), %r10
movl %r8d, %eax
cmpl (%rdx,%r10,4), %edi
jl 0xacf8
movl %r9d, %eax
movslq %eax, %rdi
movslq (%rsi,%rdi,4), %rdi
cmpl $0x2, (%rdx,%rdi,4)
je 0xad19
cmpl %ecx, %r8d
jl 0xad19
leal -0x1(%r8), %edi
movl %eax, %r9d
testl %r8d, %r8d
movl %edi, %r8d
jg 0xacdb
retq
movl %r9d, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/SNUCSE-CTA[P]GI/src/refine.cpp
// Function: Refinement::deleteEdge(int, int, Graph*, Graph*)
void Refinement::deleteEdge(int32_t aVertex, int32_t aNumDegOne, Graph* aG1, Graph* aG2)
{
	Graph* g1 = aG1;
	Graph* g2 = aG2;
	int32_t n = g1->numNode;
	int32_t* d1 = g1->d;
	int32_t* d2 = g2->d;

	int32_t du = (aVertex < n) ? d1[aVertex] : d2[aVertex - n];
	if( du < 2 )
		return;

	int32_t i, newDegree, temp, lastInd;
	int32_t* edge = NULL;
	char* one = NULL;

	newDegree = du - aNumDegOne;
	if( aVertex < n ) {
		lastInd = newDegree;
		edge = g1->e[aVertex];
		one = g1->one;
		for(i = 0; i < newDegree; ++i) {
			if( one[edge[i]] ) {
				while( d1[ edge[lastInd] ] == -1 )
					++lastInd;
				temp = edge[i];
				edge[i] = edge[lastInd];
				edge[lastInd] = temp;
			}
		}
		d1[aVertex] = newDegree;
	}
	else {
		lastInd = newDegree;
		edge = g2->e[aVertex - n];
		one = g2->one;
		for(i = 0; i < newDegree; ++i) {
			if( one[edge[i]] ) {
				while( d2[ edge[lastInd] ] == -1 )
					++lastInd;
				temp = edge[i];
				edge[i] = edge[lastInd];
				edge[lastInd] = temp;
			}
		}
		d2[aVertex - n] = newDegree;
	} //if-else (aVertex < n)
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl 0xc(%rcx), %ebp
movq 0x20(%rcx), %r9
movq 0x20(%r8), %r10
movl %esi, %eax
subl %ebp, %eax
movslq %esi, %rbx
leaq (%r9,%rbx,4), %r11
movslq %eax, %r14
leaq (%r10,%r14,4), %rdi
movq %rdi, %rax
cmovlq %r11, %rax
movl (%rax), %eax
cmpl $0x2, %eax
jl 0xadf9
subl %edx, %eax
cmpl %ebp, %esi
jge 0xada9
testl %eax, %eax
jle 0xada4
movq 0x30(%rcx), %rdx
movq 0x38(%rcx), %rcx
movq (%rcx,%rbx,8), %rcx
movl %eax, %esi
xorl %edi, %edi
movl %eax, %r8d
movslq (%rcx,%rdi,4), %r10
cmpb $0x0, (%rdx,%r10)
je 0xad9c
movslq %r8d, %r8
leaq (%rcx,%r8,4), %rbx
decl %r8d
movslq (%rbx), %r14
addq $0x4, %rbx
incl %r8d
cmpl $-0x1, (%r9,%r14,4)
je 0xad83
movl %r14d, (%rcx,%rdi,4)
movl %r10d, -0x4(%rbx)
incq %rdi
cmpq %rsi, %rdi
jne 0xad6e
movq %r11, %rdi
jmp 0xadf7
testl %eax, %eax
jle 0xadf7
movq 0x30(%r8), %rcx
movq 0x38(%r8), %rdx
movq (%rdx,%r14,8), %rdx
movl %eax, %esi
xorl %r8d, %r8d
movl %eax, %r9d
movslq (%rdx,%r8,4), %r11
cmpb $0x0, (%rcx,%r11)
je 0xadef
movslq %r9d, %r9
leaq (%rdx,%r9,4), %rbx
decl %r9d
movslq (%rbx), %r14
addq $0x4, %rbx
incl %r9d
cmpl $-0x1, (%r10,%r14,4)
je 0xadd6
movl %r14d, (%rdx,%r8,4)
movl %r11d, -0x4(%rbx)
incq %r8
cmpq %rsi, %r8
jne 0xadc1
movl %eax, (%rdi)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/SNUCSE-CTA[P]GI/src/coloring.cpp
// Function: Coloring::init(int)
void Coloring::init(int32_t aNumNode)
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	numNode = aNumNode;
	numCell = 1;

	color = new int32_t[numNode];
	perm = new int32_t[numNode];
	inv = new int32_t[numNode];
	cellSize = new int32_t[numNode];

	for (int32_t i = 0; i < numNode; ++i) {
		color[i] = 0;
		perm[i] = inv[i] = i;
		cellSize[i] = 0;
	}
	cellSize[0] = numNode;

	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r12
movl %esi, (%rdi)
movl $0x1, 0x4(%rdi)
movslq %esi, %rax
leaq (,%rax,4), %rcx
testl %eax, %eax
movq $-0x1, %r15
cmovnsq %rcx, %r15
movq %r15, %rdi
callq 0x2030
movq %rax, %r13
movq %rax, 0x8(%r12)
movq %r15, %rdi
callq 0x2030
movq %rax, %rbx
movq %rax, 0x10(%r12)
movq %r15, %rdi
callq 0x2030
movq %rax, %r14
movq %rax, 0x18(%r12)
movq %r15, %rdi
callq 0x2030
movq %rax, 0x20(%r12)
movl (%r12), %ebp
testl %ebp, %ebp
jle 0xb44e
movl (%r12), %ebp
cmpl $0x2, %ebp
movq %r13, %rdi
movl $0x1, %r13d
cmovgel %ebp, %r13d
leaq (,%r13,4), %rdx
movq %rdx, 0x8(%rsp)
xorl %r15d, %r15d
xorl %esi, %esi
movq %rax, %r12
callq 0x20e0
movq %r12, 0x10(%rsp)
movq %r12, %rdi
xorl %esi, %esi
movq 0x8(%rsp), %rdx
callq 0x20e0
movl %r15d, (%r14,%r15,4)
movl %r15d, (%rbx,%r15,4)
incq %r15
cmpq %r15, %r13
jne 0xb439
movq 0x10(%rsp), %rax
movl %ebp, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/SNUCSE-CTA[P]GI/src/coloring.cpp
// Function: Coloring::clear()
void Coloring::clear()
{
	#ifdef DEBUG
	cout << __PRETTY_FUNCTION__ << endl;
	#endif

	if (color != NULL) {
		delete[] color;
		color = NULL;
	}
	if (perm != NULL) {
		delete[] perm;
		perm = NULL;
	}
	if (inv != NULL) {
		delete[] inv;
		inv = NULL;
	}
	if (cellSize != NULL) {
		delete[] cellSize;
		cellSize = NULL;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0xb480
callq 0x21f0
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xb496
callq 0x21f0
movq $0x0, 0x10(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xb4ac
callq 0x21f0
movq $0x0, 0x18(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xb4c2
callq 0x21f0
movq $0x0, 0x20(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/syzcch[P]FEC_C_version/fec_rs.cpp
// Function: main
int main()
{

    const int NUM = 8;
    printf("starting");
//  rscode *rsItem = new rscode();

    //all original data is 8, checksum data is 3, data stripe length is 1024
    rscode *rsItem = new rscode(11,3,1024);
    int *err = new int[NUM];

    // 1 means fault data
    for(int i=0; i<NUM; i++)
    {
        err[i] = 0;
    }

    rsItem->setData();
    rsItem->encoding();
    rsItem->outputData();


    // testing 3 errors, error disk sequence number is 0,1,3
    err[0]=1;
    err[1]=1;
    err[3]=1;
    rsItem->setErrData(err);
    rsItem->decoding();
    rsItem->outputOrigin();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x1d8a(%rip), %rdi      # 0x3004
xorl %eax, %eax
callq 0x1040
movl $0x30, %edi
callq 0x1090
movq %rax, %rbx
movq %rax, %rdi
movl $0xb, %esi
movl $0x3, %edx
movl $0x400, %ecx            # imm = 0x400
callq 0x1328
movl $0x20, %edi
callq 0x1030
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, (%r14)
movl $0x1, 0xc(%r14)
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x20(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x28(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movl $0x30, %esi
movq %rbx, %rdi
callq 0x10a0
movq %r14, %rdi
callq 0x1110
// File: /workspace/github_cpp_makefile_star2_O1/syzcch[P]FEC_C_version/./fec_rs.h
// Function: rscode::rscode(int, int, int)
rscode(int allnum, int rsnum, int dataLength)
    {
        allNum = allnum;
        rsNum = rsnum;
        num = allNum - rsNum;
        stripe_unit_size = dataLength;
        gf_already_setup = 0;

        // use allnum here, rs includes original data and redudant data
        rs = (char **) malloc(sizeof(char *)*allNum);
        for(int i=0; i<allNum; i++)
        {
            rs[i]=(char *) malloc(sizeof(char)*stripe_unit_size);
            memset(rs[i],0,stripe_unit_size);
        }
        inthis = new int[allNum];
        for(int i = 0; i < allNum; i++)
        {
            inthis[i] = 0;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3a24(%rip), %rax      # 0x4d60
movq %rax, (%rdi)
movl %esi, 0x1c(%rdi)
movl %edx, 0x24(%rdi)
movl %esi, %edi
subl %edx, %esi
movl %esi, 0x8(%rbx)
movl %ecx, 0x20(%rbx)
movl $0x0, 0x18(%rbx)
shlq $0x3, %rdi
callq 0x10d0
movq %rax, 0x10(%rbx)
movl 0x1c(%rbx), %eax
testl %eax, %eax
je 0x139e
xorl %r15d, %r15d
movslq 0x20(%rbx), %r14
movq %r14, %rdi
callq 0x10d0
movq 0x10(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x1050
incq %r15
movl 0x1c(%rbx), %eax
cmpq %rax, %r15
jb 0x136d
movl %eax, %edi
shlq $0x2, %rdi
callq 0x1030
movq %rax, 0x28(%rbx)
cmpl $0x0, 0x1c(%rbx)
je 0x13d4
movl 0x1c(%rbx), %edx
cmpl $0x1, %edx
adcl $0x0, %edx
shlq $0x2, %rdx
movq %rax, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1050
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/syzcch[P]FEC_C_version/./fec_rs.h
// Function: rscode::outputOrigin()
void outputOrigin()
    {

        printf("After decoding:");
        for(int i=0; i < num; i++)
        {
            printf("data:%d:  ",i);
            printf(rs[i]);
            printf("\n");
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1753(%rip), %rdi      # 0x31f5
xorl %eax, %eax
callq 0x1040
cmpl $0x0, 0x8(%rbx)
je 0x1aea
leaq 0x174f(%rip), %r14      # 0x3205
xorl %r15d, %r15d
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x1040
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rdi
xorl %eax, %eax
callq 0x1040
movl $0xa, %edi
callq 0x10e0
incq %r15
movl 0x8(%rbx), %eax
cmpq %rax, %r15
jb 0x1ab9
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/syzcch[P]FEC_C_version/./fec_rs.h
// Function: rscode::outputData()
void outputData()
    {

        printf("The res:");
        for(int i = num; i < allNum; i++)
        {
            printf(rs[i]);
            printf("\n");
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x1709(%rip), %rdi      # 0x3210
xorl %eax, %eax
callq 0x1040
movslq 0x8(%rbx), %r14
cmpl 0x1c(%rbx), %r14d
jae 0x1b3a
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
xorl %eax, %eax
callq 0x1040
movl $0xa, %edi
callq 0x10e0
incq %r14
cmpl %r14d, 0x1c(%rbx)
ja 0x1b18
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/syzcch[P]FEC_C_version/./fec_rs.h
// Function: rscode::gf_single_divide(int, int)
int gf_single_divide(int a, int b)
    {
        int sum_j;
        gf_modar_setup();
        if (b == 0)
            return -1;
        if (a == 0)
            return 0;
        sum_j = B_TO_J[a] - B_TO_J[b];

        return (int) J_TO_B[sum_j];
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %r14d
callq 0x20fa
testl %ebx, %ebx
je 0x1ea0
testl %r14d, %r14d
je 0x1ea7
movslq %r14d, %rax
leaq 0x324a(%rip), %rcx      # 0x50d0
movslq (%rcx,%rax,4), %rax
movslq %ebx, %rdx
movslq (%rcx,%rdx,4), %rcx
subq %rcx, %rax
movq 0x322d(%rip), %rcx      # 0x50c8
movl (%rcx,%rax,4), %eax
jmp 0x1ea9
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1ea9
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/syzcch[P]FEC_C_version/./fec_rs.h
// Function: rscode::gf_mult_region(void*, int, int)
void gf_mult_region(void *region, int size, int factor)
    {
        int sum_j;
        int flog;
        unsigned char *r;
        int sz;
        int r_cache;

        gf_modar_setup();

        if (factor == 1)
            return;
        if (factor == 0)
        {
            (void) memset(region, 0, size);
            return;
        }

        flog = B_TO_J[factor];
        sz = size / sizeof(unsigned char);
        r = ((unsigned char *) region) + sz;

        while (r != region)
        {
            r--;
            r_cache = *r;
            if (r_cache != 0)
            {
                sum_j = (int) (B_TO_J[r_cache] + flog);

                *r = J_TO_B[sum_j];
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %r14d
movq %rsi, %rbx
callq 0x20fa
cmpl $0x1, %r15d
je 0x1f24
testl %r15d, %r15d
jne 0x1ee8
movslq %r14d, %rdx
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1050
testl %r14d, %r14d
je 0x1f24
movslq %r15d, %rcx
leaq 0x31d9(%rip), %rax      # 0x50d0
movslq (%rax,%rcx,4), %rcx
movslq %r14d, %rdx
movq 0x31c3(%rip), %rsi      # 0x50c8
movzbl -0x1(%rbx,%rdx), %edi
testq %rdi, %rdi
je 0x1f1f
movslq (%rax,%rdi,4), %rdi
addq %rcx, %rdi
movb (%rsi,%rdi,4), %dil
movb %dil, -0x1(%rbx,%rdx)
decq %rdx
jne 0x1f05
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/syzcch[P]FEC_C_version/./fec_rs.h
// Function: rscode::gf_add_parity(void*, void*, int)
void gf_add_parity(void *to_add, void *to_modify, int size)
    {
        unsigned long ta, tm;
        unsigned char *cta, *ctm;
        int sml;

        if (size <= 0)
            return;

        ta = (unsigned long) to_add % sizeof(unsigned long);
        tm = (unsigned long) to_modify% sizeof(unsigned long);
        if (ta != tm)
        {
            printf("Error: gf_add_parity: to_add and to_modify are not aligned\n");
        }

        cta = (unsigned char *) to_add;
        ctm = (unsigned char *) to_modify;

        /* Align to long boundary */
        if (ta != 0)
        {
            while (ta != sizeof(unsigned long) && size > 0)
            {
                *ctm = *ctm ^ *cta;
                ctm++;
                cta++;
                size--;
                ta++;
            }
        }

        if (size == 0)
            return;

        /* Call gf_fast_add_parity to do it fast */

        sml = size / sizeof(unsigned long);

        if (sml > 0)
        {
            gf_fast_add_parity(cta, ctm, size);
        }
        size -= sml * sizeof(unsigned long);

        if (size == 0)
        {
            return;
        }

        /* Do the last few bytes if they are unalighed */
        cta += sml * sizeof(unsigned long);
        ctm += sml * sizeof(unsigned long);

        while (size > 0)
        {
            *ctm = *ctm ^ *cta;
            ctm++;
            cta++;
            size--;
        }
    }

// Assembly:
testl %ecx, %ecx
jle 0x1fe3
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r15d
movq %rdx, %rbx
movq %rsi, %r14
movl %r14d, %r12d
andl $0x7, %r12d
movl %ebx, %eax
andl $0x7, %eax
cmpq %rax, %r12
je 0x1f69
leaq 0x1355(%rip), %rdi      # 0x32b9
callq 0x1100
testq %r12, %r12
je 0x1f94
addq $-0x7, %r12
movb (%r14), %al
xorb %al, (%rbx)
incq %rbx
incq %r14
leal -0x1(%r15), %eax
testq %r12, %r12
je 0x1f97
incq %r12
cmpl $0x1, %r15d
movl %eax, %r15d
jg 0x1f72
jmp 0x1f97
movl %r15d, %eax
testl %eax, %eax
je 0x1fdb
cmpl $0x8, %eax
jb 0x1fbc
movl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
movq -0x8(%r14,%rcx), %rdx
xorq %rdx, -0x8(%rbx,%rcx)
addq $-0x8, %rcx
jne 0x1fac
movl %eax, %ecx
andl $0x7, %ecx
je 0x1fdb
andl $-0x8, %eax
movl %eax, %eax
incl %ecx
movb (%r14,%rax), %dl
xorb %dl, (%rbx,%rax)
decl %ecx
incq %rax
cmpl $0x1, %ecx
jg 0x1fca
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/syzcch[P]FEC_C_version/./fec_rs.h
// Function: rscode::gf_make_vandermonde(int, int)
int *gf_make_vandermonde(int rows, int cols)
    {
        int *vdm, i, j, k;
        void gf_modar_setup();

        if (rows >= 255 || cols >= 255)
        {
            printf("Error: gf_make_vandermonde: %d + %d >= %d\n");
        }

        vdm = (int *) malloc(sizeof(int) * rows * cols);
        if (vdm == NULL)
        {
            printf("Malloc: Vandermonde matrix");
        }
        for (i = 0; i < rows; i++)
        {
            k = 1;
            for (j = 0; j < cols; j++)
            {
                vdm[i*cols+j] = k;
                k = gf_single_multiply(k, i);
            }
        }
        return vdm;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %r12d
movq %rdi, %r14
movl $0xff, %eax
cmpl %eax, %esi
setl %cl
movl %edx, -0x2c(%rbp)
cmpl %eax, %edx
setl %al
testb %al, %cl
jne 0x201f
leaq 0x106d(%rip), %rdi      # 0x3085
xorl %eax, %eax
callq 0x1040
movslq %r12d, %rax
movslq -0x2c(%rbp), %rdi
imulq %rax, %rdi
shlq $0x2, %rdi
callq 0x10d0
movq %rax, -0x38(%rbp)
testq %rax, %rax
jne 0x204a
leaq 0x106d(%rip), %rdi      # 0x30b0
xorl %eax, %eax
callq 0x1040
testl %r12d, %r12d
jle 0x20a0
movl -0x2c(%rbp), %r13d
movl %r12d, %eax
movq %rax, -0x48(%rbp)
leaq (,%r13,4), %rax
movq %rax, -0x40(%rbp)
xorl %r12d, %r12d
movq -0x38(%rbp), %r15
cmpl $0x0, -0x2c(%rbp)
jle 0x2093
movl $0x1, %eax
xorl %ebx, %ebx
movl %eax, (%r15,%rbx,4)
movq %r14, %rdi
movl %eax, %esi
movl %r12d, %edx
callq 0x20b4
incq %rbx
cmpq %rbx, %r13
jne 0x207a
incq %r12
addq -0x40(%rbp), %r15
cmpq -0x48(%rbp), %r12
jne 0x206d
movq -0x38(%rbp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/syzcch[P]FEC_C_version/./fec_rs.h
// Function: rscode::gf_single_multiply(int, int)
int gf_single_multiply(int xxx, int yyy)
    {
        unsigned int sum_j;
        unsigned char zzz;

        gf_modar_setup();
        if (xxx == 0 || yyy == 0)
        {
            zzz = 0;
        }
        else
        {
            sum_j = (int) (B_TO_J[xxx] + (int) B_TO_J[yyy]);
            zzz = J_TO_B[sum_j];
        }
        return zzz;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %r14d
callq 0x20fa
testl %r14d, %r14d
sete %cl
testl %ebx, %ebx
sete %dl
xorl %eax, %eax
orb %cl, %dl
jne 0x20f4
movslq %r14d, %rax
leaq 0x2ff0(%rip), %rcx      # 0x50d0
movslq %ebx, %rdx
movl (%rcx,%rdx,4), %edx
addl (%rcx,%rax,4), %edx
movq 0x2fd8(%rip), %rax      # 0x50c8
movzbl (%rax,%rdx,4), %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/syzcch[P]FEC_C_version/./fec_rs.h
// Function: rscode::gf_modar_setup()
void gf_modar_setup()
    {
        int j, b, t;
        if (gf_already_setup) return;
        B_TO_J = (int *) malloc(sizeof(int)*256);

        if (B_TO_J == NULL)
        {
            printf("gf_modar_setup, malloc B_TO_J");
        }
        /* When the word size is 8 bits, make three copies of the table so that
          you don't have to do the extra addition or subtraction in the
          multiplication/division routines */

        J_TO_B = (int *) malloc(sizeof(int)*256*3);
        if (J_TO_B == NULL)
        {
            printf("gf_modar_setup, malloc J_TO_B");
        }
        for (j = 0; j < 256; j++)
        {
            B_TO_J[j] = 255;
            J_TO_B[j] = 0;
        }

        b = 1;
        for (j = 0; j < 255; j++)
        {
            if (B_TO_J[b] != 255)
            {
                printf( "Error: j=%d, b=%d, B->J[b]=%d, J->B[j]=%d (0%o)\n");
            }
            B_TO_J[b] = j;
            J_TO_B[j] = b;
            b = b << 1;
            if (b & 256)
            {
                b = (b ^ prim_poly_8) & 255;
            }
        }

        for (j = 0; j < 255; j++)
        {
            J_TO_B[j+255] = J_TO_B[j];
            J_TO_B[j+2*255] = J_TO_B[j];
        }
        J_TO_B += 255;


        gf_already_setup = 1;

    }

// Assembly:
cmpl $0x0, 0x18(%rdi)
je 0x2101
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xc00, %edi            # imm = 0xC00
callq 0x10d0
movq %rax, 0x2fa5(%rip)      # 0x50c8
testq %rax, %rax
jne 0x2136
leaq 0xf9c(%rip), %rdi       # 0x30cb
xorl %eax, %eax
callq 0x1040
movq 0x2f8b(%rip), %rdi      # 0x50c8
xorl %r14d, %r14d
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x1050
leaq 0x2f7d(%rip), %r15      # 0x50d0
movl $0xff, (%r14,%r15)
addq $0x4, %r14
cmpq $0x400, %r14            # imm = 0x400
jne 0x2153
movl $0x1, %eax
leaq 0xf75(%rip), %r14       # 0x30e9
xorl %r12d, %r12d
movslq %eax, %r13
cmpl $0xff, (%r15,%r13,4)
je 0x218e
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
movl %r12d, (%r15,%r13,4)
movq 0x2f2f(%rip), %rax      # 0x50c8
movl %r13d, (%rax,%r12,4)
leal (,%r13,2), %ecx
movzbl %cl, %eax
xorl $0x1d, %eax
testb %r13b, %r13b
cmovnsl %ecx, %eax
incq %r12
cmpq $0xff, %r12
jne 0x2177
movq $-0xff, %rax
movq 0x2efd(%rip), %rcx      # 0x50c8
movl 0x3fc(%rcx,%rax,4), %edx
movl %edx, 0x7f8(%rcx,%rax,4)
movl %edx, 0xbf4(%rcx,%rax,4)
incq %rax
jne 0x21cb
addq $0x3fc, 0x2ed8(%rip) # imm = 0x3FC
movl $0x1, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH17_SpecializedLibraryFacilities/examples/seed.cc
// Function: main
int main()
{
	default_random_engine e1;             // uses the default seed
	default_random_engine e2(2147483646); // use the given seed value

	// e3 and e4 will generate the same sequence 
	// because they use the same seed
	default_random_engine e3;        // uses the default seed value
	e3.seed(32767);                  // call seed to set a new seed value
	default_random_engine e4(32767); // set the seed value to 32767
	for (size_t i = 0; i != 100; ++i) {
		if (e1() == e2())
			cout << "unseeded match at iteration: " << i << endl;
		if (e3() != e4())
			cout << "seeded differs at iteration: " << i << endl;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x1, %r12d
movl $0x7ffffffe, %r14d      # imm = 0x7FFFFFFE
movl $0x7fff, %r15d          # imm = 0x7FFF
xorl %r13d, %r13d
movabsq $0x200000005, %rdi      # imm = 0x200000005
movl $0x7fff, %ebx           # imm = 0x7FFF
imulq $0x41a7, %r12, %rcx     # imm = 0x41A7
movq %rcx, %rax
mulq %rdi
movq %rcx, %r12
subq %rdx, %r12
shrq %r12
addq %rdx, %r12
shrq $0x1e, %r12
movq %r12, %rax
shlq $0x1f, %rax
subq %rax, %r12
imulq $0x41a7, %r14, %rsi     # imm = 0x41A7
movq %rsi, %rax
mulq %rdi
addq %rcx, %r12
movq %rsi, %r14
subq %rdx, %r14
shrq %r14
addq %rdx, %r14
shrq $0x1e, %r14
movq %r14, %rax
shlq $0x1f, %rax
subq %rax, %r14
addq %rsi, %r14
cmpq %r14, %r12
movq %r13, -0x30(%rbp)
jne 0x12ca
movl $0x1d, %edx
movq 0x2d61(%rip), %rdi      # 0x3fd8
leaq 0xd86(%rip), %rsi       # 0x2004
callq 0x1080
movq 0x2d4e(%rip), %rdi      # 0x3fd8
movq %r13, %rsi
callq 0x1040
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x1070
movsbl %al, %esi
movq %r13, %rdi
movq -0x30(%rbp), %r13
callq 0x1030
movq %rax, %rdi
callq 0x1050
movabsq $0x200000005, %rdi      # imm = 0x200000005
imulq $0x41a7, %rbx, %rcx     # imm = 0x41A7
movq %rcx, %rax
mulq %rdi
movq %rcx, %rbx
subq %rdx, %rbx
shrq %rbx
addq %rdx, %rbx
shrq $0x1e, %rbx
movq %rbx, %rax
shlq $0x1f, %rax
subq %rax, %rbx
imulq $0x41a7, %r15, %rsi     # imm = 0x41A7
movq %rsi, %rax
mulq %rdi
addq %rcx, %rbx
movq %rsi, %r15
subq %rdx, %r15
shrq %r15
addq %rdx, %r15
shrq $0x1e, %r15
movq %r15, %rax
shlq $0x1f, %rax
subq %rax, %r15
addq %rsi, %r15
cmpq %r15, %rbx
je 0x1382
movl $0x1d, %edx
movq 0x2ca9(%rip), %rdi      # 0x3fd8
leaq 0xcec(%rip), %rsi       # 0x2022
callq 0x1080
movq 0x2c96(%rip), %rdi      # 0x3fd8
movq %r13, %rsi
callq 0x1040
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x1070
movsbl %al, %esi
movq %r13, %rdi
movq -0x30(%rbp), %r13
callq 0x1030
movq %rax, %rdi
callq 0x1050
movabsq $0x200000005, %rdi      # imm = 0x200000005
incq %r13
cmpq $0x64, %r13
jne 0x120e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sbingner[P]kerneldec/kerneldec.cpp
// Function: read_asn1len(unsigned char)
uint64_t read_asn1len(uint8_t len)
{
    uint8_t buf[8];
    uint64_t full_len = 0;
    if ((len & 0x80) != 0x80) 
        return len;

    int size = len&0x7F;
    if (size > 8) {
        fprintf(stderr, "Sorry, no support for kernel this large or not a kernel\n");
        exit(1);
    }
    size_t nr = fread(buf, 1, size, _input);
    if (nr != size) {
        perror("read");
        exit(1);
    }
    for (int i=0; i<size; i++) {
        full_len = full_len<<8 | buf[i];
    }
    return le64toh(full_len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %r14d
testb %r14b, %r14b
js 0x35c5
movzbl %r14b, %eax
jmp 0x3611
andb $0x7f, %r14b
cmpb $0x9, %r14b
jae 0x361a
movzbl %r14b, %ebx
movq 0xac0e(%rip), %rcx      # 0xe1e8
leaq -0x18(%rbp), %rdi
movl $0x1, %esi
movq %rbx, %rdx
callq 0x3130
cmpq %rbx, %rax
jne 0x361f
testb %r14b, %r14b
je 0x360f
xorl %ecx, %ecx
xorl %eax, %eax
shlq $0x8, %rax
movzbl -0x18(%rbp,%rcx), %edx
orq %rdx, %rax
incq %rcx
cmpq %rcx, %rbx
jne 0x35f9
jmp 0x3611
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x31d8
callq 0x31c0
// File: /workspace/github_cpp_makefile_star2_O1/sbingner[P]kerneldec/kerneldec.cpp
// Function: read_asn1str()
char *read_asn1str() {
    uint8_t buf[2];
    read_asn1hdr(buf);
    if (*buf != 0x16) {
        fprintf(stderr, "Invalid input - not string (0x%02x)\n", *buf);
        exit(1);
    }

    uint64_t len = read_asn1len(buf[1]);

    char *str = (char*)calloc(len+1, 1);
    if (fread(str, 1, len, _input) != len) {
        perror("read");
        exit(1);
    }
    if (g_debug) fprintf(stderr, "read str \"%s\"\n", str);
    return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq -0x12(%rbp), %rbx
movq %rbx, %rdi
callq 0x3624
movb (%rbx), %al
cmpb $0x16, %al
jne 0x36d6
movzbl -0x11(%rbp), %edi
callq 0x35ac
movq %rax, %r14
leaq 0x1(%rax), %rdi
movl $0x1, %esi
callq 0x3070
movq %rax, %rbx
movq 0xab5c(%rip), %rcx      # 0xe1e8
movl $0x1, %esi
movq %rax, %rdi
movq %r14, %rdx
callq 0x3130
cmpq %r14, %rax
jne 0x36de
leaq 0xab50(%rip), %rax      # 0xe1f8
cmpl $0x0, (%rax)
jne 0x36b9
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0xa918(%rip), %rax      # 0xdfd8
movq (%rax), %rdi
leaq 0x59a5(%rip), %rsi      # 0x906f
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3120
jmp 0x36ad
movzbl %al, %edi
callq 0x3218
callq 0x3240
// File: /workspace/github_cpp_makefile_star2_O1/sbingner[P]kerneldec/lzssdec.cpp
// Function: lzssdecompress::lzssdecompress()
lzssdecompress::lzssdecompress()
{
    _maxmatch= 18;  // 4 bit size + threshold 
    _dictsize= 4096; // 12 bit size
    _copythreshold= 3; // 0 == copy 3 bytes
    _dict= new uint8_t[_dictsize+_maxmatch-1];

    reset();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movabsq $0x1200001000, %rax     # imm = 0x1200001000
movq %rax, 0x40(%rdi)
movl $0x3, 0x48(%rdi)
movl $0x1011, %edi           # imm = 0x1011
callq 0x3030
movq %rax, 0x38(%rbx)
movl $0x1, (%rbx)
xorl %r14d, %r14d
movb %r14b, 0x4(%rbx)
movl $0x0, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movl $0x1011, %edx           # imm = 0x1011
movq %rax, %rdi
movl $0x20, %esi
callq 0x3050
movl $0xfee, 0x4c(%rbx)      # imm = 0xFEE
movb %r14b, 0x30(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/sbingner[P]kerneldec/lzssdec.cpp
// Function: lzssdecompress::reset()
void lzssdecompress::reset()
{
    _state=EXPECTINGFLAG;
    _flags= 0; _bitnr= 0;
    _src=_srcend=_dst=_dstend=0;
    memset(_dict, ' ', _dictsize+_maxmatch-1);
    _dictptr= _dictsize-_maxmatch;
    _inputoffset= 0;
    _outputoffset= 0;
    _firstbyte= 0;
    _copyptr= 0;
    _copycount= 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, (%rdi)
xorl %r14d, %r14d
movb %r14b, 0x4(%rdi)
movl $0x0, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
movq 0x38(%rdi), %rdi
movl 0x40(%rbx), %eax
movl 0x44(%rbx), %ecx
addl %ecx, %eax
decl %eax
movslq %eax, %rdx
movl $0x20, %esi
callq 0x3050
movl 0x40(%rbx), %eax
subl 0x44(%rbx), %eax
movl %eax, 0x4c(%rbx)
movb %r14b, 0x30(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/sbingner[P]kerneldec/lzssdec.cpp
// Function: lzssdecompress::copyfromdict()
void lzssdecompress::copyfromdict()
{
    while (_dst<_dstend && _copycount)
    {
        addtodict(*_dst++ = _dict[_copyptr++]);
        _outputoffset++;
        _copycount--;
        _copyptr= _copyptr&(_dictsize-1);
    }
    if (_copycount==0)
        nextflagbit();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x20(%rdi), %rax
cmpq 0x28(%rdi), %rax
jae 0x41c1
cmpl $0x0, 0x54(%rdi)
je 0x41c1
movq 0x38(%rdi), %rcx
movslq 0x50(%rdi), %rdx
leal 0x1(%rdx), %esi
movl %esi, 0x50(%rdi)
movb (%rcx,%rdx), %cl
leaq 0x1(%rax), %rdx
movq %rdx, 0x20(%rdi)
movb %cl, (%rax)
movq 0x38(%rdi), %rax
movslq 0x4c(%rdi), %rdx
leal 0x1(%rdx), %esi
movl %esi, 0x4c(%rdi)
movb %cl, (%rax,%rdx)
movl 0x40(%rdi), %eax
decl %eax
andl %eax, 0x4c(%rdi)
incl 0x5c(%rdi)
decl 0x54(%rdi)
andl %eax, 0x50(%rdi)
jmp 0x4172
cmpl $0x0, 0x54(%rdi)
jne 0x41de
movl 0x8(%rdi), %eax
incl %eax
movl %eax, 0x8(%rdi)
shrb 0x4(%rdi)
xorl %ecx, %ecx
cmpl $0x8, %eax
setne %cl
incl %ecx
movl %ecx, (%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sbingner[P]kerneldec/lzssdec.cpp
// Function: lzssdecompress::flush(unsigned char*, unsigned int, unsigned int*)
void lzssdecompress::flush(uint8_t *dst, uint32_t dstlen, uint32_t *pdstused)
{
    if (g_debug) fprintf(stderr, "flash before state= %d, copy: 0x%x, 0x%x\n", _state, _copyptr, _copycount);
    _src= _srcend= NULL;
    _dst= dst;  _dstend= dst+dstlen;

    if (_state==COPYFROMDICT)
        copyfromdict();

    if (pdstused) *pdstused= _dst-dst;
    if (g_debug) fprintf(stderr, "flash after state= %d, copy: 0x%x, 0x%x\n", _state, _copyptr, _copycount);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x0, 0x9ffa(%rip)      # 0xe1f8
jne 0x4242
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq %r15, 0x20(%rbx)
movl %r12d, %eax
addq %r15, %rax
movq %rax, 0x28(%rbx)
cmpl $0x0, (%rbx)
jne 0x4222
movq %rbx, %rdi
callq 0x416e
testq %r14, %r14
je 0x4230
movl 0x20(%rbx), %eax
subl %r15d, %eax
movl %eax, (%r14)
cmpl $0x0, 0x9fc1(%rip)      # 0xe1f8
jne 0x424c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x33d7
jmp 0x4200
movq %rbx, %rdi
callq 0x3400
jmp 0x4239
nop
// File: /workspace/github_cpp_makefile_star2_O1/ricbit[P]dlx/cover_nospacer.cc
// Function: ExactCover::solve(int)
void solve(int level) {
    if (header[0].rlink == 0) {
      count++;
      return;
    }
    int item = best_item();
    cover(item);
    solution[level].option = nodes[item].dlink;
    for (auto& option = solution[level].option; option != item; option = nodes[option].dlink) {
      try_option(option, solution[level]);
      solve(level + 1);
      rewind_option(option, solution[level]);
    }
    uncover(item);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
cmpl $0x0, 0x4(%rax)
je 0x3916
movl %esi, %r14d
movq %rbx, %rdi
callq 0x3926
movl %eax, %ebp
movq %rbx, %rdi
movl %eax, %esi
callq 0x3968
movslq %ebp, %rdi
leaq (%rdi,%rdi,2), %rsi
movslq %r14d, %rax
movq 0x18(%rbx), %r8
movq 0x38(%rbx), %rcx
leaq (%rax,%rax,2), %rdx
movl 0x8(%r8,%rsi,4), %esi
movl %esi, (%rcx,%rdx,4)
cmpl %edi, %esi
je 0x3904
leaq (%rcx,%rdx,4), %r15
leal 0x1(%rax), %r14d
shlq $0x2, %rax
leaq (%rax,%rax,2), %r12
movq 0x38(%rbx), %rcx
addq %r12, %rcx
movq %rbx, %rdi
movq %rbx, %rdx
movq %rcx, %r8
callq 0x3ace
movq %rbx, %rdi
movl %r14d, %esi
callq 0x3858
movl (%r15), %esi
movq 0x38(%rbx), %rdx
addq %r12, %rdx
movq %rbx, %rdi
movq %rbx, %rcx
callq 0x3b90
movslq (%r15), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movl 0x8(%rcx,%rax,4), %esi
movl %esi, (%r15)
cmpl %ebp, %esi
jne 0x38b9
movq %rbx, %rdi
movl %ebp, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x39ca
incq 0x90(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/bkthomps-hashmap/test.c
// Function: test_int
uint32_t test_int(uint32_t n, uint32_t x0)
{
	uint32_t i, x, z = 0;
	unordered_map h;
	h = unordered_map_init(sizeof(uint32_t), sizeof(uint32_t), hash_int, compare_int);
	for (i = 0, x = x0; i < n; ++i) {
		uint32_t key, v;
		x = hash32(x);
		key = get_key(n, x);
		if (!unordered_map_get(&v, h, &key)) {
			v = 1;
			unordered_map_put(h, &key, &v);
		} else {
			++v;
			unordered_map_put(h, &key, &v);
		}
		z += v;
	}
	fprintf(stderr, "# unique keys: %d; checksum: %u\n", unordered_map_size(h), z);
	x = unordered_map_size(h);
	unordered_map_destroy(h);
	return x;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r15d
movl %edi, %ebp
leaq 0x28e(%rip), %rdx       # 0x1673
leaq 0x28a(%rip), %rcx       # 0x1676
pushq $0x4
popq %rdi
movq %rdi, %rsi
callq 0x167c
movq %rax, %rbx
xorl %r14d, %r14d
testl %ebp, %ebp
je 0x14bc
movl %ebp, %eax
shrl $0x2, %eax
movl %eax, 0x10(%rsp)
xorl %r14d, %r14d
leaq 0xc(%rsp), %r12
leaq 0x14(%rsp), %r13
movl %r15d, %eax
shll $0xf, %eax
notl %eax
addl %r15d, %eax
movl %eax, %ecx
shrl $0xa, %ecx
xorl %eax, %ecx
leal (%rcx,%rcx,8), %eax
movl %eax, %ecx
shrl $0x6, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0xb, %eax
notl %eax
addl %ecx, %eax
movl %eax, %r15d
shrl $0x10, %r15d
xorl %eax, %r15d
movl %r15d, %eax
xorl %edx, %edx
divl 0x10(%rsp)
movl %edx, %eax
shll $0xf, %eax
notl %eax
addl %edx, %eax
movl %eax, %ecx
shrl $0xa, %ecx
xorl %eax, %ecx
leal (%rcx,%rcx,8), %eax
movl %eax, %ecx
shrl $0x6, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0xb, %eax
notl %eax
addl %ecx, %eax
movl %eax, %ecx
shrl $0x10, %ecx
xorl %eax, %ecx
movl %ecx, 0x14(%rsp)
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x1a0a
movl 0xc(%rsp), %ecx
incl %ecx
testb %al, %al
pushq $0x1
popq %rax
cmovel %eax, %ecx
movl %ecx, 0xc(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x17b9
addl 0xc(%rsp), %r14d
decl %ebp
jne 0x141b
movq 0x2b35(%rip), %rax      # 0x3ff8
movq (%rax), %r15
movq %rbx, %rdi
callq 0x17ad
leaq 0xba0(%rip), %rsi       # 0x2075
movq %r15, %rdi
movl %eax, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x17ad
movl %eax, %ebp
movq %rbx, %rdi
callq 0x1c4c
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/bkthomps-hashmap/unordered_map.c
// Function: unordered_map_init
unordered_map unordered_map_init(const size_t key_size,
                                 const size_t value_size,
                                 unsigned long (*hash)(const void *const),
                                 int (*comparator)(const void *const,
                                                   const void *const))
{
    struct _unordered_map *const init = malloc(sizeof(struct _unordered_map));
    if (!init) {
        return NULL;
    }
    init->key_size = key_size;
    init->value_size = value_size;
    init->hash = hash;
    init->comparator = comparator;
    init->size = 0;
    init->capacity = STARTING_BUCKETS;
    init->buckets = calloc(STARTING_BUCKETS, sizeof(struct node *));
    if (!init->buckets) {
        free(init);
        return NULL;
    }
    return init;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl $0x30, %edi
callq 0x1080
testq %rax, %rax
je 0x16e0
movq %rax, %rbx
movq %r13, (%rax)
movq %r12, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
movabsq $0x800000000, %rax      # imm = 0x800000000
movq %rax, 0x20(%rbx)
movl $0x8, %edi
movl $0x8, %esi
callq 0x1050
movq %rax, 0x28(%rbx)
testq %rax, %rax
jne 0x16e2
movq %rbx, %rdi
callq 0x1030
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/bkthomps-hashmap/unordered_map.c
// Function: unordered_map_rehash
int unordered_map_rehash(unordered_map me)
{
    struct node **old_buckets = me->buckets;
    me->buckets = calloc((size_t) me->capacity, sizeof(struct node *));
    if (!me->buckets) {
        me->buckets = old_buckets;
        return -ENOMEM;
    }
    for (int i = 0; i < me->capacity; i++) {
        struct node *traverse = old_buckets[i];
        while (traverse) {
            struct node *const backup = traverse->next;
            traverse->hash = me->hash(traverse->key);
            unordered_map_add_item(me, traverse);
            traverse = backup;
        }
    }
    free(old_buckets);
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
movq 0x28(%rdi), %rbx
movslq 0x24(%rdi), %rdi
movl $0x8, %esi
callq 0x1050
movq %rax, 0x28(%r14)
testq %rax, %rax
je 0x179a
cmpl $0x0, 0x24(%r14)
jle 0x178e
xorl %r15d, %r15d
movq (%rbx,%r15,8), %r12
testq %r12, %r12
je 0x1782
movq (%r12), %rdi
movq 0x18(%r12), %r13
callq *0x10(%r14)
movq %rax, 0x10(%r12)
movslq 0x24(%r14), %rcx
xorl %edx, %edx
divq %rcx
movq $0x0, 0x18(%r12)
movq 0x28(%r14), %rax
movslq %edx, %rdx
movq (%rax,%rdx,8), %rcx
testq %rcx, %rcx
je 0x1773
movq %rcx, %rax
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
jne 0x1761
addq $0x18, %rax
jmp 0x1777
leaq (%rax,%rdx,8), %rax
movq %r12, (%rax)
movq %r13, %r12
testq %r13, %r13
jne 0x172d
incq %r15
movslq 0x24(%r14), %rax
cmpq %rax, %r15
jl 0x1724
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
jmp 0x17a3
movq %rbx, 0x28(%r14)
movl $0xfffffff4, %eax       # imm = 0xFFFFFFF4
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq