LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: llefranc[P]42_webserv/srcs/server/Response.cpp
// Function: Response::postToFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Response::postToFile(const std::string& uri)
{
	std::fstream postFile;

	postFile.open(uri.c_str(), std::ios::app);

	if (!postFile.is_open())
		throw (StatusLine(500, REASON_500, "failed to open file in post method"));
	
	postFile << _req->getBody().getBody();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2a0, %rsp            # imm = 0x2A0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x268(%rbp)
leaq -0x220(%rbp), %rdi
movq %rdi, -0x260(%rbp)
callq 0x5630
movq -0x10(%rbp), %rdi
callq 0x5240
movq -0x260(%rbp), %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x54d0
jmp 0x1ed90
leaq -0x220(%rbp), %rdi
callq 0x58c0
movb %al, -0x269(%rbp)
jmp 0x1eda4
movb -0x269(%rbp), %al
testb $0x1, %al
jne 0x1eeb0
jmp 0x1edb4
movb $0x1, -0x252(%rbp)
movl $0x48, %edi
callq 0x5290
movq %rax, -0x280(%rbp)
leaq -0x251(%rbp), %rdi
movq %rdi, -0x278(%rbp)
callq 0x58f0
movq -0x278(%rbp), %rdx
leaq 0x4cd1(%rip), %rsi      # 0x23abe
leaq -0x250(%rbp), %rdi
callq 0x63e0
jmp 0x1edfb
movq -0x280(%rbp), %rdi
leaq 0x4c9f(%rip), %rdx      # 0x23aa8
movl $0x1f4, %esi            # imm = 0x1F4
leaq -0x250(%rbp), %rcx
callq 0x199d0
jmp 0x1ee1c
movq -0x280(%rbp), %rdi
movb $0x0, -0x252(%rbp)
leaq 0x11f5f(%rip), %rsi     # 0x30d90
leaq -0x53b8(%rip), %rdx     # 0x19a80
callq 0x58a0
jmp 0x1ef2e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
jmp 0x1ef16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
jmp 0x1ee8b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x5a08
leaq -0x251(%rbp), %rdi
callq 0x55c0
testb $0x1, -0x252(%rbp)
jne 0x1eea2
jmp 0x1eeae
movq -0x280(%rbp), %rdi
callq 0x53f0
jmp 0x1ef16
movq -0x268(%rbp), %rax
leaq -0x210(%rbp), %rcx
movq %rcx, -0x290(%rbp)
movq 0x8(%rax), %rdi
callq 0x17470
movq %rax, -0x288(%rbp)
jmp 0x1eed7
movq -0x288(%rbp), %rdi
callq 0x19c90
movq %rax, -0x298(%rbp)
jmp 0x1eeec
movq -0x298(%rbp), %rsi
movq -0x290(%rbp), %rdi
callq 0x54a0
jmp 0x1ef01
leaq -0x220(%rbp), %rdi
callq 0x5120
addq $0x2a0, %rsp            # imm = 0x2A0
popq %rbp
retq
leaq -0x220(%rbp), %rdi
callq 0x5120
movq -0x228(%rbp), %rdi
callq 0x58e0
nop
// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0xc(%rbp)
movslq %ecx, %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x2012e
movq -0x18(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x5640
movq -0x18(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
jmp 0x200eb
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x20148
movq -0x20(%rbp), %rdi
callq 0x56c0
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl -0xc(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0xc(%rbp)
movslq %ecx, %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x20197
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x5640
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
jmp 0x2014f
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x201b2
movq -0x28(%rbp), %rdi
callq 0x56c0
movq -0x18(%rbp), %rdi
addq $0x290, %rdi            # imm = 0x290
callq 0x10bd0
movq -0x18(%rbp), %rdi
addq $0x270, %rdi            # imm = 0x270
callq 0x5a08
movq -0x18(%rbp), %rdi
addq $0x250, %rdi            # imm = 0x250
callq 0x5a08
movq -0x18(%rbp), %rdi
addq $0x230, %rdi            # imm = 0x230
callq 0x5a08
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x5120
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x20ae0
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
callq 0x20b20
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
addq $0x18, %rsi
callq 0x1f270
movq -0x10(%rbp), %rdi
addq $0x230, %rdi            # imm = 0x230
movq -0x18(%rbp), %rsi
addq $0x230, %rsi            # imm = 0x230
callq 0x19f30
movq -0x10(%rbp), %rdi
addq $0x290, %rdi            # imm = 0x290
movq -0x18(%rbp), %rsi
addq $0x290, %rsi            # imm = 0x290
callq 0x20b60
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0xb0, %rsp
movq %rdi, -0x88(%rbp)
movq %rdi, %rax
movq %rax, -0x80(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpb $0x0, 0x108a4(%rip)     # 0x31590
jne 0x20d31
leaq 0x1089b(%rip), %rdi     # 0x31590
callq 0x5950
cmpl $0x0, %eax
je 0x20d31
leaq 0x10872(%rip), %rdi     # 0x31578
callq 0x97f0
leaq -0x173c2(%rip), %rdi    # 0x9950
leaq 0x1085f(%rip), %rsi     # 0x31578
leaq 0x107e8(%rip), %rdx     # 0x31508
callq 0x5490
leaq 0x10864(%rip), %rdi     # 0x31590
callq 0x5380
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
leaq 0x10830(%rip), %rdi     # 0x31578
callq 0x10af0
movq -0x28(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rdi
callq 0x53b0
movq %rax, %rcx
movq -0x90(%rbp), %rax
cmpq %rcx, %rax
jae 0x20e84
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x1, %rdx
callq 0x59e0
movq %rax, -0x28(%rbp)
cmpq $-0x1, -0x28(%rbp)
je 0x20df8
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
subq %rdx, %rcx
leaq -0x48(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x5590
movq -0x98(%rbp), %rsi
leaq 0x107b7(%rip), %rdi     # 0x31578
callq 0x12640
jmp 0x20dc8
leaq -0x48(%rbp), %rdi
callq 0x5a08
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x20e7f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a08
jmp 0x20ea4
movq -0x10(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0xa8(%rbp)
callq 0x53b0
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
movq %rax, %rcx
movq -0x20(%rbp), %rax
subq %rax, %rcx
leaq -0x78(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x5590
movq -0xa0(%rbp), %rsi
leaq 0x1072f(%rip), %rdi     # 0x31578
callq 0x12640
jmp 0x20e50
leaq -0x78(%rbp), %rdi
callq 0x5a08
movq -0x10(%rbp), %rdi
callq 0x53b0
movq %rax, -0x28(%rbp)
jmp 0x20e7f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x5a08
jmp 0x20ea4
jmp 0x20d4d
movq -0x88(%rbp), %rdi
leaq 0x106e6(%rip), %rsi     # 0x31578
callq 0x9830
movq -0x80(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x58e0
nopl (%rax)
// File: 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
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rsi, -0x1b0(%rbp)
movq %rdi, -0x1c0(%rbp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, -0x1b8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movb $0x0, -0x12(%rbp)
callq 0x97f0
movq -0x1b0(%rbp), %rsi
leaq -0x198(%rbp), %rdi
movl $0x8, %edx
callq 0x5880
jmp 0x20f03
jmp 0x20f05
movq -0x1b0(%rbp), %rsi
movsbl -0x11(%rbp), %edx
leaq -0x198(%rbp), %rdi
callq 0x5970
movq %rax, -0x1c8(%rbp)
jmp 0x20f25
movq -0x1c8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x56a0
movb %al, -0x1c9(%rbp)
jmp 0x20f43
movb -0x1c9(%rbp), %al
testb $0x1, %al
jne 0x20f4f
jmp 0x20faf
movq -0x1b0(%rbp), %rdi
callq 0x5870
testb $0x1, %al
jne 0x20faa
movq -0x1b0(%rbp), %rsi
movq -0x1c0(%rbp), %rdi
callq 0x21a40
jmp 0x20f74
jmp 0x20faa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
jmp 0x20fe1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x5280
jmp 0x20fe1
jmp 0x20f05
movb $0x1, -0x12(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x5280
testb $0x1, -0x12(%rbp)
jne 0x20fd1
movq -0x1c0(%rbp), %rdi
callq 0x9950
movq -0x1b8(%rbp), %rax
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
movq -0x1c0(%rbp), %rdi
callq 0x9950
movq -0x1a0(%rbp), %rdi
callq 0x58e0
nopl (%rax)
// File: 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
subq $0x80, %rsp
movq %rdi, -0x68(%rbp)
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x21ab0
movq %rax, -0x38(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x21ae0
movq -0x10(%rbp), %rdi
callq 0x21ab0
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x21b40
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x21b10
testb $0x1, %al
jne 0x21074
jmp 0x210da
leaq -0x40(%rbp), %rdi
callq 0x21b70
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x21b70
movq %rax, %rdi
callq 0x53b0
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rcx
movq %rax, %r9
xorl %eax, %eax
movl %eax, %r8d
movq $-0x1, %rdx
movq %r8, %rsi
callq 0x50a0
cmpl $0x0, %eax
jne 0x210ca
movb $0x1, -0x28(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x210cc
leaq -0x40(%rbp), %rdi
callq 0x21ba0
jmp 0x21054
testb $0x1, -0x28(%rbp)
jne 0x210fe
movq -0x68(%rbp), %rdi
movq $0x0, -0x50(%rbp)
leaq 0x2619(%rip), %rsi      # 0x2370c
leaq -0x50(%rbp), %rdx
callq 0x21bd0
jmp 0x21135
leaq -0x28(%rbp), %rdi
addq $0x8, %rdi
callq 0x21b70
movq %rax, -0x80(%rbp)
leaq -0x28(%rbp), %rdi
addq $0x8, %rdi
callq 0x21b70
movq -0x68(%rbp), %rdi
movq -0x80(%rbp), %rsi
addq $0x20, %rax
movq %rax, -0x58(%rbp)
leaq -0x58(%rbp), %rdx
callq 0x21c50
movq -0x60(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x90, %rsp
movq %rdi, -0x60(%rbp)
movq %rdi, %rax
movq %rax, -0x58(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7610
movq %rax, %rcx
movq -0x68(%rbp), %rax
cmpq %rcx, %rax
jae 0x212bc
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x21c90
movq %rax, %rdi
callq 0x8d50
movq %rax, %rsi
leaq -0x38(%rbp), %rdi
callq 0x9830
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xaa60
movq %rax, %rcx
movq -0x70(%rbp), %rax
cmpq %rcx, %rax
jae 0x2128e
movq -0x40(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x10b10
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rdi
callq 0x53b0
movq -0x80(%rbp), %rdi
movq %rax, %rdx
incq %rdx
movq -0x18(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
callq 0x56e0
movl %eax, -0x74(%rbp)
jmp 0x2121b
movl -0x74(%rbp), %eax
cmpl $0x0, %eax
jne 0x2127b
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x21c90
movq %rax, %rdi
callq 0x8d80
movq %rax, -0x88(%rbp)
jmp 0x21241
movq -0x88(%rbp), %rsi
movq -0x60(%rbp), %rdi
movq -0x18(%rbp), %rdx
addq $0x20, %rdx
callq 0x21000
jmp 0x2125b
movl $0x1, -0x50(%rbp)
jmp 0x21295
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x9950
jmp 0x212f2
jmp 0x2127d
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x211c4
movl $0x0, -0x50(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x9950
movl -0x50(%rbp), %eax
testl %eax, %eax
je 0x212a9
jmp 0x212a7
jmp 0x212e5
jmp 0x212ab
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2117a
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x21c90
movq %rax, %rdi
callq 0x8d80
movq -0x60(%rbp), %rdi
movq %rax, %rsi
movq -0x18(%rbp), %rdx
addq $0x20, %rdx
callq 0x21000
movq -0x58(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x58e0
nopl (%rax,%rax)
// File: 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
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7740
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7770
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x7ad0
testb $0x1, %al
jne 0x21340
jmp 0x213d4
leaq -0x20(%rbp), %rdi
callq 0x21cb0
movq %rax, %rdi
callq 0x8d50
movq %rax, %rdi
callq 0xab80
movq %rax, -0x30(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x21cb0
movq %rax, %rdi
callq 0x8d50
movq %rax, %rdi
callq 0xabb0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xaee0
testb $0x1, %al
jne 0x2138d
jmp 0x213c4
leaq -0x30(%rbp), %rdi
callq 0xaf50
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x21cd0
testb $0x1, %al
jne 0x213a8
jmp 0x213b7
leaq -0x20(%rbp), %rdi
callq 0x7b40
movq %rax, -0x8(%rbp)
jmp 0x213dc
jmp 0x213b9
leaq -0x30(%rbp), %rdi
callq 0xaf70
jmp 0x2135d
jmp 0x213c6
leaq -0x20(%rbp), %rdi
callq 0x7b60
jmp 0x2131d
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x23bf(%rip), %rsi      # 0x237c6
movq $-0x1, %rdx
callq 0x5500
movq %rax, -0x18(%rbp)
cmpq $-0x1, -0x18(%rbp)
jne 0x21428
movq $-0x1, -0x8(%rbp)
jmp 0x21470
movq -0x10(%rbp), %rdi
leaq 0x2389(%rip), %rsi      # 0x237bc
movq $-0x1, %rdx
callq 0x5500
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x21457
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x21464
movq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x21464
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x54e0
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x5220
movq %rax, -0x60(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x58f0
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x63e0
jmp 0x2179d
leaq -0x39(%rbp), %rdi
callq 0x55c0
leaq -0x38(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x57c0
movq -0x68(%rbp), %rdi
movq %rax, %rsi
decq %rsi
callq 0x5750
jmp 0x217c4
movq 0xf805(%rip), %rdi      # 0x30fd0
leaq 0x24c4(%rip), %rsi      # 0x23c96
callq 0x5540
movq %rax, -0x70(%rbp)
jmp 0x217dd
movq -0x70(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x54a0
movq %rax, -0x78(%rbp)
jmp 0x217f0
movq -0x78(%rbp), %rdi
leaq 0x249d(%rip), %rsi      # 0x23c98
callq 0x5540
movq %rax, -0x80(%rbp)
jmp 0x21806
movq -0x80(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x54a0
jmp 0x21815
movq -0x10(%rbp), %rdi
callq 0x5870
testb $0x1, %al
jne 0x2189c
movq 0xf7a7(%rip), %rdi      # 0x30fd0
leaq 0x1aff(%rip), %rsi      # 0x2332f
callq 0x5540
movq %rax, -0x88(%rbp)
jmp 0x2183e
movq -0x88(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x54a0
movq %rax, -0x90(%rbp)
jmp 0x21857
movq -0x90(%rbp), %rdi
leaq 0x1b4b(%rip), %rsi      # 0x233b0
callq 0x5540
jmp 0x2186c
jmp 0x2189c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0x55c0
jmp 0x218ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x5a08
jmp 0x218ae
leaq -0x38(%rbp), %rdi
callq 0x5a08
addq $0x90, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x58e0
nopw (%rax,%rax)
// File: 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
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
cmpb $0x0, 0xfd02(%rip)      # 0x315d8
jne 0x2191d
leaq 0xfcf9(%rip), %rdi      # 0x315d8
callq 0x5950
cmpl $0x0, %eax
je 0x2191d
leaq 0xfca8(%rip), %rdi      # 0x31598
callq 0x20a60
jmp 0x218f7
leaq -0x10d2e(%rip), %rdi    # 0x10bd0
leaq 0xfc93(%rip), %rsi      # 0x31598
leaq 0xfbfc(%rip), %rdx      # 0x31508
callq 0x5490
leaq 0xfcc0(%rip), %rdi      # 0x315d8
callq 0x5380
movq -0x8(%rbp), %rdi
leaq 0x1e94(%rip), %rsi      # 0x237bc
movq $-0x1, %rdx
callq 0x5500
movq %rax, -0x20(%rbp)
leaq 0xfc59(%rip), %rdi      # 0x31598
movq %rdi, -0x70(%rbp)
callq 0x5700
leaq 0xfc69(%rip), %rdi      # 0x315b8
callq 0x5700
movq -0x70(%rbp), %rdi
leaq 0x1e67(%rip), %rsi      # 0x237c6
callq 0x5730
movq -0x8(%rbp), %rsi
movq -0x20(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x40(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x5590
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x56b0
jmp 0x2198c
leaq -0x40(%rbp), %rdi
callq 0x5a08
leaq 0xfc1c(%rip), %rdi      # 0x315b8
movq %rdi, -0x80(%rbp)
leaq 0x1e1f(%rip), %rsi      # 0x237c6
callq 0x5730
movq -0x8(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x60(%rbp), %rdi
movq %rdi, -0x78(%rbp)
movq $-0x1, %rcx
callq 0x5590
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x56b0
jmp 0x219d7
leaq -0x60(%rbp), %rdi
callq 0x5a08
leaq 0xfbb1(%rip), %rax      # 0x31598
addq $0x80, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq 0xfbd5(%rip), %rdi      # 0x315d8
callq 0x5370
jmp 0x21a36
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x5a08
jmp 0x21a36
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5a08
movq -0x10(%rbp), %rdi
callq 0x58e0
nop
// File: tomfunkhouser[P]gaps/apps/sflinit/sflinit.cpp
// Function: main
int main(int argc, char **argv)
{
  // Parse program arguments
  if (!ParseArgs(argc, argv)) exit(-1);

  // Open scene
  R3SurfelScene *scene = OpenScene(scene_name, database_name);
  if (!scene) exit(-1);

  // Create features 
  if (!CreateFeatures(scene)) exit(-1);

  // Close scene
  if (!CloseScene(scene)) exit(-1);

  // Return success 
  return 0;
}

// Assembly:
subq $0x18, %rsp
movl $0x0, 0x14(%rsp)
movl %edi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl 0x10(%rsp), %edi
movq 0x8(%rsp), %rsi
callq 0x166b0
cmpl $0x0, %eax
jne 0x16642
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x136b0
movq 0x1e5f7f(%rip), %rdi    # 0x1fc5c8
movq 0x1e5f80(%rip), %rsi    # 0x1fc5d0
callq 0x16810
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x1666a
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x136b0
movq (%rsp), %rdi
callq 0x16d60
cmpl $0x0, %eax
jne 0x16682
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x136b0
movq (%rsp), %rdi
callq 0x16a70
cmpl $0x0, %eax
jne 0x1669a
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x136b0
xorl %eax, %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/apps/sflinit/sflinit.cpp
// Function: ParseArgs(int, char**)
static int 
ParseArgs(int argc, char **argv)
{
  // Parse arguments
  argc--; argv++;
  while (argc > 0) {
    if ((*argv)[0] == '-') {
      if (!strcmp(*argv, "-v")) print_verbose = 1;
      else { RNFail("Invalid program argument: %s", *argv); exit(1); }
      argv++; argc--;
    }
    else {
      if (!scene_name) scene_name = *argv;
      else if (!database_name) database_name = *argv;
      else { RNFail("Invalid program argument: %s", *argv); exit(1); }
      argv++; argc--;
    }
  }

  // Check arguments
  if (!scene_name || !database_name) {
    RNFail("Usage: sflinit scenefile databasefile [options]\n");
    return 0;
  }

  // Return OK status 
  return 1;
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl 0x10(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rsp)
movq 0x8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0x167c7
movq 0x8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x16751
movq 0x8(%rsp), %rax
movq (%rax), %rdi
leaq 0x18d904(%rip), %rsi    # 0x1a4004
callq 0x137e0
cmpl $0x0, %eax
jne 0x16716
movl $0x1, 0x1e5ec4(%rip)    # 0x1fc5d8
jmp 0x16736
movq 0x8(%rsp), %rax
movq (%rax), %rsi
leaq 0x18d8e2(%rip), %rdi    # 0x1a4007
movb $0x0, %al
callq 0x1464b0
movl $0x1, %edi
callq 0x136b0
movq 0x8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x8(%rsp)
movl 0x10(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x167c2
cmpq $0x0, 0x1e5e6f(%rip)    # 0x1fc5c8
jne 0x1676c
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x1e5e5e(%rip)    # 0x1fc5c8
jmp 0x167a9
cmpq $0x0, 0x1e5e5c(%rip)    # 0x1fc5d0
jne 0x16787
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x1e5e4b(%rip)    # 0x1fc5d0
jmp 0x167a7
movq 0x8(%rsp), %rax
movq (%rax), %rsi
leaq 0x18d871(%rip), %rdi    # 0x1a4007
movb $0x0, %al
callq 0x1464b0
movl $0x1, %edi
callq 0x136b0
jmp 0x167a9
movq 0x8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x8(%rsp)
movl 0x10(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x166d6
cmpq $0x0, 0x1e5df9(%rip)    # 0x1fc5c8
je 0x167db
cmpq $0x0, 0x1e5df7(%rip)    # 0x1fc5d0
jne 0x167f3
leaq 0x18d842(%rip), %rdi    # 0x1a4024
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x14(%rsp)
jmp 0x167fb
movl $0x1, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/apps/sflinit/sflinit.cpp
// Function: CloseScene(gaps::R3SurfelScene*)
static int
CloseScene(R3SurfelScene *scene)
{
  // Start statistics
  RNTime start_time;
  start_time.Read();

  // Print statistics
  if (print_verbose) {
    printf("Closing scene ...\n");
    printf("  Time = %.2f seconds\n", start_time.Elapsed());
    printf("  # Objects = %d\n", scene->NObjects());
    printf("  # Labels = %d\n", scene->NLabels());
    printf("  # Assignments = %d\n", scene->NLabelAssignments());
    printf("  # Features = %d\n", scene->NFeatures());
    printf("  # Nodes = %d\n", scene->Tree()->NNodes());
    printf("  # Blocks = %d\n", scene->Tree()->Database()->NBlocks());
    printf("  # Surfels = %lld\n", scene->Tree()->Database()->NSurfels());
    fflush(stdout);
  }

  // Close surfel scene files
  if (!scene->CloseFile()) {
    delete scene;
    return 0;
  }

  // Return success
  return 1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x141530
leaq 0x8(%rsp), %rdi
callq 0x16c00
cmpl $0x0, 0x1e5b44(%rip)    # 0x1fc5d8
je 0x16bae
leaq 0x18d699(%rip), %rdi    # 0x1a413a
movb $0x0, %al
callq 0x13070
leaq 0x8(%rsp), %rdi
callq 0x1415f0
leaq 0x18d5c8(%rip), %rdi    # 0x1a4081
movb $0x1, %al
callq 0x13070
movq 0x18(%rsp), %rdi
callq 0x16c20
movl %eax, %esi
leaq 0x18d5c5(%rip), %rdi    # 0x1a4098
movb $0x0, %al
callq 0x13070
movq 0x18(%rsp), %rdi
callq 0x16c40
movl %eax, %esi
leaq 0x18d5bd(%rip), %rdi    # 0x1a40aa
movb $0x0, %al
callq 0x13070
movq 0x18(%rsp), %rdi
callq 0x16c60
movl %eax, %esi
leaq 0x18d5b4(%rip), %rdi    # 0x1a40bb
movb $0x0, %al
callq 0x13070
movq 0x18(%rsp), %rdi
callq 0x16c80
movl %eax, %esi
leaq 0x18d5b0(%rip), %rdi    # 0x1a40d1
movb $0x0, %al
callq 0x13070
movq 0x18(%rsp), %rdi
callq 0x16ce0
movq %rax, %rdi
callq 0x16cf0
movl %eax, %esi
leaq 0x18d5c2(%rip), %rdi    # 0x1a4105
movb $0x0, %al
callq 0x13070
movq 0x18(%rsp), %rdi
callq 0x16ce0
movq %rax, %rdi
callq 0x16d10
movq %rax, %rdi
callq 0x16d20
movl %eax, %esi
leaq 0x18d5a8(%rip), %rdi    # 0x1a4115
movb $0x0, %al
callq 0x13070
movq 0x18(%rsp), %rdi
callq 0x16ce0
movq %rax, %rdi
callq 0x16d10
movq %rax, %rdi
callq 0x16d40
movq %rax, %rsi
leaq 0x18d58e(%rip), %rdi    # 0x1a4126
movb $0x0, %al
callq 0x13070
movq 0x1dc3ea(%rip), %rax    # 0x1f2f90
movq (%rax), %rdi
callq 0x13680
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
xorl %ecx, %ecx
movl %ecx, %esi
callq *0xf8(%rax)
cmpl $0x0, %eax
jne 0x16be8
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x16bde
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movl $0x0, 0x24(%rsp)
jmp 0x16bf0
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x20(%rsp), %rdi
callq 0x16c20
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x170d7
movq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x185f0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x197e0
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x17091
movl $0x1, %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelFeatureEvaluation.cpp
// Function: gaps::R3SurfelOverheadGridFeature::~R3SurfelOverheadGridFeature()
R3SurfelOverheadGridFeature::
~R3SurfelOverheadGridFeature(void)
{
  // Delete filename
  if (filename) free(filename);

  // Close file
  if (fp) fclose(fp);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x1d5a7e(%rip), %rcx    # 0x1edc98
addq $0x10, %rcx
movq %rcx, (%rax)
cmpq $0x0, 0x48(%rax)
je 0x18236
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x136a0
movq 0x8(%rsp), %rax
cmpq $0x0, 0xa0(%rax)
je 0x1825a
movq 0x8(%rsp), %rax
movq 0xa0(%rax), %rdi
callq 0x13560
jmp 0x18258
jmp 0x1825a
movq 0x8(%rsp), %rdi
callq 0x6bd10
addq $0x18, %rsp
retq
movq %rax, %rdi
callq 0x187d0
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0x1bf20
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rax
movq $0x0, 0x8(%rax)
addq $0x60, %rdi
movq 0x18(%rsp), %rsi
callq 0x1bf30
movq 0x18(%rsp), %rdi
callq 0x5ecb0
movq 0x8(%rsp), %rax
movaps %xmm0, %xmm1
movsd 0x98(%rax), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x98(%rax)
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x192b1
movq 0x10(%rsp), %rdi
addq $0xa0, %rdi
xorl %esi, %esi
callq 0x1bda0
movq %rax, %rdi
xorl %esi, %esi
callq 0x1bde0
movsd (%rax), %xmm0
movsd 0x18af22(%rip), %xmm1   # 0x1a4190
ucomisd %xmm1, %xmm0
jne 0x19278
jp 0x19278
jmp 0x192b1
movq 0x10(%rsp), %rdi
addq $0xa0, %rdi
xorl %esi, %esi
callq 0x1bda0
movq %rax, %rdi
xorl %esi, %esi
callq 0x1bde0
movsd 0x18aef3(%rip), %xmm0   # 0x1a4190
movsd %xmm0, (%rax)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x1923d
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x1931b
movq 0x10(%rsp), %rdi
addq $0xd8, %rdi
xorl %esi, %esi
callq 0x1be00
movsd (%rax), %xmm0
movsd 0x18aeae(%rip), %xmm1   # 0x1a4190
ucomisd %xmm1, %xmm0
jne 0x192ec
jp 0x192ec
jmp 0x1931b
movq 0x10(%rsp), %rdi
addq $0xd8, %rdi
xorl %esi, %esi
callq 0x1be00
movsd 0x18ae89(%rip), %xmm0   # 0x1a4190
movsd %xmm0, (%rax)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x192bb
movq 0x8(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x19335
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x1bea0
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: 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:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x28(%rsp)
addq $0xa0, %rdi
xorl %esi, %esi
callq 0x1bda0
movq %rax, %rdi
xorl %esi, %esi
callq 0x1bde0
movsd (%rax), %xmm0
movsd 0x18ad49(%rip), %xmm1   # 0x1a4190
ucomisd %xmm1, %xmm0
jne 0x19451
jp 0x19451
jmp 0x19456
jmp 0x1954a
movq 0x28(%rsp), %rdi
addq $0xa0, %rdi
leaq 0x1e3e9f(%rip), %rsi    # 0x1fd308
callq 0x1bd40
movl $0x0, 0x4c(%rsp)
movq 0x28(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, 0x24(%rsp)
callq 0x18660
movl %eax, %ecx
movl 0x24(%rsp), %eax
cmpl %ecx, %eax
jge 0x194dc
movq 0x28(%rsp), %rdi
movl 0x4c(%rsp), %esi
callq 0x18680
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x40(%rsp)
addq $0xa0, %rax
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rdi
callq 0x5ee30
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0xcbc30
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x19476
movl $0x0, 0x3c(%rsp)
movq 0x28(%rsp), %rdi
movl 0x3c(%rsp), %eax
movl %eax, 0x14(%rsp)
callq 0x1bb10
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x1954a
movq 0x28(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0x1bb30
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x30(%rsp)
addq $0xa0, %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
callq 0x193b0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0xcbc30
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x194e4
addq $0x58, %rsp
retq
nop
// File: 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:
subq $0x58, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x5e5f34(%rip), %rsi    # 0x5ff4b0
callq 0x144dc0
movl $0x0, 0x44(%rsp)
movq 0x20(%rsp), %rdi
movl 0x44(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x18660
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x195eb
movq 0x20(%rsp), %rdi
movl 0x44(%rsp), %esi
callq 0x18680
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0x5ee90
movq %rax, %rsi
leaq 0x28(%rsp), %rdi
callq 0x144dc0
movq 0x10(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x1bbc0
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x19589
movq 0x18(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x28(%rsp)
addq $0xd8, %rdi
xorl %esi, %esi
callq 0x1be00
movsd (%rax), %xmm0
movsd 0x18ab13(%rip), %xmm1   # 0x1a4190
ucomisd %xmm1, %xmm0
jne 0x19687
jp 0x19687
jmp 0x1968c
jmp 0x19789
movq 0x28(%rsp), %rdi
addq $0xd8, %rdi
movsd 0x18aaf0(%rip), %xmm0   # 0x1a4190
movsd 0x18aae0(%rip), %xmm1   # 0x1a4188
callq 0x1c150
movl $0x0, 0x4c(%rsp)
movq 0x28(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, 0x24(%rsp)
callq 0x18660
movl %eax, %ecx
movl 0x24(%rsp), %eax
cmpl %ecx, %eax
jge 0x1971b
movq 0x28(%rsp), %rdi
movl 0x4c(%rsp), %esi
callq 0x18680
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x40(%rsp)
addq $0xd8, %rax
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rdi
callq 0x5eee0
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x1bbc0
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x196b5
movl $0x0, 0x3c(%rsp)
movq 0x28(%rsp), %rdi
movl 0x3c(%rsp), %eax
movl %eax, 0x14(%rsp)
callq 0x1bb10
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x19789
movq 0x28(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0x1bb30
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x30(%rsp)
addq $0xd8, %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
callq 0x19600
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x1bbc0
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x19723
addq $0x58, %rsp
retq
nop
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
addq $0x70, %rdi
callq 0x1bc40
cmpl $0x0, %eax
jne 0x197d0
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x16c80
cmpl $0x0, %eax
jle 0x197ce
movq 0x8(%rsp), %rdi
callq 0x197e0
jmp 0x197d0
movq 0x8(%rsp), %rax
addq $0x70, %rax
addq $0x18, %rsp
retq
nop
// File: 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:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x8(%rax)
jne 0x197ff
jmp 0x19917
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x16c80
cmpl $0x0, %eax
jne 0x19817
jmp 0x19917
movq 0x20(%rsp), %rdi
addq $0x70, %rdi
callq 0x1bc40
movl %eax, %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0x1c(%rsp)
movq 0x8(%rax), %rdi
callq 0x16c80
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jne 0x19848
jmp 0x19917
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x16c80
movl %eax, %esi
leaq 0x48(%rsp), %rdi
callq 0x6c0d0
movl $0x0, 0x44(%rsp)
movq 0x20(%rsp), %rax
movl 0x44(%rsp), %ecx
movl %ecx, 0x14(%rsp)
movq 0x8(%rax), %rdi
callq 0x16c80
movl %eax, 0x18(%rsp)
jmp 0x19886
movl 0x14(%rsp), %eax
movl 0x18(%rsp), %ecx
cmpl %ecx, %eax
jge 0x198f8
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
movl 0x44(%rsp), %esi
callq 0x1c120
movq %rax, 0x8(%rsp)
jmp 0x198ab
movq 0x20(%rsp), %rsi
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movq (%rdi), %rax
movq 0x48(%rax), %rax
leaq 0x48(%rsp), %rdx
callq *%rax
jmp 0x198cf
jmp 0x198d1
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x1986a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x6c250
jmp 0x1991c
movq 0x20(%rsp), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rax
leaq 0x48(%rsp), %rsi
callq *%rax
jmp 0x1990d
leaq 0x48(%rsp), %rdi
callq 0x6c250
addq $0x68, %rsp
retq
movq 0x38(%rsp), %rdi
callq 0x13970
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::PartHierarchyLevel() const
int R3SurfelObject::
PartHierarchyLevel(void) const
{
  // Return level in part hierarchy (root is 0)
  int level = 0;
  R3SurfelObject *ancestor = parent;
  while (ancestor) { level++; ancestor = ancestor->parent; }
  return level;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movl $0x0, -0xc(%rsp)
movq 0x18(%rax), %rax
movq %rax, -0x18(%rsp)
cmpq $0x0, -0x18(%rsp)
je 0x1996e
movl -0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rsp)
movq -0x18(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rsp)
jmp 0x1994b
movl -0xc(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movq $0x0, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movq 0x10(%rsp), %rdi
movl 0x2c(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x18660
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x19a2c
movq 0x10(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0x18680
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x5f430
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x19a1a
movq 0x18(%rsp), %rax
cmpq 0x30(%rsp), %rax
je 0x19a1a
cmpq $0x0, 0x30(%rsp)
je 0x19a0e
movq $0x0, 0x40(%rsp)
jmp 0x19a36
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x19a1a
jmp 0x19a1c
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x199a4
movq 0x30(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x20(%rsp)
movq 0x10(%rsp), %rdi
movl 0x20(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x1ba20
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x19ab9
movq 0x10(%rsp), %rdi
movl 0x20(%rsp), %esi
callq 0x1ba40
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x1bc50
cmpl 0x24(%rsp), %eax
jne 0x19aaa
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x19ac2
jmp 0x19aac
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x19a5f
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::PointSet(int, double) const
R3SurfelPointSet *R3SurfelObject::
PointSet(RNBoolean leaf_level, RNScalar max_resolution) const
{
  // Allocate point set
  R3SurfelPointSet *pointset = new R3SurfelPointSet();
  if (!pointset) {
    RNFail("Unable to allocate point set\n");
    return NULL;
  }

  // Insert points into pointset
  InsertIntoPointSet(pointset, leaf_level, max_resolution);

  // Return pointset
  return pointset;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movsd %xmm0, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movl $0x60, %edi
callq 0x13570
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
callq 0x55df0
jmp 0x19b08
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x19b52
leaq 0x18a827(%rip), %rdi    # 0x1a4348
movb $0x0, %al
callq 0x1464b0
movq $0x0, 0x40(%rsp)
jmp 0x19b74
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
movl $0x60, %esi
callq 0x13580
jmp 0x19b7e
movq (%rsp), %rdi
movq 0x20(%rsp), %rsi
movl 0x34(%rsp), %edx
movsd 0x28(%rsp), %xmm0
callq 0x19b90
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x13970
nopl (%rax,%rax)