// File: /workspace/github_c_makefile_star2_O1/lucvoo[P]sparse-dev/pre-process.c
// Function: expression_value
static int expression_value(struct token **where)
{
	struct expression *expr;
	struct token *p;
	struct token **list = where, **beginning = NULL;
	long long value;
	int state = 0;

	while (!eof_token(p = scan_next(list))) {
		switch (state) {
		case 0:
			if (token_type(p) != TOKEN_IDENT)
				break;
			if (p->ident == &defined_ident) {
				state = 1;
				beginning = list;
				break;
			}
			if (!expand_one_symbol(list))
				continue;
			if (token_type(p) != TOKEN_IDENT)
				break;
			token_type(p) = TOKEN_ZERO_IDENT;
			break;
		case 1:
			if (match_op(p, '(')) {
				state = 2;
			} else {
				state = 0;
				replace_with_defined(p);
				*beginning = p;
			}
			break;
		case 2:
			if (token_type(p) == TOKEN_IDENT)
				state = 3;
			else
				state = 0;
			replace_with_defined(p);
			*beginning = p;
			break;
		case 3:
			state = 0;
			if (!match_op(p, ')'))
				sparse_error(p->pos, "missing ')' after \"defined\"");
			*list = p->next;
			continue;
		}
		list = &p->next;
	}

	p = constant_expression(*where, &expr);
	if (!eof_token(p))
		sparse_error(p->pos, "garbage at end: %s", show_token_sequence(p, 0));
	value = get_expression_value(expr);
	return value != 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r12
leaq 0x652b4(%rip), %r13     # 0x875e0
leaq 0x24add(%rip), %rbp     # 0x46e10
leaq 0x43006(%rip), %rbx     # 0x65340
movq %rdi, 0x8(%rsp)
movq $0x0, (%rsp)
xorl %r14d, %r14d
movq (%r12), %r15
movl (%r15), %eax
andl $0x3f, %eax
cmpl $0x1a, %eax
jne 0x22374
movq 0x10(%r15), %rax
andb $-0x2, 0x11(%rax)
movq 0x8(%r15), %r15
movl (%r15), %eax
andl $0x3f, %eax
cmpl $0x1a, %eax
je 0x22359
movq %r15, (%r12)
cmpq %r13, %r15
je 0x22492
movq (%r15), %rdi
movl %edi, %eax
andl $0x3f, %eax
movl %r14d, %ecx
movslq (%rbp,%rcx,4), %rcx
addq %rbp, %rcx
jmpq *%rcx
cmpl $0x3, %eax
jne 0x22414
cmpq %rbx, 0x10(%r15)
je 0x22455
movq %r12, %rdi
callq 0x2116f
xorl %r14d, %r14d
testl %eax, %eax
je 0x2234a
movq (%r15), %rax
movl %eax, %ecx
andl $0x3f, %ecx
xorl %r14d, %r14d
cmpl $0x3, %ecx
jne 0x2245f
andq $-0x40, %rax
orq $0x4, %rax
movq %rax, (%r15)
jmp 0x2245f
cmpl $0x12, %eax
jne 0x223e6
movl $0x2, %r14d
cmpl $0x28, 0x10(%r15)
je 0x2245f
movq %r15, %rdi
callq 0x22233
movq (%r15), %rcx
andq $-0x40, %rcx
orq $0x5, %rcx
movq %rcx, (%r15)
movl %eax, %eax
leaq 0x3774b(%rip), %rcx     # 0x59b50
movq (%rcx,%rax,8), %rax
movq %rax, 0x10(%r15)
movq (%rsp), %rax
movq %r15, (%rax)
xorl %r14d, %r14d
jmp 0x2245f
xorl %ecx, %ecx
cmpl $0x3, %eax
sete %cl
leal (%rcx,%rcx,2), %r14d
movq %r15, %rdi
callq 0x22233
movq (%r15), %rcx
andq $-0x40, %rcx
orq $0x5, %rcx
movq %rcx, (%r15)
movl %eax, %eax
leaq 0x3770c(%rip), %rcx     # 0x59b50
movq (%rcx,%rax,8), %rax
movq %rax, 0x10(%r15)
movq (%rsp), %rax
movq %r15, (%rax)
jmp 0x2245f
movl $0x1, %r14d
movq %r12, (%rsp)
addq $0x8, %r15
movq %r15, %r12
jmp 0x2234a
cmpl $0x12, %eax
jne 0x22477
cmpl $0x29, 0x10(%r15)
je 0x22485
leaq 0x24f03(%rip), %rsi     # 0x47381
xorl %eax, %eax
callq 0x11a38
movq 0x8(%r15), %rax
movq %rax, (%r12)
jmp 0x22347
movq 0x8(%rsp), %rax
movq (%rax), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3a79d
cmpq 0x3ea2d(%rip), %rax     # 0x60ed8
je 0x224ce
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0x20bcc
movq (%rbx), %rdi
leaq 0x24ed9(%rip), %rsi     # 0x4739d
movq %rax, %rdx
xorl %eax, %eax
callq 0x11a38
movq 0x10(%rsp), %rdi
callq 0xf23d
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
movl %ecx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq