// File: joncampbell123[P]haxcc/haxpp.cpp
// Function: token::precedence(token const&, bool)
unsigned int token::precedence(const token &t,const bool rtl) {
    switch (t.tval) {
        case token::DEFINED:
        case token::SIZEOF:
        case token::ALIGNOF:
            return 1;
        case token::INCREMENT:
            return rtl ? 2 : 1;
        case token::DECREMENT:
            return rtl ? 2 : 1;
        case token::OPEN_PARENS:
        case token::CLOSE_PARENS:
        case token::OPEN_SBRACKET:
        case token::CLOSE_SBRACKET:
        case token::PERIOD:
        case token::PTRARROW:
            return 1u;
        case token::PLUS:
            return rtl ? 2 : 4;
        case token::MINUS:
            return rtl ? 2 : 4;
        case token::STAR:
            return rtl ? 2 : 3;
        case token::AMPERSAND:
            return rtl ? 2 : 8;
        case token::NOT:
        case token::COMPLEMENT:
            return 2;
        case token::DIVISION:
        case token::MODULUS:
            return 3;
        case token::LEFT_SHIFT:
        case token::RIGHT_SHIFT:
            return 5;
        case token::LESS_THAN:
        case token::LESS_THAN_OR_EQUAL:
        case token::GREATER_THAN:
        case token::GREATER_THAN_OR_EQUAL:
            return 6;
        case token::EQUALS:
        case token::NOT_EQUALS:
            return 7;
        case token::CARET:
            return 9;
        case token::PIPE:
            return 10;
        case token::LOGICAL_AND:
            return 11;
        case token::LOGICAL_OR:
            return 12;
        case token::QUESTIONMARK:
        case token::COLON:
            return 13;
        case token::ASSIGNMENT:
        case token::PLUS_EQUALS:
        case token::MINUS_EQUALS:
        case token::MULTIPLY_EQUALS:
        case token::DIVIDE_EQUALS:
        case token::MODULUS_EQUALS:
        case token::LEFT_SHIFT_EQUALS:
        case token::RIGHT_SHIFT_EQUALS:
        case token::AND_EQUALS:
        case token::XOR_EQUALS:
        case token::OR_EQUALS:
            return 14;
        case token::COMMA:
            return 15;
        default:
            break;
    };

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
addl $-0xc, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x57, %eax
ja 0x3baf
movq -0x20(%rbp), %rax
leaq 0x2058d(%rip), %rcx     # 0x24010
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, -0x4(%rbp)
jmp 0x3bb8
movb -0x11(%rbp), %dl
movl $0x1, %eax
movl $0x2, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x3bb8
movb -0x11(%rbp), %dl
movl $0x1, %eax
movl $0x2, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x3bb8
movl $0x1, -0x4(%rbp)
jmp 0x3bb8
movb -0x11(%rbp), %dl
movl $0x4, %eax
movl $0x2, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x3bb8
movb -0x11(%rbp), %dl
movl $0x4, %eax
movl $0x2, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x3bb8
movb -0x11(%rbp), %dl
movl $0x3, %eax
movl $0x2, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x3bb8
movb -0x11(%rbp), %dl
movl $0x8, %eax
movl $0x2, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x3bb8
movl $0x2, -0x4(%rbp)
jmp 0x3bb8
movl $0x3, -0x4(%rbp)
jmp 0x3bb8
movl $0x5, -0x4(%rbp)
jmp 0x3bb8
movl $0x6, -0x4(%rbp)
jmp 0x3bb8
movl $0x7, -0x4(%rbp)
jmp 0x3bb8
movl $0x9, -0x4(%rbp)
jmp 0x3bb8
movl $0xa, -0x4(%rbp)
jmp 0x3bb8
movl $0xb, -0x4(%rbp)
jmp 0x3bb8
movl $0xc, -0x4(%rbp)
jmp 0x3bb8
movl $0xd, -0x4(%rbp)
jmp 0x3bb8
movl $0xe, -0x4(%rbp)
jmp 0x3bb8
movl $0xf, -0x4(%rbp)
jmp 0x3bb8
jmp 0x3bb1
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)