// File: rofl0r[P]ascc/eval_if.c
// Function: nud
static int nud(struct tokenizer *t, struct token *tok, int *err) {
	switch((unsigned) tok->type) {
		case TT_IDENTIFIER: return 0;
		case TT_WIDECHAR_LIT:
		case TT_SQSTRING_LIT:  return charlit_to_int(t->buf);
		case TT_HEX_INT_LIT:
		case TT_OCT_INT_LIT:
		case TT_DEC_INT_LIT:
			return strtol(t->buf, NULL, 0);
		case TT_NEG:   return ~ expr(t, bp(tok->type), err);
		case TT_PLUS:  return expr(t, bp(tok->type), err);
		case TT_MINUS: return - expr(t, bp(tok->type), err);
		case TT_LNOT:  return !expr(t, bp(tok->type), err);
		case TT_LPAREN: {
			int inner = expr(t, 0, err);
			if(0!=expect(t, TT_RPAREN, (const char*[]){")", 0}, tok)) {
				error("missing ')'");
				return 0;
			}
			return inner;
		}
		case TT_FLOAT_LIT:
			error("floating constant in preprocessor expression");
			*err = 1;
			return 0;
		case TT_RPAREN:
		default:
			error("unexpected token");
			*err = 1;
			return 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
subl $0x1, %eax
je 0x2faf2
jmp 0x2fa58
movl -0x3c(%rbp), %eax
subl $0x2, %eax
je 0x2fafe
jmp 0x2fa66
movl -0x3c(%rbp), %eax
addl $-0x5, %eax
subl $0x3, %eax
jb 0x2fb16
jmp 0x2fa77
movl -0x3c(%rbp), %eax
subl $0x8, %eax
je 0x2fc52
jmp 0x2fa85
movl -0x3c(%rbp), %eax
subl $0xc, %eax
je 0x2fafe
jmp 0x2fa8f
movl -0x3c(%rbp), %eax
subl $0x3f5, %eax            # imm = 0x3F5
je 0x2fb34
jmp 0x2fa9f
movl -0x3c(%rbp), %eax
subl $0x3f6, %eax            # imm = 0x3F6
je 0x2fb61
jmp 0x2faaf
movl -0x3c(%rbp), %eax
subl $0x3f7, %eax            # imm = 0x3F7
je 0x2fb8b
jmp 0x2fabf
movl -0x3c(%rbp), %eax
subl $0x3fb, %eax            # imm = 0x3FB
je 0x2fbf2
jmp 0x2facf
movl -0x3c(%rbp), %eax
subl $0x3fc, %eax            # imm = 0x3FC
je 0x2fc71
jmp 0x2fadf
movl -0x3c(%rbp), %eax
subl $0x3fd, %eax            # imm = 0x3FD
je 0x2fbbb
jmp 0x2fc73
movl $0x0, -0x4(%rbp)
jmp 0x2fc90
movq -0x10(%rbp), %rdi
addq $0x120, %rdi            # imm = 0x120
callq 0x30310
movl %eax, -0x4(%rbp)
jmp 0x2fc90
movq -0x10(%rbp), %rdi
addq $0x120, %rdi            # imm = 0x120
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x4520
movl %eax, -0x4(%rbp)
jmp 0x2fc90
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %edi
callq 0x2fcf0
movq -0x48(%rbp), %rdi
movl %eax, %esi
movq -0x20(%rbp), %rdx
callq 0x2f920
xorl $-0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x2fc90
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %edi
callq 0x2fcf0
movq -0x50(%rbp), %rdi
movl %eax, %esi
movq -0x20(%rbp), %rdx
callq 0x2f920
movl %eax, -0x4(%rbp)
jmp 0x2fc90
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %edi
callq 0x2fcf0
movq -0x58(%rbp), %rdi
movl %eax, %esi
movq -0x20(%rbp), %rdx
callq 0x2f920
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x2fc90
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %edi
callq 0x2fcf0
movq -0x60(%rbp), %rdi
movl %eax, %esi
movq -0x20(%rbp), %rdx
callq 0x2f920
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x2fc90
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
xorl %esi, %esi
callq 0x2f920
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x2749(%rip), %rax      # 0x32358
movq %rax, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
leaq -0x38(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x3fc, %esi            # imm = 0x3FC
callq 0x303d0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x2fc4a
leaq 0x4bbb(%rip), %rdi      # 0x347f7
callq 0x2c740
movl $0x0, -0x4(%rbp)
jmp 0x2fc90
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2fc90
leaq 0x4baa(%rip), %rdi      # 0x34803
callq 0x2c740
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x2fc90
jmp 0x2fc73
leaq 0x4bb6(%rip), %rdi      # 0x34830
callq 0x2c740
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)