// File: /workspace/github_c_makefile_star2_O2/endeav0r[P]hvm/src/lexer.c
// Function: lexer
struct _token * lexer (const char * text)
{
    int i     = 0;
    int j, k  = 0;
    int line  = 1;
    char buf[64];

    struct _lexer lexer;
    lexer.first = NULL;
    lexer.last  = NULL;

    while (text[i] != '\0') {
        if (    (text[i] == ' ')
             || (text[i] == '\t')) {
            i++;
            continue;
        }

        if (text[i] == '\n') {
            lexer_append(&lexer, token_create(TOK_NEWLINE, NULL, line));
            i++;
            line++;
            continue;
        }

        if (text[i] == ',') {
            lexer_append(&lexer, token_create(TOK_COMMA, NULL, line));
            i++;
            continue;
        }

        if (text[i] == ';') {
            while (text[i] != '\n')
                i++;
            continue;
        }

        #define MATCHTOK(TOKSTR, TOKVAL) \
        if (strncmp(&(text[i]), #TOKSTR, strlen(#TOKSTR)) == 0) { \
            if (    ((text[i+strlen(#TOKSTR)] < 'a') || (text[i+strlen(#TOKSTR)] > 'z')) \
                 && ((text[i+strlen(#TOKSTR)] < '0') || (text[i+strlen(#TOKSTR)] > '9')) \
                 && (text[i+strlen(#TOKSTR)] != '_')) { \
                lexer_append(&lexer, token_create(TOKVAL, #TOKSTR, line)); \
                i += strlen(#TOKSTR); \
                continue; \
            } \
        }

        MATCHTOK(r0,      REG_0)
        MATCHTOK(r1,      REG_1)
        MATCHTOK(r2,      REG_2)
        MATCHTOK(r3,      REG_3)
        MATCHTOK(r4,      REG_4)
        MATCHTOK(r5,      REG_5)
        MATCHTOK(r6,      REG_6)
        MATCHTOK(r7,      REG_7)
        MATCHTOK(rsp,     REG_SP)
        MATCHTOK(rbp,     REG_BP)
        MATCHTOK(rip,     REG_IP)
        MATCHTOK(mov,     OP_MOV)
        MATCHTOK(cmp,     OP_CMP)
        MATCHTOK(add,     OP_ADD)
        MATCHTOK(sub,     OP_SUB)
        MATCHTOK(mul,     OP_MUL)
        MATCHTOK(div,     OP_DIV)
        MATCHTOK(mod,     OP_MOD)
        MATCHTOK(and,     OP_AND)
        MATCHTOK(or,      OP_OR)
        MATCHTOK(xor,     OP_XOR)
        MATCHTOK(jmp,     OP_JMP)
        MATCHTOK(je,      OP_JE)
        MATCHTOK(jne,     OP_JNE)
        MATCHTOK(jle,     OP_JLE)
        MATCHTOK(jl,      OP_JL)
        MATCHTOK(jge,     OP_JGE)
        MATCHTOK(jg,      OP_JG)
        MATCHTOK(call,    OP_CALL)
        MATCHTOK(ret,     OP_RET)
        MATCHTOK(loadb,   OP_LOADB)
        MATCHTOK(load,    OP_LOAD)
        MATCHTOK(storb,   OP_STORB)
        MATCHTOK(stor,    OP_STOR)
        MATCHTOK(in,      OP_IN)
        MATCHTOK(out,     OP_OUT)
        MATCHTOK(push,    OP_PUSH)
        MATCHTOK(pop,     OP_POP)
        MATCHTOK(hlt,     OP_HLT)
        MATCHTOK(syscall, OP_SYSCALL)
        MATCHTOK(nop,     OP_NOP)

        // numbers
        if (((text[i] >= '0') && (text[i] <= '9')) || (text[i] == '-')) {
            if ((text[i + 1] == 'x') && (text[i] != '-')) {
                for (j = i + 2;
                     (    ((text[j] >= '0') && (text[j] <= '9'))
                       || ((text[j] >= 'a') && (text[j] <= 'f')));
                     j++) {}
            }
            else {
                for (j = i + 1;
                     ((text[j] >= '0') && (text[j] <= '9'));
                     j++) {}
            }
            // catch #x case
            if (text[j - 1] != 'x') {
                strncpy(buf, &(text[i]), j - i < 64 ? j - i : 64);
                buf[j - i] = '\0'; // weird strncpy not copy null-terminator
                buf[63] = '\0';
                lexer_append(&lexer, token_create(TOK_NUMBER, buf, line));
                i = j;
                continue;
            }
        }

        // labels
        if ((text[i] >= 'a') && (text[i] <= 'z')) {
            for (j = i + 1; 
                       ((text[j] >= 'a') && (text[j] <= 'z'))
                    || ((text[j] >= '0') && (text[j] <= '9'))
                    || (text[j] == '_');
                 j++) {}
            for (k = j; (text[k] == ' ') || (text[k] == '\t'); k++) {}
            strncpy(buf, &(text[i]), j - i < 64 ? j - i : 64);
            buf[j - i] = '\0';
            buf[63] = '\0';
            if (text[k] == ':') {
                lexer_append(&lexer, token_create(TOK_LABELDEC, buf, line));
                i = k + 1;
            }
            else {
                lexer_append(&lexer, token_create(TOK_LABEL, buf, line));
                i = j;
            }
            continue;
        }

        // strings
        if (text[i] == '"') {
            char * tmpstr = (char *) malloc(4096);
            j = i + 1;
            k = 0;
            while (text[j] != '"') {
                if (text[j] == '\\') {
                    j++;
                    if (text[j] == 'n')
                        tmpstr[k++] = '\n';
                    else if (text[j] == 't')
                        tmpstr[k++] = '\t';
                    else
                        tmpstr[k++] = text[j];
                }
                else
                    tmpstr[k++] = text[j];
                j++;
            }
            tmpstr[k] = '\0';
            lexer_append(&lexer, token_create(TOK_STRING, tmpstr, line));
            i = j + 1;
            free(tmpstr);
            continue;
        }


        fprintf(stderr, "invalid input to lexer, line %d (char=0x%02x)\n",
                line, text[i]);

        return NULL;
    }

    if (lexer.last == NULL)
        return NULL;

    if (lexer.last->type != TOK_NEWLINE)
        lexer_append(&lexer, token_create(TOK_NEWLINE, NULL, line));

    return lexer.first;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rax
xorl %r13d, %r13d
xorl %r14d, %r14d
xorl %r12d, %r12d
movl %eax, 0x4(%rsp)
movq %r14, %rdx
movq %r13, %rax
movslq %r12d, %rbp
movsbl (%rbx,%rbp), %r15d
cmpl $0x9, %r15d
je 0x303f
movzbl %r15b, %r13d
cmpl $0xa, %r13d
je 0x3090
cmpl $0x20, %r13d
je 0x303f
cmpl $0x2c, %r13d
je 0x305f
leaq (%rbx,%rbp), %r14
cmpl $0x3b, %r13d
je 0x3044
testl %r13d, %r13d
je 0x3d1a
movq %rax, 0x8(%rsp)
cmpb $0x72, %r15b
jne 0x30c5
cmpb $0x30, 0x1(%r14)
jne 0x2e5d
movb 0x2(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x2e5d
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3178
cmpb $0x31, 0x1(%r14)
jne 0x2e86
movb 0x2(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x2e86
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x336b
cmpb $0x32, 0x1(%r14)
jne 0x2eaf
movb 0x2(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x2eaf
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x337a
cmpb $0x33, 0x1(%r14)
jne 0x2ed8
movb 0x2(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x2ed8
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3a54
cmpb $0x34, 0x1(%r14)
jne 0x2f01
movb 0x2(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x2f01
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3aa3
cmpb $0x35, 0x1(%r14)
jne 0x2f2a
movb 0x2(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x2f2a
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3af6
cmpb $0x36, 0x1(%r14)
jne 0x2f53
movb 0x2(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x2f53
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3b0e
cmpb $0x37, 0x1(%r14)
jne 0x2f7c
movb 0x2(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x2f7c
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3b5e
movq %rdx, 0x10(%rsp)
cmpb $0x73, 0x1(%r14)
jne 0x2fb1
cmpb $0x70, 0x2(%r14)
jne 0x2fb1
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x2fb1
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3c56
cmpb $0x62, 0x1(%r14)
jne 0x2fe1
cmpb $0x70, 0x2(%r14)
jne 0x2fe1
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x2fe1
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3c62
cmpb $0x69, 0x1(%r14)
movq 0x10(%rsp), %rdx
jne 0x33b9
cmpb $0x70, 0x2(%r14)
jne 0x33b9
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x33b9
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
jne 0x33b9
pushq $0x7
popq %rdi
leaq 0x33e8(%rip), %rsi      # 0x6414
movl 0x4(%rsp), %edx
callq 0x3d74
movq 0x10(%rsp), %rcx
jmp 0x3cfa
incl %r12d
jmp 0x3054
decl %r12d
incl %r12d
cmpb $0xa, (%r14)
leaq 0x1(%r14), %r14
jne 0x3047
movq %rax, %r13
movq %rdx, %r14
jmp 0x2dd4
movq %rax, %r15
pushq $0x71
popq %rdi
xorl %esi, %esi
movq %rdx, %r14
movl 0x4(%rsp), %edx
callq 0x3d74
movq %r14, %rcx
movq %rax, %r14
movq %rax, %r13
testq %rcx, %rcx
je 0x3088
movq %r14, 0x10(%rcx)
movq %r15, %r13
incl %r12d
jmp 0x2dd4
movq %rax, %r15
pushq $0x70
popq %rdi
xorl %esi, %esi
movq %rdx, %r14
movl 0x4(%rsp), %edx
callq 0x3d74
movq %r14, %rcx
movq %rax, %r14
movq %rax, %r13
testq %rcx, %rcx
je 0x30b9
movq %r14, 0x10(%rcx)
movq %r15, %r13
incl %r12d
incl 0x4(%rsp)
jmp 0x2dd4
xorl %esi, %esi
leal -0x61(%r13), %eax
cmpl $0xe, %eax
ja 0x315f
leaq 0x33dd(%rip), %rcx      # 0x64b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpb $0x64, 0x1(%r14)
jne 0x3114
cmpb $0x64, 0x2(%r14)
jne 0x3114
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x3114
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3cbd
cmpb $0x6e, 0x1(%r14)
jne 0x32c3
cmpb $0x64, 0x2(%r14)
jne 0x32c3
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x32c3
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
jne 0x32c3
pushq $0x1a
popq %rdi
leaq 0x32d2(%rip), %rsi      # 0x642c
jmp 0x3ceb
cmpl $0x73, %r13d
je 0x3389
cmpl $0x78, %r13d
je 0x3320
jmp 0x350e
xorl %edi, %edi
leaq 0x3273(%rip), %rsi      # 0x63f4
jmp 0x3b68
cmpb $0x6d, 0x1(%r14)
jne 0x33b9
cmpb $0x70, 0x2(%r14)
jne 0x33b9
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x33b9
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
jne 0x33b9
pushq $0x53
popq %rdi
leaq 0x32af(%rip), %rsi      # 0x647b
jmp 0x3ceb
cmpb $0x69, 0x1(%r14)
jne 0x33b9
cmpb $0x76, 0x2(%r14)
jne 0x33b9
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x33b9
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
jne 0x33b9
pushq $0x16
popq %rdi
leaq 0x320d(%rip), %rsi      # 0x6424
jmp 0x3ceb
cmpb $0x6f, 0x1(%r14)
jne 0x324c
cmpb $0x76, 0x2(%r14)
jne 0x324c
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x324c
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3cc9
cmpb $0x75, 0x1(%r14)
jne 0x327c
cmpb $0x6c, 0x2(%r14)
jne 0x327c
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x327c
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3cd5
cmpb $0x6f, 0x1(%r14)
jne 0x32c3
cmpb $0x64, 0x2(%r14)
jne 0x33b9
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x33b9
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
jne 0x33b9
pushq $0x18
popq %rdi
leaq 0x316a(%rip), %rsi      # 0x6428
jmp 0x3ceb
cmpl $0x6a, %r13d
je 0x33c3
cmpl $0x78, %r13d
je 0x3320
cmpl $0x6f, %r13d
jne 0x350c
movb $0x1, %sil
cmpb $0x72, 0x1(%r14)
jne 0x350e
movb 0x2(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x350e
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
jne 0x350e
pushq $0x1c
popq %rdi
leaq 0x3143(%rip), %rsi      # 0x645e
jmp 0x3b68
cmpb $0x6f, 0x1(%r14)
jne 0x350c
cmpb $0x72, 0x2(%r14)
jne 0x350c
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x350c
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
jne 0x350c
pushq $0x1e
popq %rdi
leaq 0x30ca(%rip), %rsi      # 0x6430
jmp 0x3ceb
pushq $0x1
popq %rdi
leaq 0x3082(%rip), %rsi      # 0x63f7
jmp 0x3b68
pushq $0x2
popq %rdi
leaq 0x3076(%rip), %rsi      # 0x63fa
jmp 0x3b68
cmpb $0x75, 0x1(%r14)
jne 0x33b9
cmpb $0x62, 0x2(%r14)
jne 0x33b9
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x33b9
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3ce1
cmpl $0x6a, %r13d
jne 0x350c
cmpb $0x6d, 0x1(%r14)
jne 0x33f3
cmpb $0x70, 0x2(%r14)
jne 0x33f3
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x33f3
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3c15
cmpb $0x65, 0x1(%r14)
jne 0x341c
movb 0x2(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x341c
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3b1a
cmpb $0x6e, 0x1(%r14)
jne 0x344c
cmpb $0x65, 0x2(%r14)
jne 0x344c
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x344c
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3c38
cmpb $0x6c, 0x1(%r14)
jne 0x347c
cmpb $0x65, 0x2(%r14)
jne 0x347c
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x347c
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3c47
movq %rdx, 0x10(%rsp)
cmpb $0x6c, 0x1(%r14)
jne 0x34aa
movb 0x2(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x34aa
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3bcf
cmpb $0x67, 0x1(%r14)
jne 0x34da
cmpb $0x65, 0x2(%r14)
jne 0x34da
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x34da
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3c6e
cmpb $0x67, 0x1(%r14)
jne 0x3841
movb 0x2(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
movq 0x10(%rsp), %rdx
ja 0x350c
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3bf8
xorl %esi, %esi
movl %esi, 0x1c(%rsp)
movq %rdx, 0x10(%rsp)
movq %r14, %rdi
leaq 0x2f65(%rip), %rsi      # 0x6486
pushq $0x4
popq %rdx
callq 0x2090
testl %eax, %eax
jne 0x354f
movb 0x4(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x354f
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3a45
cmpl $0x72, %r13d
jne 0x3585
cmpb $0x65, 0x1(%r14)
jne 0x3585
cmpb $0x74, 0x2(%r14)
jne 0x3585
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x3585
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3c2c
movq %r14, %rdi
leaq 0x2ec7(%rip), %rsi      # 0x6456
pushq $0x5
popq %rdx
callq 0x2090
testl %eax, %eax
jne 0x35bd
movb 0x5(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x35bd
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3a63
movq %r14, %rdi
leaq 0x2e8a(%rip), %rsi      # 0x6451
pushq $0x4
popq %rdx
callq 0x2090
testl %eax, %eax
jne 0x35f5
movb 0x4(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x35f5
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3ab2
movq %r14, %rdi
leaq 0x2e62(%rip), %rsi      # 0x6461
pushq $0x5
popq %rdx
callq 0x2090
testl %eax, %eax
jne 0x362d
movb 0x5(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x362d
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3abe
movq %r14, %rdi
leaq 0x2e25(%rip), %rsi      # 0x645c
pushq $0x4
popq %rdx
callq 0x2090
testl %eax, %eax
jne 0x3665
movb 0x4(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x3665
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3b02
cmpb $0x69, %r15b
jne 0x369f
cmpb $0x6e, 0x1(%r14)
jne 0x36d6
movb 0x2(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x36d6
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
jne 0x36d6
pushq $0x40
popq %rdi
leaq 0x2dcd(%rip), %rsi      # 0x6467
jmp 0x3bd9
cmpb $0x0, 0x1c(%rsp)
je 0x36d6
cmpb $0x75, 0x1(%r14)
jne 0x36d6
cmpb $0x74, 0x2(%r14)
jne 0x36d6
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x36d6
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3c94
movq %r14, %rdi
leaq 0x2d8e(%rip), %rsi      # 0x646e
pushq $0x4
popq %rdx
callq 0x2090
testl %eax, %eax
jne 0x370e
movb 0x4(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x370e
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3b26
cmpb $0x68, %r15b
je 0x3758
movzbl %r15b, %eax
cmpl $0x70, %eax
jne 0x3788
cmpb $0x6f, 0x1(%r14)
jne 0x3788
cmpb $0x70, 0x2(%r14)
jne 0x3788
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x3788
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
jne 0x3788
pushq $0x44
popq %rdi
leaq 0x2d20(%rip), %rsi      # 0x6473
jmp 0x3c9e
cmpb $0x6c, 0x1(%r14)
jne 0x3788
cmpb $0x74, 0x2(%r14)
jne 0x3788
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x3788
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3c88
movq %r14, %rdi
leaq 0x2cf1(%rip), %rsi      # 0x6483
pushq $0x7
popq %rdx
callq 0x2090
testl %eax, %eax
jne 0x37c0
movb 0x7(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x37c0
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3b97
cmpb $0x6e, (%r14)
jne 0x37f6
cmpb $0x6f, 0x1(%r14)
jne 0x37f6
cmpb $0x70, 0x2(%r14)
jne 0x37f6
movb 0x3(%rbx,%rbp), %al
leal -0x7b(%rax), %ecx
cmpb $-0x1b, %cl
ja 0x37f6
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
cmpb $0x5f, %al
sete %al
orb %cl, %al
je 0x3c7a
leal -0x30(%r15), %eax
cmpb $0xa, %al
setae %al
cmpl $0x2d, %r13d
setne %cl
testb %al, %cl
jne 0x386e
cmpb $0x2d, %r15b
je 0x384d
cmpb $0x78, 0x1(%rbx,%rbp)
jne 0x384d
leal 0x2(%r12), %eax
movslq %eax, %rbp
decq %rbp
movb 0x1(%rbx,%rbp), %al
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
setb %cl
addb $-0x61, %al
cmpb $0x6, %al
setb %al
orb %cl, %al
incq %rbp
testb %al, %al
jne 0x3822
jmp 0x3860
xorl %esi, %esi
movq 0x10(%rsp), %rdx
jmp 0x350e
incq %rbp
decq %rbp
movb 0x1(%rbx,%rbp), %al
addb $-0x30, %al
incq %rbp
cmpb $0xa, %al
jb 0x3853
movslq %ebp, %rax
cmpb $0x78, -0x1(%rbx,%rax)
jne 0x39dd
leal -0x61(%r15), %eax
cmpb $0x19, %al
ja 0x38b2
leal 0x1(%r12), %eax
cltq
leal 0x2(%r12), %ebp
addq %rbx, %rax
pushq $0x1
popq %r15
movb (%r14,%r15), %cl
leal -0x61(%rcx), %edx
cmpb $0x1a, %dl
jb 0x38a8
leal -0x30(%rcx), %edx
cmpb $0xa, %dl
setb %dl
cmpb $0x5f, %cl
sete %cl
orb %dl, %cl
je 0x391a
incq %r15
incl %ebp
incq %rax
jmp 0x3889
cmpb $0x22, %r15b
jne 0x3d41
movl $0x1000, %edi           # imm = 0x1000
callq 0x21f0
movq %rax, %r15
xorl %eax, %eax
movslq %r12d, %rcx
movzbl 0x1(%rbx,%rcx), %edx
cmpl $0x5c, %edx
je 0x38ed
cmpl $0x22, %edx
je 0x399d
incq %rcx
movb %dl, (%r15,%rax)
movl %ecx, %r12d
jmp 0x3915
movzbl 0x2(%rbx,%rcx), %edx
addq $0x2, %rcx
movl %ecx, %r12d
cmpl $0x74, %edx
je 0x390a
cmpl $0x6e, %edx
jne 0x3911
movb $0xa, (%r15,%rax)
jmp 0x3915
movb $0x9, (%r15,%rax)
jmp 0x3915
movb %dl, (%r15,%rax)
incq %rax
jmp 0x38cb
leaq 0x20(%rsp), %rdi
movzbl (%rax), %r13d
cmpl $0x20, %r13d
je 0x392f
cmpl $0x9, %r13d
jne 0x3936
incl %ebp
incq %rax
jmp 0x391f
cmpl $0x40, %r15d
pushq $0x40
popq %rax
cmovll %r15d, %eax
movslq %eax, %rdx
movq %r14, %rsi
movq %rdi, %r14
callq 0x2080
movslq %r15d, %rax
xorl %ecx, %ecx
movb %cl, 0x20(%rsp,%rax)
movb %cl, 0x5f(%rsp)
cmpb $0x3a, %r13b
jne 0x3a6f
pushq $0x73
popq %rdi
movq %r14, %rsi
movl 0x4(%rsp), %edx
callq 0x3d74
movq %rax, %r14
movq %rax, %r13
movl %ebp, %r12d
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2dd4
movq %r14, 0x10(%rax)
movq 0x8(%rsp), %r13
movl %ebp, %r12d
jmp 0x2dd4
movl %eax, %eax
movb $0x0, (%r15,%rax)
pushq $0x75
popq %rdi
movq %r15, %rsi
movl 0x4(%rsp), %edx
callq 0x3d74
movq %rax, %r14
movq %rax, %r13
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x39cc
movq %r14, 0x10(%rax)
movq 0x8(%rsp), %r13
addl $0x2, %r12d
movq %r15, %rdi
callq 0x2040
jmp 0x2dd4
movl %ebp, %r15d
subl %r12d, %r15d
cmpl $0x40, %r15d
pushq $0x40
popq %rax
cmovll %r15d, %eax
movslq %eax, %rdx
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x2080
movslq %r15d, %rax
xorl %ecx, %ecx
movb %cl, 0x20(%rsp,%rax)
movb %cl, 0x5f(%rsp)
pushq $0x72
popq %rdi
movq %r12, %rsi
movl 0x4(%rsp), %edx
callq 0x3d74
movq %rax, %r14
movq %rax, %r13
movl %ebp, %r12d
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2dd4
movq %r14, 0x10(%rax)
movq 0x8(%rsp), %r13
movl %ebp, %r12d
jmp 0x2dd4
pushq $0x27
popq %rdi
leaq 0x2a37(%rip), %rsi      # 0x6486
jmp 0x3b30
pushq $0x3
popq %rdi
leaq 0x299f(%rip), %rsi      # 0x63fd
jmp 0x3b68
pushq $0x32
popq %rdi
leaq 0x29e9(%rip), %rsi      # 0x6456
jmp 0x3ac8
movl %r12d, %r12d
addq %r15, %r12
pushq $0x74
popq %rdi
movq %r14, %rsi
movl 0x4(%rsp), %edx
callq 0x3d74
movq %rax, %r14
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x3c24
movq %r14, 0x10(%rax)
movq 0x8(%rsp), %r13
jmp 0x2dd4
pushq $0x4
popq %rdi
leaq 0x2953(%rip), %rsi      # 0x6400
jmp 0x3b68
pushq $0x30
popq %rdi
leaq 0x2995(%rip), %rsi      # 0x6451
jmp 0x3b30
pushq $0x36
popq %rdi
leaq 0x2999(%rip), %rsi      # 0x6461
movl 0x4(%rsp), %edx
callq 0x3d74
movq %rax, %r14
movq %rax, %r13
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x3aea
movq %r14, 0x10(%rax)
movq 0x8(%rsp), %r13
addq $0x5, %rbp
movl %ebp, %r12d
jmp 0x2dd4
pushq $0x5
popq %rdi
leaq 0x2903(%rip), %rsi      # 0x6403
jmp 0x3b68
pushq $0x34
popq %rdi
leaq 0x2950(%rip), %rsi      # 0x645c
jmp 0x3b30
pushq $0x6
popq %rdi
leaq 0x28ee(%rip), %rsi      # 0x6406
jmp 0x3b68
pushq $0x21
popq %rdi
leaq 0x2914(%rip), %rsi      # 0x6438
jmp 0x3b68
pushq $0x42
popq %rdi
leaq 0x293e(%rip), %rsi      # 0x646e
movl 0x4(%rsp), %edx
callq 0x3d74
movq %rax, %r14
movq %rax, %r13
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x3b52
movq %r14, 0x10(%rax)
movq 0x8(%rsp), %r13
addq $0x4, %rbp
movl %ebp, %r12d
jmp 0x2dd4
pushq $0xa
popq %rdi
leaq 0x28a1(%rip), %rsi      # 0x6409
movq %rdx, %r14
movl 0x4(%rsp), %edx
callq 0x3d74
movq %r14, %rcx
movq %rax, %r14
movq %rax, %r13
testq %rcx, %rcx
je 0x3b8b
movq %r14, 0x10(%rcx)
movq 0x8(%rsp), %r13
addq $0x2, %rbp
movl %ebp, %r12d
jmp 0x2dd4
pushq $0x61
popq %rdi
leaq 0x28e2(%rip), %rsi      # 0x6483
movl 0x4(%rsp), %edx
callq 0x3d74
movq %rax, %r14
movq %rax, %r13
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x3bc3
movq %r14, 0x10(%rax)
movq 0x8(%rsp), %r13
addq $0x7, %rbp
movl %ebp, %r12d
jmp 0x2dd4
pushq $0x23
popq %rdi
leaq 0x2866(%rip), %rsi      # 0x643f
movl 0x4(%rsp), %edx
callq 0x3d74
movq %rax, %r14
movq %rax, %r13
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x3b8b
movq %r14, 0x10(%rax)
jmp 0x3b86
pushq $0x25
popq %rdi
leaq 0x2844(%rip), %rsi      # 0x6446
movl 0x4(%rsp), %edx
callq 0x3d74
movq 0x10(%rsp), %rcx
jmp 0x3b77
pushq $0x20
popq %rdi
leaq 0x2815(%rip), %rsi      # 0x6434
jmp 0x3ceb
movq %r14, %r13
jmp 0x2dd4
pushq $0x29
popq %rdi
leaq 0x2817(%rip), %rsi      # 0x644d
jmp 0x3c9e
pushq $0x22
popq %rdi
leaq 0x27f9(%rip), %rsi      # 0x643b
jmp 0x3ceb
pushq $0x24
popq %rdi
leaq 0x27f1(%rip), %rsi      # 0x6442
jmp 0x3ceb
pushq $0x9
popq %rdi
leaq 0x27ac(%rip), %rsi      # 0x640c
jmp 0x3c9e
pushq $0x8
popq %rdi
leaq 0x27a4(%rip), %rsi      # 0x6410
jmp 0x3c9e
pushq $0x26
popq %rdi
leaq 0x27d1(%rip), %rsi      # 0x6449
jmp 0x3c9e
movl $0x90, %edi
leaq 0x2805(%rip), %rsi      # 0x648b
jmp 0x3c9e
pushq $0x60
popq %rdi
leaq 0x27ed(%rip), %rsi      # 0x647f
jmp 0x3c9e
pushq $0x41
popq %rdi
leaq 0x27cc(%rip), %rsi      # 0x646a
movl 0x4(%rsp), %edx
callq 0x3d74
movq %rax, %r14
movq %rax, %r13
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x3d0e
movq %r14, 0x10(%rax)
jmp 0x3d09
pushq $0x10
popq %rdi
leaq 0x2751(%rip), %rsi      # 0x6418
jmp 0x3ceb
pushq $0x51
popq %rdi
leaq 0x27a4(%rip), %rsi      # 0x6477
jmp 0x3ceb
pushq $0x14
popq %rdi
leaq 0x2741(%rip), %rsi      # 0x6420
jmp 0x3ceb
pushq $0x12
popq %rdi
leaq 0x2731(%rip), %rsi      # 0x641c
movq %rdx, %r14
movl 0x4(%rsp), %edx
callq 0x3d74
movq %r14, %rcx
movq %rax, %r14
movq %rax, %r13
testq %rcx, %rcx
je 0x3d0e
movq %r14, 0x10(%rcx)
movq 0x8(%rsp), %r13
addq $0x3, %rbp
movl %ebp, %r12d
jmp 0x2dd4
testq %rdx, %rdx
je 0x3d60
cmpl $0x70, (%rdx)
je 0x3d62
pushq $0x70
popq %rdi
xorl %esi, %esi
movq %rdx, %r14
movl 0x4(%rsp), %edx
movq %rax, %rbx
callq 0x3d74
movq %rax, 0x10(%r14)
movq %rbx, %rax
jmp 0x3d62
movq 0x52a8(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
leaq 0x27a2(%rip), %rsi      # 0x64f4
movl 0x4(%rsp), %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x21c0
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)