LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_rec_type.c
// Function: prv_append
static void prv_append(subtilis_parser_t *p, subtilis_exp_t *a1,
		       subtilis_exp_t *a2, subtilis_exp_t *gran,
		       subtilis_error_t *err)
{
	subtilis_type_t el_type;
	bool need_deref;

	if (a2->type.type == SUBTILIS_TYPE_REC) {
		subtilis_array_append_scalar(p, a1, a2, gran, err);
		return;
	}

	if (gran) {
		subtilis_error_set_too_many_args(err, 3, 2, p->l->stream->name,
						 p->l->line);
		goto cleanup;
	}

	el_type.type = SUBTILIS_TYPE_VOID;
	prv_element_type(&a1->type, &el_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	need_deref = subtilis_type_rec_need_deref(&el_type);
	subtilis_type_free(&el_type);
	if (!need_deref) {
		subtilis_array_append_scalar_array(p, a1, a2, err);
		return;
	}

	subtilis_array_append_ref_array(p, a1, a2, err);

	return;

cleanup:
	subtilis_exp_delete(gran);
	subtilis_exp_delete(a1);
	subtilis_exp_delete(a2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r13
cmpl $0x16, (%rdx)
jne 0x3e3b6
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %rcx
movq %r15, %r8
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x42173
testq %r12, %r12
je 0x3e3e9
movq (%r13), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x31346(%rip), %rax     # 0x6f714
pushq $0x29
popq %rsi
pushq $0x3
popq %rdx
pushq $0x2
popq %rcx
movq %r15, %rdi
pushq $0x165                  # imm = 0x165
pushq %rax
callq 0x14179
popq %rax
popq %rcx
jmp 0x3e404
movq %rsp, %rdi
movl $0x8, (%rdi)
leaq 0x38(%r14), %rsi
movq %r15, %rdx
callq 0x2e1c5
cmpl $0x0, (%r15)
je 0x3e42e
movq %r12, %rdi
callq 0x29d88
movq %r14, %rdi
callq 0x29d88
movq %rbx, %rdi
callq 0x29d88
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %r12
movq %r12, %rdi
callq 0x2e7c9
movl %eax, %ebp
movq %r12, %rdi
callq 0x2dc7c
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r15, %rcx
testb %bpl, %bpl
je 0x3e45b
callq 0x42be3
jmp 0x3e41c
callq 0x427cf
jmp 0x3e41c
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_rec_type.c
// Function: prv_set
static void prv_set(subtilis_parser_t *p, const char *var_name,
		    const subtilis_type_t *type, size_t mem_reg, size_t loc,
		    subtilis_exp_t *e, bool check_size, subtilis_error_t *err)
{
	subtilis_type_t el_type;
	size_t sizee;
	//	size_t ptr;
	subtilis_ir_operand_t gt_zero;
	subtilis_ir_operand_t eq_zero;
	subtilis_ir_operand_t op0;

	eq_zero.label = SIZE_MAX;

	el_type.type = SUBTILIS_TYPE_VOID;
	subtilis_type_if_element_type(p, type, &el_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto free_e;

	e = subtilis_type_if_coerce_type(p, e, &el_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	sizee = subtilis_reference_type_get_size(p, mem_reg, loc, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	if (check_size) {
		gt_zero.label = subtilis_ir_section_new_label(p->current);
		eq_zero.label = subtilis_ir_section_new_label(p->current);
		op0.reg = sizee;
		subtilis_ir_section_add_instr_reg(p->current,
						  SUBTILIS_OP_INSTR_JMPC, op0,
						  gt_zero, eq_zero, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
		subtilis_ir_section_add_label(p->current, gt_zero.label, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
	}

	//	ptr = subtilis_reference_get_data(p, mem_reg, loc, err);
	//	if (err->type != SUBTILIS_ERROR_OK)
	//		goto cleanup;

	subtilis_error_set_assertion_failed(err);
	goto cleanup;

	if (check_size)
		subtilis_ir_section_add_label(p->current, eq_zero.label, err);

cleanup:
	subtilis_type_free(&el_type);

free_e:
	subtilis_exp_delete(e);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movl %r9d, %ebp
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %r15
movq 0x180(%rsp), %r14
movq %rsp, %rdx
movl $0x8, (%rdx)
movq %r14, %rcx
callq 0x34108
cmpl $0x0, (%r14)
jne 0x3e545
movq %rsp, %rdx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x35977
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x3e53d
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x4acab
cmpl $0x0, (%r14)
jne 0x3e53d
testb %bpl, %bpl
je 0x3e526
movq %rax, %r12
movq 0x48(%r15), %rdi
callq 0x2b774
movq %rax, %r13
movq 0x48(%r15), %rdi
callq 0x2b774
movq 0x48(%r15), %rdi
pushq $0x43
popq %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %rax, %r8
movq %r14, %r9
callq 0x2a8c1
cmpl $0x0, (%r14)
jne 0x3e53d
movq 0x48(%r15), %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x2b781
cmpl $0x0, (%r14)
jne 0x3e53d
leaq 0x311e7(%rip), %rdx     # 0x6f714
pushq $0xf
popq %rsi
movq %r14, %rdi
movl $0xf0, %ecx
callq 0x1429e
movq %rsp, %rdi
callq 0x2dc7c
movq %rbx, %rdi
callq 0x29d88
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/fn_type.c
// Function: prv_zero
static subtilis_exp_t *prv_zero(subtilis_parser_t *p,
				const subtilis_type_t *type,
				subtilis_error_t *err)
{
	subtilis_ir_operand_t op1;
	size_t reg_num;
	subtilis_exp_t *e = NULL;
	size_t call_index;

	call_index = prv_generate_zero_fn(p, type->params.fn.ret_val, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;
	op1.label = (int32_t)call_index;
	reg_num = subtilis_ir_section_add_instr2(
	    p->current, SUBTILIS_OP_INSTR_GET_PROC_ADDR, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;
	e = subtilis_exp_new_int32_var(reg_num, err);

	return e;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rsi
callq 0x3ec48
cmpl $0x0, (%rbx)
jne 0x3e595
movslq %eax, %rdx
movq 0x48(%r14), %rdi
movl $0x9b, %esi
movq %rbx, %rcx
callq 0x2a981
cmpl $0x0, (%rbx)
je 0x3e59f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl %eax, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2a336
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/fn_type.c
// Function: prv_zero_reg
static void prv_zero_reg(subtilis_parser_t *p, const subtilis_type_t *type,
			 size_t reg, subtilis_error_t *err)
{
	subtilis_ir_operand_t op0;
	subtilis_ir_operand_t op1;
	size_t call_index;

	call_index = prv_generate_zero_fn(p, type->params.fn.ret_val, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	op0.reg = reg;
	op1.label = (int32_t)call_index;
	subtilis_ir_section_add_instr_no_reg2(
	    p->current, SUBTILIS_OP_INSTR_GET_PROC_ADDR, op0, op1, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq 0x8(%rsi), %rsi
movq %rcx, %rdx
callq 0x3ec48
cmpl $0x0, (%rbx)
je 0x3e5d5
popq %rbx
popq %r14
popq %r15
retq
movslq %eax, %rcx
movq 0x48(%r15), %rdi
movl $0x9b, %esi
movq %r14, %rdx
movq %rbx, %r8
popq %rbx
popq %r14
popq %r15
jmp 0x2a9a4
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/fn_type.c
// Function: prv_load_from_mem
static subtilis_exp_t *prv_load_from_mem(subtilis_parser_t *p,
					 const subtilis_type_t *type,
					 size_t mem_reg, size_t loc,
					 subtilis_error_t *err)
{
	subtilis_ir_operand_t op1;
	subtilis_ir_operand_t op2;
	size_t reg;

	op1.reg = mem_reg;
	op2.integer = (int32_t)loc;
	reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_LOADO_I32, op1, op2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	return subtilis_exp_new_var(type, reg, err);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rsi, %r14
movq 0x48(%rdi), %rdi
movl %ecx, %ecx
pushq $0x12
popq %rsi
callq 0x2a819
cmpl $0x0, (%rbx)
je 0x3e6e8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
movl %eax, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2a226
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/fn_type.c
// Function: prv_logical
static subtilis_exp_t *prv_logical(subtilis_parser_t *p,
				   subtilis_op_instr_type_t type,
				   subtilis_exp_t *a1, subtilis_exp_t *a2,
				   subtilis_error_t *err)
{
	size_t reg;

	if (!subtilis_type_eq(&a1->type, &a2->type)) {
		subtilis_error_set_fn_type_mismatch(err, p->l->stream->name,
						    p->l->line);
		goto cleanup;
	}

	reg = subtilis_ir_section_add_instr(p->current, type, a1->exp.ir_op,
					    a2->exp.ir_op, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;
	a1->exp.ir_op.reg = reg;
	subtilis_exp_delete(a2);
	return a1;

cleanup:

	subtilis_exp_delete(a1);
	subtilis_exp_delete(a2);

	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %r15
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r12
movq %rdx, %rdi
movq %rcx, %rsi
callq 0x2d844
testb %al, %al
je 0x3ef68
movq 0x48(%r12), %rdi
movq 0x148(%rbx), %rdx
movq 0x148(%r14), %rcx
movl %ebp, %esi
movq %r15, %r8
callq 0x2a819
cmpl $0x0, (%r15)
jne 0x3ef8b
movq %rax, 0x148(%rbx)
movq %r14, %rdi
callq 0x29d88
jmp 0x3ef9d
movq (%r12), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x3093a(%rip), %r8      # 0x6f8b4
pushq $0x42
popq %rsi
movq %r15, %rdi
movl $0x149, %r9d            # imm = 0x149
callq 0x142c0
movq %rbx, %rdi
callq 0x29d88
movq %r14, %rdi
callq 0x29d88
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_create_1el
void subtilis_array_create_1el(subtilis_parser_t *p,
			       const subtilis_type_t *type, size_t mem_reg,
			       size_t loc, bool push, subtilis_error_t *err)
{
	subtilis_type_t const_type;
	size_t i;
	subtilis_exp_t **ee;
	subtilis_ir_operand_t store_reg;

	store_reg.reg = mem_reg;
	subtilis_type_init_copy(&const_type, type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	ee = malloc(sizeof(*ee) * const_type.params.array.num_dims);
	if (!ee) {
		subtilis_error_set_oom(err);
		goto cleanup;
	}

	for (i = 0; i < const_type.params.array.num_dims; i++) {
		const_type.params.array.dims[i] = 1;
		ee[i] = subtilis_exp_new_int32(1, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
	}

	subtilis_array_type_allocate(p, "temporary array", &const_type, loc, ee,
				     store_reg, push, err);
cleanup:
	for (i = 0; i < const_type.params.array.num_dims; i++)
		free(ee[i]);
	free(ee);

	subtilis_type_free(&const_type);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %r9, %r14
movl %r8d, %ebp
movq %rcx, %r12
movq %rdx, %r15
movq %rdi, %r13
leaq 0x10(%rsp), %rdi
movq %r9, %rdx
callq 0x2db73
cmpl $0x0, (%r14)
jne 0x3f0c7
movslq 0x18(%rsp), %rdi
shlq $0x3, %rdi
callq 0x121d0
movq %rax, %rbx
testq %rax, %rax
je 0x3f05a
movq %r12, (%rsp)
movq %r15, 0x8(%rsp)
xorl %r12d, %r12d
pushq $0x1
popq %r15
movslq 0x18(%rsp), %rax
cmpq %rax, %r12
jae 0x3f071
movl $0x1, 0x1c(%rsp,%r12,4)
movl %r15d, %edi
movq %r14, %rsi
callq 0x2a369
movq %rax, (%rbx,%r12,8)
incq %r12
cmpl $0x0, (%r14)
je 0x3f02d
jmp 0x3f09a
leaq 0x30931(%rip), %rdx     # 0x6f992
pushq $0x1
popq %rsi
pushq $0x75
popq %rcx
movq %r14, %rdi
callq 0x1429e
jmp 0x3f09a
movzbl %bpl, %eax
leaq 0x3092c(%rip), %rsi     # 0x6f9a8
leaq 0x10(%rsp), %rdx
movq %r13, %rdi
movq (%rsp), %rcx
movq %rbx, %r8
movq 0x8(%rsp), %r9
pushq %r14
pushq %rax
callq 0x3f0d9
popq %rax
popq %rcx
xorl %r14d, %r14d
movslq 0x18(%rsp), %rax
cmpq %rax, %r14
jae 0x3f0b5
movq (%rbx,%r14,8), %rdi
callq 0x122c0
incq %r14
jmp 0x3f09d
movq %rbx, %rdi
callq 0x122c0
leaq 0x10(%rsp), %rdi
callq 0x2dc7c
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_type_init
void subtilis_array_type_init(subtilis_parser_t *p, const char *var_name,
			      const subtilis_type_t *element_type,
			      subtilis_type_t *type, subtilis_exp_t **e,
			      size_t dims, subtilis_error_t *err)
{
	size_t i;

	if (dims > SUBTILIS_MAX_DIMENSIONS) {
		subtilis_error_set_assertion_failed(err);
		return;
	}

	type->type = SUBTILIS_TYPE_VOID;
	subtilis_type_if_array_of(element_type, type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	type->params.array.num_dims = dims;
	for (i = 0; i < dims; i++) {
		if (e[i]->type.type == SUBTILIS_TYPE_CONST_INTEGER) {
			if (e[i]->exp.ir_op.integer < 0) {
				subtilis_error_bad_dim(err, var_name,
						       p->l->stream->name,
						       p->l->line);
				return;
			}
			type->params.array.dims[i] = e[i]->exp.ir_op.integer;
		} else {
			type->params.array.dims[i] = SUBTILIS_DYNAMIC_DIMENSION;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x40(%rsp), %r14
cmpq $0xb, %r9
jb 0x3f34a
leaq 0x30666(%rip), %rdx     # 0x6f992
pushq $0xf
popq %rsi
movq %r14, %rdi
movl $0x94, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1429e
movq %r9, %r15
movq %r8, %r12
movq %rcx, %r13
movq %rsi, %rbx
movq %rdi, %rbp
movl $0x8, (%rcx)
movq %rdx, %rdi
movq %rcx, %rsi
movq %r14, %rdx
callq 0x34015
cmpl $0x0, (%r14)
je 0x3f382
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r15d, 0x8(%r13)
xorl %eax, %eax
pushq $-0x1
popq %rcx
cmpq %rax, %r15
je 0x3f373
movq (%r12,%rax,8), %rsi
cmpl $0x1, (%rsi)
movl %ecx, %edx
jne 0x3f3a5
movl 0x148(%rsi), %edx
testl %edx, %edx
js 0x3f3af
movl %edx, 0xc(%r13,%rax,4)
incq %rax
jmp 0x3f38b
movq (%rbp), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x305d0(%rip), %rax     # 0x6f992
leaq 0x2e9fc(%rip), %rcx     # 0x6ddc5
pushq $0x38
popq %rsi
movq %r14, %rdi
movq %rbx, %rdx
pushq $0xa3
pushq %rax
callq 0x140cd
addq $0x18, %rsp
jmp 0x3f377
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_type_vector_init
void subtilis_array_type_vector_init(const subtilis_type_t *element_type,
				     subtilis_type_t *type,
				     subtilis_error_t *err)
{
	type->type = SUBTILIS_TYPE_VOID;
	subtilis_type_if_vector_of(element_type, type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	type->params.array.num_dims = 1;
	type->params.array.dims[0] = SUBTILIS_DYNAMIC_DIMENSION;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movl $0x8, (%rsi)
callq 0x34066
cmpl $0x0, (%r14)
jne 0x3f40c
movabsq $-0xffffffff, %rax      # imm = 0xFFFFFFFF00000001
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_type_vector_zero_ref
void subtilis_array_type_vector_zero_ref(subtilis_parser_t *p,
					 const subtilis_type_t *type,
					 size_t loc, size_t mem_reg, bool push,
					 subtilis_error_t *err)
{
	subtilis_ir_operand_t op1;
	subtilis_ir_operand_t base;
	subtilis_exp_t *zero = NULL;
	subtilis_exp_t *neg1 = NULL;

	zero = subtilis_exp_new_int32(0, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	zero = subtilis_type_if_exp_to_var(p, zero, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	neg1 = subtilis_exp_new_int32(-1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	neg1 = subtilis_type_if_exp_to_var(p, neg1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_reference_type_set_size(p, mem_reg, loc, zero->exp.ir_op.reg,
					 err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_reference_type_set_orig_size(p, mem_reg, loc,
					      zero->exp.ir_op.reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	op1.integer = ((int32_t)loc) + SUBTIILIS_ARRAY_DIMS_OFF;
	base.reg = mem_reg;
	subtilis_ir_section_add_instr_reg(p->current,
					  SUBTILIS_OP_INSTR_STOREO_I32,
					  neg1->exp.ir_op, base, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	if (push)
		subtilis_reference_type_push_reference(p, type, mem_reg, loc,
						       err);

cleanup:

	subtilis_exp_delete(neg1);
	subtilis_exp_delete(zero);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r14
movl %r8d, %ebp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
xorl %edi, %edi
movq %r9, %rsi
callq 0x2a369
cmpl $0x0, (%r14)
je 0x3f453
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x3415f
movq %rax, 0x8(%rsp)
cmpl $0x0, (%r14)
je 0x3f48e
xorl %edi, %edi
movq 0x8(%rsp), %rbx
callq 0x29d88
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x29d88
pushq $-0x1
popq %rdi
movq %r14, %rsi
callq 0x2a369
cmpl $0x0, (%r14)
jne 0x3f444
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x3415f
movq %rax, %rdi
cmpl $0x0, (%r14)
jne 0x3f46e
movq %rdi, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq 0x148(%rax), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %r8
callq 0x4acc2
cmpl $0x0, (%r14)
jne 0x3f548
movq 0x8(%rsp), %rax
movq 0x148(%rax), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %r8
callq 0x4aeaf
cmpl $0x0, (%r14)
jne 0x3f548
leal 0x10(%r12), %r8d
movq 0x48(%rbx), %rdi
movq 0x10(%rsp), %rax
movq 0x148(%rax), %rdx
pushq $0x17
popq %rsi
movq %r15, %rcx
movq %r14, %r9
callq 0x2a8c1
cmpl $0x0, (%r14)
setne %al
xorb $0x1, %bpl
orb %al, %bpl
jne 0x3f548
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r14, %r8
callq 0x4a8be
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %rdi
jmp 0x3f473
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_zero_buf_i32
void subtilis_array_zero_buf_i32(subtilis_parser_t *p,
				 const subtilis_type_t *type, size_t data_reg,
				 size_t size_reg, subtilis_error_t *err)
{
	subtilis_ir_operand_t zero;
	size_t zero_reg;

	zero.integer = 0;
	zero_reg = subtilis_ir_section_add_instr2(
	    p->current, SUBTILIS_OP_INSTR_MOVI_I32, zero, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_builtin_memset_i32(p, data_reg, size_reg, zero_reg, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %r12
movq 0x48(%rdi), %rdi
pushq $0x1b
popq %rsi
xorl %edx, %edx
movq %r8, %rcx
callq 0x2a981
cmpl $0x0, (%rbx)
je 0x3f58d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2ebb4
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0x14(%rsp)
movq %r8, %rbx
movq %rcx, %rbp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r13
movq 0x50(%rsp), %r12
leal 0x10(%rsi), %r8d
movq 0x48(%rdi), %rdi
movq 0x148(%rcx), %rdx
pushq $0x17
popq %rsi
movq %rbx, %rcx
movq %r12, %r9
callq 0x2a8c1
cmpl $0x0, (%r12)
jne 0x3f95c
movq 0x48(%r13), %rdi
movq 0x148(%rbp), %rdx
pushq $0x9
popq %rsi
pushq $0x1
popq %rcx
movq %r12, %r8
callq 0x2a819
cmpl $0x0, (%r12)
jne 0x3f95c
movl %eax, %edi
movq %r12, %rsi
callq 0x2a336
cmpl $0x0, (%r12)
jne 0x3f95c
movq %r13, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r12, %rcx
callq 0x33e43
cmpl $0x0, (%r12)
je 0x3f96b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbp
movq 0x148(%rax), %r8
movq %r12, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
xorl %r9d, %r9d
callq 0x4b101
cmpl $0x0, (%r12)
jne 0x3f9d3
movq 0x148(%rbp), %rcx
movq %r13, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r12, %r8
callq 0x3467c
cmpl $0x0, (%r12)
setne %al
movl 0x14(%rsp), %ecx
xorb $0x1, %cl
orb %al, %cl
jne 0x3f9d3
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %r12, %r8
callq 0x4a8be
movq %rbp, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x29d88
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: prv_check_slice_index1
static void
prv_check_slice_index1(subtilis_parser_t *p, const subtilis_type_t *type,
		       subtilis_exp_t *index1, subtilis_exp_t *index2,
		       subtilis_ir_operand_t error_label, subtilis_error_t *err)
{
	subtilis_ir_operand_t index1_ok;
	subtilis_exp_t *index1_dup = NULL;
	subtilis_exp_t *zero = NULL;
	subtilis_exp_t *condee = NULL;

	if (index1->type.type == SUBTILIS_TYPE_CONST_INTEGER) {
		if (index1->exp.ir_op.integer < 0) {
			subtilis_error_set_bad_slice(
			    err, index1->exp.ir_op.integer,
			    index2->exp.ir_op.integer, p->l->stream->name,
			    p->l->line);
			return;
		}
	} else {
		index1_ok.label = subtilis_ir_section_new_label(p->current);
		index1_dup = subtilis_type_if_dup(index1, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;

		zero = subtilis_exp_new_int32(0, err);
		if (err->type != SUBTILIS_ERROR_OK) {
			subtilis_exp_delete(index1_dup);
			return;
		}

		condee = subtilis_type_if_gte(p, index1_dup, zero, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		subtilis_ir_section_add_instr_reg(
		    p->current, SUBTILIS_OP_INSTR_JMPC, condee->exp.ir_op,
		    index1_ok, error_label, err);
		subtilis_exp_delete(condee);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		subtilis_ir_section_add_label(p->current, index1_ok.label, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rsi, %r13
movq %rdi, %r14
cmpl $0x1, (%rsi)
jne 0x3ff2d
movq %rdx, %rax
movl 0x148(%r13), %edx
testl %edx, %edx
jns 0x3ff4c
movl 0x148(%rax), %ecx
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x2fa7a(%rip), %rax     # 0x6f992
pushq $0x65
popq %rsi
movq %rbx, %rdi
pushq $0x26b                  # imm = 0x26B
pushq %rax
callq 0x14179
popq %rax
popq %rcx
jmp 0x3ff4c
movq %rcx, %r12
movq 0x48(%r14), %rdi
callq 0x2b774
movq %rax, %r15
movq %r13, %rdi
movq %rbx, %rsi
callq 0x341c4
cmpl $0x0, (%rbx)
je 0x3ff56
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r13
xorl %edi, %edi
movq %rbx, %rsi
callq 0x2a369
cmpl $0x0, (%rbx)
je 0x3ff79
movq %r13, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x29d88
movq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x35259
cmpl $0x0, (%rbx)
jne 0x3ff4c
movq %rax, %r13
movq 0x48(%r14), %rdi
movq 0x148(%rax), %rdx
pushq $0x43
popq %rsi
movq %r15, %rcx
movq %r12, %r8
movq %rbx, %r9
callq 0x2a8c1
movq %r13, %rdi
callq 0x29d88
cmpl $0x0, (%rbx)
jne 0x3ff4c
movq 0x48(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2b781
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: prv_check_slice_index2
static void prv_check_slice_index2(subtilis_parser_t *p,
				   const subtilis_type_t *type,
				   subtilis_exp_t *index1,
				   subtilis_exp_t *index2, size_t ptr,
				   subtilis_ir_operand_t error_label,
				   subtilis_error_t *err)
{
	subtilis_ir_operand_t index2_ok;
	subtilis_exp_t *index2_dup = NULL;
	subtilis_exp_t *condee = NULL;
	subtilis_exp_t *max_dim = NULL;

	if ((index2->type.type == SUBTILIS_TYPE_CONST_INTEGER) &&
	    (type->params.array.dims[0] != SUBTILIS_DYNAMIC_DIMENSION)) {
		if (index2->exp.ir_op.integer >
		    type->params.array.dims[0] + 1) {
			subtilis_error_set_bad_slice(
			    err, index1->exp.ir_op.integer,
			    index2->exp.ir_op.integer, p->l->stream->name,
			    p->l->line);
			return;
		}
	} else {
		index2_ok.label = subtilis_ir_section_new_label(p->current);

		max_dim = prv_calc_max_dim(p, type, ptr, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;

		index2_dup = subtilis_type_if_dup(index2, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;

		condee = subtilis_type_if_lte(p, index2_dup, max_dim, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		subtilis_ir_section_add_instr_reg(
		    p->current, SUBTILIS_OP_INSTR_JMPC, condee->exp.ir_op,
		    index2_ok, error_label, err);
		subtilis_exp_delete(condee);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		subtilis_ir_section_add_label(p->current, index2_ok.label, err);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movq %r8, %rbp
movq %rcx, %r13
movq %rsi, %r12
movq %rdi, %r14
movq 0x40(%rsp), %rbx
cmpl $0x1, (%rcx)
jne 0x40041
movl 0xc(%r12), %eax
cmpl $-0x1, %eax
je 0x40041
movl 0x148(%r13), %ecx
incl %eax
cmpl %eax, %ecx
jle 0x400ba
movl 0x148(%rdx), %edx
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x2f968(%rip), %rax     # 0x6f992
pushq $0x65
popq %rsi
movq %rbx, %rdi
pushq $0x2b7                  # imm = 0x2B7
pushq %rax
callq 0x14179
addq $0x18, %rsp
jmp 0x400be
movq 0x48(%r14), %rdi
callq 0x2b774
movq %rax, (%rsp)
movq %r14, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x400e7
cmpl $0x0, (%rbx)
jne 0x400ba
movq %rax, %rbp
movq %r13, %rdi
movq %rbx, %rsi
callq 0x341c4
cmpl $0x0, (%rbx)
jne 0x400ba
movq %r14, %rdi
movq %rax, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x35195
cmpl $0x0, (%rbx)
jne 0x400ba
movq %rax, %r13
movq 0x48(%r14), %rdi
movq 0x148(%rax), %rdx
pushq $0x43
popq %rsi
movq (%rsp), %rcx
movq %r15, %r8
movq %rbx, %r9
callq 0x2a8c1
movq %r13, %rdi
callq 0x29d88
cmpl $0x0, (%rbx)
je 0x400c9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x48(%r14), %rdi
movq (%rsp), %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b781
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: prv_calc_max_dim
static subtilis_exp_t *prv_calc_max_dim(subtilis_parser_t *p,
					const subtilis_type_t *type, size_t ptr,
					subtilis_error_t *err)
{
	subtilis_exp_t *max_dim = NULL;
	subtilis_exp_t *one;

	if (type->params.array.dims[0] != SUBTILIS_DYNAMIC_DIMENSION)
		max_dim =
		    subtilis_exp_new_int32(type->params.array.dims[0], err);
	else
		max_dim = subtilis_type_if_load_from_mem(
		    p, &subtilis_type_integer, ptr, SUBTIILIS_ARRAY_DIMS_OFF,
		    err);

	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	one = subtilis_exp_new_int32(1, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		subtilis_exp_delete(max_dim);
		return NULL;
	}

	return subtilis_type_if_add(p, max_dim, one, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdi, %r14
movl 0xc(%rsi), %edi
cmpl $-0x1, %edi
je 0x40104
movq %rbx, %rsi
callq 0x2a369
jmp 0x40119
leaq 0x2e7bd(%rip), %rsi     # 0x6e8c8
pushq $0x10
popq %rcx
movq %r14, %rdi
movq %rbx, %r8
callq 0x343a4
movq %rax, %r15
cmpl $0x0, (%rbx)
jne 0x40139
pushq $0x1
popq %rdi
movq %rbx, %rsi
callq 0x2a369
cmpl $0x0, (%rbx)
je 0x40141
movq %r15, %rdi
callq 0x29d88
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %r15
jmp 0x34b18
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_type_create_ref
void subtilis_array_type_create_ref(subtilis_parser_t *p, const char *var_name,
				    const subtilis_symbol_t *s, size_t mem_reg,
				    subtilis_exp_t *e, subtilis_error_t *err)
{
	subtilis_ir_operand_t dest_op;
	subtilis_ir_operand_t source_op;

	subtilis_array_type_match(p, &s->t, &e->type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	dest_op.reg = mem_reg;
	source_op.reg = e->exp.ir_op.reg;
	prv_copy_ref_base(p, &s->t, dest_op, s->loc, source_op, 0, true, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_reference_inc_cleanup_stack(p, &s->t, err);

cleanup:

	subtilis_exp_delete(e);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, %rbx
movq %rcx, %r13
movq %rdx, %rbp
movq %rdi, %r12
leaq 0x8(%rdx), %r15
movq %r15, %rsi
movq %r8, %rdx
movq %r9, %rcx
callq 0x40890
cmpl $0x0, (%r14)
jne 0x4087a
movq 0x148(%rbx), %r8
movq (%rbp), %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
xorl %r9d, %r9d
pushq %r14
pushq $0x1
callq 0x407d9
popq %rax
popq %rcx
cmpl $0x0, (%r14)
jne 0x4087a
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4a6c0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x29d88
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_type_match
void subtilis_array_type_match(subtilis_parser_t *p, const subtilis_type_t *t1,
			       const subtilis_type_t *t2, subtilis_error_t *err)
{
	if (!subtilis_type_eq(t1, t2)) {
		if (subtilis_type_if_is_array(t2) ||
		    subtilis_type_if_is_vector(t2))
			subtilis_error_set_array_type_mismatch(
			    err, p->l->stream->name, p->l->line);
		else
			subtilis_error_not_array_or_vector(
			    err, subtilis_type_name(t2), p->l->stream->name,
			    p->l->line);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r15
movq %rdi, %r14
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x2d844
testb %al, %al
je 0x408b3
popq %rbx
popq %r14
popq %r15
retq
movq %r15, %rdi
callq 0x357cc
testb %al, %al
jne 0x408cb
movq %r15, %rdi
callq 0x357ea
testb %al, %al
je 0x408f2
movq (%r14), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2f0b6(%rip), %r8      # 0x6f992
pushq $0x41
popq %rsi
movq %rbx, %rdi
movl $0x572, %r9d            # imm = 0x572
popq %rbx
popq %r14
popq %r15
jmp 0x142c0
movq %r15, %rdi
callq 0x2dcbb
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x2f086(%rip), %r10     # 0x6f992
leaq 0x2d4b2(%rip), %rcx     # 0x6ddc5
pushq $0x3d
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
pushq $0x576                  # imm = 0x576
pushq %r10
callq 0x140cd
popq %rax
popq %rcx
jmp 0x408ad
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_type_init_field
void subtilis_array_type_init_field(subtilis_parser_t *p,
				    const subtilis_type_t *type, size_t mem_reg,
				    size_t loc, subtilis_exp_t *e,
				    subtilis_error_t *err)
{
	subtilis_ir_operand_t dest_reg;
	subtilis_ir_operand_t source_reg;

	dest_reg.reg = mem_reg;
	source_reg.reg = e->exp.ir_op.reg;

	subtilis_array_type_match(p, type, &e->type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	(void)prv_new_ref_base(p, type, dest_reg, loc, source_reg, 0, true,
			       err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

cleanup:

	subtilis_exp_delete(e);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, %rbx
movq %rcx, (%rsp)
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %r15
movq 0x148(%r8), %r13
movq %r8, %rdx
movq %r9, %rcx
callq 0x40890
cmpl $0x0, (%r14)
jne 0x40980
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq (%rsp), %rcx
movq %r13, %r8
xorl %r9d, %r9d
pushq %r14
pushq $0x1
callq 0x40996
popq %rcx
popq %rdx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x29d88
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_type_reset_field
void subtilis_array_type_reset_field(subtilis_parser_t *p,
				     const subtilis_type_t *type,
				     size_t mem_reg, size_t loc,
				     subtilis_exp_t *e, subtilis_error_t *err)
{
	subtilis_array_type_match(p, type, &e->type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	/*
	 * TODO: I suspect this is incorrect for arrays of RECS which need
	 * dereffing.  Check when we have initialiser for arrays of RECS.
	 */

	subtilis_array_type_assign_ref(p, type, mem_reg, loc, e->exp.ir_op.reg,
				       err);
cleanup:

	subtilis_exp_delete(e);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movq %r8, %rdx
movq %r9, %rcx
callq 0x40890
cmpl $0x0, (%r14)
jne 0x40cc7
movq 0x148(%rbx), %r8
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r9
callq 0x40cdd
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x29d88
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_type_assign_ref
void subtilis_array_type_assign_ref(subtilis_parser_t *p,
				    const subtilis_type_t *type,
				    size_t dest_mem_reg, size_t dest_loc,
				    size_t source_reg, subtilis_error_t *err)
{
	bool check_size = subtilis_type_if_is_vector(type);

	subtilis_reference_type_assign_ref(p, dest_mem_reg, dest_loc,
					   source_reg, check_size, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_array_type_copy_dims(p, type, dest_mem_reg, dest_loc,
				      source_reg, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movq %rsi, %rdi
callq 0x357ea
movzbl %al, %r8d
movq %rbp, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r9
callq 0x4a9be
cmpl $0x0, (%rbx)
je 0x40d2e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x40e00
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_type_assign_ref_exp
void subtilis_array_type_assign_ref_exp(subtilis_parser_t *p,
					const subtilis_type_t *type,
					size_t mem_reg, size_t loc,
					subtilis_exp_t *e,
					subtilis_error_t *err)
{
	subtilis_type_compare_diag(p, type, &e->type, err);
	if (err->type == SUBTILIS_ERROR_OK)
		subtilis_array_type_assign_ref(p, type, mem_reg, loc,
					       e->exp.ir_op.reg, err);
	subtilis_exp_delete(e);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movq %r8, %rdx
movq %r9, %rcx
callq 0x35d40
cmpl $0x0, (%r14)
jne 0x40dea
movq 0x148(%rbx), %r8
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r9
callq 0x40cdd
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x29d88
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_type_copy_dims
void subtilis_array_type_copy_dims(subtilis_parser_t *p,
				   const subtilis_type_t *type,
				   size_t dest_mem_reg, size_t dest_loc,
				   size_t source_reg, subtilis_error_t *err)
{
	size_t i;
	subtilis_ir_operand_t op0;
	subtilis_ir_operand_t op1;
	subtilis_ir_operand_t op2;
	size_t copy_reg;
	const subtilis_type_array_t *dest_type = &type->params.array;

	for (i = 0; i < dest_type->num_dims; i++) {
		if (dest_type->dims[i] != SUBTILIS_DYNAMIC_DIMENSION)
			continue;

		op0.reg = source_reg;
		op1.integer = SUBTIILIS_ARRAY_DIMS_OFF + (i * sizeof(int32_t));
		copy_reg = subtilis_ir_section_add_instr(
		    p->current, SUBTILIS_OP_INSTR_LOADO_I32, op0, op1, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;

		op0.reg = copy_reg;
		op1.reg = dest_mem_reg;
		op2.integer =
		    dest_loc + SUBTIILIS_ARRAY_DIMS_OFF + (i * sizeof(int32_t));
		subtilis_ir_section_add_instr_reg(p->current,
						  SUBTILIS_OP_INSTR_STOREO_I32,
						  op0, op1, op2, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movq %r8, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movq %rdx, (%rsp)
shrq $0x20, %r12
pushq $0x10
popq %r14
xorl %r15d, %r15d
movslq 0x8(%r13), %rcx
cmpq %rcx, %r15
jae 0x40e9a
cmpl $-0x1, -0x4(%r13,%r14)
jne 0x40e91
movq 0x48(%rbp), %rdi
shlq $0x20, %rax
movl %r14d, %ecx
andl $-0x4, %ecx
orq %rax, %rcx
pushq $0x12
popq %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x40e9a
movq 0x8(%rsp), %rcx
leal (%rcx,%r14), %r8d
movq 0x48(%rbp), %rdi
pushq $0x17
popq %rsi
movq %rax, %rdx
movq (%rsp), %rcx
movq %rbx, %r9
callq 0x2a8c1
cmpl $0x0, (%rbx)
movl %r12d, %eax
jne 0x40e9a
incq %r15
addq $0x4, %r14
jmp 0x40e33
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_gen_index_error_code
void subtilis_array_gen_index_error_code(subtilis_parser_t *p,
					 subtilis_error_t *err)
{
	subtilis_ir_operand_t error_label;
	subtilis_exp_t *ecode = NULL;

	if (p->current->array_access == SIZE_MAX)
		return;

	error_label.label = p->current->array_access;

	subtilis_ir_section_add_label(p->current, error_label.label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	ecode = subtilis_exp_new_int32(SUBTILIS_ERROR_CODE_BAD_DIM, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_exp_generate_error(p, ecode, err);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x48(%rdi), %rdi
movq 0xb0(%rdi), %rsi
cmpq $-0x1, %rsi
je 0x41072
movq %rbx, %rdx
callq 0x2b781
cmpl $0x0, (%rbx)
jne 0x41072
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0x2a369
cmpl $0x0, (%rbx)
je 0x4107a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2a5f4
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: prv_get_dynamic_dim_size
static subtilis_exp_t *prv_get_dynamic_dim_size(subtilis_parser_t *p,
						int32_t dim_size,
						int32_t offset, size_t mem_reg,
						subtilis_error_t *err)
{
	subtilis_ir_operand_t op0;
	subtilis_ir_operand_t op1;
	size_t reg;
	subtilis_exp_t *maxe = NULL;

	if (dim_size == SUBTILIS_DYNAMIC_DIMENSION) {
		op0.reg = mem_reg;
		op1.integer = offset;
		reg = subtilis_ir_section_add_instr(
		    p->current, SUBTILIS_OP_INSTR_LOADO_I32, op0, op1, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return NULL;
		maxe = subtilis_exp_new_int32_var(reg, err);
	} else {
		maxe = subtilis_exp_new_int32(dim_size, err);
	}

	return maxe;
}

// Assembly:
pushq %rbx
movq %r8, %rbx
cmpl $-0x1, %esi
je 0x41593
movl %esi, %edi
movq %rbx, %rsi
popq %rbx
jmp 0x2a369
movq 0x48(%rdi), %rdi
movl %edx, %eax
pushq $0x12
popq %rsi
movq %rcx, %rdx
movq %rax, %rcx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
je 0x415b3
xorl %eax, %eax
popq %rbx
retq
movl %eax, %edi
movq %rbx, %rsi
popq %rbx
jmp 0x2a336
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: prv_check_dynamic_index
static subtilis_exp_t *prv_check_dynamic_index(subtilis_parser_t *p,
					       subtilis_exp_t *e,
					       int32_t dim_size, int32_t offset,
					       size_t mem_reg,
					       subtilis_error_t *err)
{
	subtilis_exp_t *maxe;
	subtilis_exp_t *maxe_dup = NULL;

	maxe = prv_get_dynamic_dim_size(p, dim_size, offset, mem_reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	maxe_dup = subtilis_type_if_dup(maxe, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;
	prv_check_dynamic_dim(p, e, 0, maxe_dup, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	return maxe;

cleanup:

	subtilis_exp_delete(maxe);

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %rsi, %r15
movq %rdi, %r12
movl %edx, %esi
movl %ecx, %edx
movq %r8, %rcx
movq %r9, %r8
callq 0x4157f
cmpl $0x0, (%r14)
jne 0x41619
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x341c4
cmpl $0x0, (%r14)
jne 0x41611
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
movq %r14, %r8
callq 0x40ee4
cmpl $0x0, (%r14)
je 0x4161b
movq %rbx, %rdi
callq 0x29d88
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: prv_check_last_index
static void prv_check_last_index(subtilis_parser_t *p, const char *var_name,
				 subtilis_exp_t **e,
				 const subtilis_type_t *type, int32_t offset,
				 size_t mem_reg, subtilis_error_t *err)
{
	int32_t dim_size;
	size_t i = type->params.array.num_dims - 1;
	subtilis_exp_t *maxe = NULL;

	dim_size = type->params.array.dims[i];
	if ((dim_size != SUBTILIS_DYNAMIC_DIMENSION) &&
	    (e[i]->type.type == SUBTILIS_TYPE_CONST_INTEGER)) {
		if ((e[i]->exp.ir_op.integer < 0) ||
		    (e[i]->exp.ir_op.integer > dim_size)) {
			subtilis_error_bad_index(
			    err, var_name, p->l->stream->name, p->l->line);
			return;
		}
	} else {
		maxe = prv_check_dynamic_index(p, e[i], dim_size, offset,
					       mem_reg, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		subtilis_exp_delete(maxe);
	}
}

// Assembly:
pushq %rbx
movq %rdx, %r10
movq %rsi, %rax
movq 0x10(%rsp), %rbx
movslq 0x8(%rcx), %rsi
movl 0x8(%rcx,%rsi,4), %edx
movq -0x8(%r10,%rsi,8), %rsi
cmpl $-0x1, %edx
je 0x41695
cmpl $0x1, (%rsi)
jne 0x41695
movl 0x148(%rsi), %ecx
testl %ecx, %ecx
setns %sil
cmpl %edx, %ecx
setle %cl
testb %cl, %sil
jne 0x416a8
movq (%rdi), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x2e31d(%rip), %r10     # 0x6f992
leaq 0x2c749(%rip), %rcx     # 0x6ddc5
pushq $0x39
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
pushq $0x6cd                  # imm = 0x6CD
pushq %r10
callq 0x140cd
popq %rax
popq %rcx
jmp 0x416a8
movl %r8d, %ecx
movq %r9, %r8
movq %rbx, %r9
callq 0x415be
cmpl $0x0, (%rbx)
je 0x416aa
popq %rbx
retq
movq %rax, %rdi
popq %rbx
jmp 0x29d88
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: prv_compute_element_address
static subtilis_exp_t *prv_compute_element_address(subtilis_parser_t *p,
						   const subtilis_type_t *type,
						   size_t mem_reg, size_t loc,
						   subtilis_exp_t *sizee,
						   subtilis_error_t *err)
{
	subtilis_exp_t *base;

	base =
	    subtilis_type_if_load_from_mem(p, &subtilis_type_integer, mem_reg,
					   loc + SUBTIILIS_ARRAY_DATA_OFF, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	if ((sizee->type.type == SUBTILIS_TYPE_CONST_INTEGER) &&
	    (sizee->exp.ir_op.integer == 0)) {
		subtilis_exp_delete(sizee);
		return base;
	}

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

	return subtilis_type_if_add(p, base, sizee, err);

cleanup:

	subtilis_exp_delete(base);

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %rbx
movq %r8, %r12
movq %rsi, %r13
movq %rdi, %r15
addq $0x4, %rcx
leaq 0x2d1f5(%rip), %rsi     # 0x6e8c8
movq %r9, %r8
callq 0x343a4
cmpl $0x0, (%rbx)
jne 0x41713
movq %rax, %r14
cmpl $0x1, (%r12)
jne 0x416f5
cmpl $0x0, 0x148(%r12)
je 0x4173d
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x33e43
cmpl $0x0, (%rbx)
je 0x41723
movq %r14, %rdi
callq 0x29d88
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x34b18
movq %r12, %rdi
callq 0x29d88
jmp 0x41716
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_write
void subtilis_array_write(subtilis_parser_t *p, const char *var_name,
			  const subtilis_type_t *type,
			  const subtilis_type_t *el_type, size_t mem_reg,
			  size_t loc, subtilis_exp_t *e,
			  subtilis_exp_t **indices, size_t index_count,
			  subtilis_error_t *err)
{
	subtilis_exp_t *offset;

	offset = subtilis_array_index_calc(p, var_name, type, mem_reg, loc,
					   indices, index_count, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	if (e->partial_name)
		subtilis_parser_call_add_addr(p, el_type, e, err);
	else
		e = subtilis_type_if_coerce_type(p, e, el_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_type_if_assign_to_mem(p, offset->exp.ir_op.reg, 0, e, err);
	e = NULL;

cleanup:

	subtilis_exp_delete(offset);
	subtilis_exp_delete(e);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %rax
movq %rcx, %r13
movq %rdi, %r12
movq 0x48(%rsp), %r14
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %r9
movq %r8, %rcx
movq %rax, %r8
pushq %r14
pushq 0x48(%rsp)
callq 0x4108f
popq %rcx
popq %rdx
movq %rax, %r15
cmpl $0x0, (%r14)
jne 0x417d4
cmpq $0x0, 0x160(%rbx)
je 0x417a1
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x1cc3c
jmp 0x417b5
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x35977
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x417d4
movq 0x148(%r15), %rsi
movq %r12, %rdi
xorl %edx, %edx
movq %rbx, %rcx
movq %r14, %r8
callq 0x34300
xorl %ebx, %ebx
movq %r15, %rdi
callq 0x29d88
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x29d88
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_read
subtilis_exp_t *subtilis_array_read(subtilis_parser_t *p, const char *var_name,
				    const subtilis_type_t *type,
				    const subtilis_type_t *el_type,
				    size_t mem_reg, size_t loc,
				    subtilis_exp_t **indices,
				    size_t index_count, subtilis_error_t *err)
{
	subtilis_exp_t *offset;
	subtilis_exp_t *e;

	offset = subtilis_array_index_calc(p, var_name, type, mem_reg, loc,
					   indices, index_count, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	e = subtilis_type_if_load_from_mem(p, el_type, offset->exp.ir_op.reg, 0,
					   err);
	subtilis_exp_delete(offset);
	return e;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rax
movq %rcx, %rbx
movq %rdi, %r15
movq 0x40(%rsp), %r14
movq 0x30(%rsp), %r9
movq %r8, %rcx
movq %rax, %r8
pushq %r14
pushq 0x40(%rsp)
callq 0x4108f
addq $0x10, %rsp
cmpl $0x0, (%r14)
je 0x41827
xorl %eax, %eax
jmp 0x4184f
movq %rax, %r12
movq 0x148(%rax), %rdx
movq %r15, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
movq %r14, %r8
callq 0x343a4
movq %rax, %rbx
movq %r12, %rdi
callq 0x29d88
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq