LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x38, %rsp
movq %rdx, %r12
movq %rdi, -0x38(%rbp)
leaq 0x20(%rdx), %rax
movq %rax, -0x30(%rbp)
xorl %r13d, %r13d
movl $0x98, %ecx
leaq -0x58(%rbp), %rbx
pushq $-0x1
popq %r15
movq %rsi, -0x40(%rbp)
movq (%rsi), %rdi
movq 0x8(%rsi), %rax
subq %rdi, %rax
cqto
idivq %rcx
cmpq %rax, %r13
jae 0x10089
imulq $0x98, %r13, %r14
addq %r14, %rdi
callq 0x599e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5ea0
movq %r15, %rbx
xorl %r15d, %r15d
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rax
subq %rdi, %rax
sarq $0x5, %rax
incq %rbx
cmpq %rax, %rbx
jae 0x1002b
addq %r15, %rdi
movq 0x8(%r12), %rdx
incq %rdx
xorl %esi, %esi
movq %r12, %rcx
callq 0x4530
addq $0x20, %r15
testl %eax, %eax
jne 0xfff5
jmp 0x1004c
leaq -0x58(%rbp), %rbx
movq %rbx, %rdi
callq 0x5ef4
incq %r13
movq -0x40(%rbp), %rsi
movl $0x98, %ecx
pushq $-0x1
popq %r15
jmp 0xffbd
movq -0x40(%rbp), %rax
addq (%rax), %r14
movq %r14, %rdi
callq 0x59b2
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
movq -0x30(%rbp), %rdx
callq 0xfedb
leaq -0x58(%rbp), %rdi
callq 0x5ef4
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x59b2
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
movq -0x30(%rbp), %rdx
callq 0xfedb
jmp 0x10077
jmp 0x100a5
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x5ef4
movq %rbx, %rdi
callq 0x46d0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rbx
cmpq 0x8(%r15), %rbx
je 0x1010a
movq %rbx, %rdi
callq 0x599e
movq (%rax), %r12
movq %rbx, %rdi
callq 0x599e
cmpq 0x8(%rax), %r12
je 0x10101
movq %r12, %rdi
movq %r14, %rsi
callq 0x1052a
addq $0x20, %r12
testb %al, %al
je 0x100de
jmp 0x1010c
addq $0x98, %rbx
jmp 0x100cd
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x168d(%rip), %rsi      # 0x117b9
pushq $-0x1
popq %rbx
movq %rbx, %rdx
callq 0x4400
cmpq $-0x1, %rax
je 0x10159
movq %rax, %r15
leaq 0x1668(%rip), %rsi      # 0x117af
movq %r14, %rdi
movq %rbx, %rdx
callq 0x4400
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_O2/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 0x10118
cmpq $-0x1, %rax
je 0x10212
movq %rax, %r14
leaq 0x199b(%rip), %rcx      # 0x11b30
pushq $-0x1
popq %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x4550
testl %eax, %eax
je 0x10216
testq %rbx, %rbx
je 0x10212
movq %rbx, %rdi
callq 0x83e8
movq %rax, %r12
addq (%r15), %r14
leaq -0x48(%rbp), %rdi
leaq -0x21(%rbp), %rdx
movq %r14, %rsi
callq 0x4ec8
leaq -0x48(%rbp), %rsi
movq %r12, %rdi
callq 0xf010
movq %rax, %r14
movq %rbx, %rdi
callq 0x83e8
movq %rax, %rbx
addq $0x8, %rbx
leaq -0x48(%rbp), %rdi
callq 0x47d8
cmpq %rbx, %r14
je 0x10212
pushq $0x20
popq %rdi
callq 0x4430
movq %rax, %rbx
addq $0x40, %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x4580
jmp 0x10234
xorl %ebx, %ebx
jmp 0x10234
pushq $0x20
popq %rdi
callq 0x4430
movq %rax, %rbx
leaq 0x1908(%rip), %rsi      # 0x11b30
leaq -0x48(%rbp), %rdx
movq %rax, %rdi
callq 0x4ec8
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10246
movq %rax, %r14
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0x4440
jmp 0x10269
jmp 0x10258
movq %rax, %r14
leaq -0x48(%rbp), %rdi
callq 0x47d8
jmp 0x10269
movq %rax, %r14
movq %r14, %rdi
callq 0x46d0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x43e0
leaq -0x48(%rbp), %rdi
movq %rax, (%rdi)
callq 0x41d0
leaq -0x40(%rbp), %r15
leaq -0x19(%rbp), %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x4ec8
movq 0x8(%r15), %rsi
decq %rsi
movq %r15, %rdi
callq 0x4590
movq 0x8d10(%rip), %rdi      # 0x18fd0
leaq 0x198a(%rip), %rsi      # 0x11c51
callq 0x4420
leaq -0x40(%rbp), %rsi
movq %rax, %rdi
callq 0x43b0
leaq 0x1974(%rip), %rsi      # 0x11c53
movq %rax, %rdi
callq 0x4420
movq %rax, %rdi
movq %r14, %rsi
callq 0x43b0
cmpq $0x0, 0x8(%rbx)
je 0x10326
movq 0x8cd0(%rip), %rdi      # 0x18fd0
leaq 0x1001(%rip), %rsi      # 0x11308
callq 0x4420
movq %rax, %rdi
movq %rbx, %rsi
callq 0x43b0
leaq 0x106b(%rip), %rsi      # 0x11389
movq %rax, %rdi
callq 0x4420
leaq -0x40(%rbp), %rdi
callq 0x47d8
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x47d8
movq %rbx, %rdi
callq 0x46d0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movb 0x915a(%rip), %al       # 0x194c0
testb %al, %al
je 0x10434
leaq 0x143a(%rip), %rsi      # 0x117af
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x4400
andq $0x0, 0x9100(%rip)      # 0x19488
movq 0x90f1(%rip), %rcx      # 0x19480
xorl %edx, %edx
movb %dl, (%rcx)
andq $0x0, 0x910d(%rip)      # 0x194a8
movq %rax, %r14
leaq 0x90db(%rip), %r15      # 0x19480
movq 0x90f4(%rip), %rax      # 0x194a0
movb %dl, (%rax)
leaq 0x1404(%rip), %rsi      # 0x117b9
movq %r15, %rdi
callq 0x4780
leaq -0x40(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x4460
movq %r15, %rdi
movq %r12, %rsi
callq 0x47a0
leaq -0x40(%rbp), %rdi
callq 0x47d8
leaq 0x90b4(%rip), %r15      # 0x194a0
leaq 0x13c6(%rip), %rsi      # 0x117b9
movq %r15, %rdi
callq 0x4780
pushq $-0x1
popq %rcx
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4460
movq %r15, %rdi
movq %r12, %rsi
callq 0x47a0
leaq -0x40(%rbp), %rdi
callq 0x47d8
leaq 0x9059(%rip), %rax      # 0x19480
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9085(%rip), %rdi      # 0x194c0
callq 0x4730
testl %eax, %eax
je 0x1036e
leaq 0x9041(%rip), %rax      # 0x19490
movq %rax, 0x902a(%rip)      # 0x19480
leaq 0x9023(%rip), %rsi      # 0x19480
andq $0x0, 0x9023(%rip)      # 0x19488
xorl %eax, %eax
movb %al, 0x9023(%rip)       # 0x19490
leaq 0x903c(%rip), %rcx      # 0x194b0
movq %rcx, 0x9025(%rip)      # 0x194a0
andq $0x0, 0x9025(%rip)      # 0x194a8
movb %al, 0x9027(%rip)       # 0x194b0
leaq -0x77b2(%rip), %rdi     # 0x8cde
leaq 0x8f59(%rip), %rdx      # 0x193f0
callq 0x43a0
leaq 0x901d(%rip), %rdi      # 0x194c0
callq 0x42d0
jmp 0x1036e
jmp 0x104af
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x47d8
movq %rbx, %rdi
callq 0x46d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0xac(%rdi)
jg 0x159e8
movq %rdi, %rbx
pushq $0x48
popq %rdi
callq 0x134f0
movq %rax, %r14
leaq 0xb28e6(%rip), %rsi     # 0xc8178
movsd 0xb2896(%rip), %xmm1    # 0xc8130
movsd 0xb2896(%rip), %xmm2    # 0xc8138
xorps %xmm0, %xmm0
movq %rax, %rdi
callq 0x15a44
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0xb0(%rax)
pushq $0x48
popq %rdi
callq 0x134f0
movq %rax, %r14
leaq 0xb28b7(%rip), %rsi     # 0xc8185
movsd 0xb286a(%rip), %xmm1    # 0xc8140
movsd 0xb286a(%rip), %xmm2    # 0xc8148
xorps %xmm0, %xmm0
movq %rax, %rdi
callq 0x15a44
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0xb0(%rax)
pushq $0x48
popq %rdi
callq 0x134f0
movq %rax, %r14
leaq 0xb2889(%rip), %rsi     # 0xc8193
movsd 0xb282e(%rip), %xmm1    # 0xc8140
movsd 0xb282e(%rip), %xmm2    # 0xc8148
xorps %xmm0, %xmm0
movq %rax, %rdi
callq 0x15a44
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0xb0(%rax)
pushq $0x48
popq %rdi
callq 0x134f0
movq %rax, %r14
leaq 0xb285d(%rip), %rsi     # 0xc81a3
movsd 0xb2802(%rip), %xmm1    # 0xc8150
movsd 0xb27e2(%rip), %xmm2    # 0xc8138
xorps %xmm0, %xmm0
movq %rax, %rdi
callq 0x15a44
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0xb0(%rax)
pushq $0x48
popq %rdi
callq 0x134f0
movq %rax, %r14
leaq 0xb282f(%rip), %rsi     # 0xc81b1
movsd 0xb27ce(%rip), %xmm1    # 0xc8158
movsd 0xb27b6(%rip), %xmm2    # 0xc8148
xorps %xmm0, %xmm0
movq %rax, %rdi
callq 0x15a44
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0xb0(%rax)
pushq $0x48
popq %rdi
callq 0x134f0
movq %rax, %r14
leaq 0xb2805(%rip), %rsi     # 0xc81c3
movsd 0xb2792(%rip), %xmm1    # 0xc8158
movsd 0xb277a(%rip), %xmm2    # 0xc8148
xorps %xmm0, %xmm0
movq %rax, %rdi
callq 0x15a44
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0xb0(%rax)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
jmp 0x159fd
jmp 0x159fd
jmp 0x159fd
jmp 0x159fd
jmp 0x159fd
movq %rax, %rbx
pushq $0x48
popq %rsi
movq %r14, %rdi
callq 0x13500
movq %rbx, %rdi
callq 0x138f0
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movslq 0x1c(%rbx), %rax
cmpq %rax, %r14
jge 0x15a38
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x16a74
incq %r14
jmp 0x15a1d
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x394d0
leaq 0x108c7d(%rip), %rax    # 0x11eca8
movq %rax, (%rbx)
andq $0x0, 0x48(%rbx)
leaq 0x50(%rbx), %r12
leaq 0xbb11a(%rip), %rsi     # 0xd1158
movq %r12, %rdi
callq 0x91cd8
xorps %xmm0, %xmm0
movups %xmm0, 0x98(%rbx)
leaq 0xb217e(%rip), %rsi     # 0xc81d5
movq %r14, %rdi
callq 0x135f0
movq %rax, 0xa0(%rbx)
testq %rax, %rax
je 0x160cc
leaq 0x98(%rbx), %r15
pushq $0x4
popq %rsi
pushq $0x2
popq %rdx
movq %r15, %rdi
movq %rax, %rcx
callq 0x137d0
cmpq $0x2, %rax
jne 0x160df
movq 0xa0(%rbx), %rcx
movq %rsp, %rdi
pushq $0x8
popq %rsi
pushq $0x9
popq %rdx
callq 0x137d0
cmpq $0x9, %rax
jne 0x160f2
leaq 0x50(%rsp), %rdi
movq %rsp, %rsi
callq 0x91d68
leaq 0x50(%rsp), %rsi
movq %r12, %rdi
callq 0x925c0
movq %r14, %rdi
callq 0x9cc91
movq %rax, 0x48(%rbx)
jmp 0x16116
leaq 0xb2105(%rip), %rdi     # 0xc81d8
movq %r14, %rsi
xorl %eax, %eax
callq 0x9ce26
jmp 0x16116
leaq 0xb2118(%rip), %rdi     # 0xc81fe
movq %r14, %rsi
xorl %eax, %eax
callq 0x9ce26
jmp 0x16103
leaq 0xb2121(%rip), %rdi     # 0xc821a
movq %r14, %rsi
xorl %eax, %eax
callq 0x9ce26
movq 0xa0(%rbx), %rdi
callq 0x134e0
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x16129
jmp 0x16129
movq %rax, %r14
movq %rbx, %rdi
callq 0x39596
movq %r14, %rdi
callq 0x138f0
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x1086f5(%rip), %rax    # 0x11ed40
movq %rax, (%rdi)
leaq 0x30(%rdi), %rbx
movslq 0x3c(%r14), %rax
testq %rax, %rax
jle 0x16670
movq (%rbx), %rcx
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x16652
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x16652
leaq 0x40(%r14), %r15
movslq 0x4c(%r14), %rax
testq %rax, %rax
jle 0x16692
movq (%r15), %rcx
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x16674
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x16674
leaq 0x50(%r14), %r12
movslq 0x5c(%r14), %rax
testq %rax, %rax
jle 0x166b5
movq (%r12), %rcx
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x16696
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x16696
leaq 0x60(%r14), %r13
movslq 0x6c(%r14), %rax
testq %rax, %rax
jle 0x166d5
movq 0x60(%r14), %rcx
movq -0x8(%rcx,%rax,8), %rsi
movq %r14, %rdi
callq 0x1677a
jmp 0x166b9
leaq 0x20(%r14), %rbp
movslq 0x2c(%r14), %rax
testq %rax, %rax
jle 0x166f8
movq (%rbp), %rcx
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x166d9
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x166d9
movq (%r14), %rax
movq %r14, %rdi
xorl %esi, %esi
callq *0x38(%rax)
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x16715
movq (%rdi), %rax
movq %r14, %rsi
callq *0x20(%rax)
movq 0x88(%r14), %rdi
callq 0x13600
leaq 0xa0(%r14), %rdi
callq 0x649ae
addq $0x70, %r14
movq %r14, %rdi
callq 0x397a0
movq %r13, %rdi
callq 0x9a81c
movq %r12, %rdi
callq 0x9a81c
movq %r15, %rdi
callq 0x9a81c
movq %rbx, %rdi
callq 0x9a81c
movq %rbp, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9a81c
jmp 0x16771
movq %rax, %rdi
callq 0x177bf
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
andq $0x0, 0x8(%rsi)
addq $0x60, %rdi
callq 0x1782a
movq %r14, %rdi
callq 0x3365c
movsd 0x98(%rbx), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x98(%rbx)
movsd 0xb19b2(%rip), %xmm0    # 0xc8168
movabsq $0x47efffffe0000000, %rax # imm = 0x47EFFFFFE0000000
movq %rbx, %rcx
testq %rcx, %rcx
je 0x167e5
movsd 0xa8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x167d8
jnp 0x167e5
movq %rax, 0xa8(%rcx)
movq 0x18(%rcx), %rcx
jmp 0x167c3
movq %rbx, %rcx
testq %rcx, %rcx
je 0x1680e
movsd 0xd8(%rcx), %xmm0
ucomisd 0xb196b(%rip), %xmm0    # 0xc8168
jne 0x16801
jnp 0x1680e
movq %rax, 0xd8(%rcx)
movq 0x18(%rcx), %rcx
jmp 0x167e8
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x1681e
orb $0x1, 0x1e8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::Identifier() const
int R3SurfelObject::
Identifier(void) const
{
  // Update ID 
  if (identifier < 0) {
    ((R3SurfelObject *) this)->identifier = R3surfel_next_object_identifier++;
  }

  // Return identifier 
  return identifier;
}

// Assembly:
movl 0x90(%rdi), %eax
testl %eax, %eax
js 0x16849
retq
movl 0x10e46d(%rip), %eax    # 0x124cbc
leal 0x1(%rax), %ecx
movl %ecx, 0x10e464(%rip)    # 0x124cbc
movl %eax, 0x90(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0xb18f4(%rip), %xmm0    # 0xc8168
jne 0x16880
jp 0x16880
movq %rbx, %rdi
callq 0x1688c
addq $0xa0, %rbx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movsd 0xa8(%rdi), %xmm0
ucomisd 0xb18c7(%rip), %xmm0    # 0xc8168
jne 0x168a5
jnp 0x168ab
popq %rbx
popq %r14
popq %r15
retq
movq %rdi, %rbx
leaq 0xa0(%rdi), %r14
leaq 0x10f12c(%rip), %rsi    # 0x1259e8
movq %r14, %rdi
callq 0x177ee
xorl %r15d, %r15d
movslq 0x6c(%rbx), %rax
cmpq %rax, %r15
jge 0x168ed
movq 0x60(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x33720
movq %r14, %rdi
movq %rax, %rsi
callq 0x646fe
incq %r15
jmp 0x168c7
xorl %r15d, %r15d
movslq 0x2c(%rbx), %rax
cmpq %rax, %r15
jge 0x168a5
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x16860
movq %r14, %rdi
movq %rax, %rsi
callq 0x646fe
incq %r15
jmp 0x168f0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x510ec2(%rip), %rsi    # 0x5277f0
callq 0x9c1ea
xorl %r12d, %r12d
leaq 0x8(%rsp), %r15
movslq 0x6c(%r14), %rax
cmpq %rax, %r12
jge 0x16987
movq 0x60(%r14), %rax
movq (%rax,%r12,8), %rdi
callq 0x33748
movq %r15, %rdi
movq %rax, %rsi
callq 0x9c1ea
movsd 0x8(%rsp), %xmm0
movsd (%rbx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x16970
movsd %xmm0, (%rbx)
movsd 0x10(%rsp), %xmm0
ucomisd 0x8(%rbx), %xmm0
jbe 0x16982
movsd %xmm0, 0x8(%rbx)
incq %r12
jmp 0x1693b
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xb17ba(%rip), %xmm0    # 0xc8168
jne 0x169b7
jp 0x169b7
callq 0x169bc
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xb1797(%rip), %xmm0    # 0xc8168
jne 0x169d5
jnp 0x169db
popq %rbx
popq %r14
popq %r15
retq
movq %rdi, %rbx
leaq 0xd8(%rdi), %r14
movapd 0xb1943(%rip), %xmm0    # 0xc8330
movupd %xmm0, 0xd8(%rdi)
xorl %r15d, %r15d
movslq 0x6c(%rbx), %rax
cmpq %rax, %r15
jge 0x16a1e
movq 0x60(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x33770
movq %r14, %rdi
movq %rax, %rsi
callq 0x177ca
incq %r15
jmp 0x169f8
xorl %r15d, %r15d
movslq 0x2c(%rbx), %rax
cmpq %rax, %r15
jge 0x169d5
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x16996
movq %r14, %rdi
movq %rax, %rsi
callq 0x177ca
incq %r15
jmp 0x16a21
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x16a6a
movq 0x8(%rbx), %rax
cmpl $0x0, 0xac(%rax)
jle 0x16a6a
movq %rbx, %rdi
callq 0x16a74
addq $0x70, %rbx
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x16aef
movl 0xac(%rax), %esi
testl %esi, %esi
je 0x16aef
movq %rdi, %rbx
cmpl %esi, 0x80(%rdi)
je 0x16aef
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x396f4
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movslq 0xac(%rax), %rcx
cmpq %rcx, %r15
jge 0x16ad7
movq 0xa0(%rax), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
movq %r14, %rdx
callq *0x48(%rax)
incq %r15
jmp 0x16aab
movq (%rbx), %rax
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq *0x20(%rax)
leaq 0x8(%rsp), %rdi
callq 0x397a0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x16afb
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x397a0
movq %rbx, %rdi
callq 0x138f0
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %r15d, %r15d
pushq $0x1
popq %rbp
xorl %ebx, %ebx
movslq 0x6c(%r14), %rax
cmpq %rax, %r15
jge 0x16b69
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
callq 0x3398a
testq %rax, %rax
sete %cl
cmpq %rbx, %rax
sete %dl
orb %cl, %dl
jne 0x16b62
testq %rbx, %rbx
movq %rax, %rbx
jne 0x16b67
incq %r15
jmp 0x16b32
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
movl 0x3c(%rdi), %ecx
movq 0x30(%rdi), %rdx
xorl %edi, %edi
testl %ecx, %ecx
cmovlel %edi, %ecx
cmpq %rdi, %rcx
je 0x16b98
movq (%rdx,%rdi,8), %rax
incq %rdi
cmpl %esi, 0x2c(%rax)
jne 0x16b86
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x16c43
movl 0x2c(%r15), %eax
testl %eax, %eax
jle 0x16c43
xorl %r12d, %r12d
cltq
cmpq %rax, %r12
jge 0x16c6b
movq 0x20(%r15), %rax
movq (%rax,%r12,8), %rdi
movq %r14, %rsi
movl %ebx, %edx
movsd (%rsp), %xmm0
callq 0x16bf8
incq %r12
movl 0x2c(%r15), %eax
jmp 0x16c1c
xorl %r12d, %r12d
movslq 0x6c(%r15), %rax
cmpq %rax, %r12
jge 0x16c6b
movq 0x60(%r15), %rax
movq (%rax,%r12,8), %rdi
movq %r14, %rsi
movl %ebx, %edx
movsd (%rsp), %xmm0
callq 0x33a06
incq %r12
jmp 0x16c46
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
pushq $0x1
popq %rbp
movslq 0x6c(%r14), %rax
cmpq %rax, %r15
jge 0x16cac
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebx, %esi
callq 0x33798
incq %r15
testl %eax, %eax
je 0x16c8b
jmp 0x16cd5
xorl %r15d, %r15d
testl %ebx, %ebx
je 0x16cd8
xorl %r12d, %r12d
movslq 0x2c(%r14), %rax
cmpq %rax, %r12
jge 0x16cd8
movq 0x20(%r14), %rax
movq (%rax,%r12,8), %rdi
movl %ebx, %esi
callq 0x16c78
incq %r12
testl %eax, %eax
je 0x16cb6
movl %ebp, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
movl 0x5c(%rdi), %ecx
movq 0x50(%rdi), %rdx
xorl %edi, %edi
testl %ecx, %ecx
cmovlel %edi, %ecx
movsd 0xb146e(%rip), %xmm0    # 0xc8170
xorl %eax, %eax
cmpq %rdi, %rcx
je 0x16d2e
movq (%rdx,%rdi,8), %r8
cmpl %esi, 0x40(%r8)
jne 0x16d29
movsd 0x38(%r8), %xmm1
ucomisd %xmm0, %xmm1
maxsd %xmm0, %xmm1
cmovaq %r8, %rax
movapd %xmm1, %xmm0
incq %rdi
jmp 0x16d04
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::BestOrientedBBox(int) const
R3OrientedBox R3SurfelObject::
BestOrientedBBox(int originator) const
{
  // Return best OBB (or an empty box if there is none)
  RNScalar best_confidence = -FLT_MAX;
  R3OrientedBox best_obb = R3null_oriented_box;
  for (int i = 0; i < properties.NEntries(); i++) {
    R3SurfelObjectProperty *property = properties.Kth(i);
    if (property->Type() != R3_SURFEL_OBJECT_AMODAL_OBB_PROPERTY) continue;
    if (property->NOperands() != 20) continue;
    int orig = (int) (property->Operand(16) + 0.5);
    if (orig != originator) continue;
    RNScalar confidence = property->Operand(15);
    if (confidence > best_confidence) {
      R3Point centroid(property->Operand(0), property->Operand(1), property->Operand(2));
      R3Vector axis1(property->Operand(3), property->Operand(4), property->Operand(5));
      R3Vector axis2(property->Operand(6), property->Operand(7), property->Operand(8));
      // R3Vector axis3(property->Operand(9), property->Operand(10), property->Operand(11));
      RNScalar radius1 = property->Operand(12);
      RNScalar radius2 = property->Operand(13);
      RNScalar radius3 = property->Operand(14);
      best_obb.Reset(centroid, axis1, axis2, radius1, radius2, radius3);
      best_confidence = confidence;
    }
  }

  // Return best obb
  return best_obb;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10e9c7(%rip), %rsi    # 0x1257b0
callq 0x629ec
movsd 0xb137a(%rip), %xmm0    # 0xc8170
xorl %r15d, %r15d
movsd 0xb1337(%rip), %xmm2    # 0xc8138
leaq 0x40(%rsp), %r13
movslq 0x3c(%r14), %rax
cmpq %rax, %r15
jge 0x16ef6
movq 0x30(%r14), %rax
movq (%rax,%r15,8), %r12
cmpl $0x2, 0x2c(%r12)
jne 0x16eee
cmpl $0x14, 0x28(%r12)
jne 0x16eee
movq 0x20(%r12), %rax
movsd 0x80(%rax), %xmm1
addsd %xmm2, %xmm1
cvttsd2si %xmm1, %ecx
cmpl %ebp, %ecx
jne 0x16eee
movsd 0x78(%rax), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x16eee
movsd %xmm1, 0x8(%rsp)
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movsd 0x10(%rax), %xmm2
leaq 0x28(%rsp), %rdi
callq 0x781bc
movq 0x20(%r12), %rax
movsd 0x18(%rax), %xmm0
movsd 0x20(%rax), %xmm1
movsd 0x28(%rax), %xmm2
leaq 0x10(%rsp), %rdi
callq 0x7897c
movq 0x20(%r12), %rax
movsd 0x30(%rax), %xmm0
movsd 0x38(%rax), %xmm1
movsd 0x40(%rax), %xmm2
movq %r13, %rdi
callq 0x7897c
movq 0x20(%r12), %rax
movsd 0x60(%rax), %xmm0
movsd 0x68(%rax), %xmm1
movsd 0x70(%rax), %xmm2
movq %rbx, %rdi
leaq 0x28(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %r13, %rcx
callq 0x63a9c
movsd 0x8(%rsp), %xmm0
movsd 0xb124a(%rip), %xmm2    # 0xc8138
incq %r15
jmp 0x16e06
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x16f0e
jmp 0x16f0e
jmp 0x16f0e
movq %rax, %r14
movq %rbx, %rdi
callq 0x649ae
movq %r14, %rdi
callq 0x138f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::CurrentOrientedBBox() const
R3OrientedBox R3SurfelObject::
CurrentOrientedBBox(void) const
{
  // Return best obb (either human or predicted)
  R3OrientedBox human_obb = HumanOrientedBBox();
  if (!human_obb.IsEmpty()) return human_obb;
  R3OrientedBox predicted_obb = PredictedOrientedBBox();
  if (!predicted_obb.IsEmpty()) return predicted_obb;
  return EstimateOrientedBBox((R3SurfelObject *) this);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x80(%rsp), %r15
movq %r15, %rdi
callq 0x16f34
movsd 0x70(%r15), %xmm0
movsd 0x78(%r15), %xmm1
minsd 0x68(%r15), %xmm0
minsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x16faa
leaq 0x80(%rsp), %rsi
movq %rbx, %rdi
callq 0x629ec
jmp 0x16ff5
movq %rsp, %rdi
movq %r14, %rsi
callq 0x16f44
movsd 0x70(%rsp), %xmm0
movsd 0x78(%rsp), %xmm1
minsd 0x68(%rsp), %xmm0
minsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x16fe2
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x629ec
jmp 0x16fed
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2617c
movq %rsp, %rdi
callq 0x649ae
leaq 0x80(%rsp), %rdi
callq 0x649ae
movq %rbx, %rax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x649ae
jmp 0x17024
jmp 0x17021
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x649ae
movq %rbx, %rdi
callq 0x138f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::operator=(gaps::R3SurfelObject const&)
R3SurfelObject& R3SurfelObject::
operator=(const R3SurfelObject& object)
{
  // Copy properties
  this->feature_vector = object.feature_vector;
  this->name = (object.name) ? RNStrdup(object.name) : NULL;
  this->identifier = object.identifier;
  this->complexity = object.complexity;
  this->bbox = object.bbox;
  this->timestamp_range = object.timestamp_range;
  this->flags = 0;

  // Return this
  return *this;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0x70, %rsi
addq $0x70, %rdi
callq 0x397ce
movq 0x88(%r14), %rdi
testq %rdi, %rdi
je 0x17064
callq 0x9cc91
jmp 0x17066
xorl %eax, %eax
movq %rax, 0x88(%rbx)
movl 0x90(%r14), %eax
movl %eax, 0x90(%rbx)
movsd 0x98(%r14), %xmm0
movsd %xmm0, 0x98(%rbx)
movl $0xa0, %edi
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0x177ee
movups 0xd8(%r14), %xmm0
movups %xmm0, 0xd8(%rbx)
andq $0x0, 0xe8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::SetParent(gaps::R3SurfelObject*)
void R3SurfelObject::
SetParent(R3SurfelObject *parent)
{
  // Just checking
  // assert(parent);
  // assert(this->parent);
  assert(!this->parent || (scene == this->parent->scene));
  assert(!parent || !this->parent || (parent->scene == this->parent->scene));
  if (parent == this->parent) return;

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

  // Invalidate timestamps starting at current parent
  ancestor = this->parent;
  while (ancestor) {
    if (ancestor->timestamp_range[0] == FLT_MAX) break;
    ancestor->timestamp_range[0] = FLT_MAX;
    ancestor = ancestor->parent;
  }

  // Invalidate bounding boxes starting at new parent
  ancestor = parent;
  while (ancestor) {
    if (ancestor->bbox[0][0] == FLT_MAX) break;
    ancestor->bbox[0][0] = FLT_MAX;
    ancestor = ancestor->parent;
  }

  // Invalidate timestamp ranges starting at new parent
  ancestor = parent;
  while (ancestor) {
    if (ancestor->timestamp_range[0] == FLT_MAX) break;
    ancestor->timestamp_range[0] = FLT_MAX;
    ancestor = ancestor->parent;
  }

  // Update hierarchy
  if (this->parent) this->parent->parts.Remove(this);
  if (parent) parent->parts.Insert(this);
  this->parent = parent;

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
cmpq %rsi, %rdi
je 0x171bd
movq %rsi, %r14
movsd 0xb108b(%rip), %xmm0    # 0xc8168
movabsq $0x47efffffe0000000, %rax # imm = 0x47EFFFFFE0000000
movq %rdi, %rcx
testq %rcx, %rcx
je 0x1710c
movsd 0xa8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x170ff
jnp 0x1710c
movq %rax, 0xa8(%rcx)
movq 0x18(%rcx), %rcx
jmp 0x170ea
movq %rdi, %rcx
testq %rcx, %rcx
je 0x17135
movsd 0xd8(%rcx), %xmm0
ucomisd 0xb1044(%rip), %xmm0    # 0xc8168
jne 0x17128
jnp 0x17135
movq %rax, 0xd8(%rcx)
movq 0x18(%rcx), %rcx
jmp 0x1710f
movq %r14, %rcx
testq %rcx, %rcx
je 0x1715e
movsd 0xa8(%rcx), %xmm0
ucomisd 0xb101b(%rip), %xmm0    # 0xc8168
jne 0x17151
jnp 0x1715e
movq %rax, 0xa8(%rcx)
movq 0x18(%rcx), %rcx
jmp 0x17138
movq %r14, %rcx
testq %rcx, %rcx
je 0x17187
movsd 0xd8(%rcx), %xmm0
ucomisd 0xb0ff2(%rip), %xmm0    # 0xc8168
jne 0x1717a
jnp 0x17187
movq %rax, 0xd8(%rcx)
movq 0x18(%rcx), %rcx
jmp 0x17161
testq %rdi, %rdi
je 0x17198
addq $0x20, %rdi
movq %rbx, %rsi
callq 0x1782a
testq %r14, %r14
je 0x171a9
leaq 0x20(%r14), %rdi
movq %rbx, %rsi
callq 0x1784c
movq %r14, 0x18(%rbx)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x171bd
orb $0x1, 0x1e8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::SetName(char const*)
void R3SurfelObject::
SetName(const char *name)
{
  // Delete previous name
  if (this->name) free(this->name);
  this->name = (name) ? RNStrdup(name) : NULL;

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x88(%rdi), %rdi
callq 0x13600
testq %r14, %r14
je 0x171eb
movq %r14, %rdi
callq 0x9cc91
jmp 0x171ed
xorl %eax, %eax
movq %rax, 0x88(%rbx)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x17204
orb $0x1, 0x1e8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::InsertNode(gaps::R3SurfelNode*)
void R3SurfelObject::
InsertNode(R3SurfelNode *node)
{
  // Just checking
  assert(node);
  assert(!nodes.FindEntry(node));
  assert(node->object == NULL);

  // Update node
  node->object = this;

  // Insert node
  nodes.Insert(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;
  }

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

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rdi, 0x8(%rsi)
addq $0x60, %rdi
callq 0x1784c
movq %r14, %rdi
callq 0x3365c
addsd 0x98(%rbx), %xmm0
movsd %xmm0, 0x98(%rbx)
movsd 0xb0ebd(%rip), %xmm0    # 0xc8168
movabsq $0x47efffffe0000000, %rax # imm = 0x47EFFFFFE0000000
movq %rbx, %rcx
testq %rcx, %rcx
je 0x172da
movsd 0xa8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x172cd
jnp 0x172da
movq %rax, 0xa8(%rcx)
movq 0x18(%rcx), %rcx
jmp 0x172b8
movq %rbx, %rcx
testq %rcx, %rcx
je 0x17303
movsd 0xd8(%rcx), %xmm0
ucomisd 0xb0e76(%rip), %xmm0    # 0xc8168
jne 0x172f6
jnp 0x17303
movq %rax, 0xd8(%rcx)
movq 0x18(%rcx), %rcx
jmp 0x172dd
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x17313
orb $0x1, 0x1e8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::SetMarks(int)
void R3SurfelObject::
SetMarks(RNBoolean mark)
{
  // Set mark for all nodes
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    node->SetMarks(mark);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
movslq 0x6c(%r14), %rax
cmpq %rax, %r15
jge 0x17347
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
movl %ebx, %esi
callq *0x40(%rax)
incq %r15
jmp 0x17329
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::ReadBlocks(int)
void R3SurfelObject::
ReadBlocks(RNBoolean entire_subtree)
{
  // Read blocks in object
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    node->ReadBlocks(entire_subtree);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
movslq 0x6c(%r14), %rax
cmpq %rax, %r15
jge 0x17378
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebx, %esi
callq 0x33de2
incq %r15
jmp 0x1735b
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::ReleaseBlocks(int)
void R3SurfelObject::
ReleaseBlocks(RNBoolean entire_subtree)
{
  // Release blocks in object
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    node->ReleaseBlocks(entire_subtree);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
movslq 0x6c(%r14), %rax
cmpq %rax, %r15
jge 0x173a8
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebx, %esi
callq 0x33e40
incq %r15
jmp 0x1738b
popq %rbx
popq %r14
popq %r15
retq