LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x2f72e
cmpl $0x0, (%r14)
jne 0x41718
movslq 0x18(%rsp), %rdi
shlq $0x3, %rdi
callq 0x121d0
movq %rax, %rbx
testq %rax, %rax
je 0x416cd
movq %r15, 0x8(%rsp)
cmpl $0x0, 0x18(%rsp)
je 0x416a1
xorl %r15d, %r15d
movl $0x1, 0x1c(%rsp,%r15,4)
movl $0x1, %edi
movq %r14, %rsi
callq 0x2bb29
movq %rax, (%rbx,%r15,8)
cmpl $0x0, (%r14)
jne 0x416e6
incq %r15
movslq 0x18(%rsp), %rax
cmpq %rax, %r15
jb 0x41674
movzbl %bpl, %eax
leaq 0x3432c(%rip), %rsi     # 0x759d8
leaq 0x10(%rsp), %rdx
movq %r13, %rdi
movq %r12, %rcx
movq %rbx, %r8
movq 0x8(%rsp), %r9
pushq %r14
pushq %rax
callq 0x4172a
addq $0x10, %rsp
jmp 0x416e6
leaq 0x342ee(%rip), %rdx     # 0x759c2
movq %r14, %rdi
movl $0x1, %esi
movl $0x75, %ecx
callq 0x145f4
cmpl $0x0, 0x18(%rsp)
je 0x41706
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rdi
callq 0x122c0
incq %r14
movslq 0x18(%rsp), %rax
cmpq %rax, %r14
jb 0x416f0
movq %rbx, %rdi
callq 0x122c0
leaq 0x10(%rsp), %rdi
callq 0x2f843
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x419d1
leaq 0x34011(%rip), %rdx     # 0x759c2
movq %r14, %rdi
movl $0xf, %esi
movl $0x94, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x145f4
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 0x3610f
cmpl $0x0, (%r14)
je 0x41a09
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r15d, 0x8(%r13)
testq %r15, %r15
je 0x419fa
xorl %eax, %eax
movq (%r12,%rax,8), %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x1, (%rdx)
jne 0x41a2c
movl 0x148(%rdx), %ecx
testl %ecx, %ecx
js 0x41a3b
movl %ecx, 0xc(%r13,%rax,4)
incq %rax
cmpq %rax, %r15
jne 0x41a14
jmp 0x419fa
movq (%rbp), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x33f74(%rip), %rax     # 0x759c2
leaq 0x323a0(%rip), %rcx     # 0x73df5
movq %r14, %rdi
movl $0x38, %esi
movq %rbx, %rdx
pushq $0xa3
pushq %rax
callq 0x1442a
addq $0x18, %rsp
jmp 0x419fe
// File: /workspace/github_c_makefile_star2_O1/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 0x36164
cmpl $0x0, (%r14)
jne 0x41a9a
movabsq $-0xffffffff, %rax      # imm = 0xFFFFFFFF00000001
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2bb29
cmpl $0x0, (%r14)
je 0x41ae1
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 0x36269
movq %rax, 0x8(%rsp)
cmpl $0x0, (%r14)
je 0x41b1c
xorl %edi, %edi
movq 0x8(%rsp), %rbx
callq 0x2b4c3
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b4c3
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq %r14, %rsi
callq 0x2bb29
cmpl $0x0, (%r14)
jne 0x41ad2
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x36269
movq %rax, %rdi
cmpl $0x0, (%r14)
jne 0x41afc
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 0x4d921
cmpl $0x0, (%r14)
jne 0x41bda
movq 0x8(%rsp), %rax
movq 0x148(%rax), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %r8
callq 0x4db75
cmpl $0x0, (%r14)
jne 0x41bda
leal 0x10(%r12), %r8d
movq 0x48(%rbx), %rdi
movq 0x10(%rsp), %rax
movq 0x148(%rax), %rdx
movl $0x17, %esi
movq %r15, %rcx
movq %r14, %r9
callq 0x2c0c2
cmpl $0x0, (%r14)
setne %al
xorb $0x1, %bpl
orb %al, %bpl
jne 0x41bda
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r14, %r8
callq 0x4d4ea
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %rdi
jmp 0x41b01
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1b, %esi
xorl %edx, %edx
movq %r8, %rcx
callq 0x2c189
cmpl $0x0, (%rbx)
je 0x41c21
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 0x3087c
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_zero_buf_i8
void subtilis_array_zero_buf_i8(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_i8(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
movl $0x1b, %esi
xorl %edx, %edx
movq %r8, %rcx
callq 0x2c189
cmpl $0x0, (%rbx)
je 0x41c78
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 0x3095d
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x17, %esi
movq %rbx, %rcx
movq %r12, %r9
callq 0x2c0c2
cmpl $0x0, (%r12)
jne 0x42006
movq 0x48(%r13), %rdi
movq 0x148(%rbp), %rdx
movl $0x1, %ecx
movl $0x9, %esi
movq %r12, %r8
callq 0x2c00f
cmpl $0x0, (%r12)
jne 0x42006
movl %eax, %edi
movq %r12, %rsi
callq 0x2ba99
cmpl $0x0, (%r12)
jne 0x42006
movq %r13, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r12, %rcx
callq 0x35f2b
cmpl $0x0, (%r12)
je 0x42015
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 0x4ddee
cmpl $0x0, (%r12)
jne 0x4207d
movq 0x148(%rbp), %rcx
movq %r13, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r12, %r8
callq 0x367bc
cmpl $0x0, (%r12)
setne %al
movl 0x14(%rsp), %ecx
xorb $0x1, %cl
orb %al, %cl
jne 0x4207d
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %r12, %r8
callq 0x4d4ea
movq %rbp, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b4c3
// File: /workspace/github_c_makefile_star2_O1/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 0x425f4
movq %rdx, %rax
movl 0x148(%r13), %edx
testl %edx, %edx
jns 0x42613
movl 0x148(%rax), %ecx
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x333e7(%rip), %rax     # 0x759c2
movq %rbx, %rdi
movl $0x65, %esi
pushq $0x26b                  # imm = 0x26B
pushq %rax
callq 0x144d6
addq $0x10, %rsp
jmp 0x42613
movq %rcx, %r12
movq 0x48(%r14), %rdi
callq 0x2d00a
movq %rax, %r15
movq %r13, %rdi
movq %rbx, %rsi
callq 0x362d2
cmpl $0x0, (%rbx)
je 0x4261d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r13
xorl %edi, %edi
movq %rbx, %rsi
callq 0x2bb29
cmpl $0x0, (%rbx)
je 0x42640
movq %r13, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2b4c3
movq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x372a2
cmpl $0x0, (%rbx)
jne 0x42613
movq %rax, %r13
movq 0x48(%r14), %rdi
movq 0x148(%rax), %rdx
movl $0x43, %esi
movq %r15, %rcx
movq %r12, %r8
movq %rbx, %r9
callq 0x2c0c2
movq %r13, %rdi
callq 0x2b4c3
cmpl $0x0, (%rbx)
jne 0x42613
movq 0x48(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2d017
// File: /workspace/github_c_makefile_star2_O1/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 0x4270c
movl 0xc(%r12), %eax
cmpl $-0x1, %eax
je 0x4270c
movl 0x148(%r13), %ecx
incl %eax
cmpl %eax, %ecx
jle 0x42787
movl 0x148(%rdx), %edx
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x332cf(%rip), %rax     # 0x759c2
movq %rbx, %rdi
movl $0x65, %esi
pushq $0x2b7                  # imm = 0x2B7
pushq %rax
callq 0x144d6
addq $0x18, %rsp
jmp 0x4278b
movq 0x48(%r14), %rdi
callq 0x2d00a
movq %rax, (%rsp)
movq %r14, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x427b4
cmpl $0x0, (%rbx)
jne 0x42787
movq %rax, %rbp
movq %r13, %rdi
movq %rbx, %rsi
callq 0x362d2
cmpl $0x0, (%rbx)
jne 0x42787
movq %r14, %rdi
movq %rax, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3720e
cmpl $0x0, (%rbx)
jne 0x42787
movq %rax, %r12
movq 0x48(%r14), %rdi
movq 0x148(%rax), %rdx
movl $0x43, %esi
movq (%rsp), %rcx
movq %r15, %r8
movq %rbx, %r9
callq 0x2c0c2
movq %r12, %rdi
callq 0x2b4c3
cmpl $0x0, (%rbx)
je 0x42796
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 0x2d017
// File: /workspace/github_c_makefile_star2_O1/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 0x427d1
movq %rbx, %rsi
callq 0x2bb29
jmp 0x427e8
leaq 0x32120(%rip), %rsi     # 0x748f8
movl $0x10, %ecx
movq %r14, %rdi
movq %rbx, %r8
callq 0x364c2
movq %rax, %r15
cmpl $0x0, (%rbx)
jne 0x4280a
movl $0x1, %edi
movq %rbx, %rsi
callq 0x2bb29
cmpl $0x0, (%rbx)
je 0x42812
movq %r15, %rdi
callq 0x2b4c3
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 0x36c85
// File: /workspace/github_c_makefile_star2_O1/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 0x42f5c
cmpl $0x0, (%r14)
jne 0x42f46
movq 0x148(%rbx), %r8
movq (%rbp), %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
xorl %r9d, %r9d
pushq %r14
pushq $0x1
callq 0x4306d
addq $0x10, %rsp
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0x4d02d
cmpl $0x0, (%r14)
jne 0x42f46
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4d2d0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b4c3
// File: /workspace/github_c_makefile_star2_O1/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 0x2f3e4
testb %al, %al
je 0x42f7f
popq %rbx
popq %r14
popq %r15
retq
movq %r15, %rdi
callq 0x377f7
testb %al, %al
jne 0x42f97
movq %r15, %rdi
callq 0x37815
testb %al, %al
je 0x42fc0
movq (%r14), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x32a1a(%rip), %r8      # 0x759c2
movq %rbx, %rdi
movl $0x41, %esi
movl $0x572, %r9d            # imm = 0x572
popq %rbx
popq %r14
popq %r15
jmp 0x14618
movq %r15, %rdi
callq 0x2f882
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x329e8(%rip), %r10     # 0x759c2
leaq 0x30e14(%rip), %rcx     # 0x73df5
movq %rbx, %rdi
movl $0x3d, %esi
movq %rax, %rdx
pushq $0x576                  # imm = 0x576
pushq %r10
callq 0x1442a
addq $0x10, %rsp
jmp 0x42f79
// File: /workspace/github_c_makefile_star2_O1/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 0x42f5c
cmpl $0x0, (%r14)
jne 0x43057
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq (%rsp), %rcx
movq %r13, %r8
xorl %r9d, %r9d
pushq %r14
pushq $0x1
callq 0x4306d
addq $0x10, %rsp
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b4c3
// File: /workspace/github_c_makefile_star2_O1/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 0x42f5c
cmpl $0x0, (%r14)
jne 0x433a5
movq 0x148(%rbx), %r8
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r9
callq 0x433bb
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b4c3
// File: /workspace/github_c_makefile_star2_O1/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 0x37815
movzbl %al, %r8d
movq %rbp, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r9
callq 0x4d5f1
cmpl $0x0, (%rbx)
je 0x4340c
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 0x434e1
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/array_type.c
// Function: subtlis_array_type_copy_ret
void subtlis_array_type_copy_ret(subtilis_parser_t *p, const subtilis_type_t *t,
				 size_t dest_reg, size_t source_reg,
				 subtilis_error_t *err)
{
	subtilis_ir_operand_t d;
	subtilis_ir_operand_t s;

	d.reg = dest_reg;
	s.reg = source_reg;

	prv_copy_ref_base(p, t, d, 0, s, 0, false, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_reference_inc_cleanup_stack(p, t, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %rbx
movq %rcx, %r8
movq %rsi, %r14
movq %rdi, %r15
xorl %ecx, %ecx
xorl %r9d, %r9d
pushq %rbx
pushq $0x0
callq 0x4306d
addq $0x10, %rsp
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x4d02d
cmpl $0x0, (%rbx)
je 0x4346f
popq %rbx
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x4d2d0
// File: /workspace/github_c_makefile_star2_O1/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 0x37da0
cmpl $0x0, (%r14)
jne 0x434cb
movq 0x148(%rbx), %r8
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r9
callq 0x433bb
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b4c3
// File: /workspace/github_c_makefile_star2_O1/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 %r8, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movq %rdx, (%rsp)
cmpl $0x0, 0x8(%rsi)
je 0x4358a
movq %r9, %rbx
movq %rsi, %r13
movq %rdi, %rbp
movq (%rsp), %r12
shrq $0x20, %r12
movl $0x10, %r14d
xorl %r15d, %r15d
cmpl $-0x1, 0xc(%r13,%r15,4)
jne 0x4357a
movq 0x48(%rbp), %rdi
shlq $0x20, %rax
movl %r14d, %ecx
andl $-0x4, %ecx
orq %rax, %rcx
movl $0x12, %esi
movq 0x10(%rsp), %rdx
movq %rbx, %r8
callq 0x2c00f
cmpl $0x0, (%rbx)
jne 0x4358a
movq 0x8(%rsp), %rcx
leal (%rcx,%r14), %r8d
movq 0x48(%rbp), %rdi
movl $0x17, %esi
movq %rax, %rdx
movq (%rsp), %rcx
movq %rbx, %r9
callq 0x2c0c2
cmpl $0x0, (%rbx)
movl %r12d, %eax
jne 0x4358a
incq %r15
movslq 0x8(%r13), %rcx
addq $0x4, %r14
cmpq %rcx, %r15
jb 0x43521
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x43796
movq %rbx, %rdx
callq 0x2d017
cmpl $0x0, (%rbx)
jne 0x43796
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2bb29
cmpl $0x0, (%rbx)
je 0x4379e
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 0x2bdd4
// File: /workspace/github_c_makefile_star2_O1/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 0x43d62
movl %esi, %edi
movq %rbx, %rsi
popq %rbx
jmp 0x2bb29
movq 0x48(%rdi), %rdi
movl %edx, %eax
movl $0x12, %esi
movq %rcx, %rdx
movq %rax, %rcx
movq %rbx, %r8
callq 0x2c00f
cmpl $0x0, (%rbx)
je 0x43d84
xorl %eax, %eax
popq %rbx
retq
movl %eax, %edi
movq %rbx, %rsi
popq %rbx
jmp 0x2ba99
// File: /workspace/github_c_makefile_star2_O1/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 0x43d4e
cmpl $0x0, (%r14)
jne 0x43dea
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x362d2
cmpl $0x0, (%r14)
jne 0x43de2
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
movq %r14, %r8
callq 0x435d4
cmpl $0x0, (%r14)
je 0x43dec
movq %rbx, %rdi
callq 0x2b4c3
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
cmpl $-0x1, %edx
je 0x43e62
movq -0x8(%r10,%rsi,8), %rcx
cmpl $0x1, (%rcx)
jne 0x43e62
movl 0x148(%rcx), %ecx
testl %ecx, %ecx
js 0x43e2c
cmpl %edx, %ecx
jle 0x43e7a
movq (%rdi), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x31b84(%rip), %r10     # 0x759c2
leaq 0x2ffb0(%rip), %rcx     # 0x73df5
movq %rbx, %rdi
movl $0x39, %esi
movq %rax, %rdx
pushq $0x6cd                  # imm = 0x6CD
pushq %r10
callq 0x1442a
addq $0x10, %rsp
jmp 0x43e7a
movq -0x8(%r10,%rsi,8), %rsi
movl %r8d, %ecx
movq %r9, %r8
movq %rbx, %r9
callq 0x43d8f
cmpl $0x0, (%rbx)
je 0x43e7c
popq %rbx
retq
movq %rax, %rdi
popq %rbx
jmp 0x2b4c3
// File: /workspace/github_c_makefile_star2_O1/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 0x30a53(%rip), %rsi     # 0x748f8
movq %r9, %r8
callq 0x364c2
cmpl $0x0, (%rbx)
jne 0x43ee5
movq %rax, %r14
cmpl $0x1, (%r12)
jne 0x43ec7
cmpl $0x0, 0x148(%r12)
je 0x43f0f
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x35f2b
cmpl $0x0, (%rbx)
je 0x43ef5
movq %r14, %rdi
callq 0x2b4c3
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 0x36c85
movq %r12, %rdi
callq 0x2b4c3
jmp 0x43ee8
// File: /workspace/github_c_makefile_star2_O1/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 0x437b3
addq $0x10, %rsp
movq %rax, %r15
cmpl $0x0, (%r14)
jne 0x43fa8
cmpq $0x0, 0x160(%rbx)
je 0x43f75
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x1d2a6
jmp 0x43f89
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x379c3
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x43fa8
movq 0x148(%r15), %rsi
movq %r12, %rdi
xorl %edx, %edx
movq %rbx, %rcx
movq %r14, %r8
callq 0x36416
xorl %ebx, %ebx
movq %r15, %rdi
callq 0x2b4c3
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2b4c3
// File: /workspace/github_c_makefile_star2_O1/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 0x437b3
addq $0x10, %rsp
cmpl $0x0, (%r14)
je 0x43ffb
xorl %eax, %eax
jmp 0x44023
movq %rax, %r12
movq 0x148(%rax), %rdx
movq %r15, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
movq %r14, %r8
callq 0x364c2
movq %rax, %rbx
movq %r12, %rdi
callq 0x2b4c3
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_add
void subtilis_array_add(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;
	subtilis_exp_t *cur_val;

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

	cur_val = subtilis_type_if_load_from_mem(p, el_type,
						 offset->exp.ir_op.reg, 0, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

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

	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);

cleanup:
	subtilis_exp_delete(offset);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %rax
movq %rcx, %r12
movq %rdi, %r14
movq 0x48(%rsp), %rbx
movq 0x30(%rsp), %r13
movq 0x38(%rsp), %r9
movq %r8, %rcx
movq %rax, %r8
pushq %rbx
pushq 0x48(%rsp)
callq 0x437b3
addq $0x10, %rsp
cmpl $0x0, (%rbx)
je 0x44073
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r15
movq 0x148(%rax), %rdx
movq %r14, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x364c2
cmpl $0x0, (%rbx)
jne 0x440d5
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x36c85
cmpl $0x0, (%rbx)
jne 0x440d5
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x379c3
cmpl $0x0, (%rbx)
jne 0x440d5
movq 0x148(%r15), %rsi
movq %r14, %rdi
xorl %edx, %edx
movq %rax, %rcx
movq %rbx, %r8
callq 0x36416
movq %r15, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2b4c3
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_sub
void subtilis_array_sub(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;
	subtilis_exp_t *cur_val;

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

	cur_val = subtilis_type_if_load_from_mem(p, el_type,
						 offset->exp.ir_op.reg, 0, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

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

	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);

cleanup:
	subtilis_exp_delete(offset);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %rax
movq %rcx, %r12
movq %rdi, %r14
movq 0x48(%rsp), %rbx
movq 0x30(%rsp), %r13
movq 0x38(%rsp), %r9
movq %r8, %rcx
movq %rax, %r8
pushq %rbx
pushq 0x48(%rsp)
callq 0x437b3
addq $0x10, %rsp
cmpl $0x0, (%rbx)
je 0x4412a
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r15
movq 0x148(%rax), %rdx
movq %r14, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x364c2
cmpl $0x0, (%rbx)
jne 0x4418c
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x36f23
cmpl $0x0, (%rbx)
jne 0x4418c
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x379c3
cmpl $0x0, (%rbx)
jne 0x4418c
movq 0x148(%r15), %rsi
movq %r14, %rdi
xorl %edx, %edx
movq %rax, %rcx
movq %rbx, %r8
callq 0x36416
movq %r15, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2b4c3
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/array_type.c
// Function: prv_check_gran
static subtilis_exp_t *prv_check_gran(subtilis_parser_t *p,
				      subtilis_exp_t *gran,
				      subtilis_error_t *err)
{
	char num[32];
	subtilis_ir_operand_t condee;
	subtilis_ir_operand_t zero;
	subtilis_ir_operand_t error_label;
	subtilis_ir_operand_t ok_label;

	gran = subtilis_type_if_to_int(p, gran, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	if (gran->type.type == SUBTILIS_TYPE_CONST_INTEGER) {
		if (gran->exp.ir_op.integer <= 0) {
			snprintf(num, sizeof(num), "%d",
				 gran->exp.ir_op.integer);
			subtilis_error_set_expected(err, "positive integer",
						    num, p->l->stream->name,
						    p->l->line);
		}
	} else {
		/* Need a runtime check */

		zero.integer = 0;
		condee.reg = subtilis_ir_section_add_instr(
		    p->current, SUBTILIS_OP_INSTR_GTI_I32, gran->exp.ir_op,
		    zero, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return NULL;

		error_label = subtilis_array_type_error_label(p);
		ok_label.label = subtilis_ir_section_new_label(p->current);

		subtilis_ir_section_add_instr_reg(
		    p->current, SUBTILIS_OP_INSTR_JMPC, condee, ok_label,
		    error_label, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return NULL;

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

	return gran;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rdi, %r15
callq 0x3691f
cmpl $0x0, (%r14)
je 0x44c88
xorl %r13d, %r13d
jmp 0x44d0e
movq %rax, %rbx
cmpl $0x1, (%rax)
jne 0x44ceb
movl 0x148(%rbx), %ecx
testl %ecx, %ecx
jg 0x44ce6
leaq 0x2e9aa(%rip), %rdx     # 0x7364b
movq %rsp, %r12
movl $0x20, %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x12120
movq (%r15), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x30cfd(%rip), %rax     # 0x759c2
leaq 0x30d34(%rip), %rdx     # 0x75a00
movq %r14, %rdi
movl $0x1d, %esi
movq %r12, %rcx
pushq $0xa8b                  # imm = 0xA8B
pushq %rax
callq 0x1442a
addq $0x10, %rsp
movq %rbx, %r13
jmp 0x44d0e
movq 0x48(%r15), %rdi
movq 0x148(%rbx), %rdx
xorl %r13d, %r13d
movl $0x35, %esi
xorl %ecx, %ecx
movq %r14, %r8
callq 0x2c00f
cmpl $0x0, (%r14)
je 0x44d20
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
movq 0x48(%r15), %rdi
movq 0xb0(%rdi), %r13
cmpq $-0x1, %r13
jne 0x44d47
callq 0x2d00a
movq %rax, %r13
movq 0x48(%r15), %rax
movq %r13, 0xb0(%rax)
movq 0x48(%r15), %rdi
callq 0x2d00a
movq %rax, %rbp
movq 0x48(%r15), %rdi
movl $0x43, %esi
movq %r12, %rdx
movq %rax, %rcx
movq %r13, %r8
movq %r14, %r9
callq 0x2c0c2
cmpl $0x0, (%r14)
jne 0x44c80
movq 0x48(%r15), %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x2d017
cmpl $0x0, (%r14)
jne 0x44c80
jmp 0x44ce6