// File: rofl0r[P]ascc/cs_parser.cpp
// Function: is_part_of_symbol(char, char)
int is_part_of_symbol(char thischar, char startchar) {
    // workaround for strings
    static int sayno_next_char = 0;
    static int next_is_escaped = 0;
    if (sayno_next_char) {
        sayno_next_char = 0;
        return 0;
    }
    if ((startchar == '\"') || (startchar == '\'')) {
        if (next_is_escaped) {
            // an escaped " or whatever, so let it through
            next_is_escaped = 0;
            return 1;
        }
        if (thischar == '\\')
            next_is_escaped = 1;

        if (thischar == startchar) sayno_next_char = 1;
        return 1;
    }
    if (startchar == '0' && thischar == 'x') {
        // a hexadecimal number
        return 1;
    }
    // a decimal number
    if ((startchar >= '0') && (startchar <= '9')) {
        if ((thischar >= '0') && (thischar <= '9'))
            return 1;
        // float constant
        if (thischar == '.')
            return 1;
        return 0;
    }
    // variable name
    if (((startchar >= 'a') && (startchar <= 'z')) ||
        ((startchar >= 'A') && (startchar <= 'Z')) ||
        (startchar == '_')) {
            if (is_alphanum(thischar)) return 1;
            return 0;
    }
    // ==, >=, <=, !=, etc
    if (thischar == '=') {
        if ((startchar == '=') || (startchar == '<') || (startchar == '>')
            || (startchar == '!') || (startchar == '+') || (startchar == '-')
            || (startchar == '*') || (startchar == '/')
            || (startchar == '&') || (startchar == '|') || (startchar == '^'))
            return 1;
    }
    // && and ||, ++ and --
    if ((thischar == '&') && (startchar == '&')) return 1;
    if ((thischar == '|') && (startchar == '|')) return 1;
    if ((thischar == '+') && (startchar == '+')) return 1;
    if ((thischar == '-') && (startchar == '-')) return 1;
    // << and >>
    if ((thischar == '<') && (startchar == '<')) return 1;
    if ((thischar == '>') && (startchar == '>')) return 1;
    // ...
    if ((thischar == '.') && (startchar == '.')) return 1;
    // ::
    if ((thischar == ':') && (startchar == ':')) return 1;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movb %dil, %cl
movb %cl, -0x5(%rbp)
movb %al, -0x6(%rbp)
cmpl $0x0, 0x3c075(%rip)     # 0x42530
je 0x64d3
movl $0x0, 0x3c069(%rip)     # 0x42530
movl $0x0, -0x4(%rbp)
jmp 0x675d
movsbl -0x6(%rbp), %eax
cmpl $0x22, %eax
je 0x64e5
movsbl -0x6(%rbp), %eax
cmpl $0x27, %eax
jne 0x6539
cmpl $0x0, 0x3c048(%rip)     # 0x42534
je 0x6504
movl $0x0, 0x3c03c(%rip)     # 0x42534
movl $0x1, -0x4(%rbp)
jmp 0x675d
movsbl -0x5(%rbp), %eax
cmpl $0x5c, %eax
jne 0x6517
movl $0x1, 0x3c01d(%rip)     # 0x42534
movsbl -0x5(%rbp), %eax
movsbl -0x6(%rbp), %ecx
cmpl %ecx, %eax
jne 0x652d
movl $0x1, 0x3c003(%rip)     # 0x42530
movl $0x1, -0x4(%rbp)
jmp 0x675d
movsbl -0x6(%rbp), %eax
cmpl $0x30, %eax
jne 0x6557
movsbl -0x5(%rbp), %eax
cmpl $0x78, %eax
jne 0x6557
movl $0x1, -0x4(%rbp)
jmp 0x675d
movsbl -0x6(%rbp), %eax
cmpl $0x30, %eax
jl 0x65a8
movsbl -0x6(%rbp), %eax
cmpl $0x39, %eax
jg 0x65a8
movsbl -0x5(%rbp), %eax
cmpl $0x30, %eax
jl 0x6587
movsbl -0x5(%rbp), %eax
cmpl $0x39, %eax
jg 0x6587
movl $0x1, -0x4(%rbp)
jmp 0x675d
movsbl -0x5(%rbp), %eax
cmpl $0x2e, %eax
jne 0x659c
movl $0x1, -0x4(%rbp)
jmp 0x675d
movl $0x0, -0x4(%rbp)
jmp 0x675d
movsbl -0x6(%rbp), %eax
cmpl $0x61, %eax
jl 0x65ba
movsbl -0x6(%rbp), %eax
cmpl $0x7a, %eax
jle 0x65d5
movsbl -0x6(%rbp), %eax
cmpl $0x41, %eax
jl 0x65cc
movsbl -0x6(%rbp), %eax
cmpl $0x5a, %eax
jle 0x65d5
movsbl -0x6(%rbp), %eax
cmpl $0x5f, %eax
jne 0x65fb
movsbl -0x5(%rbp), %edi
callq 0x26310
cmpl $0x0, %eax
je 0x65ef
movl $0x1, -0x4(%rbp)
jmp 0x675d
movl $0x0, -0x4(%rbp)
jmp 0x675d
movsbl -0x5(%rbp), %eax
cmpl $0x3d, %eax
jne 0x6675
movsbl -0x6(%rbp), %eax
cmpl $0x3d, %eax
je 0x6667
movsbl -0x6(%rbp), %eax
cmpl $0x3c, %eax
je 0x6667
movsbl -0x6(%rbp), %eax
cmpl $0x3e, %eax
je 0x6667
movsbl -0x6(%rbp), %eax
cmpl $0x21, %eax
je 0x6667
movsbl -0x6(%rbp), %eax
cmpl $0x2b, %eax
je 0x6667
movsbl -0x6(%rbp), %eax
cmpl $0x2d, %eax
je 0x6667
movsbl -0x6(%rbp), %eax
cmpl $0x2a, %eax
je 0x6667
movsbl -0x6(%rbp), %eax
cmpl $0x2f, %eax
je 0x6667
movsbl -0x6(%rbp), %eax
cmpl $0x26, %eax
je 0x6667
movsbl -0x6(%rbp), %eax
cmpl $0x7c, %eax
je 0x6667
movsbl -0x6(%rbp), %eax
cmpl $0x5e, %eax
jne 0x6673
movl $0x1, -0x4(%rbp)
jmp 0x675d
jmp 0x6675
movsbl -0x5(%rbp), %eax
cmpl $0x26, %eax
jne 0x6693
movsbl -0x6(%rbp), %eax
cmpl $0x26, %eax
jne 0x6693
movl $0x1, -0x4(%rbp)
jmp 0x675d
movsbl -0x5(%rbp), %eax
cmpl $0x7c, %eax
jne 0x66b1
movsbl -0x6(%rbp), %eax
cmpl $0x7c, %eax
jne 0x66b1
movl $0x1, -0x4(%rbp)
jmp 0x675d
movsbl -0x5(%rbp), %eax
cmpl $0x2b, %eax
jne 0x66cf
movsbl -0x6(%rbp), %eax
cmpl $0x2b, %eax
jne 0x66cf
movl $0x1, -0x4(%rbp)
jmp 0x675d
movsbl -0x5(%rbp), %eax
cmpl $0x2d, %eax
jne 0x66ea
movsbl -0x6(%rbp), %eax
cmpl $0x2d, %eax
jne 0x66ea
movl $0x1, -0x4(%rbp)
jmp 0x675d
movsbl -0x5(%rbp), %eax
cmpl $0x3c, %eax
jne 0x6705
movsbl -0x6(%rbp), %eax
cmpl $0x3c, %eax
jne 0x6705
movl $0x1, -0x4(%rbp)
jmp 0x675d
movsbl -0x5(%rbp), %eax
cmpl $0x3e, %eax
jne 0x6720
movsbl -0x6(%rbp), %eax
cmpl $0x3e, %eax
jne 0x6720
movl $0x1, -0x4(%rbp)
jmp 0x675d
movsbl -0x5(%rbp), %eax
cmpl $0x2e, %eax
jne 0x673b
movsbl -0x6(%rbp), %eax
cmpl $0x2e, %eax
jne 0x673b
movl $0x1, -0x4(%rbp)
jmp 0x675d
movsbl -0x5(%rbp), %eax
cmpl $0x3a, %eax
jne 0x6756
movsbl -0x6(%rbp), %eax
cmpl $0x3a, %eax
jne 0x6756
movl $0x1, -0x4(%rbp)
jmp 0x675d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)