// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/frontend/array_type.c
// Function: prv_1d_static_alloc
static void prv_1d_static_alloc(subtilis_parser_t *p, size_t loc,
				const subtilis_type_t *type, subtilis_exp_t *e,
				subtilis_ir_operand_t store_reg, bool push,
				subtilis_error_t *err)
{
	subtilis_ir_operand_t op1;
	subtilis_ir_operand_t one;
	subtilis_ir_operand_t size;
	size_t data;
	subtilis_exp_t *sizee = NULL;

	op1.integer = ((int32_t)loc) + SUBTIILIS_ARRAY_DIMS_OFF;
	subtilis_ir_section_add_instr_reg(p->current,
					  SUBTILIS_OP_INSTR_STOREO_I32,
					  e->exp.ir_op, store_reg, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	one.integer = 1;
	size.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_ADDI_I32, e->exp.ir_op, one, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	sizee = subtilis_exp_new_int32_var(size.reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	sizee = subtilis_type_if_data_size(p, type, sizee, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	data = subtilis_reference_type_alloc(p, type, loc, store_reg.reg,
					     sizee->exp.ir_op.reg, false, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	prv_clear_new_array(p, type, loc, sizee->exp.ir_op.reg, store_reg, data,
			    err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	if (push)
		subtilis_reference_type_push_reference(p, type, store_reg.reg,
						       loc, err);
cleanup:

	subtilis_exp_delete(sizee);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %r9b, %al
movq 0x10(%rbp), %r9
movq %r8, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
andb $0x1, %al
movb %al, -0x29(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x18(%rbp), %rax
addl $0x10, %eax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rbp), %r9
movq 0x148(%rax), %rdx
movq -0x8(%rbp), %rcx
movq -0x38(%rbp), %r8
movl $0x17, %esi
callq 0x38360
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x5c621
jmp 0x5c742
movl $0x1, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rbp), %r8
movq 0x148(%rax), %rdx
movq -0x40(%rbp), %rcx
movl $0x9, %esi
callq 0x38230
movq %rax, -0x48(%rbp)
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x5c65f
jmp 0x5c742
movq -0x48(%rbp), %rax
movl %eax, %edi
movq 0x10(%rbp), %rsi
callq 0x37770
movq %rax, -0x58(%rbp)
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x5c680
jmp 0x5c742
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq 0x10(%rbp), %rcx
callq 0x474f0
movq %rax, -0x58(%rbp)
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x5c6a7
jmp 0x5c742
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rcx
movq -0x58(%rbp), %rax
movq 0x148(%rax), %r8
movq 0x10(%rbp), %rax
xorl %r9d, %r9d
movq %rax, (%rsp)
callq 0x6e3e0
movq %rax, -0x50(%rbp)
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x5c6e1
jmp 0x5c739
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x58(%rbp), %rax
movq 0x148(%rax), %rcx
movq -0x50(%rbp), %r9
movq 0x10(%rbp), %rax
movq -0x8(%rbp), %r8
movq %rax, (%rsp)
callq 0x5ce40
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x5c718
jmp 0x5c739
testb $0x1, -0x29(%rbp)
je 0x5c737
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq 0x10(%rbp), %r8
callq 0x6d540
jmp 0x5c739
movq -0x58(%rbp), %rdi
callq 0x36ee0
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)