LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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), %ebp
movl %ebp, 0xc(%rdi)
movl 0x10(%rsi), %eax
movl %eax, 0x14(%rdi)
addl %ebp, %ebp
movl %ebp, 0x10(%rdi)
addl %eax, %eax
movl %eax, 0x18(%rdi)
movq (%rdi), %r12
testq %r12, %r12
je 0x9423
movq %r12, %rdi
callq 0xb368
movl $0x28, %esi
movq %r12, %rdi
callq 0x2190
movl 0x10(%rbx), %ebp
movl $0x28, %edi
callq 0x2180
movq %rax, %r12
movq %rax, %rdi
movl %ebp, %esi
callq 0xb290
movq %r12, (%rbx)
movq %rbx, %rdi
callq 0x94ae
movq (%rbx), %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x9540
testb %al, %al
je 0x9480
movq (%rbx), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x9762
movl %eax, 0x8(%rbx)
movq (%rbx), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0xa06c
movl %eax, %ebp
jmp 0x9482
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x92ee
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_O3/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 0x92ee
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4aba
movq %rax, 0x20(%rbx)
movl $0x0, 0x28(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4aba
movq %rax, 0x30(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4aba
movq %rax, 0x38(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4aba
movq %rax, 0x40(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4aba
movq %rax, 0x48(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4aba
movq %rax, 0x50(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4aba
movq %rax, 0x58(%rbx)
movq 0x68(%rbx), %rdi
movl 0x10(%rbx), %esi
callq 0x4aba
movq %rax, 0x60(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movb $0x1, %al
testl %ecx, %ecx
jle 0xabef
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 0xabdd
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 0xabc0
testl %ebx, %ebx
jne 0xabea
addl %r8d, %r9d
movl %r9d, %r8d
cmpl %ecx, %r9d
jl 0xaba7
jmp 0xabec
xorl %eax, %eax
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xac4c
leal -0x2(%rcx), %r8d
movq 0x20(%rsi), %rdx
movq 0x20(%rdi), %rsi
addl $-0xd, %ecx
movl %r9d, %eax
movslq (%rsi,%rax,4), %rax
movl (%rdx,%rax,4), %edi
movl %r8d, %eax
movslq (%rsi,%rax,4), %r10
movl %r8d, %eax
cmpl %edi, (%rdx,%r10,4)
jl 0xac28
movl %r9d, %eax
movslq %eax, %rdi
movslq (%rsi,%rdi,4), %rdi
movl (%rdx,%rdi,4), %edi
cmpl $0x2, %edi
je 0xac4b
cmpl %ecx, %r8d
jl 0xac4b
leal -0x1(%r8), %r10d
movl %eax, %r9d
testl %r8d, %r8d
movl %r10d, %r8d
jg 0xac15
retq
movl %r9d, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xad2b
subl %edx, %eax
cmpl %ebp, %esi
jge 0xacdb
testl %eax, %eax
jle 0xacd6
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 0xacce
movslq %r8d, %r8
leaq (%rcx,%r8,4), %rbx
decl %r8d
movslq (%rbx), %r14
addq $0x4, %rbx
incl %r8d
cmpl $-0x1, (%r9,%r14,4)
je 0xacb5
movl %r14d, (%rcx,%rdi,4)
movl %r10d, -0x4(%rbx)
incq %rdi
cmpq %rsi, %rdi
jne 0xaca0
movq %r11, %rdi
jmp 0xad29
testl %eax, %eax
jle 0xad29
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 0xad21
movslq %r9d, %r9
leaq (%rdx,%r9,4), %rbx
decl %r9d
movslq (%rbx), %r14
addq $0x4, %rbx
incl %r9d
cmpl $-0x1, (%r10,%r14,4)
je 0xad08
movl %r14d, (%rdx,%r8,4)
movl %r11d, -0x4(%rbx)
incq %r8
cmpq %rsi, %r8
jne 0xacf3
movl %eax, (%rdi)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movl %esi, %ebx
movq %rdi, %rbp
movl %esi, (%rdi)
movl $0x1, 0x4(%rdi)
movl %esi, %r15d
leaq (,%r15,4), %rax
testl %esi, %esi
movq $-0x1, %r13
movq %rax, 0x10(%rsp)
cmovnsq %rax, %r13
movq %r13, %rdi
callq 0x2030
movq %rax, 0x8(%rsp)
movq %rax, 0x8(%rbp)
movq %r13, %rdi
callq 0x2030
movq %rax, %r14
movq %rax, 0x10(%rbp)
movq %r13, %rdi
callq 0x2030
movq %rax, %r12
movq %rax, 0x18(%rbp)
movq %r13, %rdi
callq 0x2030
movq %rax, 0x20(%rbp)
testl %ebx, %ebx
jle 0xb357
xorl %ebp, %ebp
movq 0x8(%rsp), %rdi
xorl %esi, %esi
movq 0x10(%rsp), %r13
movq %r13, %rdx
movq %rax, 0x8(%rsp)
callq 0x20e0
movq 0x8(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x20e0
movq 0x8(%rsp), %rax
movl %ebp, (%r12,%rbp,4)
movl %ebp, (%r14,%rbp,4)
incq %rbp
cmpq %rbp, %r15
jne 0xb347
movl %ebx, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xb388
callq 0x21f0
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xb39e
callq 0x21f0
movq $0x0, 0x10(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xb3b4
callq 0x21f0
movq $0x0, 0x18(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xb3ca
callq 0x21f0
movq $0x0, 0x20(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1d7a(%rip), %rdi      # 0x3004
xorl %eax, %eax
callq 0x1040
movl $0x30, %edi
callq 0x10a0
movq %rax, %rbx
movq %rax, %rdi
movl $0xb, %esi
movl $0x3, %edx
movl $0x400, %ecx            # imm = 0x400
callq 0x1338
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 0x10b0
movq %r14, %rdi
callq 0x1120
// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x3a10(%rip), %rax      # 0x4d60
movq %rax, (%rdi)
movl %esi, 0x1c(%rdi)
movl %edx, 0x24(%rdi)
movl %esi, %eax
subl %edx, %eax
movl %eax, 0x8(%rdi)
movl %ecx, 0x20(%rdi)
movl $0x0, 0x18(%rdi)
movl %esi, %edi
shlq $0x3, %rdi
callq 0x10e0
movq %rax, 0x10(%rbx)
testl %r14d, %r14d
je 0x13b5
xorl %r15d, %r15d
movslq 0x20(%rbx), %r14
movq %r14, %rdi
callq 0x10e0
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), %r12d
cmpq %r12, %r15
jb 0x1381
jmp 0x13b8
xorl %r12d, %r12d
movl %r12d, %r14d
shlq $0x2, %r14
movq %r14, %rdi
callq 0x1030
movq %rax, 0x28(%rbx)
testl %r12d, %r12d
je 0x13e5
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1050
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x172d(%rip), %rdi      # 0x31f5
xorl %eax, %eax
callq 0x1040
cmpl $0x0, 0x8(%rbx)
je 0x1b10
leaq 0x1729(%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 0x10f0
incq %r15
movl 0x8(%rbx), %eax
cmpq %rax, %r15
jb 0x1adf
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x16e3(%rip), %rdi      # 0x3210
xorl %eax, %eax
callq 0x1040
movslq 0x8(%rbx), %r14
cmpl 0x1c(%rbx), %r14d
jae 0x1b60
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
xorl %eax, %eax
callq 0x1040
movl $0xa, %edi
callq 0x10f0
incq %r14
cmpl %r14d, 0x1c(%rbx)
ja 0x1b3e
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x213e
testl %ebx, %ebx
je 0x1ede
testl %r14d, %r14d
je 0x1ee5
movslq %r14d, %rax
leaq 0x321c(%rip), %rcx      # 0x50e0
movslq (%rcx,%rax,4), %rax
movslq %ebx, %rdx
movslq (%rcx,%rdx,4), %rcx
subq %rcx, %rax
movq 0x31ff(%rip), %rcx      # 0x50d8
movl (%rcx,%rax,4), %eax
jmp 0x1ee7
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1ee7
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x213e
cmpl $0x1, %r15d
je 0x1f62
testl %r15d, %r15d
jne 0x1f26
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 0x1f62
movslq %r15d, %rcx
leaq 0x31ab(%rip), %rax      # 0x50e0
movslq (%rax,%rcx,4), %rcx
movslq %r14d, %rdx
movq 0x3195(%rip), %rsi      # 0x50d8
movzbl -0x1(%rbx,%rdx), %edi
testq %rdi, %rdi
je 0x1f5d
movslq (%rax,%rdi,4), %rdi
addq %rcx, %rdi
movb (%rsi,%rdi,4), %dil
movb %dil, -0x1(%rbx,%rdx)
decq %rdx
jne 0x1f43
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2026
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 0x1fa7
leaq 0x1317(%rip), %rdi      # 0x32b9
callq 0x1110
testq %r12, %r12
je 0x1fe1
movl %r15d, %eax
leaq -0x1(%rax), %rdx
xorq $0x7, %r12
xorl %esi, %esi
movb (%r14,%rsi), %cl
xorb %cl, (%rbx,%rsi)
leaq 0x1(%rsi), %rcx
cmpq %rsi, %r12
je 0x1fd0
cmpl %esi, %edx
movq %rcx, %rsi
jne 0x1fb9
cmpl %ecx, %r15d
je 0x201e
subq %rcx, %rax
addq %rcx, %rbx
addq %rcx, %r14
movl %eax, %r15d
movl %r15d, %eax
andl $-0x8, %eax
cmpl $0x8, %r15d
jb 0x2000
movq %rax, %rcx
movq -0x8(%r14,%rcx), %rdx
xorq %rdx, -0x8(%rbx,%rcx)
addq $-0x8, %rcx
jne 0x1ff0
andl $0x7, %r15d
je 0x201e
movl %eax, %eax
incl %r15d
movb (%r14,%rax), %cl
xorb %cl, (%rbx,%rax)
decl %r15d
incq %rax
cmpl $0x1, %r15d
ja 0x200b
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2063
leaq 0x1029(%rip), %rdi      # 0x3085
xorl %eax, %eax
callq 0x1040
movslq %r12d, %rax
movslq -0x2c(%rbp), %rdi
imulq %rax, %rdi
shlq $0x2, %rdi
callq 0x10e0
movq %rax, -0x38(%rbp)
testq %rax, %rax
jne 0x208e
leaq 0x1029(%rip), %rdi      # 0x30b0
xorl %eax, %eax
callq 0x1040
testl %r12d, %r12d
jle 0x20e4
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 0x20d7
movl $0x1, %eax
xorl %ebx, %ebx
movl %eax, (%r15,%rbx,4)
movq %r14, %rdi
movl %eax, %esi
movl %r12d, %edx
callq 0x20f8
incq %rbx
cmpq %rbx, %r13
jne 0x20be
incq %r12
addq -0x40(%rbp), %r15
cmpq -0x48(%rbp), %r12
jne 0x20b1
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_O3/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 0x213e
testl %r14d, %r14d
sete %cl
testl %ebx, %ebx
sete %dl
xorl %eax, %eax
orb %cl, %dl
jne 0x2138
movslq %r14d, %rax
leaq 0x2fbc(%rip), %rcx      # 0x50e0
movslq %ebx, %rdx
movl (%rcx,%rdx,4), %edx
addl (%rcx,%rax,4), %edx
movq 0x2fa4(%rip), %rax      # 0x50d8
movzbl (%rax,%rdx,4), %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2145
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, -0x30(%rbp)
movl $0xc00, %edi            # imm = 0xC00
callq 0x10e0
movq %rax, %r14
movq %rax, 0x2f6d(%rip)      # 0x50d8
testq %rax, %rax
jne 0x2185
leaq 0xf54(%rip), %rdi       # 0x30cb
xorl %eax, %eax
callq 0x1040
movq 0x2f53(%rip), %r14      # 0x50d8
xorl %ebx, %ebx
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x1050
leaq 0x2f43(%rip), %r12      # 0x50e0
movl $0xff, (%rbx,%r12)
addq $0x4, %rbx
cmpq $0x400, %rbx            # imm = 0x400
jne 0x219d
movl $0x1, %eax
leaq 0xf2b(%rip), %r15       # 0x30e9
xorl %r13d, %r13d
movslq %eax, %rbx
cmpl $0xff, (%r12,%rbx,4)
je 0x21df
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
movq 0x2ef9(%rip), %r14      # 0x50d8
movl %r13d, (%r12,%rbx,4)
movl %ebx, (%r14,%r13,4)
leal (%rbx,%rbx), %ecx
movzbl %cl, %eax
xorl $0x1d, %eax
testb %bl, %bl
cmovnsl %ecx, %eax
incq %r13
cmpq $0xff, %r13
jne 0x21c1
movq $-0xff, %rax
movl 0x3fc(%r14,%rax,4), %ecx
movl %ecx, 0x7f8(%r14,%rax,4)
movl %ecx, 0xbf4(%r14,%rax,4)
incq %rax
jne 0x2208
addq $0x3fc, %r14            # imm = 0x3FC
movq %r14, 0x2ea5(%rip)      # 0x50d8
movq -0x30(%rbp), %rax
movl $0x1, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
movl 0x54(%rdi), %ecx
cmpq 0x28(%rdi), %rax
jae 0x4175
testl %ecx, %ecx
je 0x4179
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)
movl 0x54(%rdi), %ecx
decl %ecx
movl %ecx, 0x54(%rdi)
andl %eax, 0x50(%rdi)
movq 0x20(%rdi), %rax
jmp 0x4123
testl %ecx, %ecx
jne 0x4190
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_O3/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, 0xa048(%rip)      # 0xe1f8
jne 0x41f4
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 0x41d4
movq %rbx, %rdi
callq 0x4118
testq %r14, %r14
je 0x41e2
movl 0x20(%rbx), %eax
subl %r15d, %eax
movl %eax, (%r14)
cmpl $0x0, 0xa00f(%rip)      # 0xe1f8
jne 0x41fe
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x33d7
jmp 0x41b2
movq %rbx, %rdi
callq 0x3400
jmp 0x41eb
// File: /workspace/github_cpp_makefile_star2_O3/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), %rax
movq %rdi, %rbx
cmpl $0x0, 0x4(%rax)
je 0x3948
movq %rbx, %rdi
movl %esi, %r14d
callq 0x3958
movl %eax, %ebp
movq %rbx, %rdi
movl %eax, %esi
callq 0x399a
movq 0x18(%rbx), %r8
movslq %ebp, %rdi
movq 0x38(%rbx), %rcx
movslq %r14d, %rax
leaq (%rdi,%rdi,2), %rsi
leaq (%rax,%rax,2), %rdx
movl 0x8(%r8,%rsi,4), %esi
movl %esi, (%rcx,%rdx,4)
cmpl %edi, %esi
je 0x3936
leal 0x1(%rax), %r14d
shlq $0x2, %rax
leaq (%rcx,%rdx,4), %r15
leaq (%rax,%rax,2), %r12
movq 0x38(%rbx), %rcx
movq %rbx, %rdi
movq %rbx, %rdx
addq %r12, %rcx
movq %rcx, %r8
callq 0x3b00
movq %rbx, %rdi
movl %r14d, %esi
callq 0x388a
movq 0x38(%rbx), %rdx
movl (%r15), %esi
movq %rbx, %rdi
movq %rbx, %rcx
addq %r12, %rdx
callq 0x3bbe
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 0x38eb
movq %rbx, %rdi
movl %ebp, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x39fc
incq 0x90(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1a07
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 0x17c3
addl 0xc(%rsp), %r14d
decl %ebp
jne 0x141b
movq 0x2b35(%rip), %rax      # 0x3ff8
movq (%rax), %r15
movq %rbx, %rdi
callq 0x17b7
leaq 0xba0(%rip), %rsi       # 0x2075
movq %r15, %rdi
movl %eax, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x17b7
movl %eax, %ebp
movq %rbx, %rdi
callq 0x1c6c
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_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x28(%rdi), %rbx
movl 0x24(%rdi), %ebp
movslq %ebp, %rdi
movl $0x8, %esi
callq 0x1050
movq %rax, 0x28(%r14)
testq %rax, %rax
je 0x179f
testl %ebp, %ebp
jle 0x1793
xorl %r15d, %r15d
movq (%rbx,%r15,8), %r12
testq %r12, %r12
je 0x1788
movq (%r12), %rdi
movq 0x18(%r12), %r13
callq *0x10(%r14)
movq %rax, 0x10(%r12)
movl 0x24(%r14), %ebp
movq 0x28(%r14), %rsi
movslq %ebp, %rcx
xorl %edx, %edx
divq %rcx
movq $0x0, 0x18(%r12)
movslq %edx, %rax
movq (%rsi,%rax,8), %rdx
testq %rdx, %rdx
je 0x1777
movq %rdx, %rax
movq 0x18(%rdx), %rdx
testq %rdx, %rdx
jne 0x1765
addq $0x18, %rax
jmp 0x177b
leaq (%rsi,%rax,8), %rax
movq %r12, (%rax)
movq %r13, %r12
testq %r13, %r13
jne 0x172e
jmp 0x178b
movslq %ebp, %rcx
incq %r15
cmpq %rcx, %r15
jl 0x1725
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
jmp 0x17a8
movq %rbx, 0x28(%r14)
movl $0xfffffff4, %eax       # imm = 0xFFFFFFF4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/bkthomps-hashmap/unordered_map.c
// Function: unordered_map_create_element
static struct node *const unordered_map_create_element(unordered_map me,
                                                       const unsigned long hash,
                                                       const void *const key,
                                                       const void *const value)
{
    struct node *const init = malloc(sizeof(struct node));
    if (!init) {
        return NULL;
    }
    init->key = malloc(me->key_size);
    if (!init->key) {
        free(init);
        return NULL;
    }
    memcpy(init->key, key, me->key_size);
    init->value = malloc(me->value_size);
    if (!init->value) {
        free(init->key);
        free(init);
        return NULL;
    }
    memcpy(init->value, value, me->value_size);
    init->hash = hash;
    init->next = NULL;
    return init;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r12
movl $0x20, %edi
callq 0x1080
testq %rax, %rax
je 0x19f3
movq %rax, %rbx
movq %r14, (%rsp)
movq (%r12), %r14
movq %r14, %rdi
callq 0x1080
movq %rax, (%rbx)
testq %rax, %rax
je 0x19eb
movq %rax, %rbp
movq %rax, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1070
movq 0x8(%r12), %r14
movq %r14, %rdi
callq 0x1080
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x19e3
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1070
movq (%rsp), %rax
movq %rax, 0x10(%rbx)
movq $0x0, 0x18(%rbx)
jmp 0x19f5
movq %rbp, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/bkthomps-hashmap/unordered_map.c
// Function: unordered_map_get
bool unordered_map_get(void *const value, unordered_map me, void *const key)
{
    const unsigned long hash = me->hash(key);
    const int index = (int) (hash % me->capacity);
    struct node *traverse = me->buckets[index];
    while (traverse) {
        if (unordered_map_is_equal(me, traverse, hash, key)) {
            memcpy(value, traverse->value, me->value_size);
            return true;
        }
        traverse = traverse->next;
    }
    return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rdi
callq *0x10(%rsi)
movq %rax, %r12
movslq 0x24(%r14), %rsi
xorl %ecx, %ecx
xorl %edx, %edx
divq %rsi
movq 0x28(%r14), %rax
movslq %edx, %rdx
movq (%rax,%rdx,8), %r13
testq %r13, %r13
je 0x1a71
cmpq %r12, 0x10(%r13)
jne 0x1a52
movq (%r13), %rdi
movq %r15, %rsi
callq *0x18(%r14)
testl %eax, %eax
je 0x1a5f
movq 0x18(%r13), %r13
testq %r13, %r13
jne 0x1a3d
xorl %ecx, %ecx
jmp 0x1a71
movq 0x8(%r13), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x1070
movb $0x1, %cl
movl %ecx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/bkthomps-hashmap/unordered_map.c
// Function: unordered_map_contains
bool unordered_map_contains(unordered_map me, void *const key)
{
    const unsigned long hash = me->hash(key);
    const int index = (int) (hash % me->capacity);
    const struct node *traverse = me->buckets[index];
    while (traverse) {
        if (unordered_map_is_equal(me, traverse, hash, key)) {
            return true;
        }
        traverse = traverse->next;
    }
    return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq *0x10(%r14)
movq %rax, %r15
movslq 0x24(%r14), %rsi
xorl %ecx, %ecx
xorl %edx, %edx
divq %rsi
movq 0x28(%r14), %rax
movslq %edx, %rdx
movq (%rax,%rdx,8), %r12
testq %r12, %r12
je 0x1ad6
cmpq %r15, 0x10(%r12)
jne 0x1ac6
movq (%r12), %rdi
movq %rbx, %rsi
callq *0x18(%r14)
testl %eax, %eax
je 0x1ad4
movq 0x18(%r12), %r12
testq %r12, %r12
jne 0x1ab0
xorl %ecx, %ecx
jmp 0x1ad6
movb $0x1, %cl
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/bkthomps-hashmap/unordered_map.c
// Function: unordered_map_remove
bool unordered_map_remove(unordered_map me, void *const key)
{
    const unsigned long hash = me->hash(key);
    const int index = (int) (hash % me->capacity);
    if (!me->buckets[index]) {
        return false;
    }
    struct node *traverse = me->buckets[index];
    if (unordered_map_is_equal(me, traverse, hash, key)) {
        me->buckets[index] = traverse->next;
        free(traverse->key);
        free(traverse->value);
        free(traverse);
        me->size--;
        return true;
    }
    while (traverse->next) {
        if (unordered_map_is_equal(me, traverse->next, hash, key)) {
            struct node *const backup = traverse->next;
            traverse->next = traverse->next->next;
            free(backup->key);
            free(backup->value);
            free(backup);
            me->size--;
            return true;
        }
        traverse = traverse->next;
    }
    return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq *0x10(%rbx)
movq %rax, %r15
movslq 0x24(%rbx), %rsi
xorl %ecx, %ecx
xorl %edx, %edx
divq %rsi
movq 0x28(%rbx), %rax
movslq %edx, %r13
movq (%rax,%r13,8), %r12
testq %r12, %r12
je 0x1bb9
cmpq %r15, 0x10(%r12)
jne 0x1b30
movq (%r12), %rdi
movq %r14, %rsi
callq *0x18(%rbx)
testl %eax, %eax
je 0x1b6d
movq 0x18(%r12), %r13
testq %r13, %r13
je 0x1b69
addq $0x18, %r12
cmpq %r15, 0x10(%r13)
jne 0x1b56
movq (%r13), %rdi
movq %r14, %rsi
callq *0x18(%rbx)
movq (%r12), %r13
testl %eax, %eax
je 0x1b92
movq %r13, %r12
movq 0x18(%r13), %rax
addq $0x18, %r12
movq %rax, %r13
testq %rax, %rax
jne 0x1b3e
xorl %ecx, %ecx
jmp 0x1bb9
movq 0x18(%r12), %rax
movq 0x28(%rbx), %rcx
movq %rax, (%rcx,%r13,8)
movq (%r12), %rdi
callq 0x1030
movq 0x8(%r12), %rdi
callq 0x1030
movq %r12, %rdi
jmp 0x1baf
movq 0x18(%r13), %rax
movq %rax, (%r12)
movq (%r13), %rdi
callq 0x1030
movq 0x8(%r13), %rdi
callq 0x1030
movq %r13, %rdi
callq 0x1030
decl 0x20(%rbx)
movb $0x1, %cl
movl %ecx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/bkthomps-hashmap/unordered_map.c
// Function: unordered_map_clear
int unordered_map_clear(unordered_map me)
{
    struct node **temp =
            calloc((size_t) STARTING_BUCKETS, sizeof(struct node *));
    if (!temp) {
        return -ENOMEM;
    }
    for (int i = 0; i < me->capacity; i++) {
        struct node *traverse = me->buckets[i];
        while (traverse) {
            struct node *const backup = traverse;
            traverse = traverse->next;
            free(backup->key);
            free(backup->value);
            free(backup);
        }
        me->buckets[i] = NULL;
    }
    me->size = 0;
    me->capacity = STARTING_BUCKETS;
    free(me->buckets);
    me->buckets = temp;
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x8, %edi
movl $0x8, %esi
callq 0x1050
testq %rax, %rax
je 0x1c5d
movq %rax, %r14
movl 0x24(%rbx), %eax
testl %eax, %eax
jle 0x1c3e
xorl %r12d, %r12d
movq 0x28(%rbx), %rcx
movq (%rcx,%r12,8), %r15
testq %r15, %r15
je 0x1c2b
movq (%r15), %rdi
movq 0x18(%r15), %r13
callq 0x1030
movq 0x8(%r15), %rdi
callq 0x1030
movq %r15, %rdi
callq 0x1030
movq %r13, %r15
testq %r13, %r13
jne 0x1bff
movq 0x28(%rbx), %rcx
movl 0x24(%rbx), %eax
movq $0x0, (%rcx,%r12,8)
incq %r12
movslq %eax, %rcx
cmpq %rcx, %r12
jl 0x1bf2
movabsq $0x800000000, %rax      # imm = 0x800000000
movq %rax, 0x20(%rbx)
movq 0x28(%rbx), %rdi
callq 0x1030
movq %r14, 0x28(%rbx)
xorl %eax, %eax
jmp 0x1c62
movl $0xfffffff4, %eax       # imm = 0xFFFFFFF4
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/bkthomps-hashmap/unordered_map.c
// Function: unordered_map_destroy
unordered_map unordered_map_destroy(unordered_map me)
{
    unordered_map_clear(me);
    free(me->buckets);
    free(me);
    return NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x1bc5
movq 0x28(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]articles/src/threads/part2/SafeGuard.cpp
// Function: main
int main(){
    Counter counter;

    std::vector<std::thread> threads;

    for(int i = 0; i < 5; ++i){
        threads.push_back(std::thread([&](){
            for(int i = 0; i < 100; ++i){
                counter.increment();
            }
        }));
    }

    for(auto& thread : threads){
        thread.join();
    }

    std::cout << counter.value << std::endl;

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq 0x1c(%rsp), %r12
leaq 0x20(%rsp), %rbx
vxorps %xmm0, %xmm0, %xmm0
movl $0x5, %ebp
leaq 0x2af4(%rip), %r13      # 0x3d88
leaq 0x8(%rsp), %r14
leaq 0x10(%rsp), %r15
movl $0x0, (%r12)
vmovaps %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq $0x0, 0x8(%rsp)
movl $0x10, %edi
callq 0x10e0
movq %r13, (%rax)
movq %r12, 0x8(%rax)
movq %rax, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x10b0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x12ee
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1406
cmpq $0x0, 0x8(%rsp)
jne 0x13b3
decl %ebp
jne 0x12b2
movq 0x20(%rsp), %rbx
movq 0x28(%rsp), %r14
cmpq %r14, %rbx
je 0x1326
movq %rbx, %rdi
callq 0x1100
addq $0x8, %rbx
jmp 0x1313
movl 0x1c(%rsp), %esi
movq 0x2ca7(%rip), %rdi      # 0x3fd8
callq 0x1110
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1080
leaq 0x20(%rsp), %rdi
callq 0x13d2
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x139e
jmp 0x139e
jmp 0x139e
movq 0x10(%rsp), %rdi
movq %rax, %rbx
testq %rdi, %rdi
je 0x13a1
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x13a1
cmpq $0x0, 0x8(%rsp)
jne 0x13b3
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x13d2
movq %rbx, %rdi
callq 0x1120
callq 0x1040
// File: /workspace/github_cpp_makefile_star2_O3/MikuAuahDark[P]midi2sif/src/midi2sif.cpp
// Function: ReadVarInt(_IO_FILE*, unsigned long*)
uint32_t ReadVarInt(FILE* stream, size_t* decrementer = NULL)
{
	int32_t temp;
	uint32_t out = 0;

	do
	{
		if((temp = fgetc(stream)) == EOF)
			throw std::runtime_error("Unexpected EOF");

		if(decrementer) (*decrementer)--;

		out = (out << 7) | (temp & 0x7F);
	}
	while ((temp & 0x80) != 0);

	return out;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x2210
cmpl $-0x1, %eax
je 0x26e4
testq %rbx, %rbx
je 0x26cd
decq (%rbx)
movl %ebp, %ecx
shll $0x7, %ecx
movl %eax, %ebp
andl $0x7f, %ebp
orl %ecx, %ebp
testb %al, %al
js 0x26b8
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x20b0
movq %rax, %rbx
leaq 0x3940(%rip), %rsi      # 0x6038
movq %rax, %rdi
callq 0x2080
movq 0x68f1(%rip), %rsi      # 0x8ff8
movq 0x68c2(%rip), %rdx      # 0x8fd0
movq %rbx, %rdi
callq 0x2250
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O3/MikuAuahDark[P]midi2sif/src/midi2sif.cpp
// Function: InsertEvent(std::map<unsigned int, std::vector<EventInformation, std::allocator<EventInformation>>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::vector<EventInformation, std::allocator<EventInformation>>>>>&, EventInformation&)
void InsertEvent(std::map<uint32_t, std::vector<EventInformation> >& raw, EventInformation& event)
{
	if(raw.count(event.tick))
	{
		std::vector<EventInformation>& eilist = raw[event.tick];

		event.order = eilist.size();
		eilist.push_back(event);
	}
	else
	{
		std::vector<EventInformation> temp;

		event.order = 0;
		temp.push_back(event);
		raw[event.tick] = temp;
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3532
testq %rax, %rax
je 0x276b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x357a
movq 0x8(%rax), %rcx
subq (%rax), %rcx
shrq $0x6, %rcx
movl %ecx, 0x4(%rbx)
movq %rax, %rdi
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x35e0
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x0, 0x4(%rbx)
movq %rbx, %rsi
callq 0x35e0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x357a
movq %rsp, %rsi
movq %rax, %rdi
callq 0x364c
movq %rsp, %rdi
callq 0x3848
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3848
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O3/MikuAuahDark[P]midi2sif/src/midi2sif.cpp
// Function: ZN10SIFBeatmapcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv
operator std::string()
	{
		char temp[128];

		sprintf(temp,
			"{"
			"\"timing_sec\": %.4f,"
			"\"notes_attribute\": %d,"
			"\"notes_level\": 1,"
			"\"effect\": %d,"
			"\"effect_value\": %.4f,"
			"\"position\": %d"
			"}",
			timing_sec, notes_attribute, effect, effect == SIFBeatmap::LONG_NOTE ? effect_value : 2.0, position
		);

		return std::string(temp);
	}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
movsd (%rsi), %xmm0
movl 0x8(%rsi), %edx
movl 0xc(%rsi), %ecx
cmpl $0x3, %ecx
je 0x3996
movsd 0x269c(%rip), %xmm1     # 0x6030
jmp 0x399b
movsd 0x10(%rsi), %xmm1
movl 0x18(%rsi), %r8d
leaq 0x281b(%rip), %rsi      # 0x61c1
movq %rsp, %r14
movq %r14, %rdi
movb $0x2, %al
callq 0x2050
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x20a0
leaq (%rsp,%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x39ea
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r14
retq