// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/expression.c
// Function: cast_expression
static struct token *cast_expression(struct token *token, struct expression **tree)
{
	if (match_op(token, '(')) {
		struct token *next = token->next;
		if (lookup_type(next)) {
			struct expression *cast = alloc_expression(next->pos, EXPR_CAST);
			struct expression *v;
			struct symbol *sym;
			int is_force;

			token = typename(next, &sym, &is_force);
			cast->cast_type = sym;
			token = expect(token, ')', "at end of cast operator");
			if (match_op(token, '{')) {
				if (toplevel(block_scope))
					sym->ctype.modifiers |= MOD_TOPLEVEL;
				if (is_force)
					warning(sym->pos,
						"[force] in compound literal");
				token = initializer(&cast->cast_expression, token);
				return postfix_expression(token, tree, cast);
			}
			*tree = cast;
			if (is_force)
				cast->type = EXPR_FORCE_CAST;
			token = cast_expression(token, &v);
			if (!v)
				return token;
			cast->cast_expression = v;
			return token;
		}
	}
	return unary_expression(token, tree);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %eax
andl $0x3f, %eax
cmpl $0x12, %eax
jne 0x33fd3
cmpl $0x28, 0x10(%r14)
jne 0x33fd3
movq 0x8(%r14), %r15
movq %r15, %rdi
callq 0x3346e
testl %eax, %eax
je 0x33fd3
movq (%r15), %rdi
pushq $0xb
popq %rsi
callq 0x328b4
movq %rax, %r14
leaq 0x8(%rsp), %r12
leaq 0x4(%rsp), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x175d4
movq (%r12), %rcx
movq %rcx, 0x20(%r14)
leaq 0x1020e(%rip), %rdx     # 0x4414b
pushq $0x29
popq %rsi
movq %rax, %rdi
callq 0x17480
movq %rax, %r15
movl (%rax), %eax
andl $0x3f, %eax
cmpl $0x12, %eax
jne 0x3405b
cmpl $0x7b, 0x10(%r15)
jne 0x3405b
leaq 0x29e1d(%rip), %rax     # 0x5dd88
movq (%rax), %rax
leaq 0x29e23(%rip), %rcx     # 0x5dd98
cmpq %rax, (%rcx)
je 0x33f86
leaq 0x29e1f(%rip), %rcx     # 0x5dda0
cmpq %rax, (%rcx)
jne 0x33f90
movq 0x8(%rsp), %rax
orq $0x10, 0x68(%rax)
cmpl $0x0, 0x4(%rsp)
je 0x33fae
movq 0x8(%rsp), %rax
movq 0x4(%rax), %rdi
leaq 0x101bc(%rip), %rsi     # 0x44163
xorl %eax, %eax
callq 0x1108a
movq %r14, %rdi
addq $0x28, %rdi
movq %r15, %rsi
callq 0x1825e
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x34287
movq %rax, %r15
jmp 0x3412b
movq (%r14), %rdi
movl %edi, %eax
andl $0x3f, %eax
cmpq $0x3, %rax
jne 0x34091
movq 0x10(%r14), %rax
testb $0x2, 0x11(%rax)
je 0x341c4
xorl %ecx, %ecx
leaq 0x10(%rcx), %rdx
cmpq $0x60, %rdx
je 0x341c4
leaq 0x25c16(%rip), %rsi     # 0x59c20
cmpq (%rcx,%rsi), %rax
movq %rdx, %rcx
jne 0x33ff5
movl -0x8(%rdx,%rsi), %ebp
movl %ebp, %esi
callq 0x328b4
movq %rax, %r12
movq %rax, (%rbx)
movb $0x30, 0x1(%rax)
movq 0x8(%r14), %r14
movl (%r14), %eax
andl $0x3f, %eax
cmpl $0x12, %eax
jne 0x3404f
cmpl $0x28, 0x10(%r14)
jne 0x3404f
movq 0x8(%r14), %rdi
callq 0x3346e
testl %eax, %eax
jne 0x341df
addq $0x28, %r12
movq %r12, %rbx
jmp 0x33fd3
movq %r14, (%rbx)
cmpl $0x0, 0x4(%rsp)
je 0x34069
movb $0xc, (%r14)
leaq 0x10(%rsp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x33eca
movq %rax, %r15
movq (%rbx), %rax
testq %rax, %rax
je 0x3412b
movq %rax, 0x28(%r14)
jmp 0x3412b
cmpl $0x12, %eax
jne 0x341c4
movl 0x10(%r14), %edi
pushq $0x26
popq %rcx
pushq $0x2a
popq %r8
movl $0x101, %esi            # imm = 0x101
movl $0x103, %edx            # imm = 0x103
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x344a1
testl %eax, %eax
jne 0x340dc
movl 0x10(%r14), %edi
pushq $0x2b
popq %rsi
pushq $0x2d
popq %rdx
pushq $0x7e
popq %rcx
pushq $0x21
popq %r8
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x344a1
testl %eax, %eax
je 0x3413d
movq 0x8(%r14), %rdi
leaq 0x10(%rsp), %r12
movq %r12, %rsi
callq 0x33eca
movq %rax, %r15
movq (%r12), %r13
movq (%r14), %rdi
testq %r13, %r13
je 0x34117
pushq $0x9
popq %rsi
callq 0x328b4
movq %rax, %r12
movl 0x10(%r14), %eax
movl %eax, 0x4(%r12)
movq %r13, 0x20(%r12)
jmp 0x34128
leaq 0x10072(%rip), %rsi     # 0x44190
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x1120e
movq %r12, (%rbx)
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rdi
movl %edi, %eax
andl $0x3f, %eax
cmpl $0x12, %eax
jne 0x341c4
cmpl $0x10c, 0x10(%r14)      # imm = 0x10C
jne 0x341c4
movq 0x8(%r14), %rax
movl (%rax), %eax
andl $0x3f, %eax
cmpl $0x3, %eax
jne 0x341c4
pushq $0x17
popq %rsi
callq 0x328b4
movq %rax, %r15
movq 0x8(%r14), %rdi
pushq $0x1
popq %rsi
callq 0x1754e
movq %rax, %r12
movq 0x68(%rax), %rax
btl $0x8, %eax
jb 0x341a0
orq $0x100, %rax            # imm = 0x100
movq %rax, 0x68(%r12)
leaq 0x2cd88(%rip), %rdi     # 0x60f20
movq %r12, %rsi
callq 0x1fae9
movq (%r14), %rsi
movq %r12, %rdi
callq 0x18006
movb $0x40, 0x1(%r15)
movq %r12, 0x20(%r15)
movq %r15, (%rbx)
movq 0x8(%r14), %rax
movq 0x8(%rax), %r15
jmp 0x3412b
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34287
movq 0x8(%r14), %rdi
leaq 0x20(%r12), %rsi
xorl %edx, %edx
callq 0x175d4
movl (%rax), %ecx
andl $0x3f, %ecx
cmpl $0x12, %ecx
jne 0x34260
cmpl $0x29, 0x10(%rax)
jne 0x34260
movq 0x8(%rax), %r15
movl (%r15), %eax
andl $0x3f, %eax
cmpl $0x12, %eax
jne 0x3412b
cmpl $0x7b, 0x10(%r15)
jne 0x3412b
movq (%r14), %rdi
pushq $0xb
popq %rsi
callq 0x328b4
movq %rax, %rbx
movq 0x20(%r12), %rax
movq %rax, 0x20(%rbx)
andq $0x0, 0x20(%r12)
movq %r12, %r14
addq $0x28, %r14
movq %rbx, 0x28(%r12)
leaq 0x28(%rbx), %rdi
movq %r15, %rsi
callq 0x1825e
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
jmp 0x341cc
movslq %ebp, %rcx
leaq 0x25a06(%rip), %rdx     # 0x59c70
movq (%rdx,%rcx,8), %rdx
pushq $0x29
popq %rsi
movq %rax, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x17480