LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/Actions/VarAction.cpp
// Function: VarGetAction::execute(void*, void*)
void* execute(void* inLeft, void* inRight)
	{
		if (!(*stackPtrPtr))
		{
			throw PhplusError("something fucked up big time. VarGetAction::execute called while stack pointer is still null", RUNTIME_ERROR);
		}
		
		void* out=malloc(returnType->getSize());
		memcpy(out, (char*)(*stackPtrPtr)+offset, returnType->getSize());
		return out;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq 0x78(%rdi), %rax
cmpq $0x0, (%rax)
je 0x6e544
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
movq %rax, %rdi
callq 0xa3a0
movq %rax, %r14
movq 0x28(%rbx), %rdi
movq 0x78(%rbx), %rax
movq (%rax), %r15
addq 0x80(%rbx), %r15
movq (%rdi), %rax
callq *0x38(%rax)
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xa270
movl $0x38, %edi
callq 0xa1b0
movq %rax, %rbx
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xecc8(%rip), %rsi      # 0x7d229
leaq 0xed1d(%rip), %rdx      # 0x7d285
leaq 0x18(%rsp), %rdi
callq 0xdfa8
xorps %xmm0, %xmm0
movq %rsp, %rcx
movaps %xmm0, (%rcx)
movb $0x1, %bpl
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
movl $0x4, %edx
callq 0x203f4
xorl %ebp, %ebp
leaq 0x2909f(%rip), %rsi     # 0x97638
leaq -0x59a7a(%rip), %rdx    # 0x14b26
movq %rbx, %rdi
callq 0xa4f0
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6e5ba
callq 0xdce4
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x6e5c9
callq 0xa2b0
testb %bpl, %bpl
jne 0x6e5d3
jmp 0x6e5db
movq %rax, %r14
movq %rbx, %rdi
callq 0xa240
movq %r14, %rdi
callq 0xa510
nop
// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/Actions/VarAction.cpp
// Function: VarGetAction::addToProg(std::shared_ptr<ActionData>, std::shared_ptr<ActionData>, CppProgram*)
void addToProg(Action inLeft, Action inRight, CppProgram* prog)
	{
		/*
		if ((nameHint=="me" || nameHint=="in") && getReturnType()->getType()==TypeBase::TUPLE)
		{
			prog->code(prog->getTypeCode(getReturnType()));
			prog->pushExpr();
				bool isFirst=true;
				for (auto i: *getReturnType()->getAllSubTypes())
				{
					if (!isFirst)
						prog->code(", ");
					isFirst=false;
					prog->name(i.name);
				}
			prog->popExpr();
		}
		else
		*/
		{
			prog->declareVar(nameHint, getReturnType());
			prog->name(nameHint);
		}
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rcx, %r14
movq %rdi, %rbx
movq 0x28(%rdi), %rax
movq %rax, (%rsp)
movq 0x30(%rdi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x6e61e
movq 0x2b998(%rip), %rcx     # 0x99fa8
cmpb $0x0, (%rcx)
je 0x6e61a
incl 0x8(%rax)
jmp 0x6e61e
lock
incl 0x8(%rax)
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x9421(%rip), %rdx      # 0x77a4f
leaq 0x10(%rsp), %rdi
movq %rdx, %rsi
callq 0xdfa8
addq $0x8, %rbx
movq %rsp, %rdx
leaq 0x10(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1c3d8
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x6e661
callq 0xa2b0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6e670
callq 0xdce4
movq 0xa0(%r14), %rdi
movq %rbx, %rsi
callq 0x1889c
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x6e6a0
callq 0xa2b0
jmp 0x6e6a0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6e6af
callq 0xdce4
movq %rbx, %rdi
callq 0xa510
nop
// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/Actions/VarAction.cpp
// Function: VarSetAction::execute(void*, void*)
void* execute(void* left, void* right)
	{
		if (!(*stackPtrPtr))
		{
			throw PhplusError("something fucked up big time. VarSetAction::execute called while stack pointer is still null", RUNTIME_ERROR);
		}
		
		//copy data on to the stack location of the var
		memcpy((char*)(*stackPtrPtr)+offset, right, inRightType->getSize());
		
		//return a new copy of the data
		void* out=malloc(returnType->getSize());
		memcpy(out, (char*)(*stackPtrPtr)+offset, inRightType->getSize());
		//return out;
		return nullptr;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq 0x78(%rdi), %rax
movq (%rax), %r15
testq %r15, %r15
je 0x6e790
movq %rdx, %r14
movq %rdi, %rbx
addq 0x80(%rdi), %r15
movq 0x48(%rdi), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xa270
movq 0x28(%rbx), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
movq 0x48(%rbx), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x38, %edi
callq 0xa1b0
movq %rax, %rbx
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xeade(%rip), %rsi      # 0x7d28b
leaq 0xeb33(%rip), %rdx      # 0x7d2e7
leaq 0x18(%rsp), %rdi
callq 0xdfa8
xorps %xmm0, %xmm0
movq %rsp, %rcx
movaps %xmm0, (%rcx)
movb $0x1, %bpl
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
movl $0x4, %edx
callq 0x203f4
xorl %ebp, %ebp
leaq 0x28e53(%rip), %rsi     # 0x97638
leaq -0x59cc6(%rip), %rdx    # 0x14b26
movq %rbx, %rdi
callq 0xa4f0
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6e806
callq 0xdce4
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x6e815
callq 0xa2b0
testb %bpl, %bpl
jne 0x6e81f
jmp 0x6e827
movq %rax, %r14
movq %rbx, %rdi
callq 0xa240
movq %r14, %rdi
callq 0xa510
nop
// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/Actions/VarAction.cpp
// Function: VarSetAction::addToProg(std::shared_ptr<ActionData>, std::shared_ptr<ActionData>, CppProgram*)
void addToProg(Action inLeft, Action inRight, CppProgram* prog)
	{
		/*
		if ((nameHint=="me" || nameHint=="in") && getReturnType()->getType()==TypeBase::TUPLE)
		{
			if (prog->getExprLevel()>0)
			{
				throw PhplusError("can not set 'in' or 'me' inside expression in C++ because of some really dumb reason", INTERNAL_ERROR);
			}
			
			prog->pushBlock();
				prog->code(prog->getTypeCode(inRight->getReturnType()));
				prog->code(" tmp = ");
				prog->pushExpr();
					inRight->addToProg(prog);
				prog->popExpr();
				prog->endln();
				auto subs=*getReturnType()->getAllSubTypes();
				for (int i=0; i<(int)subs.size(); i++)
				{
					prog->name(subs[i].name);
					prog->code(" = ");
					prog->code("tmp."+(*inRight->getReturnType()->getAllSubTypes())[i].name);
					//prog->pushExpr();
						//getElemFromTupleAction(inRight->getReturnType(), (*inRight->getReturnType()->getAllSubTypes())[i].name)->addToProg(var, voidAction, prog);
					//prog->popExpr();
					prog->endln();
				}
			prog->popBlock();
		}
		else
		*/
		{
			prog->declareVar(nameHint, getInRightType());
			prog->name(nameHint);
			prog->code(" = ");
			prog->pushExpr();
			inRight->addToProg(prog);
			prog->popExpr();
			//if (prog->getExprLevel()==0)
			//	prog->endln();
		}
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq 0x48(%rdi), %rax
movq %rax, 0x8(%rsp)
movq 0x50(%rdi), %rax
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x6e870
movq 0x2b746(%rip), %rcx     # 0x99fa8
cmpb $0x0, (%rcx)
je 0x6e86c
incl 0x8(%rax)
jmp 0x6e870
lock
incl 0x8(%rax)
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x91ce(%rip), %rdx      # 0x77a4f
leaq 0x38(%rsp), %rdi
movq %rdx, %rsi
callq 0xdfa8
addq $0x8, %r15
leaq 0x8(%rsp), %rdx
leaq 0x38(%rsp), %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1c3d8
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x6e8b6
callq 0xa2b0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x6e8c5
callq 0xdce4
movq 0xa0(%rbx), %rdi
movq %r15, %rsi
callq 0x1889c
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xc057(%rip), %rsi      # 0x7a93b
leaq 0xc053(%rip), %rdx      # 0x7a93e
leaq 0x18(%rsp), %rdi
callq 0xdfa8
movq 0xa0(%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0x1861a
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x6e915
callq 0xa2b0
movq 0xa0(%rbx), %rdi
callq 0x18e22
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x4ff7c
movq 0xa0(%rbx), %rdi
callq 0x18e94
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x6e983
callq 0xa2b0
jmp 0x6e983
movq %rax, %rbx
jmp 0x6e983
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x6e974
callq 0xa2b0
jmp 0x6e974
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x6e983
callq 0xdce4
movq %rbx, %rdi
callq 0xa510
nop
// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/utils/fileUtils.cpp
// Function: loadFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void loadFile(string filepath, string& contents)
{
	std::fstream inFile;
	
	inFile.open(filepath);
	
	if (!inFile.is_open())
	{
		throw "tidak bisa membuka '"+filepath+"'";
	}
	else
	{
		stringstream strStream;
		strStream << inFile.rdbuf();//read the file
		contents = strStream.str();//str holds the content of the file
		inFile.close();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x3b8, %rsp            # imm = 0x3B8
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1a8(%rsp), %r15
movq %r15, %rdi
callq 0xa340
movq %r15, %rdi
movq %r14, %rsi
movl $0x18, %edx
callq 0xa3c0
leaq 0x228(%rsp), %rdi
callq 0xa0c0
testb %al, %al
je 0x6f31b
leaq 0x20(%rsp), %rdi
callq 0xa220
leaq 0x30(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
callq 0xa0a0
leaq 0x38(%rsp), %rsi
movq %rsp, %rdi
callq 0xa4a0
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa370
movq (%r14), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x6f2d5
callq 0xa2b0
leaq 0x1a8(%rsp), %rdi
callq 0xa050
movq 0x2ac8f(%rip), %rsi     # 0x99f78
leaq 0x20(%rsp), %rdi
callq 0xa250
leaq 0xa0(%rsp), %rdi
callq 0xa120
leaq 0x1a8(%rsp), %rdi
callq 0xa0b0
addq $0x3b8, %rsp            # imm = 0x3B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xa1b0
movq %rax, %rbx
leaq 0xe108(%rip), %rsi      # 0x7d437
leaq 0x20(%rsp), %rdi
movq %r14, %rdx
callq 0xdc11
movb $0x1, %bpl
leaq 0xcf24(%rip), %rdx      # 0x7c26a
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f4ff
xorl %ebp, %ebp
leaq 0x295f4(%rip), %rsi     # 0x98950
movq 0x2ac25(%rip), %rdx     # 0x99f88
movq %rbx, %rdi
callq 0xa4f0
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6f381
callq 0xa2b0
testb %bpl, %bpl
jne 0x6f38b
jmp 0x6f3bf
movq %rax, %r14
movq %rbx, %rdi
callq 0xa240
jmp 0x6f3bf
jmp 0x6f39e
jmp 0x6f399
movq %rax, %r14
jmp 0x6f3bf
movq %rax, %r14
movq 0x2abd0(%rip), %rsi     # 0x99f78
leaq 0x20(%rsp), %rdi
callq 0xa250
leaq 0xa0(%rsp), %rdi
callq 0xa120
leaq 0x1a8(%rsp), %rdi
callq 0xa0b0
movq %r14, %rdi
callq 0xa510
// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/utils/fileUtils.cpp
// Function: writeFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void writeFile(string filepath, const string& contents)
{
	std::ofstream outFile;
	
	outFile.open(filepath);
	
	if (!outFile.is_open())
	{
		throw "error writing to '"+filepath+"'";
	}
	else
	{
		outFile << contents;
		
		outFile.close();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0xa4e0
movq %r15, %rdi
movq %r14, %rsi
movl $0x10, %edx
callq 0xa190
leaq 0x98(%rsp), %rdi
callq 0xa0c0
testb %al, %al
je 0x6f470
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
leaq 0x28(%rsp), %rdi
callq 0xa320
leaq 0x28(%rsp), %rdi
callq 0xa430
movq 0x2ab61(%rip), %rax     # 0x99f98
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x30(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x28(%rsp,%rcx)
callq 0xa280
leaq 0x120(%rsp), %rdi
callq 0xa120
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xa1b0
movq %rax, %rbx
leaq 0xdfc8(%rip), %rsi      # 0x7d44c
leaq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0xdc11
movb $0x1, %bpl
leaq 0xcdcf(%rip), %rdx      # 0x7c26a
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f4ff
xorl %ebp, %ebp
leaq 0x2949f(%rip), %rsi     # 0x98950
movq 0x2aad0(%rip), %rdx     # 0x99f88
movq %rbx, %rdi
callq 0xa4f0
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6f4d6
callq 0xa2b0
testb %bpl, %bpl
jne 0x6f4e0
jmp 0x6f4ed
movq %rax, %r14
movq %rbx, %rdi
callq 0xa240
jmp 0x6f4ed
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0xa450
movq %r14, %rdi
callq 0xa510
// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/utils/stringArray.cpp
// Function: str::getMaxWidth(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
int getMaxWidth(vector<string>& in)
{
	int out=0;
	
	for (int i=0; i<(int)in.size(); i++)
	{
		int w=getWidth(in[i]);
		
		if (w>out)
			out=w;
	}
	
	return out;
}

// Assembly:
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
subq %rcx, %rdx
shrq $0x5, %rdx
testl %edx, %edx
jle 0x6f5ed
pushq %rbp
pushq %r14
pushq %rbx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %esi, %esi
xorl %eax, %eax
movq %rsi, %r9
shlq $0x5, %r9
movq 0x8(%rcx,%r9), %rdi
movl $0x0, %r8d
testl %edi, %edi
jle 0x6f5d9
addq %rcx, %r9
movq (%r9), %r9
movl %edi, %r10d
andl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
xorl %r8d, %r8d
xorl %r11d, %r11d
movslq %r11d, %r11
leaq 0x1(%r11), %rbx
cmpq %r10, %rbx
cmovleq %r10, %rbx
leaq -0x1(%rbx), %r14
cmpq %r11, %r14
je 0x6f5ce
movb 0x1(%r9,%r11), %bpl
incq %r11
andb $-0x40, %bpl
negb %bpl
jo 0x6f5b6
jmp 0x6f5d1
movq %rbx, %r11
incl %r8d
cmpl %edi, %r11d
jl 0x6f5a4
cmpl %eax, %r8d
cmovgl %r8d, %eax
incq %rsi
cmpq %rdx, %rsi
jne 0x6f578
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/utils/stringArray.cpp
// Function: str::padWidths(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, int, str::StringPadAlignment, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void padWidths(vector<string>& out, int size, StringPadAlignment alignment, string pad, string leftCap, string rightCap)
{
	if (size<0)
	{
		size=getMaxWidth(out);
	}
	
	for (int i=0; i<(int)out.size(); i++)
	{
		out[i]=str::pad(out[i], size, alignment, pad, leftCap, rightCap);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r9, 0x10(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movl %edx, 0xc(%rsp)
movq %rdi, %r12
movl %esi, 0x8(%rsp)
testl %esi, %esi
jns 0x6f62b
movq %r12, %rdi
callq 0x6f554
movl %eax, 0x8(%rsp)
movq (%r12), %rbp
movq 0x8(%r12), %rax
subq %rbp, %rax
shrq $0x5, %rax
testl %eax, %eax
jle 0x6f767
xorl %r13d, %r13d
leaq 0x88(%rsp), %r15
xorl %ebx, %ebx
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0xde0c
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0xde0c
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %r14
movq %r14, %rdi
callq 0xde0c
addq %r13, %rbp
movq %r14, (%rsp)
movq %r15, %rdi
movq %rbp, %rsi
movl 0x8(%rsp), %edx
movl 0xc(%rsp), %ecx
leaq 0x48(%rsp), %r8
leaq 0x28(%rsp), %r9
callq 0x7593a
movq (%r12), %rdi
addq %r13, %rdi
movq %r15, %rsi
callq 0xa370
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x6f709
callq 0xa2b0
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x6f71d
callq 0xa2b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x6f731
callq 0xa2b0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x6f745
callq 0xa2b0
incq %rbx
movq (%r12), %rbp
movq 0x8(%r12), %rax
subq %rbp, %rax
shrq $0x5, %rax
cltq
addq $0x20, %r13
cmpq %rax, %rbx
jl 0x6f650
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x6f7ae
movq %rax, %rbx
jmp 0x6f79a
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x6f79a
callq 0xa2b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x6f7ae
callq 0xa2b0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x6f7c2
callq 0xa2b0
movq %rbx, %rdi
callq 0xa510
// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/utils/stringArray.cpp
// Function: str::join(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
string join(vector<string>& in, string joiner, bool addAtEnd)
{
	string out;
	
	for (int i=0; i<(int)in.size(); i++)
	{
		out+=in[i];
		
		if (addAtEnd || i!=(int)in.size()-1)
			out+=joiner;
	}
	
	return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
shrq $0x5, %rcx
testl %ecx, %ecx
jle 0x6f86a
movq %rdx, %r14
movq %rsi, %r15
movl $0x8, %r13d
xorl %r12d, %r12d
movq -0x8(%rax,%r13), %rsi
movq (%rax,%r13), %rdx
movq %rbx, %rdi
callq 0xa110
testb %bpl, %bpl
jne 0x6f83e
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
shrq $0x5, %rcx
leal -0x1(%rcx), %edx
cmpq %rdx, %r12
je 0x6f85b
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0xa110
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
shrq $0x5, %rcx
incq %r12
movslq %ecx, %rcx
addq $0x20, %r13
cmpq %rcx, %r12
jl 0x6f812
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x6f88d
callq 0xa2b0
movq %r14, %rdi
callq 0xa510
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/utils/stringDrawing.cpp
// Function: str::putStringInTreeNodeBox(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string putStringInTreeNodeBox(const string& in)
{
	vector<string> ary;
	splitByLine(ary, in);
	putArrayInTreeNodeBox(ary);
	return join(ary);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x48(%rsp), %r14
movq %r14, -0x10(%r14)
movw $0xa, (%r14)
movq $0x1, -0x8(%r14)
leaq 0x38(%rsp), %rdx
xorl %ecx, %ecx
callq 0x75760
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x714f8
callq 0xa2b0
movq %rsp, %rdi
callq 0x70dd8
leaq 0x28(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x6a18(%rip), %rsi      # 0x77f28
leaq 0x6a12(%rip), %rdx      # 0x77f29
leaq 0x18(%rsp), %rdi
callq 0xdfa8
movq %rsp, %rsi
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x6f7ca
movq 0x18(%rsp), %rdi
cmpq %r14, %rdi
je 0x71545
callq 0xa2b0
movq %rsp, %rdi
callq 0x14adc
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
jmp 0x71571
jmp 0x71564
movq %rax, %rbx
jmp 0x7157b
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x7157b
callq 0xa2b0
movq %rsp, %rdi
callq 0x14adc
movq %rbx, %rdi
callq 0xa510
// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/utils/stringNumConversion.cpp
// Function: str::charToCppStringLiteralEscaped[abi:cxx11](unsigned char)
string charToCppStringLiteralEscaped(unsigned char c)
{
	string out="\\";
	
	for (int i=0; i<3; i++)
	{
		out+=c%8+'0';
		c/=8;
	}
	
	return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
leaq 0x2b10(%rip), %rsi      # 0x78152
leaq 0x2b0a(%rip), %rdx      # 0x78153
callq 0xdfa8
movl $0x3, %r14d
movl %ebp, %eax
andb $0x7, %al
orb $0x30, %al
movzbl %al, %esi
movq %rbx, %rdi
callq 0xa290
shrb $0x3, %bpl
decl %r14d
jne 0x75654
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x7568c
callq 0xa2b0
movq %r14, %rdi
callq 0xa510
// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/utils/stringNumConversion.cpp
// Function: str::intToBase62[abi:cxx11](unsigned int, int)
string intToBase62(unsigned int num, int maxDigits)
{
	int i=0;
	string out;
	
	while (num!=0 && (maxDigits<0 || i<maxDigits))
	{
		unsigned int digit=num%62;
		
		if (digit<10)
		{
			out+=(char)(digit+'0');
		}
		else if (digit<10+26)
		{
			out+=(char)(digit-10+'a');
		}
		else if (digit<10+26+26)
		{
			out+=(char)(digit-10-26+'A');
		}
		else
		{
			out+="_"; // this shouldn't happen
		}
		
		num/=62;
		i++;
	}
	
	return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
testl %esi, %esi
je 0x75725
movl %edx, %ebp
movl %esi, %r14d
xorl %r12d, %r12d
movl $0x84210843, %r13d      # imm = 0x84210843
testl %ebp, %ebp
sets %al
cmpl %ebp, %r12d
setl %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x75725
movl %r14d, %r15d
shrl %r15d
imulq %r13, %r15
shrq $0x24, %r15
movl %r15d, %ecx
shll $0x6, %ecx
leal (%r15,%r15), %eax
subl %ecx, %eax
addl %r14d, %eax
cmpl $0x9, %eax
ja 0x75703
orb $0x30, %al
jmp 0x7570e
cmpl $0x23, %eax
ja 0x7570c
addb $0x57, %al
jmp 0x7570e
addb $0x1d, %al
movsbl %al, %esi
movq %rbx, %rdi
callq 0xa290
incl %r12d
cmpl $0x3d, %r14d
movl %r15d, %r14d
ja 0x756cb
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x75748
callq 0xa2b0
movq %r14, %rdi
callq 0xa510
// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/utils/stringUtils.cpp
// Function: str::getGlyphPosOf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int getGlyphPosOf(const string& in, string pattern)
{
	int glyph=0;
	int byte=0;
	
	while (byte<(int)in.size())
	{
		if (subMatches(in, byte, pattern))
			return glyph;
		
		nextGlyph(byte, in);
		glyph++;
	}
	
	return -1;
}

// Assembly:
movq 0x8(%rdi), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jle 0x7693f
pushq %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rdx
movl %ecx, %edi
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
xorl %r8d, %r8d
xorl %r9d, %r9d
testl %r9d, %r9d
js 0x768dc
movq 0x8(%rsi), %r10
movl %r9d, %r11d
leaq (%r10,%r11), %rbx
cmpq %rcx, %rbx
jbe 0x76911
movslq %r9d, %r9
leaq 0x1(%r9), %r10
cmpq %rdi, %r10
cmovleq %rdi, %r10
leaq -0x1(%r10), %r11
cmpq %r9, %r11
je 0x76904
movb 0x1(%rdx,%r9), %bl
incq %r9
andb $-0x40, %bl
negb %bl
jo 0x768ee
jmp 0x76907
movq %r10, %r9
incl %r8d
cmpl %ecx, %r9d
jl 0x768c7
jmp 0x7693b
testl %r10d, %r10d
jle 0x76938
movq (%rsi), %rbx
andl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
addq %rdx, %r11
xorl %r14d, %r14d
movb (%r11,%r14), %bpl
cmpb (%rbx,%r14), %bpl
jne 0x768dc
incq %r14
cmpq %r14, %r10
jne 0x76926
movl %r8d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/aronszanto[P]strassen/main.cpp
// Function: initMatrix(Matrix*, int)
void initMatrix(Matrix* M, int dimension){
    M->dimension = dimension;
    M->matrix.resize(dimension);
    for (int i = 0; i < dimension; i++){
        M->matrix[i].resize(dimension);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, (%rdi)
addq $0x8, %rbx
movslq %esi, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6fa2
testl %r14d, %r14d
jle 0x24a6
movl %ebp, %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %r15
xorl %r12d, %r12d
movq (%rbx), %rdi
addq %r12, %rdi
movq %r14, %rsi
callq 0x7024
addq $0x18, %r12
cmpq %r12, %r15
jne 0x248f
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/aronszanto[P]strassen/main.cpp
// Function: printMatrix(Matrix&)
void printMatrix(Matrix& A){
    for (int i = 0; i < A.dimension; i ++){
        for (int j = 0; j < A.dimension; j++){
            cout << A.matrix[i][j] << " ";
        }
        cout << endl;
    }
    cout << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rdi), %eax
testl %eax, %eax
jle 0x253e
movq %rdi, %rbx
xorl %r12d, %r12d
movq 0xbb0b(%rip), %r14      # 0xdfd8
leaq 0x76ae(%rip), %r15      # 0x9b82
testl %eax, %eax
jle 0x250c
leaq (%r12,%r12,2), %r13
xorl %ebp, %ebp
movq 0x8(%rbx), %rax
movq (%rax,%r13,8), %rax
movl (%rax,%rbp,4), %esi
movq %r14, %rdi
callq 0x22a0
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21c0
incq %rbp
movslq (%rbx), %rax
cmpq %rax, %rbp
jl 0x24de
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
incq %r12
movslq (%rbx), %rax
cmpq %rax, %r12
jl 0x24d4
movq 0xba93(%rip), %rbx      # 0xdfd8
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2120
// File: /workspace/github_cpp_makefile_star2_O3/aronszanto[P]strassen/main.cpp
// Function: isEqual(Matrix*, Matrix*)
bool isEqual(Matrix* A, Matrix* B){
    if (A->dimension != B->dimension) {
        return false;
    }
    else
    {
        for (int i = 0; i < A->dimension; ++i) {
            for (int j = 0; j < A->dimension; ++j) {
                if (A->matrix[i][j] != B->matrix[i][j]){
                    return false;
                }
            }
        }
        return true;
    }
}

// Assembly:
movl (%rdi), %ecx
cmpl (%rsi), %ecx
jne 0x25c3
movb $0x1, %al
testl %ecx, %ecx
jle 0x25c5
movq 0x8(%rdi), %rdx
movq 0x8(%rsi), %rsi
xorl %edi, %edi
leaq (,%rdi,8), %r8
leaq (%r8,%r8,2), %r9
movq (%rdx,%r9), %r8
movq (%rsi,%r9), %r9
xorl %r10d, %r10d
movl (%r8,%r10,4), %r11d
cmpl (%r9,%r10,4), %r11d
jne 0x25c3
incq %r10
cmpq %r10, %rcx
jne 0x25a7
incq %rdi
cmpq %rcx, %rdi
jne 0x2590
jmp 0x25c5
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/aronszanto[P]strassen/main.cpp
// Function: findOptDim(int, int)
int findOptDim(int n, int convThreshold){
    int counter = 0;
    while (n > convThreshold){
        if (n%2 == 0)
            n /= 2;
        else
            n = (n+1)/2;
        counter ++;
    }
    return n*pow(2,counter);
}

// Assembly:
movl %edi, %eax
xorl %edi, %edi
cmpl %esi, %eax
jle 0x25e3
xorl %edi, %edi
movl %eax, %ecx
andl $0x1, %ecx
addl %eax, %ecx
sarl %ecx
incl %edi
movl %ecx, %eax
cmpl %esi, %ecx
jg 0x25d2
jmp 0x25e5
movl %eax, %ecx
pushq %rax
cvtsi2sd %ecx, %xmm0
movsd %xmm0, (%rsp)
movsd 0x6a11(%rip), %xmm0     # 0x9008
callq 0x2270
mulsd (%rsp), %xmm0
cvttsd2si %xmm0, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O3/aronszanto[P]strassen/main.cpp
// Function: initPadding(Matrix*, int)
void initPadding(Matrix* M, int newdim){
    M->dimension = newdim;

    M->matrix.resize(newdim);
    for (int i = 0; i < newdim; i++){
        M->matrix[i].resize(newdim);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, (%rdi)
addq $0x8, %rbx
movslq %esi, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6fa2
testl %r14d, %r14d
jle 0x2651
movl %ebp, %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %r15
xorl %r12d, %r12d
movq (%rbx), %rdi
addq %r12, %rdi
movq %r14, %rsi
callq 0x7024
addq $0x18, %r12
cmpq %r12, %r15
jne 0x263a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/aronszanto[P]strassen/main.cpp
// Function: removePadding(Matrix*, int)
void removePadding(Matrix* M, int newdim){
    M->dimension = newdim;

    M->matrix.resize(newdim);
    for (int i = 0; i < newdim; i++){
        M->matrix[i].resize(newdim);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, (%rdi)
addq $0x8, %rbx
movslq %esi, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6fa2
testl %r14d, %r14d
jle 0x26a4
movl %ebp, %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %r15
xorl %r12d, %r12d
movq (%rbx), %rdi
addq %r12, %rdi
movq %r14, %rsi
callq 0x7024
addq $0x18, %r12
cmpq %r12, %r15
jne 0x268d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/aronszanto[P]strassen/main.cpp
// Function: convMult(Matrix*, Matrix*, Matrix*, int, int, int, int, int, int, int)
void convMult(Matrix* A, Matrix* B, Matrix* C, int topA, int leftA, int topB, int leftB, int topC, int leftC, int dimension) {
    for (int i = 0; i < dimension; ++i)
		for (int k = 0; k < dimension; ++k)
			for (int j = 0; j < dimension; ++j)
                if (k == 0) 
                    C->matrix[topC + i][leftC + j] = A->matrix[topA + i][leftA + k] * B->matrix[topB + k][leftB + j]; 
				else
                    C->matrix[topC + i][leftC + j] += A->matrix[topA + i][leftA + k] * B->matrix[topB + k][leftB + j];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl 0x50(%rsp), %ebx
testl %ebx, %ebx
jle 0x2901
movq %rdi, %r10
movslq %r8d, %rax
movslq %r9d, %r8
movslq 0x38(%rsp), %rdi
movq %rdi, -0x8(%rsp)
movslq 0x48(%rsp), %rdi
movq %rdi, -0x10(%rsp)
movslq %ecx, %r9
movslq 0x40(%rsp), %rcx
movq %rcx, -0x20(%rsp)
movl %ebx, %ecx
leaq (%r9,%r9,2), %rdi
shlq $0x3, %rdi
addq 0x8(%r10), %rdi
movq %rdi, -0x28(%rsp)
xorl %r9d, %r9d
leaq (%r8,%r8,2), %rbx
movq -0x20(%rsp), %rdi
leaq (%r9,%rdi), %r8
movq %r9, -0x18(%rsp)
leaq (%r9,%r9,2), %r9
movq -0x28(%rsp), %rdi
movq (%rdi,%r9,8), %r14
leaq (%r14,%rax,4), %r15
leaq (%r8,%r8,2), %r12
xorl %r13d, %r13d
leaq (,%r13,2), %rbp
addq %r13, %rbp
shlq $0x3, %rbp
movq %rcx, %r10
movq -0x8(%rsp), %r8
movq -0x10(%rsp), %r9
testq %r13, %r13
je 0x28c0
movq 0x8(%rsi), %rdi
addq %rbp, %rdi
movq (%rdi,%rbx,8), %rdi
movl (%rdi,%r8,4), %edi
imull (%r15,%r13,4), %edi
movq 0x8(%rdx), %r11
movq (%r11,%r12,8), %r11
addl %edi, (%r11,%r9,4)
jmp 0x28dd
movq 0x8(%rsi), %rdi
movq (%rdi,%rbx,8), %rdi
movl (%rdi,%r8,4), %edi
imull (%r14,%rax,4), %edi
movq 0x8(%rdx), %r11
movq (%r11,%r12,8), %r11
movl %edi, (%r11,%r9,4)
incq %r9
incq %r8
decq %r10
jne 0x2899
incq %r13
cmpq %rcx, %r13
jne 0x287d
movq -0x18(%rsp), %r9
incq %r9
cmpq %rcx, %r9
jne 0x2857
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/aronszanto[P]strassen/main.cpp
// Function: multiply(Matrix*, Matrix*, Matrix*, int, int, int, int, int, int, int)
void multiply(Matrix* A, Matrix* B, Matrix* C, int topA, int leftA, int topB, int leftB, int topC, int leftC, int dimension){
    if (dimension > convThreshold) {
        if (dimension > threadThresh)
            strassenMultThread(A, B, C, topA, leftA, topB, leftB, topC, leftC, dimension);
        else
            strassenMult(A, B, C, topA, leftA, topB, leftB, topC, leftC, dimension);
        
    }
    else
        convMult(A, B, C, topA, leftA, topB, leftB, topC, leftC, dimension);
}

// Assembly:
pushq %rbx
movl 0x28(%rsp), %ebx
cmpl %ebx, 0xb31f(%rip)      # 0xe1a0
jge 0x2ea6
movl 0x20(%rsp), %r11d
movl 0x18(%rsp), %r10d
movl 0x10(%rsp), %eax
cmpl %ebx, 0xb305(%rip)      # 0xe19c
jge 0x2eac
pushq %rbx
pushq %r11
pushq %r10
pushq %rax
callq 0x2ebd
jmp 0x2eb7
popq %rbx
jmp 0x27fd
pushq %rbx
pushq %r11
pushq %r10
pushq %rax
callq 0x290c
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/aronszanto[P]strassen/main.cpp
// Function: multiply(Matrix*, Matrix*)
Matrix* multiply(Matrix* A, Matrix* B){
    if (A->dimension != B->dimension)
        return NULL;
    int dimension = A->dimension;
    Matrix* C = new Matrix();
    initMatrix(C, A->dimension);
    
    int padding = findOptDim(dimension, convThreshold);
    initPadding(A, padding);
    initPadding(B, padding);
    initPadding(C, padding);
    multiply(A,B,C,0,0,0,0,0,0,padding);
    
    removePadding(A, dimension);
    removePadding(B, dimension);
    removePadding(C, dimension);
    return C;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl (%rdi), %ebx
xorl %r13d, %r13d
cmpl (%rsi), %ebx
jne 0x39ad
movq %rsi, %r15
movq %rdi, %r12
movl $0x20, %edi
callq 0x21b0
movq %rax, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movq %rax, %rdi
movl %ebx, %esi
callq 0x245c
movl 0xa89a(%rip), %eax      # 0xe1a0
movl %ebx, %ecx
cmpl %eax, %ebx
jle 0x3923
xorl %r13d, %r13d
movl %ebx, %edx
movl %ebx, %ecx
andl $0x1, %ecx
addl %edx, %ecx
sarl %ecx
incl %r13d
movl %ecx, %edx
cmpl %eax, %ecx
jg 0x3913
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x56d0(%rip), %xmm0     # 0x9008
movl %r13d, %edi
callq 0x2270
mulsd 0x8(%rsp), %xmm0
cvttsd2si %xmm0, %r13d
movq %r12, %rdi
movl %r13d, %esi
callq 0x2607
movq %r15, %rdi
movl %r13d, %esi
callq 0x2607
movq %r14, %rdi
movl %r13d, %esi
callq 0x2607
xorl %eax, %eax
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r13
pushq %rax
pushq %rax
pushq %rax
callq 0x2e76
addq $0x20, %rsp
movq %r12, %rdi
movl %ebx, %esi
callq 0x265a
movq %r15, %rdi
movl %ebx, %esi
callq 0x265a
movq %r14, %rdi
movl %ebx, %esi
callq 0x265a
jmp 0x39b0
xorl %r14d, %r14d
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/aronszanto[P]strassen/main.cpp
// Function: populateRandomMatrix(Matrix*, int, int)
void populateRandomMatrix(Matrix* M, int low, int high){
    random_device r;
    mt19937 mtgen(r());
    uniform_int_distribution<> dist(low,high);
    for (int i = 0; i < M->dimension; i++)
        for (int j = 0; j < M->dimension; j++)
            M->matrix[i][j] = dist(mtgen);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2718, %rsp           # imm = 0x2718
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x1390(%rsp), %r15
movq %r15, %rdi
callq 0x7902
movq %r15, %rdi
callq 0x21e0
movl %eax, %eax
movq %rax, 0x8(%rsp)
movl $0x1, %ecx
movq %rax, %rdx
shrq $0x1e, %rdx
xorl %eax, %edx
imull $0x6c078965, %edx, %eax # imm = 0x6C078965
addl %ecx, %eax
movq %rax, 0x8(%rsp,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x39fe
movq $0x270, 0x1388(%rsp) # imm = 0x270
movl %r14d, (%rsp)
movl %ebp, 0x4(%rsp)
movl (%rbx), %eax
testl %eax, %eax
jle 0x3a82
xorl %r12d, %r12d
leaq 0x8(%rsp), %r14
movq %rsp, %r15
testl %eax, %eax
jle 0x3a77
leaq (%r12,%r12,2), %r13
xorl %ebp, %ebp
movq %r15, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x7dfa
movq 0x8(%rbx), %rcx
movq (%rcx,%r13,8), %rcx
movl %eax, (%rcx,%rbp,4)
incq %rbp
movl (%rbx), %eax
movslq %eax, %rcx
cmpq %rcx, %rbp
jl 0x3a4f
jmp 0x3a7a
movslq %eax, %rcx
incq %r12
cmpq %rcx, %r12
jl 0x3a45
leaq 0x1390(%rsp), %rdi
callq 0x2180
addq $0x2718, %rsp           # imm = 0x2718
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3abd
jmp 0x3aa5
movq %rax, %rbx
leaq 0x1390(%rsp), %rdi
callq 0x2180
movq %rbx, %rdi
callq 0x22b0
movq %rax, %rdi
callq 0x79ef
// File: /workspace/github_cpp_makefile_star2_O3/aronszanto[P]strassen/main.cpp
// Function: findOptimalconvThreshold()
void findOptimalconvThreshold() {

    for (convThreshold = 8; convThreshold <= 256; convThreshold*=2){
    //for (convThreshold = 2; convThreshold <= 64; convThreshold++){    

        
        
        double total = 0;
        //cout << "multiplying matrices, n = " << i << endl;
        for (int j = 0; j < 5; j ++){
            Matrix* m1 = new Matrix();
            Matrix* m2 = new Matrix();
            initMatrix(m1, 256);
            initMatrix(m2, 256);
            //cout << "populating m1" << endl;
            populateRandomMatrix(m1, 0, 1);
            //cout << "populating m2" << endl;
            populateRandomMatrix(m2, 0, 1);
            clock_t start;
            start = clock();
            
            Matrix* m3 = multiply(m1, m2);
            total += (std::clock() - start) / (double)(CLOCKS_PER_SEC);
            delete(m1);
            delete(m2);
            delete(m3);
        }

        cout << convThreshold << "\t" << total / 5 << endl;

        //cout << "finished multiplying.\n" << endl;
        
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl $0x8, 0xa6c3(%rip)      # 0xe1a0
xorl %ebp, %ebp
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
movl $0x20, %edi
callq 0x21b0
movq %rax, %r15
leaq 0x8(%rax), %r13
xorpd %xmm0, %xmm0
movapd %xmm0, (%rax)
movapd %xmm0, 0x10(%rax)
movl $0x20, %edi
callq 0x21b0
movq %rax, %r12
addq $0x8, %rax
movq %rax, 0x10(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, (%r12)
movapd %xmm0, 0x10(%r12)
movq %r15, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x245c
movq %r12, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x245c
movq %r15, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x39c1
movq %r12, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x39c1
callq 0x2110
movq %rax, %r14
movq %r15, %rdi
movq %r12, %rsi
callq 0x38bf
movq %rax, %rbx
callq 0x2110
subq %r14, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x547d(%rip), %xmm0     # 0x9010
movsd %xmm0, 0x8(%rsp)
movq %r13, %rdi
callq 0x79aa
movq %r15, %rdi
callq 0x2190
movq 0x10(%rsp), %rdi
callq 0x79aa
movq %r12, %rdi
callq 0x2190
testq %rbx, %rbx
je 0x3bc9
leaq 0x8(%rbx), %rdi
callq 0x79aa
movsd (%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x2190
incl %ebp
cmpl $0x5, %ebp
jne 0x3ae8
movl 0xa5ae(%rip), %esi      # 0xe1a0
movq 0xa3df(%rip), %rdi      # 0xdfd8
callq 0x22a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x5e70(%rip), %rsi      # 0x9a80
callq 0x21c0
movsd (%rsp), %xmm0
mulsd 0x53f6(%rip), %xmm0     # 0x9018
movq %rbx, %rdi
callq 0x2240
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movl 0xa546(%rip), %eax      # 0xe1a0
leal (%rax,%rax), %ecx
movl %ecx, 0xa53d(%rip)      # 0xe1a0
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
movl $0x0, %ebp
cmpl $0x80, %eax
jle 0x3ae8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/aronszanto[P]strassen/main.cpp
// Function: timeRandMult(int)
double timeRandMult(int dimension){
            Matrix* m1 = new Matrix();
            Matrix* m2 = new Matrix();
            initMatrix(m1, dimension);
            initMatrix(m2, dimension);
            populateRandomMatrix(m1, 0, 1);
            populateRandomMatrix(m2, 0, 1);
            clock_t start;
            start = clock();
            Matrix* m3 = multiply(m1, m2);
            delete(m1);
            delete(m2);
            delete(m3);
            return (std::clock() - start) / (double)(CLOCKS_PER_SEC);
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebp
movl $0x20, %edi
callq 0x21b0
movq %rax, %rbx
leaq 0x8(%rax), %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movl $0x20, %edi
callq 0x21b0
movq %rax, %r14
leaq 0x8(%rax), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x245c
movq %r14, %rdi
movl %ebp, %esi
callq 0x245c
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x39c1
movq %r14, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x39c1
callq 0x2110
movq %rax, %r13
movq %rbx, %rdi
movq %r14, %rsi
callq 0x38bf
movq %rax, %rbp
movq %r15, %rdi
callq 0x79aa
movq %rbx, %rdi
callq 0x2190
movq %r12, %rdi
callq 0x79aa
movq %r14, %rdi
callq 0x2190
testq %rbp, %rbp
je 0x3d47
movq %rbp, %rdi
addq $0x8, %rdi
callq 0x79aa
movq %rbp, %rdi
callq 0x2190
callq 0x2110
subq %r13, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x52a9(%rip), %xmm0     # 0x9010
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/aronszanto[P]strassen/main.cpp
// Function: findOptimalThreadThresh()
void findOptimalThreadThresh() {
    convThreshold = 32;
    threadThresh = 64;
    while (threadThresh != 4096){
        //cout << threadThresh << endl;;
        
        
        double total = 0;
        //cout << "multiplying matrices, n = " << i << endl;
        for (int j = 0; j < 1; j ++){
            total += timeRandMult(2048);
        }
        cout << threadThresh << "\t" << total / 1 << endl;
        //cout << "finished multiplying.\n" << endl;
        threadThresh *= 2;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl $0x20, 0xa417(%rip)     # 0xe1a0
movl $0x40, 0xa409(%rip)     # 0xe19c
movq 0xa23e(%rip), %rbx      # 0xdfd8
leaq 0x5cdf(%rip), %r14      # 0x9a80
movl $0x800, %edi            # imm = 0x800
callq 0x3c8b
movsd %xmm0, 0x8(%rsp)
movl 0xa3e5(%rip), %esi      # 0xe19c
movq %rbx, %rdi
callq 0x22a0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x21c0
movq %r15, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x2240
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movl 0xa38c(%rip), %eax      # 0xe19c
leal (%rax,%rax), %ecx
movl %ecx, 0xa383(%rip)      # 0xe19c
cmpl $0x800, %eax            # imm = 0x800
jne 0x3da1
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/aronszanto[P]strassen/main.cpp
// Function: testRandMatrix()
void testRandMatrix(){
    Matrix* m = new Matrix();
    initMatrix(m,10);
    populateRandomMatrix(m, 0,1);
    printMatrix(*m);
    free(m);
}

// Assembly:
pushq %rbx
movl $0x20, %edi
callq 0x21b0
movq %rax, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movq %rax, %rdi
movl $0xa, %esi
callq 0x245c
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x39c1
movq %rbx, %rdi
callq 0x24af
movq %rbx, %rdi
popq %rbx
jmp 0x21d0
// File: /workspace/github_cpp_makefile_star2_O3/aronszanto[P]strassen/main.cpp
// Function: testPowers2()
void testPowers2(){
    for (int i = 2; i <= 4096; i *= 2){
        Matrix* m1 = new Matrix();
        initMatrix(m1, i);
        Matrix* m2 = new Matrix();
        initMatrix(m2, i);
        //cout << "populating m1" << endl;
        populateRandomMatrix(m1, -10, 10);
        //cout << "populating m2" << endl;
        populateRandomMatrix(m2, -10, 10);
        
        //cout << "multiplying matrices, n = " << i << endl;
        clock_t start;
        start = clock();
        Matrix* m3 = multiply(m1, m2);
        

        cout << "multiplied " << i << "x" << i << " in " << ((double) (clock() - start) / (double)(CLOCKS_PER_SEC)) << "s" << endl;
        delete(m1);
        delete(m2);
        delete(m3);

    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl $0x2, %ebx
movl $0x20, %edi
callq 0x21b0
movq %rax, %r15
addq $0x8, %rax
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movaps %xmm0, 0x10(%r15)
movq %r15, %rdi
movl %ebx, %esi
callq 0x245c
movl $0x20, %edi
callq 0x21b0
movq %rax, %r13
addq $0x8, %rax
movq %rax, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%r13)
movaps %xmm0, 0x10(%r13)
movq %r13, %rdi
movl %ebx, %esi
callq 0x245c
movq %r15, %rdi
movl $0xfffffff6, %esi       # imm = 0xFFFFFFF6
movl $0xa, %edx
callq 0x39c1
movq %r13, %rdi
movl $0xfffffff6, %esi       # imm = 0xFFFFFFF6
movl $0xa, %edx
callq 0x39c1
callq 0x2110
movq %rax, %r12
movq %r15, %rdi
movq %r13, %rsi
callq 0x38bf
movq %rax, %r14
movl $0xb, %edx
movq 0x77dd(%rip), %rbp      # 0xdfd8
movq %rbp, %rdi
leaq 0x3373(%rip), %rsi      # 0x9b78
callq 0x21c0
movq %rbp, %rdi
movl %ebx, %esi
callq 0x22a0
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
leaq 0x335e(%rip), %rsi      # 0x9b84
callq 0x21c0
movq %rbp, %rdi
movl %ebx, %esi
callq 0x22a0
movq %rax, %rbp
movl $0x4, %edx
movq %rax, %rdi
leaq 0x333f(%rip), %rsi      # 0x9b86
callq 0x21c0
callq 0x2110
subq %r12, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x27ac(%rip), %xmm0     # 0x9010
movq %rbp, %rdi
callq 0x2240
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x32f8(%rip), %rsi      # 0x9b76
callq 0x21c0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq 0x10(%rsp), %rdi
callq 0x79aa
movq %r15, %rdi
callq 0x2190
movq 0x8(%rsp), %rdi
callq 0x79aa
movq %r13, %rdi
callq 0x2190
testq %r14, %r14
je 0x68dd
leaq 0x8(%r14), %rdi
callq 0x79aa
movq %r14, %rdi
callq 0x2190
leal (%rbx,%rbx), %eax
cmpl $0x801, %ebx            # imm = 0x801
movl %eax, %ebx
jb 0x675c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/aronszanto[P]strassen/main.cpp
// Function: FileToMatrix(char*, int, int)
Matrix* FileToMatrix(char* inputfile, int dimension, int order){
    Matrix* M = new Matrix();
    initMatrix(M, dimension);

    ifstream inFile(inputfile);
    string line;
    for (int i = 0; i < pow(dimension,2)*order; ++i)
    {
        getline(inFile, line);
    }

    for (int i = 0; i < dimension; ++i)
    {
        for (int j = 0; j < dimension; ++j)
        {
            getline(inFile, line);
            M->matrix[i][j] = stoi(line);
        }
    }
    inFile.close();
    return M;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movl %edx, %r15d
movl %esi, %ebp
movq %rdi, %r12
movl $0x20, %edi
callq 0x21b0
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movq %rax, 0x8(%rsp)
movq %rax, %rdi
movl %ebp, %esi
callq 0x245c
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
movl $0x8, %edx
callq 0x22d0
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movb $0x0, (%rax)
mulsd %xmm0, %xmm0
cvtsi2sd %r15d, %xmm1
mulsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
movsd %xmm1, (%rsp)
ucomisd %xmm0, %xmm1
jbe 0x69cf
movl $0x1, %ebx
leaq 0x18(%rsp), %r15
movq 0x40(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x22e0
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
incl %ebx
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x6997
testl %ebp, %ebp
jle 0x6a93
movl %ebp, %eax
movq %rax, (%rsp)
xorl %eax, %eax
movq %rax, 0x10(%rsp)
leaq (%rax,%rax,2), %r12
xorl %ebx, %ebx
movq 0x40(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %edx
movq %r14, %rdi
leaq 0x18(%rsp), %rsi
callq 0x22e0
movq 0x18(%rsp), %rbp
callq 0x2040
movq %rax, %r13
movl (%rax), %r15d
movl $0x0, (%rax)
movq %rbp, %rdi
leaq 0x38(%rsp), %rsi
movl $0xa, %edx
callq 0x21f0
cmpq %rbp, 0x38(%rsp)
je 0x6ad2
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x6ade
movl (%r13), %ecx
cmpl $0x22, %ecx
je 0x6ade
testl %ecx, %ecx
jne 0x6a64
movl %r15d, (%r13)
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq (%rcx,%r12,8), %rcx
movl %eax, (%rcx,%rbx,4)
incq %rbx
cmpq %rbx, (%rsp)
jne 0x69ea
movq 0x10(%rsp), %rax
incq %rax
cmpq (%rsp), %rax
jne 0x69df
leaq 0x40(%rsp), %rdi
callq 0x2060
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x6ab1
callq 0x2190
leaq 0x40(%rsp), %rdi
callq 0x2070
movq 0x8(%rsp), %rax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30f1(%rip), %rdi      # 0x9bca
callq 0x20f0
leaq 0x30e5(%rip), %rdi      # 0x9bca
callq 0x2200
jmp 0x6aee
jmp 0x6aee
movq %rax, %rbx
jmp 0x6b01
movq %rax, %rbx
cmpl $0x0, (%r13)
jne 0x6b01
movl %r15d, (%r13)
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x6b15
callq 0x2190
leaq 0x40(%rsp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x22b0