LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::FromFormat(char const*, ...)
String String::FromFormat(const char *fcstr, ...)
{
    fcstr = fcstr ? fcstr : "";
    String str;
    va_list argptr;
    va_start(argptr, fcstr);
    str.FormatV(fcstr, argptr);
    va_end(argptr);
    return str;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
leaq 0x20(%rsp), %r10
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x157d0
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
testq %rsi, %rsi
leaq 0x7a0e(%rip), %rax      # 0x1d1e8
cmoveq %rax, %rsi
movq %rdi, %rbx
movq $0x0, (%rdi)
movq %rsp, %rdx
movq %r10, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
callq 0x1582e
movq %rbx, %rax
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x14ef4
movq %r14, %rdi
callq 0x3560
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::FormatV(char const*, __va_list_tag*)
void String::FormatV(const char *fcstr, va_list argptr)
{
    fcstr = fcstr ? fcstr : "";
    va_list argptr_cpy;
    va_copy(argptr_cpy, argptr);
    size_t length = vsnprintf(nullptr, 0u, fcstr, argptr);
    ReserveAndShift(false, Math::Surplus(length, GetLength()));
    vsprintf(_meta->CStr, fcstr, argptr_cpy);
    va_end(argptr_cpy);
    _meta->Length = length;
    _meta->CStr[_meta->Length] = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rcx
movq %rdi, %rbx
testq %rsi, %rsi
leaq 0x799f(%rip), %r14      # 0x1d1e8
cmovneq %rsi, %r14
movq 0x10(%rdx), %rax
movq %rax, 0x10(%rsp)
movups (%rdx), %xmm0
movaps %xmm0, (%rsp)
xorl %r15d, %r15d
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rdx
callq 0x3230
movq (%rbx), %rcx
testq %rcx, %rcx
je 0x15878
movq 0x10(%rcx), %r15
movslq %eax, %r12
xorl %edx, %edx
movq %r12, %rax
subq %r15, %rax
cmovaeq %rax, %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x150f6
movq (%rbx), %rax
movq 0x18(%rax), %rdi
movq %rsp, %rdx
movq %r14, %rsi
callq 0x31b0
movq (%rbx), %rax
movq %r12, 0x10(%rax)
movq (%rbx), %rax
movq 0x10(%rax), %rcx
movq 0x18(%rax), %rax
movb $0x0, (%rax,%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::LeftSection(char, bool) const
String String::LeftSection(char separator, bool exclude_separator) const
{
    if (_meta && separator)
    {
        size_t slice_at = FindChar(separator);
        if (slice_at != -1)
        {
            slice_at = exclude_separator ? slice_at : slice_at + 1;
            return Left(slice_at);
        }
    }
    return *this;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testb %dl, %dl
je 0x15bc4
cmpq $0x0, (%r14)
je 0x15bc4
movl %ecx, %ebp
movsbl %dl, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x15546
cmpq $-0x1, %rax
je 0x15bc4
xorb $0x1, %bpl
movzbl %bpl, %ecx
addq %rcx, %rax
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x15a2c
jmp 0x15bd6
movq $0x0, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x14da0
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::RightSection(char, bool) const
String String::RightSection(char separator, bool exclude_separator) const
{
    if (_meta && separator)
    {
        size_t slice_at = FindCharReverse(separator);
        if (slice_at != -1)
        {
            size_t count = exclude_separator ? _meta->Length - slice_at - 1 : _meta->Length - slice_at;
            return Right(count);
        }
    }
    return *this;
}

// Assembly:
pushq %rbx
movl %edx, %eax
movq %rdi, %rbx
movq (%rsi), %rdi
testq %rdi, %rdi
sete %dl
testb %al, %al
sete %r8b
orb %dl, %r8b
jne 0x15c49
movq 0x10(%rdi), %r8
decq %r8
movq $-0x1, %rdx
js 0x15c26
movq 0x18(%rdi), %r9
cmpb %al, (%r9,%r8)
je 0x15c23
leaq (%r9,%r8), %r10
decq %r10
decq %r8
cmpq %r9, %r10
jae 0x15c0c
jmp 0x15c26
movq %r8, %rdx
cmpq $-0x1, %rdx
je 0x15c49
movq %rdx, %rax
notq %rax
negq %rdx
testb %cl, %cl
cmovneq %rax, %rdx
addq 0x10(%rdi), %rdx
movq %rbx, %rdi
callq 0x15b08
jmp 0x15c58
movq $0x0, (%rbx)
movq %rbx, %rdi
callq 0x14da0
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::Section(char, unsigned long, unsigned long, bool, bool) const
String String::Section(char separator, size_t first, size_t last,
                          bool exclude_first_sep, bool exclude_last_sep) const
{
    if (!_meta || !separator)
    {
        return String();
    }

    size_t slice_from;
    size_t slice_to;
    if (FindSection(separator, first, last, exclude_first_sep, exclude_last_sep,
        slice_from, slice_to))
    {
        return Mid(slice_from, slice_to - slice_from);
    }
    return String();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
testb %dl, %dl
je 0x15cc6
movq %rsi, %r14
cmpq $0x0, (%rsi)
je 0x15cc6
movb 0x30(%rsp), %dil
leaq 0x8(%rsp), %r10
leaq 0x10(%rsp), %r11
movsbl %dl, %esi
movzbl %r9b, %eax
movzbl %dil, %r9d
movq %r14, %rdi
movq %rcx, %rdx
movq %r8, %rcx
movl %eax, %r8d
pushq %r10
pushq %r11
callq 0x1562c
addq $0x10, %rsp
testb %al, %al
je 0x15cc6
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rcx
subq %rdx, %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x15a90
jmp 0x15ccd
movq $0x0, (%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::Split(char) const
std::vector<String> String::Split(char separator) const
{
    std::vector<String> result;
    if (!_meta || !separator)
        return result;
    const char *ptr = _meta->CStr;
    while (*ptr)
    {
        const char *found_cstr = strchr(ptr, separator);
        if (!found_cstr) break;
        result.push_back(String(ptr, found_cstr - ptr));
        ptr = found_cstr + 1;
    }
    if (*ptr)
        result.push_back(String(ptr));
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %rax
testq %rax, %rax
sete %cl
testb %dl, %dl
sete %sil
orb %cl, %sil
jne 0x15da0
movq 0x18(%rax), %r15
movsbl %dl, %ebp
leaq 0x8(%rsp), %r14
cmpb $0x0, (%r15)
je 0x15d68
movq %r15, %rdi
movl %ebp, %esi
callq 0x3180
movq %rax, %r12
testq %rax, %rax
je 0x15d63
movq %r12, %rdx
subq %r15, %rdx
movq $0x0, 0x8(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x14e10
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1689c
movq %r14, %rdi
callq 0x14ef4
leaq 0x1(%r12), %r15
testq %r12, %r12
jne 0x15d19
cmpb $0x0, (%r15)
je 0x15da0
leaq 0x8(%rsp), %rdi
movq $0x0, (%rdi)
movq %r15, %rsi
movq $-0x1, %rdx
callq 0x14e10
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1689c
leaq 0x8(%rsp), %rdi
callq 0x14ef4
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x15db4
jmp 0x15dc3
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x14ef4
jmp 0x15dc6
movq %rax, %r14
movq %rbx, %rdi
callq 0x1685a
movq %r14, %rdi
callq 0x3560
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::Reserve(unsigned long)
void String::Reserve(size_t max_length)
{
    if (_meta)
    {
        if (max_length > _meta->Capacity)
        {
            // grow by 50%
            size_t grow_length = _meta->Capacity + (_meta->Capacity / 2);
            Copy(Math::Max(max_length, grow_length));
        }
    }
    else
    {
        Create(max_length);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x15e12
movq 0x8(%rax), %rax
cmpq %r14, %rax
jae 0x15e3d
movq %rax, %rsi
shrq %rsi
addq %rax, %rsi
cmpq %r14, %rsi
cmovbeq %r14, %rsi
movq %rbx, %rdi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x15e46
leaq 0x21(%r14), %rdi
callq 0x3040
movq %rax, (%rbx)
movq $0x1, (%rax)
movq %r14, 0x8(%rax)
movq $0x0, 0x10(%rax)
leaq 0x20(%rax), %rcx
movq %rcx, 0x18(%rax)
movb $0x0, 0x20(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::Copy(unsigned long, unsigned long)
void String::Copy(size_t max_length, size_t offset)
{
    if (!_meta)
    {
        return;
    }

    char *new_data = new char[sizeof(String::Header) + max_length + 1];
    // remember, that _meta->CStr may point to any address in buffer
    char *cstr_head = new_data + sizeof(String::Header) + offset;
    memcpy(new_data, _data, sizeof(String::Header));
    size_t copy_length = Math::Min(_meta->Length, max_length);
    memcpy(cstr_head, _meta->CStr, copy_length);
    Free();
    _data = new_data;
    _meta->RefCount = 1;
    _meta->Capacity = max_length;
    _meta->Length = copy_length;
    _meta->CStr = cstr_head;
    _meta->CStr[_meta->Length] = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rbp
testq %rbp, %rbp
je 0x15ed3
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x21(%rsi), %rdi
callq 0x3040
movq %rax, %r12
addq %r15, %rax
movq %rax, (%rsp)
leaq 0x20(%r12,%r15), %r15
movups (%rbp), %xmm0
movups 0x10(%rbp), %xmm1
movups %xmm0, (%r12)
movups %xmm1, 0x10(%r12)
movq 0x10(%rbp), %r13
movq 0x18(%rbp), %rsi
cmpq %rbx, %r13
cmovaeq %rbx, %r13
movq %r15, %rdi
movq %r13, %rdx
callq 0x3290
movq %r14, %rdi
callq 0x14ef4
movq %r12, (%r14)
movq $0x1, (%r12)
movq %rbx, 0x8(%r12)
movq %r13, 0x10(%r12)
movq %r15, 0x18(%r12)
movq (%rsp), %rax
movb $0x0, 0x20(%r13,%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::Create(unsigned long)
void String::Create(size_t max_length)
{
    _data = new char[sizeof(String::Header) + max_length + 1];
    _meta->RefCount = 1;
    _meta->Capacity = max_length;
    _meta->Length = 0;
    _meta->CStr = _data + sizeof(String::Header);
    _meta->CStr[_meta->Length] = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x21(%rsi), %rdi
callq 0x3040
movq %rax, (%r14)
movq $0x1, (%rax)
movq %rbx, 0x8(%rax)
movq $0x0, 0x10(%rax)
leaq 0x20(%rax), %rcx
movq %rcx, 0x18(%rax)
movb $0x0, 0x20(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::AppendChar(char)
void String::AppendChar(char c)
{
    if (c)
    {
        ReserveAndShift(false, 1);
        _meta->CStr[_meta->Length++] = c;
        _meta->CStr[_meta->Length] = 0;
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
testb %bpl, %bpl
je 0x15f95
movq %rdi, %rbx
movl $0x1, %edx
xorl %esi, %esi
callq 0x150f6
movq (%rbx), %rax
movq 0x10(%rax), %rcx
movq 0x18(%rax), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x10(%rax)
movb %bpl, (%rdx,%rcx)
movq (%rbx), %rax
movq 0x10(%rax), %rcx
movq 0x18(%rax), %rax
movb $0x0, (%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::ClipLeft(unsigned long)
void String::ClipLeft(size_t count)
{
    if (_meta && _meta->Length > 0 && count > 0)
    {
        count = Math::Min(count, _meta->Length);
        BecomeUnique();
        _meta->Length -= count;
        _meta->CStr += count;
    }
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x15fee
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x10(%rax), %rsi
testq %rsi, %rsi
sete %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
jne 0x15fe7
movq %rdi, %r14
cmpq %rbx, %rsi
cmovbq %rsi, %rbx
cmpq $0x2, (%rax)
jb 0x15fd9
movq %r14, %rdi
xorl %edx, %edx
callq 0x15e46
movq (%r14), %rax
subq %rbx, 0x10(%rax)
movq (%r14), %rax
addq %rbx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::ClipMid(unsigned long, unsigned long)
void String::ClipMid(size_t from, size_t count)
{
    if (_meta && from < _meta->Length)
    {
        count = Math::Min(count, _meta->Length - from);
        if (count > 0)
        {
            BecomeUnique();
            if (!from)
            {
                _meta->Length -= count;
                _meta->CStr += count;
            }
            else if (from + count == _meta->Length)
            {
                _meta->Length -= count;
                _meta->CStr[_meta->Length] = 0;
            }
            else
            {
                char *cstr_mid = _meta->CStr + from;
                memmove(cstr_mid, _meta->CStr + from + count, _meta->Length - from - count + 1);
                _meta->Length -= count;
            }
        }
    }
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x160ab
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq 0x10(%rax), %rsi
movq %rsi, %rcx
subq %r15, %rcx
jbe 0x160a6
movq %rdx, %rbx
cmpq %rdx, %rcx
cmovbq %rcx, %rbx
testq %rbx, %rbx
je 0x160a6
movq %rdi, %r14
cmpq $0x2, (%rax)
jb 0x1604c
movq %r14, %rdi
xorl %edx, %edx
callq 0x15e46
testq %r15, %r15
je 0x1607c
leaq (%rbx,%r15), %rsi
movq (%r14), %rax
movq 0x10(%rax), %rcx
movq %rcx, %rdx
subq %rsi, %rdx
jne 0x1608c
subq %rbx, %rcx
movq %rcx, 0x10(%rax)
movq (%r14), %rax
movq 0x10(%rax), %rcx
movq 0x18(%rax), %rax
movb $0x0, (%rax,%rcx)
jmp 0x160a6
movq (%r14), %rax
subq %rbx, 0x10(%rax)
movq (%r14), %rax
addq %rbx, 0x18(%rax)
jmp 0x160a6
addq 0x18(%rax), %r15
leaq (%r15,%rbx), %rsi
incq %rdx
movq %r15, %rdi
callq 0x3500
movq (%r14), %rax
subq %rbx, 0x10(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::ClipRight(unsigned long)
void String::ClipRight(size_t count)
{
    if (_meta && count > 0)
    {
        count = Math::Min(count, GetLength());
        BecomeUnique();
        _meta->Length -= count;
        _meta->CStr[_meta->Length] = 0;
    }
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
sete %cl
testq %rsi, %rsi
sete %dl
orb %cl, %dl
jne 0x16105
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rax), %rcx
cmpq %rsi, %rcx
cmovbq %rcx, %rbx
cmpq $0x2, (%rax)
jb 0x160e8
movq 0x10(%rax), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x15e46
movq (%r14), %rax
subq %rbx, 0x10(%rax)
movq (%r14), %rax
movq 0x10(%rax), %rcx
movq 0x18(%rax), %rax
movb $0x0, (%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::ClipLeftSection(char, bool)
void String::ClipLeftSection(char separator, bool include_separator)
{
    if (_meta && separator)
    {
        size_t slice_at = FindChar(separator);
        if (slice_at != -1)
        {
            ClipLeft(include_separator ? slice_at + 1 : slice_at);
        }
        else
            Empty();
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
testb %sil, %sil
je 0x16145
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x16145
movl %edx, %ebp
movsbl %sil, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x15546
cmpq $-0x1, %rax
je 0x1614c
movzbl %bpl, %ecx
addq %rcx, %rax
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x15f9c
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x14ffa
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::ClipRightSection(char, bool)
void String::ClipRightSection(char separator, bool include_separator)
{
    if (_meta && separator)
    {
        size_t slice_at = FindCharReverse(separator);
        if (slice_at != -1)
        {
            ClipRight(include_separator ? _meta->Length - slice_at : _meta->Length - slice_at - 1);
        }
        else
            Empty();
    }
}

// Assembly:
movl %esi, %eax
movq (%rdi), %rcx
testq %rcx, %rcx
sete %sil
testb %al, %al
sete %r8b
orb %sil, %r8b
jne 0x1619c
movq 0x10(%rcx), %r8
decq %r8
movq $-0x1, %rsi
js 0x161a0
movq 0x18(%rcx), %r9
cmpb %al, (%r9,%r8)
je 0x1619d
leaq (%r9,%r8), %r10
decq %r10
decq %r8
cmpq %r9, %r10
jae 0x16185
jmp 0x161a0
retq
movq %r8, %rsi
cmpq $-0x1, %rsi
je 0x161be
movq %rsi, %rax
notq %rax
negq %rsi
testb %dl, %dl
cmoveq %rax, %rsi
addq 0x10(%rcx), %rsi
jmp 0x160ac
jmp 0x14ffa
nop
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::ClipSection(char, unsigned long, unsigned long, bool, bool)
void String::ClipSection(char separator, size_t first, size_t last,
                              bool include_first_sep, bool include_last_sep)
{
    if (!_meta || !separator)
    {
        return;
    }

    size_t slice_from;
    size_t slice_to;
    if (FindSection(separator, first, last, !include_first_sep, !include_last_sep,
        slice_from, slice_to))
    {
        ClipMid(slice_from, slice_to - slice_from);
    }
}

// Assembly:
testb %sil, %sil
je 0x1621f
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x1621a
xorb $0x1, %r8b
xorb $0x1, %r9b
movq %rsp, %rax
leaq 0x8(%rsp), %r10
movsbl %sil, %esi
movzbl %r8b, %r8d
movzbl %r9b, %r9d
movq %rbx, %rdi
pushq %rax
pushq %r10
callq 0x1562c
addq $0x10, %rsp
testb %al, %al
je 0x1621a
movq 0x8(%rsp), %rsi
movq (%rsp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq 0x1600a
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::Prepend(char const*)
void String::Prepend(const char *cstr)
{
    if (cstr)
    {
        size_t length = strlen(cstr);
        if (length > 0)
        {
            ReserveAndShift(true, length);
            memcpy(_meta->CStr - length, cstr, length);
            _meta->Length += length;
            _meta->CStr -= length;
        }
    }
}

// Assembly:
testq %rsi, %rsi
je 0x162fc
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x31a0
testq %rax, %rax
je 0x162f7
movq %rax, %r15
movq %rbx, %rdi
movl $0x1, %esi
movq %rax, %rdx
callq 0x150f6
movq (%rbx), %rax
movq 0x18(%rax), %rdi
subq %r15, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3290
movq (%rbx), %rax
addq %r15, 0x10(%rax)
movq (%rbx), %rax
subq %r15, 0x18(%rax)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::PrependChar(char)
void String::PrependChar(char c)
{
    if (c)
    {
        ReserveAndShift(true, 1);
        _meta->Length++;
        _meta->CStr--;
        _meta->CStr[0] = c;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
testb %bl, %bl
je 0x16331
movq %rdi, %r14
movl $0x1, %edx
movl $0x1, %esi
callq 0x150f6
movq (%r14), %rax
incq 0x10(%rax)
movq (%r14), %rax
decq 0x18(%rax)
movq (%r14), %rax
movq 0x18(%rax), %rax
movb %bl, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::Replace(char, char)
void String::Replace(char what, char with)
{
    if (_meta && what && with && what != with)
    {
        BecomeUnique();
        char *rep_ptr = _meta->CStr;
        while (*rep_ptr)
        {
            if (*rep_ptr == what)
            {
                *rep_ptr = with;
            }
            rep_ptr++;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
cmpb %bl, %bpl
je 0x16390
testb %bl, %bl
je 0x16390
testb %bpl, %bpl
je 0x16390
movq %rdi, %r14
movq (%rdi), %rax
testq %rax, %rax
je 0x16390
cmpq $0x2, (%rax)
jb 0x1636f
movq 0x10(%rax), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x15e46
movq (%r14), %rax
movq 0x18(%rax), %rax
movb (%rax), %cl
testb %cl, %cl
je 0x16390
incq %rax
cmpb %bpl, %cl
jne 0x16387
movb %bl, -0x1(%rax)
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0x1637f
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::ReplaceMid(unsigned long, unsigned long, char const*)
void String::ReplaceMid(size_t from, size_t count, const char *cstr)
{
    if (!cstr)
        cstr = "";
    size_t length = strlen(cstr);
    Math::ClampLength(from, count, (size_t)0, GetLength());
    ReserveAndShift(false, Math::Surplus(length, count));
    memmove(_meta->CStr + from + length, _meta->CStr + from + count, GetLength() - (from + count) + 1);
    memcpy(_meta->CStr + from, cstr, length);
    _meta->Length += length - count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %rbx
testq %rcx, %rcx
leaq 0x6e34(%rip), %rdi      # 0x1d1e8
cmovneq %rcx, %rdi
movq %rdi, (%rsp)
callq 0x31a0
movq (%rbx), %rcx
testq %rcx, %rcx
je 0x163cf
movq 0x10(%rcx), %r12
jmp 0x163d2
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpq %r14, %r12
cmovbeq %r13, %rbp
cmovbq %r12, %r14
subq %r14, %r12
cmpq %r12, %rbp
cmovbq %rbp, %r12
movq %rax, %r15
movq %rax, %rbp
subq %r12, %rbp
movq %rbp, %rdx
cmovbq %r13, %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x150f6
movq (%rbx), %rax
movq 0x18(%rax), %rdi
testq %rax, %rax
je 0x16414
movq 0x10(%rax), %r13
addq %r14, %rdi
leaq (%rdi,%r12), %rsi
addq %r15, %rdi
addq %r14, %r12
subq %r12, %r13
incq %r13
movq %r13, %rdx
callq 0x3500
movq (%rbx), %rax
addq 0x18(%rax), %r14
movq %r14, %rdi
movq (%rsp), %rsi
movq %r15, %rdx
callq 0x3290
movq (%rbx), %rax
addq %rbp, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::TrimLeft(char)
void String::TrimLeft(char c)
{
    if (!_meta || !_meta->Length)
    {
        return;
    }

    const char *trim_ptr = _meta->CStr;
    for (;;)
    {
        auto t = *trim_ptr;
        if (t == 0) { break; }
        if (c && t != c) { break; }
        if (!c && !isspace(t)) { break; }
        trim_ptr++;
    }
    size_t trimmed = trim_ptr - _meta->CStr;
    if (trimmed > 0)
    {
        BecomeUnique();
        _meta->Length -= trimmed;
        _meta->CStr += trimmed;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r12
testq %r12, %r12
je 0x16549
movq 0x10(%r12), %r14
testq %r14, %r14
je 0x16549
movl %esi, %ebp
movq %rdi, %rbx
movq 0x18(%r12), %r13
movq %r13, %r15
testb %bpl, %bpl
sete %cl
movsbl (%r15), %edi
cmpb %bpl, %dil
sete %dl
xorl %eax, %eax
testb %dil, %dil
je 0x16518
orb %dl, %cl
je 0x16518
testb %bpl, %bpl
jne 0x16513
callq 0x3090
testl %eax, %eax
je 0x1651e
incq %r15
movb $0x1, %al
testb %al, %al
jne 0x164ea
jmp 0x16522
xorl %eax, %eax
jmp 0x16518
subq %r13, %r15
je 0x16549
cmpq $0x2, (%r12)
jb 0x1653b
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x15e46
movq (%rbx), %rax
subq %r15, 0x10(%rax)
movq (%rbx), %rax
addq %r15, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::TrimRight(char)
void String::TrimRight(char c)
{
    if (!_meta || !_meta->Length)
    {
        return;
    }

    const char *trim_ptr = _meta->CStr + _meta->Length - 1;
    for (;;) 
    {
        if (trim_ptr < _meta->CStr) { break; }
        auto t = *trim_ptr;
        if (c && t != c) { break; }
        if (!c && !isspace(t)) { break; }
        trim_ptr--;
    }
    size_t trimmed = (_meta->CStr + _meta->Length - 1) - trim_ptr;
    if (trimmed > 0)
    {
        BecomeUnique();
        _meta->Length -= trimmed;
        _meta->CStr[_meta->Length] = 0;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r12
testq %r12, %r12
je 0x165fd
movq 0x10(%r12), %rax
testq %rax, %rax
je 0x165fd
movl %esi, %ebp
movq %rdi, %rbx
movq 0x18(%r12), %r13
movq %rax, (%rsp)
leaq (%rax,%r13), %r14
movq $-0x1, %r15
leaq (%r14,%r15), %rax
cmpq %r13, %rax
jb 0x165c9
movb (%rax), %al
testb %bpl, %bpl
je 0x165af
cmpb %bpl, %al
je 0x165af
xorl %eax, %eax
jmp 0x165c5
testb %bpl, %bpl
jne 0x165c0
movsbl %al, %edi
callq 0x3090
testl %eax, %eax
je 0x165ab
decq %r15
movb $0x1, %al
testb %al, %al
jne 0x16596
cmpq $-0x1, %r15
movq (%rsp), %rsi
je 0x165fd
incq %r15
cmpq $0x2, (%r12)
jb 0x165e7
movq %rbx, %rdi
xorl %edx, %edx
callq 0x15e46
movq (%rbx), %rax
addq %r15, 0x10(%rax)
movq (%rbx), %rax
movq 0x10(%rax), %rcx
movq 0x18(%rax), %rax
movb $0x0, (%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::TruncateToLeft(unsigned long)
void String::TruncateToLeft(size_t count)
{
    if (_meta)
    {
        count = Math::Min(count, _meta->Length);
        if (count < _meta->Length)
        {
            BecomeUnique();
            _meta->Length = count;
            _meta->CStr[_meta->Length] = 0;
        }
    }
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x16658
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x10(%rax), %rsi
cmpq %rbx, %rsi
cmovbq %rsi, %rbx
jbe 0x16651
movq %rdi, %r14
cmpq $0x2, (%rax)
jb 0x1663b
movq %r14, %rdi
xorl %edx, %edx
callq 0x15e46
movq (%r14), %rax
movq %rbx, 0x10(%rax)
movq (%r14), %rax
movq 0x10(%rax), %rcx
movq 0x18(%rax), %rax
movb $0x0, (%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::TruncateToMid(unsigned long, unsigned long)
void String::TruncateToMid(size_t from, size_t count)
{
    if (_meta)
    {
        Math::ClampLength(from, count, (size_t)0, _meta->Length);
        if (from > 0 || count < _meta->Length)
        {
            BecomeUnique();
            _meta->Length = count;
            _meta->CStr += from;
            _meta->CStr[_meta->Length] = 0;
        }
    }
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x166cd
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x10(%rax), %rsi
xorl %ecx, %ecx
cmpq %rbx, %rsi
cmovaq %rdx, %rcx
cmovbq %rsi, %rbx
movq %rsi, %r15
subq %rbx, %r15
cmpq %r15, %rcx
cmovbq %rcx, %r15
testq %rbx, %rbx
sete %cl
cmpq %rsi, %r15
setae %dl
testb %dl, %cl
jne 0x166c8
movq %rdi, %r14
cmpq $0x2, (%rax)
jb 0x166ab
movq %r14, %rdi
xorl %edx, %edx
callq 0x15e46
movq (%r14), %rax
movq %r15, 0x10(%rax)
movq (%r14), %rax
addq %rbx, 0x18(%rax)
movq (%r14), %rax
movq 0x10(%rax), %rcx
movq 0x18(%rax), %rax
movb $0x0, (%rax,%rcx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::TruncateToRight(unsigned long)
void String::TruncateToRight(size_t count)
{
    if (_meta)
    {
        count = Math::Min(count, GetLength());
        if (count < _meta->Length)
        {
            BecomeUnique();
            _meta->CStr += _meta->Length - count;
            _meta->Length = count;
        }
    }
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x16719
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x10(%rax), %rsi
cmpq %rbx, %rsi
cmovbq %rsi, %rbx
jbe 0x16712
movq %rdi, %r14
cmpq $0x2, (%rax)
jb 0x166fd
movq %r14, %rdi
xorl %edx, %edx
callq 0x15e46
movq (%r14), %rax
movq 0x10(%rax), %rcx
subq %rbx, %rcx
addq %rcx, 0x18(%rax)
movq (%r14), %rax
movq %rbx, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::TruncateToLeftSection(char, bool)
void String::TruncateToLeftSection(char separator, bool exclude_separator)
{
    if (_meta && separator)
    {
        size_t slice_at = FindChar(separator);
        if (slice_at != -1)
        {
            TruncateToLeft(exclude_separator ? slice_at : slice_at + 1);
        }
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
testb %sil, %sil
je 0x1675d
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x1675d
movl %edx, %ebp
movsbl %sil, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x15546
cmpq $-0x1, %rax
je 0x1675d
xorb $0x1, %bpl
movzbl %bpl, %ecx
addq %rcx, %rax
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1660c
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::TruncateToRightSection(char, bool)
void String::TruncateToRightSection(char separator, bool exclude_separator)
{
    if (_meta && separator)
    {
        size_t slice_at = FindCharReverse(separator);
        if (slice_at != -1)
        {
            TruncateToRight(exclude_separator ? _meta->Length - slice_at - 1 : _meta->Length - slice_at);
        }
    }
}

// Assembly:
movl %esi, %eax
movq (%rdi), %rcx
testq %rcx, %rcx
sete %sil
testb %al, %al
sete %r8b
orb %sil, %r8b
jne 0x167c7
movq 0x10(%rcx), %r8
decq %r8
movq $-0x1, %rsi
js 0x167a9
movq 0x18(%rcx), %r9
cmpb %al, (%r9,%r8)
je 0x167a6
leaq (%r9,%r8), %r10
decq %r10
decq %r8
cmpq %r9, %r10
jae 0x1678f
jmp 0x167a9
movq %r8, %rsi
cmpq $-0x1, %rsi
je 0x167c7
movq %rsi, %rax
notq %rax
negq %rsi
testb %dl, %dl
cmovneq %rax, %rsi
addq 0x10(%rcx), %rsi
jmp 0x166ce
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::TruncateToSection(char, unsigned long, unsigned long, bool, bool)
void String::TruncateToSection(char separator, size_t first, size_t last,
                          bool exclude_first_sep, bool exclude_last_sep)
{
    if (!_meta || !separator)
    {
        return;
    }

    size_t slice_from;
    size_t slice_to;
    if (FindSection(separator, first, last, exclude_first_sep, exclude_last_sep,
        slice_from, slice_to))
    {
        TruncateToMid(slice_from, slice_to - slice_from);
    }
    else
    {
        Empty();
    }
}

// Assembly:
testb %sil, %sil
je 0x16825
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x16820
movq %rsp, %rax
leaq 0x8(%rsp), %r10
movsbl %sil, %esi
movzbl %r8b, %r8d
movzbl %r9b, %r9d
movq %rbx, %rdi
pushq %rax
pushq %r10
callq 0x1562c
addq $0x10, %rsp
testb %al, %al
je 0x16818
movq 0x8(%rsp), %rsi
movq (%rsp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq 0x1665a
jmp 0x16820
movq %rbx, %rdi
callq 0x14ffa
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/util_stream.cpp
// Function: AGS::Common::Stream::WriteByteCount(unsigned char, unsigned long)
size_t Stream::WriteByteCount(uint8_t b, size_t count)
{
    if (!CanWrite())
        return 0;
    size_t size = 0;
    for (; count > 0; --count, ++size)
    {
        if (WriteByte(b) < 0)
            break;
    }
    return size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movq (%rdi), %rax
callq *0x40(%rax)
xorl %r15d, %r15d
testq %rbx, %rbx
je 0x16a96
testb %al, %al
je 0x16a96
xorl %r15d, %r15d
movzbl %bpl, %ebp
movq (%r14), %rax
movq %r14, %rdi
movl %ebp, %esi
callq *0x68(%rax)
testl %eax, %eax
js 0x16a96
incq %r15
cmpq %r15, %rbx
jne 0x16a7c
movq %rbx, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/cs_compiler.cpp
// Function: ccAddDefaultHeader(char*, char*)
int ccAddDefaultHeader(char* nhead, char *nName)
{
    if (numheaders >= capacityHeaders)
    {
        capacityHeaders += 50;
        defaultheaders = (char**)realloc(defaultheaders, sizeof(char*) * capacityHeaders);
        defaultHeaderNames = (char**)realloc(defaultHeaderNames, sizeof(char*) * capacityHeaders);
    }

    defaultheaders[numheaders] = nhead;
    defaultHeaderNames[numheaders] = nName;
    numheaders++;
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x14bff(%rip), %r12     # 0x2b6b8
movslq 0x14bfc(%rip), %rax     # 0x2b6bc
cmpl %eax, %r12d
jl 0x16b03
leaq 0x32(%rax), %rcx
movl %ecx, 0x14bed(%rip)     # 0x2b6bc
movq 0xee0a(%rip), %rdi      # 0x258e0
leaq 0x190(,%rax,8), %r15
movq %r15, %rsi
callq 0x3520
movq %rax, 0xedf3(%rip)      # 0x258e0
movq 0xedf4(%rip), %rdi      # 0x258e8
movq %r15, %rsi
callq 0x3520
movq %rax, 0xede5(%rip)      # 0x258e8
movq 0xedd6(%rip), %rax      # 0x258e0
movq %r14, (%rax,%r12,8)
movq 0xedd3(%rip), %rax      # 0x258e8
movq %rbx, (%rax,%r12,8)
leal 0x1(%r12), %eax
movl %eax, 0x14b94(%rip)     # 0x2b6b8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/cc_macrotable.cpp
// Function: MacroTable::shutdown()
void MacroTable::shutdown() {
    int rr;
    for (rr=0;rr<num;rr++) {
        free(macro[rr]);
        free(name[rr]);
        macro[rr]=NULL;
        name[rr]=NULL;
    }
    num = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jle 0x16ec8
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x2ee8(%rbx,%r15,8), %rdi
callq 0x33c0
movq 0x8(%rbx,%r15,8), %rdi
callq 0x33c0
movq %r14, 0x2ee8(%rbx,%r15,8)
movq %r14, 0x8(%rbx,%r15,8)
incq %r15
movslq (%rbx), %rax
cmpq %rax, %r15
jl 0x16e99
movl $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/cc_macrotable.cpp
// Function: MacroTable::add(char*, char*)
void MacroTable::add(char*namm,char*mac) {
    if (find_name(namm) >= 0) {
        cc_error("macro '%s' already defined",namm);
        return;
    }
    if (num>=MAXDEFINES) {
        cc_error("too many macros defined");
        return;
    }
    name[num]=(char*)malloc(strlen(namm)+5);
    strcpy(name[num],namm);
    macro[num]=(char*)malloc(strlen(mac)+5);
    strcpy(macro[num],mac);
    size_t l = strlen(mac);
    // remove trailing whitespace, newlines and the like.
    // if a macro ends with a newline (as usual when passed from parser)
    // this would otherwise cause the expanded macro to mess up reported
    // linenumbers.
    while(l > 0 && isspace(macro[num][l-1]))
        macro[num][--l] = 0;
    num++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movslq (%rdi), %r12
testq %r12, %r12
jle 0x16f48
xorl %r13d, %r13d
movq 0x8(%rbx,%r13,8), %rsi
movq %r15, %rdi
callq 0x3450
testl %eax, %eax
je 0x16fee
incq %r13
cmpq %r13, %r12
jne 0x16f2b
cmpl $0x5dc, %r12d           # imm = 0x5DC
jl 0x16f68
leaq 0x61c7(%rip), %rdi      # 0x1d11f
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x10418
movq %r15, %rdi
callq 0x31a0
leaq 0x5(%rax), %rdi
callq 0x3440
movq %rax, 0x8(%rbx,%r12,8)
movq %rax, %rdi
movq %r15, %rsi
callq 0x32d0
movq %r14, %rdi
callq 0x31a0
leaq 0x5(%rax), %rdi
callq 0x3440
movq %rax, 0x2ee8(%rbx,%r12,8)
movq %rax, %rdi
movq %r14, %rsi
callq 0x32d0
movq %r14, %rdi
callq 0x31a0
testq %rax, %rax
je 0x16fe2
movq %rax, %r14
movslq (%rbx), %rax
movq 0x2ee8(%rbx,%rax,8), %r15
movsbl -0x1(%r15,%r14), %edi
callq 0x3090
testl %eax, %eax
je 0x16fe2
movb $0x0, -0x1(%r15,%r14)
decq %r14
jne 0x16fbd
incl (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x610f(%rip), %rdi      # 0x1d104
movq %r15, %rsi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x10418
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/cc_macrotable.cpp
// Function: MacroTable::find_name(char*)
int MacroTable::find_name(char* namm) {
    int ss;
    for (ss=0;ss<num;ss++) {
        if (strcmp(namm,name[ss])==0) return ss;
    }
    return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq (%rdi), %r12
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %r12, %r12
jle 0x17045
movq %rsi, %r14
movq %rdi, %r15
xorl %r13d, %r13d
movq 0x8(%r15,%r13,8), %rsi
movq %r14, %rdi
callq 0x3450
testl %eax, %eax
je 0x17042
incq %r13
cmpq %r13, %r12
jne 0x17027
jmp 0x17045
movl %r13d, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/cc_macrotable.cpp
// Function: MacroTable::remove(int)
void MacroTable::remove(int index) {
    if ((index < 0) || (index >= num)) {
        cc_error("MacroTable::Remove: index out of range");
        return;
    }
    // just blank out the entry, don't bother to remove it
    name[index][0] = 0;
    macro[index][0] = 0;
}

// Assembly:
testl %esi, %esi
js 0x17070
cmpl %esi, (%rdi)
jle 0x17070
movl %esi, %eax
movq 0x8(%rdi,%rax,8), %rcx
xorl %edx, %edx
movb %dl, (%rcx)
movq 0x2ee8(%rdi,%rax,8), %rax
movb %dl, (%rax)
retq
leaq 0x60c0(%rip), %rdi      # 0x1d137
xorl %eax, %eax
jmp 0x10418
nop
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/cs_prepro.cpp
// Function: get_next_word(char*, char*, bool)
void get_next_word(char*stin,char*wo, bool includeDots = false) {
  if (stin[0] == '\"') {
    // a string
    int breakout = 0;
//    char*oriwo=wo;
    wo[0] = stin[0];
    wo++; stin++;
    while (!breakout) {
      if ((stin[0] == '\"') && (stin[-1] != '\\')) breakout=1;
      if (stin[0] == 0) breakout = 1;
      wo[0] = stin[0];
      wo++; stin++;
      }
    wo[0] = 0;
//    printf("Word: '%s'\n",oriwo);
    return;
    }
  else if (stin[0] == '\'') {
    // a character constant
    int breakout = 0;
    wo[0] = stin[0];
    wo++; stin++;
    while (!breakout) {
      if ((stin[0] == '\'') && (stin[-1] != '\\')) breakout=1;
      if (stin[0] == 0) breakout = 1;
      wo[0] = stin[0];
      wo++; stin++;
      }
    wo[0] = 0;
    return;
  }

  while ((is_alphanum(stin[0])) || ((includeDots) && (stin[0] == '.'))) {
    wo[0] = stin[0];
    wo++;
    stin++;
  }

  wo[0]=0;
  return;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
cmpl $0x22, %eax
je 0x170c9
cmpl $0x27, %eax
jne 0x17101
movb %al, (%rbx)
incq %rbx
incq %r14
xorl %eax, %eax
movl $0x1, %ecx
movb (%r14), %dl
cmpb $0x27, %dl
jne 0x170b6
cmpb $0x5c, -0x1(%r14)
cmovnel %ecx, %eax
testb %dl, %dl
cmovel %ecx, %eax
movb %dl, (%rbx)
incq %rbx
incq %r14
testl %eax, %eax
je 0x170a6
jmp 0x170f9
movb %al, (%rbx)
incq %rbx
incq %r14
xorl %eax, %eax
movl $0x1, %ecx
movb (%r14), %dl
cmpb $0x22, %dl
jne 0x170e8
cmpb $0x5c, -0x1(%r14)
cmovnel %ecx, %eax
testb %dl, %dl
cmovel %ecx, %eax
movb %dl, (%rbx)
incq %rbx
incq %r14
testl %eax, %eax
je 0x170d8
movb $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movl %edx, %ebp
movsbl (%r14), %edi
callq 0x13f91
testl %eax, %eax
jne 0x1711b
testb %bpl, %bpl
je 0x170f9
cmpb $0x2e, (%r14)
jne 0x170f9
movb (%r14), %al
movb %al, (%rbx)
incq %rbx
incq %r14
jmp 0x17103
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/cs_prepro.cpp
// Function: pre_process_line(char*)
void pre_process_line(char*lin) {

  if (deletingCurrentLine()) {
    lin[0] = 0;
    return;
  }

  char*oldl=(char*)malloc(strlen(lin)+5);
  strcpy(oldl,lin);
  char*opt=oldl;
  char charBefore = 0;

  while (opt[0]!=0) {
    while (is_alphanum(opt[0])==0) {
      if (opt[0]==0) break;
      lin[0]=opt[0]; lin++; opt++; }

    if (opt > oldl)
      charBefore = opt[-1];
    else
      charBefore = 0;

    char thisword[MAX_LINE_LENGTH];
    get_next_word(opt,thisword);
    opt+=strlen(thisword);

    int fni = -1;
    if (charBefore != '.') {
      // object.member -- if member is a #define, it shouldn't be replaced
      fni = macros.find_name(thisword);
    }

    if (fni >= 0) {
      strcpy(lin,macros.macro[fni]);
      lin+=strlen(macros.macro[fni]);
    }
    else {
      strcpy(lin,thisword);
      lin+=strlen(thisword);
    }

  }
  free(oldl);
  lin[0]=0;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rdi, %rbx
movl 0x19bf9(%rip), %eax     # 0x31488
cmpl 0x19bf7(%rip), %eax     # 0x3148c
jg 0x1798e
movq %rbx, %rdi
callq 0x31a0
leaq 0x5(%rax), %rdi
callq 0x3440
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x32d0
cmpb $0x0, (%r14)
je 0x17986
movq %rsp, %r15
movq %r14, %r13
movsbl (%r13), %edi
callq 0x13f91
testl %eax, %eax
jne 0x178ef
movb (%r13), %al
testb %al, %al
je 0x178ef
movb %al, (%rbx)
incq %rbx
movsbl 0x1(%r13), %edi
incq %r13
jmp 0x178cf
cmpq %r14, %r13
jbe 0x178ff
cmpb $0x2e, -0x1(%r13)
sete %r12b
jmp 0x17902
xorl %r12d, %r12d
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x17080
movq %r15, %rdi
callq 0x31a0
movq %rax, %rbp
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %r12b, %r12b
jne 0x17933
leaq 0x13d95(%rip), %rdi     # 0x2b6c0
movq %r15, %rsi
callq 0x17008
testl %eax, %eax
js 0x17962
movl %eax, %r12d
leaq 0x13d7f(%rip), %rax     # 0x2b6c0
movq 0x2ee8(%rax,%r12,8), %rsi
movq %rbx, %rdi
callq 0x32d0
leaq 0x13d68(%rip), %rax     # 0x2b6c0
movq 0x2ee8(%rax,%r12,8), %rdi
jmp 0x17970
movq %rbx, %rdi
movq %r15, %rsi
callq 0x32d0
movq %r15, %rdi
addq %rbp, %r13
callq 0x31a0
addq %rax, %rbx
cmpb $0x0, (%r13)
jne 0x178ca
movq %r14, %rdi
callq 0x33c0
movb $0x0, (%rbx)
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/cs_prepro.cpp
// Function: cc_preprocess(char const*, char*)
void cc_preprocess(const char *inpu,char*outp) {
  reset_compiler();
  FMEM*temp=fmem_create();
  FMEM*iii=fmem_open(inpu);
  char linebuffer[1200];
  currentline=0;
  if_level = if_level_active = if_level_satisfied = 0;

  while (!fmem_eof(iii)) {
    fmem_gets(iii,linebuffer);
    currentline++;
    if (strlen(linebuffer) >= MAX_LINE_LENGTH) {  // stop array overflows in subroutines
      cc_error("line too long (%d chars max)", MAX_LINE_LENGTH);
      break; 
    }

    remove_comments(linebuffer);
    // need to check this, otherwise re-defining a macro causes
    // a big problem:
    // #define a int, #define a void  results in #define int void
    if (linebuffer[0]!='#')
      pre_process_line(linebuffer);
    if (ccError) break;
    if (linebuffer[0]=='#')
      pre_process_directive(linebuffer,temp);
    else {  // don't output the #define lines
//      printf("%s\n",linebuffer);
      fmem_puts(linebuffer,temp);
      }
    if (ccError) break;
    }

  strcpy(outp,temp->data);
  fmem_close(temp);
  fmem_close(iii);

  if ((if_level) && (!ccError))
    cc_error("missing #endif");

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4b8, %rsp            # imm = 0x4B8
movq %rsi, %rbx
movq %rdi, %r15
leaq 0xdcff(%rip), %r13      # 0x256c0
xorl %r12d, %r12d
movl %r12d, (%r13)
movl %r12d, 0x19ac5(%rip)    # 0x31494
leaq 0xddca(%rip), %rbp      # 0x257a0
movl %r12d, (%rbp)
callq 0x132f0
movq %rax, %r14
movq %r15, %rdi
callq 0x1333f
movq %rax, %r15
movl %r12d, (%rbp)
movl %r12d, 0x19a98(%rip)    # 0x31490
movl %r12d, 0x19a8d(%rip)    # 0x3148c
movl %r12d, 0x19a82(%rip)    # 0x31488
movq %rsp, %r12
movq %r15, %rdi
callq 0x1350f
testl %eax, %eax
jne 0x17a8a
movq %r15, %rdi
movq %r12, %rsi
callq 0x1351d
incl (%rbp)
movq %r12, %rdi
callq 0x31a0
cmpq $0x1f4, %rax            # imm = 0x1F4
jae 0x17a77
movq %r12, %rdi
callq 0x1765e
cmpb $0x23, (%rsp)
je 0x17a49
movq %r12, %rdi
callq 0x17875
cmpl $0x0, (%r13)
jne 0x17a8a
cmpb $0x23, (%rsp)
jne 0x17a63
movq %r12, %rdi
movq %r14, %rsi
callq 0x17185
jmp 0x17a6e
movq %r12, %rdi
movq %r14, %rsi
callq 0x13473
cmpl $0x0, (%r13)
je 0x17a09
jmp 0x17a8a
leaq 0x581c(%rip), %rdi      # 0x1d29a
movl $0x1f4, %esi            # imm = 0x1F4
xorl %eax, %eax
callq 0x10418
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x32d0
movq %r14, %rdi
callq 0x133a1
movq %r15, %rdi
callq 0x133a1
cmpl $0x0, 0x199dc(%rip)     # 0x31488
je 0x17ac3
cmpl $0x0, (%r13)
jne 0x17ac3
leaq 0x57fb(%rip), %rdi      # 0x1d2b7
xorl %eax, %eax
callq 0x10418
addq $0x4b8, %rsp            # imm = 0x4B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/tokenizer.c
// Function: tokenizer_peek
int tokenizer_peek(struct tokenizer *t) {
	if(t->peeking) return t->peek_token.value;
	int ret = tokenizer_getc(t);
	if(ret != EOF) tokenizer_ungetc(t, ret);
	return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
cmpl $0x0, 0x18(%rdi)
je 0x17b3b
movl 0x1184(%r14), %ebx
jmp 0x17b54
movq %r14, %rdi
callq 0x17b5e
movl %eax, %ebx
cmpl $-0x1, %eax
je 0x17b54
movq %r14, %rdi
movl %ebx, %esi
callq 0x17bab
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/tokenizer.c
// Function: tokenizer_getc
static int tokenizer_getc(struct tokenizer *t)
{
	int c;
	if(t->getc_buf.buffered) {
		t->getc_buf.buffered--;
		c = t->getc_buf.buf[(t->getc_buf.cnt) % ARRAY_SIZE(t->getc_buf.buf)];
	} else {
		c = getc(t->input);
		t->getc_buf.buf[t->getc_buf.cnt % ARRAY_SIZE(t->getc_buf.buf)] = c;
	}
	++t->getc_buf.cnt;
	return c;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x1150(%rdi), %rax
testq %rax, %rax
je 0x17b8a
decq %rax
movq %rax, 0x1150(%rbx)
movl 0x1148(%rbx), %eax
andl $0x7, %eax
movl 0x1128(%rbx,%rax,4), %eax
jmp 0x17ba2
movq (%rbx), %rdi
callq 0x3120
movl 0x1148(%rbx), %ecx
andl $0x7, %ecx
movl %eax, 0x1128(%rbx,%rcx,4)
incq 0x1148(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/tokenizer.c
// Function: tokenizer_ungetc
static int tokenizer_ungetc(struct tokenizer *t, int c)
{
	++t->getc_buf.buffered;
	assert(t->getc_buf.buffered<ARRAY_SIZE(t->getc_buf.buf));
	assert(t->getc_buf.cnt > 0);
	--t->getc_buf.cnt;
	assert(t->getc_buf.buf[t->getc_buf.cnt % ARRAY_SIZE(t->getc_buf.buf)] == c);
	return c;
}

// Assembly:
pushq %rax
movq 0x1150(%rdi), %rax
incq %rax
movq %rax, 0x1150(%rdi)
cmpq $0x8, %rax
jae 0x17be9
movq 0x1148(%rdi), %rax
testq %rax, %rax
je 0x17c08
decq %rax
movq %rax, 0x1148(%rdi)
andl $0x7, %eax
cmpl %esi, 0x1128(%rdi,%rax,4)
jne 0x17c27
movl %esi, %eax
popq %rcx
retq
leaq 0x58ea(%rip), %rdi      # 0x1d4da
leaq 0x576e(%rip), %rsi      # 0x1d365
leaq 0x590d(%rip), %rcx      # 0x1d50b
movl $0x16, %edx
callq 0x3240
leaq 0x592a(%rip), %rdi      # 0x1d539
leaq 0x574f(%rip), %rsi      # 0x1d365
leaq 0x58ee(%rip), %rcx      # 0x1d50b
movl $0x17, %edx
callq 0x3240
leaq 0x591f(%rip), %rdi      # 0x1d54d
leaq 0x5730(%rip), %rsi      # 0x1d365
leaq 0x58cf(%rip), %rcx      # 0x1d50b
movl $0x19, %edx
callq 0x3240
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/tokenizer.c
// Function: tokenizer_peek_token
int tokenizer_peek_token(struct tokenizer *t, struct token *tok) {
	int ret = tokenizer_next(t, tok);
	t->peek_token = *tok;
	t->peeking = 1;
	return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x17f24
movups (%rbx), %xmm0
movups %xmm0, 0x1178(%r14)
movl $0x1, 0x18(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/tokenizer.c
// Function: tokenizer_register_custom_token
void tokenizer_register_custom_token(struct tokenizer*t, int tokentype, const char* str) {
	assert(tokentype >= TT_CUSTOM && tokentype < TT_CUSTOM + MAX_CUSTOM_TOKENS);
	int pos = tokentype - TT_CUSTOM;
	t->custom_tokens[pos] = str;
	if(pos+1 > t->custom_count) t->custom_count = pos+1;
}

// Assembly:
leal -0x3e8(%rsi), %eax
cmpl $0x20, %eax
jae 0x17c96
movl %eax, %eax
movq %rdx, 0x20(%rdi,%rax,8)
addl $0xfffffc19, %esi       # imm = 0xFFFFFC19
cmpl 0x14(%rdi), %esi
jle 0x17c95
movl %esi, 0x14(%rdi)
retq
pushq %rax
leaq 0x5683(%rip), %rdi      # 0x1d321
leaq 0x56c0(%rip), %rsi      # 0x1d365
leaq 0x56c5(%rip), %rcx      # 0x1d371
movl $0x39, %edx
callq 0x3240