// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/expression.c
// Function: handle_func
static struct symbol *handle_func(struct token *token)
{
	struct ident *ident = token->ident;
	struct symbol *decl, *array;
	struct string *string;
	int len;

	if (ident != &__func___ident &&
	    ident != &__FUNCTION___ident &&
	    ident != &__PRETTY_FUNCTION___ident)
		return NULL;

	if (!current_fn || !current_fn->ident)
		return NULL;

	/* OK, it's one of ours */
	array = alloc_symbol(token->pos, SYM_ARRAY);
	array->ctype.base_type = &char_ctype;
	array->ctype.alignment = 1;
	array->endpos = token->pos;
	decl = alloc_symbol(token->pos, SYM_NODE);
	decl->ctype.base_type = array;
	decl->ctype.alignment = 1;
	decl->ctype.modifiers = MOD_STATIC;
	decl->endpos = token->pos;

	/* NS_SYMBOL but in function-scope */
	bind_symbol_with_scope(decl, ident, NS_SYMBOL, function_scope);

	len = current_fn->ident->len;
	string = __alloc_string(len + 1);
	memcpy(string->data, current_fn->ident->name, len);
	string->data[len] = 0;
	string->length = len + 1;

	decl->initializer = alloc_expression(token->pos, EXPR_STRING);
	decl->initializer->string = string;
	decl->initializer->ctype = decl;
	decl->array_size = alloc_const_expression(token->pos, len + 1);
	array->array_size = decl->array_size;
	decl->bit_size = array->bit_size = bytes_to_bits(len + 1);

	return decl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
leaq 0x33d59(%rip), %rax     # 0x8a418
cmpq %rax, -0x18(%rbp)
je 0x566ec
leaq 0x33d6c(%rip), %rax     # 0x8a438
cmpq %rax, -0x18(%rbp)
je 0x566ec
leaq 0x33d7f(%rip), %rax     # 0x8a458
cmpq %rax, -0x18(%rbp)
je 0x566ec
movq $0x0, -0x8(%rbp)
jmp 0x568bf
leaq 0x5fc5d(%rip), %rax     # 0xb6350
cmpq $0x0, (%rax)
je 0x5670a
leaq 0x5fc50(%rip), %rax     # 0xb6350
movq (%rax), %rax
cmpq $0x0, 0x18(%rax)
jne 0x56717
movq $0x0, -0x8(%rbp)
jmp 0x568bf
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x6, %esi
callq 0x3f4d0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
leaq 0x3a6c1(%rip), %rcx     # 0x90df8
movq %rcx, 0x60(%rax)
movq -0x28(%rbp), %rax
movq $0x1, 0x70(%rax)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, 0xc(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x3, %esi
callq 0x3f4d0
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x20(%rbp), %rax
movq $0x1, 0x70(%rax)
movq -0x20(%rbp), %rax
movq $0x4, 0x68(%rax)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, 0xc(%rax)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq 0x32903(%rip), %rax     # 0x890b0
movq (%rax), %rcx
movl $0x10, %edx
callq 0x40750
leaq 0x5fb8f(%rip), %rax     # 0xb6350
movq (%rax), %rax
movq 0x18(%rax), %rax
movzbl 0x10(%rax), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %edi
addl $0x1, %edi
callq 0x46f20
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
addq $0x4, %rdi
leaq 0x5fb63(%rip), %rax     # 0xb6350
movq (%rax), %rax
movq 0x18(%rax), %rsi
addq $0x12, %rsi
movslq -0x34(%rbp), %rdx
callq 0x111d0
movq -0x30(%rbp), %rax
movslq -0x34(%rbp), %rcx
movb $0x0, 0x4(%rax,%rcx)
movl -0x34(%rbp), %edx
addl $0x1, %edx
movq -0x30(%rbp), %rax
movl (%rax), %ecx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %edx, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x2, %esi
callq 0x55c50
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0xb0(%rax)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rcx
movq -0x20(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %esi
addl $0x1, %esi
movq (%rax), %rdi
callq 0x573f0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x58(%rax)
movl -0x34(%rbp), %edi
addl $0x1, %edi
callq 0x57460
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x20(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)