LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/ArashPartow[P]exprtk-extras/./exprtk.hpp
// Function: bool exprtk::collect_functions<double, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::deque>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, exprtk::symbol_table<double>&, std::deque<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
inline bool collect_functions(const std::string& expression,
                                 exprtk::symbol_table<T>& extrnl_symbol_table,
                                 Sequence<std::string, Allocator>& symbol_list)
   {
      typedef details::collector_helper<T> collect_t;

      std::set<std::string> symbol_set;

      const bool variable_pass = collect_t::collection_pass
                                    (expression, symbol_set, false, true, false, extrnl_symbol_table);
      const bool vector_pass   = collect_t::collection_pass
                                    (expression, symbol_set, false, true,  true, extrnl_symbol_table);

      if (!variable_pass && !vector_pass)
         return false;

      std::set<std::string>::iterator itr = symbol_set.begin();

      while (symbol_set.end() != itr)
      {
         symbol_list.push_back(*itr);
         ++itr;
      }

      return true;
   }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %r12
andl $0x0, (%r12)
andq $0x0, 0x8(%r12)
movq %r12, 0x10(%r12)
movq %r12, 0x18(%r12)
andq $0x0, 0x20(%r12)
movq %rsp, %rsi
pushq $0x1
popq %rcx
xorl %edx, %edx
xorl %r8d, %r8d
movq %r14, %r9
callq 0x11227c
movl %eax, %ebp
movq %rsp, %rsi
pushq $0x1
popq %rcx
movq %r15, %rdi
xorl %edx, %edx
movl %ecx, %r8d
movq %r14, %r9
callq 0x11227c
orb %al, %bpl
je 0x1107f2
movq 0x18(%rsp), %r14
cmpq %r14, %r12
je 0x1107f2
leaq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x112450
movq %r14, %rdi
callq 0x10e480
movq %rax, %r14
jmp 0x1107d4
movq %rsp, %rdi
callq 0x110e86
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11080d
jmp 0x11080d
movq %rax, %rbx
movq %rsp, %rdi
callq 0x110e86
movq %rbx, %rdi
callq 0x10e310
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]optimal-seed-solver/spacedSeedSolver.cc
// Function: SpacedSeedSolver::storeHash(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void SpacedSeedSolver::storeHash(string tableName) {
	ofstream storeFile;
	storeFile.open(tableName.c_str() );

	storeFile<< mask << endl;

	for (int i = 0; i < freqTable.size(); i++)
		storeFile << freqTable[i] << endl;

	storeFile.close();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r15
movq %r15, %rdi
callq 0x3420
movq (%r14), %rsi
pushq $0x10
popq %rdx
movq %r15, %rdi
callq 0x3040
leaq 0x2a8(%rbx), %rsi
movq %rsp, %rdi
callq 0x3200
movq %rax, %rdi
callq 0x3120
xorl %r15d, %r15d
movq %rsp, %r14
movq 0x290(%rbx), %rax
movq 0x298(%rbx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r15, %rcx
jbe 0x44ef
movl (%rax,%r15,4), %esi
movq %r14, %rdi
callq 0x31a0
movq %rax, %rdi
callq 0x3120
incq %r15
jmp 0x44bc
movq %rsp, %rdi
callq 0x3370
movq %rsp, %rdi
callq 0x3390
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %r15
retq
jmp 0x450e
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3390
movq %rbx, %rdi
callq 0x3460
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]optimal-seed-solver/spacedSeedSolver.cc
// Function: SpacedSeedSolver::loadHash(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void SpacedSeedSolver::loadHash(string tableName) {
	ifstream storeFile;
	storeFile.open(tableName.c_str() );

	storeFile >> mask;

	unsigned int oneCount = 0;
	for (int i = 0; i < mask.length(); i++)
		if (mask[i] == '1')
			oneCount++;

	freqTable.resize( (1 << (2 * oneCount) ), 0);
	
	seed = string(oneCount, 'N');

	for (int i = 0; i < freqTable.size(); i++)
		storeFile >> freqTable[i];

	storeFile.close();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x3280
movq (%r14), %rsi
pushq $0x8
popq %rdx
movq %r15, %rdi
callq 0x3170
leaq 0x2a8(%rbx), %rsi
leaq 0x20(%rsp), %rdi
callq 0x32f0
movq 0x2a8(%rbx), %rax
movq 0x2b0(%rbx), %rcx
xorl %edx, %edx
xorl %r14d, %r14d
cmpq %rdx, %rcx
je 0x458c
xorl %esi, %esi
cmpb $0x31, (%rax,%rdx)
sete %sil
addl %esi, %r14d
incq %rdx
jmp 0x4575
leaq 0x290(%rbx), %rdi
leal (%r14,%r14), %ecx
pushq $0x1
popq %rsi
shll %cl, %esi
movq %rsp, %rdx
andl $0x0, (%rdx)
callq 0x472a
movl %r14d, %esi
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rsp, %rdi
pushq $0x4e
popq %rdx
callq 0x3290
leaq 0x270(%rbx), %rdi
movq %rsp, %r14
movq %r14, %rsi
callq 0x32c0
movq %r14, %rdi
callq 0x3110
xorl %r15d, %r15d
leaq 0x20(%rsp), %r14
xorl %r12d, %r12d
movq 0x290(%rbx), %rsi
movq 0x298(%rbx), %rax
subq %rsi, %rax
sarq $0x2, %rax
cmpq %r12, %rax
jbe 0x4611
addq %r15, %rsi
movq %r14, %rdi
callq 0x3450
incq %r12
addq $0x4, %r15
jmp 0x45e3
leaq 0x20(%rsp), %rdi
callq 0x3090
leaq 0x20(%rsp), %rdi
callq 0x30c0
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x463c
jmp 0x463c
jmp 0x463c
jmp 0x463c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x3460
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]optimal-seed-solver/spacedSeedSolver.cc
// Function: SpacedSeedSolver::solveDNA(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned int)
unsigned int SpacedSeedSolver::solveDNA(string DNA, unsigned int seedNum) {
	unsigned int totalFreq = 0;
	
	for (int i = 0; i < seedNum; i++) {
		string spacedSeed = DNA.substr(i * mask.length(), mask.length() );
		unsigned int oneCount = 0;
		for (int i = 0; i < spacedSeed.length(); i++) {
		   if (mask[i] == '1') {
				seed[oneCount] = spacedSeed[i];
				oneCount++;
		   }
		}
		unsigned int hash = hashGen.calculateHash(seed, seed.length() );
		totalFreq += freqTable[hash];
	}
	return totalFreq;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
leaq 0x270(%rdi), %r15
leaq 0x268(%rdi), %rax
movq %rax, 0x8(%rsp)
movl %edx, %ebx
xorl %r12d, %r12d
leaq 0x18(%rsp), %r13
xorl %ebp, %ebp
cmpq %rbx, %r12
je 0x4703
movq 0x2b0(%r14), %rcx
movq %rcx, %rdx
imulq %r12, %rdx
movq %r13, %rdi
movq 0x10(%rsp), %rsi
callq 0x3260
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rax, 0x20(%rsp)
jbe 0x46d6
movq 0x2a8(%r14), %rdx
cmpb $0x31, (%rdx,%rax)
jne 0x46d1
movq 0x18(%rsp), %rdx
movb (%rdx,%rax), %dl
movl %ecx, %esi
movq (%r15), %rdi
movb %dl, (%rdi,%rsi)
incl %ecx
incq %rax
jmp 0x46ab
movl 0x278(%r14), %edx
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x86c6
movl %eax, %eax
movq 0x290(%r14), %rcx
addl (%rcx,%rax,4), %ebp
movq %r13, %rdi
callq 0x3110
incq %r12
jmp 0x4687
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3110
movq %rbx, %rdi
callq 0x3460
nop
// File: /workspace/github_cpp_makefile_star2_O2/Lartu[P]coraldb/source/map_functions.cpp
// Function: set_key(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 set_key(const std::string &key, const std::string &value)
{
    /* Sets the value of a key into the dictionary. If the key is not found,
     * it's added. Otherwise, it's value is changed.
     * Time complexity:
     * - Average: O(1)
     * - Worst case: O(n)
     */
    global_db_mutex.lock();
    if (global_db.find(key) == global_db.end())
        global_db.emplace(key, value);
    else
        global_db[key] = value;
    global_db_mutex.unlock();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x5a6e(%rip), %rdi      # 0x92f0
callq 0x4be4
leaq 0x5a2a(%rip), %rdi      # 0x92b8
movq %r14, %rsi
callq 0x5060
leaq 0x5a1b(%rip), %rdi      # 0x92b8
movq %r14, %rsi
testq %rax, %rax
je 0x38b7
callq 0x5572
movq %rax, %rdi
movq %rbx, %rsi
callq 0x31c0
jmp 0x38bf
movq %rbx, %rdx
callq 0x5196
leaq 0x5a2a(%rip), %rdi      # 0x92f0
popq %rbx
popq %r14
popq %rbp
jmp 0x3230
// File: /workspace/github_cpp_makefile_star2_O2/Lartu[P]coraldb/source/map_functions.cpp
// Function: read_key(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>>&)
bool read_key(const std::string &key, std::string &out)
{
    /* Returns the value of a key via the out parameter. If a value could be
     * read, the function returns true. Otherwise it returns false.
     * Time complexity:
     * - Average: O(1)
     * - Worst case: O(n)
     */
    bool found;
    global_db_mutex.lock();
    std::unordered_map<std::string, std::string>::const_iterator it = global_db.find(key);
    found = it != global_db.end();
    if (found)
    {
        out = it->second;
    }
    global_db_mutex.unlock();
    return found;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x5a0d(%rip), %rdi      # 0x92f0
callq 0x4be4
leaq 0x59c9(%rip), %rdi      # 0x92b8
movq %r14, %rsi
callq 0x5060
movq %rax, %r14
testq %rax, %rax
je 0x390b
leaq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0x31c0
testq %r14, %r14
setne %bl
leaq 0x59d8(%rip), %rdi      # 0x92f0
callq 0x3230
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Lartu[P]coraldb/source/map_functions.cpp
// Function: probe_key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool probe_key(const std::string &key)
{
    /* Returns true if the key exists in the dictionary, false otherwise.
     * Time complexity:
     * - Average: O(1)
     * - Worst case: O(n)
     */
    bool found;
    global_db_mutex.lock();
    found = global_db.find(key) != global_db.end();
    global_db_mutex.unlock();
    return found;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x5987(%rip), %r14      # 0x92f0
movq %r14, %rdi
callq 0x4be4
leaq 0x5940(%rip), %rdi      # 0x92b8
movq %rbx, %rsi
callq 0x5060
testq %rax, %rax
setne %bl
movq %r14, %rdi
callq 0x3230
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Lartu[P]coraldb/source/checkpoint.cpp
// Function: load_checkpoint()
void load_checkpoint()
{
    size_t loaded = 0;
    std::string line;
    std::ifstream checkpoint_file(global_filename);
    std::cout << "CoralDB: Attempting to load checkpoint file " << global_filename << std::endl;
    std::chrono::steady_clock::time_point begin = std::chrono::steady_clock::now();
    while (std::getline(checkpoint_file, line))
    {
        if (execute_command(line, 0) == 0)
        {
            ++loaded;
        }
        else
        {
            err_malformed_command_load(line);
        }
    }
    std::chrono::steady_clock::time_point end = std::chrono::steady_clock::now();
    std::cout << "CoralDB: Executed " << loaded << " startup commands in " << std::chrono::duration_cast<std::chrono::milliseconds>(end - begin).count() << " ms" << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x230, %rsp            # imm = 0x230
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x50e5(%rip), %rsi      # 0x9340
leaq -0x248(%rbp), %rdi
pushq $0x8
popq %rdx
callq 0x3410
movq 0x4d57(%rip), %rdi      # 0x8fc8
leaq 0x1f73(%rip), %rsi      # 0x61eb
callq 0x32e0
leaq 0x50bc(%rip), %rsi      # 0x9340
movq %rax, %rdi
callq 0x3270
movq %rax, %rdi
callq 0x3180
xorl %r14d, %r14d
callq 0x3380
movq %rax, %rbx
leaq -0x248(%rbp), %r15
leaq -0x40(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x3060
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x42e0
movq %r12, %rdi
xorl %esi, %esi
callq 0x3995
testl %eax, %eax
je 0x42db
movq %r12, %rdi
callq 0x3834
jmp 0x42aa
incq %r14
jmp 0x42aa
callq 0x3380
movq %rax, %r15
movq 0x4cd9(%rip), %rdi      # 0x8fc8
leaq 0x1f22(%rip), %rsi      # 0x6218
callq 0x32e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x3200
leaq 0x1f1e(%rip), %rsi      # 0x622b
movq %rax, %rdi
callq 0x32e0
movq %rax, %rdi
subq %rbx, %r15
movl $0xf4240, %ecx          # imm = 0xF4240
movq %r15, %rax
cqto
idivq %rcx
movq %rax, %rsi
callq 0x32c0
leaq 0x1f0a(%rip), %rsi      # 0x6241
movq %rax, %rdi
callq 0x32e0
movq %rax, %rdi
callq 0x3180
leaq -0x248(%rbp), %rdi
callq 0x3090
leaq -0x40(%rbp), %rdi
callq 0x3498
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x4386
jmp 0x4377
jmp 0x4377
jmp 0x4377
movq %rax, %rbx
leaq -0x248(%rbp), %rdi
callq 0x3090
leaq -0x40(%rbp), %rdi
callq 0x3498
movq %rbx, %rdi
callq 0x3450
// File: /workspace/github_cpp_makefile_star2_O2/Lartu[P]coraldb/source/checkpoint.cpp
// Function: test_save_file_permissions()
int test_save_file_permissions()
{
    FILE *fp = fopen(global_filename.c_str(), "a+");
    if (fp == NULL)
    {
        if (errno == EACCES)
        {
            std::cerr << "CoralDB: Cannot write to checkpoint file " << global_filename << ", permission denied." << std::endl;
        }
        else
        {
            std::cerr << "CoralDB: Cannot write to checkpoint file " << global_filename << ": " << strerror(errno) << "." << std::endl;
        }
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x4f9b(%rip), %rdi      # 0x9340
leaq 0x1e99(%rip), %rsi      # 0x6245
callq 0x3320
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
jne 0x4435
callq 0x3030
movq %rax, %rbx
movl (%rax), %r14d
movq 0x4c23(%rip), %rdi      # 0x8ff0
leaq 0x1e74(%rip), %rsi      # 0x6248
callq 0x32e0
leaq 0x4f60(%rip), %rsi      # 0x9340
movq %rax, %rdi
callq 0x3270
cmpl $0xd, %r14d
jne 0x43f7
leaq 0x1e7d(%rip), %rsi      # 0x6272
jmp 0x4422
leaq 0x1ceb(%rip), %rsi      # 0x60e9
movq %rax, %rdi
callq 0x32e0
movq %rax, %r14
movl (%rbx), %edi
callq 0x3100
movq %r14, %rdi
movq %rax, %rsi
callq 0x32e0
leaq 0x1e63(%rip), %rsi      # 0x6285
movq %rax, %rdi
callq 0x32e0
movq %rax, %rdi
callq 0x3180
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Lartu[P]coraldb/source/checkpoint.cpp
// Function: checkpoint_handler()
void checkpoint_handler()
{
    /* This function waits until it's time for the checkpoint. When it is,
     * it requests the saving of the checkpoint file.
     */
    while (true)
    {
        std::this_thread::sleep_for(std::chrono::milliseconds(CHECKPOINT_TIME));
        save_datafile();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq -0x10(%rbp), %rbx
movslq 0x4e25(%rip), %rax      # 0x9270
movq %rax, -0x10(%rbp)
movq %rbx, %rdi
callq 0x4cfc
callq 0x405a
jmp 0x4444
// File: /workspace/github_cpp_makefile_star2_O2/Lartu[P]coraldb/source/coraldb.cpp
// Function: show_help()
void show_help()
{
    print_version();
    std::cout << "Usage: coraldb [switches]" << std::endl;
    std::cout << " -h, --help          shows this help" << std::endl;
    std::cout << " -p, --port          sets the database port" << std::endl;
    std::cout << " -f, --file          sets the database checkpoint file" << std::endl;
    std::cout << " -c, --checkpoint    sets the checkpoint timeout in seconds" << std::endl;
    std::cout << " -a, --anyport       use any available port" << std::endl;
    std::cout << " -v, --version       prints version information" << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x445e
movq 0x4af2(%rip), %rbx      # 0x8fc8
leaq 0x1e22(%rip), %rsi      # 0x62ff
movq %rbx, %rdi
callq 0x32e0
movq %rax, %rdi
callq 0x3180
leaq 0x1e25(%rip), %rsi      # 0x6319
movq %rbx, %rdi
callq 0x32e0
movq %rax, %rdi
callq 0x3180
leaq 0x1e33(%rip), %rsi      # 0x633e
movq %rbx, %rdi
callq 0x32e0
movq %rax, %rdi
callq 0x3180
leaq 0x1e48(%rip), %rsi      # 0x636a
movq %rbx, %rdi
callq 0x32e0
movq %rax, %rdi
callq 0x3180
leaq 0x1e68(%rip), %rsi      # 0x63a1
movq %rbx, %rdi
callq 0x32e0
movq %rax, %rdi
callq 0x3180
leaq 0x1e8d(%rip), %rsi      # 0x63dd
movq %rbx, %rdi
callq 0x32e0
movq %rax, %rdi
callq 0x3180
leaq 0x1ea2(%rip), %rsi      # 0x6409
movq %rbx, %rdi
callq 0x32e0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3180
// File: /workspace/github_cpp_makefile_star2_O2/Lartu[P]coraldb/source/coraldb.cpp
// Function: start_socket()
void start_socket()
{
    // Create socket
    int sockfd;
    if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
    {
        err_socket_creation(strerror(errno));
        exit(1);
    }
    // Bind Socket
    struct sockaddr_in address;
    memset(&address, 0, sizeof(address));
    address.sin_family = AF_INET;
    address.sin_addr.s_addr = INADDR_ANY;
    address.sin_port = htons(global_port);
    socklen_t len = sizeof(address);
    if (bind(sockfd, (struct sockaddr *)&address, len) < 0)
    {
        err_socket_creation(strerror(errno));
        exit(1);
    }
    getsockname(sockfd, (struct sockaddr *)&address, &len);
    global_port = ntohs(address.sin_port);
    // Inform the user
    std::cout << "CoralDB running on port " << global_port << ", backed to " << global_filename << std::endl;
    // Listen socket
    int new_socket_fd;
    if (listen(sockfd, 256) < 0)
    {
        err_socket_read(strerror(errno));
    }
    while (true)
    {
        if ((new_socket_fd = accept(sockfd, (struct sockaddr *)&address, &len)) < 0)
        {
            err_socket_accept(strerror(errno));
        }
        std::thread child_thread(handle_socket, new_socket_fd);
        child_thread.detach();
    }
    close(sockfd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x3080
testl %eax, %eax
js 0x4a59
movl %eax, %r15d
leaq -0x48(%rbp), %rsi
andq $0x0, 0x8(%rsi)
movw $0x2, (%rsi)
andl $0x0, 0x4(%rsi)
movzwl 0x4839(%rip), %eax      # 0x9274
rolw $0x8, %ax
movw %ax, 0x2(%rsi)
movl $0x10, -0x2c(%rbp)
pushq $0x10
popq %rdx
movl %r15d, %edi
callq 0x3040
testl %eax, %eax
jns 0x4a75
callq 0x3030
movl (%rax), %edi
callq 0x3100
movq %rax, %rdi
callq 0x3786
pushq $0x1
popq %rdi
callq 0x3330
leaq -0x48(%rbp), %rbx
leaq -0x2c(%rbp), %rdx
movl %r15d, %edi
movq %rbx, %rsi
callq 0x32a0
movzwl 0x2(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x47db(%rip)      # 0x9274
movq 0x4528(%rip), %rdi      # 0x8fc8
leaq 0x19eb(%rip), %rsi      # 0x6492
callq 0x32e0
movl 0x47c2(%rip), %esi      # 0x9274
movq %rax, %rdi
callq 0x3200
leaq 0x19ea(%rip), %rsi      # 0x64ab
movq %rax, %rdi
callq 0x32e0
leaq 0x4870(%rip), %rsi      # 0x9340
movq %rax, %rdi
callq 0x3270
movq %rax, %rdi
callq 0x3180
movl %r15d, %r14d
movl %r15d, %edi
movl $0x100, %esi            # imm = 0x100
callq 0x3300
testl %eax, %eax
jns 0x4b08
callq 0x3030
movl (%rax), %edi
callq 0x3100
movq %rax, %rdi
callq 0x37c0
leaq -0x2c(%rbp), %r15
leaq -0x26c(%rip), %r12      # 0x48a7
leaq -0x38(%rbp), %r13
leaq -0x30(%rbp), %rbx
movl %r14d, %edi
leaq -0x48(%rbp), %rsi
movq %r15, %rdx
callq 0x30e0
movl %eax, -0x30(%rbp)
testl %eax, %eax
jns 0x4b45
callq 0x3030
movl (%rax), %edi
callq 0x3100
movq %rax, %rdi
callq 0x37fa
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x4db0
movq %r13, %rdi
callq 0x3440
movq %r13, %rdi
callq 0x4e28
jmp 0x4b1b
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x4e28
movq %rbx, %rdi
callq 0x3450
// File: /workspace/github_cpp_makefile_star2_O2/Lartu[P]coraldb/source/coraldb.cpp
// Function: main
int main(int argc, char **argv)
{
    int arg_out = parse_arguments(argc, argv);
    if (arg_out == 0)
    {
        print_version();
        if (test_save_file_permissions() == 0)
        {
            load_checkpoint();
            std::thread checkpoint_thread(checkpoint_handler);
            checkpoint_thread.detach();
            start_socket();
        }
        else
        {
            return 1;
        }
    }
    else
    {
        return arg_out;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x457d
testl %eax, %eax
jne 0x4b96
callq 0x445e
callq 0x4397
testl %eax, %eax
je 0x4ba0
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x4232
leaq -0x772(%rip), %rsi      # 0x443a
leaq -0x10(%rbp), %rbx
movq %rbx, %rdi
callq 0x4e38
movq %rbx, %rdi
callq 0x3440
callq 0x49fd
movq %rax, %rbx
leaq -0x10(%rbp), %rdi
callq 0x4e28
movq %rbx, %rdi
callq 0x3450
nop
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/CommandLineParser.cpp
// Function: ut1::CommandLineParser::Option::setValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
void CommandLineParser::Option::setValue(const std::string& v, char listSepChar_)
{
    if (isList && (count > 0))
    {
        value += listSepChar_;
        value += v;
    }
    else
    {
        value = v;
    }
    count++;
    if (argName.empty())
    {
        value = std::to_string(count);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x90(%rdi), %rbx
cmpb $0x1, 0x88(%rdi)
jne 0x5a0d
cmpl $0x0, 0xb0(%r14)
je 0x5a0d
movsbl %dl, %esi
movq %rbx, %rdi
callq 0x53a0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5820
jmp 0x5a18
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5240
movl 0xb0(%r14), %esi
incl %esi
movl %esi, 0xb0(%r14)
cmpq $0x0, 0x50(%r14)
jne 0x5a4d
movq %rsp, %r14
movq %r14, %rdi
callq 0x75cb
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5500
movq %r14, %rdi
callq 0x51f0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/CommandLineParser.cpp
// Function: ut1::CommandLineParser::getShortOption(char)
CommandLineParser::Option* CommandLineParser::getShortOption(char shortOption)
{
    auto it = shortOptionToLongOption.find(shortOption);
    if (it == shortOptionToLongOption.end())
    {
        return nullptr;
    }
    return getOption(it->second);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xf(%rsp), %rax
movb %sil, (%rax)
addq $0x48, %rdi
movq %rax, %rsi
callq 0x8c0a
leaq 0x50(%rbx), %rcx
cmpq %rcx, %rax
je 0x60bc
addq $0x28, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7520
jmp 0x60be
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/CommandLineParser.cpp
// Function: ut1::CommandLineParser::getCount(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
unsigned CommandLineParser::getCount(const std::string& longOption) const
{
    const Option* option = getOption(longOption);
    if (option)
    {
        return option->count;
    }
    else
    {
        throw std::runtime_error("CommandLineParser::getCount(): Unknown option '" + longOption + "'!");
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
callq 0x7520
testq %rax, %rax
je 0x7172
movl 0xb0(%rax), %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x5210
movq %rax, %rbx
leaq 0x13f5a(%rip), %rsi     # 0x1b0de
movq %rsp, %rdi
movq %r14, %rdx
callq 0x7667
leaq 0x13f78(%rip), %rdx     # 0x1b10e
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x76f8
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x56a0
xorl %ebp, %ebp
movq 0x23e2c(%rip), %rsi     # 0x2afe8
movq 0x23dd5(%rip), %rdx     # 0x2af98
movq %rbx, %rdi
callq 0x56f0
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x51f0
jmp 0x71e0
movq %rax, %r14
movb $0x1, %bpl
movq %rsp, %rdi
callq 0x51f0
testb %bpl, %bpl
jne 0x71f2
jmp 0x71fa
movq %rax, %r14
movq %rbx, %rdi
callq 0x5330
movq %r14, %rdi
callq 0x5730
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/CommandLineParser.cpp
// Function: ut1::CommandLineParser::getStr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
const std::string& CommandLineParser::getStr(const std::string& longOption) const
{
    const Option* option = getOption(longOption);
    if (option)
    {
        return option->value;
    }
    else
    {
        throw std::runtime_error("CommandLineParser::getStr(): Unknown option '" + longOption + "'!");
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
callq 0x7520
testq %rax, %rax
je 0x722c
addq $0x90, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x5210
movq %rax, %rbx
leaq 0x13ed3(%rip), %rsi     # 0x1b111
movq %rsp, %rdi
movq %r14, %rdx
callq 0x7667
leaq 0x13ebe(%rip), %rdx     # 0x1b10e
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x76f8
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x56a0
xorl %ebp, %ebp
movq 0x23d72(%rip), %rsi     # 0x2afe8
movq 0x23d1b(%rip), %rdx     # 0x2af98
movq %rbx, %rdi
callq 0x56f0
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x51f0
jmp 0x729a
movq %rax, %r14
movb $0x1, %bpl
movq %rsp, %rdi
callq 0x51f0
testb %bpl, %bpl
jne 0x72ac
jmp 0x72b4
movq %rax, %r14
movq %rbx, %rdi
callq 0x5330
movq %r14, %rdi
callq 0x5730
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/CommandLineParser.cpp
// Function: ut1::CommandLineParser::getInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
long long CommandLineParser::getInt(const std::string& longOption) const
{
    std::string value = getStr(longOption);
    const char* end   = nullptr;
    long long   r     = std::strtoll(value.c_str(), const_cast<char**>(&end), 0);
    ut1::skipSpace(end);
    if (end && (end != value.c_str()) && (*end == 0))
    {
        return r;
    }
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
callq 0x7208
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x55d0
movq %rsp, %r14
andq $0x0, (%r14)
movq (%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x5070
movq %rax, %rbx
movq %r14, %rdi
callq 0x965e
movq (%r14), %rax
testq %rax, %rax
je 0x7341
cmpq 0x8(%rsp), %rax
je 0x7341
cmpb $0x0, (%rax)
je 0x7343
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdi
callq 0x51f0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/CommandLineParser.cpp
// Function: ut1::CommandLineParser::getUInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
unsigned long long CommandLineParser::getUInt(const std::string& longOption) const
{
    std::string        value = getStr(longOption);
    const char*        end   = nullptr;
    unsigned long long r     = std::strtoull(value.c_str(), const_cast<char**>(&end), 0);
    ut1::skipSpace(end);
    if (end && (end != value.c_str()) && (*end == 0))
    {
        return r;
    }
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
callq 0x7208
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x55d0
movq %rsp, %r14
andq $0x0, (%r14)
movq (%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x55a0
movq %rax, %rbx
movq %r14, %rdi
callq 0x965e
movq (%r14), %rax
testq %rax, %rax
je 0x73a7
cmpq 0x8(%rsp), %rax
je 0x73a7
cmpb $0x0, (%rax)
je 0x73a9
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdi
callq 0x51f0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/CommandLineParser.cpp
// Function: ut1::CommandLineParser::getDouble(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
double CommandLineParser::getDouble(const std::string& longOption) const
{
    std::string value = getStr(longOption);
    const char* end   = nullptr;
    double      r     = std::strtod(value.c_str(), const_cast<char**>(&end));
    ut1::skipSpace(end);
    if (end && (end != value.c_str()) && (*end == 0))
    {
        return r;
    }
    return 0.0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
callq 0x7208
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x55d0
leaq 0x10(%rsp), %r14
andq $0x0, (%r14)
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x5350
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
callq 0x965e
movq (%r14), %rax
testq %rax, %rax
je 0x7410
cmpq 0x18(%rsp), %rax
je 0x7410
cmpb $0x0, (%rax)
je 0x7419
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x51f0
movsd 0x8(%rsp), %xmm0
addq $0x38, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/CommandLineParser.cpp
// Function: ut1::CommandLineParser::setValue(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&, bool)
void CommandLineParser::setValue(const std::string& longOption, const std::string& value, bool clearList)
{
    Option* option = getOption(longOption);
    if (option)
    {
        if (clearList)
        {
            option->value = "";
        }
        option->setValue(value, listSepChar);
    }
    else
    {
        throw std::runtime_error("CommandLineParser::setValue(): Unknown option '" + longOption + "'!");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x7520
testq %rax, %rax
je 0x7490
movq %rax, %r12
testb %bpl, %bpl
je 0x7471
movq %r12, %rdi
addq $0x90, %rdi
leaq 0x13c3e(%rip), %rsi     # 0x1b0aa
callq 0x57e0
movsbl 0x90(%r14), %edx
movq %r12, %rdi
movq %rbx, %rsi
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x59cc
pushq $0x10
popq %rdi
callq 0x5210
movq %rax, %rbx
leaq 0x13c9d(%rip), %rsi     # 0x1b13f
movq %rsp, %rdi
movq %r15, %rdx
callq 0x7667
leaq 0x13c5a(%rip), %rdx     # 0x1b10e
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x76f8
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x56a0
xorl %ebp, %ebp
movq 0x23b0e(%rip), %rsi     # 0x2afe8
movq 0x23ab7(%rip), %rdx     # 0x2af98
movq %rbx, %rdi
callq 0x56f0
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x51f0
jmp 0x74fe
movq %rax, %r14
movb $0x1, %bpl
movq %rsp, %rdi
callq 0x51f0
testb %bpl, %bpl
jne 0x7510
jmp 0x7518
movq %rax, %r14
movq %rbx, %rdi
callq 0x5330
movq %r14, %rdi
callq 0x5730
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/CommandLineParser.cpp
// Function: ut1::CommandLineParser::getOption(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
CommandLineParser::Option* CommandLineParser::getOption(const std::string& longOption)
{
    auto it = options.find(longOption);
    if (it == options.end())
    {
        return nullptr;
    }
    return &(it->second);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x8bcc
addq $0x8, %rbx
leaq 0x40(%rax), %rdx
xorl %ecx, %ecx
cmpq %rbx, %rax
cmovneq %rdx, %rcx
movq %rcx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/CommandLineParser.cpp
// Function: ut1::CommandLineParser::reportErrorAndExit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
void CommandLineParser::reportErrorAndExit(const std::string& message, int exitStatus)
{
    if (instance)
    {
        // This is the 99.999% case.
        instance->error(message, exitStatus);
    }
    else
    {
        // We will virtually never end up in this case since an instance of CommandLineOptions should be
        // created as the first thing.
        std::cout << message << "\n";
        std::exit(exitStatus);
    }
}

// Assembly:
pushq %rbx
movl %esi, %ebx
movq %rdi, %rsi
movq 0x242cb(%rip), %rdi     # 0x2b868
testq %rdi, %rdi
jne 0x75c4
movq 0x23a07(%rip), %rdi     # 0x2afb0
callq 0x53c0
leaq 0x13af4(%rip), %rsi     # 0x1b0a9
movq %rax, %rdi
callq 0x5400
movl %ebx, %edi
callq 0x54f0
movl %ebx, %edx
callq 0x7540
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/MiscUtils.cpp
// Function: ut1::splitString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, int)
void replaceStringInPlace(std::string& s, const std::string& from, const std::string& to)
{
    if (!from.empty())
    {
        for (size_t pos = 0;; pos += to.size())
        {
            pos = s.find(from, pos);
            if (pos == std::string::npos)
            {
                break;
            }
            s.replace(pos, from.size(), to);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movq %rdi, (%rsp)
movups %xmm0, (%rdi)
cmpq $0x0, 0x8(%rsi)
je 0x91fe
movl %ecx, %ebp
movq %rsi, %r14
xorl %ebx, %ebx
movsbl %dl, %r15d
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movl %r15d, %esi
movq %rbx, %rdx
callq 0x5580
movq %rax, %r13
addl $-0x1, %ebp
setb %al
cmpq $-0x1, %r13
je 0x91d3
testb %al, %al
je 0x91d3
movq %r13, %rcx
subq %rbx, %rcx
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x5460
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x8926
movq %r12, %rdi
callq 0x51f0
incq %r13
movq %r13, %rbx
jmp 0x9182
leaq 0x8(%rsp), %rdi
pushq $-0x1
popq %rcx
movq %r14, %rsi
movq %rbx, %rdx
callq 0x5460
leaq 0x8(%rsp), %rsi
movq (%rsp), %rdi
callq 0x8926
leaq 0x8(%rsp), %rdi
callq 0x51f0
movq (%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9215
jmp 0x9224
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x51f0
jmp 0x9227
movq %rax, %rbx
movq (%rsp), %rdi
callq 0x7646
movq %rbx, %rdi
callq 0x5730
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/MiscUtils.cpp
// Function: ut1::joinStrings(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string joinStrings(const std::vector<std::string>& stringList, const std::string& sep)
{
    std::stringstream r;
    if (!stringList.empty())
    {
        r << stringList[0];
        for (size_t i = 1; i < stringList.size(); i++)
        {
            r << sep << stringList[i];
        }
    }
    return r.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x5310
movq (%r15), %rsi
cmpq 0x8(%r15), %rsi
je 0x961f
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x53c0
pushq $0x1
popq %r13
pushq $0x20
popq %rbp
movq 0x8(%r15), %rax
subq (%r15), %rax
sarq $0x5, %rax
cmpq %rax, %r13
jae 0x961f
movq %r12, %rdi
movq %r14, %rsi
callq 0x53c0
movq (%r15), %rsi
addq %rbp, %rsi
movq %rax, %rdi
callq 0x53c0
incq %r13
addq $0x20, %rbp
jmp 0x95ed
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x5660
movq %rsp, %rdi
callq 0x5340
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x964b
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5340
movq %rbx, %rdi
callq 0x5730
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/MiscUtils.cpp
// Function: ut1::capitalize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string capitalize(std::string s)
{
    s = tolower(s);
    if (!s.empty())
    {
        s[0] = char(std::toupper(unsigned(s[0])));
    }
    return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x55d0
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x968b
movq %r14, %rdi
movq %r12, %rsi
callq 0x5500
movq %r12, %rdi
callq 0x51f0
movq %r15, %rdi
callq 0x51f0
cmpq $0x0, 0x8(%r14)
je 0x977c
movq (%r14), %r15
movsbl (%r15), %edi
callq 0x5780
movb %al, (%r15)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5560
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/MiscUtils.cpp
// Function: ut1::quoteRegexChars(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string quoteRegexChars(const std::string& s)
{
    std::string       r;
    const std::string special = "[](){}^$.*+|?\\";
    for (char c: s)
    {
        if (special.find(c) != std::string::npos)
        {
            r += '\\';
        }
        r += c;
    }
    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x11ca6(%rip), %rsi     # 0x1b487
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x760a
movq (%r14), %r12
movq 0x8(%r14), %r13
xorl %ebp, %ebp
leaq 0x8(%rsp), %r14
cmpq %rbp, %r13
je 0x9836
movsbl (%r12,%rbp), %r15d
movq %r14, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x5580
cmpq $-0x1, %rax
je 0x9826
movq %rbx, %rdi
pushq $0x5c
popq %rsi
callq 0x53a0
movq %rbx, %rdi
movl %r15d, %esi
callq 0x53a0
incq %rbp
jmp 0x97fe
leaq 0x8(%rsp), %rdi
callq 0x51f0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x9864
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x51f0
movq %rbx, %rdi
callq 0x51f0
movq %r14, %rdi
callq 0x5730
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/MiscUtils.cpp
// Function: ut1::toNfd(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string toNfd(const std::string& s)
{
    // This only works for german umlauts so far.
    std::string r;
    for (size_t i = 0; i < s.length(); i++)
    {
        if ((s[i] == '\xc3') && (i < s.length() - 1))
        {
            switch (s[i + 1])
            {
            case '\x84': r += "A\xcc\x88"; i++; continue;
            case '\x96': r += "O\xcc\x88"; i++; continue;
            case '\x9c': r += "U\xcc\x88"; i++; continue;
            case '\xa4': r += "a\xcc\x88"; i++; continue;
            case '\xb6': r += "o\xcc\x88"; i++; continue;
            case '\xbc': r += "u\xcc\x88"; i++; continue;
            }
        }
        r += s[i];
    }
    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
xorl %r15d, %r15d
leaq 0x11bfb(%rip), %r12     # 0x1b49a
leaq 0x11c00(%rip), %rbp     # 0x1b4a6
leaq 0x11be9(%rip), %r13     # 0x1b496
movq 0x8(%r14), %rdx
cmpq %rdx, %r15
jae 0x9951
movq (%r14), %rcx
movb (%rcx,%r15), %al
cmpb $-0x3d, %al
setne %sil
decq %rdx
cmpq %rdx, %r15
setae %dl
orb %sil, %dl
jne 0x9913
movzbl 0x1(%rcx,%r15), %ecx
cmpl $0xbc, %ecx
je 0x9937
movq %r12, %rsi
cmpl $0x96, %ecx
je 0x993e
cmpl $0x9c, %ecx
je 0x9920
cmpl $0xa4, %ecx
je 0x992e
cmpl $0xb6, %ecx
je 0x9929
cmpl $0x84, %ecx
jne 0x9913
movq %r13, %rsi
jmp 0x993e
movsbl %al, %esi
movq %rbx, %rdi
callq 0x53a0
jmp 0x9949
leaq 0x11b77(%rip), %rsi     # 0x1b49e
jmp 0x993e
movq %rbp, %rsi
jmp 0x993e
leaq 0x11b6d(%rip), %rsi     # 0x1b4a2
jmp 0x993e
leaq 0x11b6c(%rip), %rsi     # 0x1b4aa
movq %rbx, %rdi
callq 0x57c0
incq %r15
incq %r15
jmp 0x98ad
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x51f0
movq %r14, %rdi
callq 0x5730
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/MiscUtils.cpp
// Function: ut1::operator<<(std::ostream&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
std::ostream& operator<<(std::ostream& s, const std::vector<std::string>& v)
{
    s << "{";
    bool first = true;
    for (const auto& elem: v)
    {
        if (!first)
        {
            s << ", ";
        }
        else
        {
            first = false;
        }
        s << expandUnprintable(elem, '"', '"');
    }
    s << "}";
    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x11b1d(%rip), %rsi     # 0x1b4ae
callq 0x5400
movq (%r15), %r14
movq 0x8(%r15), %r13
movb $0x1, %al
leaq 0x8(%rsp), %r15
pushq $0x22
popq %rbp
leaq 0x117f7(%rip), %r12     # 0x1b1a5
cmpq %r13, %r14
je 0x99ec
testb $0x1, %al
jne 0x99c2
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5400
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebp, %ecx
callq 0x8d3c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x53c0
movq %r15, %rdi
callq 0x51f0
addq $0x20, %r14
xorl %eax, %eax
jmp 0x99ae
leaq 0x11abd(%rip), %rsi     # 0x1b4b0
movq %rbx, %rdi
callq 0x5400
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x51f0
movq %rbx, %rdi
callq 0x5730
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/MiscUtils.cpp
// Function: ut1::flushTty(std::ostream&)
std::ostream& flushTty(std::ostream& os)
{
    static int stdoutIsATty = -1;
    if (stdoutIsATty < 0)
    {
        stdoutIsATty = !!isatty(1);
    }

    // Do not flush stdout if os is not stdout.
    if (os.rdbuf() != std::cout.rdbuf())
    {
        return os;
    }

    // Flush stdout only if it is connected to a terminal.
    if (stdoutIsATty)
    {
        os << std::flush;
    }

    return os;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x21a1c(%rip), %ecx     # 0x2b448
testl %ecx, %ecx
jns 0x9a45
pushq $0x1
popq %rdi
callq 0x5710
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl %ecx, 0x21a03(%rip)     # 0x2b448
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq 0xe8(%rbx,%rax), %rax
movq 0x21555(%rip), %rdx     # 0x2afb0
movq (%rdx), %rsi
movq -0x18(%rsi), %rsi
cmpq 0xe8(%rdx,%rsi), %rax
setne %al
testl %ecx, %ecx
sete %cl
orb %al, %cl
jne 0x9a7e
movq %rbx, %rdi
callq 0x52f0
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/MiscUtils.cpp
// Function: ut1::readFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string readFile(const std::string& filename)
{
    std::ifstream is(filename, std::ios::in | std::ios::binary | std::ios::ate);
    if (!is)
    {
        throw std::runtime_error("readFile(" + filename + "): Error while opening file for reading.");
    }
    size_t size = is.tellg();
    is.seekg(0, is.beg);
    std::string r(size, '\0');
    is.read(&r[0], size);
    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x40(%rsp), %r15
pushq $0xe
popq %rdx
movq %r15, %rdi
callq 0x5690
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x60(%rsp,%rax)
jne 0x9b0e
leaq 0x40(%rsp), %rdi
callq 0x5700
movq %rax, %r14
leaq 0x40(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x55c0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x54d0
movq (%rbx), %rsi
leaq 0x40(%rsp), %rdi
movq %r14, %rdx
callq 0x5530
leaq 0x40(%rsp), %rdi
callq 0x50e0
movq %rbx, %rax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x5210
movq %rax, %rbx
leaq 0x11992(%rip), %rsi     # 0x1b4b2
movq %rsp, %rdi
movq %r14, %rdx
callq 0x7667
leaq 0x1198a(%rip), %rdx     # 0x1b4bc
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x76f8
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x56a0
xorl %ebp, %ebp
movq 0x21490(%rip), %rsi     # 0x2afe8
movq 0x21439(%rip), %rdx     # 0x2af98
movq %rbx, %rdi
callq 0x56f0
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x51f0
jmp 0x9b7c
movq %rax, %r14
movb $0x1, %bpl
movq %rsp, %rdi
callq 0x51f0
testb %bpl, %bpl
jne 0x9b8e
jmp 0x9bac
movq %rax, %r14
movq %rbx, %rdi
callq 0x5330
jmp 0x9bac
movq %rax, %r14
movq %rbx, %rdi
callq 0x51f0
jmp 0x9bac
jmp 0x9ba9
jmp 0x9ba9
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x50e0
movq %r14, %rdi
callq 0x5730
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/MiscUtils.cpp
// Function: ut1::writeFile(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 writeFile(const std::string& filename, const std::string& data)
{
    std::ofstream os(filename, std::ios::out | std::ios::binary | std::ios::trunc);
    if (!os)
    {
        throw std::runtime_error("writeFile(" + filename + "): Error while opneing file for writing.");
    }
    os.write(data.data(), data.size());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x48(%rsp), %r15
pushq $0x34
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x57f0
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x68(%rsp,%rax)
jne 0x9c1b
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
leaq 0x48(%rsp), %rdi
callq 0x5590
leaq 0x48(%rsp), %rdi
callq 0x5620
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x5210
movq %rax, %rbx
leaq 0x118b8(%rip), %rsi     # 0x1b4e5
leaq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x7667
leaq 0x118af(%rip), %rdx     # 0x1b4f0
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x76f8
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x56a0
xorl %ebp, %ebp
movq 0x2137f(%rip), %rsi     # 0x2afe8
movq 0x21328(%rip), %rdx     # 0x2af98
movq %rbx, %rdi
callq 0x56f0
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x51f0
jmp 0x9c8d
movq %rax, %r14
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x51f0
testb %bpl, %bpl
jne 0x9ca1
jmp 0x9cae
movq %rax, %r14
movq %rbx, %rdi
callq 0x5330
jmp 0x9cae
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x5620
movq %r14, %rdi
callq 0x5730
// File: /workspace/github_cpp_makefile_star2_O2/jovermann[P]streplace/src/MiscUtils.cpp
// Function: ut1::getFileType(std::filesystem::__cxx11::directory_entry const&, bool)
FileType getFileType(const std::filesystem::directory_entry& entry, bool followSymlinks)
{
    // First check for symlink.
    // is_symlink() never follows symlinks, while all other is_*() functions follow symlinks.
    if (entry.is_symlink())
    {
        // Report broken symlinks as symlink, even  when when following symlinks.
        if ((!followSymlinks) || (!entry.exists()))
        {
            return FT_SYMLINK;
        }
    }
    if (entry.is_regular_file())
    {
        return FT_REGULAR;
    }
    else if (entry.is_directory())
    {
        return FT_DIR;
    }
    else if (entry.is_fifo())
    {
        return FT_FIFO;
    }
    else if (entry.is_block_file())
    {
        return FT_BLOCK;
    }
    else if (entry.is_character_file())
    {
        return FT_CHAR;
    }
    else if (entry.is_socket())
    {
        return FT_SOCKET;
    }
    else
    {
        return FT_NON_EXISTING;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
callq 0x9ff8
testb %al, %al
je 0x9ce7
pushq $0x2
popq %rbp
testb %r14b, %r14b
je 0x9d34
movq %rbx, %rdi
callq 0xa010
testb %al, %al
je 0x9d34
movq %rbx, %rdi
callq 0xa020
xorl %ebp, %ebp
testb %al, %al
jne 0x9d34
movq %rbx, %rdi
callq 0xa02e
testb %al, %al
je 0x9d05
pushq $0x1
jmp 0x9d33
movq %rbx, %rdi
callq 0xa03c
testb %al, %al
je 0x9d15
pushq $0x3
jmp 0x9d33
movq %rbx, %rdi
callq 0xa04a
testb %al, %al
je 0x9d25
pushq $0x4
jmp 0x9d33
movq %rbx, %rdi
callq 0xa058
testb %al, %al
je 0x9d3b
pushq $0x5
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
callq 0xa066
movzbl %al, %ebp
xorl $0x7, %ebp
jmp 0x9d34