// File: /workspace/github_c_makefile_star2_O0/been-jamming[P]MinimalCC/expression.c
// Function: compile_local_variable
static void compile_local_variable(value *output, variable *var, unsigned char dereference, unsigned char force_stack, FILE *output_file){
	data_entry data;
	type data_type;

	data_type = var->var_type;
	data = allocate(force_stack);
	output->data_type = data_type;
	output->data = data;
	if(dereference){
		if(peek_type(&(var->var_type)) == type_list){
			if(data.type == data_register){
				fileprint(output_file, "addi $s%d, $sp, %d\n", data.reg, var_stack_position(var));
			} else if(data.type == data_stack){
				fileprint(output_file, "addi $t0, $sp, %d\n", var_stack_position(var));
				fileprint(output_file, "sw $t0, %d($sp)\n", get_stack_pos(data));
			}
			pop_type(&(output->data_type));
			output->data_type.current_index--;
			add_type_entry(&(output->data_type), type_pointer);
		} else {
			if(data.type == data_register){
				switch(type_size(&data_type, 0)){
					case 1:
						fileprint(output_file, "lb $s%d, %d($sp)\n", data.reg, var_stack_position(var));
						break;
					case 4:
						fileprint(output_file, "lw $s%d, %d($sp)\n", data.reg, var_stack_position(var));
						break;

				}
			} else if(data.type == data_stack){
				switch(type_size(&data_type, 0)){
					case 1:
						fileprint(output_file, "lb $t0, %d($sp)\n", var_stack_position(var));
						fileprint(output_file, "sb $t0, %d($sp)\n", get_stack_pos(data));
						break;
					case 4:
						fileprint(output_file, "lw $t0, %d($sp)\n", var_stack_position(var));
						fileprint(output_file, "sw $t0, %d($sp)\n", get_stack_pos(data));
						break;
				}
			}
		}
	} else {
		if(peek_type(&(var->var_type)) == type_list){
			if(data.type == data_register){
				fileprint(output_file, "addi $s%d, $sp, %d\n", data.reg, var_stack_position(var));
			} else if(data.type == data_stack){
				fileprint(output_file, "addi $t0, $sp, %d\n", var_stack_position(var));
				fileprint(output_file, "sw $t0, %d($sp)\n", get_stack_pos(data));
			}
		} else {
			if(data.type == data_register){
				fileprint(output_file, "addi $s%d, $sp, %d\n", data.reg, var_stack_position(var));
			} else if(data.type == data_stack){
				fileprint(output_file, "addi $t0, $sp, %d\n", var_stack_position(var));
				fileprint(output_file, "sw $t0, %d($sp)\n", get_stack_pos(data));
			}
		}
		add_type_entry(&(output->data_type), type_pointer);
	}

	output->is_reference = !dereference;
}

// Assembly:
subq $0x198, %rsp            # imm = 0x198
movb %cl, %al
movb %dl, %cl
movq %rdi, 0x190(%rsp)
movq %rsi, 0x188(%rsp)
movb %cl, 0x187(%rsp)
movb %al, 0x186(%rsp)
movq %r8, 0x178(%rsp)
movq 0x188(%rsp), %rax
movups 0x8(%rax), %xmm0
movups 0x18(%rax), %xmm1
movups 0x28(%rax), %xmm2
movups 0x38(%rax), %xmm3
movaps %xmm3, 0x150(%rsp)
movaps %xmm2, 0x140(%rsp)
movaps %xmm1, 0x130(%rsp)
movaps %xmm0, 0x120(%rsp)
movzbl 0x186(%rsp), %edi
callq 0x1300
movl %edx, 0x108(%rsp)
movq %rax, 0x100(%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0x114(%rsp)
movl 0x108(%rsp), %eax
movl %eax, 0x11c(%rsp)
movq 0x114(%rsp), %rax
movq %rax, 0x16c(%rsp)
movl 0x11c(%rsp), %eax
movl %eax, 0x174(%rsp)
movq 0x190(%rsp), %rdi
addq $0x10, %rdi
leaq 0x120(%rsp), %rsi
movl $0x40, %edx
callq 0x1120
movq 0x190(%rsp), %rax
movq 0x16c(%rsp), %rcx
movq %rcx, (%rax)
movl 0x174(%rsp), %ecx
movl %ecx, 0x8(%rax)
cmpb $0x0, 0x187(%rsp)
je 0x3da8
movq 0x188(%rsp), %rdi
addq $0x8, %rdi
callq 0xbdb0
cmpl $0x7, %eax
jne 0x3b89
cmpl $0x0, 0x16c(%rsp)
jne 0x3aad
movq 0x178(%rsp), %rax
movq %rax, 0xa0(%rsp)
movl 0x170(%rsp), %eax
movl %eax, 0xac(%rsp)
movq 0x188(%rsp), %rdi
callq 0x8740
movq 0xa0(%rsp), %rdi
movl 0xac(%rsp), %edx
movl %eax, %ecx
leaq 0xa284(%rip), %rsi      # 0xdd25
movb $0x0, %al
callq 0x16f0
jmp 0x3b4c
cmpl $0x1, 0x16c(%rsp)
jne 0x3b4a
movq 0x178(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x188(%rsp), %rdi
callq 0x8740
movq 0x90(%rsp), %rdi
movl %eax, %edx
leaq 0xa250(%rip), %rsi      # 0xdd39
movb $0x0, %al
callq 0x16f0
movq 0x178(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x16c(%rsp), %rax
movq %rax, 0xf0(%rsp)
movl 0x174(%rsp), %eax
movl %eax, 0xf8(%rsp)
movq 0xf0(%rsp), %rdi
movl 0xf8(%rsp), %esi
callq 0x1490
movq 0x98(%rsp), %rdi
movl %eax, %edx
leaq 0x9c96(%rip), %rsi      # 0xd7d9
movb $0x0, %al
callq 0x16f0
jmp 0x3b4c
movq 0x190(%rsp), %rdi
addq $0x10, %rdi
callq 0xbe20
movq 0x190(%rsp), %rax
movl 0x48(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x48(%rax)
movq 0x190(%rsp), %rdi
addq $0x10, %rdi
movl $0x4, %esi
callq 0xb510
jmp 0x3da3
cmpl $0x0, 0x16c(%rsp)
jne 0x3c56
leaq 0x120(%rsp), %rdi
xorl %esi, %esi
callq 0x1a40
movl %eax, %ecx
movl %ecx, 0x8c(%rsp)
subl $0x1, %eax
je 0x3bc7
jmp 0x3bb6
movl 0x8c(%rsp), %eax
subl $0x4, %eax
je 0x3c13
jmp 0x3c51
movq 0x178(%rsp), %rax
movq %rax, 0x80(%rsp)
movl 0x170(%rsp), %eax
movl %eax, 0x88(%rsp)
movq 0x188(%rsp), %rdi
callq 0x8740
movq 0x80(%rsp), %rdi
movl 0x88(%rsp), %edx
movl %eax, %ecx
leaq 0xa142(%rip), %rsi      # 0xdd4c
movb $0x0, %al
callq 0x16f0
jmp 0x3c51
movq 0x178(%rsp), %rax
movq %rax, 0x70(%rsp)
movl 0x170(%rsp), %eax
movl %eax, 0x7c(%rsp)
movq 0x188(%rsp), %rdi
callq 0x8740
movq 0x70(%rsp), %rdi
movl 0x7c(%rsp), %edx
movl %eax, %ecx
leaq 0x93cc(%rip), %rsi      # 0xd016
movb $0x0, %al
callq 0x16f0
jmp 0x3da1
cmpl $0x1, 0x16c(%rsp)
jne 0x3d9f
leaq 0x120(%rsp), %rdi
xorl %esi, %esi
callq 0x1a40
movl %eax, %ecx
movl %ecx, 0x6c(%rsp)
subl $0x1, %eax
je 0x3c92
jmp 0x3c80
movl 0x6c(%rsp), %eax
subl $0x4, %eax
je 0x3d1a
jmp 0x3d9d
movq 0x178(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x188(%rsp), %rdi
callq 0x8740
movq 0x58(%rsp), %rdi
movl %eax, %edx
leaq 0x9be5(%rip), %rsi      # 0xd89f
movb $0x0, %al
callq 0x16f0
movq 0x178(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x16c(%rsp), %rax
movq %rax, 0xe0(%rsp)
movl 0x174(%rsp), %eax
movl %eax, 0xe8(%rsp)
movq 0xe0(%rsp), %rdi
movl 0xe8(%rsp), %esi
callq 0x1490
movq 0x60(%rsp), %rdi
movl %eax, %edx
leaq 0x9c73(%rip), %rsi      # 0xd981
movb $0x0, %al
callq 0x16f0
jmp 0x3d9d
movq 0x178(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x188(%rsp), %rdi
callq 0x8740
movq 0x48(%rsp), %rdi
movl %eax, %edx
leaq 0x9b28(%rip), %rsi      # 0xd86a
movb $0x0, %al
callq 0x16f0
movq 0x178(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x16c(%rsp), %rax
movq %rax, 0xd0(%rsp)
movl 0x174(%rsp), %eax
movl %eax, 0xd8(%rsp)
movq 0xd0(%rsp), %rdi
movl 0xd8(%rsp), %esi
callq 0x1490
movq 0x50(%rsp), %rdi
movl %eax, %edx
leaq 0x9a43(%rip), %rsi      # 0xd7d9
movb $0x0, %al
callq 0x16f0
jmp 0x3d9f
jmp 0x3da1
jmp 0x3da3
jmp 0x3f9f
movq 0x188(%rsp), %rdi
addq $0x8, %rdi
callq 0xbdb0
cmpl $0x7, %eax
jne 0x3ea7
cmpl $0x0, 0x16c(%rsp)
jne 0x3e0f
movq 0x178(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0x170(%rsp), %eax
movl %eax, 0x44(%rsp)
movq 0x188(%rsp), %rdi
callq 0x8740
movq 0x38(%rsp), %rdi
movl 0x44(%rsp), %edx
movl %eax, %ecx
leaq 0x9f22(%rip), %rsi      # 0xdd25
movb $0x0, %al
callq 0x16f0
jmp 0x3ea2
cmpl $0x1, 0x16c(%rsp)
jne 0x3ea0
movq 0x178(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x188(%rsp), %rdi
callq 0x8740
movq 0x28(%rsp), %rdi
movl %eax, %edx
leaq 0x9ef4(%rip), %rsi      # 0xdd39
movb $0x0, %al
callq 0x16f0
movq 0x178(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x16c(%rsp), %rax
movq %rax, 0xc0(%rsp)
movl 0x174(%rsp), %eax
movl %eax, 0xc8(%rsp)
movq 0xc0(%rsp), %rdi
movl 0xc8(%rsp), %esi
callq 0x1490
movq 0x30(%rsp), %rdi
movl %eax, %edx
leaq 0x9940(%rip), %rsi      # 0xd7d9
movb $0x0, %al
callq 0x16f0
jmp 0x3ea2
jmp 0x3f89
cmpl $0x0, 0x16c(%rsp)
jne 0x3ef4
movq 0x178(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x170(%rsp), %eax
movl %eax, 0x24(%rsp)
movq 0x188(%rsp), %rdi
callq 0x8740
movq 0x18(%rsp), %rdi
movl 0x24(%rsp), %edx
movl %eax, %ecx
leaq 0x9e3d(%rip), %rsi      # 0xdd25
movb $0x0, %al
callq 0x16f0
jmp 0x3f87
cmpl $0x1, 0x16c(%rsp)
jne 0x3f85
movq 0x178(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x188(%rsp), %rdi
callq 0x8740
movq 0x8(%rsp), %rdi
movl %eax, %edx
leaq 0x9e0f(%rip), %rsi      # 0xdd39
movb $0x0, %al
callq 0x16f0
movq 0x178(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x16c(%rsp), %rax
movq %rax, 0xb0(%rsp)
movl 0x174(%rsp), %eax
movl %eax, 0xb8(%rsp)
movq 0xb0(%rsp), %rdi
movl 0xb8(%rsp), %esi
callq 0x1490
movq 0x10(%rsp), %rdi
movl %eax, %edx
leaq 0x985b(%rip), %rsi      # 0xd7d9
movb $0x0, %al
callq 0x16f0
jmp 0x3f87
jmp 0x3f89
movq 0x190(%rsp), %rdi
addq $0x10, %rdi
movl $0x4, %esi
callq 0xb510
cmpb $0x0, 0x187(%rsp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq 0x190(%rsp), %rax
movb %cl, 0x50(%rax)
addq $0x198, %rsp            # imm = 0x198
retq
nopw %cs:(%rax,%rax)