// File: /workspace/github_c_makefile_star2_O3/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, %r15
movq %rdi, %rbx
movl (%rdi), %eax
andl $0x3f, %eax
cmpl $0x12, %eax
jne 0x3a793
cmpl $0x28, 0x10(%rbx)
jne 0x3a793
movq 0x8(%rbx), %r14
movl (%r14), %eax
andl $0x3f, %eax
cmpl $0x3, %eax
jne 0x3a793
movq 0x10(%r14), %rdi
movl $0x12, %esi
callq 0x2afd5
testq %rax, %rax
je 0x3a793
testb $0x2, 0x1(%rax)
jne 0x3a9c6
movq (%rbx), %r13
movl %r13d, %eax
andl $0x3f, %eax
cmpl $0x3, %eax
jne 0x3a84e
leaq 0x25474(%rip), %r12     # 0x5fc20
movq 0x10(%rbx), %rax
testb $0x2, 0x11(%rax)
je 0x3a84e
movl $0x8, %ecx
cmpq -0x8(%rcx,%r12), %rax
je 0x3a7d2
addq $0x10, %rcx
cmpq $0x58, %rcx
jne 0x3a7bf
jmp 0x3a84e
movslq (%rcx,%r12), %rbp
xorl %edi, %edi
callq 0x2f9f5
movq %rax, %r14
movzbl %bpl, %eax
movq %r13, 0x8(%r14)
movw %ax, (%r14)
movq %r14, (%r15)
movb $0x30, 0x1(%r14)
movq 0x8(%rbx), %rbx
movl (%rbx), %eax
andl $0x3f, %eax
cmpl $0x12, %eax
jne 0x3a833
cmpl $0x28, 0x10(%rbx)
jne 0x3a833
movq 0x8(%rbx), %rax
movl (%rax), %ecx
andl $0x3f, %ecx
cmpl $0x3, %ecx
jne 0x3a833
movq 0x10(%rax), %rdi
movl $0x12, %esi
callq 0x2afd5
testq %rax, %rax
je 0x3a833
testb $0x2, 0x1(%rax)
jne 0x3aac6
addq $0x28, %r14
movq (%rbx), %r13
movl %r13d, %eax
andl $0x3f, %eax
movq %r14, %r15
cmpl $0x3, %eax
je 0x3a7ac
jmp 0x3a851
movq %r15, %r14
andl $0x3f, %r13d
cmpl $0x12, %r13d
jne 0x3a9ab
movl 0x10(%rbx), %edi
movl $0x101, %esi            # imm = 0x101
movl $0x103, %edx            # imm = 0x103
movl $0x26, %ecx
movl $0x2a, %r8d
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x3addd
testl %eax, %eax
jne 0x3a8ab
movl 0x10(%rbx), %edi
movl $0x2b, %esi
movl $0x2d, %edx
movl $0x7e, %ecx
movl $0x21, %r8d
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x3addd
testl %eax, %eax
je 0x3a916
movq 0x8(%rbx), %rdi
leaq 0x10(%rsp), %r12
movq %r12, %rsi
callq 0x3a743
movq %rax, %r15
movq (%r12), %rbp
movq (%rbx), %r13
testq %rbp, %rbp
je 0x3a8ed
xorl %edi, %edi
callq 0x2f9f5
movq %rax, %r12
movq %r13, 0x8(%rax)
movw $0x9, (%rax)
movl 0x10(%rbx), %eax
movl %eax, 0x4(%r12)
movq %rbp, 0x20(%r12)
jmp 0x3a901
leaq 0x1064c(%rip), %rsi     # 0x4af40
xorl %r12d, %r12d
movq %r13, %rdi
xorl %eax, %eax
callq 0x11a80
movq %r12, (%r14)
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %r12
movl %r12d, %eax
andl $0x3f, %eax
cmpl $0x12, %eax
jne 0x3a9ab
cmpl $0x10c, 0x10(%rbx)      # imm = 0x10C
jne 0x3a9ab
movq 0x8(%rbx), %rax
movl (%rax), %eax
andl $0x3f, %eax
cmpl $0x3, %eax
jne 0x3a9ab
xorl %edi, %edi
callq 0x2f9f5
movq %rax, %r15
movq %r12, 0x8(%rax)
movw $0x17, (%rax)
movq 0x8(%rbx), %rdi
movl $0x1, %esi
callq 0x195dd
movq %rax, %r12
movq 0x68(%rax), %rax
btl $0x8, %eax
jb 0x3a987
orq $0x100, %rax            # imm = 0x100
movq %rax, 0x68(%r12)
leaq 0x2c5a1(%rip), %rdi     # 0x66f20
movq %r12, %rsi
callq 0x227b4
movq (%rbx), %rsi
movq %r12, %rdi
callq 0x1a15d
movb $0x40, 0x1(%r15)
movq %r12, 0x20(%r15)
movq %r15, (%r14)
movq 0x8(%rbx), %rax
movq 0x8(%rax), %r15
jmp 0x3a904
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3ab74
movq (%r14), %r12
xorl %edi, %edi
callq 0x2f9f5
movq %rax, %rbx
movq %r12, 0x8(%rax)
movw $0xb, (%rax)
leaq 0x8(%rsp), %r12
leaq 0x4(%rsp), %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x1965e
movq (%r12), %rcx
movq %rcx, 0x20(%rbx)
leaq 0x104fb(%rip), %rdx     # 0x4aefb
movq %rax, %rdi
movl $0x29, %esi
callq 0x1950f
movq %rax, %r14
movl (%rax), %eax
andl $0x3f, %eax
cmpl $0x12, %eax
jne 0x3aa90
cmpl $0x7b, 0x10(%r14)
jne 0x3aa90
leaq 0x29360(%rip), %rax     # 0x63d88
movq (%rax), %rax
leaq 0x29366(%rip), %rcx     # 0x63d98
cmpq %rax, (%rcx)
je 0x3aa43
leaq 0x29362(%rip), %rcx     # 0x63da0
cmpq %rax, (%rcx)
jne 0x3aa4d
movq 0x8(%rsp), %rax
orq $0x10, 0x68(%rax)
cmpl $0x0, 0x4(%rsp)
je 0x3aa6b
movq 0x8(%rsp), %rax
movq 0x4(%rax), %rdi
leaq 0x104af(%rip), %rsi     # 0x4af13
xorl %eax, %eax
callq 0x118fc
movq %rbx, %rdi
addq $0x28, %rdi
movq %r14, %rsi
callq 0x1a3f1
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3ab74
movq %rax, %r15
jmp 0x3a904
movq %rbx, (%r15)
cmpl $0x0, 0x4(%rsp)
je 0x3aa9d
movb $0xc, (%rbx)
leaq 0x10(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x3a743
movq %rax, %r15
movq (%r12), %rax
testq %rax, %rax
je 0x3a904
movq %rax, 0x28(%rbx)
jmp 0x3a904
movq 0x8(%rbx), %rdi
leaq 0x20(%r14), %rsi
xorl %edx, %edx
callq 0x1965e
movl (%rax), %ecx
andl $0x3f, %ecx
cmpl $0x12, %ecx
jne 0x3ab4e
cmpl $0x29, 0x10(%rax)
jne 0x3ab4e
movq 0x8(%rax), %r15
movl (%r15), %eax
andl $0x3f, %eax
cmpl $0x12, %eax
jne 0x3a904
cmpl $0x7b, 0x10(%r15)
jne 0x3a904
movq (%rbx), %r12
xorl %edi, %edi
callq 0x2f9f5
movq %rax, %rbx
movq %r12, 0x8(%rax)
movw $0xb, (%rax)
movq 0x20(%r14), %rax
movq %rax, 0x20(%rbx)
movq $0x0, 0x20(%r14)
movq %r14, %r12
addq $0x28, %r12
movq %rbx, 0x28(%r14)
leaq 0x28(%rbx), %rdi
movq %r15, %rsi
callq 0x1a3f1
movq %rax, %rdi
movq %r12, %rsi
movq %rbx, %rdx
jmp 0x3a9b3
leaq 0x2511b(%rip), %rcx     # 0x5fc70
movq (%rcx,%rbp,8), %rdx
movq %rax, %rdi
movl $0x29, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1950f