LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: rofl0r[P]ascc/cc_script.cpp
// Function: ccScript::ccScript()
ccScript::ccScript()
{
    globaldata          = nullptr;
    globaldatasize      = 0;
    code                = nullptr;
    codesize            = 0;
    strings             = nullptr;
    stringssize         = 0;
    fixuptypes          = nullptr;
    fixups              = nullptr;
    numfixups           = 0;
    importsCapacity     = 0;
    imports             = nullptr;
    numimports          = 0;
    exportsCapacity     = 0;
    exports             = nullptr;
    export_addr         = nullptr;
    numexports          = 0;
    instances           = 0;
    sectionNames        = nullptr;
    sectionOffsets      = nullptr;
    numSections         = 0;
    capacitySections    = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
leaq 0x1b065(%rip), %rcx     # 0x41d58
addq $0x10, %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movl $0x0, 0x10(%rax)
movq $0x0, 0x18(%rax)
movl $0x0, 0x20(%rax)
movq $0x0, 0x28(%rax)
movl $0x0, 0x30(%rax)
movq $0x0, 0x38(%rax)
movq $0x0, 0x40(%rax)
movl $0x0, 0x48(%rax)
movl $0x0, 0x4c(%rax)
movq $0x0, 0x50(%rax)
movl $0x0, 0x58(%rax)
movl $0x0, 0x5c(%rax)
movq $0x0, 0x60(%rax)
movq $0x0, 0x68(%rax)
movl $0x0, 0x70(%rax)
movl $0x0, 0x74(%rax)
movq $0x0, 0x78(%rax)
movq $0x0, 0x80(%rax)
movl $0x0, 0x88(%rax)
movl $0x0, 0x8c(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rofl0r[P]ascc/cc_script.cpp
// Function: ccScript::GetSectionName(int)
const char* ccScript::GetSectionName(int32_t offs) {

    int i;
    for (i = 0; i < numSections; i++) {
        if (sectionOffsets[i] < offs)
            continue;
        break;
    }

    // if no sections in script, return unknown
    if (i == 0)
        return "(unknown section)";

    return sectionNames[i - 1];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x20(%rbp), %rcx
movl -0x18(%rbp), %eax
cmpl 0x88(%rcx), %eax
jge 0x2776f
movq -0x20(%rbp), %rax
movq 0x80(%rax), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x14(%rbp), %eax
jge 0x27762
jmp 0x27764
jmp 0x2776f
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x2773a
cmpl $0x0, -0x18(%rbp)
jne 0x27782
leaq 0xc832(%rip), %rax      # 0x33fae
movq %rax, -0x8(%rbp)
jmp 0x2779b
movq -0x20(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x18(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: rofl0r[P]ascc/./myfilestream.h
// Function: FileWriteStream::WriteArrayOfInt32(int const*, unsigned long)
inline size_t WriteArrayOfInt32(const int32_t *buffer, size_t count)
	{
		return
			MustSwapBytes() ?
				WriteAndConvertArrayOfInt32(buffer, count) :
			WriteArray(buffer, sizeof(int32_t), count);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x278d0
cmpl $0x0, %eax
je 0x2789d
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x27900
movq %rax, -0x28(%rbp)
jmp 0x278b7
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rcx
movl $0x4, %edx
callq 0x27820
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: rofl0r[P]ascc/./myfilestream.h
// Function: FileWriteStream::WriteAndConvertArrayOfInt32(int const*, unsigned long)
inline size_t WriteAndConvertArrayOfInt32(const int32_t *buffer, size_t count) {
		int32_t v;
		for (unsigned i=0; i<count; ++i) {
			v = end_htole32(buffer[i]);
			Write(&v, 4);
		}
		return count;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpq -0x18(%rbp), %rax
jae 0x27956
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
leaq -0x1c(%rbp), %rsi
movl $0x4, %edx
callq 0x277b0
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x27923
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
// File: rofl0r[P]ascc/util_string_compat.c
// Function: ags_strlwr
char *ags_strlwr(char *s)
{
    char *p = s;
    for (; *p; p++)
        *p = tolower(*p);
    return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x2799f
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x4560
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x27974
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: rofl0r[P]ascc/util_string_compat.c
// Function: ags_strupr
char *ags_strupr(char *s)
{
    char *p = s;
    for (; *p; p++)
        *p = toupper(*p);
    return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x279ef
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x46c0
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x279c4
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::operator=(AGS::Common::String const&)
String &String::operator=(const String& str)
{
    if (_data != str._data)
    {
        Free();
        if (str._data && str._meta->Length > 0)
        {
            _data = str._data;
            if (_meta)
            {
                _meta->RefCount++;
            }
        }
    }
    return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq (%rax), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
je 0x27b8e
movq -0x18(%rbp), %rdi
callq 0x27e10
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x27b8c
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x10(%rax)
jbe 0x27b8c
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
cmpq $0x0, (%rax)
je 0x27b8a
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x27b8c
jmp 0x27b8e
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::SetString(char const*, unsigned long)
void String::SetString(const char *cstr, size_t length)
{
    if (cstr)
    {
        length = Math::Min(length, strlen(cstr));
        if (length > 0)
        {
            ReserveAndShift(false, Math::Surplus(length, GetLength()));
            memcpy(_meta->CStr, cstr, length);
            _meta->Length = length;
            _meta->CStr[length] = 0;
        }
        else
        {
            Empty();
        }
    }
    else
    {
        Empty();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x27d0a
movq -0x10(%rbp), %rdi
callq 0x41d0
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x2ab90
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jbe 0x27cff
movq -0x30(%rbp), %rdi
callq 0x2ab50
movq %rax, -0x28(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x2ade0
movq -0x30(%rbp), %rdi
movq %rax, %rdx
xorl %esi, %esi
callq 0x281c0
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x4300
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rdx
movq (%rax), %rcx
movq %rdx, 0x10(%rcx)
movq (%rax), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x27d08
movq -0x30(%rbp), %rdi
callq 0x28040
jmp 0x27d13
movq -0x30(%rbp), %rdi
callq 0x28040
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::FillString(char, unsigned long)
void String::FillString(char c, size_t count)
{
    Empty();
    if (count > 0)
    {
        ReserveAndShift(false, count);
        memset(_meta->CStr, c, count);
        _meta->Length = count;
        _meta->CStr[count] = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x28040
cmpq $0x0, -0x18(%rbp)
jbe 0x27dd2
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rdx
xorl %esi, %esi
callq 0x281c0
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rdi
movsbl -0x9(%rbp), %eax
movq -0x18(%rbp), %rdx
movzbl %al, %esi
callq 0x4230
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rdx
movq (%rax), %rcx
movq %rdx, 0x10(%rcx)
movq (%rax), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::Free()
void String::Free()
{
    if (_meta)
    {
        assert(_meta->RefCount > 0);
        _meta->RefCount--;
        if (!_meta->RefCount)
        {
            delete [] _data;
        }
    }
    _data = nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, (%rax)
je 0x27e90
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, (%rax)
jbe 0x27e39
jmp 0x27e58
leaq 0xc20d(%rip), %rdi      # 0x3404d
leaq 0xc194(%rip), %rsi      # 0x33fdb
movl $0x271, %edx            # imm = 0x271
leaq 0xc20e(%rip), %rcx      # 0x34061
callq 0x4290
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq (%rcx), %rdx
addq $-0x1, %rdx
movq %rdx, (%rcx)
movq (%rax), %rax
cmpq $0x0, (%rax)
jne 0x27e8e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x27e8c
movq -0x18(%rbp), %rdi
callq 0x44e0
jmp 0x27e8e
jmp 0x27e90
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::Read(AGS::Common::Stream*, unsigned long, bool)
void String::Read(Stream *in, size_t max_chars, bool stop_at_limit)
{
    Empty();
    if (!in)
    {
        return;
    }
    if (max_chars == 0 && stop_at_limit)
    {
        return;
    }

    char buffer[1024];
    char *read_ptr = buffer;
    size_t read_size = 0;
    int ichar;
    do
    {
        ichar = in->ReadByte();
        read_size++;
        if (read_size > max_chars)
        {
            continue;
        }
        *read_ptr = (char)(ichar >= 0 ? ichar : 0);
        if (!*read_ptr || ((read_ptr - buffer) == (sizeof(buffer) - 1 - 1)))
        {
            buffer[sizeof(buffer) - 1] = 0;
            Append(buffer);
            read_ptr = buffer;
        }
        else
        {
            read_ptr++;
        }
    }
    while(ichar > 0 && !(stop_at_limit && read_size == max_chars));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x450, %rsp            # imm = 0x450
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x440(%rbp)
callq 0x28040
cmpq $0x0, -0x10(%rbp)
jne 0x27eea
jmp 0x2802a
cmpq $0x0, -0x18(%rbp)
jne 0x27efc
testb $0x1, -0x19(%rbp)
je 0x27efc
jmp 0x2802a
leaq -0x420(%rbp), %rax
movq %rax, -0x428(%rbp)
movq $0x0, -0x430(%rbp)
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movl %eax, -0x434(%rbp)
movq -0x430(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x430(%rbp)
movq -0x430(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x27f49
jmp 0x27fdb
cmpl $0x0, -0x434(%rbp)
jl 0x27f60
movl -0x434(%rbp), %eax
movl %eax, -0x444(%rbp)
jmp 0x27f6a
xorl %eax, %eax
movl %eax, -0x444(%rbp)
jmp 0x27f6a
movl -0x444(%rbp), %eax
movb %al, %cl
movq -0x428(%rbp), %rax
movb %cl, (%rax)
movq -0x428(%rbp), %rax
cmpb $0x0, (%rax)
je 0x27fa0
movq -0x428(%rbp), %rax
leaq -0x420(%rbp), %rcx
subq %rcx, %rax
cmpq $0x3fe, %rax            # imm = 0x3FE
jne 0x27fc7
movq -0x440(%rbp), %rdi
movb $0x0, -0x21(%rbp)
leaq -0x420(%rbp), %rsi
callq 0x28090
leaq -0x420(%rbp), %rax
movq %rax, -0x428(%rbp)
jmp 0x27fd9
movq -0x428(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x428(%rbp)
jmp 0x27fdb
xorl %eax, %eax
cmpl $0x0, -0x434(%rbp)
movb %al, -0x445(%rbp)
jle 0x2801c
xorl %eax, %eax
testb $0x1, -0x19(%rbp)
movb %al, -0x446(%rbp)
je 0x2800e
movq -0x430(%rbp), %rax
cmpq -0x18(%rbp), %rax
sete %al
movb %al, -0x446(%rbp)
movb -0x446(%rbp), %al
xorb $-0x1, %al
movb %al, -0x445(%rbp)
movb -0x445(%rbp), %al
testb $0x1, %al
jne 0x27f15
addq $0x450, %rsp            # imm = 0x450
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::Empty()
void String::Empty()
{
    if (_meta)
    {
        BecomeUnique();
        _meta->Length = 0;
        _meta->CStr[0] = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, (%rax)
je 0x2807c
movq -0x10(%rbp), %rdi
callq 0x29d40
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq $0x0, 0x10(%rcx)
movq (%rax), %rax
movq 0x18(%rax), %rax
movb $0x0, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::Append(char const*)
void String::Append(const char *cstr)
{
    if (cstr)
    {
        size_t length = strlen(cstr);
        if (length > 0)
        {
            ReserveAndShift(false, length);
            memcpy(_meta->CStr + _meta->Length, cstr, length);
            _meta->Length += length;
            _meta->CStr[_meta->Length] = 0;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x28118
movq -0x10(%rbp), %rdi
callq 0x41d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jbe 0x28116
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rdx
xorl %esi, %esi
callq 0x281c0
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq 0x18(%rcx), %rdi
movq (%rax), %rax
addq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x4300
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rdx
movq (%rcx), %rax
addq 0x10(%rax), %rdx
movq %rdx, 0x10(%rax)
movq (%rcx), %rax
movq 0x18(%rax), %rax
movq (%rcx), %rcx
movq 0x10(%rcx), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x28118
addq $0x20, %rsp
popq %rbp
retq
nop
// File: rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::ReadCount(AGS::Common::Stream*, unsigned long)
void String::ReadCount(Stream *in, size_t count)
{
    Empty();
    if (in && count > 0)
    {
        ReserveAndShift(false, count);
        count = in->Read(_meta->CStr, count);
        _meta->CStr[count] = 0;
        _meta->Length = strlen(_meta->CStr);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x28040
cmpq $0x0, -0x10(%rbp)
je 0x281ab
cmpq $0x0, -0x18(%rbp)
jbe 0x281ab
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rdx
xorl %esi, %esi
callq 0x281c0
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rdi
movq (%rax), %rax
movq 0x18(%rax), %rsi
movq -0x18(%rbp), %rdx
movq (%rdi), %rax
callq *0x50(%rax)
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, -0x18(%rbp)
movq (%rax), %rcx
movq 0x18(%rcx), %rcx
movq -0x18(%rbp), %rdx
movb $0x0, (%rcx,%rdx)
movq (%rax), %rax
movq 0x18(%rax), %rdi
callq 0x41d0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::WriteCount(AGS::Common::Stream*, unsigned long) const
void String::WriteCount(Stream *out, size_t count) const
{
    if (out)
    {
        size_t str_out_len = Math::Min(count - 1, GetLength());
        if (str_out_len > 0)
            out->Write(GetCStr(), str_out_len);
        size_t null_out_len = count - str_out_len;
        if (null_out_len > 0)
            out->WriteByteCount(0, null_out_len);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2847d
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x28(%rbp)
callq 0x2ab50
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2ab90
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0x28459
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
callq 0x6210
movq -0x48(%rbp), %rdi
movq %rax, %rsi
movq -0x20(%rbp), %rdx
movq (%rdi), %rax
callq *0x60(%rax)
movq -0x18(%rbp), %rax
subq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jbe 0x2847b
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rdx
xorl %esi, %esi
callq 0x2ba80
jmp 0x2847d
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::CompareRight(char const*, unsigned long) const
int String::CompareRight(const char *cstr, size_t count) const
{
    cstr = cstr ? cstr : "";
    count = count != -1 ? count : strlen(cstr);
    size_t off = Math::Min(GetLength(), count);
    return strncmp(GetCStr() + GetLength() - off, cstr, count);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2887d
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x2888a
leaq 0xb8e8(%rip), %rax      # 0x3416c
movq %rax, -0x38(%rbp)
jmp 0x2888a
movq -0x38(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $-0x1, -0x18(%rbp)
je 0x288a3
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x288b0
movq -0x10(%rbp), %rdi
callq 0x41d0
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, -0x18(%rbp)
callq 0x2ab50
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x2ab90
movq -0x30(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x20(%rbp)
callq 0x6210
movq -0x30(%rbp), %rdi
movq %rax, -0x48(%rbp)
callq 0x2ab50
movq -0x48(%rbp), %rdi
addq %rax, %rdi
xorl %eax, %eax
subq -0x20(%rbp), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x4210
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::CompareRightNoCase(char const*, unsigned long) const
int String::CompareRightNoCase(const char *cstr, size_t count) const
{
    cstr = cstr ? cstr : "";
    count = count != -1 ? count : strlen(cstr);
    size_t off = Math::Min(GetLength(), count);
    return ags_strnicmp(GetCStr() + GetLength() - off, cstr, count);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2894d
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x2895a
leaq 0xb818(%rip), %rax      # 0x3416c
movq %rax, -0x38(%rbp)
jmp 0x2895a
movq -0x38(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $-0x1, -0x18(%rbp)
je 0x28973
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x28980
movq -0x10(%rbp), %rdi
callq 0x41d0
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, -0x18(%rbp)
callq 0x2ab50
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x2ab90
movq -0x30(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x20(%rbp)
callq 0x6210
movq -0x30(%rbp), %rdi
movq %rax, -0x48(%rbp)
callq 0x2ab50
movq -0x48(%rbp), %rdi
addq %rax, %rdi
xorl %eax, %eax
subq -0x20(%rbp), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x27a30
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::FindChar(char, unsigned long) const
size_t String::FindChar(char c, size_t from) const
{
    if (_meta && c && from < _meta->Length)
    {
        const char * found_cstr = strchr(_meta->CStr + from, c);
        return found_cstr ? found_cstr - _meta->CStr : -1;
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, (%rax)
je 0x28a7d
cmpb $0x0, -0x11(%rbp)
je 0x28a7d
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq (%rcx), %rcx
cmpq 0x10(%rcx), %rax
jae 0x28a7d
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rdi
addq -0x20(%rbp), %rdi
movsbl -0x11(%rbp), %esi
callq 0x4180
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x28a66
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq (%rcx), %rcx
movq 0x18(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x28a73
movq $-0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x28a73
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x28a85
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::FindCharReverse(char, unsigned long) const
size_t String::FindCharReverse(char c, size_t from) const
{
    if (!_meta || !c)
    {
        return -1;
    }

    from = Math::Min(from, _meta->Length - 1);
    const char *seek_ptr = _meta->CStr + from;
    while (seek_ptr >= _meta->CStr)
    {
        if (*seek_ptr == c)
        {
            return seek_ptr - _meta->CStr;
        }
        seek_ptr--;
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, (%rax)
je 0x28aba
cmpb $0x0, -0x11(%rbp)
jne 0x28ac7
movq $-0x1, -0x8(%rbp)
jmp 0x28b52
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
subq $0x1, %rax
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x2ab90
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, -0x20(%rbp)
movq (%rax), %rax
movq 0x18(%rax), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movq (%rcx), %rcx
cmpq 0x18(%rcx), %rax
jb 0x28b4a
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
jne 0x28b3c
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movq (%rcx), %rcx
movq 0x18(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x28b52
movq -0x30(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x28b04
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: rofl0r[P]ascc/util_string.cpp
// Function: AGS::Common::String::FindString(char const*, unsigned long) const
size_t String::FindString(const char *cstr, size_t from) const
{
    if (_meta && cstr && from < _meta->Length)
    {
        const char * found_cstr = strstr(_meta->CStr + from, cstr);
        return found_cstr ? found_cstr - _meta->CStr : -1;
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, (%rax)
je 0x28bec
cmpq $0x0, -0x18(%rbp)
je 0x28bec
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq (%rcx), %rcx
cmpq 0x10(%rcx), %rax
jae 0x28bec
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rdi
addq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x40e0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x28bd5
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq (%rcx), %rcx
movq 0x18(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x28be2
movq $-0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x28be2
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x28bf4
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x100(%rbp)
movq %rdi, %r10
movq %r10, -0xf8(%rbp)
testb %al, %al
je 0x28edc
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x28f14
movq -0x10(%rbp), %rax
movq %rax, -0x108(%rbp)
jmp 0x28f24
leaq 0xb251(%rip), %rax      # 0x3416c
movq %rax, -0x108(%rbp)
jmp 0x28f24
movq -0x100(%rbp), %rdi
movq -0x108(%rbp), %rax
movq %rax, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x27ad0
movq -0x100(%rbp), %rdi
leaq -0xf0(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x30, -0x2c(%rbp)
movl $0x10, -0x30(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x28fd0
jmp 0x28f76
leaq -0x30(%rbp), %rax
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x28fac
jmp 0x28fa0
movq -0x100(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x27de0
jmp 0x28fbc
movq -0x100(%rbp), %rdi
callq 0x27de0
movq -0xf8(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x4670
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x28ffd
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x2900a
leaq 0xb168(%rip), %rax      # 0x3416c
movq %rax, -0x50(%rbp)
jmp 0x2900a
movq -0x50(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0x4280
movq -0x48(%rbp), %rdi
cltq
movq %rax, -0x38(%rbp)
callq 0x2ab50
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x2ade0
movq -0x48(%rbp), %rdi
movq %rax, %rdx
xorl %esi, %esi
callq 0x281c0
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x41f0
movq -0x48(%rbp), %rcx
leaq -0x30(%rbp), %rax
movq -0x38(%rbp), %rdx
movq (%rcx), %rax
movq %rdx, 0x10(%rax)
movq (%rcx), %rax
movq 0x18(%rax), %rax
movq (%rcx), %rcx
movq 0x10(%rcx), %rcx
movb $0x0, (%rax,%rcx)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x38(%rbp)
movb %cl, %al
movb %dl, %cl
movq %rdi, %rdx
movq %rdx, -0x30(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %cl, -0x11(%rbp)
andb $0x1, %al
movb %al, -0x12(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, (%rax)
je 0x29650
cmpb $0x0, -0x11(%rbp)
je 0x29650
movq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movsbl -0x11(%rbp), %esi
callq 0x289f0
movq %rax, -0x20(%rbp)
cmpq $-0x1, -0x20(%rbp)
je 0x2964e
testb $0x1, -0x12(%rbp)
je 0x29627
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x29633
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdx
callq 0x293c0
jmp 0x2965d
jmp 0x29650
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x27af0
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x40(%rbp)
movb %cl, %al
movb %dl, %cl
movq %rdi, %rdx
movq %rdx, -0x38(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %cl, -0x11(%rbp)
andb $0x1, %al
movb %al, -0x12(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, (%rax)
je 0x29719
cmpb $0x0, -0x11(%rbp)
je 0x29719
movq -0x30(%rbp), %rdi
movq $-0x1, %rdx
movsbl -0x11(%rbp), %esi
callq 0x28a90
movq %rax, -0x20(%rbp)
cmpq $-0x1, -0x20(%rbp)
je 0x29717
testb $0x1, -0x12(%rbp)
je 0x296e9
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
subq -0x20(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x296fc
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
subq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rsi
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdx
callq 0x29510
jmp 0x29726
jmp 0x29719
movq -0x30(%rbp), %rsi
movq -0x40(%rbp), %rdi
callq 0x27af0
movq -0x38(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
// File: 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 %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl %r9d, -0x6c(%rbp)
movq %rcx, %rax
movl -0x6c(%rbp), %ecx
movq %rax, -0x68(%rbp)
movl %edx, %eax
movq -0x68(%rbp), %rdx
movq %rsi, -0x60(%rbp)
movq %rdi, %r9
movq -0x60(%rbp), %rdi
movq %r9, -0x58(%rbp)
movb %al, %sil
movq %r9, %rax
movq %rax, -0x50(%rbp)
movb 0x10(%rbp), %al
movq %r9, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movb %sil, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
andb $0x1, %cl
movb %cl, -0x29(%rbp)
andb $0x1, %al
movb %al, -0x2a(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, (%rax)
je 0x2979e
cmpb $0x0, -0x11(%rbp)
jne 0x297a9
movq -0x58(%rbp), %rdi
callq 0x27ad0
jmp 0x29815
movq -0x48(%rbp), %rdi
movb -0x11(%rbp), %sil
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movb -0x29(%rbp), %r8b
movb -0x2a(%rbp), %r9b
leaq -0x38(%rbp), %r10
leaq -0x40(%rbp), %rax
andb $0x1, %r8b
andb $0x1, %r9b
movsbl %sil, %esi
movzbl %r8b, %r8d
movzbl %r9b, %r9d
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x28c00
testb $0x1, %al
jne 0x297f1
jmp 0x2980c
movq -0x48(%rbp), %rsi
movq -0x58(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
subq -0x38(%rbp), %rcx
callq 0x29460
jmp 0x29815
movq -0x58(%rbp), %rdi
callq 0x27ad0
movq -0x50(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x60(%rbp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, -0x58(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movb $0x0, -0x12(%rbp)
callq 0x2acf0
movq -0x50(%rbp), %rax
cmpq $0x0, (%rax)
je 0x29871
cmpb $0x0, -0x11(%rbp)
jne 0x29881
movb $0x1, -0x12(%rbp)
movl $0x1, -0x18(%rbp)
jmp 0x2996b
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x29917
movq -0x20(%rbp), %rdi
movsbl -0x11(%rbp), %esi
callq 0x4180
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x298b3
jmp 0x29917
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
subq %rsi, %rdx
leaq -0x30(%rbp), %rdi
callq 0x27c10
jmp 0x298c9
movq -0x60(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2ad10
jmp 0x298d8
leaq -0x30(%rbp), %rdi
callq 0x27de0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x29890
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x29984
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x27de0
jmp 0x29984
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x29960
movq -0x20(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x27ba0
jmp 0x2992f
movq -0x60(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x2ad10
jmp 0x2993e
leaq -0x48(%rbp), %rdi
callq 0x27de0
jmp 0x29960
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x27de0
jmp 0x29984
movb $0x1, -0x12(%rbp)
movl $0x1, -0x18(%rbp)
testb $0x1, -0x12(%rbp)
jne 0x2997a
movq -0x60(%rbp), %rdi
callq 0x2ad40
movq -0x58(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x2ad40
movq -0x38(%rbp), %rdi
callq 0x4670
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, (%rax)
je 0x29a0a
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rcx), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x29a08
movq -0x20(%rbp), %rcx
movq (%rcx), %rax
movq 0x8(%rax), %rax
movq (%rcx), %rcx
movq 0x8(%rcx), %rcx
shrq %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x2ada0
movq -0x20(%rbp), %rdi
movq (%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x29a20
jmp 0x29a17
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x29b30
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, (%rax)
jne 0x29a47
jmp 0x29b1b
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
addq $0x1, %rdi
callq 0x4040
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rcx
addq $0x20, %rcx
addq -0x18(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rcx
movq (%rax), %rdx
movq (%rdx), %rsi
movq %rsi, (%rcx)
movq 0x8(%rdx), %rsi
movq %rsi, 0x8(%rcx)
movq 0x10(%rdx), %rsi
movq %rsi, 0x10(%rcx)
movq 0x18(%rdx), %rdx
movq %rdx, 0x18(%rcx)
movq (%rax), %rdi
addq $0x10, %rdi
leaq -0x10(%rbp), %rsi
callq 0x2ab90
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq (%rax), %rax
movq 0x18(%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0x4300
movq -0x38(%rbp), %rdi
callq 0x27e10
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rax, (%rcx)
movq (%rcx), %rax
movq $0x1, (%rax)
movq -0x10(%rbp), %rdx
movq (%rcx), %rax
movq %rdx, 0x8(%rax)
movq -0x30(%rbp), %rdx
movq (%rcx), %rax
movq %rdx, 0x10(%rax)
movq -0x28(%rbp), %rdx
movq (%rcx), %rax
movq %rdx, 0x18(%rax)
movq (%rcx), %rax
movq 0x18(%rax), %rax
movq (%rcx), %rcx
movq 0x10(%rcx), %rcx
movb $0x0, (%rax,%rcx)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
addq $0x1, %rdi
callq 0x4040
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
movq (%rcx), %rax
movq $0x1, (%rax)
movq -0x10(%rbp), %rdx
movq (%rcx), %rax
movq %rdx, 0x8(%rax)
movq (%rcx), %rax
movq $0x0, 0x10(%rax)
movq (%rcx), %rdx
addq $0x20, %rdx
movq (%rcx), %rax
movq %rdx, 0x18(%rax)
movq (%rcx), %rax
movq 0x18(%rax), %rax
movq (%rcx), %rcx
movq 0x10(%rcx), %rcx
movb $0x0, (%rax,%rcx)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpb $0x0, -0x9(%rbp)
je 0x29ca7
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x281c0
movq -0x18(%rbp), %rcx
movb -0x9(%rbp), %sil
movq (%rcx), %rax
movq 0x18(%rax), %rax
movq (%rcx), %rdi
movq 0x10(%rdi), %rdx
movq %rdx, %r8
addq $0x1, %r8
movq %r8, 0x10(%rdi)
movb %sil, (%rax,%rdx)
movq (%rcx), %rax
movq 0x18(%rax), %rax
movq (%rcx), %rcx
movq 0x10(%rcx), %rcx
movb $0x0, (%rax,%rcx)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, (%rax)
je 0x29d2c
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x10(%rax)
jbe 0x29d2c
cmpq $0x0, -0x10(%rbp)
jbe 0x29d2c
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x10, %rsi
leaq -0x10(%rbp), %rdi
callq 0x2ab90
movq -0x18(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x10(%rbp)
callq 0x29d40
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rsi
movq (%rax), %rcx
movq 0x10(%rcx), %rdx
subq %rsi, %rdx
movq %rdx, 0x10(%rcx)
movq -0x10(%rbp), %rcx
movq (%rax), %rax
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, (%rax)
je 0x29ed0
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rcx), %rcx
cmpq 0x10(%rcx), %rax
jae 0x29ed0
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
subq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x2ab90
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jbe 0x29ece
movq -0x30(%rbp), %rdi
callq 0x29d40
cmpq $0x0, -0x10(%rbp)
jne 0x29e37
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rsi
movq (%rax), %rcx
movq 0x10(%rcx), %rdx
subq %rsi, %rdx
movq %rdx, 0x10(%rcx)
movq -0x18(%rbp), %rcx
movq (%rax), %rax
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
jmp 0x29ecc
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq (%rcx), %rcx
cmpq 0x10(%rcx), %rax
jne 0x29e76
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rsi
movq (%rcx), %rax
movq 0x10(%rax), %rdx
subq %rsi, %rdx
movq %rdx, 0x10(%rax)
movq (%rcx), %rax
movq 0x18(%rax), %rax
movq (%rcx), %rcx
movq 0x10(%rcx), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x29eca
movq -0x30(%rbp), %rax
movq (%rax), %rcx
movq 0x18(%rcx), %rcx
addq -0x10(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq (%rax), %rcx
movq 0x18(%rcx), %rsi
addq -0x10(%rbp), %rsi
addq -0x18(%rbp), %rsi
movq (%rax), %rax
movq 0x10(%rax), %rdx
subq -0x10(%rbp), %rdx
subq -0x18(%rbp), %rdx
addq $0x1, %rdx
callq 0x4600
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rdx
movq (%rax), %rax
movq 0x10(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x10(%rax)
jmp 0x29ecc
jmp 0x29ece
jmp 0x29ed0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, (%rax)
je 0x29f57
cmpq $0x0, -0x10(%rbp)
jbe 0x29f57
movq -0x20(%rbp), %rdi
callq 0x2ab50
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x2ab90
movq -0x20(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x10(%rbp)
callq 0x29d40
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rsi
movq (%rcx), %rax
movq 0x10(%rax), %rdx
subq %rsi, %rdx
movq %rdx, 0x10(%rax)
movq (%rcx), %rax
movq 0x18(%rax), %rax
movq (%rcx), %rcx
movq 0x10(%rcx), %rcx
movb $0x0, (%rax,%rcx)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movb %sil, %cl
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
andb $0x1, %al
movb %al, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, (%rax)
je 0x29fdf
cmpb $0x0, -0x9(%rbp)
je 0x29fdf
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movsbl -0x9(%rbp), %esi
callq 0x289f0
movq %rax, -0x18(%rbp)
cmpq $-0x1, -0x18(%rbp)
je 0x29fd4
testb $0x1, -0xa(%rbp)
je 0x29fbd
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x29fc5
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x29cb0
jmp 0x29fdd
movq -0x20(%rbp), %rdi
callq 0x28040
jmp 0x29fdf
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movb %sil, %cl
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
andb $0x1, %al
movb %al, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, (%rax)
je 0x2a088
cmpb $0x0, -0x9(%rbp)
je 0x2a088
movq -0x20(%rbp), %rdi
movq $-0x1, %rdx
movsbl -0x9(%rbp), %esi
callq 0x28a90
movq %rax, -0x18(%rbp)
cmpq $-0x1, -0x18(%rbp)
je 0x2a07d
testb $0x1, -0xa(%rbp)
je 0x2a057
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
subq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x2a06e
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
subq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x29ee0
jmp 0x2a086
movq -0x20(%rbp), %rdi
callq 0x28040
jmp 0x2a088
addq $0x30, %rsp
popq %rbp
retq
nop
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl %r8d, -0x5c(%rbp)
movq %rcx, %rax
movl -0x5c(%rbp), %ecx
movq %rax, -0x58(%rbp)
movq %rdx, %rax
movq -0x58(%rbp), %rdx
movq %rax, -0x50(%rbp)
movl %esi, %eax
movq -0x50(%rbp), %rsi
movl %eax, -0x44(%rbp)
movq %rdi, %r8
movl -0x44(%rbp), %edi
movb %r9b, %al
movq %r8, -0x8(%rbp)
movb %dil, -0x9(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
andb $0x1, %cl
movb %cl, -0x21(%rbp)
andb $0x1, %al
movb %al, -0x22(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, (%rax)
je 0x2a0f2
cmpb $0x0, -0x9(%rbp)
jne 0x2a0f4
jmp 0x2a157
movq -0x40(%rbp), %rdi
movb -0x9(%rbp), %sil
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movb -0x21(%rbp), %r8b
xorb $-0x1, %r8b
movb -0x22(%rbp), %al
xorb $-0x1, %al
movq %rsp, %r9
leaq -0x38(%rbp), %r10
movq %r10, 0x8(%r9)
leaq -0x30(%rbp), %r10
movq %r10, (%r9)
movsbl %sil, %esi
movzbl %r8b, %r8d
andl $0x1, %r8d
movzbl %al, %r9d
andl $0x1, %r9d
callq 0x28c00
testb $0x1, %al
jne 0x2a142
jmp 0x2a157
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
subq -0x30(%rbp), %rdx
callq 0x29d90
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)