// File: /workspace/github_c_makefile_star2_O0/been-jamming[P]MinimalCC/compile.c
// Function: compile_block
void compile_block(char **c, unsigned char function_beginning, FILE *output_file){
	char *temp;
	unsigned char new_scope = 0;
	int variables_size_before;

	variables_size_before = variables_size;
	skip_whitespace(c);
	temp = *c;
	if(function_beginning || parse_datatype(NULL, &temp)){
		new_scope = 1;
		current_scope++;
		if(current_scope >= MAX_SCOPE){
			snprintf(error_message, sizeof(error_message), "Scope depth too large");
			do_error(1);
		}
		if(!local_variables[current_scope]){
			local_variables[current_scope] = malloc(sizeof(dictionary));
			*local_variables[current_scope] = create_dictionary(NULL);
		}
	}
	temp = *c;
	while(parse_datatype(NULL, &temp)){
		compile_variable_initializer(c);
		skip_whitespace(c);
		temp = *c;
		num_vars++;
	}

	if(new_scope){
		fprintf(output_file, "addi $sp, $sp, %d\n", -variables_size + variables_size_before);
	}

	while(**c != '}'){
		compile_statement(c, output_file);
		skip_whitespace(c);
	}

	if(new_scope){
		fprintf(output_file, "addi $sp, $sp, %d\n", variables_size - variables_size_before);
		free_dictionary(*local_variables[current_scope], free_var);
		free(local_variables[current_scope]);
		local_variables[current_scope] = NULL;
		current_scope--;
		variables_size = variables_size_before;
	}
}

// Assembly:
subq $0xc8, %rsp
movb %sil, %al
movq %rdi, 0xc0(%rsp)
movb %al, 0xbf(%rsp)
movq %rdx, 0xb0(%rsp)
movb $0x0, 0xa7(%rsp)
leaq 0x8098(%rip), %rax      # 0x11298
movl (%rax), %eax
movl %eax, 0xa0(%rsp)
movq 0xc0(%rsp), %rdi
callq 0xbb70
movq 0xc0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xa8(%rsp)
movzbl 0xbf(%rsp), %eax
cmpl $0x0, %eax
jne 0x9253
xorl %eax, %eax
movl %eax, %edi
leaq 0xa8(%rsp), %rsi
callq 0xb980
movzbl %al, %eax
cmpl $0x0, %eax
je 0x9318
movb $0x1, 0xa7(%rsp)
leaq 0x80b6(%rip), %rax      # 0x11318
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x80aa(%rip), %rax      # 0x11318
movl %ecx, (%rax)
leaq 0x80a1(%rip), %rax      # 0x11318
cmpl $0x20, (%rax)
jl 0x92a0
leaq 0x82ad(%rip), %rdi      # 0x11530
movl $0x100, %esi            # imm = 0x100
leaq 0x4ccc(%rip), %rdx      # 0xdf5b
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x87b0
leaq 0x8071(%rip), %rax      # 0x11318
movslq (%rax), %rcx
leaq 0x806f(%rip), %rax      # 0x11320
cmpq $0x0, (%rax,%rcx,8)
jne 0x9316
movl $0x48, %edi
callq 0x1130
movq %rax, %rdx
leaq 0x804c(%rip), %rax      # 0x11318
movslq (%rax), %rcx
leaq 0x804a(%rip), %rax      # 0x11320
movq %rdx, (%rax,%rcx,8)
leaq 0x8037(%rip), %rax      # 0x11318
movslq (%rax), %rcx
leaq 0x8035(%rip), %rax      # 0x11320
movq (%rax,%rcx,8), %rax
movq %rax, 0x50(%rsp)
leaq 0x58(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xaf20
movq 0x50(%rsp), %rdi
leaq 0x58(%rsp), %rsi
movl $0x48, %edx
callq 0x1120
jmp 0x9318
movq 0xc0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xa8(%rsp)
xorl %eax, %eax
movl %eax, %edi
leaq 0xa8(%rsp), %rsi
callq 0xb980
cmpb $0x0, %al
je 0x937e
movq 0xc0(%rsp), %rdi
callq 0x3080
movq 0xc0(%rsp), %rdi
callq 0xbb70
movq 0xc0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xa8(%rsp)
movl 0x80ad(%rip), %eax      # 0x11420
addl $0x1, %eax
movl %eax, 0x80a4(%rip)      # 0x11420
jmp 0x932b
cmpb $0x0, 0xa7(%rsp)
je 0x93b0
movq 0xb0(%rsp), %rdi
xorl %edx, %edx
leaq 0x7eff(%rip), %rax      # 0x11298
subl (%rax), %edx
addl 0xa0(%rsp), %edx
leaq 0x463f(%rip), %rsi      # 0xd9e8
movb $0x0, %al
callq 0x10f0
jmp 0x93b2
movq 0xc0(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x7d, %eax
je 0x93e9
movq 0xc0(%rsp), %rdi
movq 0xb0(%rsp), %rsi
callq 0x94d0
movq 0xc0(%rsp), %rdi
callq 0xbb70
jmp 0x93b2
cmpb $0x0, 0xa7(%rsp)
je 0x94bf
movq 0xb0(%rsp), %rdi
leaq 0x7e92(%rip), %rax      # 0x11298
movl (%rax), %edx
subl 0xa0(%rsp), %edx
leaq 0x45d2(%rip), %rsi      # 0xd9e8
movb $0x0, %al
callq 0x10f0
leaq 0x7ef4(%rip), %rax      # 0x11318
movslq (%rax), %rcx
leaq 0x7ef2(%rip), %rax      # 0x11320
movq (%rax,%rcx,8), %rcx
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)
leaq 0x12be(%rip), %rdi      # 0xa720
callq 0xaf70
leaq 0x7eaa(%rip), %rax      # 0x11318
movslq (%rax), %rcx
leaq 0x7ea8(%rip), %rax      # 0x11320
movq (%rax,%rcx,8), %rdi
callq 0x1030
leaq 0x7e90(%rip), %rax      # 0x11318
movslq (%rax), %rcx
leaq 0x7e8e(%rip), %rax      # 0x11320
movq $0x0, (%rax,%rcx,8)
leaq 0x7e77(%rip), %rax      # 0x11318
movl (%rax), %ecx
addl $-0x1, %ecx
leaq 0x7e6b(%rip), %rax      # 0x11318
movl %ecx, (%rax)
movl 0xa0(%rsp), %ecx
leaq 0x7ddb(%rip), %rax      # 0x11298
movl %ecx, (%rax)
addq $0xc8, %rsp
retq
nopw (%rax,%rax)