// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %r8, 0x48(%rsp)
movl %ecx, %r15d
movl %edx, %ebx
movq %rsi, %r13
movq %rdi, 0x58(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movq %rsi, %rdi
callq 0x79e2
movq (%r13), %r12
movsbl (%r12), %edi
callq 0x7581
testb %al, %al
je 0x2e43
xorl %r14d, %r14d
movq (%r13), %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%r13)
movsbl 0x1(%rax), %edi
callq 0x7581
leaq 0x1(%r14), %rdx
testb %al, %al
je 0x2e45
cmpl $0x1e, %r14d
movq %rdx, %r14
jb 0x2e1b
jmp 0x2e45
xorl %edx, %edx
leaq 0x60(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x1130
movb $0x0, 0x1f(%r14)
movslq 0xa467(%rip), %r13      # 0xd2c8
testq %r13, %r13
js 0x2ea0
leaq 0xa463(%rip), %rax      # 0xd2d0
leaq (%rax,%r13,8), %rbp
incq %r13
leaq 0x60(%rsp), %r14
movq (%rbp), %rsi
movl $0x9, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %r14, %rdi
xorl %esi, %esi
callq 0x7389
testq %rax, %rax
jne 0x2edb
addq $-0x8, %rbp
decq %r13
jg 0x2e79
leaq 0xa3d9(%rip), %rsi      # 0xd280
movl $0x9, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x60(%rsp), %rdi
xorl %esi, %esi
callq 0x7389
testq %rax, %rax
je 0x2fd2
movzbl %bl, %edx
movzbl %r15b, %ecx
movq 0x58(%rsp), %rdi
movq %rax, %rsi
jmp 0x3009
movq %rax, %r12
movq %rax, %r14
addq $0x8, %r14
movups 0x8(%rax), %xmm0
movups 0x18(%rax), %xmm1
movups 0x28(%rax), %xmm2
movups 0x38(%rax), %xmm3
movaps %xmm3, 0xb0(%rsp)
movaps %xmm2, 0xa0(%rsp)
movaps %xmm1, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movzbl %r15b, %edi
callq 0x1505
movq %rax, %r13
movq 0x58(%rsp), %rax
leaq 0x10(%rax), %rbp
movaps 0x80(%rsp), %xmm0
movaps 0x90(%rsp), %xmm1
movaps 0xa0(%rsp), %xmm2
movaps 0xb0(%rsp), %xmm3
movups %xmm0, 0x10(%rax)
movups %xmm1, 0x20(%rax)
movups %xmm2, 0x30(%rax)
movups %xmm3, 0x40(%rax)
movq %r13, (%rax)
movq %r13, %r15
shrq $0x20, %r15
movl %edx, 0x54(%rsp)
movl %edx, 0x8(%rax)
movq %r14, %rdi
callq 0x7a9c
movl %ebx, %r14d
testb %r14b, %r14b
je 0x3018
cmpl $0x7, %eax
jne 0x3065
cmpl $0x1, %r13d
je 0x3115
testl %r13d, %r13d
jne 0x3167
leaq 0xa2aa(%rip), %rax      # 0xd24c
movl (%rax), %eax
leaq 0xa29d(%rip), %rcx      # 0xd248
movl (%rcx), %ecx
subl 0x48(%r12), %eax
addl %eax, %ecx
addl $-0x4, %ecx
leaq 0x6b63(%rip), %rsi      # 0x9b21
movq 0x48(%rsp), %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x171c
jmp 0x3167
leaq 0xa507(%rip), %rdi      # 0xd4e0
leaq 0x6606(%rip), %rdx      # 0x95e6
leaq 0x60(%rsp), %rcx
movl $0x100, %esi            # imm = 0x100
xorl %eax, %eax
callq 0x10c0
movl $0x1, %edi
callq 0x5b10
movzbl %bl, %edx
movzbl %r15b, %ecx
movq 0x58(%rsp), %rdi
xorl %esi, %esi
movq 0x48(%rsp), %r8
callq 0x3295
jmp 0x3190
cmpl $0x7, %eax
cmpl $0x1, %r13d
je 0x30c1
testl %r13d, %r13d
jne 0x3177
leaq 0xa217(%rip), %rax      # 0xd24c
movl (%rax), %eax
leaq 0xa20a(%rip), %rcx      # 0xd248
movl (%rcx), %ecx
subl 0x48(%r12), %eax
addl %eax, %ecx
addl $-0x4, %ecx
leaq 0x6ad0(%rip), %rsi      # 0x9b21
movq 0x48(%rsp), %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x171c
jmp 0x3177
cmpl $0x1, %r13d
je 0x31a2
testl %r13d, %r13d
jne 0x3184
leaq 0x80(%rsp), %rdi
xorl %esi, %esi
callq 0x1990
cmpl $0x4, %eax
je 0x3207
cmpl $0x1, %eax
jne 0x3184
leaq 0xa1ac(%rip), %rax      # 0xd24c
movl (%rax), %eax
leaq 0xa19f(%rip), %rcx      # 0xd248
movl (%rcx), %ecx
subl 0x48(%r12), %eax
addl %eax, %ecx
addl $-0x4, %ecx
leaq 0x6a8c(%rip), %rsi      # 0x9b48
jmp 0x322a
leaq 0xa184(%rip), %rax      # 0xd24c
movl (%rax), %eax
leaq 0xa177(%rip), %rcx      # 0xd248
movl (%rcx), %ecx
subl 0x48(%r12), %eax
leal (%rax,%rcx), %edx
addl $-0x4, %edx
leaq 0x6a50(%rip), %rsi      # 0x9b35
movq 0x48(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x171c
movq %r13, %rdi
movl 0x54(%rsp), %esi
callq 0x15ba
leaq 0x64ce(%rip), %rsi      # 0x95d5
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x171c
jmp 0x3177
leaq 0xa130(%rip), %rax      # 0xd24c
movl (%rax), %eax
leaq 0xa123(%rip), %rcx      # 0xd248
movl (%rcx), %ecx
subl 0x48(%r12), %eax
leal (%rax,%rcx), %edx
addl $-0x4, %edx
leaq 0x69fc(%rip), %rsi      # 0x9b35
movq 0x48(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x171c
movq %r13, %rdi
movl 0x54(%rsp), %esi
callq 0x15ba
leaq 0x647a(%rip), %rsi      # 0x95d5
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x171c
movq %rbp, %rdi
callq 0x7ab4
movq 0x58(%rsp), %rax
decl 0x48(%rax)
movq %rbp, %rdi
movl $0x4, %esi
callq 0x75ac
testb %r14b, %r14b
movq 0x58(%rsp), %rax
sete 0x50(%rax)
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x80(%rsp), %rdi
xorl %esi, %esi
callq 0x1990
cmpl $0x4, %eax
je 0x323e
cmpl $0x1, %eax
jne 0x3184
leaq 0xa086(%rip), %rax      # 0xd24c
movl (%rax), %eax
leaq 0xa079(%rip), %rcx      # 0xd248
movl (%rcx), %ecx
subl 0x48(%r12), %eax
leal (%rax,%rcx), %edx
addl $-0x4, %edx
leaq 0x64b8(%rip), %rsi      # 0x969b
movq 0x48(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x171c
movq %r13, %rdi
movl 0x54(%rsp), %esi
callq 0x15ba
leaq 0x6578(%rip), %rsi      # 0x977d
jmp 0x3284
leaq 0xa03e(%rip), %rax      # 0xd24c
movl (%rax), %eax
leaq 0xa031(%rip), %rcx      # 0xd248
movl (%rcx), %ecx
subl 0x48(%r12), %eax
addl %eax, %ecx
addl $-0x4, %ecx
leaq 0x5e08(%rip), %rsi      # 0x9032
movq 0x48(%rsp), %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x171c
jmp 0x3184
leaq 0xa007(%rip), %rax      # 0xd24c
movl (%rax), %eax
leaq 0x9ffa(%rip), %rcx      # 0xd248
movl (%rcx), %ecx
subl 0x48(%r12), %eax
leal (%rax,%rcx), %edx
addl $-0x4, %edx
leaq 0x6404(%rip), %rsi      # 0x9666
movq 0x48(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x171c
movq %r13, %rdi
movl 0x54(%rsp), %esi
callq 0x15ba
leaq 0x6351(%rip), %rsi      # 0x95d5
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x171c
jmp 0x3184