LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: Proudc[P]CTSS/src/ContinuousQuery/Base.cpp
// Function: replacePath(std::vector<Edge, std::allocator<Edge>>&, std::vector<Edge, std::allocator<Edge>>&, int, int)
void replacePath(std::vector<Edge>& lastPath, std::vector<Edge>& localPath, const int startPos, const int stopPos)
{

	std::vector<Edge> temPath;
	for (unsigned int i = 0; i < startPos; i++)
	{
		temPath.push_back(lastPath[i]);
	}
	for (unsigned int i = 0; i < localPath.size(); i++)
	{
		temPath.push_back(localPath[i]);
	}
	for (unsigned int i = stopPos; i < lastPath.size(); i++)
	{
		temPath.push_back(lastPath[i]);
	}
	lastPath.clear();
	for (unsigned int i = 0; i < temPath.size(); i++)
	{
		lastPath.push_back(temPath[i]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x53a0
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x87b1
movq -0x8(%rbp), %rdi
movl -0x34(%rbp), %eax
movl %eax, %esi
callq 0x5380
movq %rax, %rsi
leaq -0x30(%rbp), %rdi
callq 0x55f0
jmp 0x878a
jmp 0x878c
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x8766
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x54b0
jmp 0x88b4
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5360
movq %rax, %rcx
movq -0x58(%rbp), %rax
cmpq %rcx, %rax
jae 0x87fd
movq -0x10(%rbp), %rdi
movl -0x48(%rbp), %eax
movl %eax, %esi
callq 0x5380
movq %rax, %rsi
leaq -0x30(%rbp), %rdi
callq 0x55f0
jmp 0x87f0
jmp 0x87f2
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x87b8
movl -0x18(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5360
movq %rax, %rcx
movq -0x60(%rbp), %rax
cmpq %rcx, %rax
jae 0x8848
movq -0x8(%rbp), %rdi
movl -0x4c(%rbp), %eax
movl %eax, %esi
callq 0x5380
movq %rax, %rsi
leaq -0x30(%rbp), %rdi
callq 0x55f0
jmp 0x883b
jmp 0x883d
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x8803
movq -0x8(%rbp), %rdi
callq 0x91a0
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq %rax, -0x68(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5360
movq %rax, %rcx
movq -0x68(%rbp), %rax
cmpq %rcx, %rax
jae 0x88a5
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movl -0x50(%rbp), %eax
movl %eax, %esi
leaq -0x30(%rbp), %rdi
callq 0x5380
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x55f0
jmp 0x8898
jmp 0x889a
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x8858
leaq -0x30(%rbp), %rdi
callq 0x54b0
addq $0x70, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x2240
nopl (%rax)
// File: Proudc[P]CTSS/src/ContinuousQuery/Base.cpp
// Function: updateLastPath(std::vector<Edge, std::allocator<Edge>>&, std::vector<Edge, std::allocator<Edge>>&, double*, double*)
void updateLastPath(std::vector<Edge>& lastPath, std::vector<Edge>& temLastPath, double* boundDistance, double* temBoundDistance)
{
	lastPath.clear();
	for (unsigned int j = 0; j < temLastPath.size(); j++)
	{
		lastPath.push_back(temLastPath[j]);
	}
	(*boundDistance) = (*temBoundDistance);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x91a0
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5360
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jae 0x8931
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, %esi
callq 0x5380
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x55f0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x88e8
movq -0x20(%rbp), %rax
movsd (%rax), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Proudc[P]CTSS/src/ContinuousQuery/Base.cpp
// Function: (anonymous namespace)::getPathLength(std::vector<Edge, std::allocator<Edge>> const&)
double getPathLength(const std::vector<Edge>& temPath)
{
	double temLength = 0.0;
	for (unsigned int i = 0; i < temPath.size(); i++)
	{
		temLength += temPath[i].realLength;
	}
	return temLength;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5360
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jae 0x8c0f
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x9410
movsd 0x18(%rax), %xmm0
addsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8bcb
movsd -0x10(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Proudc[P]CTSS/src/ContinuousQuery/Construct.cpp
// Function: readVertexs(Graph*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void readVertexs(Graph* myGraph, const std::string nodeFilePath)
{
	printf("Reading vertex information from file...\n");
	int   count = 0;
	char  line[100];
	FILE* fp;
	char* p;
	fp = fopen(nodeFilePath.c_str(), "r");
	if (!fp)
	{
		printf("Error when reading vertex file...\n");
	}
	else
	{
		myGraph->vertexPos = 0;
		while (fgets(line, 100, fp) != NULL)
		{
			p = strtok(line, " |\t");
			int ID = atoi(p);
			p = strtok(NULL, " |\t");
			double latitude = atof(p);
			p = strtok(NULL, " |\t");
			double longitude = atof(p);
			myGraph->vertexsVector[myGraph->vertexPos].vertexID  = ID;
			myGraph->vertexsVector[myGraph->vertexPos].longitude = longitude;
			myGraph->vertexsVector[myGraph->vertexPos].latitude  = latitude;
			myGraph->vertexPos += 1;
			count++;
		}
	}
	fclose(fp);
	printf("Finish reading vertex information from file---A total of %d vertex are read!!!\n", count);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rsi, -0xb0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0xeb48(%rip), %rdi      # 0x197c9
movb $0x0, %al
callq 0x2040
movq -0xb0(%rbp), %rdi
movl $0x0, -0x14(%rbp)
callq 0x2080
movq %rax, %rdi
leaq 0xeb4d(%rip), %rsi      # 0x197f2
callq 0x2190
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x88(%rbp)
jne 0xacce
leaq 0xeb32(%rip), %rdi      # 0x197f4
movb $0x0, %al
callq 0x2040
jmp 0xadfb
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
leaq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rdx
movl $0x64, %esi
callq 0x2210
cmpq $0x0, %rax
je 0xadf9
leaq -0x80(%rbp), %rdi
leaq 0xeb14(%rip), %rsi      # 0x19817
callq 0x2200
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rdi
callq 0x21f0
movl %eax, -0x94(%rbp)
xorl %eax, %eax
movl %eax, %edi
leaq 0xeaeb(%rip), %rsi      # 0x19817
callq 0x2200
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rdi
callq 0x21a0
movsd %xmm0, -0xa0(%rbp)
xorl %eax, %eax
movl %eax, %edi
leaq 0xeac0(%rip), %rsi      # 0x19817
callq 0x2200
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rdi
callq 0x21a0
movsd %xmm0, -0xa8(%rbp)
movl -0x94(%rbp), %ecx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rdx
movslq 0x4(%rdx), %rdx
imulq $0x70, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movsd -0xa8(%rbp), %xmm0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x4(%rcx), %rcx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x18(%rax)
movsd -0xa0(%rbp), %xmm0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x4(%rcx), %rcx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x20(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xacd9
jmp 0xadfb
movq -0x88(%rbp), %rdi
callq 0x2160
movl -0x14(%rbp), %esi
leaq 0xea0a(%rip), %rdi      # 0x1981b
movb $0x0, %al
callq 0x2040
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Proudc[P]CTSS/src/ContinuousQuery/Construct.cpp
// Function: readReferencePath(Graph*, ReferencePath*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void readReferencePath(Graph* myGraph, ReferencePath* referencePath, const std::string referFilePath)
{
	printf("Reading reference path information from file...\n");
	int   count = 0;
	char  line[200];
	FILE* fp;
	char* p;
	fp = fopen(referFilePath.c_str(), "r");
	if (!fp)
	{
		printf("Error when reading reference path file...\n");
	}
	else
	{
		while (fgets(line, 200, fp) != NULL)
		{
			p = strtok(line, " |\t");
			int pos = atoi(p);
			referencePath->edges.push_back(myGraph->edgesVector[pos]);
			myGraph->vertexsVector[myGraph->edgesVector[pos].firstVertexID].referFlag = true;
			myGraph->vertexsVector[myGraph->edgesVector[pos].secVertexID].referFlag   = true;
			count++;
		}
	}
	fclose(fp);
	printf("Finish reading reference path information from file!!!\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdx, -0x110(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0xe84a(%rip), %rdi      # 0x198ff
movb $0x0, %al
callq 0x2040
movq -0x110(%rbp), %rdi
movl $0x0, -0x1c(%rbp)
callq 0x2080
movq %rax, %rdi
leaq 0xe719(%rip), %rsi      # 0x197f2
callq 0x2190
movq %rax, -0xf8(%rbp)
cmpq $0x0, -0xf8(%rbp)
jne 0xb102
leaq 0xe83a(%rip), %rdi      # 0x19930
movb $0x0, %al
callq 0x2040
jmp 0xb1df
jmp 0xb104
leaq -0xf0(%rbp), %rdi
movq -0xf8(%rbp), %rdx
movl $0xc8, %esi
callq 0x2210
cmpq $0x0, %rax
je 0xb1dd
leaq -0xf0(%rbp), %rdi
leaq 0xe6e3(%rip), %rsi      # 0x19817
callq 0x2200
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rdi
callq 0x21f0
movl %eax, -0x104(%rbp)
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movslq -0x104(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rsi
callq 0x55f0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x104(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movslq 0x4(%rcx), %rcx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movb $0x1, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x104(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movslq 0x8(%rcx), %rcx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movb $0x1, 0x10(%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xb104
jmp 0xb1df
movq -0xf8(%rbp), %rdi
callq 0x2160
leaq 0xe769(%rip), %rdi      # 0x1995b
movb $0x0, %al
callq 0x2040
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Proudc[P]CTSS/src/ContinuousQuery/Construct.cpp
// Function: readCompletePath(Graph*, CompletePath*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void readCompletePath(Graph* myGraph, CompletePath* completePath, const std::string comFilePath)
{
	int   count = 0;
	char  line[200];
	FILE* fp;
	char* p;
	fp = fopen(comFilePath.c_str(), "r");
	if (!fp)
	{
		printf("Error when reading complete path file...\n");
	}
	else
	{
		while (fgets(line, 200, fp) != NULL)
		{
			p = strtok(line, " |\t");
			int pos = atoi(p);
			completePath->edges.push_back(myGraph->edgesVector[pos]);
			count++;
		}
	}
	fclose(fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdx, -0x110(%rbp)
movq %rdi, %rax
movq -0x110(%rbp), %rdi
movq %rax, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
callq 0x2080
movq %rax, %rdi
leaq 0xe5a4(%rip), %rsi      # 0x197f2
callq 0x2190
movq %rax, -0xf8(%rbp)
cmpq $0x0, -0xf8(%rbp)
jne 0xb274
leaq 0xe728(%rip), %rdi      # 0x19993
movb $0x0, %al
callq 0x2040
jmp 0xb2f0
jmp 0xb276
leaq -0xf0(%rbp), %rdi
movq -0xf8(%rbp), %rdx
movl $0xc8, %esi
callq 0x2210
cmpq $0x0, %rax
je 0xb2ee
leaq -0xf0(%rbp), %rdi
leaq 0xe575(%rip), %rsi      # 0x19817
callq 0x2200
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rdi
callq 0x21f0
movl %eax, -0x104(%rbp)
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movslq -0x104(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rsi
callq 0x55f0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xb276
jmp 0xb2f0
movq -0xf8(%rbp), %rdi
callq 0x2160
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: Proudc[P]CTSS/src/ContinuousQuery/Discrete.cpp
// Function: discreteReferPath(Graph*, ReferencePath*)
void discreteReferPath(Graph* myGraph, ReferencePath* temPath)
{
	// printf("Start discretizing the reference path...\n");
	temPath->numOfReferPoint = 0;
	std::vector<Point> pointList;
	pointList = creatTrajPoint(myGraph, temPath->edges, temPath->initialVertex);
	for (unsigned int i = 0; i < pointList.size(); i++)
	{
		temPath->pointOfRefer[i].x = pointList[i].x;
		temPath->pointOfRefer[i].y = pointList[i].y;
		temPath->numOfReferPoint += 1;
	}
	// printf("Discretization of the reference path completed!!!\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
leaq -0x28(%rbp), %rdi
callq 0xb8c0
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x20, %rdx
movl (%rax), %ecx
leaq -0x40(%rbp), %rdi
callq 0xb430
jmp 0xb350
leaq -0x28(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xb8e0
leaq -0x40(%rbp), %rdi
callq 0xb910
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq %rax, -0x58(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xb970
movq %rax, %rcx
movq -0x58(%rbp), %rax
cmpq %rcx, %rax
jae 0xb411
movl -0x50(%rbp), %eax
movl %eax, %esi
leaq -0x28(%rbp), %rdi
callq 0xb990
movsd (%rax), %xmm0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movsd %xmm0, (%rax)
movl -0x50(%rbp), %eax
movl %eax, %esi
leaq -0x28(%rbp), %rdi
callq 0xb990
movsd 0x8(%rax), %xmm0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0xb36d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xb910
jmp 0xb420
leaq -0x28(%rbp), %rdi
callq 0xb910
addq $0x60, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x2240
nopl (%rax)
// File: Proudc[P]CTSS/src/ContinuousQuery/Frechet.cpp
// Function: DFD(Graph*, std::vector<Edge, std::allocator<Edge>>, ReferencePath*)
double DFD(Graph* myGraph, std::vector<Edge> finalPath, ReferencePath* referencePath)
{
	std::vector<Point> temPointList;
	temPointList = creatTrajPoint(myGraph, finalPath, referencePath->initialVertex);
	Point p[temPointList.size()];
	for (unsigned int i = 0; i < temPointList.size(); i++)
	{
		p[i].x = temPointList[i].x;
		p[i].y = temPointList[i].y;
	}
	double temDist = dfdDist(temPointList.size(), referencePath->numOfReferPoint, p, referencePath->pointOfRefer);
	return temDist;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rsi, -0x80(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xb8c0
movq -0x80(%rbp), %rdx
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %rax
movl (%rax), %ecx
leaq -0x48(%rbp), %rdi
callq 0xb430
jmp 0xce8d
leaq -0x30(%rbp), %rdi
movq %rdi, -0x90(%rbp)
leaq -0x48(%rbp), %rsi
movq %rsi, -0x98(%rbp)
callq 0xb8e0
movq -0x98(%rbp), %rdi
callq 0xb910
movq -0x90(%rbp), %rdi
callq 0xb970
movq %rax, %rdx
movq %rdx, %rax
movq %rsp, %rcx
movq %rcx, -0x60(%rbp)
shlq $0x4, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x88(%rbp)
movq %rcx, %rsp
movq %rax, -0x68(%rbp)
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movq %rax, -0xa0(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xb970
movq %rax, %rcx
movq -0xa0(%rbp), %rax
cmpq %rcx, %rax
jae 0xcf89
movl -0x6c(%rbp), %eax
movl %eax, %esi
leaq -0x30(%rbp), %rdi
callq 0xb990
movq %rax, %rcx
movq -0x88(%rbp), %rax
movsd (%rcx), %xmm0
movl -0x6c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movsd %xmm0, (%rax)
movl -0x6c(%rbp), %eax
movl %eax, %esi
leaq -0x30(%rbp), %rdi
callq 0xb990
movq %rax, %rcx
movq -0x88(%rbp), %rax
movsd 0x8(%rcx), %xmm0
movl -0x6c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0xceec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xb910
jmp 0xcfec
leaq -0x30(%rbp), %rdi
callq 0xb970
movq -0x88(%rbp), %rdx
movl %eax, %edi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %esi
movq 0x10(%rax), %rcx
callq 0xc5b0
movsd %xmm0, -0xa8(%rbp)
jmp 0xcfb5
movsd -0xa8(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x78(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
movq -0x60(%rbp), %rax
movq %rax, %rsp
leaq -0x30(%rbp), %rdi
callq 0xb910
movsd -0xb0(%rbp), %xmm0
movq %rbp, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x2240
nopw %cs:(%rax,%rax)
// File: jorbs[P]stellar-keypair-tool/keypair.cpp
// Function: checkInvalidChar(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
char checkInvalidChar(const std::string &input) {
  for (const char& c : input)
    if (base32Dictionary.find(c) == std::string::npos)
      return c;

  return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x31e0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x33d0
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x42e0
testb $0x1, %al
jne 0x3611
jmp 0x3653
leaq -0x20(%rbp), %rdi
callq 0x4320
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
leaq 0xac07(%rip), %rdi      # 0xe230
xorl %ecx, %ecx
movl %ecx, %edx
movsbl (%rax), %esi
callq 0x32c0
cmpq $-0x1, %rax
jne 0x3646
movq -0x30(%rbp), %rax
movb (%rax), %al
movb %al, -0x1(%rbp)
jmp 0x3657
jmp 0x3648
leaq -0x20(%rbp), %rdi
callq 0x4340
jmp 0x35fe
movb $-0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
// File: jorbs[P]stellar-keypair-tool/keypair.cpp
// Function: encode[abi:cxx11](VersionByte const&, std::vector<unsigned char, std::allocator<unsigned char>>&)
std::string encode(const VersionByte &versionByte, std::vector<uint8_t> &data) {
  std::vector<uint8_t> bytes;

  bytes.push_back(versionByte);
  bytes.insert(bytes.end(), data.begin(), data.end());

  uint16_t crc = crc16((char *) bytes.data(), bytes.size());

  bytes.emplace_back(static_cast<uint8_t>(crc & 0xFF));
  bytes.emplace_back(static_cast<uint8_t>((crc >> 8) & 0xFF));

  return bn::encode_b32(bytes);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x90(%rbp)
movq %rdi, %rax
movq %rax, -0x88(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x4360
movq -0x80(%rbp), %rdi
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x31(%rbp)
leaq -0x31(%rbp), %rsi
callq 0x4380
jmp 0x371d
leaq -0x30(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x4460
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x4490
movq -0x18(%rbp), %rdi
callq 0x44d0
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4460
movq -0xa0(%rbp), %rdi
movq %rax, -0x68(%rbp)
movq -0x50(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq -0x68(%rbp), %rcx
callq 0x43b0
movq %rax, -0x98(%rbp)
jmp 0x3779
movq -0x98(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x4500
movq -0xb8(%rbp), %rdi
movq %rax, -0xb0(%rbp)
callq 0x4520
movq -0xb0(%rbp), %rdi
movl %eax, %esi
callq 0x8af0
movw %ax, -0xa2(%rbp)
jmp 0x37be
movw -0xa2(%rbp), %ax
movw %ax, -0x72(%rbp)
movb -0x72(%rbp), %al
movb %al, -0x73(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x73(%rbp), %rsi
callq 0x4540
jmp 0x37de
movb -0x71(%rbp), %al
movb %al, -0x74(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x74(%rbp), %rsi
callq 0x4540
jmp 0x37f3
movq -0x90(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x45c0
jmp 0x3805
leaq -0x30(%rbp), %rdi
callq 0x4690
movq -0x88(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x4690
movq -0x40(%rbp), %rdi
callq 0x3390
nopl (%rax)
// File: jorbs[P]stellar-keypair-tool/./lib/basen.h
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> bn::encode_b32<std::vector<unsigned char, std::allocator<unsigned char>>>(std::vector<unsigned char, std::allocator<unsigned char>> const&)
inline
std::string encode_b32(T const& v)
{
    std::string res;
    res.reserve(encoded_size64(v.size()*sizeof(typename T::value_type)) + 1);
    encode_b32(v.begin(), v.end(), std::back_inserter(res));
    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x32f0
movq -0x10(%rbp), %rdi
callq 0x4520
movq %rax, %rdi
callq 0x7030
movq %rax, -0x48(%rbp)
jmp 0x45fb
movq -0x58(%rbp), %rdi
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x3340
jmp 0x460d
movq -0x10(%rbp), %rdi
callq 0x70a0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x70d0
movq -0x58(%rbp), %rdi
movq %rax, -0x38(%rbp)
callq 0x7100
movq %rax, -0x60(%rbp)
jmp 0x4636
movq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x7050
jmp 0x4651
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x467d
jmp 0x4674
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x3418
jmp 0x4687
movq -0x58(%rbp), %rdi
callq 0x3418
movq -0x50(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x3390
// File: jorbs[P]stellar-keypair-tool/./lib/basen.h
// Function: bn::impl::extract_partial_bits(char, unsigned int, unsigned int)
inline char extract_partial_bits(char value, unsigned int start_bit, unsigned int bits_count)
{
    assert(start_bit + bits_count < 8);
    char t1 = value >> (8 - bits_count - start_bit);
    char t2 = t1 & ~(-1 << bits_count);
    return t2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl -0x8(%rbp), %eax
addl -0xc(%rbp), %eax
cmpl $0x8, %eax
jae 0x73b1
jmp 0x73d0
leaq 0x1e0f(%rip), %rdi      # 0x91c7
leaq 0x1e23(%rip), %rsi      # 0x91e2
movl $0xff, %edx
leaq 0x1e25(%rip), %rcx      # 0x91f0
callq 0x3110
movsbl -0x1(%rbp), %eax
movl $0x8, %ecx
subl -0xc(%rbp), %ecx
subl -0x8(%rbp), %ecx
sarl %cl, %eax
movb %al, -0xd(%rbp)
movsbl -0xd(%rbp), %eax
movl -0xc(%rbp), %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
shll %cl, %edx
movl %edx, %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
movb %al, -0xe(%rbp)
movb -0xe(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: jorbs[P]stellar-keypair-tool/./lib/basen.h
// Function: bn::impl::extract_overlapping_bits(char, char, unsigned int, unsigned int)
inline char extract_overlapping_bits(char previous, char next, unsigned int start_bit, unsigned int bits_count)
{
    assert(start_bit + bits_count < 16);
    int bits_count_in_previous = 8 - start_bit;
    int bits_count_in_next = bits_count - bits_count_in_previous;
    char t1 = (previous << bits_count_in_next) & 0xFF;
    char t2 = next >> (8 - bits_count_in_next) & ~(-1 << bits_count_in_next);
    return (t1 | t2) & ~(-1 << bits_count);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movb %dil, %sil
movb %sil, -0x1(%rbp)
movb %al, -0x2(%rbp)
movl %edx, -0x8(%rbp)
movl %ecx, -0xc(%rbp)
movl -0x8(%rbp), %eax
addl -0xc(%rbp), %eax
cmpl $0x10, %eax
jae 0x7558
jmp 0x7577
leaq 0x1d24(%rip), %rdi      # 0x9283
leaq 0x1c7c(%rip), %rsi      # 0x91e2
movl $0x107, %edx            # imm = 0x107
leaq 0x1d2d(%rip), %rcx      # 0x929f
callq 0x3110
movl $0x8, %eax
subl -0x8(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
subl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
movsbl -0x1(%rbp), %eax
movl -0x14(%rbp), %ecx
shll %cl, %eax
andl $0xff, %eax
movb %al, -0x15(%rbp)
movsbl -0x2(%rbp), %eax
movl $0x8, %ecx
subl -0x14(%rbp), %ecx
sarl %cl, %eax
movl -0x14(%rbp), %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
shll %cl, %edx
movl %edx, %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
movb %al, -0x16(%rbp)
movsbl -0x15(%rbp), %eax
movsbl -0x16(%rbp), %ecx
orl %ecx, %eax
movl -0xc(%rbp), %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
shll %cl, %edx
movl %edx, %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: jorbs[P]stellar-keypair-tool/lib/crc16.cpp
// Function: crc16(char const*, int)
uint16_t crc16(const char *buf, int len) {
    int counter;
    uint16_t crc = 0;
    for (counter = 0; counter < len; counter++)
            crc = ((crc<<8) & uint16_t(0xFFFF)) ^
        crc16tab[((crc>>8) ^ *buf++) & uint16_t(0x00FF)];
    return crc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movw $0x0, -0x12(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x8b5c
movzwl -0x12(%rbp), %eax
shll $0x8, %eax
andl $0xffff, %eax           # imm = 0xFFFF
movzwl -0x12(%rbp), %ecx
sarl $0x8, %ecx
movq -0x8(%rbp), %rdx
movq %rdx, %rsi
addq $0x1, %rsi
movq %rsi, -0x8(%rbp)
movsbl (%rdx), %edx
xorl %edx, %ecx
andl $0xff, %ecx
movslq %ecx, %rdx
leaq 0x889(%rip), %rcx       # 0x93d0
movzwl (%rcx,%rdx,2), %ecx
xorl %ecx, %eax
movw %ax, -0x12(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x8b08
movw -0x12(%rbp), %ax
popq %rbp
retq
// File: searsm8[P]FM_Partitioning/fmpart.cpp
// Function: initialPartition()
void initialPartition()
{
	srand(time(0)); //use current time for random seed				
	int index;
	
	//randomly move cells into other partition until approximately half area in each
	while((float)partition_area[1] / (float)(partition_area[0] + partition_area[1]) < .5 )
	{
		//select a random cell to move to partition 1
		index = rand() % cells.size();
		if(cells[index]->partition == 0)
		{	
			cells[index]->partition = 1;
			cells[index]->best_partition = 1;
			partition_area[0] -= cells[index]->area;
			partition_area[1] += cells[index]->area;		
		}
	}
	
	printf("\nInitial Partition:\n");		
	printPartitionAreas();		
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorl %eax, %eax
movl %eax, %edi
callq 0x2190
movl %eax, %edi
callq 0x21b0
cvtsi2ssl 0xda90(%rip), %xmm0 # 0x112b0
movl 0xda86(%rip), %eax      # 0x112ac
addl 0xda84(%rip), %eax      # 0x112b0
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x77c8(%rip), %xmm0     # 0xb008
ucomisd %xmm1, %xmm0
jbe 0x3917
callq 0x2070
cltq
movq %rax, -0x10(%rbp)
leaq 0xda04(%rip), %rdi      # 0x11260
callq 0x5260
movq %rax, %rcx
movq -0x10(%rbp), %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x4(%rbp)
movslq -0x4(%rbp), %rsi
leaq 0xd9e3(%rip), %rdi      # 0x11260
callq 0x5280
movq (%rax), %rax
cmpl $0x0, 0x84(%rax)
jne 0x3912
movslq -0x4(%rbp), %rsi
leaq 0xd9c3(%rip), %rdi      # 0x11260
callq 0x5280
movq (%rax), %rax
movl $0x1, 0x84(%rax)
movslq -0x4(%rbp), %rsi
leaq 0xd9a6(%rip), %rdi      # 0x11260
callq 0x5280
movq (%rax), %rax
movl $0x1, 0x88(%rax)
movslq -0x4(%rbp), %rsi
leaq 0xd989(%rip), %rdi      # 0x11260
callq 0x5280
movq (%rax), %rax
movl 0x78(%rax), %ecx
movl 0xd9c4(%rip), %eax      # 0x112ac
subl %ecx, %eax
movl %eax, 0xd9bc(%rip)      # 0x112ac
movslq -0x4(%rbp), %rsi
leaq 0xd965(%rip), %rdi      # 0x11260
callq 0x5280
movq (%rax), %rax
movl 0x78(%rax), %eax
addl 0xd9a4(%rip), %eax      # 0x112b0
movl %eax, 0xd99e(%rip)      # 0x112b0
jmp 0x3818
leaq 0x77ed(%rip), %rdi      # 0xb10b
movb $0x0, %al
callq 0x2040
callq 0x3930
addq $0x10, %rsp
popq %rbp
retq
// File: searsm8[P]FM_Partitioning/fmpart.cpp
// Function: findCutsize()
void findCutsize()
{
	cut_size = 0;	
	
	//loop through each net. If there is at least one cell in each partition, add 1 to cutsize	
	for(int i = 0; i < nets.size(); i++)
	{		
		nets[i]->partition_count[0] = 0;
		nets[i]->partition_count[1] = 0;
		
		for(int j = 0; j < nets[i]->cell_list.size(); j++)
		{
			//count how many cells in each partition on this net
			nets[i]->partition_count[nets[i]->cell_list[j]->partition]++;			
		}
		
		if(nets[i]->partition_count[0] > 0 && nets[i]->partition_count[1] > 0)
			cut_size++;
	}				
	printf("Cutsize: %d\n", cut_size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, 0xd8c6(%rip)      # 0x112a8
movl $0x0, -0x4(%rbp)
movslq -0x4(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0xd8c0(%rip), %rdi      # 0x112b8
callq 0x52a0
movq %rax, %rcx
movq -0x10(%rbp), %rax
cmpq %rcx, %rax
jae 0x3b2a
movslq -0x4(%rbp), %rsi
leaq 0xd8a0(%rip), %rdi      # 0x112b8
callq 0x52c0
movq (%rax), %rax
movl $0x0, 0x6c(%rax)
movslq -0x4(%rbp), %rsi
leaq 0xd886(%rip), %rdi      # 0x112b8
callq 0x52c0
movq (%rax), %rax
movl $0x0, 0x70(%rax)
movl $0x0, -0x8(%rbp)
movslq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movslq -0x4(%rbp), %rsi
leaq 0xd85d(%rip), %rdi      # 0x112b8
callq 0x52c0
movq (%rax), %rdi
addq $0x78, %rdi
callq 0x5260
movq %rax, %rcx
movq -0x18(%rbp), %rax
cmpq %rcx, %rax
jae 0x3ad9
movslq -0x4(%rbp), %rsi
leaq 0xd835(%rip), %rdi      # 0x112b8
callq 0x52c0
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movslq -0x4(%rbp), %rsi
leaq 0xd81e(%rip), %rdi      # 0x112b8
callq 0x52c0
movq (%rax), %rdi
addq $0x78, %rdi
movslq -0x8(%rbp), %rsi
callq 0x5280
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq (%rcx), %rcx
movslq 0x84(%rcx), %rcx
movl 0x6c(%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, 0x6c(%rax,%rcx,4)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x3a48
movslq -0x4(%rbp), %rsi
leaq 0xd7d4(%rip), %rdi      # 0x112b8
callq 0x52c0
movq (%rax), %rax
cmpl $0x0, 0x6c(%rax)
jle 0x3b1a
movslq -0x4(%rbp), %rsi
leaq 0xd7bb(%rip), %rdi      # 0x112b8
callq 0x52c0
movq (%rax), %rax
cmpl $0x0, 0x70(%rax)
jle 0x3b1a
movl 0xd797(%rip), %eax      # 0x112a8
addl $0x1, %eax
movl %eax, 0xd78e(%rip)      # 0x112a8
jmp 0x3b1c
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x39e9
movl 0xd778(%rip), %esi      # 0x112a8
leaq 0x7634(%rip), %rdi      # 0xb16b
movb $0x0, %al
callq 0x2040
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: searsm8[P]FM_Partitioning/fmpart.cpp
// Function: printCutsize()
int printCutsize()  //finds and returns the cutsize from scratch
{
	int my_cut_size = 0;
	int my_partition_count[2];	
	
	//loop through each net. If there is at least one cell in each partition, add 1 to cutsize	
	for(int i = 0; i < nets.size(); i++)
	{		
		my_partition_count[0] = 0;
		my_partition_count[1] = 0;
		
		for(int j = 0; j < nets[i]->cell_list.size(); j++)
		{
			//count how many cells in each partition on this net
			my_partition_count[nets[i]->cell_list[j]->partition]++;			
		}

		if(my_partition_count[0] && my_partition_count[1])
			my_cut_size++;
	}		
		
	return my_cut_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl $0x0, -0x10(%rbp)
movslq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0xd743(%rip), %rdi      # 0x112b8
callq 0x52a0
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jae 0x3c34
movl $0x0, -0xc(%rbp)
movl $0x0, -0x8(%rbp)
movl $0x0, -0x14(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0x28(%rbp)
movslq -0x10(%rbp), %rsi
leaq 0xd706(%rip), %rdi      # 0x112b8
callq 0x52c0
movq (%rax), %rdi
addq $0x78, %rdi
callq 0x5260
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0x3c0f
movslq -0x10(%rbp), %rsi
leaq 0xd6de(%rip), %rdi      # 0x112b8
callq 0x52c0
movq (%rax), %rdi
addq $0x78, %rdi
movslq -0x14(%rbp), %rsi
callq 0x5280
movq (%rax), %rax
movslq 0x84(%rax), %rax
movl -0xc(%rbp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, -0xc(%rbp,%rax,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3b9f
cmpl $0x0, -0xc(%rbp)
je 0x3c24
cmpl $0x0, -0x8(%rbp)
je 0x3c24
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3c26
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x3b66
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: searsm8[P]FM_Partitioning/fmpart.cpp
// Function: saveBestSolution()
void saveBestSolution()
{	
	//keep track of the best solution found
	min_cut_size = cut_size;
			
	for(int i = 0; i < cells.size(); i++)
		cells[i]->best_partition = cells[i]->partition;
				
	//printf("SAVED new best solution: (cutsize = %d)\n", cut_size);	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl 0xd40a(%rip), %eax      # 0x112a8
movl %eax, 0xd42c(%rip)      # 0x112d0
movl $0x0, -0x4(%rbp)
movslq -0x4(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0xd3a6(%rip), %rdi      # 0x11260
callq 0x5260
movq %rax, %rcx
movq -0x10(%rbp), %rax
cmpq %rcx, %rax
jae 0x3f0e
movslq -0x4(%rbp), %rsi
leaq 0xd38a(%rip), %rdi      # 0x11260
callq 0x5280
movq (%rax), %rax
movl 0x84(%rax), %eax
movl %eax, -0x14(%rbp)
movslq -0x4(%rbp), %rsi
leaq 0xd36e(%rip), %rdi      # 0x11260
callq 0x5280
movl -0x14(%rbp), %ecx
movq (%rax), %rax
movl %ecx, 0x88(%rax)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3eab
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: searsm8[P]FM_Partitioning/fmpart.cpp
// Function: FMPartitionPass()
bool FMPartitionPass()
{
	printf("\n****BEGIN PARTITION PASS #%d****\n", pass_count);
	
	int starting_cut_size = cut_size;
	int swap_count = 0;
	positive_gains_exhausted = false; //true after the initial gain bucket has been exhausted of positive gains
					//used to prevent updating the best_partition too often	
	int saves_performed = 0;
	
	//perform moves until no legal moves remain
	while(performNextMove())
	{		
		swap_count++;
		
		//if a solution with better cut_size was found AND all positive gains have been exhausted
		if(positive_gains_exhausted && cut_size <= min_cut_size-20)
		{
			saveBestSolution();
			saves_performed++;
		}				
	} 	
		    	
	//revert back to the best solution that was found this pass
	recallBestSolution();
		
	printf("****PASS %d COMPLETE: ", pass_count);
	findCutsize();
	printTimestamp();
	
	if(starting_cut_size == cut_size) //if no improvement was made i.e. stuck in local minimum
		return false;
	else return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl 0xd036(%rip), %esi      # 0x111d4
leaq 0x6fd3(%rip), %rdi      # 0xb178
movb $0x0, %al
callq 0x2040
movl 0xd0f6(%rip), %eax      # 0x112a8
movl %eax, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movb $0x0, 0xd119(%rip)      # 0x112dc
movl $0x0, -0x10(%rbp)
callq 0x4250
testb $0x1, %al
jne 0x41d5
jmp 0x420a
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
testb $0x1, 0xd0f7(%rip)      # 0x112dc
je 0x4208
movl 0xd0bb(%rip), %eax      # 0x112a8
movl 0xd0dd(%rip), %ecx      # 0x112d0
subl $0x14, %ecx
cmpl %ecx, %eax
jg 0x4208
callq 0x3e90
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x41ca
callq 0x3f20
movl 0xcfbf(%rip), %esi      # 0x111d4
leaq 0x6f7f(%rip), %rdi      # 0xb19b
movb $0x0, %al
callq 0x2040
callq 0x39d0
callq 0x44c0
movl -0x8(%rbp), %eax
cmpl 0xd072(%rip), %eax      # 0x112a8
jne 0x423e
movb $0x0, -0x1(%rbp)
jmp 0x4242
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: searsm8[P]FM_Partitioning/fmpart.cpp
// Function: main
int main(int argc, char *argv[])
{	
	start_time = std::clock();
	timestamp = std::clock();
	
	//add the example number from the argument to the filepath	
	if(argc > 1) strcat(file_path, argv[1]);
	else strcat(file_path, "1"); //defaults to example 1
	strcat(file_path, "/");
	
	readCellsFile();
	readNetsFile();
	initialPartition();
	
	printf("Initial ");
	findCutsize();
	min_cut_size = cut_size; //initialize min_cut_size
	initial_partition_cut_size = cut_size; //remember the initial cut_size
	
	computeGains();	
	printTimestamp();
	printf("************************************************\n");
		
	int max_num_passes = 20;
	
	//perform passes until local minimum is found, or max_num_passes is exceeded
	while(FMPartitionPass() && pass_count < max_num_passes)
	{
		pass_count++;		
	}		
		
	printf("\n************************************************\nFinal partition areas:\n");
	printPartitionAreas();
	
	printf("Final ");
	findCutsize();
	
	printToFile();	
	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x2110
movq %rax, 0xc9de(%rip)      # 0x112e0
callq 0x2110
movq %rax, 0xc9da(%rip)      # 0x112e8
cmpl $0x1, -0x8(%rbp)
jle 0x492a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0xc88d(%rip), %rdi      # 0x111b0
callq 0x22f0
jmp 0x493d
leaq 0xc87f(%rip), %rdi      # 0x111b0
leaq 0x675a(%rip), %rsi      # 0xb092
callq 0x22f0
leaq 0xc86c(%rip), %rdi      # 0x111b0
leaq 0x6a90(%rip), %rsi      # 0xb3db
callq 0x22f0
callq 0x25c0
callq 0x32c0
callq 0x3800
leaq 0x6a77(%rip), %rdi      # 0xb3dd
movb $0x0, %al
callq 0x2040
callq 0x39d0
movl 0xc930(%rip), %eax      # 0x112a8
movl %eax, 0xc952(%rip)      # 0x112d0
movl 0xc924(%rip), %eax      # 0x112a8
movl %eax, 0xc94a(%rip)      # 0x112d4
callq 0x3c40
callq 0x44c0
leaq 0x6a4b(%rip), %rdi      # 0xb3e6
movb $0x0, %al
callq 0x2040
movl $0x14, -0x14(%rbp)
callq 0x4190
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x15(%rbp)
jne 0x49bc
jmp 0x49cb
movl 0xc812(%rip), %eax      # 0x111d4
cmpl -0x14(%rbp), %eax
setl %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
testb $0x1, %al
jne 0x49d4
jmp 0x49e5
movl 0xc7fa(%rip), %eax      # 0x111d4
addl $0x1, %eax
movl %eax, 0xc7f1(%rip)      # 0x111d4
jmp 0x49a9
leaq 0x6a2c(%rip), %rdi      # 0xb418
movb $0x0, %al
callq 0x2040
callq 0x3930
leaq 0x6a63(%rip), %rdi      # 0xb462
movb $0x0, %al
callq 0x2040
callq 0x39d0
callq 0x45b0
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: searsm8[P]FM_Partitioning/fmpart.cpp
// Function: CELL::updateGain(int)
void updateGain(int gain_change)
	{		
		//if the cell is locked, do nothing. Only update free cells.
		//because locked cells are no longer considered for this pass
		if(locked || fixed) return;
		
		//remove the old entry in gain bucket
		gain_bucket[partition].erase(gain_itr);
		
		gain += gain_change;
						
		//add the new entry to gain bucket, and set new gain_itr
		gain_itr = gain_bucket[partition].insert(pair <int, CELL*> (gain, this));		
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
testb $0x1, 0x7d(%rax)
jne 0x6807
movq -0x48(%rbp), %rax
testb $0x1, 0x7c(%rax)
je 0x680c
jmp 0x68aa
movq -0x48(%rbp), %rax
movslq 0x84(%rax), %rcx
leaq 0xa9e2(%rip), %rdi      # 0x11200
imulq $0x30, %rcx, %rcx
addq %rcx, %rdi
movq 0x90(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rsi
callq 0x67a0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x20(%rbp)
movl -0xc(%rbp), %ecx
addl 0x80(%rax), %ecx
movl %ecx, 0x80(%rax)
movslq 0x84(%rax), %rdx
leaq 0xa99f(%rip), %rcx      # 0x11200
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
movq %rcx, -0x50(%rbp)
movq %rax, %rsi
addq $0x80, %rsi
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x69a0
movq -0x50(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x5300
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq %rcx, 0x90(%rax)
addq $0x50, %rsp
popq %rbp
retq
// File: lunasorcery[P]brailify/./stb/stb_image_resize.h
// Function: stbir_resize_uint8
STBIRDEF int stbir_resize_uint8(     const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes,
                                           unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes,
                                     int num_channels)
{
    return stbir__resize_arbitrary(NULL, input_pixels, input_w, input_h, input_stride_in_bytes,
        output_pixels, output_w, output_h, output_stride_in_bytes,
        0,0,1,1,NULL,num_channels,-1,0, STBIR_TYPE_UINT8, STBIR_FILTER_DEFAULT, STBIR_FILTER_DEFAULT,
        STBIR_EDGE_CLAMP, STBIR_EDGE_CLAMP, STBIR_COLORSPACE_LINEAR);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movl %edx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
movl -0x24(%rbp), %r8d
movq -0x30(%rbp), %r9
movl -0x34(%rbp), %ebx
movl 0x10(%rbp), %r11d
movl 0x18(%rbp), %r10d
movl 0x20(%rbp), %eax
xorl %edi, %edi
xorps %xmm1, %xmm1
movss 0x1d76b(%rip), %xmm3    # 0x20004
xorl %r14d, %r14d
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movaps %xmm1, %xmm0
movaps %xmm3, %xmm2
movq $0x0, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movl $0xffffffff, 0x28(%rsp) # imm = 0xFFFFFFFF
movl $0x0, 0x30(%rsp)
movl $0x0, 0x38(%rsp)
movl $0x0, 0x40(%rsp)
movl $0x0, 0x48(%rsp)
movl $0x1, 0x50(%rsp)
movl $0x1, 0x58(%rsp)
movl $0x0, 0x60(%rsp)
callq 0x2910
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: lunasorcery[P]brailify/./stb/stb_image_resize.h
// Function: stbir_resize_uint8_srgb
STBIRDEF int stbir_resize_uint8_srgb(const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes,
                                           unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes,
                                     int num_channels, int alpha_channel, int flags)
{
    return stbir__resize_arbitrary(NULL, input_pixels, input_w, input_h, input_stride_in_bytes,
        output_pixels, output_w, output_h, output_stride_in_bytes,
        0,0,1,1,NULL,num_channels,alpha_channel,flags, STBIR_TYPE_UINT8, STBIR_FILTER_DEFAULT, STBIR_FILTER_DEFAULT,
        STBIR_EDGE_CLAMP, STBIR_EDGE_CLAMP, STBIR_COLORSPACE_SRGB);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movl 0x30(%rbp), %eax
movl 0x28(%rbp), %eax
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x28(%rbp)
movl %esi, -0x2c(%rbp)
movl %edx, -0x30(%rbp)
movl %ecx, -0x34(%rbp)
movq %r8, -0x40(%rbp)
movl %r9d, -0x44(%rbp)
movq -0x28(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
movl -0x34(%rbp), %r8d
movq -0x40(%rbp), %r9
movl -0x44(%rbp), %r15d
movl 0x10(%rbp), %r14d
movl 0x18(%rbp), %ebx
movl 0x20(%rbp), %r11d
movl 0x28(%rbp), %r10d
movl 0x30(%rbp), %eax
xorl %edi, %edi
xorps %xmm1, %xmm1
movss 0x1d429(%rip), %xmm3    # 0x20004
xorl %r12d, %r12d
movl %r15d, (%rsp)
movl %r14d, 0x8(%rsp)
movl %ebx, 0x10(%rsp)
movaps %xmm1, %xmm0
movaps %xmm3, %xmm2
movq $0x0, 0x18(%rsp)
movl %r11d, 0x20(%rsp)
movl %r10d, 0x28(%rsp)
movl %eax, 0x30(%rsp)
movl $0x0, 0x38(%rsp)
movl $0x0, 0x40(%rsp)
movl $0x0, 0x48(%rsp)
movl $0x1, 0x50(%rsp)
movl $0x1, 0x58(%rsp)
movl $0x1, 0x60(%rsp)
callq 0x2910
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: lunasorcery[P]brailify/./stb/stb_image_resize.h
// Function: stbir_resize_uint8_srgb_edgemode
STBIRDEF int stbir_resize_uint8_srgb_edgemode(const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes,
                                                    unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes,
                                              int num_channels, int alpha_channel, int flags,
                                              stbir_edge edge_wrap_mode)
{
    return stbir__resize_arbitrary(NULL, input_pixels, input_w, input_h, input_stride_in_bytes,
        output_pixels, output_w, output_h, output_stride_in_bytes,
        0,0,1,1,NULL,num_channels,alpha_channel,flags, STBIR_TYPE_UINT8, STBIR_FILTER_DEFAULT, STBIR_FILTER_DEFAULT,
        edge_wrap_mode, edge_wrap_mode, STBIR_COLORSPACE_SRGB);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl 0x38(%rbp), %eax
movl 0x30(%rbp), %eax
movl 0x28(%rbp), %eax
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x30(%rbp)
movl %esi, -0x34(%rbp)
movl %edx, -0x38(%rbp)
movl %ecx, -0x3c(%rbp)
movq %r8, -0x48(%rbp)
movl %r9d, -0x4c(%rbp)
movq -0x30(%rbp), %rsi
movl -0x34(%rbp), %edx
movl -0x38(%rbp), %ecx
movl -0x3c(%rbp), %r8d
movq -0x48(%rbp), %r9
movl -0x4c(%rbp), %r13d
movl 0x10(%rbp), %r12d
movl 0x18(%rbp), %r15d
movl 0x20(%rbp), %r14d
movl 0x28(%rbp), %ebx
movl 0x30(%rbp), %r11d
movl 0x38(%rbp), %r10d
movl 0x38(%rbp), %eax
movl %eax, -0x50(%rbp)
xorl %eax, %eax
movl %eax, %edi
xorps %xmm1, %xmm1
movss 0x1d337(%rip), %xmm3    # 0x20004
xorl %eax, %eax
movl -0x50(%rbp), %eax
movl %r13d, (%rsp)
movl %r12d, 0x8(%rsp)
movl %r15d, 0x10(%rsp)
movaps %xmm1, %xmm0
movaps %xmm3, %xmm2
movq $0x0, 0x18(%rsp)
movl %r14d, 0x20(%rsp)
movl %ebx, 0x28(%rsp)
movl %r11d, 0x30(%rsp)
movl $0x0, 0x38(%rsp)
movl $0x0, 0x40(%rsp)
movl $0x0, 0x48(%rsp)
movl %r10d, 0x50(%rsp)
movl %eax, 0x58(%rsp)
movl $0x1, 0x60(%rsp)
callq 0x2910
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: lunasorcery[P]brailify/./stb/stb_image_resize.h
// Function: stbir_resize_uint8_generic
STBIRDEF int stbir_resize_uint8_generic( const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes,
                                               unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes,
                                         int num_channels, int alpha_channel, int flags,
                                         stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, 
                                         void *alloc_context)
{
    return stbir__resize_arbitrary(alloc_context, input_pixels, input_w, input_h, input_stride_in_bytes,
        output_pixels, output_w, output_h, output_stride_in_bytes,
        0,0,1,1,NULL,num_channels,alpha_channel,flags, STBIR_TYPE_UINT8, filter, filter,
        edge_wrap_mode, edge_wrap_mode, space);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq 0x50(%rbp), %rax
movl 0x48(%rbp), %eax
movl 0x40(%rbp), %eax
movl 0x38(%rbp), %eax
movl 0x30(%rbp), %eax
movl 0x28(%rbp), %eax
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x30(%rbp)
movl %esi, -0x34(%rbp)
movl %edx, -0x38(%rbp)
movl %ecx, -0x3c(%rbp)
movq %r8, -0x48(%rbp)
movl %r9d, -0x4c(%rbp)
movq 0x50(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x34(%rbp), %edx
movl -0x38(%rbp), %ecx
movl -0x3c(%rbp), %r8d
movq -0x48(%rbp), %r9
movl -0x4c(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl 0x10(%rbp), %eax
movl %eax, -0x58(%rbp)
movl 0x18(%rbp), %eax
movl %eax, -0x54(%rbp)
movl 0x20(%rbp), %r13d
movl 0x28(%rbp), %r12d
movl 0x30(%rbp), %r15d
movl 0x40(%rbp), %r14d
movl 0x40(%rbp), %ebx
movl 0x38(%rbp), %r11d
movl 0x38(%rbp), %r10d
movl 0x48(%rbp), %eax
movl %eax, -0x50(%rbp)
xorps %xmm1, %xmm1
movss 0x1d22b(%rip), %xmm3    # 0x20004
xorl %eax, %eax
xorl %eax, %eax
movl -0x5c(%rbp), %eax
movl %eax, (%rsp)
movl -0x58(%rbp), %eax
movl %eax, 0x8(%rsp)
movl -0x54(%rbp), %eax
movl %eax, 0x10(%rsp)
movl -0x50(%rbp), %eax
movaps %xmm1, %xmm0
movaps %xmm3, %xmm2
movq $0x0, 0x18(%rsp)
movl %r13d, 0x20(%rsp)
movl %r12d, 0x28(%rsp)
movl %r15d, 0x30(%rsp)
movl $0x0, 0x38(%rsp)
movl %r14d, 0x40(%rsp)
movl %ebx, 0x48(%rsp)
movl %r11d, 0x50(%rsp)
movl %r10d, 0x58(%rsp)
movl %eax, 0x60(%rsp)
callq 0x2910
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)