// File: /workspace/github_c_makefile_star2_O0/been-jamming[P]MinimalCC/expression.c
// Function: compile_variable
void compile_variable(value *output, char **c, unsigned char dereference, unsigned char force_stack, FILE *output_file){
	char *start;
	char varname[32] = {0};
	unsigned int varname_length = 0;
	variable *var;
	int i;

	skip_whitespace(c);
	start = *c;
	while(alphanumeric(**c) && varname_length < 31){
		++*c;
		varname_length++;
	}
	memcpy(varname, start, varname_length);
	varname[31] = '\0';

	for(i = current_scope; i >= 0; i--){
		var = read_dictionary(*local_variables[i], varname, 0);
		if(var){
			break;
		}
	}

	if(!var){
		var = read_dictionary(global_variables, varname, 0);
		if(!var){
			snprintf(error_message, sizeof(error_message), "Unrecognized variable '%s'", varname);
			do_error(1);
		}
		compile_global_variable(output, var, dereference, force_stack, output_file);
	} else {
		compile_local_variable(output, var, dereference, force_stack, output_file);
	}
}

// Assembly:
subq $0xa8, %rsp
movb %cl, %al
movb %dl, %cl
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movb %cl, 0x97(%rsp)
movb %al, 0x96(%rsp)
movq %r8, 0x88(%rsp)
leaq 0x60(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x10c0
movl $0x0, 0x5c(%rsp)
movq 0x98(%rsp), %rdi
callq 0xbb70
movq 0x98(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x80(%rsp)
movq 0x98(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %edi
callq 0xb470
movzbl %al, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x4b(%rsp)
je 0x3457
cmpl $0x1f, 0x5c(%rsp)
setb %al
movb %al, 0x4b(%rsp)
movb 0x4b(%rsp), %al
testb $0x1, %al
jne 0x3461
jmp 0x3480
movq 0x98(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x342a
leaq 0x60(%rsp), %rdi
movq 0x80(%rsp), %rsi
movl 0x5c(%rsp), %eax
movl %eax, %edx
callq 0x1120
movb $0x0, 0x7f(%rsp)
movl 0xde75(%rip), %eax      # 0x11318
movl %eax, 0x4c(%rsp)
cmpl $0x0, 0x4c(%rsp)
jl 0x3513
movslq 0x4c(%rsp), %rcx
leaq 0xde66(%rip), %rax      # 0x11320
movq (%rax,%rcx,8), %rcx
leaq 0x60(%rsp), %rdi
xorl %eax, %eax
movq 0x40(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x40(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups 0x20(%rcx), %xmm2
movups 0x30(%rcx), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
xorl %esi, %esi
callq 0xb090
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
je 0x3504
jmp 0x3513
jmp 0x3506
movl 0x4c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x34a7
cmpq $0x0, 0x50(%rsp)
jne 0x35cc
leaq 0x60(%rsp), %rdi
xorl %eax, %eax
movq 0xdde3(%rip), %rcx      # 0x11310
movq %rsp, %rax
movq %rcx, 0x40(%rax)
movups 0xddc5(%rip), %xmm0     # 0x11300
movups %xmm0, 0x30(%rax)
movups 0xddaa(%rip), %xmm0     # 0x112f0
movups %xmm0, 0x20(%rax)
movups 0xdd8f(%rip), %xmm0     # 0x112e0
movups %xmm0, 0x10(%rax)
movups 0xdd74(%rip), %xmm0     # 0x112d0
movups %xmm0, (%rax)
xorl %esi, %esi
callq 0xb090
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0x359c
leaq 0x60(%rsp), %rcx
leaq 0xdfb1(%rip), %rdi      # 0x11530
movl $0x100, %esi            # imm = 0x100
leaq 0xa25f(%rip), %rdx      # 0xd7ea
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x87b0
movq 0xa0(%rsp), %rdi
movq 0x50(%rsp), %rsi
movb 0x97(%rsp), %cl
movb 0x96(%rsp), %al
movq 0x88(%rsp), %r8
movzbl %cl, %edx
movzbl %al, %ecx
callq 0x3610
jmp 0x35fa
movq 0xa0(%rsp), %rdi
movq 0x50(%rsp), %rsi
movb 0x97(%rsp), %cl
movb 0x96(%rsp), %al
movq 0x88(%rsp), %r8
movzbl %cl, %edx
movzbl %al, %ecx
callq 0x3930
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)