LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/server/Cgi.cpp
// Function: CGI::~CGI()
CGI::~CGI()
{
	int i = -1;
	while (_envvar[++i]){
		free(_envvar[i]); _envvar[i] = NULL;}
	delete[] _envvar;
	
	i = 0;
	while (_args[i++]){
		free(_args[i]); _args[i] = NULL;}
	delete[] _args;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x13127
xorl %r14d, %r14d
callq 0x44a0
movq (%rbx), %rax
movq $0x0, (%rax,%r14)
movq (%rbx), %rax
movq 0x8(%rax,%r14), %rdi
addq $0x8, %r14
testq %rdi, %rdi
jne 0x13106
testq %rax, %rax
je 0x13134
movq %rax, %rdi
callq 0x44e0
movq 0x8(%rbx), %rdi
cmpq $0x0, (%rdi)
je 0x13168
movl $0x8, %r14d
movq (%rdi,%r14), %rdi
callq 0x44a0
movq 0x8(%rbx), %rax
movq $0x0, (%rax,%r14)
movq 0x8(%rbx), %rdi
cmpq $0x0, (%rdi,%r14)
leaq 0x8(%r14), %r14
jne 0x13144
testq %rdi, %rdi
je 0x13172
callq 0x44e0
movq 0x2b0(%rbx), %rdi
leaq 0x2c0(%rbx), %rax
cmpq %rax, %rdi
je 0x13190
movq (%rax), %rsi
incq %rsi
callq 0x43e0
movq 0x290(%rbx), %rdi
leaq 0x2a0(%rbx), %rax
cmpq %rax, %rdi
je 0x131ae
movq (%rax), %rsi
incq %rsi
callq 0x43e0
movq 0x270(%rbx), %rdi
leaq 0x280(%rbx), %rax
cmpq %rax, %rdi
je 0x131cc
movq (%rax), %rsi
incq %rsi
callq 0x43e0
movq 0x250(%rbx), %rdi
leaq 0x260(%rbx), %rax
cmpq %rax, %rdi
je 0x131ea
movq (%rax), %rsi
incq %rsi
callq 0x43e0
movq 0x230(%rbx), %rdi
leaq 0x240(%rbx), %rax
cmpq %rax, %rdi
je 0x13208
movq (%rax), %rsi
incq %rsi
callq 0x43e0
addq $0x20, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x40c0
// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/server/Cgi.cpp
// Function: CGI::mySwap(CGI&, CGI&)
void CGI::mySwap(CGI &a, CGI &b)
{
	std::swap(a._envvar, b._envvar);
	std::swap(a._emptyBody, b._emptyBody);
	std::swap(a._req, b._req);
	std::swap(a._exec, b._exec);
	std::swap(a._path_info, b._path_info);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq (%rsi), %rax
movq (%rdx), %rcx
movq %rcx, (%rsi)
movq %rax, (%rdx)
movq 0x10(%rsi), %rax
movq 0x10(%rdx), %rcx
movq %rcx, 0x10(%rsi)
movq %rax, 0x10(%rdx)
movq 0x18(%rsi), %rax
movq 0x18(%rdx), %rcx
movq %rcx, 0x18(%rsi)
movq %rax, 0x18(%rdx)
movl $0x230, %esi            # imm = 0x230
leaq (%r14,%rsi), %rdi
addq %rdx, %rsi
callq 0x42d0
movl $0x290, %esi            # imm = 0x290
leaq (%r14,%rsi), %rdi
addq %rbx, %rsi
callq 0x42d0
movl $0x2b0, %eax            # imm = 0x2B0
addq %rax, %r14
addq %rax, %rbx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x42d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/utils/utils.cpp
// Function: stringDelimSplit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const*)
std::vector<std::string> stringDelimSplit(std::string const &str, const char *delim)
{
    static std::vector<std::string> strArray;       // use static to return the vector
    size_t posinit = 0, posfind = 0;
    
    strArray.clear();
    while (posfind < str.size()){
        posfind = str.find(delim, posinit + 1);
        
        if (posfind != std::string::npos){
            strArray.push_back(str.substr(posinit, posfind - posinit));
            posinit = posfind;
        }
        else{
            strArray.push_back(str.substr(posinit, str.size() - posinit));
            posfind = str.size();
        }
    }
    return strArray;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, -0x50(%rbp)
movb 0x9c1c(%rip), %al       # 0x1d460
testb %al, %al
je 0x13948
movq 0x9bf5(%rip), %rsi      # 0x1d448
leaq 0x9bee(%rip), %rdi      # 0x1d448
callq 0x9c12
cmpq $0x0, 0x8(%r15)
je 0x13923
xorl %r13d, %r13d
leaq -0x48(%rbp), %r12
leaq 0x1(%r13), %rbx
movq %r14, %rdi
callq 0x41e0
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x46c0
cmpq $-0x1, %rax
je 0x138d8
movq %rax, %rbx
movq %rax, %rcx
subq %r13, %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x4410
leaq 0x9b96(%rip), %rdi      # 0x1d448
movq %r12, %rsi
callq 0xa1ec
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x138d3
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43e0
movq %rbx, %r13
jmp 0x13919
movq 0x8(%r15), %rcx
subq %r13, %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x4410
leaq 0x9b54(%rip), %rdi      # 0x1d448
movq %r12, %rsi
callq 0xa1ec
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x13915
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43e0
movq 0x8(%r15), %rbx
cmpq 0x8(%r15), %rbx
jb 0x13871
leaq 0x9b1e(%rip), %rsi      # 0x1d448
movq -0x50(%rbp), %rbx
movq %rbx, %rdi
callq 0x6302
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x48e0
jmp 0x1384c
jmp 0x13954
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x13970
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43e0
movq %rbx, %rdi
callq 0x46d0
// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/utils/utils.cpp
// Function: splitWithSep(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char)
std::vector<std::string> splitWithSep(std::string line, char sep)
{
	std::vector<std::string> res;
	std::istringstream s(line);

	while (std::getline(s, line, sep))
		if (!line.empty())
			res.push_back(line);
	
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x180, %rsp            # imm = 0x180
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq -0x1a0(%rbp), %rdi
movl $0x8, %edx
callq 0x4670
movsbl %r15b, %r15d
leaq -0x1a0(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x4740
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x139ed
cmpq $0x0, 0x8(%r14)
je 0x139bd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x14172
jmp 0x139bd
movq 0x95bc(%rip), %rsi      # 0x1cfb0
leaq -0x1a0(%rbp), %rdi
callq 0x4550
leaq -0x128(%rbp), %rdi
callq 0x4180
movq %rbx, %rax
addq $0x180, %rsp            # imm = 0x180
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x13a46
movq %rax, %r14
movq 0x9582(%rip), %rsi      # 0x1cfb0
leaq -0x1a0(%rbp), %rdi
callq 0x4550
leaq -0x128(%rbp), %rdi
callq 0x4180
movq %rbx, %rdi
callq 0x6396
movq %r14, %rdi
callq 0x46d0
// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/utils/utils.cpp
// Function: matchLocation(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Location, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, Location>>> const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::pair<const std::string, const Location*> 
		matchLocation(const std::map<std::string, Location>* loc, const std::string& locName)
{
	std::pair<bool, std::map<std::string, Location>::const_iterator> 
						bestMatch(0, loc->begin());

	// Checking each location name, and saving the most long match. As we stored location names in a map,
	// they're already sorted form smaller to longest same words, no need to check size: the last match will 
	// be the longest possible match (ex: if searching for "bla", "bl" location will be stored after "b" location)
	for (std::map<std::string, Location>::const_iterator it = loc->begin(); it != loc->end(); ++it)
	{
		if (!it->first.compare(0, std::string::npos, locName, 0, it->first.size()))
		{
			bestMatch.first = true;
			bestMatch.second = it;
		}
	}
	
	// Case there was no match
	if (!bestMatch.first)
		return std::pair<const std::string, const Location*>("", 0);

	return std::pair<const std::string, const Location*>(bestMatch.second->first, &bestMatch.second->second);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r12
movq 0x18(%rsi), %r13
addq $0x8, %r15
cmpq %r15, %r13
je 0x13ac8
movq %rdx, %r14
movq %r12, -0x30(%rbp)
xorl %ebx, %ebx
movq %r13, %r12
leaq 0x20(%r12), %rdi
movq 0x28(%r12), %r9
xorl %esi, %esi
movq $-0x1, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x4070
testl %eax, %eax
movzbl %bl, %ebx
movl $0x1, %eax
cmovel %eax, %ebx
cmoveq %r12, %r13
movq %r12, %rdi
callq 0x4470
movq %rax, %r12
cmpq %r15, %rax
jne 0x13a83
movq -0x30(%rbp), %r12
jmp 0x13aca
xorl %ebx, %ebx
testb $0x1, %bl
je 0x13af1
leaq 0x40(%r13), %rbx
leaq 0x10(%r12), %rax
movq %rax, (%r12)
movq 0x20(%r13), %rsi
movq 0x28(%r13), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x67a2
jmp 0x13b0e
leaq 0x10(%r12), %rax
movq %rax, (%r12)
leaq 0x1c00(%rip), %rdx      # 0x15701
movq %r12, %rdi
movq %rdx, %rsi
callq 0x5790
xorl %ebx, %ebx
movq %rbx, 0x20(%r12)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/utils/utils.cpp
// Function: locationSearcher(std::vector<ServerInfo, std::allocator<ServerInfo>> const*, std::pair<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&)
std::pair<const std::string, const Location*> 
		locationSearcher(const std::vector<ServerInfo> *srv, std::pair<std::string, std::string> const &names)
{
	// loop for each virtual server for a specific port
	for (size_t i = 0; i < srv->size(); i++){
	
		std::vector<std::string> sinfoNames = (*srv)[i].getNames();

		// loop for each names in each server block
        for (size_t j = 0; j < sinfoNames.size(); j++)
		{
			// virtual server is found
            if (!sinfoNames[j].compare(0, names.first.size() + 1, names.first))
                return matchLocation((*srv)[i].getLocation(), names.second);
        }
	}
	
	// Case no server_names match, using default server block (the first one)
	return matchLocation((*srv)[0].getLocation(), names.second);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rdi, -0x38(%rbp)
movq (%rsi), %rdi
movq %rsi, -0x40(%rbp)
cmpq %rdi, 0x8(%rsi)
setne %cl
je 0x13c3a
leaq 0x20(%r14), %rax
movq %rax, -0x60(%rbp)
xorl %ebx, %ebx
leaq -0x58(%rbp), %r12
movb %cl, -0x29(%rbp)
imulq $0x98, %rbx, %rax
movq %rax, -0x68(%rbp)
addq %rax, %rdi
callq 0x5ba4
movq %r12, %rdi
movq %rax, %rsi
callq 0x6302
movq -0x58(%rbp), %rdi
cmpq %rdi, -0x50(%rbp)
setne %r15b
je 0x13bcb
xorl %r13d, %r13d
xorl %r12d, %r12d
addq %r13, %rdi
movq 0x8(%r14), %rdx
incq %rdx
xorl %esi, %esi
movq %r14, %rcx
callq 0x44f0
testl %eax, %eax
je 0x13bd9
incq %r12
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rax
subq %rdi, %rax
sarq $0x5, %rax
addq $0x20, %r13
cmpq %rax, %r12
setb %r15b
jb 0x13b94
leaq -0x58(%rbp), %r12
movq %r12, %rdi
callq 0x6396
jmp 0x13c0b
movq -0x40(%rbp), %rax
movq -0x68(%rbp), %rdi
addq (%rax), %rdi
callq 0x5bb8
movq -0x38(%rbp), %rdi
movq %rax, %rsi
movq -0x60(%rbp), %rdx
callq 0x13a56
leaq -0x58(%rbp), %r12
movq %r12, %rdi
callq 0x6396
testb $0x1, %r15b
jne 0x13c6c
incq %rbx
movq -0x40(%rbp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rax
subq %rdi, %rax
sarq $0x3, %rax
movabsq $-0x79435e50d79435e5, %rcx # imm = 0x86BCA1AF286BCA1B
imulq %rcx, %rax
cmpq %rax, %rbx
setb %cl
jb 0x13b5f
movq -0x40(%rbp), %rax
movq (%rax), %rdi
callq 0x5bb8
addq $0x20, %r14
movq -0x38(%rbp), %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x13a56
movq -0x38(%rbp), %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb $0x1, -0x29(%rbp)
je 0x13c3a
jmp 0x13c59
jmp 0x13c76
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x6396
movq %rbx, %rdi
callq 0x46d0
// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/utils/utils.cpp
// Function: findVirtServ(std::vector<ServerInfo, std::allocator<ServerInfo>> const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
const ServerInfo* findVirtServ(const std::vector<ServerInfo>* infoVirServs, const std::string& hostValue)
{
	// Looking in each virtual server names if one match host header field value
	for (std::vector<ServerInfo>::const_iterator virtServ = infoVirServs->begin(); 
			virtServ != infoVirServs->end(); ++virtServ)
	{
		for (std::vector<std::string>::const_iterator servNames = virtServ->getNames().begin();
				servNames != virtServ->getNames().end(); ++servNames)
		{
			// If we match one server name, saving this virtual server
			if (*servNames == hostValue)
				return &(*virtServ);
		}
	}
	
	// Case no match
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r12
cmpq 0x8(%rdi), %r12
je 0x13cff
movq %rsi, %rbx
movq %rdi, %r14
movq %r12, %rdi
callq 0x5ba4
movq (%rax), %r15
movq %r12, %rdi
callq 0x5ba4
cmpq 0x8(%rax), %r15
sete %r13b
je 0x13cec
movq 0x8(%r15), %rdx
cmpq 0x8(%rbx), %rdx
jne 0x13ce2
testq %rdx, %rdx
je 0x13ce8
movq (%rbx), %rsi
movq (%r15), %rdi
callq 0x4400
testl %eax, %eax
je 0x13ce8
addq $0x20, %r15
jmp 0x13cb2
movq %r12, -0x30(%rbp)
testb $0x1, %r13b
je 0x13d03
addq $0x98, %r12
cmpq 0x8(%r14), %r12
jne 0x13ca7
xorl %eax, %eax
jmp 0x13d07
movq -0x30(%rbp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/utils/utils.cpp
// Function: isExtension(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
size_t isExtension(const std::string& uri)
{
	size_t dotPos = uri.find_last_of(".");

	if (dotPos == std::string::npos)
		return std::string::npos;
	
	size_t slashPos = uri.find_last_of("/");

	// If last '.' is after last '/', returning the dot position to compare
	// the extension
	return dotPos = (dotPos > slashPos) ? dotPos : std::string::npos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x1a96(%rip), %rsi      # 0x157c0
movq $-0x1, %rbx
movl $0x1, %ecx
movq $-0x1, %rdx
callq 0x4790
cmpq $-0x1, %rax
je 0x13d6d
movq %rax, %r15
leaq 0x1a64(%rip), %rsi      # 0x157b6
movl $0x1, %ecx
movq %r14, %rdi
movq $-0x1, %rdx
callq 0x4790
cmpq %rax, %r15
cmovaq %r15, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/utils/utils.cpp
// Function: getCgiExecutableName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Location const*)
std::string* getCgiExecutableName(const std::string& uri, const Location* loc)
{
	size_t dotPos = isExtension(uri);

	// Target ends with a '/', no extension so no cgi
	if (dotPos == std::string::npos)
		return 0;

	// Case target is a script (ends by .cgi)
	if (!uri.compare(dotPos, std::string::npos, ".cgi"))
		return new std::string(".cgi");
	
	// Case target match an extension in the appropriate location block,
	// we return the executable name
	std::map<std::string, std::string>::const_iterator it;
	if (loc && (it = loc->getCgiExe().find(std::string(uri.c_str() + dotPos))) != loc->getCgiExe().end())
		return new std::string(it->second);
	
	// Case the extension doesn't match anything
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r15
callq 0x13d16
cmpq $-0x1, %rax
je 0x13e84
movq %rax, %r14
leaq 0x1dd9(%rip), %rcx      # 0x15b82
movq %r15, %rdi
movq %rax, %rsi
movq $-0x1, %rdx
callq 0x4510
testl %eax, %eax
je 0x13e06
testq %rbx, %rbx
je 0x13e32
movq %rbx, %rdi
callq 0x8c54
movq %rax, %r12
addq (%r15), %r14
leaq -0x48(%rbp), %rdi
leaq -0x21(%rbp), %rdx
movq %r14, %rsi
callq 0x518a
leaq -0x48(%rbp), %rsi
movq %r12, %rdi
callq 0x12624
movq %rax, %r14
movq %rbx, %rdi
callq 0x8c54
addq $0x8, %rax
cmpq %rax, %r14
setne %r15b
jmp 0x13e38
movl $0x20, %edi
callq 0x43d0
movq %rax, %rbx
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x1d61(%rip), %rsi      # 0x15b82
leaq 0x1d5e(%rip), %rdx      # 0x15b86
movq %rbx, %rdi
callq 0x5790
jmp 0x13e86
xorl %r14d, %r14d
xorl %r15d, %r15d
testq %rbx, %rbx
je 0x13e56
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13e56
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43e0
testb %r15b, %r15b
je 0x13e84
movl $0x20, %edi
callq 0x43d0
movq %rax, %rbx
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x40(%r14), %rsi
movq 0x48(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x67a2
jmp 0x13e86
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x13e98
movq %rax, %r14
movl $0x20, %esi
movq %rbx, %rdi
jmp 0x13ebe
jmp 0x13ea7
movq %rax, %r14
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13ec8
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43e0
jmp 0x13ec8
movq %rax, %r14
movq %r14, %rdi
callq 0x46d0
// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/utils/utils.cpp
// Function: printLog(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>> const&)
void printLog(const std::string &msg, const std::string& addInfo)
{
	// current date and time on the current system
	time_t now = time(0);

	// convert now to string form and removing '\n'
	std::string date(ctime(&now));
	date.resize(date.length() - 1);

	#if defined DEBUG
		std::cout << "[" << date << "] " << msg;
		if (!addInfo.empty())
				std::cout << "-------------------------\n" << addInfo << "-------------------------\n\n";
	#else
		std::cout << "[" << date << "] " << msg;
		(void)addInfo;
	#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %edi, %edi
callq 0x4380
leaq -0x48(%rbp), %rdi
movq %rax, (%rdi)
callq 0x41c0
leaq -0x40(%rbp), %r15
leaq -0x19(%rbp), %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x518a
movq 0x8(%r15), %rsi
decq %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x4140
movq 0x90a7(%rip), %rdi      # 0x1cfc8
leaq 0x1d7b(%rip), %rsi      # 0x15ca3
movl $0x1, %edx
callq 0x4460
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq 0x9087(%rip), %rdi      # 0x1cfc8
callq 0x4460
movq %rax, %r15
leaq 0x1d55(%rip), %rsi      # 0x15ca5
movl $0x2, %edx
movq %rax, %rdi
callq 0x4460
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x4460
cmpq $0x0, 0x8(%rbx)
je 0x13fb2
movq 0x904e(%rip), %rdi      # 0x1cfc8
leaq 0x13a3(%rip), %rsi      # 0x15324
movl $0x1a, %edx
callq 0x4460
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x902f(%rip), %rdi      # 0x1cfc8
callq 0x4460
leaq 0x1400(%rip), %rsi      # 0x153a5
movl $0x1b, %edx
movq %rax, %rdi
callq 0x4460
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13fcb
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x43e0
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13ff2
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x43e0
movq %rbx, %rdi
callq 0x46d0
// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/utils/utils.cpp
// Function: SplitPathForExec(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::pair<std::string, std::string> *SplitPathForExec(std::string const &path)
{
	static std::pair<std::string, std::string> pathAndFile;
	size_t posLastSlash = path.find_last_of("/");

	pathAndFile.first.clear();
	pathAndFile.second.clear();

	pathAndFile.first = ".";
	pathAndFile.first += path.substr(0, posLastSlash);
	pathAndFile.second = ".";
	pathAndFile.second += path.substr(posLastSlash);
	return &pathAndFile;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movb 0x9494(%rip), %al       # 0x1d4a8
testb %al, %al
je 0x14135
leaq 0x1793(%rip), %rsi      # 0x157b6
movl $0x1, %ecx
movq %rbx, %rdi
movq $-0x1, %rdx
callq 0x4790
movq %rax, %r14
xorl %eax, %eax
movq %rax, 0x942d(%rip)      # 0x1d470
leaq 0x941e(%rip), %r15      # 0x1d468
movq 0x9417(%rip), %rcx      # 0x1d468
movb %al, (%rcx)
movq %rax, 0x9436(%rip)      # 0x1d490
movq 0x9427(%rip), %rcx      # 0x1d488
movb %al, (%rcx)
movq 0x9406(%rip), %rdx      # 0x1d470
leaq 0x174f(%rip), %rcx      # 0x157c0
movl $0x1, %r8d
movq %r15, %rdi
xorl %esi, %esi
callq 0x45d0
leaq -0x48(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x4410
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r15, %rdi
callq 0x4150
leaq -0x38(%rbp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x140bf
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43e0
movq 0x93ca(%rip), %rdx      # 0x1d490
leaq 0x93bb(%rip), %r15      # 0x1d488
leaq 0x16ec(%rip), %rcx      # 0x157c0
movl $0x1, %r8d
movq %r15, %rdi
xorl %esi, %esi
callq 0x45d0
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq $-0x1, %rcx
callq 0x4410
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r15, %rdi
callq 0x4150
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x1411f
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43e0
leaq 0x9342(%rip), %rax      # 0x1d468
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x492f
jmp 0x1401c
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
jne 0x1415d
jmp 0x14169
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14169
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43e0
movq %rbx, %rdi
callq 0x46d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelFeatureEvaluation.cpp
// Function: gaps::CreateFeatures(gaps::R3SurfelScene*)
int
CreateFeatures(R3SurfelScene *scene)
{
  // Check if features are already created
  if (scene->NFeatures() > 0) return 1;

  // Create pointset features
  scene->InsertFeature(new R3SurfelPointSetFeature("PointSetZMax", 0, 16, 0.5));
  scene->InsertFeature(new R3SurfelPointSetFeature("PointSetZMean", 0, 8, 1));
  scene->InsertFeature(new R3SurfelPointSetFeature("PointSetZStddev", 0, 8, 1));      
  scene->InsertFeature(new R3SurfelPointSetFeature("PointSetXYMax", 0, 4, 0.5));      
  scene->InsertFeature(new R3SurfelPointSetFeature("PointSetXYStddev1", 0, 2, 1));      
  scene->InsertFeature(new R3SurfelPointSetFeature("PointSetXYStddev2", 0, 2, 1));

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $0x0, 0xac(%rdi)
jg 0x161ae
movq %rdi, %r14
movl $0x48, %edi
callq 0x134e0
movq %rax, %rbx
leaq 0xc814b(%rip), %rsi     # 0xde180
movsd 0xc80fb(%rip), %xmm1    # 0xde138
movsd 0xc80fb(%rip), %xmm2    # 0xde140
xorps %xmm0, %xmm0
movq %rax, %rdi
callq 0x3e320
leaq 0x118bd9(%rip), %r15    # 0x12ec30
movq %r15, (%rbx)
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0xb0(%rax)
movl $0x48, %edi
callq 0x134e0
movq %rax, %rbx
leaq 0xc8110(%rip), %rsi     # 0xde18d
movsd 0xc80c3(%rip), %xmm1    # 0xde148
movsd 0xc80c3(%rip), %xmm2    # 0xde150
xorps %xmm0, %xmm0
movq %rax, %rdi
callq 0x3e320
movq %r15, (%rbx)
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0xb0(%rax)
movl $0x48, %edi
callq 0x134e0
movq %rax, %rbx
leaq 0xc80dd(%rip), %rsi     # 0xde19b
movsd 0xc8082(%rip), %xmm1    # 0xde148
movsd 0xc8082(%rip), %xmm2    # 0xde150
xorps %xmm0, %xmm0
movq %rax, %rdi
callq 0x3e320
movq %r15, (%rbx)
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0xb0(%rax)
movl $0x48, %edi
callq 0x134e0
movq %rax, %rbx
leaq 0xc80ac(%rip), %rsi     # 0xde1ab
movsd 0xc8051(%rip), %xmm1    # 0xde158
movsd 0xc8031(%rip), %xmm2    # 0xde140
xorps %xmm0, %xmm0
movq %rax, %rdi
callq 0x3e320
movq %r15, (%rbx)
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0xb0(%rax)
movl $0x48, %edi
callq 0x134e0
movq %rax, %rbx
leaq 0xc8079(%rip), %rsi     # 0xde1b9
movsd 0xc8018(%rip), %xmm1    # 0xde160
movsd 0xc8000(%rip), %xmm2    # 0xde150
xorps %xmm0, %xmm0
movq %rax, %rdi
callq 0x3e320
movq %r15, (%rbx)
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0xb0(%rax)
movl $0x48, %edi
callq 0x134e0
movq %rax, %rbx
leaq 0xc804a(%rip), %rsi     # 0xde1cb
movsd 0xc7fd7(%rip), %xmm1    # 0xde160
movsd 0xc7fbf(%rip), %xmm2    # 0xde150
xorps %xmm0, %xmm0
movq %rax, %rdi
callq 0x3e320
movq %r15, (%rbx)
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0xb0(%rax)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
jmp 0x161c3
jmp 0x161c3
jmp 0x161c3
jmp 0x161c3
jmp 0x161c3
movq %rax, %r14
movl $0x48, %esi
movq %rbx, %rdi
callq 0x134f0
movq %r14, %rdi
callq 0x138b0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelFeatureEvaluation.cpp
// Function: gaps::EvaluateFeatures(gaps::R3SurfelScene*)
int
EvaluateFeatures(R3SurfelScene *scene)
{
  // Evaluate features for every object 
  for (int i = 0; i < scene->NObjects(); i++) {
    R3SurfelObject *object = scene->Object(i);
    object->UpdateFeatureVector();
  }

  // Return success
  return 1;
}

// Assembly:
cmpl $0x0, 0x1c(%rdi)
jle 0x1620b
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x173a2
incq %r14
movslq 0x1c(%rbx), %rax
cmpq %rax, %r14
jl 0x161eb
addq $0x8, %rsp
popq %rbx
popq %r14
movl $0x1, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelFeatureEvaluation.cpp
// Function: gaps::R3SurfelOverheadGridFeature::R3SurfelOverheadGridFeature(char const*, char const*, double, double, double)
R3SurfelOverheadGridFeature::
R3SurfelOverheadGridFeature(const char *filename, const char *featurename, RNScalar minimum, RNScalar maximum, RNScalar weight)
  : R3SurfelFeature(featurename, minimum, maximum, weight),
    filename(NULL),
    world_to_grid_matrix(R3null_matrix),
    fp(NULL)
{
  // Initialize resolution
  grid_resolution[0] = 0;
  grid_resolution[1] = 0;

  // Open file
  fp = fopen(filename, "rb");
  if (!fp) {
    RNFail("Unable to open overhead grid file %s\n", filename);
    return;
  }

  // Read grid resolution from file
  if (fread(&grid_resolution, sizeof(int), 2, fp) != 2) {
    RNFail("Unable to read grid file %s", filename);
    fclose(fp);
    grid_resolution[0] = 0;
    grid_resolution[1] = 0;
    fp = NULL;
    return;
  }

  // Read world_to_grid transformation from file
  RNScalar m[9];
  if (fread(m, sizeof(RNScalar), 9, fp) != 9) {
    RNFail("Invalid format for grid file %s", filename);
    fclose(fp);
    grid_resolution[0] = 0;
    grid_resolution[1] = 0;
    fp = NULL;
    return;
  }

  // Create world_to_grid transformation matrix
  world_to_grid_matrix = R3Matrix(m);

  // Copy filename
  this->filename = RNStrdup(filename);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x3e320
leaq 0x1183f1(%rip), %rax    # 0x12ec98
movq %rax, (%rbx)
movq $0x0, 0x48(%rbx)
leaq 0x50(%rbx), %r12
leaq 0xd092b(%rip), %rsi     # 0xe71e8
movq %r12, %rdi
callq 0xa1842
xorps %xmm0, %xmm0
movups %xmm0, 0x98(%rbx)
leaq 0xc7907(%rip), %rsi     # 0xde1dd
movq %r14, %rdi
callq 0x135d0
movq %rax, 0xa0(%rbx)
testq %rax, %rax
je 0x16953
leaq 0x98(%rbx), %r15
movl $0x4, %esi
movl $0x2, %edx
movq %r15, %rdi
movq %rax, %rcx
callq 0x13790
cmpq $0x2, %rax
jne 0x16966
movq 0xa0(%rbx), %rcx
movq %rsp, %rdi
movl $0x8, %esi
movl $0x9, %edx
callq 0x13790
cmpq $0x9, %rax
jne 0x16979
leaq 0x50(%rsp), %rdi
movq %rsp, %rsi
callq 0xa18d2
leaq 0x50(%rsp), %rsi
movq %r12, %rdi
callq 0xa228c
movq %r14, %rdi
callq 0xadc0f
movq %rax, 0x48(%rbx)
jmp 0x1699d
leaq 0xc7886(%rip), %rdi     # 0xde1e0
movq %r14, %rsi
xorl %eax, %eax
callq 0xaddb2
jmp 0x1699d
leaq 0xc7899(%rip), %rdi     # 0xde206
movq %r14, %rsi
xorl %eax, %eax
callq 0xaddb2
jmp 0x1698a
leaq 0xc78a2(%rip), %rdi     # 0xde222
movq %r14, %rsi
xorl %eax, %eax
callq 0xaddb2
movq 0xa0(%rbx), %rdi
callq 0x134d0
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x169b0
jmp 0x169b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x3e3f8
movq %r14, %rdi
callq 0x138b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::~R3SurfelObject()
R3SurfelObject::
~R3SurfelObject(void)
{
  // Delete object properties
  while (NObjectProperties() > 0) {
    R3SurfelObjectProperty *property = ObjectProperty(NObjectProperties()-1);
    delete property;
  }

  // Delete object relationships
  while (NObjectRelationships() > 0) {
    R3SurfelObjectRelationship *relationship = ObjectRelationship(NObjectRelationships()-1);
    delete relationship;
  }

  // Delete object assignments
  while (NLabelAssignments() > 0) {
    R3SurfelLabelAssignment *assignment = LabelAssignment(NLabelAssignments()-1);
    delete assignment;
  }

  // Remove nodes from object
  while (NNodes() > 0) {
    R3SurfelNode *node = Node(NNodes()-1);
    RemoveNode(node);
  }

  // Delete parts
  while (NParts() > 0) {
    R3SurfelObject *part = Part(NParts()-1);
    delete part;
  }

  // Remove from parent
  SetParent(NULL);

  // Remove object from scene (handles all removals)
  if (scene) scene->RemoveObject(this);

  // Delete name
  if (name) free(name);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x117e87(%rip), %rax    # 0x12ed30
movq %rax, (%rdi)
movl 0x3c(%rdi), %eax
testl %eax, %eax
jle 0x16ee4
movq 0x30(%rbx), %rcx
movl %eax, %eax
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x16ec9
movq (%rdi), %rax
callq *0x8(%rax)
movl 0x3c(%rbx), %eax
jmp 0x16eaf
movq 0x40(%rbx), %rcx
movl %eax, %eax
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x16ee4
movq (%rdi), %rax
callq *0x8(%rax)
movl 0x4c(%rbx), %eax
testl %eax, %eax
jg 0x16ece
jmp 0x16f03
movq 0x50(%rbx), %rcx
movl %eax, %eax
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x16f03
movq (%rdi), %rax
callq *0x8(%rax)
movl 0x5c(%rbx), %eax
testl %eax, %eax
jg 0x16eed
jmp 0x16f1d
movq 0x60(%rbx), %rcx
movq -0x8(%rcx,%rax,8), %rsi
movq %rbx, %rdi
callq 0x16fc4
movslq 0x6c(%rbx), %rax
testq %rax, %rax
jg 0x16f0c
jmp 0x16f3e
movq 0x20(%rbx), %rcx
movl %eax, %eax
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x16f3e
movq (%rdi), %rax
callq *0x8(%rax)
movl 0x2c(%rbx), %eax
testl %eax, %eax
jg 0x16f28
movq (%rbx), %rax
movq %rbx, %rdi
xorl %esi, %esi
callq *0x38(%rax)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x16f62
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x20(%rax)
movq 0x88(%rbx), %rdi
testq %rdi, %rdi
je 0x16f73
callq 0x135e0
leaq 0xa0(%rbx), %rdi
callq 0x6ede0
leaq 0x70(%rbx), %rdi
callq 0x3e69c
leaq 0x60(%rbx), %rdi
callq 0xaaf9e
leaq 0x50(%rbx), %rdi
callq 0xaaf9e
leaq 0x40(%rbx), %rdi
callq 0xaaf9e
leaq 0x30(%rbx), %rdi
callq 0xaaf9e
addq $0x20, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0xaaf9e
jmp 0x16fbb
movq %rax, %rdi
callq 0x1848f
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::RemoveNode(gaps::R3SurfelNode*)
void R3SurfelObject::
RemoveNode(R3SurfelNode *node)
{
  // Just checking
  assert(node);
  assert(nodes.FindEntry(node));
  assert(node->object == this);

  // Update node
  node->UpdateBeforeRemove(this);

  // Update node
  node->object = NULL;

  // Remove node
  nodes.Remove(node);

  // Update complexity
  complexity -= node->Complexity();

  // Invalidate bounding box
  R3SurfelObject *ancestor = this;
  while (ancestor) {
    if (ancestor->bbox[0][0] == FLT_MAX) break;
    ancestor->bbox[0][0] = FLT_MAX;
    ancestor = ancestor->parent;
  }

  // Invalidate timestamp range
  ancestor = this;
  while (ancestor) {
    if (ancestor->timestamp_range[0] == FLT_MAX) break;
    ancestor->timestamp_range[0] = FLT_MAX;
    ancestor = ancestor->parent;
  }

  // Mark scene as dirty
  if (scene) scene->SetDirty();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq $0x0, 0x8(%rsi)
leaq 0x60(%rdi), %r15
movq %r15, %rdi
callq 0xaafac
subq 0x60(%rbx), %rax
shrq $0x3, %rax
movq %r15, %rdi
movl %eax, %esi
callq 0xab13e
movq %r14, %rdi
callq 0x3770e
movsd 0x98(%rbx), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x98(%rbx)
movsd 0xc7157(%rip), %xmm0    # 0xde170
movabsq $0x47efffffe0000000, %rax # imm = 0x47EFFFFFE0000000
movq %rbx, %rcx
movsd 0xa8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x17036
jnp 0x17046
movq %rax, 0xa8(%rcx)
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
jne 0x17026
movq %rbx, %rcx
movsd 0xd8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x17059
jnp 0x17069
movq %rax, 0xd8(%rcx)
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
jne 0x17049
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x17079
orb $0x1, 0x1e8(%rax)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::BBox() const
const R3Box& R3SurfelObject::
BBox(void) const
{
  // Return bounding box of object
  if (bbox[0][0] == FLT_MAX) 
    ((R3SurfelObject *) this)->UpdateBBox();
  return bbox;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movsd 0xa8(%rdi), %xmm0
ucomisd 0xc709e(%rip), %xmm0    # 0xde170
jne 0x170de
jp 0x170de
movq %rbx, %rdi
callq 0x170ea
addq $0xa0, %rbx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::UpdateBBox()
void R3SurfelObject::
UpdateBBox(void)
{
  // Check if bounding box is uptodate
  if (bbox[0][0] != FLT_MAX) return;

  // Initialize bounding box
  bbox = R3null_box;

  // Union bounding boxes of nodes
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    bbox.Union(node->BBox());
  }

  // Union bounding boxes of parts
  for (int i = 0; i < NParts(); i++) {
    R3SurfelObject *part = Part(i);
    bbox.Union(part->BBox());
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movsd 0xa8(%rdi), %xmm0
ucomisd 0xc706e(%rip), %xmm0    # 0xde170
jne 0x171bb
jp 0x171bb
movq %rdi, %rbx
leaq 0xa0(%rdi), %r14
addq $0xa8, %rdi
leaq 0x11e8a2(%rip), %r15    # 0x1359c8
leaq 0x8(%r15), %rsi
callq 0x850ec
leaq 0xc0(%rbx), %rdi
addq $0x20, %r15
movq %r15, %rsi
callq 0x850ec
cmpl $0x0, 0x6c(%rbx)
jle 0x1716f
xorl %r15d, %r15d
movq 0x60(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x37838
movq %r14, %rdi
movq %rax, %rsi
callq 0x6ea70
incq %r15
movslq 0x6c(%rbx), %rax
cmpq %rax, %r15
jl 0x1714b
cmpl $0x0, 0x2c(%rbx)
jle 0x171bb
xorl %r12d, %r12d
movq 0x20(%rbx), %rax
movq (%rax,%r12,8), %r15
movsd 0xa8(%r15), %xmm0
ucomisd 0xc6fdf(%rip), %xmm0    # 0xde170
jne 0x1719d
jp 0x1719d
movq %r15, %rdi
callq 0x170ea
addq $0xa0, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x6ea70
incq %r12
movslq 0x2c(%rbx), %rax
cmpq %rax, %r12
jl 0x17178
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::ElevationRange() const
RNInterval R3SurfelObject::
ElevationRange(void) const
{
  // Initialize elevation range
  RNInterval elevation_range = RNnull_interval;

  // Compute elevation range
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    RNInterval node_range = node->ElevationRange();
    elevation_range.Union(node_range);
  }

  // Return elevation range
  return elevation_range;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x5205f0(%rip), %rsi    # 0x5377d0
callq 0xacea8
cmpl $0x0, 0x6c(%r14)
jle 0x1723e
xorl %r12d, %r12d
leaq 0x8(%rsp), %r15
movq 0x60(%r14), %rax
movq (%rax,%r12,8), %rdi
callq 0x37860
movq %r15, %rdi
movq %rax, %rsi
callq 0xacea8
movsd 0x8(%rsp), %xmm0
movsd (%rbx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x17220
movsd %xmm0, (%rbx)
movsd 0x10(%rsp), %xmm0
ucomisd 0x8(%rbx), %xmm0
jbe 0x17232
movsd %xmm0, 0x8(%rbx)
incq %r12
movslq 0x6c(%r14), %rax
cmpq %rax, %r12
jl 0x171f4
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::TimestampRange() const
const RNInterval& R3SurfelObject::
TimestampRange(void) const
{
  // Return timestamp range of object
  if (timestamp_range.Min() == FLT_MAX) 
    ((R3SurfelObject *) this)->UpdateTimestampRange();
  return timestamp_range;
}

// Assembly:
pushq %rbx
leaq 0xd8(%rdi), %rbx
movsd 0xd8(%rdi), %xmm0
ucomisd 0xc6f0a(%rip), %xmm0    # 0xde170
jne 0x1726f
jp 0x1726f
callq 0x17274
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::UpdateTimestampRange()
void R3SurfelObject::
UpdateTimestampRange(void)
{
  // Check if bounding box is uptodate
  if (timestamp_range[0] != FLT_MAX) return;

  // Initialize timestamp range
  timestamp_range.Reset(FLT_MAX,-FLT_MAX);

  // Union timestamp ranges of nodes
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    timestamp_range.Union(node->TimestampRange());
  }

  // Union timestamp ranges of parts
  for (int i = 0; i < NParts(); i++) {
    R3SurfelObject *part = Part(i);
    timestamp_range.Union(part->TimestampRange());
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movsd 0xd8(%rdi), %xmm0
ucomisd 0xc6ee7(%rip), %xmm0    # 0xde170
jne 0x1736f
jp 0x1736f
movq %rdi, %rbx
movapd 0xc7090(%rip), %xmm0    # 0xde330
movupd %xmm0, 0xd8(%rdi)
cmpl $0x0, 0x6c(%rdi)
jle 0x172fb
xorl %r14d, %r14d
movq 0x60(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x37888
movsd (%rax), %xmm0
movsd 0xd8(%rbx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x172d8
movsd %xmm0, 0xd8(%rbx)
movsd 0x8(%rax), %xmm0
ucomisd 0xe0(%rbx), %xmm0
jbe 0x172ef
movsd %xmm0, 0xe0(%rbx)
incq %r14
movslq 0x6c(%rbx), %rax
cmpq %rax, %r14
jl 0x172b1
cmpl $0x0, 0x2c(%rbx)
jle 0x1736f
xorl %r15d, %r15d
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %r14
movsd 0xd8(%r14), %xmm0
ucomisd 0xc6e53(%rip), %xmm0    # 0xde170
jne 0x17329
jp 0x17329
movq %r14, %rdi
callq 0x17274
movsd 0xd8(%r14), %xmm0
movsd 0xd8(%rbx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x17348
movsd %xmm0, 0xd8(%rbx)
movsd 0xe0(%r14), %xmm0
ucomisd 0xe0(%rbx), %xmm0
jbe 0x17363
movsd %xmm0, 0xe0(%rbx)
incq %r15
movslq 0x2c(%rbx), %rax
cmpq %rax, %r15
jl 0x17304
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::FeatureVector() const
const R3SurfelFeatureVector& R3SurfelObject::
FeatureVector(void) const
{
  // Update feature vector
  if (feature_vector.NValues() == 0) {
    if (scene->NFeatures() > 0) {
      ((R3SurfelObject *) this)->UpdateFeatureVector();
    }
  }

  // Return feature vector
  return feature_vector;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x80(%rdi)
jne 0x17398
movq 0x8(%rbx), %rax
cmpl $0x0, 0xac(%rax)
jle 0x17398
movq %rbx, %rdi
callq 0x173a2
addq $0x70, %rbx
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::UpdateFeatureVector()
void R3SurfelObject::
UpdateFeatureVector(void)
{
  // Check if need update
  if (!scene) return;
  if (scene->NFeatures() == 0) return;
  if (feature_vector.NValues() == scene->NFeatures()) return;

  // Create feature vector
  R3SurfelFeatureVector vector(scene->NFeatures());

  // Evaluate features
  for (int i = 0; i < scene->NFeatures(); i++) {
    R3SurfelFeature *feature = scene->Feature(i);
    feature->UpdateFeatureVector(this, vector);
  }

  // Set feature vector
  SetFeatureVector(vector);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x1742a
movl 0xac(%rax), %esi
testl %esi, %esi
je 0x1742a
movq %rdi, %rbx
cmpl %esi, 0x80(%rdi)
je 0x1742a
leaq 0x8(%rsp), %rdi
callq 0x3e568
movq 0x8(%rbx), %rax
cmpl $0x0, 0xac(%rax)
jle 0x17412
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
movq 0xa0(%rax), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
movq %r14, %rdx
callq *0x48(%rax)
incq %r15
movq 0x8(%rbx), %rax
movslq 0xac(%rax), %rcx
cmpq %rcx, %r15
jl 0x173e8
movq (%rbx), %rax
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq *0x20(%rax)
leaq 0x8(%rsp), %rdi
callq 0x3e69c
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x17436
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3e69c
movq %rbx, %rdi
callq 0x138b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::Scan() const
R3SurfelScan *R3SurfelObject::
Scan(void) const
{
  // Search for scan amongst object's nodes
  R3SurfelScan *scan = NULL;
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    R3SurfelScan *s = node->Scan();
    if (s && (s != scan)) {
      if (scan) return NULL;
      else scan = s;
    }
  }

  // Return scan, or NULL if not found
  return scan;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $0x0, 0x6c(%rdi)
jle 0x174b2
movq %rdi, %rbx
xorl %r15d, %r15d
xorl %r14d, %r14d
movq 0x60(%rbx), %rax
movq (%rax,%r15,8), %rdi
movl $0x1, %esi
callq 0x37aec
testq %rax, %rax
sete %cl
cmpq %r14, %rax
sete %dl
orb %cl, %dl
movb $0x1, %cl
jne 0x174a0
testq %r14, %r14
sete %cl
cmoveq %rax, %r14
testb %cl, %cl
je 0x174b2
incq %r15
movslq 0x6c(%rbx), %rax
cmpq %rax, %r15
jl 0x17472
jmp 0x174b5
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::FindObjectProperty(int) const
R3SurfelObjectProperty *R3SurfelObject::
FindObjectProperty(int type) const
{
  // Search for property of type
  for (int i = 0; i < NObjectProperties(); i++) {
    R3SurfelObjectProperty *property = ObjectProperty(i);
    if (property->Type() == type) return property;
  }

  // Property not found
  return NULL;
}

// Assembly:
movslq 0x3c(%rdi), %rcx
testq %rcx, %rcx
jle 0x174e3
movq 0x30(%rdi), %rdx
xorl %edi, %edi
movq (%rdx,%rdi,8), %r8
cmpl %esi, 0x2c(%r8)
cmoveq %r8, %rax
je 0x174e5
incq %rdi
cmpq %rdi, %rcx
jne 0x174cd
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::InsertIntoPointSet(gaps::R3SurfelPointSet*, int, double) const
void R3SurfelObject::
InsertIntoPointSet(R3SurfelPointSet *pointset, RNBoolean leaf_level, RNScalar max_resolution) const
{
  // Insert points
  if (leaf_level && (NParts() > 0)) {
    // Insert points from leaf level of all parts of object
    for (int i = 0; i < NParts(); i++) {
      R3SurfelObject *part = Part(i);
      part->InsertIntoPointSet(pointset, leaf_level, max_resolution);     
    }
  }
  else {
    // Insert points from all nodes
    for (int i = 0; i < NNodes(); i++) {
      R3SurfelNode *node = Node(i);
      node->InsertIntoPointSet(pointset, leaf_level, max_resolution);
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
testl %edx, %edx
je 0x17595
cmpl $0x0, 0x2c(%r15)
jle 0x17595
cmpl $0x0, 0x2c(%r15)
jle 0x175c2
xorl %r12d, %r12d
movq 0x20(%r15), %rax
movq (%rax,%r12,8), %rdi
movq %r14, %rsi
movl %ebx, %edx
movsd (%rsp), %xmm0
callq 0x17546
incq %r12
movslq 0x2c(%r15), %rax
cmpq %rax, %r12
jl 0x17570
jmp 0x175c2
cmpl $0x0, 0x6c(%r15)
jle 0x175c2
xorl %r12d, %r12d
movq 0x60(%r15), %rax
movq (%rax,%r12,8), %rdi
movq %r14, %rsi
movl %ebx, %edx
movsd (%rsp), %xmm0
callq 0x37b76
incq %r12
movslq 0x6c(%r15), %rax
cmpq %rax, %r12
jl 0x1759f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::HasSurfels(int) const
RNBoolean R3SurfelObject::
HasSurfels(RNBoolean leaf_level) const
{
  // Check nodes
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    if (node->HasSurfels(leaf_level)) return TRUE;
  }

  // Check parts
  if (leaf_level) {
    for (int i = 0; i < NParts(); i++) {
      R3SurfelObject *part = Part(i);
      if (part->HasSurfels(leaf_level)) return TRUE;
    }
  }

  // Did not find anything
  return FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x0, 0x6c(%rdi)
setg %bpl
jle 0x17629
movq 0x60(%r14), %rax
movq (%rax), %rdi
movl %ebx, %esi
callq 0x378b0
testl %eax, %eax
jne 0x1761f
movl $0x1, %r15d
movslq 0x6c(%r14), %rax
cmpq %rax, %r15
setl %bpl
jge 0x17629
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebx, %esi
callq 0x378b0
incq %r15
testl %eax, %eax
je 0x175fc
movl $0x1, %eax
testb %bpl, %bpl
jne 0x1767f
testl %ebx, %ebx
je 0x1767d
cmpl $0x0, 0x2c(%r14)
setg %bpl
jle 0x1767d
movq 0x20(%r14), %rax
movq (%rax), %rdi
movl %ebx, %esi
callq 0x175ce
testl %eax, %eax
jne 0x17673
movl $0x1, %r15d
movslq 0x2c(%r14), %rax
cmpq %rax, %r15
setl %bpl
jge 0x1767d
movq 0x20(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebx, %esi
callq 0x175ce
incq %r15
testl %eax, %eax
je 0x17650
movl $0x1, %eax
testb %bpl, %bpl
jne 0x1767f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::BestLabelAssignment(int) const
R3SurfelLabelAssignment *R3SurfelObject::
BestLabelAssignment(int originator) const
{
  // Return best assignment (or NULL if there is none)
  R3SurfelLabelAssignment *best_assignment = NULL;
  RNScalar best_confidence = -FLT_MAX;
  for (int i = 0; i < assignments.NEntries(); i++) {
    R3SurfelLabelAssignment *assignment = assignments.Kth(i);
    if (assignment->Originator() == originator) {
      RNScalar confidence = assignment->Confidence();
      if (confidence > best_confidence) {
        best_assignment = assignment;
        best_confidence = confidence;
      }
    }
  }

  // Return best assignment
  return best_assignment;
}

// Assembly:
movslq 0x5c(%rdi), %rcx
testq %rcx, %rcx
jle 0x17710
movq 0x50(%rdi), %rdx
movsd 0xc6a95(%rip), %xmm0    # 0xde178
xorl %edi, %edi
xorl %eax, %eax
movq (%rdx,%rdi,8), %r8
cmpl %esi, 0x40(%r8)
jne 0x17707
movsd 0x38(%r8), %xmm1
ucomisd %xmm0, %xmm1
maxsd %xmm0, %xmm1
cmovaq %r8, %rax
movapd %xmm1, %xmm0
incq %rdi
cmpq %rdi, %rcx
jne 0x176e7
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::CurrentLabelAssignment() const
R3SurfelLabelAssignment *R3SurfelObject::
CurrentLabelAssignment(void) const
{
  // Return best assignment (either human or predicted)
  R3SurfelLabelAssignment *human_assignment = HumanLabelAssignment();
  if (human_assignment) return human_assignment;
  R3SurfelLabelAssignment *predicted_assignment = PredictedLabelAssignment();
  if (predicted_assignment) return predicted_assignment;
  return NULL;
}

// Assembly:
movslq 0x5c(%rdi), %rcx
testq %rcx, %rcx
jle 0x177e0
movq 0x50(%rdi), %rdx
movsd 0xc69c7(%rip), %xmm0    # 0xde178
xorl %esi, %esi
xorl %eax, %eax
movq (%rdx,%rsi,8), %r8
cmpl $0x0, 0x40(%r8)
jne 0x177d6
movsd 0x38(%r8), %xmm1
ucomisd %xmm0, %xmm1
maxsd %xmm0, %xmm1
cmovaq %r8, %rax
movapd %xmm1, %xmm0
incq %rsi
cmpq %rsi, %rcx
jne 0x177b5
jmp 0x177e2
xorl %eax, %eax
testl %ecx, %ecx
jle 0x17822
testq %rax, %rax
jne 0x17822
movq 0x50(%rdi), %rdx
movsd 0xc6981(%rip), %xmm0    # 0xde178
xorl %esi, %esi
xorl %eax, %eax
movq (%rdx,%rsi,8), %rdi
cmpl $0x1, 0x40(%rdi)
jne 0x1781a
movsd 0x38(%rdi), %xmm1
ucomisd %xmm0, %xmm1
maxsd %xmm0, %xmm1
cmovaq %rdi, %rax
movapd %xmm1, %xmm0
incq %rsi
cmpq %rsi, %rcx
jne 0x177fb
retq
nop