// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/frontend/parser_call.c
// Function: prv_init_block_variables
static size_t prv_init_block_variables(subtilis_parser_t *p,
				       subtilis_type_section_t *stype,
				       subtilis_symbol_table_t *local_st,
				       const subtilis_symbol_t **symbols,
				       subtilis_error_t *err)
{
	size_t i;
	const subtilis_type_t *t;
	subtilis_ir_operand_t dest_op;
	subtilis_ir_operand_t source_op;
	size_t rs;
	size_t blocks = 0;
	size_t source_reg = SUBTILIS_IR_REG_TEMP_START;

	dest_op.reg = SUBTILIS_IR_REG_LOCAL;
	for (i = 0; i < stype->type.params.fn.num_params; i++) {
		t = stype->type.params.fn.params[i];
		if (subtilis_type_if_is_array(t) ||
		    subtilis_type_if_is_vector(t)) {
			blocks++;
			source_op.reg = source_reg++;
			subtlis_array_type_copy_param_ref(
			    p, t, dest_op, symbols[i]->loc, source_op, 0, err);
		} else if (t->type == SUBTILIS_TYPE_STRING) {
			blocks++;
			subtilis_reference_type_copy_ref(p, t, dest_op.reg,
							 symbols[i]->loc,
							 source_reg++, err);
		} else if (t->type == SUBTILIS_TYPE_REC) {
			subtilis_rec_type_copy(p, t, dest_op.reg,
					       symbols[i]->loc, source_reg++,
					       true, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return 0;
			if (subtilis_type_rec_need_deref(t)) {
				blocks++;
				rs = subtilis_reference_get_pointer(
				    p, dest_op.reg, symbols[i]->loc, err);
				if (err->type != SUBTILIS_ERROR_OK)
					return 0;
				subtilis_reference_push_ref(p, t, rs, err);
			}
		} else if (subtilis_type_if_reg_type(t) ==
			   SUBTILIS_IR_REG_TYPE_INTEGER) {
			source_reg++;
		}
		if (err->type != SUBTILIS_ERROR_OK)
			return 0;
	}

	return blocks;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x4, -0x68(%rbp)
movq $0x2, -0x48(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x2243a
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x49ff0
testb $0x1, %al
jne 0x2228b
movq -0x40(%rbp), %rdi
callq 0x4a040
testb $0x1, %al
jne 0x2228b
jmp 0x222de
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x68(%rbp)
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rcx
movq -0x30(%rbp), %rax
movq -0x48(%rbp), %rdx
movq -0x50(%rbp), %r8
xorl %r9d, %r9d
movq %rax, (%rsp)
callq 0x5e090
jmp 0x22414
movq -0x40(%rbp), %rax
cmpl $0x7, (%rax)
jne 0x2232b
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rcx
movq -0x68(%rbp), %r8
movq %r8, %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %r9
callq 0x6cf30
jmp 0x22412
movq -0x40(%rbp), %rax
cmpl $0x16, (%rax)
jne 0x223f4
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rcx
movq -0x68(%rbp), %r8
movq %r8, %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rax
movl $0x1, %r9d
movq %rax, (%rsp)
callq 0x62680
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x2238b
movq $0x0, -0x8(%rbp)
jmp 0x22442
movq -0x40(%rbp), %rdi
callq 0x3f560
testb $0x1, %al
jne 0x2239a
jmp 0x223f2
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rdx
movq -0x30(%rbp), %rcx
callq 0x6d920
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x223dd
movq $0x0, -0x8(%rbp)
jmp 0x22442
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x6ce80
jmp 0x22410
movq -0x40(%rbp), %rdi
callq 0x4a550
cmpl $0x0, %eax
jne 0x2240e
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x22410
jmp 0x22412
jmp 0x22414
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x22427
movq $0x0, -0x8(%rbp)
jmp 0x22442
jmp 0x22429
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x2224c
movq -0x60(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)