// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/evaluate.c
// Function: evaluate_string
static struct symbol *evaluate_string(struct expression *expr)
{
	struct symbol *sym = alloc_symbol(expr->pos, SYM_NODE);
	struct symbol *array = alloc_symbol(expr->pos, SYM_ARRAY);
	struct expression *addr = alloc_expression(expr->pos, EXPR_SYMBOL);
	struct expression *initstr = alloc_expression(expr->pos, EXPR_STRING);
	unsigned int length = expr->string->length;
	struct symbol *char_type = expr->wide ? wchar_ctype : &char_ctype;

	sym->array_size = alloc_const_expression(expr->pos, length);
	sym->bit_size = length * char_type->bit_size;
	sym->ctype.alignment = 1;
	sym->string = 1;
	sym->ctype.modifiers = MOD_STATIC;
	sym->ctype.base_type = array;
	sym->initializer = initstr;
	sym->examined = 1;
	sym->evaluated = 1;

	initstr->ctype = sym;
	initstr->string = expr->string;

	array->array_size = sym->array_size;
	array->bit_size = sym->bit_size;
	array->ctype.alignment = char_type->ctype.alignment;
	array->ctype.modifiers = MOD_STATIC;
	array->ctype.base_type = char_type;
	array->examined = 1;
	array->evaluated = 1;
	
	addr->symbol = sym;
	addr->ctype = &lazy_ptr_ctype;
	addr->flags = CEF_ADDR;

	expr->type = EXPR_PREOP;
	expr->op = '*';
	expr->unop = addr;  
	expr->ctype = sym;
	return sym;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x3, %esi
callq 0x3f4d0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x6, %esi
callq 0x3f4d0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x3, %esi
callq 0x50ab0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x2, %esi
callq 0x50ab0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x4c630
leaq 0x3e009(%rip), %rax     # 0x8a630
movq (%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x4c63d
leaq 0x447c1(%rip), %rax     # 0x90df8
movq %rax, -0x40(%rbp)
jmp 0x4c63d
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %esi
movq 0x8(%rax), %rdi
callq 0x50de0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
movl -0x2c(%rbp), %ecx
movq -0x38(%rbp), %rax
imull 0x50(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x10(%rbp), %rax
movq $0x1, 0x70(%rax)
movq -0x10(%rbp), %rax
movl 0x54(%rax), %ecx
andl $0xffff7fff, %ecx       # imm = 0xFFFF7FFF
orl $0x8000, %ecx           # imm = 0x8000
movl %ecx, 0x54(%rax)
movq -0x10(%rbp), %rax
movq $0x4, 0x68(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xb0(%rax)
movq -0x10(%rbp), %rax
movl 0x54(%rax), %ecx
andl $0xfffff7ff, %ecx       # imm = 0xFFFFF7FF
orl $0x800, %ecx            # imm = 0x800
movl %ecx, 0x54(%rax)
movq -0x10(%rbp), %rax
movl 0x54(%rax), %ecx
andl $0xffffdfff, %ecx       # imm = 0xFFFFDFFF
orl $0x2000, %ecx           # imm = 0x2000
movl %ecx, 0x54(%rax)
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rax
movl 0x50(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x38(%rbp), %rax
movq 0x70(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x18(%rbp), %rax
movq $0x4, 0x68(%rax)
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x18(%rbp), %rax
movl 0x54(%rax), %ecx
andl $0xfffff7ff, %ecx       # imm = 0xFFFFF7FF
orl $0x800, %ecx            # imm = 0x800
movl %ecx, 0x54(%rax)
movq -0x18(%rbp), %rax
movl 0x54(%rax), %ecx
andl $0xffffdfff, %ecx       # imm = 0xFFFFDFFF
orl $0x2000, %ecx           # imm = 0x2000
movl %ecx, 0x54(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rax
leaq 0x4626c(%rip), %rcx     # 0x929f8
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movl (%rax), %ecx
andl $0xffff00ff, %ecx       # imm = 0xFFFF00FF
orl $0x4000, %ecx           # imm = 0x4000
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
orl $0x9, %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl $0x2a, 0x4(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)