LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: makerelpath(char const*, char const*, char const*, char const*)
char *makerelpath(const char *dir, const char *file, const char *prefix, const char *cmd)
{
    static string tmp;
    if(prefix) copystring(tmp, prefix);
    else tmp[0] = '\0';
    if(file[0]=='<')
    {
        const char *end = strrchr(file, '>');
        if(end)
        {
            size_t len = strlen(tmp);
            copystring(&tmp[len], file, min(sizeof(tmp)-len, size_t(end+2-file)));
            file = end+1;
        }
    }
    if(cmd) concatstring(tmp, cmd);
    if(dir)
    {
        defformatstring(pname)("%s/%s", dir, file);
        concatstring(tmp, pname);
    }
    else concatstring(tmp, file);
    return tmp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x18289
movq -0x18(%rbp), %rsi
leaq 0x10023(%rip), %rdi     # 0x282a0
movl $0x104, %edx            # imm = 0x104
callq 0x15f30
jmp 0x18290
movb $0x0, 0x10010(%rip)     # 0x282a0
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3c, %eax
jne 0x18327
movq -0x10(%rbp), %rdi
movl $0x3e, %esi
callq 0x2210
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x18325
leaq 0xffe0(%rip), %rdi      # 0x282a0
callq 0x20b0
movq %rax, -0x30(%rbp)
leaq 0xffd0(%rip), %rax      # 0x282a0
addq -0x30(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x150(%rbp)
movl $0x104, %edi            # imm = 0x104
subq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x2, %rsi
movq -0x10(%rbp), %rax
subq %rax, %rsi
callq 0x17e40
movq -0x158(%rbp), %rdi
movq -0x150(%rbp), %rsi
movq %rax, %rdx
callq 0x15f30
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x18327
cmpq $0x0, -0x20(%rbp)
je 0x18343
movq -0x20(%rbp), %rsi
leaq 0xff67(%rip), %rdi      # 0x282a0
movl $0x104, %edx            # imm = 0x104
callq 0x19cf0
cmpq $0x0, -0x8(%rbp)
je 0x18394
leaq -0x140(%rbp), %rsi
leaq -0x148(%rbp), %rdi
callq 0x167a0
movq -0x8(%rbp), %rdx
movq -0x10(%rbp), %rcx
leaq -0x148(%rbp), %rdi
leaq 0x6aa5(%rip), %rsi      # 0x1ee18
movb $0x0, %al
callq 0x167c0
leaq -0x140(%rbp), %rsi
leaq 0xff18(%rip), %rdi      # 0x282a0
movl $0x104, %edx            # imm = 0x104
callq 0x19cf0
jmp 0x183a9
movq -0x10(%rbp), %rsi
leaq 0xff01(%rip), %rdi      # 0x282a0
movl $0x104, %edx            # imm = 0x104
callq 0x19cf0
leaq 0xfef0(%rip), %rax      # 0x282a0
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
nopl (%rax)
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: parentdir(char const*)
const char *parentdir(const char *directory)
{
    const char *p = directory + strlen(directory);
    while(p > directory && *p != '/' && *p != '\\') p--;
    static string parent;
    size_t len = p-directory+1;
    copystring(parent, directory, len);
    return parent;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x20b0
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x8(%rbp), %rcx
movb %al, -0x21(%rbp)
jbe 0x1869b
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x2f, %ecx
movb %al, -0x21(%rbp)
je 0x1869b
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x186a4
jmp 0x186b2
movq -0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x1866b
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0xfdec(%rip), %rdi      # 0x284c0
callq 0x15f30
leaq 0xfde0(%rip), %rax      # 0x284c0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: fileexists(char const*, char const*)
bool fileexists(const char *path, const char *mode)
{
    bool exists = true;
    if(mode[0]=='w' || mode[0]=='a') path = parentdir(path);
#ifdef WIN32
    if(GetFileAttributes(path[0] ? path : ".\\") == INVALID_FILE_ATTRIBUTES) exists = false;
#else
    if(access(path[0] ? path : ".", mode[0]=='w' || mode[0]=='a' ? W_OK : (mode[0]=='d' ? X_OK : R_OK)) == -1) exists = false;
#endif
    return exists;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x1, -0x11(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x77, %eax
je 0x1871c
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x61, %eax
jne 0x18729
movq -0x8(%rbp), %rdi
callq 0x18640
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1873c
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x18749
leaq 0x66de(%rip), %rax      # 0x1ee21
movq %rax, -0x20(%rbp)
jmp 0x18749
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x77, %eax
je 0x18769
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x61, %eax
jne 0x18773
movl $0x2, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1878d
movq -0x10(%rbp), %rax
movsbl (%rax), %edx
movl $0x4, %eax
movl $0x1, %ecx
cmpl $0x64, %edx
cmovel %ecx, %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x23b0
cmpl $-0x1, %eax
jne 0x187a2
movb $0x0, -0x11(%rbp)
movb -0x11(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: createdir(char const*)
bool createdir(const char *path)
{
    size_t len = strlen(path);
    if(path[len-1]==PATHDIV)
    {
        static string strip;
        path = copystring(strip, path, len);
    }
#ifdef WIN32
    return CreateDirectory(path, NULL)!=0;
#else
    return mkdir(path, 0777)==0;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x20b0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
jne 0x187f6
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq 0xfde3(%rip), %rdi      # 0x285d0
callq 0x15f30
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x20c0
cmpl $0x0, %eax
sete %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: fixpackagedir(char*)
size_t fixpackagedir(char *dir)
{
    path(dir);
    size_t len = strlen(dir);
    if(len > 0 && dir[len-1] != PATHDIV)
    {
        dir[len] = PATHDIV;
        dir[len+1] = '\0';
    }
    return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x183c0
movq -0x8(%rbp), %rdi
callq 0x20b0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jbe 0x18877
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
je 0x18877
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movb $0x2f, (%rax,%rcx)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movb $0x0, 0x1(%rax,%rcx)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: subhomedir(char*, int, char const*)
bool subhomedir(char *dst, int len, const char *src)
{
    const char *sub = strstr(src, "$HOME");
    if(!sub) sub = strchr(src, '~');
    if(sub && sub-src < len)
    {
#ifdef WIN32
        char home[MAX_PATH+1];
        home[0] = '\0';
        if(SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, 0, home) != S_OK || !home[0]) return false;
#else
        const char *home = getenv("HOME");
        if(!home || !home[0]) return false;
#endif
        dst[sub-src] = '\0';
        concatstring(dst, home);
        concatstring(dst, sub+(*sub == '~' ? 1 : strlen("$HOME")));
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x6575(%rip), %rsi      # 0x1ee23
callq 0x2050
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x188d0
movq -0x20(%rbp), %rdi
movl $0x7e, %esi
callq 0x2080
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x18967
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movslq -0x14(%rbp), %rcx
cmpq %rcx, %rax
jge 0x18967
leaq 0x652e(%rip), %rdi      # 0x1ee24
callq 0x2280
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x1890f
movq -0x30(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x18915
movb $0x0, -0x1(%rbp)
jmp 0x1896b
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rdx
subq %rdx, %rcx
movb $0x0, (%rax,%rcx)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl $0x104, %edx            # imm = 0x104
callq 0x19cf0
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x28(%rbp), %rax
movsbl (%rax), %edx
movl $0x5, %eax
movl $0x1, %ecx
cmpl $0x7e, %edx
cmoveq %rcx, %rax
addq %rax, %rsi
movl $0x104, %edx            # imm = 0x104
callq 0x19cf0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: sethomedir(char const*)
const char *sethomedir(const char *dir)
{
    string pdir;
    copystring(pdir, dir);
    if(!subhomedir(pdir, sizeof(pdir), dir) || !fixpackagedir(pdir)) return NULL;
    copystring(homedir, pdir);
    return homedir;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x10(%rbp)
leaq -0x120(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x104, %edx            # imm = 0x104
callq 0x15f30
leaq -0x120(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0x104, %esi            # imm = 0x104
callq 0x18890
testb $0x1, %al
jne 0x189bf
jmp 0x189d1
leaq -0x120(%rbp), %rdi
callq 0x18820
cmpq $0x0, %rax
jne 0x189db
movq $0x0, -0x8(%rbp)
jmp 0x189fe
leaq -0x120(%rbp), %rsi
leaq 0xf797(%rip), %rdi      # 0x28180
movl $0x104, %edx            # imm = 0x104
callq 0x15f30
leaq 0xf786(%rip), %rax      # 0x28180
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopl (%rax,%rax)
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: addpackagedir(char const*)
const char *addpackagedir(const char *dir)
{
    string pdir;
    copystring(pdir, dir);
    if(!subhomedir(pdir, sizeof(pdir), dir) || !fixpackagedir(pdir)) return NULL;
    char *filter = pdir;
    for(;;)
    {
        static int len = strlen("packages");
        filter = strstr(filter, "packages");
        if(!filter) break;
        if(filter > pdir && filter[-1] == PATHDIV && filter[len] == PATHDIV) break;
        filter += len;
    }    
    packagedir &pf = packagedirs.add();
    pf.dir = filter ? newstring(pdir, filter-pdir) : newstring(pdir);
    pf.dirlen = filter ? filter-pdir : strlen(pdir);
    pf.filter = filter ? newstring(filter) : NULL;
    pf.filterlen = filter ? strlen(filter) : 0;
    return pf.dir;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x10(%rbp)
leaq -0x120(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x104, %edx            # imm = 0x104
callq 0x15f30
leaq -0x120(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0x104, %esi            # imm = 0x104
callq 0x18890
testb $0x1, %al
jne 0x18a4f
jmp 0x18a61
leaq -0x120(%rbp), %rdi
callq 0x18820
cmpq $0x0, %rax
jne 0x18a6e
movq $0x0, -0x8(%rbp)
jmp 0x18c30
leaq -0x120(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rdi
leaq 0x639f(%rip), %rsi      # 0x1ee29
callq 0x2050
movq %rax, -0x128(%rbp)
cmpq $0x0, -0x128(%rbp)
jne 0x18aa2
jmp 0x18afa
movq -0x128(%rbp), %rax
leaq -0x120(%rbp), %rcx
cmpq %rcx, %rax
jbe 0x18ade
movq -0x128(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0x18ade
movq -0x128(%rbp), %rax
movslq 0xe795(%rip), %rcx      # 0x27268
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
jne 0x18ade
jmp 0x18afa
movl 0xe784(%rip), %ecx      # 0x27268
movq -0x128(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x128(%rbp)
jmp 0x18a7c
leaq 0xf787(%rip), %rdi      # 0x28288
callq 0x19d50
movq %rax, -0x130(%rbp)
cmpq $0x0, -0x128(%rbp)
je 0x18b3d
leaq -0x120(%rbp), %rdi
movq -0x128(%rbp), %rsi
leaq -0x120(%rbp), %rax
subq %rax, %rsi
callq 0x16150
movq %rax, -0x138(%rbp)
jmp 0x18b50
leaq -0x120(%rbp), %rdi
callq 0x15990
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rcx
movq -0x130(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x128(%rbp)
je 0x18b85
movq -0x128(%rbp), %rax
leaq -0x120(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x140(%rbp)
jmp 0x18b98
leaq -0x120(%rbp), %rdi
callq 0x20b0
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rcx
movq -0x130(%rbp), %rax
movq %rcx, 0x10(%rax)
cmpq $0x0, -0x128(%rbp)
je 0x18bc9
movq -0x128(%rbp), %rdi
callq 0x15990
movq %rax, -0x148(%rbp)
jmp 0x18bd4
xorl %eax, %eax
movq %rax, -0x148(%rbp)
jmp 0x18bd4
movq -0x148(%rbp), %rcx
movq -0x130(%rbp), %rax
movq %rcx, 0x8(%rax)
cmpq $0x0, -0x128(%rbp)
je 0x18c05
movq -0x128(%rbp), %rdi
callq 0x20b0
movq %rax, -0x150(%rbp)
jmp 0x18c10
xorl %eax, %eax
movq %rax, -0x150(%rbp)
jmp 0x18c10
movq -0x150(%rbp), %rcx
movq -0x130(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x130(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nopl (%rax)
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: stream::size()
stream::offset stream::size()
{
    offset pos = tell(), endpos;
    if(pos < 0 || !seek(0, SEEK_END)) return -1;
    endpos = tell();
    return pos == endpos || seek(pos, SEEK_SET) ? endpos : -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jl 0x193dc
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
xorl %ecx, %ecx
movl %ecx, %esi
movl $0x2, %edx
callq *0x30(%rax)
testb $0x1, %al
jne 0x193e6
movq $-0x1, -0x8(%rbp)
jmp 0x19433
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x19414
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq (%rdi), %rax
xorl %edx, %edx
callq *0x30(%rax)
testb $0x1, %al
jne 0x19414
jmp 0x1941e
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x1942b
movq $-0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x1942b
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: stream::getline(char*, unsigned long)
bool stream::getline(char *str, size_t len)
{
    loopi(len-1)
    {
        if(read(&str[i], 1) != 1) { str[i] = '\0'; return i > 0; }
        else if(str[i] == '\n') { str[i+1] = '\0'; return true; }
    }
    if(len > 0) str[len-1] = '\0';
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
cmpl %ecx, %eax
jge 0x194e3
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq %rax, %rsi
movq (%rdi), %rax
movl $0x1, %edx
callq *0x48(%rax)
cmpq $0x1, %rax
je 0x194ac
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movb $0x0, (%rax,%rcx)
cmpl $0x0, -0x24(%rbp)
setg %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x194fe
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x194d4
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movb $0x1, -0x1(%rbp)
jmp 0x194fe
jmp 0x194d6
jmp 0x194d8
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x19463
cmpq $0x0, -0x20(%rbp)
jbe 0x194fa
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: stream::printf(char const*, ...)
size_t stream::printf(const char *fmt, ...)
{
    char buf[512];
    char *str = buf;
    va_list args;
#if defined(WIN32) && !defined(__GNUC__)
    va_start(args, fmt);
    int len = _vscprintf(fmt, args);
    if(len <= 0) { va_end(args); return 0; }
    if(len >= (int)sizeof(buf)) str = new char[len+1];
    _vsnprintf(str, len+1, fmt, args);
    va_end(args);
#else
    va_start(args, fmt);
    int len = vsnprintf(buf, sizeof(buf), fmt, args);
    va_end(args);
    if(len <= 0) return 0;
    if(len >= (int)sizeof(buf))
    {
        str = new char[len+1];
        va_start(args, fmt);
        vsnprintf(str, len+1, fmt, args);
        va_end(args);
    }
#endif
    size_t n = write(str, len);
    if(str != buf) delete[] str;
    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x310, %rsp            # imm = 0x310
testb %al, %al
je 0x19557
movaps %xmm0, -0x2d0(%rbp)
movaps %xmm1, -0x2c0(%rbp)
movaps %xmm2, -0x2b0(%rbp)
movaps %xmm3, -0x2a0(%rbp)
movaps %xmm4, -0x290(%rbp)
movaps %xmm5, -0x280(%rbp)
movaps %xmm6, -0x270(%rbp)
movaps %xmm7, -0x260(%rbp)
movq %r9, -0x2d8(%rbp)
movq %r8, -0x2e0(%rbp)
movq %rcx, -0x2e8(%rbp)
movq %rdx, -0x2f0(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x308(%rbp)
leaq -0x220(%rbp), %rax
movq %rax, -0x228(%rbp)
leaq -0x240(%rbp), %rax
leaq -0x300(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
leaq -0x220(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq -0x240(%rbp), %rcx
movl $0x200, %esi            # imm = 0x200
callq 0x2110
movl %eax, -0x244(%rbp)
leaq -0x240(%rbp), %rax
cmpl $0x0, -0x244(%rbp)
jg 0x195fa
movq $0x0, -0x8(%rbp)
jmp 0x196d1
cmpl $0x200, -0x244(%rbp)    # imm = 0x200
jl 0x1966f
movl -0x244(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x1b0b0
movq %rax, -0x228(%rbp)
leaq -0x240(%rbp), %rax
leaq -0x300(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq -0x228(%rbp), %rdi
movl -0x244(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movq -0x18(%rbp), %rdx
leaq -0x240(%rbp), %rcx
callq 0x2110
leaq -0x240(%rbp), %rax
movq -0x308(%rbp), %rdi
movq -0x228(%rbp), %rsi
movslq -0x244(%rbp), %rdx
movq (%rdi), %rax
callq *0x50(%rax)
movq %rax, -0x250(%rbp)
movq -0x228(%rbp), %rax
leaq -0x220(%rbp), %rcx
cmpq %rcx, %rax
je 0x196c6
movq -0x228(%rbp), %rax
movq %rax, -0x310(%rbp)
cmpq $0x0, %rax
je 0x196c4
movq -0x310(%rbp), %rdi
callq 0x1b110
jmp 0x196c6
movq -0x250(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x310, %rsp            # imm = 0x310
popq %rbp
retq
nop
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: openrawfile(char const*, char const*)
stream *openrawfile(const char *filename, const char *mode)
{
    const char *found = findfile(filename, mode);
    if(!found) return NULL;
    filestream *file = new filestream;
    if(!file->open(found, mode)) { delete file; return NULL; }
    return file;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x18c40
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x19712
movq $0x0, -0x8(%rbp)
jmp 0x19790
movl $0x10, %edi
callq 0x1b080
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
callq 0x19e00
jmp 0x1972d
movq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x19e40
testb $0x1, %al
jne 0x19788
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
je 0x19762
movq -0x48(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x19790
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x10, %esi
callq 0x21f0
jmp 0x1979a
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x23e0
nopw %cs:(%rax,%rax)
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: opentempfile(char const*, char const*)
stream *opentempfile(const char *name, const char *mode)
{
    const char *found = findfile(name, mode);
    filestream *file = new filestream;
    if(!file->opentemp(found ? found : name, mode)) { delete file; return NULL; }
    return file;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x18c40
movq %rax, -0x20(%rbp)
movl $0x10, %edi
callq 0x1b080
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
callq 0x19e00
jmp 0x1981c
movq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1983d
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x19845
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x19ea0
testb $0x1, %al
jne 0x19898
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
je 0x19872
movq -0x58(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x198a0
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x10, %esi
callq 0x21f0
jmp 0x198aa
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x23e0
nopw %cs:(%rax,%rax)
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: openutf8file(char const*, char const*, stream*)
stream *openutf8file(const char *filename, const char *mode, stream *file)
{
    stream *source = file ? file : openfile(filename, mode);
    if(!source) return NULL;
    utf8stream *utf8 = new utf8stream;
    if(!utf8->open(source, mode, !file)) { if(!file) delete source; return NULL; }
    return utf8;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x198e5
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x198f6
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x197b0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x19912
movq $0x0, -0x8(%rbp)
jmp 0x199a9
movl $0x1038, %edi           # imm = 0x1038
callq 0x1b080
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x50(%rbp)
callq 0x19f00
jmp 0x1992d
movq -0x50(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rdx
cmpq $0x0, -0x20(%rbp)
setne %al
xorb $-0x1, %al
movzbl %al, %ecx
andl $0x1, %ecx
callq 0x19f70
testb $0x1, %al
jne 0x199a1
cmpq $0x0, -0x20(%rbp)
jne 0x19997
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
je 0x19979
movq -0x58(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x19997
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x1038, %esi           # imm = 0x1038
callq 0x21f0
jmp 0x199b3
movq $0x0, -0x8(%rbp)
jmp 0x199a9
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x23e0
nopl (%rax)
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: utf8stream::open(stream*, char const*, bool)
bool open(stream *f, const char *mode, bool needclose)
    {
        if(file) return false;
        for(; *mode; mode++)
        {
            if(*mode=='r') { reading = true; break; }
            else if(*mode=='w') { writing = true; break; }
        }
        if(!reading && !writing) return false;
       
        autoclose = needclose;
        file = f;
       
        if(reading) checkheader();
 
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, 0x8(%rax)
je 0x19fa3
movb $0x0, -0x1(%rbp)
jmp 0x1a02e
jmp 0x19fa5
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x19fec
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x72, %eax
jne 0x19fc4
movq -0x30(%rbp), %rax
movb $0x1, 0x30(%rax)
jmp 0x19fec
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x77, %eax
jne 0x19fda
movq -0x30(%rbp), %rax
movb $0x1, 0x31(%rax)
jmp 0x19fec
jmp 0x19fdc
jmp 0x19fde
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x19fa5
movq -0x30(%rbp), %rax
testb $0x1, 0x30(%rax)
jne 0x1a006
movq -0x30(%rbp), %rax
testb $0x1, 0x31(%rax)
jne 0x1a006
movb $0x0, -0x1(%rbp)
jmp 0x1a02e
movq -0x30(%rbp), %rax
movb -0x21(%rbp), %cl
andb $0x1, %cl
movb %cl, 0x32(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
testb $0x1, 0x30(%rax)
je 0x1a02a
movq -0x30(%rbp), %rdi
callq 0x1ad40
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: utf8stream::seek(long, int)
bool seek(offset off, int whence)
    {
        if(writing || !reading) return false;

        if(whence == SEEK_END)
        {
            uchar skip[512];
            while(read(skip, sizeof(skip)) == sizeof(skip));
            return !off;
        }
        else if(whence == SEEK_CUR) off += pos;
       
        if(off >= pos) off -= pos;
        else if(off < 0 || !file->seek(0, SEEK_SET)) return false;
        else
        {
            bufread = bufcarry = buflen = 0;
            pos = 0;
            checkheader(); 
        }

        uchar skip[512];
        while(off > 0)
        {
            size_t skipped = (size_t)min(off, (offset)sizeof(skip));
            if(read(skip, skipped) != skipped) { stopreading(); return false; }
            off -= skipped;
        }
        
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x430, %rsp            # imm = 0x430
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x430(%rbp)
testb $0x1, 0x31(%rax)
jne 0x1a784
movq -0x430(%rbp), %rax
testb $0x1, 0x30(%rax)
jne 0x1a78d
movb $0x0, -0x1(%rbp)
jmp 0x1a8d5
cmpl $0x2, -0x1c(%rbp)
jne 0x1a7cc
jmp 0x1a795
movq -0x430(%rbp), %rdi
leaq -0x220(%rbp), %rsi
movq (%rdi), %rax
movl $0x200, %edx            # imm = 0x200
callq *0x48(%rax)
cmpq $0x200, %rax            # imm = 0x200
jne 0x1a7b8
jmp 0x1a795
cmpq $0x0, -0x18(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x1a8d5
cmpl $0x1, -0x1c(%rbp)
jne 0x1a7e5
movq -0x430(%rbp), %rax
movq 0x10(%rax), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x1a7e7
movq -0x430(%rbp), %rcx
movq -0x18(%rbp), %rax
cmpq 0x10(%rcx), %rax
jl 0x1a810
movq -0x430(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x1a869
cmpq $0x0, -0x18(%rbp)
jl 0x1a832
movq -0x430(%rbp), %rax
movq 0x8(%rax), %rdi
movq (%rdi), %rax
xorl %ecx, %ecx
movl %ecx, %esi
xorl %edx, %edx
callq *0x30(%rax)
testb $0x1, %al
jne 0x1a83b
movb $0x0, -0x1(%rbp)
jmp 0x1a8d5
movq -0x430(%rbp), %rdi
movq $0x0, 0x28(%rdi)
movq $0x0, 0x20(%rdi)
movq $0x0, 0x18(%rdi)
movq $0x0, 0x10(%rdi)
callq 0x1ad40
jmp 0x1a869
jmp 0x1a86b
cmpq $0x0, -0x18(%rbp)
jle 0x1a8d1
movq -0x18(%rbp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x19c30
movq -0x430(%rbp), %rdi
movq %rax, -0x428(%rbp)
leaq -0x420(%rbp), %rsi
movq -0x428(%rbp), %rdx
movq (%rdi), %rax
callq *0x48(%rax)
cmpq -0x428(%rbp), %rax
je 0x1a8bd
movq -0x430(%rbp), %rdi
callq 0x1ace0
movb $0x0, -0x1(%rbp)
jmp 0x1a8d5
movq -0x428(%rbp), %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x1a86b
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x430, %rsp            # imm = 0x430
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: utf8stream::read(void*, unsigned long)
size_t read(void *dst, size_t len)
    {
        if(!reading || !dst || !len) return 0;
        size_t next = 0;
        while(next < len)
        {
            if(bufread >= bufcarry) { if(readbuf(BUFSIZE)) continue; stopreading(); break; }
            size_t n = min(len - next, bufcarry - bufread);
            memcpy(&((uchar *)dst)[next], &buf[bufread], n);
            next += n;
            bufread += n;
        }
        pos += next;
        return next;
    }

// 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, -0x38(%rbp)
testb $0x1, 0x30(%rax)
je 0x1a920
cmpq $0x0, -0x18(%rbp)
je 0x1a920
cmpq $0x0, -0x20(%rbp)
jne 0x1a92d
movq $0x0, -0x8(%rbp)
jmp 0x1a9eb
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x1a9d3
movq -0x38(%rbp), %rcx
movq 0x18(%rcx), %rax
cmpq 0x20(%rcx), %rax
jb 0x1a972
movq -0x38(%rbp), %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0x1adc0
testb $0x1, %al
jne 0x1a965
jmp 0x1a967
jmp 0x1a935
movq -0x38(%rbp), %rdi
callq 0x1ace0
jmp 0x1a9d3
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %rdi
subq -0x28(%rbp), %rdi
movq 0x20(%rax), %rsi
subq 0x18(%rax), %rsi
callq 0x17e40
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0x30(%rbp)
movq -0x18(%rbp), %rdi
addq -0x28(%rbp), %rdi
movq %rax, %rsi
addq $0x33, %rsi
addq 0x18(%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0x2170
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
addq -0x28(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq -0x30(%rbp), %rcx
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
jmp 0x1a935
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: utf8stream::write(void const*, unsigned long)
size_t write(const void *src, size_t len)
    {
        if(!writing || !src || !len) return 0;
        uchar dst[512];
        size_t next = 0;
        while(next < len)
        {
            size_t carry = 0, n = encodeutf8(dst, sizeof(dst), &((uchar *)src)[next], len - next, &carry);
            if(n > 0 && file->write(dst, n) != n) { stopwriting(); break; }
            next += carry;
        }
        pos += next;
        return next;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x240(%rbp)
testb $0x1, 0x31(%rax)
je 0x1aa36
cmpq $0x0, -0x18(%rbp)
je 0x1aa36
cmpq $0x0, -0x20(%rbp)
jne 0x1aa43
movq $0x0, -0x8(%rbp)
jmp 0x1ab1a
movq $0x0, -0x228(%rbp)
movq -0x228(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x1aaf9
movq $0x0, -0x230(%rbp)
leaq -0x220(%rbp), %rdi
movq -0x18(%rbp), %rdx
addq -0x228(%rbp), %rdx
movq -0x20(%rbp), %rcx
subq -0x228(%rbp), %rcx
movl $0x200, %esi            # imm = 0x200
leaq -0x230(%rbp), %r8
callq 0x17ec0
movq %rax, -0x238(%rbp)
cmpq $0x0, -0x238(%rbp)
jbe 0x1aadf
movq -0x240(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0x220(%rbp), %rsi
movq -0x238(%rbp), %rdx
movq (%rdi), %rax
callq *0x50(%rax)
cmpq -0x238(%rbp), %rax
je 0x1aadf
movq -0x240(%rbp), %rdi
callq 0x1ad10
jmp 0x1aaf9
movq -0x230(%rbp), %rax
addq -0x228(%rbp), %rax
movq %rax, -0x228(%rbp)
jmp 0x1aa4e
movq -0x240(%rbp), %rax
movq -0x228(%rbp), %rcx
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x228(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
nopw (%rax,%rax)
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: utf8stream::getline(char*, unsigned long)
bool getline(char *dst, size_t len)
    {
        if(!reading || !dst || !len) return false;
        --len;
        size_t next = 0;
        while(next < len)
        {
            if(bufread >= bufcarry) { if(readbuf(BUFSIZE)) continue; stopreading(); if(!next) return false; break; }
            size_t n = min(len - next, bufcarry - bufread);
            uchar *endline = (uchar *)memchr(&buf[bufread], '\n', n);
            if(endline) { n = endline+1 - &buf[bufread]; len = next + n; } 
            memcpy(&((uchar *)dst)[next], &buf[bufread], n);
            next += n;
            bufread += n;
        }
        dst[next] = '\0';
        pos += next;
        return true;
    }

// 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, -0x40(%rbp)
testb $0x1, 0x30(%rax)
je 0x1ab90
cmpq $0x0, -0x18(%rbp)
je 0x1ab90
cmpq $0x0, -0x20(%rbp)
jne 0x1ab99
movb $0x0, -0x1(%rbp)
jmp 0x1acd0
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x1acb0
movq -0x40(%rbp), %rcx
movq 0x18(%rcx), %rax
cmpq 0x20(%rcx), %rax
jb 0x1abfd
movq -0x40(%rbp), %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0x1adc0
testb $0x1, %al
jne 0x1abdd
jmp 0x1abdf
jmp 0x1abad
movq -0x40(%rbp), %rdi
callq 0x1ace0
cmpq $0x0, -0x28(%rbp)
jne 0x1abf8
movb $0x0, -0x1(%rbp)
jmp 0x1acd0
jmp 0x1acb0
movq -0x40(%rbp), %rax
movq -0x20(%rbp), %rdi
subq -0x28(%rbp), %rdi
movq 0x20(%rax), %rsi
subq 0x18(%rax), %rsi
callq 0x17e40
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, -0x30(%rbp)
movq %rax, %rdi
addq $0x33, %rdi
addq 0x18(%rax), %rdi
movq -0x30(%rbp), %rdx
movl $0xa, %esi
callq 0x2220
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x1ac6f
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rdx, %rcx
addq $0x33, %rcx
addq 0x18(%rdx), %rcx
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rdi
addq -0x28(%rbp), %rdi
movq %rax, %rsi
addq $0x33, %rsi
addq 0x18(%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0x2170
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rcx
addq -0x28(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq -0x30(%rbp), %rcx
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
jmp 0x1abad
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rdx
movb $0x0, (%rcx,%rdx)
movq -0x28(%rbp), %rcx
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: utf8stream::checkheader()
bool checkheader()
    {
        size_t n = file->read(buf, 3);
        if(n == 3 && buf[0] == 0xEF && buf[1] == 0xBB && buf[2] == 0xBF) return true;
        buflen = n; 
        return false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x20(%rbp)
movq 0x8(%rsi), %rdi
addq $0x33, %rsi
movq (%rdi), %rax
movl $0x3, %edx
callq *0x48(%rax)
movq %rax, -0x18(%rbp)
cmpq $0x3, -0x18(%rbp)
jne 0x1ada5
movq -0x20(%rbp), %rax
movzbl 0x33(%rax), %eax
cmpl $0xef, %eax
jne 0x1ada5
movq -0x20(%rbp), %rax
movzbl 0x34(%rax), %eax
cmpl $0xbb, %eax
jne 0x1ada5
movq -0x20(%rbp), %rax
movzbl 0x35(%rax), %eax
cmpl $0xbf, %eax
jne 0x1ada5
movb $0x1, -0x1(%rbp)
jmp 0x1adb5
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x28(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
// File: Fohlen[P]cubescript-standalone/stream.cpp
// Function: utf8stream::readbuf(unsigned long)
bool readbuf(size_t size = BUFSIZE)
    {
        if(bufread >= bufcarry) { if(bufcarry > 0 && bufcarry < buflen) memmove(buf, &buf[bufcarry], buflen - bufcarry); buflen -= bufcarry; bufread = bufcarry = 0; }
        size_t n = file->read(&buf[buflen], min(size, BUFSIZE - buflen));
        if(n <= 0) return false;
        buflen += n;
        size_t carry = bufcarry;
        bufcarry += decodeutf8(&buf[bufcarry], BUFSIZE-bufcarry, &buf[bufcarry], buflen-bufcarry, &carry);
        if(carry > bufcarry && carry < buflen) { memmove(&buf[bufcarry], &buf[carry], buflen - carry); buflen -= carry - bufcarry; }
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x30(%rbp)
movq 0x18(%rcx), %rax
cmpq 0x20(%rcx), %rax
jb 0x1ae41
movq -0x30(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jbe 0x1ae1e
movq -0x30(%rbp), %rcx
movq 0x20(%rcx), %rax
cmpq 0x28(%rcx), %rax
jae 0x1ae1e
movq -0x30(%rbp), %rax
movq %rax, %rdi
addq $0x33, %rdi
movq %rax, %rsi
addq $0x33, %rsi
addq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
subq 0x20(%rax), %rdx
callq 0x2380
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rdx
movq 0x28(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x28(%rax)
movq $0x0, 0x20(%rax)
movq $0x0, 0x18(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x40(%rbp)
movq %rax, %rcx
addq $0x33, %rcx
addq 0x28(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movl $0x1000, %esi           # imm = 0x1000
subq 0x28(%rax), %rsi
callq 0x17e40
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %rax, %rdx
movq (%rdi), %rax
callq *0x48(%rax)
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
ja 0x1ae93
movb $0x0, -0x1(%rbp)
jmp 0x1af41
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
movq 0x20(%rax), %rcx
movq %rcx, -0x28(%rbp)
movq %rax, %rdi
addq $0x33, %rdi
addq 0x20(%rax), %rdi
movl $0x1000, %esi           # imm = 0x1000
subq 0x20(%rax), %rsi
movq %rax, %rdx
addq $0x33, %rdx
addq 0x20(%rax), %rdx
movq 0x28(%rax), %rcx
subq 0x20(%rax), %rcx
leaq -0x28(%rbp), %r8
callq 0x17a30
movq -0x30(%rbp), %rcx
addq 0x20(%rcx), %rax
movq %rax, 0x20(%rcx)
movq -0x28(%rbp), %rax
cmpq 0x20(%rcx), %rax
jbe 0x1af3d
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
cmpq 0x28(%rcx), %rax
jae 0x1af3d
movq -0x30(%rbp), %rax
movq %rax, %rdi
addq $0x33, %rdi
addq 0x20(%rax), %rdi
movq %rax, %rsi
addq $0x33, %rsi
addq -0x28(%rbp), %rsi
movq 0x28(%rax), %rdx
subq -0x28(%rbp), %rdx
callq 0x2380
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rdx
subq 0x20(%rax), %rdx
movq 0x28(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x28(%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: Fohlen[P]cubescript-standalone/tools.cpp
// Function: seedMT(unsigned int)
void seedMT(uint seed)
{
    state[0] = seed;
    for(uint i = 1; i < N; i++)
        state[i] = seed = 1812433253U * (seed ^ (seed >> 30)) + i;
    next = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, 0xd640(%rip)      # 0x287f0
movl $0x1, -0x8(%rbp)
cmpl $0x270, -0x8(%rbp)      # imm = 0x270
jae 0x1b1f1
movl -0x4(%rbp), %eax
movl -0x4(%rbp), %ecx
shrl $0x1e, %ecx
xorl %ecx, %eax
imull $0x6c078965, %eax, %edx # imm = 0x6C078965
addl -0x8(%rbp), %edx
movl %edx, -0x4(%rbp)
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0xd60d(%rip), %rax      # 0x287f0
movl %edx, (%rax,%rcx,4)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x1b1b7
movl $0x0, 0xc071(%rip)      # 0x2726c
popq %rbp
retq
nopl (%rax)
// File: Fohlen[P]cubescript-standalone/tools.cpp
// Function: randomMT()
uint randomMT()
{
    int cur = next;
    if(++next >= N)
    {
        if(next > N) { seedMT(5489U + time(NULL)); cur = next++; }
        else next = 0;
    }
    uint y = (state[cur] & 0x80000000U) | (state[next] & 0x7FFFFFFFU);
    state[cur] = y = state[cur < N-M ? cur + M : cur + M-N] ^ (y >> 1) ^ (-int(y & 1U) & K);
    y ^= (y >> 11);
    y ^= (y <<  7) & 0x9D2C5680U;
    y ^= (y << 15) & 0xEFC60000U;
    y ^= (y >> 18);
    return y;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl 0xc05e(%rip), %eax      # 0x2726c
movl %eax, -0x4(%rbp)
movl 0xc055(%rip), %eax      # 0x2726c
addl $0x1, %eax
movl %eax, 0xc04c(%rip)      # 0x2726c
cmpl $0x270, %eax            # imm = 0x270
jl 0x1b26b
cmpl $0x270, 0xc03b(%rip)    # imm = 0x270
jle 0x1b25f
xorl %eax, %eax
movl %eax, %edi
callq 0x21c0
addq $0x1571, %rax           # imm = 0x1571
movl %eax, %edi
callq 0x1b1a0
movl 0xc01d(%rip), %eax      # 0x2726c
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0xc012(%rip)      # 0x2726c
movl %eax, -0x4(%rbp)
jmp 0x1b269
movl $0x0, 0xc003(%rip)      # 0x2726c
jmp 0x1b26b
movslq -0x4(%rbp), %rcx
leaq 0xd57a(%rip), %rax      # 0x287f0
movl (%rax,%rcx,4), %eax
andl $0x80000000, %eax       # imm = 0x80000000
movslq 0xbfe7(%rip), %rdx      # 0x2726c
leaq 0xd564(%rip), %rcx      # 0x287f0
movl (%rcx,%rdx,4), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl %ecx, %eax
movl %eax, -0x8(%rbp)
cmpl $0xe3, -0x4(%rbp)
jge 0x1b2b0
movl -0x4(%rbp), %eax
addl $0x18d, %eax            # imm = 0x18D
movl %eax, -0xc(%rbp)
jmp 0x1b2c0
movl -0x4(%rbp), %eax
addl $0x18d, %eax            # imm = 0x18D
subl $0x270, %eax            # imm = 0x270
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movslq %eax, %rcx
leaq 0xd523(%rip), %rax      # 0x287f0
movl (%rax,%rcx,4), %edx
movl -0x8(%rbp), %eax
shrl %eax
xorl %eax, %edx
movl -0x8(%rbp), %ecx
andl $0x1, %ecx
xorl %eax, %eax
subl %ecx, %eax
andl $0x9908b0df, %eax       # imm = 0x9908B0DF
xorl %eax, %edx
movl %edx, -0x8(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0xd4fa(%rip), %rax      # 0x287f0
movl %edx, (%rax,%rcx,4)
movl -0x8(%rbp), %eax
shrl $0xb, %eax
xorl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
shll $0x7, %eax
andl $0x9d2c5680, %eax       # imm = 0x9D2C5680
xorl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
shll $0xf, %eax
andl $0xefc60000, %eax       # imm = 0xEFC60000
xorl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
shrl $0x12, %eax
xorl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: Fohlen[P]cubescript-standalone/tools.cpp
// Function: getint(databuf<unsigned char>&)
int getint(ucharbuf &p)
{
    int c = (char)p.get();
    if(c==-128) { int n = p.get(); n |= char(p.get())<<8; return n; }
    else if(c==-127) { int n = p.get(); n |= p.get()<<8; n |= p.get()<<16; return n|(p.get()<<24); }
    else return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1be00
movsbl (%rax), %eax
movl %eax, -0x14(%rbp)
cmpl $-0x80, -0x14(%rbp)
jne 0x1b5ed
movq -0x10(%rbp), %rdi
callq 0x1be00
movzbl (%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1be00
movsbl (%rax), %eax
shll $0x8, %eax
orl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1b654
cmpl $-0x7f, -0x14(%rbp)
jne 0x1b64e
movq -0x10(%rbp), %rdi
callq 0x1be00
movzbl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1be00
movzbl (%rax), %eax
shll $0x8, %eax
orl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1be00
movzbl (%rax), %eax
shll $0x10, %eax
orl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1be00
movq %rax, %rcx
movl -0x20(%rbp), %eax
movzbl (%rcx), %ecx
shll $0x18, %ecx
orl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x1b654
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: Fohlen[P]cubescript-standalone/tools.cpp
// Function: void putuint_<databuf<unsigned char>>(databuf<unsigned char>&, int)
static inline void putuint_(T &p, int n)
{
    if(n < 0 || n >= (1<<21))
    {
        p.put(0x80 | (n & 0x7F));
        p.put(0x80 | ((n >> 7) & 0x7F));
        p.put(0x80 | ((n >> 14) & 0x7F));
        p.put(n >> 21);
    }
    else if(n < (1<<7)) p.put(n);
    else if(n < (1<<14))
    {
        p.put(0x80 | (n & 0x7F));
        p.put(n >> 7);
    }
    else
    {
        p.put(0x80 | (n & 0x7F));
        p.put(0x80 | ((n >> 7) & 0x7F));
        p.put(n >> 14);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x1b6ae
cmpl $0x200000, -0xc(%rbp)   # imm = 0x200000
jl 0x1b720
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %eax
andl $0x7f, %eax
orl $0x80, %eax
movb %al, -0xd(%rbp)
leaq -0xd(%rbp), %rsi
callq 0x1bf40
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %eax
sarl $0x7, %eax
andl $0x7f, %eax
orl $0x80, %eax
movb %al, -0xe(%rbp)
leaq -0xe(%rbp), %rsi
callq 0x1bf40
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %eax
sarl $0xe, %eax
andl $0x7f, %eax
orl $0x80, %eax
movb %al, -0xf(%rbp)
leaq -0xf(%rbp), %rsi
callq 0x1bf40
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %eax
sarl $0x15, %eax
movb %al, -0x10(%rbp)
leaq -0x10(%rbp), %rsi
callq 0x1bf40
jmp 0x1b7d0
cmpl $0x80, -0xc(%rbp)
jge 0x1b741
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %eax
movb %al, -0x11(%rbp)
leaq -0x11(%rbp), %rsi
callq 0x1bf40
jmp 0x1b7ce
cmpl $0x4000, -0xc(%rbp)     # imm = 0x4000
jge 0x1b77d
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %eax
andl $0x7f, %eax
orl $0x80, %eax
movb %al, -0x12(%rbp)
leaq -0x12(%rbp), %rsi
callq 0x1bf40
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %eax
sarl $0x7, %eax
movb %al, -0x13(%rbp)
leaq -0x13(%rbp), %rsi
callq 0x1bf40
jmp 0x1b7cc
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %eax
andl $0x7f, %eax
orl $0x80, %eax
movb %al, -0x14(%rbp)
leaq -0x14(%rbp), %rsi
callq 0x1bf40
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %eax
sarl $0x7, %eax
andl $0x7f, %eax
orl $0x80, %eax
movb %al, -0x15(%rbp)
leaq -0x15(%rbp), %rsi
callq 0x1bf40
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %eax
sarl $0xe, %eax
movb %al, -0x16(%rbp)
leaq -0x16(%rbp), %rsi
callq 0x1bf40
jmp 0x1b7ce
jmp 0x1b7d0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Fohlen[P]cubescript-standalone/tools.cpp
// Function: getuint(databuf<unsigned char>&)
int getuint(ucharbuf &p)
{
    int n = p.get();
    if(n & 0x80)
    {
        n += (p.get() << 7) - 0x80;
        if(n & (1<<14)) n += (p.get() << 14) - (1<<14);
        if(n & (1<<21)) n += (p.get() << 21) - (1<<21);
        if(n & (1<<28)) n |= -1<<28;
    }
    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1be00
movzbl (%rax), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1ba0e
movq -0x8(%rbp), %rdi
callq 0x1be00
movzbl (%rax), %eax
shll $0x7, %eax
subl $0x80, %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
je 0x1b9cd
movq -0x8(%rbp), %rdi
callq 0x1be00
movzbl (%rax), %eax
shll $0xe, %eax
subl $0x4000, %eax           # imm = 0x4000
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
andl $0x200000, %eax         # imm = 0x200000
cmpl $0x0, %eax
je 0x1b9f4
movq -0x8(%rbp), %rdi
callq 0x1be00
movzbl (%rax), %eax
shll $0x15, %eax
subl $0x200000, %eax         # imm = 0x200000
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
andl $0x10000000, %eax       # imm = 0x10000000
cmpl $0x0, %eax
je 0x1ba0c
movl -0xc(%rbp), %eax
orl $0xf0000000, %eax       # imm = 0xF0000000
movl %eax, -0xc(%rbp)
jmp 0x1ba0e
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Fohlen[P]cubescript-standalone/tools.cpp
// Function: getstring(char*, databuf<unsigned char>&, unsigned long)
void getstring(char *text, ucharbuf &p, size_t len)
{
    char *t = text;
    do
    {
        if(t>=&text[len]) { text[len-1] = 0; return; }
        if(!p.remaining()) { *t = 0; return; }
        *t = getint(p);
    }
    while(*t++);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
addq -0x18(%rbp), %rcx
cmpq %rcx, %rax
jb 0x1bc6f
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
jmp 0x1bcab
movq -0x10(%rbp), %rdi
callq 0x1bf20
cmpl $0x0, %eax
jne 0x1bc86
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
jmp 0x1bcab
movq -0x10(%rbp), %rdi
callq 0x1b5a0
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
cmpb $0x0, (%rax)
jne 0x1bc4c
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)