// File: Fohlen[P]cubescript-standalone/command.cpp
// Function: compilestatements(vector<unsigned int>&, char const*&, int, int)
static void compilestatements(vector<uint> &code, const char *&p, int rettype, int brak)
{
    const char *line = p;
    char *idname = NULL;
    int idlen = 0;
    ident *id = NULL;
    int numargs = 0;
    for(;;)
    {
        skipcomments(p);
        idname = NULL;
        bool more = compileword(code, p, VAL_ANY, idname, idlen);
        if(!more) goto endstatement;
        skipcomments(p);
        if(p[0] == '=') switch(p[1]) 
        { 
            case '/': 
                if(p[2] != '/') break;
            case ';': case ' ': case '\t': case '\r': case '\n': case '\0':
                p++;
                if(idname) 
                {
                    id = newident(idname, IDF_UNKNOWN);
                    if(!id || id->type != ID_ALIAS) { compilestr(code, idname, idlen, true); id = NULL; }
                    delete[] idname;
                }
                if(!(more = compilearg(code, p, VAL_ANY))) compilestr(code);
                code.add(id && idname ? (id->index < MAXARGS ? CODE_ALIASARG : CODE_ALIAS)|(id->index<<8) : CODE_ALIASU);
                goto endstatement;
        }
        numargs = 0;
        if(!idname)
        {
        noid:
            while(numargs < MAXARGS && (more = compilearg(code, p, VAL_ANY))) numargs++;
            code.add(CODE_CALLU);
        }
        else
        {
            id = idents.access(idname);
            if(!id) 
            {
                if(!checknumber(idname)) { compilestr(code, idname, idlen); delete[] idname; goto noid; }
                char *end = idname;
                int val = int(strtoul(idname, &end, 0));
                if(*end) compilestr(code, idname, idlen);
                else compileint(code, val);    
                code.add(CODE_RESULT);
            }
            else switch(id->type)
            {
                case ID_ALIAS:
                    while(numargs < MAXARGS && (more = compilearg(code, p, VAL_ANY))) numargs++;
                    code.add((id->index < MAXARGS ? CODE_CALLARG : CODE_CALL)|(id->index<<8));
                    break;
                case ID_COMMAND:
                {
                    int comtype = CODE_COM, fakeargs = 0;
                    bool rep = false;
                    for(const char *fmt = id->args; *fmt; fmt++) switch(*fmt)
                    {
                    case 's': 
                        if(more) more = compilearg(code, p, VAL_STR);
                        if(!more) 
                        {
                            if(rep) break;
                            compilestr(code, NULL, 0, true);
                            fakeargs++;
                        }
                        else if(!fmt[1])
                        {
                            int numconc = 0;
                            while(numargs + numconc < MAXARGS && (more = compilearg(code, p, VAL_STR))) numconc++;
                            if(numconc > 0) code.add(CODE_CONC|RET_STR|((numconc+1)<<8));
                        }
                        numargs++;
                        break;
                    case 'i': if(more) more = compilearg(code, p, VAL_INT); if(!more) { if(rep) break; compileint(code); fakeargs++; } numargs++; break;
                    case 'b': if(more) more = compilearg(code, p, VAL_INT); if(!more) { if(rep) break; compileint(code, INT_MIN); fakeargs++; } numargs++; break;
                    case 'f': if(more) more = compilearg(code, p, VAL_FLOAT); if(!more) { if(rep) break; compilefloat(code); fakeargs++; } numargs++; break; 
                    case 't': if(more) more = compilearg(code, p, VAL_ANY); if(!more) { if(rep) break; compilenull(code); fakeargs++; } numargs++; break;
                    case 'e': if(more) more = compilearg(code, p, VAL_CODE); if(!more) { if(rep) break; compileblock(code); fakeargs++; } numargs++; break;
                    case 'r': if(more) more = compilearg(code, p, VAL_IDENT); if(!more) { if(rep) break; compileident(code); fakeargs++; } numargs++; break;
                    case '$': compileident(code, id); numargs++; break;
                    case 'N': compileint(code, numargs-fakeargs); numargs++; break;
                    case 'C': comtype = CODE_COMC; if(more) while(numargs < MAXARGS && (more = compilearg(code, p, VAL_ANY))) numargs++; numargs = 1; goto endfmt;
                    case 'V': comtype = CODE_COMV; if(more) while(numargs < MAXARGS && (more = compilearg(code, p, VAL_ANY))) numargs++; numargs = 2; goto endfmt;
                    case '1': case '2': case '3': case '4': if(more) { fmt -= *fmt-'0'+1; rep = true; } break;
                    }
                endfmt:
                    code.add(comtype|(rettype < VAL_ANY ? rettype<<CODE_RET : 0)|(id->index<<8));
                    break;
                }
                case ID_LOCAL:
                    if(more) while(numargs < MAXARGS && (more = compilearg(code, p, VAL_IDENT))) numargs++;
                    if(more) while((more = compilearg(code, p, VAL_ANY))) code.add(CODE_POP);
                    code.add(CODE_LOCAL);
                    break;
                case ID_VAR:
                    if(!(more = compilearg(code, p, VAL_INT))) code.add(CODE_PRINT|(id->index<<8));
                    else if(!(id->flags&IDF_HEX) || !(more = compilearg(code, p, VAL_INT))) code.add(CODE_IVAR1|(id->index<<8));
                    else if(!(more = compilearg(code, p, VAL_INT))) code.add(CODE_IVAR2|(id->index<<8));
                    else code.add(CODE_IVAR3|(id->index<<8));
                    break;
                case ID_FVAR:
                    if(!(more = compilearg(code, p, VAL_FLOAT))) code.add(CODE_PRINT|(id->index<<8));
                    else code.add(CODE_FVAR1|(id->index<<8));
                    break;
                case ID_SVAR:
                    if(!(more = compilearg(code, p, VAL_STR))) code.add(CODE_PRINT|(id->index<<8));
                    else 
                    {
                        int numconc = 0;
                        while(numconc+1 < MAXARGS && (more = compilearg(code, p, VAL_ANY))) numconc++;
                        if(numconc > 0) code.add(CODE_CONC|RET_STR|((numconc+1)<<8));
                        code.add(CODE_SVAR1|(id->index<<8));
                    }
                    break;
            }        
            delete[] idname;
        }
    endstatement:
        if(more) while(compilearg(code, p, VAL_ANY)) code.add(CODE_POP); 
        p += strcspn(p, ")];/\n\0");
        int c = *p++;
        switch(c)
        {
            case '\0':
                if(c != brak) debugcodeline(line, "missing \"%c\"", brak);
                p--;
                return;

            case ')':
            case ']':
                if(c == brak) return;
                debugcodeline(line, "unexpected \"%c\"", c); 
                break;

            case '/':
                if(*p == '/') p += strcspn(p, "\n\0");
                goto endstatement;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x108f0
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x4, %edx
leaq -0x28(%rbp), %rcx
leaq -0x2c(%rbp), %r8
callq 0x10970
andb $0x1, %al
movb %al, -0x3d(%rbp)
testb $0x1, -0x3d(%rbp)
jne 0xfc1d
jmp 0x10793
movq -0x10(%rbp), %rdi
callq 0x108f0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0xfdbd
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl 0x1(%rax), %eax
movl %eax, -0xb8(%rbp)
testl %eax, %eax
je 0xfcae
jmp 0xfc50
movl -0xb8(%rbp), %eax
addl $-0x9, %eax
subl $0x2, %eax
jb 0xfcae
jmp 0xfc60
movl -0xb8(%rbp), %eax
subl $0xd, %eax
je 0xfcae
jmp 0xfc6d
movl -0xb8(%rbp), %eax
subl $0x20, %eax
je 0xfcae
jmp 0xfc7a
movl -0xb8(%rbp), %eax
subl $0x2f, %eax
je 0xfc97
jmp 0xfc87
movl -0xb8(%rbp), %eax
subl $0x3b, %eax
je 0xfcae
jmp 0xfdbb
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl 0x2(%rax), %eax
cmpl $0x2f, %eax
je 0xfcac
jmp 0xfdbb
jmp 0xfcae
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0xfd21
movq -0x28(%rbp), %rdi
movl $0x20, %esi
callq 0x4e50
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0xfce5
movq -0x38(%rbp), %rax
cmpl $0x4, (%rax)
je 0xfd02
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl $0x1, %ecx
callq 0x10b10
movq $0x0, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xc0(%rbp)
cmpq $0x0, %rax
je 0xfd1f
movq -0xc0(%rbp), %rdi
callq 0x1b110
jmp 0xfd21
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x4, %edx
callq 0x10c10
movb %al, %cl
andb $0x1, %cl
movb %cl, -0x3d(%rbp)
testb $0x1, %al
jne 0xfd4c
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x10ca0
movq -0x8(%rbp), %rax
movq %rax, -0xc8(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0xfd90
cmpq $0x0, -0x28(%rbp)
je 0xfd90
movq -0x38(%rbp), %rax
movl 0x3c(%rax), %edx
movl $0x23, %eax
movl $0x25, %ecx
cmpl $0x19, %edx
cmovll %ecx, %eax
movq -0x38(%rbp), %rcx
movl 0x3c(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movl %eax, -0xcc(%rbp)
jmp 0xfd9d
movl $0x24, %eax
movl %eax, -0xcc(%rbp)
jmp 0xfd9d
movq -0xc8(%rbp), %rdi
movl -0xcc(%rbp), %eax
movl %eax, -0x44(%rbp)
leaq -0x44(%rbp), %rsi
callq 0x16f60
jmp 0x10793
jmp 0xfdbd
movl $0x0, -0x3c(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xfe2d
jmp 0xfdcd
jmp 0xfdcf
xorl %eax, %eax
cmpl $0x19, -0x3c(%rbp)
movb %al, -0xcd(%rbp)
jge 0xfdfd
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x4, %edx
callq 0x10c10
movb %al, %cl
andb $0x1, %cl
movb %cl, -0x3d(%rbp)
movb %al, -0xcd(%rbp)
movb -0xcd(%rbp), %al
testb $0x1, %al
jne 0xfe09
jmp 0xfe14
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xfdcf
movq -0x8(%rbp), %rdi
movl $0x27, -0x48(%rbp)
leaq -0x48(%rbp), %rsi
callq 0x16f60
jmp 0x10791
leaq 0x1784c(%rip), %rdi     # 0x27680
leaq -0x28(%rbp), %rsi
callq 0x15af0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0xfee9
movq -0x28(%rbp), %rdi
callq 0x4ef0
testb $0x1, %al
jne 0xfe8d
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x2c(%rbp), %edx
xorl %ecx, %ecx
callq 0x10b10
movq -0x28(%rbp), %rax
movq %rax, -0xd8(%rbp)
cmpq $0x0, %rax
je 0xfe88
movq -0xd8(%rbp), %rdi
callq 0x1b110
jmp 0xfdcd
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x50(%rbp), %rsi
xorl %edx, %edx
callq 0x2070
movl %eax, -0x54(%rbp)
movq -0x50(%rbp), %rax
cmpb $0x0, (%rax)
je 0xfec4
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x2c(%rbp), %edx
xorl %ecx, %ecx
callq 0x10b10
jmp 0xfed0
movq -0x8(%rbp), %rdi
movl -0x54(%rbp), %esi
callq 0x10d00
movq -0x8(%rbp), %rdi
movl $0xc, -0x58(%rbp)
leaq -0x58(%rbp), %rsi
callq 0x16f60
jmp 0x10772
movq -0x38(%rbp), %rax
movl (%rax), %eax
movq %rax, -0xe0(%rbp)
subq $0x5, %rax
ja 0x10770
movq -0xe0(%rbp), %rax
leaq 0xd73a(%rip), %rcx      # 0x1d648
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0xff19
xorl %eax, %eax
cmpl $0x19, -0x3c(%rbp)
movb %al, -0xe1(%rbp)
jge 0xff47
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x4, %edx
callq 0x10c10
movb %al, %cl
andb $0x1, %cl
movb %cl, -0x3d(%rbp)
movb %al, -0xe1(%rbp)
movb -0xe1(%rbp), %al
testb $0x1, %al
jne 0xff53
jmp 0xff5e
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xff19
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl 0x3c(%rax), %edx
movl $0x26, %eax
movl $0x28, %ecx
cmpl $0x19, %edx
cmovll %ecx, %eax
movq -0x38(%rbp), %rcx
movl 0x3c(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movl %eax, -0x5c(%rbp)
leaq -0x5c(%rbp), %rsi
callq 0x16f60
jmp 0x10770
movl $0x10, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
movb $0x0, -0x65(%rbp)
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
cmpb $0x0, (%rax)
je 0x103f2
movq -0x70(%rbp), %rax
movsbl (%rax), %eax
addl $-0x24, %eax
movl %eax, %ecx
movq %rcx, -0xf0(%rbp)
subl $0x50, %eax
ja 0x103df
movq -0xf0(%rbp), %rax
leaq 0xd675(%rip), %rcx      # 0x1d660
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testb $0x1, -0x3d(%rbp)
je 0x10011
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x3, %edx
callq 0x10c10
andb $0x1, %al
movb %al, -0x3d(%rbp)
testb $0x1, -0x3d(%rbp)
jne 0x10044
testb $0x1, -0x65(%rbp)
je 0x10022
jmp 0x103df
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x10b10
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x100c7
movq -0x70(%rbp), %rax
cmpb $0x0, 0x1(%rax)
jne 0x100c5
movl $0x0, -0x74(%rbp)
movl -0x3c(%rbp), %ecx
addl -0x74(%rbp), %ecx
xorl %eax, %eax
cmpl $0x19, %ecx
movb %al, -0xf1(%rbp)
jge 0x10088
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x3, %edx
callq 0x10c10
movb %al, %cl
andb $0x1, %cl
movb %cl, -0x3d(%rbp)
movb %al, -0xf1(%rbp)
movb -0xf1(%rbp), %al
testb $0x1, %al
jne 0x10094
jmp 0x1009f
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x10055
cmpl $0x0, -0x74(%rbp)
jle 0x100c3
movq -0x8(%rbp), %rdi
movl -0x74(%rbp), %eax
addl $0x1, %eax
shll $0x8, %eax
orl $0xd4, %eax
movl %eax, -0x78(%rbp)
leaq -0x78(%rbp), %rsi
callq 0x16f60
jmp 0x100c5
jmp 0x100c7
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x103df
testb $0x1, -0x3d(%rbp)
je 0x100f2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x10c10
andb $0x1, %al
movb %al, -0x3d(%rbp)
testb $0x1, -0x3d(%rbp)
jne 0x10119
testb $0x1, -0x65(%rbp)
je 0x10103
jmp 0x103df
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x10d70
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x103df
testb $0x1, -0x3d(%rbp)
je 0x10144
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x10c10
andb $0x1, %al
movb %al, -0x3d(%rbp)
testb $0x1, -0x3d(%rbp)
jne 0x1016c
testb $0x1, -0x65(%rbp)
je 0x10155
jmp 0x103df
movq -0x8(%rbp), %rdi
movl $0x80000000, %esi       # imm = 0x80000000
callq 0x10d00
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x103df
testb $0x1, -0x3d(%rbp)
je 0x10197
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x2, %edx
callq 0x10c10
andb $0x1, %al
movb %al, -0x3d(%rbp)
testb $0x1, -0x3d(%rbp)
jne 0x101be
testb $0x1, -0x65(%rbp)
je 0x101a8
jmp 0x103df
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x10dc0
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x103df
testb $0x1, -0x3d(%rbp)
je 0x101e9
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x4, %edx
callq 0x10c10
andb $0x1, %al
movb %al, -0x3d(%rbp)
testb $0x1, -0x3d(%rbp)
jne 0x1020c
testb $0x1, -0x65(%rbp)
je 0x101fa
jmp 0x103df
movq -0x8(%rbp), %rdi
callq 0x10e10
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x103df
testb $0x1, -0x3d(%rbp)
je 0x10237
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x5, %edx
callq 0x10c10
andb $0x1, %al
movb %al, -0x3d(%rbp)
testb $0x1, -0x3d(%rbp)
jne 0x1025a
testb $0x1, -0x65(%rbp)
je 0x10248
jmp 0x103df
movq -0x8(%rbp), %rdi
callq 0x10e40
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x103df
testb $0x1, -0x3d(%rbp)
je 0x10285
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x7, %edx
callq 0x10c10
andb $0x1, %al
movb %al, -0x3d(%rbp)
testb $0x1, -0x3d(%rbp)
jne 0x102ac
testb $0x1, -0x65(%rbp)
je 0x10296
jmp 0x103df
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x10ed0
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x103df
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x10f30
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x103df
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
subl -0x64(%rbp), %esi
callq 0x10d00
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x103df
movl $0x12, -0x60(%rbp)
testb $0x1, -0x3d(%rbp)
je 0x10348
jmp 0x10301
xorl %eax, %eax
cmpl $0x19, -0x3c(%rbp)
movb %al, -0xf2(%rbp)
jge 0x1032f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x4, %edx
callq 0x10c10
movb %al, %cl
andb $0x1, %cl
movb %cl, -0x3d(%rbp)
movb %al, -0xf2(%rbp)
movb -0xf2(%rbp), %al
testb $0x1, %al
jne 0x1033b
jmp 0x10346
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x10301
jmp 0x10348
movl $0x1, -0x3c(%rbp)
jmp 0x103f4
movl $0x13, -0x60(%rbp)
testb $0x1, -0x3d(%rbp)
je 0x103aa
jmp 0x10363
xorl %eax, %eax
cmpl $0x19, -0x3c(%rbp)
movb %al, -0xf3(%rbp)
jge 0x10391
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x4, %edx
callq 0x10c10
movb %al, %cl
andb $0x1, %cl
movb %cl, -0x3d(%rbp)
movb %al, -0xf3(%rbp)
movb -0xf3(%rbp), %al
testb $0x1, %al
jne 0x1039d
jmp 0x103a8
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x10363
jmp 0x103aa
movl $0x2, -0x3c(%rbp)
jmp 0x103f4
testb $0x1, -0x3d(%rbp)
je 0x103dd
movq -0x70(%rbp), %rax
movsbl (%rax), %ecx
subl $0x30, %ecx
addl $0x1, %ecx
movq -0x70(%rbp), %rax
movslq %ecx, %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movb $0x1, -0x65(%rbp)
jmp 0x103df
jmp 0x103e1
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0xffb4
jmp 0x103f4
movq -0x8(%rbp), %rax
movq %rax, -0x100(%rbp)
movl -0x60(%rbp), %eax
movl %eax, -0xf8(%rbp)
cmpl $0x4, -0x14(%rbp)
jge 0x1041c
movl -0x14(%rbp), %eax
shll $0x6, %eax
movl %eax, -0x104(%rbp)
jmp 0x10426
xorl %eax, %eax
movl %eax, -0x104(%rbp)
jmp 0x10426
movq -0x100(%rbp), %rdi
movl -0xf8(%rbp), %eax
movl -0x104(%rbp), %ecx
orl %ecx, %eax
movq -0x38(%rbp), %rcx
movl 0x3c(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movl %eax, -0x7c(%rbp)
leaq -0x7c(%rbp), %rsi
callq 0x16f60
jmp 0x10770
testb $0x1, -0x3d(%rbp)
je 0x104a7
jmp 0x10460
xorl %eax, %eax
cmpl $0x19, -0x3c(%rbp)
movb %al, -0x105(%rbp)
jge 0x1048e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x7, %edx
callq 0x10c10
movb %al, %cl
andb $0x1, %cl
movb %cl, -0x3d(%rbp)
movb %al, -0x105(%rbp)
movb -0x105(%rbp), %al
testb $0x1, %al
jne 0x1049a
jmp 0x104a5
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x10460
jmp 0x104a7
testb $0x1, -0x3d(%rbp)
je 0x104e7
jmp 0x104af
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x4, %edx
callq 0x10c10
movb %al, %cl
andb $0x1, %cl
movb %cl, -0x3d(%rbp)
testb $0x1, %al
jne 0x104cf
jmp 0x104e5
movq -0x8(%rbp), %rdi
movl $0x2, -0x80(%rbp)
leaq -0x80(%rbp), %rsi
callq 0x16f60
jmp 0x104af
jmp 0x104e7
movq -0x8(%rbp), %rdi
movl $0x2a, -0x84(%rbp)
leaq -0x84(%rbp), %rsi
callq 0x16f60
jmp 0x10770
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x10c10
movb %al, %cl
andb $0x1, %cl
movb %cl, -0x3d(%rbp)
testb $0x1, %al
jne 0x1054c
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl 0x3c(%rax), %eax
shll $0x8, %eax
orl $0x29, %eax
movl %eax, -0x88(%rbp)
leaq -0x88(%rbp), %rsi
callq 0x16f60
jmp 0x10608
movq -0x38(%rbp), %rax
movl 0x38(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x10579
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x10c10
movb %al, %cl
andb $0x1, %cl
movb %cl, -0x3d(%rbp)
testb $0x1, %al
jne 0x1059e
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl 0x3c(%rax), %eax
shll $0x8, %eax
orl $0x1b, %eax
movl %eax, -0x8c(%rbp)
leaq -0x8c(%rbp), %rsi
callq 0x16f60
jmp 0x10606
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x10c10
movb %al, %cl
andb $0x1, %cl
movb %cl, -0x3d(%rbp)
testb $0x1, %al
jne 0x105e1
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl 0x3c(%rax), %eax
shll $0x8, %eax
orl $0x1c, %eax
movl %eax, -0x90(%rbp)
leaq -0x90(%rbp), %rsi
callq 0x16f60
jmp 0x10604
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl 0x3c(%rax), %eax
shll $0x8, %eax
orl $0x1d, %eax
movl %eax, -0x94(%rbp)
leaq -0x94(%rbp), %rsi
callq 0x16f60
jmp 0x10606
jmp 0x10608
jmp 0x10770
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x2, %edx
callq 0x10c10
movb %al, %cl
andb $0x1, %cl
movb %cl, -0x3d(%rbp)
testb $0x1, %al
jne 0x10650
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl 0x3c(%rax), %eax
shll $0x8, %eax
orl $0x29, %eax
movl %eax, -0x98(%rbp)
leaq -0x98(%rbp), %rsi
callq 0x16f60
jmp 0x10673
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl 0x3c(%rax), %eax
shll $0x8, %eax
orl $0x1f, %eax
movl %eax, -0x9c(%rbp)
leaq -0x9c(%rbp), %rsi
callq 0x16f60
jmp 0x10770
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x3, %edx
callq 0x10c10
movb %al, %cl
andb $0x1, %cl
movb %cl, -0x3d(%rbp)
testb $0x1, %al
jne 0x106be
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl 0x3c(%rax), %eax
shll $0x8, %eax
orl $0x29, %eax
movl %eax, -0xa0(%rbp)
leaq -0xa0(%rbp), %rsi
callq 0x16f60
jmp 0x1076e
movl $0x0, -0xa4(%rbp)
movl -0xa4(%rbp), %ecx
addl $0x1, %ecx
xorl %eax, %eax
cmpl $0x19, %ecx
movb %al, -0x106(%rbp)
jge 0x106fe
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x4, %edx
callq 0x10c10
movb %al, %cl
andb $0x1, %cl
movb %cl, -0x3d(%rbp)
movb %al, -0x106(%rbp)
movb -0x106(%rbp), %al
testb $0x1, %al
jne 0x1070a
jmp 0x1071b
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0x106c8
cmpl $0x0, -0xa4(%rbp)
jle 0x1074b
movq -0x8(%rbp), %rdi
movl -0xa4(%rbp), %eax
addl $0x1, %eax
shll $0x8, %eax
orl $0xd4, %eax
movl %eax, -0xa8(%rbp)
leaq -0xa8(%rbp), %rsi
callq 0x16f60
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movl 0x3c(%rax), %eax
shll $0x8, %eax
orl $0x19, %eax
movl %eax, -0xac(%rbp)
leaq -0xac(%rbp), %rsi
callq 0x16f60
jmp 0x10770
jmp 0x10772
movq -0x28(%rbp), %rax
movq %rax, -0x110(%rbp)
cmpq $0x0, %rax
je 0x1078f
movq -0x110(%rbp), %rdi
callq 0x1b110
jmp 0x10791
jmp 0x10793
testb $0x1, -0x3d(%rbp)
je 0x107d1
jmp 0x1079b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x4, %edx
callq 0x10c10
testb $0x1, %al
jne 0x107b3
jmp 0x107cf
movq -0x8(%rbp), %rdi
movl $0x2, -0xb0(%rbp)
leaq -0xb0(%rbp), %rsi
callq 0x16f60
jmp 0x1079b
jmp 0x107d1
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0xd5c3(%rip), %rsi      # 0x1dda2
callq 0x2040
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq %rdx, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq (%rcx), %rax
movq %rax, %rdx
incq %rdx
movq %rdx, (%rcx)
movsbl (%rax), %eax
movl %eax, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
movl %eax, -0x114(%rbp)
testl %eax, %eax
je 0x10849
jmp 0x1081f
movl -0x114(%rbp), %eax
subl $0x29, %eax
je 0x10879
jmp 0x1082c
movl -0x114(%rbp), %eax
subl $0x2f, %eax
je 0x108a0
jmp 0x10839
movl -0x114(%rbp), %eax
subl $0x5d, %eax
je 0x10879
jmp 0x108d4
movl -0xb4(%rbp), %eax
cmpl -0x18(%rbp), %eax
je 0x10869
movq -0x20(%rbp), %rdi
movl -0x18(%rbp), %edx
leaq 0xda86(%rip), %rsi      # 0x1e2e8
movb $0x0, %al
callq 0x10f80
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $-0x1, %rcx
movq %rcx, (%rax)
jmp 0x108d9
movl -0xb4(%rbp), %eax
cmpl -0x18(%rbp), %eax
jne 0x10886
jmp 0x108d9
movq -0x20(%rbp), %rdi
movl -0xb4(%rbp), %edx
leaq 0xda5e(%rip), %rsi      # 0x1e2f5
movb $0x0, %al
callq 0x10f80
jmp 0x108d4
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x108cf
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0xd4ec(%rip), %rsi      # 0x1dda9
callq 0x2040
movq %rax, %rcx
movq -0x10(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x10793
jmp 0xfbe2
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopw %cs:(%rax,%rax)