// File: /workspace/github_c_makefile_star2_O0/been-jamming[P]MinimalCC/expression.c
// Function: compile_value
void compile_value(value *output, char **c, unsigned char dereference, unsigned char force_stack, FILE *output_file){
	char *temp_c;
	type cast_type;

	skip_whitespace(c);

	if(**c == '*'){
		++*c;
		compile_value(output, c, 1, force_stack, output_file);
		if(dereference){
			compile_dereference(output, output_file);
		}
		output->is_reference = !dereference;
		return;
	} else if(**c == '&'){
		++*c;
		if(dereference){
			compile_value(output, c, 0, force_stack, output_file);
		} else {
			snprintf(error_message, sizeof(error_message), "Can't get address of r-value");
			do_error(1);
		}
		output->is_reference = 0;
		return;
	} else if(**c == '!'){
		++*c;
		if(dereference){
			compile_value(output, c, 1, force_stack, output_file);
			compile_logical_not(output, output_file);
		} else {
			snprintf(error_message, sizeof(error_message), "Can't get address of r-value");
			do_error(1);
		}
		output->is_reference = 0;
		return;
	} else if(**c == '~'){
		++*c;
		if(dereference){
			compile_value(output, c, 1, force_stack, output_file);
			compile_not(output, output_file);
		} else {
			snprintf(error_message, sizeof(error_message), "Can't get address of r-value");
			do_error(1);
		}
		output->is_reference = 0;
		return;
	} else if(**c == '-' && !digit((*c)[1])){
		++*c;
		if(dereference){
			compile_value(output, c, 1, force_stack, output_file);
			compile_negate(output, output_file);
		} else {
			snprintf(error_message, sizeof(error_message), "Can't get address of r-value");
			do_error(1);
		}
		output->is_reference = 0;
		return;
	}

	if(**c == '('){
		++*c;
		skip_whitespace(c);
		temp_c = *c;
		//Type casting
		if(parse_datatype(NULL, &temp_c)){
			cast_type = EMPTY_TYPE;
			parse_type(&cast_type, c, NULL, NULL, 0, 0);
			if(**c != ')'){
				snprintf(error_message, sizeof(error_message), "Expected ')'");
				do_error(1);
			}
			++*c;
			compile_value(output, c, 1, force_stack, output_file);
			cast(output, cast_type, 0, output_file);
		//Associative parentheses
		} else {
			compile_expression(output, c, dereference, force_stack, output_file);
			if(**c == ')'){
				++*c;
			} else {
				snprintf(error_message, sizeof(error_message), "Expected closing ')'");
				do_error(1);
			}
		}
	} else if(**c == '-' || digit(**c)){
		compile_integer(output, c, dereference, force_stack, output_file);
	} else if(alpha(**c)){
		compile_variable(output, c, dereference, force_stack, output_file);
	} else if(**c == '\"'){
		compile_string(output, c, dereference, force_stack, output_file);
	} else if(**c == '\''){
		compile_character(output, c, dereference, force_stack, output_file);
	} else {
		snprintf(error_message, sizeof(error_message), "Unrecognized expression value");
		do_error(1);
	}

	skip_whitespace(c);
	while(**c == '[' || **c == '('){
		if(**c == '['){
			if(output->is_reference){
				compile_dereference(output, output_file);
			}
			compile_list_index(c, output, dereference, output_file);
		} else if(**c == '('){
			++*c;
			if(output->is_reference){
				compile_dereference(output, output_file);
			}
			compile_function_call(c, output, output_file);
		}

		skip_whitespace(c);
	}
}

// Assembly:
subq $0xb8, %rsp
movb %cl, %al
movb %dl, %cl
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movb %cl, 0xa7(%rsp)
movb %al, 0xa6(%rsp)
movq %r8, 0x98(%rsp)
movq 0xa8(%rsp), %rdi
callq 0xbb70
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
jne 0x6c56
movq 0xa8(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movb 0xa6(%rsp), %al
movq 0x98(%rsp), %r8
movl $0x1, %edx
movzbl %al, %ecx
callq 0x6b80
cmpb $0x0, 0xa7(%rsp)
je 0x6c32
movq 0xb0(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x4400
cmpb $0x0, 0xa7(%rsp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq 0xb0(%rsp), %rax
movb %cl, 0x50(%rax)
jmp 0x7369
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x26, %eax
jne 0x6ce5
movq 0xa8(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
cmpb $0x0, 0xa7(%rsp)
je 0x6cb0
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movb 0xa6(%rsp), %al
movq 0x98(%rsp), %r8
xorl %edx, %edx
movzbl %al, %ecx
callq 0x6b80
jmp 0x6cd4
leaq 0xa879(%rip), %rdi      # 0x11530
movl $0x100, %esi            # imm = 0x100
leaq 0x6f9e(%rip), %rdx      # 0xdc61
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x87b0
movq 0xb0(%rsp), %rax
movb $0x0, 0x50(%rax)
jmp 0x7369
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x21, %eax
jne 0x6d90
movq 0xa8(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
cmpb $0x0, 0xa7(%rsp)
je 0x6d5b
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movb 0xa6(%rsp), %al
movq 0x98(%rsp), %r8
movl $0x1, %edx
movzbl %al, %ecx
callq 0x6b80
movq 0xb0(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x6670
jmp 0x6d7f
leaq 0xa7ce(%rip), %rdi      # 0x11530
movl $0x100, %esi            # imm = 0x100
leaq 0x6ef3(%rip), %rdx      # 0xdc61
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x87b0
movq 0xb0(%rsp), %rax
movb $0x0, 0x50(%rax)
jmp 0x7369
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x7e, %eax
jne 0x6e3b
movq 0xa8(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
cmpb $0x0, 0xa7(%rsp)
je 0x6e06
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movb 0xa6(%rsp), %al
movq 0x98(%rsp), %r8
movl $0x1, %edx
movzbl %al, %ecx
callq 0x6b80
movq 0xb0(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x67e0
jmp 0x6e2a
leaq 0xa723(%rip), %rdi      # 0x11530
movl $0x100, %esi            # imm = 0x100
leaq 0x6e48(%rip), %rdx      # 0xdc61
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x87b0
movq 0xb0(%rsp), %rax
movb $0x0, 0x50(%rax)
jmp 0x7369
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x6f02
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movsbl 0x1(%rax), %edi
callq 0xb4e0
cmpb $0x0, %al
jne 0x6f02
movq 0xa8(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
cmpb $0x0, 0xa7(%rsp)
je 0x6ecd
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movb 0xa6(%rsp), %al
movq 0x98(%rsp), %r8
movl $0x1, %edx
movzbl %al, %ecx
callq 0x6b80
movq 0xb0(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x69b0
jmp 0x6ef1
leaq 0xa65c(%rip), %rdi      # 0x11530
movl $0x100, %esi            # imm = 0x100
leaq 0x6d81(%rip), %rdx      # 0xdc61
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x87b0
movq 0xb0(%rsp), %rax
movb $0x0, 0x50(%rax)
jmp 0x7369
jmp 0x6f04
jmp 0x6f06
jmp 0x6f08
jmp 0x6f0a
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x28, %eax
jne 0x70dd
movq 0xa8(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0xa8(%rsp), %rdi
callq 0xbb70
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x90(%rsp)
xorl %eax, %eax
movl %eax, %edi
leaq 0x90(%rsp), %rsi
callq 0xb980
cmpb $0x0, %al
je 0x705a
leaq 0x50(%rsp), %rdi
leaq 0xa830(%rip), %rsi      # 0x117a8
movl $0x40, %edx
callq 0x1120
movq 0xa8(%rsp), %rsi
leaq 0x50(%rsp), %rdi
xorl %eax, %eax
movl %eax, %ecx
xorl %r9d, %r9d
movq %rcx, %rdx
movl %r9d, %r8d
callq 0xc370
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x29, %eax
je 0x6fd8
leaq 0xa575(%rip), %rdi      # 0x11530
movl $0x100, %esi            # imm = 0x100
leaq 0x6a07(%rip), %rdx      # 0xd9ce
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x87b0
movq 0xa8(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movb 0xa6(%rsp), %al
movq 0x98(%rsp), %r8
movl $0x1, %edx
movzbl %al, %ecx
callq 0x6b80
movq 0xb0(%rsp), %rdi
movq 0x98(%rsp), %rdx
xorl %eax, %eax
movups 0x50(%rsp), %xmm0
movups 0x60(%rsp), %xmm1
movups 0x70(%rsp), %xmm2
movups 0x80(%rsp), %xmm3
movq %rsp, %rax
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
xorl %esi, %esi
callq 0x3fd0
jmp 0x70d8
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movb 0xa7(%rsp), %cl
movb 0xa6(%rsp), %al
movq 0x98(%rsp), %r8
movzbl %cl, %edx
movzbl %al, %ecx
callq 0x4fe0
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x29, %eax
jne 0x70b2
movq 0xa8(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x70d6
leaq 0xa477(%rip), %rdi      # 0x11530
movl $0x100, %esi            # imm = 0x100
leaq 0x6bb9(%rip), %rdx      # 0xdc7e
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x87b0
jmp 0x70d8
jmp 0x7246
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x710b
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %edi
callq 0xb4e0
movzbl %al, %eax
cmpl $0x0, %eax
je 0x7141
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movb 0xa7(%rsp), %cl
movb 0xa6(%rsp), %al
movq 0x98(%rsp), %r8
movzbl %cl, %edx
movzbl %al, %ecx
callq 0x3290
jmp 0x7244
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %edi
callq 0xb410
cmpb $0x0, %al
je 0x718e
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movb 0xa7(%rsp), %cl
movb 0xa6(%rsp), %al
movq 0x98(%rsp), %r8
movzbl %cl, %edx
movzbl %al, %ecx
callq 0x33c0
jmp 0x7242
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x71d4
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movb 0xa7(%rsp), %cl
movb 0xa6(%rsp), %al
movq 0x98(%rsp), %r8
movzbl %cl, %edx
movzbl %al, %ecx
callq 0x6240
jmp 0x7240
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0x721a
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movb 0xa7(%rsp), %cl
movb 0xa6(%rsp), %al
movq 0x98(%rsp), %r8
movzbl %cl, %edx
movzbl %al, %ecx
callq 0x63b0
jmp 0x723e
leaq 0xa30f(%rip), %rdi      # 0x11530
movl $0x100, %esi            # imm = 0x100
leaq 0x6a66(%rip), %rdx      # 0xdc93
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x87b0
jmp 0x7240
jmp 0x7242
jmp 0x7244
jmp 0x7246
movq 0xa8(%rsp), %rdi
callq 0xbb70
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x5b, %ecx
movb %al, 0x4f(%rsp)
je 0x7284
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x28, %eax
sete %al
movb %al, 0x4f(%rsp)
movb 0x4f(%rsp), %al
testb $0x1, %al
jne 0x7291
jmp 0x7369
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x5b, %eax
jne 0x72f0
movq 0xb0(%rsp), %rax
cmpb $0x0, 0x50(%rax)
je 0x72c7
movq 0xb0(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x4400
movq 0xa8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movb 0xa7(%rsp), %al
movq 0x98(%rsp), %rcx
movzbl %al, %edx
callq 0x5160
jmp 0x7357
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x28, %eax
jne 0x7355
movq 0xa8(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0xb0(%rsp), %rax
cmpb $0x0, 0x50(%rax)
je 0x7338
movq 0xb0(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x4400
movq 0xa8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movq 0x98(%rsp), %rdx
callq 0x46f0
jmp 0x7357
movq 0xa8(%rsp), %rdi
callq 0xbb70
jmp 0x7253
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)