LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/Krymancer[P]Matrix-cpp/src/Matrix.cpp
// Function: Matrix::toArray()
vector<double> Matrix::toArray() {
    vector<double> array;
    for (unsigned i = 0; i < rows; i++) {
        for (unsigned j = 0; j < cols; j++) {
            array.push_back(data[i][j]);
        }
    }
    return array;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
xorl %ecx, %ecx
movl (%r14), %eax
cmpq %rax, %rcx
jae 0x3147
movq %rcx, -0x30(%rbp)
imulq $0x18, %rcx, %r12
xorl %r13d, %r13d
xorl %r15d, %r15d
movl 0x4(%r14), %eax
cmpq %rax, %r15
jae 0x313e
movq 0x8(%r14), %rax
movq (%rax,%r12), %rsi
addq %r13, %rsi
movq %rbx, %rdi
callq 0x3ae0
incq %r15
addq $0x8, %r13
jmp 0x3119
movq -0x30(%rbp), %rcx
incq %rcx
jmp 0x3103
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
callq 0x4456
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O2/Krymancer[P]Matrix-cpp/src/Matrix.cpp
// Function: Matrix::transpose()
Matrix Matrix::transpose() {
    Matrix Transpose(rows, cols, 0.0);
    for (unsigned i = 0; i < cols; i++) {
        for (unsigned j = 0; j < rows; j++) {
            Transpose(i, j) = this->data[j][i];
        }
    }
    return Transpose;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %esi
movl 0x4(%r14), %edx
xorps %xmm0, %xmm0
callq 0x248c
movl (%r14), %eax
movl 0x4(%r14), %ecx
xorl %edx, %edx
cmpq %rcx, %rdx
je 0x31c9
movq 0x8(%r14), %rsi
imulq $0x18, %rdx, %rdi
addq 0x8(%rbx), %rdi
xorl %r8d, %r8d
cmpq %r8, %rax
je 0x31c4
movq (%rsi), %r9
movsd (%r9,%rdx,8), %xmm0
movq (%rdi), %r9
movsd %xmm0, (%r9,%r8,8)
incq %r8
addq $0x18, %rsi
jmp 0x31a4
incq %rdx
jmp 0x3190
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Krymancer[P]Matrix-cpp/src/Matrix.cpp
// Function: Matrix::print() const
void Matrix::print() const {
    if (this->rows == 0) std::cout << "[Empty Matrix]\n";
    for (unsigned i = 0; i < rows; i++) {
        for (unsigned j = 0; j < cols; j++) {
            std::cout << "[" << data[i][j] << "] ";
        }
        std::cout << '\n';
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jne 0x31fb
movq 0x7de9(%rip), %rdi      # 0xafd8
leaq 0x3eb6(%rip), %rsi      # 0x70ac
callq 0x21b0
xorl %ecx, %ecx
movq 0x7dd4(%rip), %r14      # 0xafd8
leaq 0x3eb3(%rip), %r12      # 0x70be
movl (%rbx), %eax
cmpq %rax, %rcx
jae 0x326b
movq %rcx, -0x30(%rbp)
imulq $0x18, %rcx, %r13
xorl %r15d, %r15d
movl 0x4(%rbx), %eax
movq %r14, %rdi
cmpq %rax, %r15
jae 0x325a
leaq 0x3e8d(%rip), %rsi      # 0x70bc
callq 0x21b0
movq 0x8(%rbx), %rcx
movq (%rcx,%r13), %rcx
movsd (%rcx,%r15,8), %xmm0
movq %rax, %rdi
callq 0x2280
movq %rax, %rdi
movq %r12, %rsi
callq 0x21b0
incq %r15
jmp 0x321d
pushq $0xa
popq %rsi
callq 0x2200
movq -0x30(%rbp), %rcx
incq %rcx
jmp 0x320b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Krymancer[P]Matrix-cpp/src/Matrix.cpp
// Function: operator<<(std::ostream&, Matrix const&)
std::ostream &operator<<(std::ostream &os, const Matrix &matrix) {
    if (matrix.rows == 0) os << "[Empty Matrix]\n";
    for (unsigned i = 0; i < matrix.rows; i++) {
        for (unsigned j = 0; j < matrix.cols; j++) {
            os << "[" << matrix.data[i][j] << "] ";
        }
        os << '\n';
    }
    return os;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x0, (%rsi)
jne 0x32a2
leaq 0x3e12(%rip), %rsi      # 0x70ac
movq %rbx, %rdi
callq 0x21b0
xorl %ecx, %ecx
leaq 0x3e13(%rip), %r12      # 0x70be
movl (%r14), %eax
cmpq %rax, %rcx
jae 0x330d
movq %rcx, -0x30(%rbp)
imulq $0x18, %rcx, %r13
xorl %r15d, %r15d
movl 0x4(%r14), %eax
movq %rbx, %rdi
cmpq %rax, %r15
jae 0x32fc
leaq 0x3deb(%rip), %rsi      # 0x70bc
callq 0x21b0
movq 0x8(%r14), %rcx
movq (%rcx,%r13), %rcx
movsd (%rcx,%r15,8), %xmm0
movq %rax, %rdi
callq 0x2280
movq %rax, %rdi
movq %r12, %rsi
callq 0x21b0
incq %r15
jmp 0x32be
pushq $0xa
popq %rsi
callq 0x2200
movq -0x30(%rbp), %rcx
incq %rcx
jmp 0x32ab
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Krymancer[P]Matrix-cpp/src/Matrix.cpp
// Function: Matrix::deflation(Matrix&, double&)
Matrix Matrix::deflation(Matrix &X, double &eigenvalue) {
    // Deflation formula exactly applied
    double denominator = eigenvalue / (X.transpose() * X)(0, 0);
    Matrix Xtrans = X.transpose();
    Matrix RHS = (X * Xtrans);
    Matrix RHS2 = RHS * denominator;
    Matrix A2 = *this - RHS2;
    return A2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movsd (%rcx), %xmm0
movsd %xmm0, -0x30(%rbp)
leaq -0x50(%rbp), %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0x316c
leaq -0x70(%rbp), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2ac4
leaq -0x68(%rbp), %rdi
movq (%rdi), %rax
movq (%rax), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
callq 0x3978
leaq -0x48(%rbp), %rdi
callq 0x3978
leaq -0x70(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x316c
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2ac4
movsd -0x30(%rbp), %xmm0
divsd -0x28(%rbp), %xmm0
leaq -0x90(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x2e9a
leaq -0x90(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x29f4
leaq -0x88(%rbp), %rdi
callq 0x3978
leaq -0x48(%rbp), %rdi
callq 0x3978
leaq -0x68(%rbp), %rdi
callq 0x3978
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x3978
jmp 0x368a
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x3978
jmp 0x3698
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
jmp 0x36a5
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x3978
movq %rbx, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O2/Krymancer[P]Matrix-cpp/src/Matrix.cpp
// Function: Matrix::randomize()
void Matrix::randomize() {
    std::random_device dev;
    std::mt19937 rng(dev());
    std::uniform_real_distribution<> dist(-1.0f, 1.0f);
    for (int i = 0; i < this->rows; i++) {
        for (int j = 0; j < this->cols; j++) {
            double value = this->data[i][j];
            this->data[i][j] = dist(rng);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2728, %rsp           # imm = 0x2728
movq %rdi, %rbx
leaq -0x13c8(%rbp), %r14
movq %r14, %rdi
callq 0x3b0a
movq %r14, %rdi
callq 0x2240
movl %eax, %esi
leaq -0x2750(%rbp), %rdi
callq 0x48b4
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
leaq -0x40(%rbp), %r14
movq %rax, (%r14)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x8(%r14)
xorl %ecx, %ecx
leaq -0x2750(%rbp), %r15
movl (%rbx), %eax
cmpq %rax, %rcx
jae 0x3757
movq %rcx, -0x30(%rbp)
imulq $0x18, %rcx, %r13
xorl %r12d, %r12d
movl 0x4(%rbx), %eax
cmpq %rax, %r12
jae 0x374e
movq %r14, %rdi
movq %r15, %rsi
callq 0x3b60
movq 0x8(%rbx), %rax
movq (%rax,%r13), %rax
movsd %xmm0, (%rax,%r12,8)
incq %r12
jmp 0x3728
movq -0x30(%rbp), %rcx
incq %rcx
jmp 0x3716
leaq -0x13c8(%rbp), %rdi
callq 0x3b6e
addq $0x2728, %rsp           # imm = 0x2728
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3777
movq %rax, %rbx
leaq -0x13c8(%rbp), %rdi
callq 0x3b6e
movq %rbx, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O2/Krymancer[P]Matrix-cpp/src/Matrix.cpp
// Function: Matrix::sigmod()
Matrix Matrix::sigmod() {
    for (int i = 0; i < this->rows; i++) {
        for (int j = 0; j < this->cols; j++) {
            double value = this->data[i][j];
            this->data[i][j] = 1 / (1 + std::exp(-value));
        }
    }

    return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movl (%r14), %eax
cmpq %rax, %r15
jae 0x3800
imulq $0x18, %r15, %r12
xorl %r13d, %r13d
movl 0x4(%r14), %eax
cmpq %rax, %r13
jae 0x37fb
movq 0x8(%r14), %rax
movq (%rax,%r12), %rax
movsd (%rax,%r13,8), %xmm0
xorpd 0x384d(%rip), %xmm0     # 0x7020
callq 0x22e0
movsd 0x3828(%rip), %xmm1     # 0x7008
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movq 0x8(%r14), %rax
movq (%rax,%r12), %rax
movsd %xmm1, (%rax,%r13,8)
incq %r13
jmp 0x37b4
incq %r15
jmp 0x37a5
movq %rbx, %rdi
movq %r14, %rsi
callq 0x27fc
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Krymancer[P]Matrix-cpp/src/Matrix.cpp
// Function: Matrix::dSigmod()
Matrix Matrix::dSigmod() {
    for (int i = 0; i < this->rows; i++) {
        for (int j = 0; j < this->cols; j++) {
            double value = this->data[i][j];
            this->data[i][j] = 1 - (value * value);
        }
    }

    return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rsi), %eax
movl 0x4(%rsi), %ecx
xorl %edx, %edx
movsd 0x37d2(%rip), %xmm0     # 0x7008
cmpq %rax, %rdx
je 0x3870
imulq $0x18, %rdx, %rdi
addq 0x8(%rsi), %rdi
xorl %r8d, %r8d
cmpq %r8, %rcx
je 0x386b
movq (%rdi), %r9
movsd (%r9,%r8,8), %xmm1
mulsd %xmm1, %xmm1
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
movsd %xmm2, (%r9,%r8,8)
incq %r8
jmp 0x3846
incq %rdx
jmp 0x3836
movq %rbx, %rdi
callq 0x27fc
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Krymancer[P]Matrix-cpp/src/Matrix.cpp
// Function: Matrix::map(double (*)(double))
Matrix Matrix::map(functioncall func) {
    for (int i = 0; i < this->rows; i++) {
        for (int j = 0; j < this->cols; j++) {
            double value = this->data[i][j];
            this->data[i][j] = func(value);
        }
    }

    return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, -0x30(%rbp)
xorl %r12d, %r12d
movl (%r14), %eax
cmpq %rax, %r12
jae 0x38db
imulq $0x18, %r12, %r13
xorl %ebx, %ebx
movl 0x4(%r14), %eax
cmpq %rax, %rbx
jae 0x38d6
movq 0x8(%r14), %rax
movq (%rax,%r13), %rax
movsd (%rax,%rbx,8), %xmm0
callq *%r15
movq 0x8(%r14), %rax
movq (%rax,%r13), %rax
movsd %xmm0, (%rax,%rbx,8)
incq %rbx
jmp 0x38ab
incq %r12
jmp 0x389d
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x27fc
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]Register-Interval/./src/implementation/../interface/../implementation/ControlFlowGraph.cpp
// Function: registerInterval::set_code(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void registerInterval::set_code(string s){
	code = s;
	registerInterval_numberOfInstructions = 0;

	int found = 0;
	found = code.find(";", found + 1, 1);
	while (found != string::npos){
		registerInterval_numberOfInstructions++;
		found = code.find(";", found + 1, 1);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x38(%rdi), %r14
movq %r14, %rdi
callq 0x2130
andl $0x0, 0x58(%rbx)
pushq $0x1
popq %r15
leaq 0x6a64(%rip), %r12      # 0x912d
movq %r15, %rdx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0x2330
cmpl $-0x1, %eax
je 0x26e9
incl 0x58(%rbx)
incl %eax
movslq %eax, %rdx
jmp 0x26cc
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]Register-Interval/./src/implementation/../interface/../implementation/ControlFlowGraph.cpp
// Function: registerInterval::set_register_list(std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<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>>>>)
void registerInterval::set_register_list(set<string> s){
	register_list = s;

	int pos;
	string str;
	set<string>::iterator it;
	for(int i = 0; i < 64; i++){
		register_vector.push_back(false);
	}

	for(it = register_list.begin(); it != register_list.end(); ++it){
		str = *it;
		str.erase(str.begin());
		pos = stoi(str);
		register_vector[pos] = true;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
addq $0x60, %rdi
callq 0x7194
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x8(%rbx), %r14
pushq $0x40
popq %r15
subl $0x1, %r15d
jb 0x278d
movq %r14, %rdi
xorl %esi, %esi
callq 0x697a
jmp 0x277b
movq 0x78(%rbx), %r12
addq $0x68, %rbx
leaq -0x48(%rbp), %r15
pushq $0xa
popq %r13
cmpq %rbx, %r12
je 0x27e3
leaq 0x20(%r12), %rsi
movq %r15, %rdi
callq 0x2130
movq -0x48(%rbp), %rsi
movq %r15, %rdi
callq 0x2230
movq %r15, %rdi
xorl %esi, %esi
movl %r13d, %edx
callq 0x69c6
movslq %eax, %rsi
movq %r14, %rdi
callq 0x69e8
orq %rdx, (%rax)
movq %r12, %rdi
callq 0x2200
movq %rax, %r12
jmp 0x279d
leaq -0x48(%rbp), %rdi
callq 0x2100
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2801
jmp 0x2801
jmp 0x2801
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x2340
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]Register-Interval/./src/implementation/../interface/../implementation/ControlFlowGraph.cpp
// Function: registerInterval::add_predecessor(registerInterval*)
void registerInterval::add_predecessor(registerInterval* i){
	bool found = false;
	for (int j = 0; j < predecessors.size(); j++){
		if (predecessors[j] == i)
			found = true;
	}

	if (!found)
		predecessors.push_back(i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, %rax
movq %rsi, -0x8(%rbp)
addq $0x90, %rdi
movq 0x90(%rax), %rcx
movq 0x98(%rax), %rax
subq %rcx, %rax
sarq $0x3, %rax
xorl %edx, %edx
xorl %r8d, %r8d
cmpq %rdx, %rax
je 0x285b
cmpq %rsi, (%rcx,%rdx,8)
sete %r9b
orb %r9b, %r8b
incq %rdx
jmp 0x2846
testb $0x1, %r8b
jne 0x286a
leaq -0x8(%rbp), %rsi
callq 0x6a2c
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]Register-Interval/./src/implementation/../interface/../implementation/ControlFlowGraph.cpp
// Function: registerInterval::add_successors(registerInterval*)
void registerInterval::add_successors(registerInterval* i){
	bool found = false;
	for (int j = 0; j < successors.size(); j++){
		if (successors[j] == i)
			found = true;
	}

	if (!found)
		successors.push_back(i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, %rax
movq %rsi, -0x8(%rbp)
addq $0xa8, %rdi
movq 0xa8(%rax), %rcx
movq 0xb0(%rax), %rax
subq %rcx, %rax
sarq $0x3, %rax
xorl %edx, %edx
xorl %r8d, %r8d
cmpq %rdx, %rax
je 0x28b5
cmpq %rsi, (%rcx,%rdx,8)
sete %r9b
orb %r9b, %r8b
incq %rdx
jmp 0x28a0
testb $0x1, %r8b
jne 0x28c4
leaq -0x8(%rbp), %rsi
callq 0x6a2c
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]Register-Interval/./src/implementation/../interface/../implementation/ControlFlowGraph.cpp
// Function: basicBlock::basicBlock()
basicBlock::basicBlock(){
	ID = IDgenerator++;
	NumberOfInstructions = 0;
	controlBB = false;
	controling_basicBlock = nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
xorl %eax, %eax
movb %al, 0x18(%rdi)
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
movb %al, 0x38(%rdi)
leaq 0x98(%rdi), %rcx
andl $0x0, 0x98(%rdi)
andq $0x0, 0xa0(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
movups %xmm0, 0x80(%rdi)
movq %rcx, 0xa8(%rdi)
movq %rcx, 0xb0(%rdi)
andq $0x0, 0xb8(%rdi)
leaq 0xc8(%rdi), %rcx
andl $0x0, 0xc8(%rdi)
andq $0x0, 0xd0(%rdi)
movq %rcx, 0xd8(%rdi)
movq %rcx, 0xe0(%rdi)
andq $0x0, 0xe8(%rdi)
movl 0xb84c(%rip), %ecx      # 0xe200
leal 0x1(%rcx), %edx
movl %edx, 0xb843(%rip)      # 0xe200
movl %ecx, (%rdi)
andl $0x0, 0x48(%rdi)
movb %al, 0x50(%rdi)
andq $0x0, 0x58(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]Register-Interval/./src/implementation/../interface/../implementation/ControlFlowGraph.cpp
// Function: basicBlock::basicBlock(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
basicBlock::basicBlock(string s){
	ID = IDgenerator++;
	name = s;
	NumberOfInstructions = 0;
	controlBB = false;
	controling_basicBlock = nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
xorl %eax, %eax
movb %al, 0x18(%rdi)
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
leaq 0x8(%rdi), %r14
leaq 0x28(%rdi), %r15
movb %al, 0x38(%rdi)
leaq 0x60(%rdi), %r12
leaq 0x98(%rdi), %rax
andl $0x0, 0x98(%rdi)
andq $0x0, 0xa0(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
movups %xmm0, 0x80(%rdi)
movq %rax, 0xa8(%rdi)
movq %rax, 0xb0(%rdi)
andq $0x0, 0xb8(%rdi)
leaq 0xc8(%rdi), %rax
andl $0x0, 0xc8(%rdi)
andq $0x0, 0xd0(%rdi)
movq %rax, 0xd8(%rdi)
movq %rax, 0xe0(%rdi)
andq $0x0, 0xe8(%rdi)
movl 0xb735(%rip), %eax      # 0xe200
leal 0x1(%rax), %ecx
movl %ecx, 0xb72c(%rip)      # 0xe200
movl %eax, (%rdi)
movq %r14, %rdi
callq 0x2130
andl $0x0, 0x48(%rbx)
movb $0x0, 0x50(%rbx)
andq $0x0, 0x58(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, -0x30(%rbp)
leaq 0x78(%rbx), %r13
leaq 0xc0(%rbx), %rdi
addq $0x90, %rbx
callq 0x6e7c
movq %rbx, %rdi
callq 0x6e7c
movq %r13, %rdi
callq 0x7ed2
movq %r12, %rdi
callq 0x7ed2
movq %r15, %rdi
callq 0x2100
movq %r14, %rdi
callq 0x2100
movq -0x30(%rbp), %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]Register-Interval/./src/implementation/../interface/../implementation/ControlFlowGraph.cpp
// Function: basicBlock::basicBlock(int)
basicBlock::basicBlock(int i){
	ID = IDgenerator2++;
	ABB = i;
	NumberOfInstructions = 0;
	controlBB = false;
	exit_state = false;
	controling_basicBlock = nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
xorl %eax, %eax
movb %al, 0x18(%rdi)
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
movb %al, 0x38(%rdi)
leaq 0x98(%rdi), %rax
andl $0x0, 0x98(%rdi)
andq $0x0, 0xa0(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
movups %xmm0, 0x80(%rdi)
movq %rax, 0xa8(%rdi)
movq %rax, 0xb0(%rdi)
andq $0x0, 0xb8(%rdi)
leaq 0xc8(%rdi), %rax
andl $0x0, 0xc8(%rdi)
andq $0x0, 0xd0(%rdi)
movq %rax, 0xd8(%rdi)
movq %rax, 0xe0(%rdi)
andq $0x0, 0xe8(%rdi)
movl 0xb628(%rip), %eax      # 0xe204
leal 0x1(%rax), %ecx
movl %ecx, 0xb61f(%rip)      # 0xe204
movl %eax, (%rdi)
movl %esi, 0x4c(%rdi)
andl $0x0, 0x48(%rdi)
andw $0x0, 0x50(%rdi)
andq $0x0, 0x58(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]Register-Interval/./src/implementation/../interface/../implementation/ControlFlowGraph.cpp
// Function: basicBlock::set_code(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void basicBlock::set_code(string s)
{
	code = s;
	NumberOfInstructions = 0;

	int found = 0;
	found = code.find(";", found + 1, 1);
	while (found != string::npos){
		NumberOfInstructions++;
		found = code.find(";", found + 1, 1);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x28(%rdi), %r14
movq %r14, %rdi
callq 0x2130
andl $0x0, 0x48(%rbx)
pushq $0x1
popq %r15
leaq 0x64fc(%rip), %r12      # 0x912d
movq %r15, %rdx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0x2330
cmpl $-0x1, %eax
je 0x2c51
incl 0x48(%rbx)
incl %eax
movslq %eax, %rdx
jmp 0x2c34
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]Register-Interval/./src/implementation/../interface/../implementation/ControlFlowGraph.cpp
// Function: basicBlock::add_predecessor(basicBlock*)
void basicBlock::add_predecessor(basicBlock* b)
{
	bool found = false;
	for (int i = 0; i < predecessors.size(); i++){
		if (predecessors[i] == b)
			found = true;
	}

	if (!found)
		predecessors.push_back(b);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, %rax
movq %rsi, -0x8(%rbp)
addq $0x60, %rdi
movq 0x60(%rax), %rcx
movq 0x68(%rax), %rax
subq %rcx, %rax
sarq $0x3, %rax
xorl %edx, %edx
xorl %r8d, %r8d
cmpq %rdx, %rax
je 0x2cb2
cmpq %rsi, (%rcx,%rdx,8)
sete %r9b
orb %r9b, %r8b
incq %rdx
jmp 0x2c9d
testb $0x1, %r8b
jne 0x2cc1
leaq -0x8(%rbp), %rsi
callq 0x6ab2
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]Register-Interval/./src/implementation/../interface/../implementation/ControlFlowGraph.cpp
// Function: basicBlock::add_successor(basicBlock*)
void basicBlock::add_successor(basicBlock* b)
{
	bool found = false;
	for (int i = 0; i < successors.size(); i++){
		if (successors[i] == b)
			found = true;
	}

	if (!found)
		successors.push_back(b);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, %rax
movq %rsi, -0x8(%rbp)
addq $0x78, %rdi
movq 0x78(%rax), %rcx
movq 0x80(%rax), %rax
subq %rcx, %rax
sarq $0x3, %rax
xorl %edx, %edx
xorl %r8d, %r8d
cmpq %rdx, %rax
je 0x2d07
cmpq %rsi, (%rcx,%rdx,8)
sete %r9b
orb %r9b, %r8b
incq %rdx
jmp 0x2cf2
testb $0x1, %r8b
jne 0x2d16
leaq -0x8(%rbp), %rsi
callq 0x6ab2
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]Register-Interval/./src/implementation/../interface/../implementation/ControlFlowGraph.cpp
// Function: basicBlock::delete_successor(basicBlock*)
void basicBlock::delete_successor(basicBlock* b){
	vector<basicBlock*>::iterator it;
	for (it = successors.begin(); it != successors.end(); it++){
		if(*it == b){
			successors.erase(it);
			break;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rcx
addq $0x78, %rdi
movq 0x78(%rcx), %rax
movq 0x80(%rcx), %rcx
cmpq %rcx, %rax
je 0x2d50
cmpq %rsi, (%rax)
je 0x2d52
addq $0x8, %rax
jmp 0x2d40
popq %rbp
retq
movq %rax, %rsi
popq %rbp
jmp 0x6ba2
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]Register-Interval/./src/implementation/RegisterIntervalCreation.cpp
// Function: RegisterIntervalCreationPass::visit_all_predecessors(basicBlock*)
void RegisterIntervalCreationPass::visit_all_predecessors(basicBlock* BB){
	for(int i=0; i < basic_blocks.size(); i++)
		mark.push_back(false);

	for(int i=0;i<basic_blocks.size(); i++){
		mark[i] = false;
	}

	visit_predecessors(BB);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r15d, %r15d
leaq 0xa367(%rip), %r14      # 0xe288
movq 0xa2e8(%rip), %rax      # 0xe210
movq 0xa2d9(%rip), %rcx      # 0xe208
movq %rax, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %r15, %rdx
jbe 0x3f4d
movq %r14, %rdi
xorl %esi, %esi
callq 0x697a
incq %r15
jmp 0x3f21
xorl %r14d, %r14d
leaq 0xa331(%rip), %r15      # 0xe288
subq %rcx, %rax
sarq $0x3, %rax
cmpq %r14, %rax
jbe 0x3f87
movq %r15, %rdi
movq %r14, %rsi
callq 0x69e8
notq %rdx
andq %rdx, (%rax)
incq %r14
movq 0xa292(%rip), %rax      # 0xe210
movq 0xa283(%rip), %rcx      # 0xe208
jmp 0x3f57
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x48a2
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]Register-Interval/./src/implementation/RegisterIntervalCreation.cpp
// Function: RegisterIntervalCreationPass::visit_registerInterval_all_predecessors(registerInterval*)
void RegisterIntervalCreationPass::visit_registerInterval_all_predecessors(registerInterval* in){
	for(int j=0; j < RegisterIntervals[0]->getID() + RegisterIntervals.size(); j++)
		registerInterval_mark.push_back(false);

	for(int i=0; i < RegisterIntervals[0]->getID() + RegisterIntervals.size(); i++){
		registerInterval_mark[i] = false;
	}

	registerInterval_visit_predecessors(in);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r15d, %r15d
leaq 0x9a9b(%rip), %r14      # 0xe2b0
movq 0x9a04(%rip), %rcx      # 0xe220
movq (%rcx), %rax
movslq (%rax), %rdx
movq 0x99ff(%rip), %rax      # 0xe228
movq %rax, %rsi
subq %rcx, %rsi
sarq $0x3, %rsi
addq %rdx, %rsi
cmpq %r15, %rsi
jbe 0x484a
movq %r14, %rdi
xorl %esi, %esi
callq 0x697a
incq %r15
jmp 0x4815
xorl %r14d, %r14d
leaq 0x9a5c(%rip), %r15      # 0xe2b0
subq %rcx, %rax
movslq %edx, %rcx
sarq $0x3, %rax
addq %rcx, %rax
cmpq %r14, %rax
jbe 0x488f
movq %r15, %rdi
movq %r14, %rsi
callq 0x69e8
notq %rdx
andq %rdx, (%rax)
incq %r14
movq 0x999f(%rip), %rcx      # 0xe220
movq (%rcx), %rax
movl (%rax), %edx
movq 0x999b(%rip), %rax      # 0xe228
jmp 0x4854
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x493a
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]Register-Interval/./src/implementation/RegisterIntervalCreation.cpp
// Function: RegisterIntervalCreationPass::visit_predecessors(basicBlock*)
void RegisterIntervalCreationPass::visit_predecessors(basicBlock* BB){
	mark[BB->getID()] = true;
	auto P = BB->get_predecessors();
	for(int i=0;i<P.size();i++){
		if(!mark[P[i]->getID()])
			visit_predecessors(P[i]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
movslq (%rdi), %rsi
leaq 0x99ce(%rip), %rbx      # 0xe288
movq %rbx, %rdi
callq 0x69e8
orq %rdx, (%rax)
addq $0x60, %r14
leaq -0x28(%rbp), %rdi
movq %r14, %rsi
callq 0x6bdc
xorl %r14d, %r14d
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
jbe 0x4912
movq (%rax,%r14,8), %rax
movslq (%rax), %rsi
movq %rbx, %rdi
callq 0x69e8
testq %rdx, (%rax)
jne 0x490d
movq -0x28(%rbp), %rax
movq (%rax,%r14,8), %rdi
callq 0x48a2
incq %r14
jmp 0x48d8
leaq -0x28(%rbp), %rdi
callq 0x7ed2
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x4926
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x7ed2
movq %rbx, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]Register-Interval/./src/implementation/RegisterIntervalCreation.cpp
// Function: RegisterIntervalCreationPass::registerInterval_visit_predecessors(registerInterval*)
void RegisterIntervalCreationPass::registerInterval_visit_predecessors(registerInterval* in){
	registerInterval_mark[in->getID()] = true;
	auto P = in->get_predecessors();
	for(int i=0;i<P.size();i++){
		if(!registerInterval_mark[P[i]->getID()])
			registerInterval_visit_predecessors(P[i]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
movslq (%rdi), %rsi
leaq 0x995e(%rip), %rbx      # 0xe2b0
movq %rbx, %rdi
callq 0x69e8
orq %rdx, (%rax)
addq $0x90, %r14
leaq -0x28(%rbp), %rdi
movq %r14, %rsi
callq 0x6a50
xorl %r14d, %r14d
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
jbe 0x49ad
movq (%rax,%r14,8), %rax
movslq (%rax), %rsi
movq %rbx, %rdi
callq 0x69e8
testq %rdx, (%rax)
jne 0x49a8
movq -0x28(%rbp), %rax
movq (%rax,%r14,8), %rdi
callq 0x493a
incq %r14
jmp 0x4973
leaq -0x28(%rbp), %rdi
callq 0x781c
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x49c1
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x781c
movq %rbx, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]Register-Interval/main.cpp
// Function: main
int main(int argc, char **argv)
{
	int REGNUM=atoi(argv[1]); //REGNUM is the allowed number of registers in register-intervals

        //At first the graphviz dot code (the output of nvidisasm tool) will be parsed and the CFG will be generated.
	vector<basicBlock*> basic_blocks = create_control_flow_graph(argv[2]);
        
        basic_blocks_log(basic_blocks, argv[2]);//generates a log file

        //Register-interval creation algorithm (pass one) will construct the initial register-intervals from basic blocks and CFG
	auto intervals = RegisterIntervalCreationPass::registerIntervalCreationPassOne(basic_blocks, REGNUM);

        //In the following loop, pass two of register-interval creation algorithm will be repeated until no changes occur
	int Size, i = 0;
	do
	{
		registerInterval_log(intervals, i++, argv[2]);

		Size = intervals.size();
		intervals = RegisterIntervalCreationPass::registerIntervalCreationPassTwo(intervals, REGNUM);
	} while (intervals.size() < Size); //Pass 2 of register-interval creation algorithm will be done until the CFG can not be reduced anymore

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %rbx
movq 0x8(%rsi), %rdi
callq 0x22d0
movl %eax, -0x2c(%rbp)
movq 0x10(%rbx), %rsi
leaq -0x90(%rbp), %r14
movq %r14, %rdi
callq 0x4b72
leaq -0x78(%rbp), %rdi
movq %r14, %rsi
callq 0x6bdc
movq 0x10(%rbx), %rsi
leaq -0x78(%rbp), %rdi
callq 0x567b
leaq -0x78(%rbp), %rdi
callq 0x7ed2
leaq -0x60(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x6bdc
leaq -0x48(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl -0x2c(%rbp), %edx
callq 0x2ed4
leaq -0x60(%rbp), %rdi
callq 0x7ed2
leaq -0x48(%rbp), %r12
leaq -0xd8(%rbp), %r14
movq %r12, %rsi
leaq -0xc0(%rbp), %r13
movq %r13, %rdi
callq 0x6a50
movq %rbx, %r15
movq 0x10(%rbx), %rdx
movq %r13, %rdi
callq 0x5aaa
movq %r13, %rdi
callq 0x781c
movq -0x40(%rbp), %rbx
subq -0x48(%rbp), %rbx
leaq -0xa8(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x6a50
movq %r14, %rdi
movq %r13, %rsi
movl -0x2c(%rbp), %edx
callq 0x3f9a
movq %r12, %rdi
movq %r14, %rsi
callq 0x8e76
movq %r14, %rdi
callq 0x781c
movq %r13, %rdi
callq 0x781c
movq -0x40(%rbp), %rax
subq -0x48(%rbp), %rax
sarq $0x3, %rax
shrq $0x3, %rbx
movslq %ebx, %rcx
cmpq %rcx, %rax
movq %r15, %rbx
jb 0x4a61
leaq -0x48(%rbp), %rdi
callq 0x781c
leaq -0x90(%rbp), %rdi
callq 0x7ed2
xorl %eax, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
jmp 0x4b27
jmp 0x4b2e
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x7ed2
jmp 0x4b5e
movq %rax, %rbx
jmp 0x4b5e
jmp 0x4b41
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
jmp 0x4b50
movq %rax, %rbx
jmp 0x4b55
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x781c
leaq -0x48(%rbp), %rdi
callq 0x781c
leaq -0x90(%rbp), %rdi
callq 0x7ed2
movq %rbx, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O2/XxAdi101xX[P]ChamberCrawler/Main/MainHelpers.cc
// Function: getValidCoords()
vector<int> getValidCoords() {
	// safety check no necessary assuming there is enough room for spawning
	vector<int> tempCoordinates;
	do {
		tempCoordinates = rng.genCoordinates(floorDimensions);

		// reroll if coordinates are not for a FloorTile
		// or has an occupant already
	} while (!(isValidCoordinates(tempCoordinates))
	|| isOccupied(tempCoordinates));

	return tempCoordinates;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
leaq 0x38(%rsp), %r15
leaq 0x50(%rsp), %r13
leaq 0x20(%rsp), %rbp
leaq 0x8(%rsp), %r14
movq %r15, %rdi
leaq 0x16cc8(%rip), %rsi     # 0x25070
callq 0xcef6
movq %r13, %rdi
leaq 0x16a49(%rip), %rsi     # 0x24e00
movq %r15, %rdx
callq 0x13c10
movq %rbx, %rdi
movq %r13, %rsi
callq 0xd56a
movq %r13, %rdi
callq 0xd484
movq %r15, %rdi
callq 0xd484
movq %rbp, %rdi
movq %rbx, %rsi
callq 0xcef6
movq %rbp, %rdi
callq 0xe1dc
testb %al, %al
je 0xe41e
movq %r14, %rdi
movq %rbx, %rsi
callq 0xcef6
movq %r14, %rdi
callq 0xe255
movl %eax, %r12d
movq %r14, %rdi
callq 0xd484
movq %rbp, %rdi
callq 0xd484
testb %r12b, %r12b
jne 0xe39e
jmp 0xe42b
movq %rbp, %rdi
callq 0xd484
jmp 0xe39e
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0xd484
jmp 0xe460
jmp 0xe458
movq %rax, %r14
leaq 0x38(%rsp), %rdi
jmp 0xe465
movq %rax, %r14
jmp 0xe46a
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0xd484
movq %rbx, %rdi
callq 0xd484
movq %r14, %rdi
callq 0x53c0
// File: /workspace/github_cpp_makefile_star2_O2/XxAdi101xX[P]ChamberCrawler/Main/MainHelpers.cc
// Function: getValidNeighbourCoordinates(std::vector<int, std::allocator<int>>)
vector<int> getValidNeighbourCoordinates(vector<int> base) {
	// safety check
	vector<vector<int>> checkedCoordinates;
	vector<int> tempCoordinates;

	do {
		tempCoordinates = rng.genNeighbourCoord(base);

		bool checked = false;

		// checks if neighbour was logged
		for (auto coordinates: checkedCoordinates) {
			if (coordinates == tempCoordinates) {
					checked = true;
					break;
				}
		}

		// if neighbour was not logged, log it
		if (!(checked)) {
			checkedCoordinates.emplace_back(tempCoordinates);
		}

		// checks if all neighbours were tried
		if (checkedCoordinates.size() == DIRECTION_ENUMERATION) {
			// no valid neighbour
			throw 1;
		}

		// reroll if coordinates are not for a FloorTile
		// or has an occupant already
	} while (!(isValidCoordinates(tempCoordinates))
		|| isOccupied(tempCoordinates));

		return tempCoordinates;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, 0x20(%rsp)
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x28(%rsp), %r14
leaq 0x70(%rsp), %rbp
leaq 0x58(%rsp), %r12
movq %r14, %rdi
movq 0x20(%rsp), %rsi
callq 0xcef6
movq %r12, %r15
movq %rbp, %rdi
leaq 0x168e1(%rip), %rsi     # 0x24e00
movq %r14, %rdx
callq 0x13c72
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xd56a
movq %rbp, %rdi
callq 0xd484
movq %r14, %rdi
callq 0xd484
movq (%rsp), %r13
movq 0x8(%rsp), %r12
cmpq %r12, %r13
je 0xe57c
movq %rbp, %rdi
movq %r13, %rsi
callq 0xcef6
movq %rbp, %rdi
movq %rbx, %rsi
callq 0xd0d6
movl %eax, %r14d
movq %rbp, %rdi
callq 0xd484
addq $0x18, %r13
testb %r14b, %r14b
je 0xe54b
jmp 0xe587
movq %rsp, %rdi
movq %rbx, %rsi
callq 0xebb8
movq 0x8(%rsp), %rax
subq (%rsp), %rax
cmpq $0xc0, %rax
je 0xe617
movq %r15, %r12
movq %r15, %rdi
movq %rbx, %rsi
callq 0xcef6
leaq 0x28(%rsp), %r14
leaq 0x40(%rsp), %r15
movq %r12, %rdi
callq 0xe1dc
testb %al, %al
je 0xe5ed
movq %r15, %rdi
movq %rbx, %rsi
callq 0xcef6
movq %r15, %rdi
callq 0xe255
movl %eax, %r13d
movq %r15, %rdi
callq 0xd484
movq %r12, %rdi
callq 0xd484
testb %r13b, %r13b
jne 0xe505
jmp 0xe5fa
movq %r12, %rdi
callq 0xd484
jmp 0xe505
movq %rsp, %rdi
callq 0xebf4
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x4
popq %rdi
callq 0x5150
movl $0x1, (%rax)
movq 0x15954(%rip), %rsi     # 0x23f80
movq %rax, %rdi
xorl %edx, %edx
callq 0x53a0
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0xd484
jmp 0xe65a
jmp 0xe670
jmp 0xe670
jmp 0xe670
jmp 0xe670
movq %rax, %r14
leaq 0x28(%rsp), %rdi
jmp 0xe669
movq %rax, %r14
leaq 0x58(%rsp), %rdi
jmp 0xe669
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0xd484
jmp 0xe673
movq %rax, %r14
movq %rbx, %rdi
callq 0xd484
movq %rsp, %rdi
callq 0xebf4
movq %r14, %rdi
callq 0x53c0
// File: /workspace/github_cpp_makefile_star2_O2/XxAdi101xX[P]ChamberCrawler/Main/MainHelpers.cc
// Function: hasActed(std::shared_ptr<Character>)
bool hasActed(shared_ptr<Character> character) {
	for (auto actedCharacter: alreadyActed) {
		if (actedCharacter == character) {
			return true;
		}

	}

	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x16a1d(%rip), %rax     # 0x250c0
movq 0x16a1e(%rip), %r13     # 0x250c8
leaq 0x8(%rsp), %r15
movq %rax, %r12
cmpq %r13, %rax
je 0xe6de
movq %r15, %rdi
movq %r12, %rsi
callq 0xd3ac
movq 0x8(%rsp), %rbp
movq (%rbx), %r14
leaq 0x10(%rsp), %rdi
callq 0xd24a
leaq 0x10(%r12), %rax
cmpq %r14, %rbp
jne 0xe6af
cmpq %r13, %r12
setne %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/XxAdi101xX[P]ChamberCrawler/Main/MainHelpers.cc
// Function: createCharacter(Race)
shared_ptr<Character> createCharacter(Race race) {
	int tempWallet = getNormalOrSmallGoldPile();

	if (race == Race::Shade) {
		return make_shared<Shade>(tempWallet);
	}

	else if (race == Race::Drow) {
        return make_shared<Drow>(tempWallet);
	}

	else if	(race == Race::Vampire) {
        return make_shared<Vampire>(tempWallet);
	}

	else if (race == Race::Troll) {
        return make_shared<Troll>(tempWallet);
	}

	else if (race == Race::Goblin) {
        return make_shared<Goblin>(tempWallet);
	}

	else if (race == Race::Human) {
        return make_shared<Human>(tempWallet);
	}

	else if (race == Race::Dwarf) {
        return make_shared<Dwarf>(tempWallet);
	}

	else if (race == Race::Elf) {
        return make_shared<Elf>(tempWallet);
	}

	else if (race == Race::Orc) {
        return make_shared<Orc>(tempWallet);
	}

	else if (race == Race::Merchant) {
        return make_shared<Merchant>(tempWallet);
	}

	else if (race == Race::Dragon) {
        return make_shared<Dragon>(tempWallet);
	}

	else if (race == Race::Halfling) {
        return make_shared<Halfling>(tempWallet);
	}

	return nullptr;

}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebp
movq %rdi, %rbx
callq 0xe91f
movl %eax, 0xc(%rsp)
cmpl $0xb, %ebp
ja 0xea62
movl %ebp, %eax
leaq 0xa3dd(%rip), %rcx      # 0x18d3c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xec4a
jmp 0xea3e
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xed94
jmp 0xea3e
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xecc2
jmp 0xea3e
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xed58
jmp 0xea3e
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xec86
jmp 0xea3e
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xeca4
jmp 0xea3e
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xed1c
jmp 0xea3e
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xec68
jmp 0xea3e
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xece0
jmp 0xea3e
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xecfe
jmp 0xea3e
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xed76
jmp 0xea3e
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xed3a
leaq 0x18(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0xd24a
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0xea58
// File: /workspace/github_cpp_makefile_star2_O2/XxAdi101xX[P]ChamberCrawler/Main/MainHelpers.cc
// Function: reset()
void reset() {
	floorCount = 0;
	theTextDisplay.setFloorNumber(0);
	currentFloor.resetFloorNumber();

	NPCMovementPaused = false;
	merchantsAngered = false;

	usedPotions.clear();

	player = nullptr;

	playerHasBeenPlaced = false;

	alreadyActed.clear();

	playerHasActed = false;

	numberOfSpawnedPotions = 0;
	numberOfSpawnedGoldPiles = 0;
	numberOfSpawnedNPCs = 0;

}

// Assembly:
pushq %rbx
subq $0x10, %rsp
andl $0x0, 0x16612(%rip)     # 0x25088
leaq 0x1638b(%rip), %rdi     # 0x24e08
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x15a6c
leaq 0x165a3(%rip), %rdi     # 0x25030
callq 0x1651c
movb %bl, 0x165f4(%rip)      # 0x2508c
movb %bl, 0x165ef(%rip)      # 0x2508d
movq 0x165eb(%rip), %rax     # 0x25090
cmpq %rax, 0x165ec(%rip)     # 0x25098
je 0xeab5
movq %rax, 0x165e3(%rip)     # 0x25098
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
leaq 0x165e3(%rip), %rdi     # 0x250a8
callq 0xd456
leaq 0x8(%rsp), %rdi
callq 0xd24a
xorl %ebx, %ebx
movb %bl, 0x165dc(%rip)      # 0x250b8
leaq 0x165dd(%rip), %rdi     # 0x250c0
callq 0xd15e
andl $0x0, 0x165ed(%rip)     # 0x250dc
andl $0x0, 0x165ea(%rip)     # 0x250e0
movb %bl, 0x165dc(%rip)      # 0x250d8
andl $0x0, 0x165e1(%rip)     # 0x250e4
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/XxAdi101xX[P]ChamberCrawler/Cell/Cell.cc
// Function: Cell::addNeighbour(std::shared_ptr<Cell>)
void Cell::addNeighbour(std::shared_ptr<Cell> neighbour) {
	std::vector<int> coords = neighbour->getCoords();
	if (coords[0] < coordinates[0] && coords[1] < coordinates[1]) {
		neighbours[1] = neighbour;
	}
	else if (coords[0] < coordinates[0] && coords[1] > coordinates[1]) {
		neighbours[7] = neighbour;
	}
	else if (coords[0] < coordinates[0]) {
		neighbours[0] = neighbour;
	}
	else if (coords[0] > coordinates[0] && coords[1] < coordinates[1]) {
		neighbours[3] = neighbour;
	}
	else if (coords[0] > coordinates[0] && coords[1] > coordinates[1]) {
		neighbours[5] = neighbour;
	}
	else if (coords[0] > coordinates[0]) {
		neighbours[4] = neighbour;
	}
	else if (coords[1] > coordinates[1]) {
		neighbours[6] = neighbour;
	}
	else {
		neighbours[2] = neighbour;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rsi
addq $0x28, %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0xcef6
movq (%r15), %rcx
movq 0x28(%r14), %rax
movl (%rax), %edx
cmpl %edx, (%rcx)
jge 0x1084a
movl 0x4(%rcx), %ecx
movl 0x4(%rax), %eax
cmpl %eax, %ecx
jge 0x10860
movq 0x40(%r14), %rdi
addq $0x10, %rdi
jmp 0x10895
movl 0x4(%rcx), %ecx
movl 0x4(%rax), %eax
jle 0x10871
cmpl %eax, %ecx
jge 0x1087f
movq 0x40(%r14), %rdi
addq $0x30, %rdi
jmp 0x10895
xorl %edx, %edx
cmpl %eax, %ecx
pushq $0x70
popq %rdi
cmovleq %rdx, %rdi
addq 0x40(%r14), %rdi
jmp 0x10895
movq 0x40(%r14), %rdi
cmpl %eax, %ecx
jle 0x1088b
addq $0x60, %rdi
jmp 0x10895
movq 0x40(%r14), %rdi
jle 0x10891
addq $0x50, %rdi
jmp 0x10895
addq $0x20, %rdi
jmp 0x10895
addq $0x40, %rdi
movq %rbx, %rsi
callq 0xd374
leaq 0x8(%rsp), %rdi
callq 0xd484
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/XxAdi101xX[P]ChamberCrawler/Cell/Cell.cc
// Function: Cell::getNeighbour(Direction) const
shared_ptr<Cell> Cell::getNeighbour(Direction direction) const {
	// The neighbours are always placed in a particular order in the vector
	if (direction == Direction::North) {
		return (getNeighbours()[0]);
	}
	else if (direction == Direction::NorthWest) {
		return (getNeighbours()[1]);
	}
	else if (direction == Direction::West) {
		return (getNeighbours()[2]);
	}
	else if (direction == Direction::SouthWest) {
		 return (getNeighbours()[3]);
	}
	else if (direction == Direction::South) {
		return (getNeighbours()[4]);
	}
	else if (direction == Direction::SouthEast) {
		return (getNeighbours()[5]);
	}
	else if (direction == Direction::East) {
		return (getNeighbours()[6]);
	}
	else {
		return (getNeighbours()[7]); // NorthEast
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
addq $0x40, %rsi
cmpl $0x7, %edx
ja 0x1093e
movl %edx, %eax
leaq 0x87b2(%rip), %rcx      # 0x190d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rsp, %r14
movq %r14, %rdi
callq 0x10ed2
movq (%r14), %rsi
jmp 0x109c8
movq %rsp, %r14
movq %r14, %rdi
callq 0x10ed2
movq (%r14), %rsi
addq $0x70, %rsi
jmp 0x109c8
movq %rsp, %r14
movq %r14, %rdi
callq 0x10ed2
movq (%r14), %rsi
addq $0x50, %rsi
jmp 0x109c8
movq %rsp, %r14
movq %r14, %rdi
callq 0x10ed2
movq (%r14), %rsi
addq $0x10, %rsi
jmp 0x109c8
movq %rsp, %r14
movq %r14, %rdi
callq 0x10ed2
movq (%r14), %rsi
addq $0x30, %rsi
jmp 0x109c8
movq %rsp, %r14
movq %r14, %rdi
callq 0x10ed2
movq (%r14), %rsi
addq $0x20, %rsi
jmp 0x109c8
movq %rsp, %r14
movq %r14, %rdi
callq 0x10ed2
movq (%r14), %rsi
addq $0x60, %rsi
jmp 0x109c8
movq %rsp, %r14
movq %r14, %rdi
callq 0x10ed2
movq (%r14), %rsi
addq $0x40, %rsi
movq %rbx, %rdi
callq 0xd360
movq %r14, %rdi
callq 0xd100
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/XxAdi101xX[P]ChamberCrawler/Character/Character.cc
// Function: Character::applyPotion(std::shared_ptr<Potion>)
void Character::applyPotion(const shared_ptr<Potion> potion) {
	PotionType type = potion->getPotionType();
	int potency = potion->getPotency();

	// health based potions
	if (type == PotionType::RestoreHealth
		|| type == PotionType::PoisonHealth) {

		if (this->getHP() + potency <= 0) {
			potency = -(this->getHP() - 1);
		}

		this->addHPViaPotion(potency);
	}

	// attack based potions
	else if (type == PotionType::BoostAttack
		|| type == PotionType::WoundAttack) {

		this->attackBuff += potency;
	}

	// defence based potions
	else if (type == PotionType::BoostDefence
		|| type == PotionType::WoundDefence) {

		this->defenceBuff += potency;
	}

	usedPotions.emplace_back(type);

	// reports what potion was used
	this->addAction(makeMsg(this->name, WORD_USE_PAST_TENSE , potionToText(potion)));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
callq 0x13b2a
movl %eax, %r15d
movl %eax, 0xc(%rsp)
movq (%r14), %rdi
callq 0x13b2e
cmpl $0x1, %r15d
ja 0x110a3
movl 0x34(%rbx), %ecx
pushq $0x1
popq %rsi
subl %ecx, %esi
addl %eax, %ecx
cmovgl %eax, %esi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x48(%rax)
jmp 0x110c5
addl $-0x2, %r15d
cmpl $0x3, %r15d
ja 0x110c5
leaq 0x8068(%rip), %rcx      # 0x1911c
movslq (%rcx,%r15,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
addl %eax, 0x3c(%rbx)
jmp 0x110c5
addl %eax, 0x44(%rbx)
leaq 0x13fc4(%rip), %rdi     # 0x25090
leaq 0xc(%rsp), %rsi
callq 0x12b4e
leaq 0x88(%rbx), %rsi
leaq 0x60(%rsp), %rdi
callq 0x52e0
leaq 0x1528a(%rip), %rsi     # 0x26378
leaq 0x40(%rsp), %rdi
callq 0x52e0
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x12cea
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x13ee9
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x40(%rsp), %rdx
leaq 0x20(%rsp), %rcx
callq 0x13ce8
addq $0x68, %rbx
leaq 0x80(%rsp), %rsi
movq %rbx, %rdi
callq 0x5410
leaq 0x80(%rsp), %rdi
callq 0x5428
leaq 0x20(%rsp), %rdi
callq 0x5428
leaq 0x18(%rsp), %rdi
callq 0xd24a
leaq 0x40(%rsp), %rdi
callq 0x5428
leaq 0x60(%rsp), %rdi
callq 0x5428
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x5428
jmp 0x1119c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5428
jmp 0x111ab
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xd24a
leaq 0x40(%rsp), %rdi
callq 0x5428
jmp 0x111c4
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x5428
movq %rbx, %rdi
callq 0x53c0
// File: /workspace/github_cpp_makefile_star2_O2/XxAdi101xX[P]ChamberCrawler/Character/Character.cc
// Function: Character::addHP(int)
void Character::addHP(int amount) {
	int HPToBeAdded = amount;
	// if amount added exceeds HPMax
	if (amount > this->HPMax - this->getHP()) {
		HPToBeAdded = this->HPMax - this->getHP();

	}

	// adds HP
	this->HP += HPToBeAdded;

	// reports how much HP was gained/lost
	this->addAction(makeMsg(this->name, HPToBeAdded >= 0
		? WORD_GAIN_PAST_TENSE : WORD_LOSE_PAST_TENSE,
		to_string(HPToBeAdded >= 0 ? HPToBeAdded : -1 * HPToBeAdded)
		+ " " + WORD_HP_NOUN));

}

// Assembly:
pushq %rbp
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
movl 0x30(%rdi), %ebp
movl 0x34(%rdi), %eax
subl %eax, %ebp
cmpl %esi, %ebp
cmovgel %esi, %ebp
addl %ebp, %eax
movl %eax, 0x34(%rdi)
leaq 0x88(%rdi), %rsi
leaq 0x88(%rsp), %rdi
callq 0x52e0
testl %ebp, %ebp
leaq 0x14ad5(%rip), %rax     # 0x26238
leaq 0x14b4e(%rip), %rsi     # 0x262b8
cmovnsq %rax, %rsi
leaq 0x68(%rsp), %rdi
callq 0x52e0
movl %ebp, %esi
negl %esi
cmovsl %ebp, %esi
leaq 0x8(%rsp), %rdi
callq 0x12c40
leaq 0x740b(%rip), %rdx      # 0x18b9b
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xcdf7
leaq 0x149b2(%rip), %rdx     # 0x26158
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x12b82
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0x68(%rsp), %rdx
leaq 0x48(%rsp), %rcx
callq 0x13ce8
addq $0x68, %rbx
leaq 0xa8(%rsp), %rsi
movq %rbx, %rdi
callq 0x5410
leaq 0xa8(%rsp), %rdi
callq 0x5428
leaq 0x48(%rsp), %rdi
callq 0x5428
leaq 0x28(%rsp), %rdi
callq 0x5428
leaq 0x8(%rsp), %rdi
callq 0x5428
leaq 0x68(%rsp), %rdi
callq 0x5428
leaq 0x88(%rsp), %rdi
callq 0x5428
addq $0xc8, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x5428
jmp 0x11849
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x5428
jmp 0x11858
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x5428
jmp 0x11867
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5428
jmp 0x11876
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x5428
leaq 0x88(%rsp), %rdi
callq 0x5428
movq %rbx, %rdi
callq 0x53c0
movq %rax, %rbx
jmp 0x11880