LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x15ea0(%rip), %rsi     # 0x214ae
movl $0x1, %edx
callq 0x54b0
movq (%r15), %r14
movq 0x8(%r15), %r13
cmpq %r13, %r14
je 0xb694
movb $0x1, %al
leaq 0x18(%rsp), %rbp
leaq 0x8(%rsp), %r15
leaq 0x15b6e(%rip), %r12     # 0x211a5
testb $0x1, %al
jne 0xb64b
movl $0x2, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x54b0
movq %r15, %rdi
movq %r14, %rsi
movl $0x22, %edx
movl $0x22, %ecx
callq 0xa49f
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x54b0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xb689
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5410
addq $0x20, %r14
xorl %eax, %eax
cmpq %r13, %r14
jne 0xb637
leaq 0x15e15(%rip), %rsi     # 0x214b0
movl $0x1, %edx
movq %rbx, %rdi
callq 0x54b0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xb6d4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5410
movq %rbx, %rdi
callq 0x5720
// File: /workspace/github_cpp_makefile_star2_O3/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 0x22d42(%rip), %ecx     # 0x2e428
testl %ecx, %ecx
jns 0xb701
movl $0x1, %edi
callq 0x5710
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl %ecx, 0x22d27(%rip)     # 0x2e428
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq 0xe8(%rbx,%rax), %rax
movq 0x22899(%rip), %rdx     # 0x2dfb0
movq (%rdx), %rsi
movq -0x18(%rsi), %rsi
cmpq 0xe8(%rdx,%rsi), %rax
setne %al
testl %ecx, %ecx
sete %cl
orb %al, %cl
jne 0xb73a
movq %rbx, %rdi
callq 0x52d0
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movq %r15, %rdi
movl $0xe, %edx
callq 0x5680
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x60(%rsp,%rax)
jne 0xb7cc
leaq 0x40(%rsp), %rdi
callq 0x56f0
movq %rax, %r14
leaq 0x40(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x55b0
leaq 0x10(%rbx), %r15
movq %r15, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x54e0
movq (%rbx), %rsi
leaq 0x40(%rsp), %rdi
movq %r14, %rdx
callq 0x5530
leaq 0x40(%rsp), %rdi
callq 0x50b0
movq %rbx, %rax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x51e0
movq %rax, %rbx
leaq 0x15cd2(%rip), %rsi     # 0x214b2
movq %rsp, %rdi
movq %r14, %rdx
callq 0x89cc
leaq 0x15cca(%rip), %rsi     # 0x214bc
movq %rsp, %rdi
callq 0x57c0
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0xb81b
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0xb828
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x5690
xorl %ebp, %ebp
movq 0x22790(%rip), %rsi     # 0x2dfe8
movq 0x22731(%rip), %rdx     # 0x2df90
movq %rbx, %rdi
callq 0x56e0
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0xb881
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5410
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb89c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5410
testb %bpl, %bpl
jne 0xb8c6
jmp 0xb8ef
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb8c6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5410
jmp 0xb8c6
movq %rax, %r14
movq %rbx, %rdi
callq 0x5310
jmp 0xb8ef
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0xb8ef
movq (%r15), %rsi
incq %rsi
callq 0x5410
jmp 0xb8ef
jmp 0xb8ec
jmp 0xb8ec
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x50b0
movq %r14, %rdi
callq 0x5720
// File: /workspace/github_cpp_makefile_star2_O3/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
movq %r15, %rdi
movq %r14, %rsi
movl $0x34, %edx
callq 0x57e0
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x68(%rsp,%rax)
jne 0xb988
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
leaq 0x48(%rsp), %rdi
callq 0x5580
movq 0x22631(%rip), %rax     # 0x2df80
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x50(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x48(%rsp,%rcx)
callq 0x5380
leaq 0x140(%rsp), %rdi
callq 0x5130
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x51e0
movq %rax, %rbx
leaq 0x15b49(%rip), %rsi     # 0x214e5
leaq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x89cc
leaq 0x15b40(%rip), %rsi     # 0x214f0
leaq 0x8(%rsp), %rdi
callq 0x57c0
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0xb9db
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0xb9e8
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x5690
xorl %ebp, %ebp
movq 0x225d0(%rip), %rsi     # 0x2dfe8
movq 0x22571(%rip), %rdx     # 0x2df90
movq %rbx, %rdi
callq 0x56e0
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0xba41
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5410
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xba5c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5410
testb %bpl, %bpl
jne 0xba86
jmp 0xba93
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xba86
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5410
jmp 0xba86
movq %rax, %r14
movq %rbx, %rdi
callq 0x5310
jmp 0xba93
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x5610
movq %r14, %rdi
callq 0x5720
// File: /workspace/github_cpp_makefile_star2_O3/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
movb 0x28(%rdi), %al
testb %al, %al
jne 0xbabe
movq %rbx, %rdi
callq 0x56d0
cmpb $0x3, %al
jne 0xbaef
movl $0x2, %ebp
testb %r14b, %r14b
je 0xbba6
movzbl 0x28(%rbx), %eax
cmpl $0x3, %eax
je 0xbadd
testl %eax, %eax
jne 0xbae5
movq %rbx, %rdi
callq 0x5180
decb %al
cmpb $-0x3, %al
ja 0xbba6
movzbl 0x28(%rbx), %eax
cmpl $0x3, %eax
je 0xbafc
testl %eax, %eax
jne 0xbb04
movq %rbx, %rdi
callq 0x5180
xorl %ebp, %ebp
cmpb $0x1, %al
je 0xbba6
movzbl 0x28(%rbx), %eax
cmpl $0x3, %eax
je 0xbb1b
testl %eax, %eax
jne 0xbb23
movq %rbx, %rdi
callq 0x5180
movl $0x1, %ebp
cmpb $0x2, %al
je 0xbba6
movzbl 0x28(%rbx), %eax
cmpl $0x3, %eax
je 0xbb39
testl %eax, %eax
jne 0xbb41
movq %rbx, %rdi
callq 0x5180
movl $0x3, %ebp
cmpb $0x6, %al
je 0xbba6
movzbl 0x28(%rbx), %eax
cmpl $0x3, %eax
je 0xbb57
testl %eax, %eax
jne 0xbb5f
movq %rbx, %rdi
callq 0x5180
movl $0x4, %ebp
cmpb $0x4, %al
je 0xbba6
movzbl 0x28(%rbx), %eax
cmpl $0x3, %eax
je 0xbb75
testl %eax, %eax
jne 0xbb7d
movq %rbx, %rdi
callq 0x5180
movl $0x5, %ebp
cmpb $0x5, %al
je 0xbba6
movzbl 0x28(%rbx), %eax
cmpl $0x3, %eax
je 0xbb93
testl %eax, %eax
jne 0xbb9b
movq %rbx, %rdi
callq 0x5180
xorl %ebp, %ebp
cmpb $0x7, %al
sete %bpl
xorl $0x7, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jovermann[P]streplace/src/MiscUtils.cpp
// Function: ut1::getFileType(std::filesystem::__cxx11::path const&, bool)
FileType getFileType(const std::filesystem::path& entry, bool followSymlinks)
{
    // First check for symlink.
    // is_symlink() never follows symlinks, while all other is_*() functions follow symlinks.
    if (std::filesystem::is_symlink(entry))
    {
        // Report broken symlinks as symlink, even when following symlinks.
        if ((!followSymlinks) || (!std::filesystem::exists(entry)))
        {
            return FT_SYMLINK;
        }
    }
    if (std::filesystem::is_regular_file(entry))
    {
        return FT_REGULAR;
    }
    else if (std::filesystem::is_directory(entry))
    {
        return FT_DIR;
    }
    else if (std::filesystem::is_fifo(entry))
    {
        return FT_FIFO;
    }
    else if (std::filesystem::is_block_file(entry))
    {
        return FT_BLOCK;
    }
    else if (std::filesystem::is_character_file(entry))
    {
        return FT_CHAR;
    }
    else if (std::filesystem::is_socket(entry))
    {
        return FT_SOCKET;
    }
    else
    {
        return FT_NON_EXISTING;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
callq 0x56d0
cmpb $0x3, %al
jne 0xbbe0
movl $0x2, %ebp
testb %r14b, %r14b
je 0xbc45
movq %rbx, %rdi
callq 0x5180
testb %al, %al
je 0xbc45
movzbl %al, %eax
cmpl $0xff, %eax
je 0xbc45
movq %rbx, %rdi
callq 0x5180
xorl %ebp, %ebp
cmpb $0x1, %al
je 0xbc45
movq %rbx, %rdi
callq 0x5180
movl $0x1, %ebp
cmpb $0x2, %al
je 0xbc45
movq %rbx, %rdi
callq 0x5180
movl $0x3, %ebp
cmpb $0x6, %al
je 0xbc45
movq %rbx, %rdi
callq 0x5180
movl $0x4, %ebp
cmpb $0x4, %al
je 0xbc45
movq %rbx, %rdi
callq 0x5180
movl $0x5, %ebp
cmpb $0x5, %al
je 0xbc45
movq %rbx, %rdi
callq 0x5180
xorl %ebp, %ebp
cmpb $0x7, %al
sete %bpl
xorl $0x7, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jovermann[P]streplace/src/MiscUtils.cpp
// Function: ut1::getFileTypeStr[abi:cxx11](ut1::FileType)
std::string getFileTypeStr(FileType fileType)
{
    switch (fileType)
    {
    case FT_REGULAR: return "file";
    case FT_DIR: return "dir";
    case FT_SYMLINK: return "symlink";
    case FT_FIFO: return "fifo";
    case FT_BLOCK: return "block-device";
    case FT_CHAR: return "char-device";
    case FT_SOCKET: return "socket";
    case FT_NON_EXISTING: return "non-existing";
    }
    return "unknown-file-type";
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
cmpl $0x7, %esi
ja 0xbd0f
movl %esi, %eax
leaq 0x15772(%rip), %rcx     # 0x213f8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x16ea4(%rip), %rsi     # 0x22b3a
leaq 0x16ea1(%rip), %rdx     # 0x22b3e
jmp 0xbd1d
leaq 0x15878(%rip), %rsi     # 0x2151e
leaq 0x1587d(%rip), %rdx     # 0x2152a
jmp 0xbd1d
leaq 0x16e94(%rip), %rsi     # 0x22b4a
leaq 0x16e94(%rip), %rdx     # 0x22b51
jmp 0xbd1d
leaq 0x15853(%rip), %rsi     # 0x21519
leaq 0x15850(%rip), %rdx     # 0x2151d
jmp 0xbd1d
leaq 0x15868(%rip), %rsi     # 0x2153e
leaq 0x1586d(%rip), %rdx     # 0x2154a
jmp 0xbd1d
leaq 0x16e76(%rip), %rsi     # 0x22b5c
leaq 0x16e72(%rip), %rdx     # 0x22b5f
jmp 0xbd1d
leaq 0x15835(%rip), %rsi     # 0x2152b
leaq 0x15839(%rip), %rdx     # 0x21536
jmp 0xbd1d
leaq 0x15831(%rip), %rsi     # 0x21537
leaq 0x15830(%rip), %rdx     # 0x2153d
jmp 0xbd1d
leaq 0x15835(%rip), %rsi     # 0x2154b
leaq 0x1583f(%rip), %rdx     # 0x2155c
movq %rbx, %rdi
callq 0x9172
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/jovermann[P]streplace/src/streplace.cpp
// Function: Streplace::applyAllRules(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long*)
std::string applyAllRules(const std::string& input, size_t* numMatchesOut = nullptr)
    {
        std::string r = input;
        size_t numMatches = 0;
        for (Rule& rule: rules)
        {
            numMatches += applyRule(r, rule);
        }
        if (numMatchesOut)
        {
            *numMatchesOut = numMatches;
        }
        return r;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %rbp
movq %rbp, (%rdi)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
callq 0x90dc
movq 0x18(%r15), %r12
movq 0x20(%r15), %r13
cmpq %r13, %r12
je 0x11131
movq %rbp, (%rsp)
xorl %ebp, %ebp
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x11c02
addq %rax, %rbp
addq $0x48, %r12
cmpq %r13, %r12
jne 0x11115
jmp 0x11133
xorl %ebp, %ebp
testq %r14, %r14
je 0x1113b
movq %rbp, (%r14)
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
cmpq (%rsp), %rdi
je 0x11168
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x5410
movq %r14, %rdi
callq 0x5720
// File: /workspace/github_cpp_makefile_star2_O3/jovermann[P]streplace/src/streplace.cpp
// Function: Streplace::applyRule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, Rule&)
uint64_t applyRule(std::string& s, Rule& rule)
    {
        size_t numMatches = 0;

        s = ut1::regex_replace(s, std::regex(rule.lhs), [&](const std::smatch& match)
            { return replaceMatch(match, rule, numMatches); });

        rule.numMatches += numMatches;
        return numMatches;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x20(%rsp), %r13
movq $0x0, (%r13)
leaq 0x60(%rsp), %r12
movq %r12, %rdi
movq %rdx, %rsi
movl $0x10, %edx
callq 0x12050
movq %r15, 0x28(%rsp)
movq %rbx, 0x30(%rsp)
movq %r13, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x11cd2
leaq 0x40(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x5500
movq (%r15), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x11c99
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5410
leaq 0x60(%rsp), %rdi
callq 0x120b4
movq 0x20(%rsp), %rax
addq %rax, 0x40(%rbx)
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x120b4
movq %rbx, %rdi
callq 0x5720
// File: /workspace/github_cpp_makefile_star2_O3/jovermann[P]streplace/src/streplace.cpp
// Function: Streplace::skipDir(std::filesystem::__cxx11::path const&)
bool skipDir(const std::filesystem::path& dir)
    {
        if (all)
        {
            return false;
        }

        if (dir.filename() == ".git")
        {
            return true;
        }

        return false;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
cmpb $0x0, 0x2(%rdi)
je 0x20938
xorl %ebx, %ebx
jmp 0x209d7
movq %rsi, %rbx
movq 0x8(%rsi), %rcx
testq %rcx, %rcx
je 0x20991
movq 0x20(%rbx), %rax
testb $0x3, %al
je 0x20961
andl $0x3, %eax
cmpl $0x3, %eax
jne 0x20991
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x11082
jmp 0x20999
movq (%rbx), %rdx
cmpb $0x2f, -0x1(%rdx,%rcx)
je 0x20991
testb $0x3, %al
jne 0x2098b
leaq 0x20(%rbx), %rdi
callq 0x5290
movq 0x20(%rbx), %rcx
addq $-0x30, %rax
testb $0x3, %cl
cmoveq %rax, %rbx
movq 0x20(%rbx), %rax
notl %eax
testb $0x3, %al
je 0x20954
movq %rsp, %rdi
callq 0x11bda
leaq 0x214d(%rip), %rsi      # 0x22aed
leaq 0x28(%rsp), %rdi
movl $0x2, %edx
callq 0x209f6
movq %rsp, %r14
leaq 0x28(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x53e0
testl %eax, %eax
sete %bl
movq %r15, %rdi
callq 0xdfea
movq %r14, %rdi
callq 0xdfea
movl %ebx, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xdfea
movq %rbx, %rdi
callq 0x5720
// File: /workspace/github_cpp_makefile_star2_O3/jovermann[P]streplace/src/streplace.cpp
// Function: Streplace::getFileTypeStr(std::filesystem::__cxx11::directory_entry const&)
std::string getFileTypeStr(const std::filesystem::directory_entry& directoryEntry)
    {
        if ((!followLinks) && directoryEntry.is_symlink())
        {
            return "symlink";
        }
        else if (directoryEntry.is_regular_file())
        {
            return "file";
        }
        else if (directoryEntry.is_directory())
        {
            return "directory";
        }
        else if (directoryEntry.is_block_file())
        {
            return "block device";
        }
        else if (directoryEntry.is_character_file())
        {
            return "characters device";
        }
        else if (directoryEntry.is_fifo())
        {
            return "fifo";
        }
        else if (directoryEntry.is_socket())
        {
            return "socket";
        }
        else
        {
            // Will never get here.
            return "unknown file type";
        }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
cmpb $0x0, 0x1(%rsi)
jne 0x20abc
movb 0x28(%r14), %al
testb %al, %al
jne 0x20a9e
movq %r14, %rdi
callq 0x56d0
cmpb $0x3, %al
jne 0x20abc
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x209a(%rip), %rsi      # 0x22b4a
leaq 0x209a(%rip), %rdx      # 0x22b51
jmp 0x20bf9
movzbl 0x28(%r14), %eax
cmpl $0x3, %eax
je 0x20aca
testl %eax, %eax
jne 0x20ad2
movq %r14, %rdi
callq 0x5180
cmpb $0x1, %al
jne 0x20af0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x2056(%rip), %rsi      # 0x22b3a
leaq 0x2053(%rip), %rdx      # 0x22b3e
jmp 0x20bf9
movzbl 0x28(%r14), %eax
cmpl $0x3, %eax
je 0x20afe
testl %eax, %eax
jne 0x20b06
movq %r14, %rdi
callq 0x5180
cmpb $0x2, %al
jne 0x20b24
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x1fe4(%rip), %rsi      # 0x22afc
leaq 0x1fe6(%rip), %rdx      # 0x22b05
jmp 0x20bf9
movzbl 0x28(%r14), %eax
cmpl $0x3, %eax
je 0x20b32
testl %eax, %eax
jne 0x20b3a
movq %r14, %rdi
callq 0x5180
cmpb $0x4, %al
jne 0x20b58
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x1fba(%rip), %rsi      # 0x22b06
leaq 0x1fbf(%rip), %rdx      # 0x22b12
jmp 0x20bf9
movzbl 0x28(%r14), %eax
cmpl $0x3, %eax
je 0x20b66
testl %eax, %eax
jne 0x20b6e
movq %r14, %rdi
callq 0x5180
cmpb $0x5, %al
jne 0x20b89
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x1f93(%rip), %rsi      # 0x22b13
leaq 0x1f9d(%rip), %rdx      # 0x22b24
jmp 0x20bf9
movzbl 0x28(%r14), %eax
cmpl $0x3, %eax
je 0x20b97
testl %eax, %eax
jne 0x20b9f
movq %r14, %rdi
callq 0x5180
cmpb $0x6, %al
jne 0x20bba
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x968(%rip), %rsi       # 0x21519
leaq 0x965(%rip), %rdx       # 0x2151d
jmp 0x20bf9
movzbl 0x28(%r14), %eax
cmpl $0x3, %eax
je 0x20bc8
testl %eax, %eax
jne 0x20bd0
movq %r14, %rdi
callq 0x5180
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
cmpb $0x7, %al
jne 0x20beb
leaq 0x955(%rip), %rsi       # 0x21537
leaq 0x954(%rip), %rdx       # 0x2153d
jmp 0x20bf9
leaq 0x1f33(%rip), %rsi      # 0x22b25
leaq 0x1f3d(%rip), %rdx      # 0x22b36
movq %rbx, %rdi
callq 0x9172
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tylerkaraszewski[P]Argyle/Server.cpp
// Function: Server::initSocketList()
void Server::initSocketList()
{
  m_socketCount = 1;
  free(m_sockets);
  m_sockets = (struct pollfd*)malloc(sizeof(struct pollfd) * m_socketCount);
  if (m_sockets == 0)
  {
    m_logger.logError("InitSocketList malloc error: Out of Memory");
    exit(1);
  }
  m_sockets[0].fd = m_mainSocket;
  m_sockets[0].events = POLLIN;
  m_sockets[0].revents = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl $0x1, 0x10(%rdi)
movq 0x8(%rdi), %rdi
callq 0x3330
movslq 0x10(%rbx), %rdi
shlq $0x3, %rdi
callq 0x3380
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x499d
movl (%rbx), %ecx
movl %ecx, (%rax)
movl $0x1, 0x4(%rax)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x58(%rbx), %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x76c7(%rip), %rsi      # 0xc078
leaq 0x76ea(%rip), %rdx      # 0xc0a2
movq %rsp, %r14
movq %r14, %rdi
callq 0x513a
movq %rbx, %rdi
movq %r14, %rsi
callq 0xabae
movq %rsp, %rdi
callq 0x35a8
movl $0x1, %edi
callq 0x3350
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x49f9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x3520
nop
// File: /workspace/github_cpp_makefile_star2_O3/tylerkaraszewski[P]Argyle/Server.cpp
// Function: Server::watchSocket(int)
void Server::watchSocket(int socket)
{
  if (socket < 0)
  {
    // not a real socket, do nothing.
    return;
  }


  m_socketCount++;
  m_sockets = (struct pollfd*)realloc(m_sockets, sizeof(struct pollfd) * m_socketCount);
  if (m_sockets == 0)
  {
    // Try and log the error and close the socket. Maybe someone will free some RAM.
    // In all likelihood, we're hosed if we even get here, though.
    m_logger.logError("InitSocketList realloc error: Out of Memory");
    shutdown(socket, SHUT_RDWR);
    close(socket);
    return;
  }
  m_sockets[m_socketCount - 1].fd = socket;
  m_sockets[m_socketCount - 1].events = POLLIN;
  m_sockets[m_socketCount - 1].revents = 0;
  m_connections[socket] = new Connection(socket, m_logger, m_config);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %esi, 0xc(%rsp)
testl %esi, %esi
js 0x4c42
movl %esi, %ebx
movq %rdi, %r14
movslq 0x10(%rdi), %rax
leaq 0x1(%rax), %rcx
movl %ecx, 0x10(%rdi)
movq 0x8(%rdi), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x34d0
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x4be6
movslq 0x10(%r14), %rcx
movl %ebx, -0x8(%rax,%rcx,8)
movl $0x1, -0x4(%rax,%rcx,8)
movl $0x80, %edi
callq 0x3280
movq %rax, %r15
movq 0x58(%r14), %rdx
movq 0x60(%r14), %rcx
movq %rax, %rdi
movl %ebx, %esi
callq 0x52f4
addq $0x18, %r14
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x4d3a
movq %r15, (%rax)
jmp 0x4c42
movq 0x58(%r14), %r14
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x74a9(%rip), %rsi      # 0xc0a3
leaq 0x74cd(%rip), %rdx      # 0xc0ce
leaq 0x10(%rsp), %rdi
callq 0x513a
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0xabae
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4c2f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3290
movl %ebx, %edi
movl $0x2, %esi
callq 0x33a0
movl %ebx, %edi
callq 0x3580
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4c78
movq 0x20(%rsp), %rsi
incq %rsi
jmp 0x4c73
movq %rax, %rbx
jmp 0x4c78
movq %rax, %rbx
movl $0x80, %esi
movq %r15, %rdi
callq 0x3290
movq %rbx, %rdi
callq 0x3520
// File: /workspace/github_cpp_makefile_star2_O3/tylerkaraszewski[P]Argyle/Server.cpp
// Function: Server::~Server()
Server::~Server()
{
  vector<int> socketsToUnwatch;
  for (int i = 0; i < m_socketCount; ++i)
  {
    socketsToUnwatch.push_back(m_sockets[i].fd);
  }
  unwatchSockets(socketsToUnwatch);
  free(m_sockets);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
cmpl $0x0, 0x10(%rdi)
jle 0x4ced
xorl %r15d, %r15d
movq %rsp, %r14
xorl %r12d, %r12d
movq 0x8(%rbx), %rdx
addq %r15, %rdx
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x4cd5
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x4cdd
movq %r14, %rdi
callq 0x4dfa
incq %r12
movslq 0x10(%rbx), %rax
addq $0x8, %r15
cmpq %rax, %r12
jl 0x4cb3
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4a02
movq 0x8(%rbx), %rdi
callq 0x3330
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4d17
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
addq $0x18, %rbx
movq %rbx, %rdi
callq 0x4daa
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x4d31
movq %rax, %rdi
callq 0x4d9f
nop
// File: /workspace/github_cpp_makefile_star2_O3/tylerkaraszewski[P]Argyle/main.cpp
// Function: main
int main(int argc, char *argv[])
{
  signal(SIGPIPE, SIG_IGN);
  signal(SIGINT, sigHandler);
  signal(SIGTERM, sigHandler);

  if (daemon(0, 0) == -1)
  {
    return 5; // No logfiles yet.
  }

  Config config(configPath);
  Logger logger(config);
  logger.open();
  
  server = new Server(80, logger, config);
  if (!server->bindPort())
  {
    return 1;
  }
  if (!logger.open())
  {
    return 2;
  }
  else if (!setUser(config.getString(Config::S_KEY_RUN_AS_USERNAME).c_str(), logger))
  {
    return 3;
  }
  else if (!server->start())
  {
    return 4;
  }
  //@TODO: Set user back to root so Server destructor can clean up effectively (may not be nessecary?).
  delete server;
  server = NULL;
  logger.close();
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movl $0x1, %esi
movl $0xd, %edi
callq 0x3320
leaq -0x73c(%rip), %rbx      # 0x61bc
movl $0x2, %edi
movq %rbx, %rsi
callq 0x3320
movl $0xf, %edi
movq %rbx, %rsi
callq 0x3320
xorl %edi, %edi
xorl %esi, %esi
callq 0x3340
cmpl $-0x1, %eax
je 0x6a8b
movq 0x99bd(%rip), %rsi      # 0x102e8
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x6b04
leaq 0x38(%rsp), %rdi
movq %rsp, %rsi
callq 0xadc8
leaq 0x10(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x6960
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0x20(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0xa838
leaq 0x20(%rsp), %rdi
callq 0xa844
movl $0x68, %edi
callq 0x3280
movq %rax, %r14
leaq 0x20(%rsp), %rdx
leaq 0x38(%rsp), %rcx
movq %rax, %rdi
movl $0x50, %esi
callq 0x3a3c
movq %r14, 0x995c(%rip)      # 0x10300
movq %r14, %rdi
callq 0x3a80
movl $0x1, %ebx
testb %al, %al
je 0x6a61
leaq 0x20(%rsp), %rdi
callq 0xa844
movl $0x2, %ebx
testb %al, %al
je 0x6a61
leaq 0x9a11(%rip), %rdx      # 0x103e8
movq %rsp, %rdi
leaq 0x38(%rsp), %rsi
callq 0xb516
movq (%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x61cd
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x6a0a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
movl $0x3, %ebx
testb %bpl, %bpl
je 0x6a61
movq 0x98e5(%rip), %rdi      # 0x10300
callq 0x4076
movl $0x4, %ebx
testb %al, %al
je 0x6a61
movq 0x98d0(%rip), %rbx      # 0x10300
testq %rbx, %rbx
je 0x6a3d
movq %rbx, %rdi
callq 0x4c86
movl $0x68, %esi
movq %rbx, %rdi
callq 0x3290
movq $0x0, 0x98ab(%rip) # 0x10300
xorl %ebx, %ebx
leaq 0x20(%rsp), %rdi
callq 0xa922
leaq 0x58(%rsp), %r14
movq %r14, %rdi
callq 0x612a
movq -0x20(%r14), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x6a90
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x6a90
movl $0x5, %ebx
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x6af2
movq 0x10(%rsp), %rsi
incq %rsi
jmp 0x6ac3
jmp 0x6aef
movq %rax, %rbx
movl $0x68, %esi
movq %r14, %rdi
callq 0x3290
jmp 0x6af2
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6afc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x6afc
movq %rax, %rbx
jmp 0x6afc
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x6b42
movq %rbx, %rdi
callq 0x3520
// File: /workspace/github_cpp_makefile_star2_O3/tylerkaraszewski[P]Argyle/HttpRequest.cpp
// Function: HttpRequest::getHeader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
string HttpRequest::getHeader(const string& headerName) const
{
  string lcHeader = headerName;
  toLower(lcHeader);
  HeaderMap::const_iterator it = m_headers.find(lcHeader);
  if (it == m_headers.end())
  {
    return "";
  }
  else
  {
    return it->second;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x76da
movq 0x8(%r15), %r15
testq %r15, %r15
je 0x75a7
movq 0x8(%rsp), %r13
xorl %ebp, %ebp
movsbl (%r13,%rbp), %edi
callq 0x33d0
movb %al, (%r13,%rbp)
incq %rbp
cmpq %rbp, %r15
jne 0x758f
leaq 0x70(%r14), %rdi
leaq 0x8(%rsp), %rsi
callq 0x79b8
addq $0x78, %r14
cmpq %r14, %rax
je 0x75da
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x76da
jmp 0x75f3
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x4b78(%rip), %rdx      # 0xc160
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x513a
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x760a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x761e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x7638
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x3520
// File: /workspace/github_cpp_makefile_star2_O3/tylerkaraszewski[P]Argyle/HttpResponse.cpp
// Function: HttpResponse::unescapeUri(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string HttpResponse::unescapeUri(const string& escapedUri)
{
  string unescaped;
  if (escapedUri.size() == 0)
  {
    return unescaped;
  }
  for (size_t i = 0; i < escapedUri.size(); i++)
  {
    if (escapedUri[i] == '%')
    {
      if (escapedUri.size() >= (i + 3))
      {
        string escapedChar = escapedUri.substr(i + 1, 2);
        long value = strtol(escapedChar.c_str(), NULL, 16);
        unescaped += static_cast<unsigned char>(value);
        i += 2; // skip the encoded block now.
      }
      else
      {
        return unescaped; // Error, return what we've got.
      }
    }
    else
    {
      unescaped += escapedUri[i];
    }
  }
  return unescaped;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x8734
movq %rsi, %r14
leaq 0x18(%rsp), %r13
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
movq (%r14), %rcx
movb (%rcx,%rbp), %cl
cmpb $0x25, %cl
jne 0x871d
leaq 0x3(%rbp), %rcx
cmpq %rcx, %rax
jb 0x8734
leaq 0x1(%rbp), %rdx
movl $0x2, %ecx
movq %r15, %rdi
movq %r14, %rsi
callq 0x32b0
movq 0x8(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x33c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3220
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x8717
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3290
addq $0x2, %rbp
jmp 0x8728
movsbl %cl, %esi
movq %rbx, %rdi
callq 0x3220
incq %rbp
movq 0x8(%r14), %rax
cmpq %rax, %rbp
jb 0x86bc
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x8767
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x8767
jmp 0x8764
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x877b
movq (%r12), %rsi
incq %rsi
callq 0x3290
movq %r14, %rdi
callq 0x3520
nop
// File: /workspace/github_cpp_makefile_star2_O3/tylerkaraszewski[P]Argyle/HttpResponse.cpp
// Function: HttpResponse::isGone(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool HttpResponse::isGone(const string& path)
{
  if (
    (path == "/boat/rss.xml") ||
    (path == "/Sparrow.html") ||
    (path == "/atom.xml"))
  {
    return true;
  }
  return false;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3b4a(%rip), %rsi      # 0xc2db
callq 0x30d0
movb $0x1, %bpl
testl %eax, %eax
je 0x87c5
leaq 0x3b45(%rip), %rsi      # 0xc2e9
movq %rbx, %rdi
callq 0x30d0
testl %eax, %eax
je 0x87c5
leaq 0x3b40(%rip), %rsi      # 0xc2f7
movq %rbx, %rdi
callq 0x30d0
testl %eax, %eax
sete %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tylerkaraszewski[P]Argyle/HttpResponse.cpp
// Function: HttpResponse::pathLooksSafe(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool HttpResponse::pathLooksSafe(const string& path)
{
  if (path.size() == 0)
  {
    return false;
  }
  if (path[0] != '/')
  {
    return false;
  }
  if (path.find("/../") != path.npos)
  {
    return false;
  }
  for (size_t i = 0; i < path.size(); ++i)
  {
    if ((path[i] < 32) || (path[i] > 126))
    {
      return false;
    }
  }
  return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x8(%rdi)
je 0x8832
movq %rdi, %r14
movq (%rdi), %rax
cmpb $0x2f, (%rax)
jne 0x8832
leaq 0x3aeb(%rip), %rsi      # 0xc2d6
xorl %ebx, %ebx
movl $0x4, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x3500
cmpq $-0x1, %rax
jne 0x8834
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x883e
movq (%r14), %rcx
decq %rax
xorl %edx, %edx
movb (%rcx,%rdx), %sil
addb $-0x20, %sil
cmpb $0x5f, %sil
setb %bl
jae 0x8834
leaq 0x1(%rdx), %rsi
cmpq %rdx, %rax
movq %rsi, %rdx
jne 0x8813
jmp 0x8834
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movb $0x1, %bl
jmp 0x8834
// File: /workspace/github_cpp_makefile_star2_O3/tylerkaraszewski[P]Argyle/HttpResponse.cpp
// Function: HttpResponse::read(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long)
size_t HttpResponse::read(string& buffer, const size_t maxBytesToRead)
{
  size_t remaining = maxBytesToRead;
  if (!m_headerBuffer.empty())
  {
    string temp = m_headerBuffer.substr(0, maxBytesToRead);
    buffer.append(temp);
    remaining -= temp.size();
    if (remaining == 0)
    {
      return temp.size();
    }
  }
  return m_reader->read(buffer, remaining);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpq $0x0, 0x40(%rdi)
je 0x88dd
leaq 0x38(%r15), %rsi
leaq 0x8(%rsp), %r12
movq %r12, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x32b0
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r14, %rdi
callq 0x30f0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %r12
subq %r12, %rbx
cmpq %rax, %rdi
je 0x88d8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3290
testq %rbx, %rbx
je 0x88f0
movq 0x10(%r15), %rdi
movq (%rdi), %rax
movq %r14, %rsi
movq %rbx, %rdx
callq *0x10(%rax)
movq %rax, %r12
movq %r12, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x891d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x3520
nop
// File: /workspace/github_cpp_makefile_star2_O3/tylerkaraszewski[P]Argyle/FilenameResolver.cpp
// Function: FilenameResolver::resolveDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Config const&, long*)
string FilenameResolver::resolveDir(const string& dirPath, const Config& config, time_t* mtime)
{
  string temp;
  string rPath = dirPath;
  rPath = resolve(dirPath + "/main.html", config, temp, mtime);
  if (!rPath.empty())
  {
    return rPath;
  }

  return findNewestInDir(dirPath, config);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%rsi), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x76da
leaq 0x38(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x76da
leaq 0x35e2(%rip), %rsi      # 0xc30e
leaq 0x28(%rsp), %rdi
callq 0x3560
leaq 0x68(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x48(%rsp), %rcx
movq %r14, %rdx
movq %r12, %r8
callq 0x8a34
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %r12
movq %r12, %rsi
callq 0x3360
movq (%r12), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x8d7d
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
leaq 0x18(%rsp), %r12
je 0x8d99
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x8dc2
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq 0x8(%rsp), %rdx
cmpq %r12, %rdx
je 0x8de9
movq %rdx, (%rbx)
movq 0x18(%rsp), %rcx
movq %rcx, 0x10(%rbx)
jmp 0x8df1
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x8e84
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8df5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x8df5
movups (%r12), %xmm0
movups %xmm0, (%rcx)
movq %rax, 0x8(%rbx)
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x8e0c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8e41
jmp 0x8e25
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8e44
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x8e44
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8e65
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x8e65
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x8e7c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x3520
// File: /workspace/github_cpp_makefile_star2_O3/tylerkaraszewski[P]Argyle/FileReader.cpp
// Function: FileReader::readFromInternalBufferString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long)
size_t FileReader::readFromInternalBufferString(string& internalBuffer, string& externalBuffer, const size_t maxBytes)
{
  int bytesRead = 0;
  if (internalBuffer.size() != 0)
  {
    string temp = internalBuffer.substr(0, maxBytes);
    bytesRead = temp.size();
    internalBuffer = internalBuffer.substr(bytesRead);
    externalBuffer += temp;
  }
  return bytesRead;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
cmpq $0x0, 0x8(%rsi)
je 0x9dbe
movq %rdx, %r14
movq %rsi, %r15
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x32b0
movslq 0x8(%rbx), %rbx
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq $-0x1, %rcx
callq 0x32b0
leaq 0x28(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x3360
movq (%r12), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x9d8f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0x30f0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9dc0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x9dc0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x9dd1
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9def
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x3520
nop
// File: /workspace/github_cpp_makefile_star2_O3/tylerkaraszewski[P]Argyle/FileReader.cpp
// Function: FileReader::~FileReader()
FileReader::~FileReader()
{
  if (m_file)
  {
    if (fclose(m_file))
    {
      m_logger.logError("FileReader fclose error(" + Utils::llToString(errno) + "): " + strerror(errno));
    }
    m_file = NULL;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x5f0d(%rip), %rax      # 0xfd20
movq %rax, (%rdi)
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x9fd3
callq 0x3270
testl %eax, %eax
je 0x9fcb
movq 0x70(%rbx), %r14
callq 0x3040
movq %rax, %r15
movslq (%rax), %rsi
leaq 0x68(%rsp), %rdi
callq 0xabbc
leaq 0x25d0(%rip), %rcx      # 0xc420
leaq 0x68(%rsp), %rdi
movl $0x18, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x32e0
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9e8b
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x9e93
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2178(%rip), %rsi      # 0xc02e
callq 0x3560
leaq 0x38(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9ee2
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x9ee9
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %r12
movq %rdx, 0x8(%r12)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl (%r15), %edi
callq 0x3120
movq %r12, %rdi
movq %rax, %rsi
callq 0x3560
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9f40
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x9f47
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
callq 0xabae
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x9f82
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x9f99
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x9fb0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9fcb
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3290
movq $0x0, 0x20(%rbx)
movq 0x50(%rbx), %rdi
leaq 0x60(%rbx), %rax
cmpq %rax, %rdi
je 0x9feb
movq (%rax), %rsi
incq %rsi
callq 0x3290
movq 0x30(%rbx), %rdi
leaq 0x40(%rbx), %rax
cmpq %rax, %rdi
je 0xa003
movq (%rax), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x8a2e
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x4d9f
nop
// File: /workspace/github_cpp_makefile_star2_O3/tylerkaraszewski[P]Argyle/ErrorReader.cpp
// Function: ErrorReader::read(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long)
size_t ErrorReader::read(std::string& buffer, const size_t maxBytesToRead)
{
  if (maxBytesToRead < m_dataBuffer.size())
  {
    buffer.append(m_dataBuffer.substr(0, maxBytesToRead));
    m_dataBuffer = m_dataBuffer.substr(maxBytesToRead);
    m_bytesRead += maxBytesToRead;
    return maxBytesToRead;
  }
  int size = m_dataBuffer.size();
  buffer.append(m_dataBuffer);
  m_dataBuffer.clear();
  m_done = true;
  m_bytesRead += size;
  return size;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r12
movq %rdi, %rbx
movq 0x28(%rdi), %r15
cmpq %rdx, %r15
jbe 0xa790
movq %rdx, %r14
leaq 0x20(%rbx), %r15
movq %rsp, %r13
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x32b0
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r12, %rdi
callq 0x30f0
leaq 0x10(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0xa755
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq $-0x1, %rcx
callq 0x32b0
movq %r15, %rdi
movq %r12, %rsi
callq 0x3360
movq (%r12), %rdi
cmpq %r13, %rdi
je 0xa7b5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0xa7b5
movq 0x20(%rbx), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x30f0
movq $0x0, 0x28(%rbx)
movq 0x20(%rbx), %rax
movb $0x0, (%rax)
movb $0x1, 0x11(%rbx)
movslq %r15d, %r14
addq %r14, 0x18(%rbx)
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa7e8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x3520
// File: /workspace/github_cpp_makefile_star2_O3/tylerkaraszewski[P]Argyle/Logger.cpp
// Function: Logger::open()
bool Logger::open()
{
  string accessFilePath = m_config.getString(Config::S_KEY_ACCESS_FILE_PATH);
  string errorFilePath = m_config.getString(Config::S_KEY_ERROR_FILE_PATH);

  close();
  FILE* access = fopen(accessFilePath.c_str(), "a");
  if (access == NULL)
  {
    return false;
  }
  FILE* error = fopen(errorFilePath.c_str(), "a");
  if (error == NULL)
  {
    return false;
  }
  m_accessFile = access;
  m_errorFile = error;
  return true;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq (%rdi), %rsi
leaq 0x5b50(%rip), %rdx      # 0x103a8
leaq 0x8(%rsp), %rdi
callq 0xb516
movq (%rbx), %rsi
leaq 0x5b5c(%rip), %rdx      # 0x103c8
leaq 0x28(%rsp), %rdi
callq 0xb516
movq %rbx, %rdi
callq 0xa922
movq 0x8(%rsp), %rdi
leaq 0x1e78(%rip), %rsi      # 0xc702
callq 0x3310
testq %rax, %rax
je 0xa8b9
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x1e5f(%rip), %rsi      # 0xc702
callq 0x3310
testq %rax, %rax
je 0xa8b9
movq %r14, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movb $0x1, %bl
jmp 0xa8bb
xorl %ebx, %ebx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa8d6
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa8f1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3290
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa919
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x3520
nop
// File: /workspace/github_cpp_makefile_star2_O3/tylerkaraszewski[P]Argyle/Logger.cpp
// Function: Logger::close()
void Logger::close()
{
  if (m_accessFile != NULL)
  {
    fclose(m_accessFile);
    m_accessFile = NULL;
  }
  if (m_errorFile != NULL)
  {
    fclose(m_errorFile);
    m_errorFile = NULL;
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0xa93c
callq 0x3270
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xa952
callq 0x3270
movq $0x0, 0x10(%rbx)
popq %rbx
retq