LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x43706
addq $0x10, %rsp
cmpl $0x0, (%rbx)
je 0x43fcd
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 0x36372
cmpl $0x0, (%rbx)
jne 0x4402f
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x36b28
cmpl $0x0, (%rbx)
jne 0x4402f
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x37860
cmpl $0x0, (%rbx)
jne 0x4402f
movq 0x148(%r15), %rsi
movq %r14, %rdi
xorl %edx, %edx
movq %rax, %rcx
movq %rbx, %r8
callq 0x362c6
movq %r15, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2b166
// File: /workspace/github_c_makefile_star2_O3/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 0x43706
addq $0x10, %rsp
cmpl $0x0, (%rbx)
je 0x44084
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 0x36372
cmpl $0x0, (%rbx)
jne 0x440e6
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x36de4
cmpl $0x0, (%rbx)
jne 0x440e6
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x37860
cmpl $0x0, (%rbx)
jne 0x440e6
movq 0x148(%r15), %rsi
movq %r14, %rdi
xorl %edx, %edx
movq %rax, %rcx
movq %rbx, %r8
callq 0x362c6
movq %r15, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2b166
// File: /workspace/github_c_makefile_star2_O3/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 0x367cf
cmpl $0x0, (%r14)
je 0x44be2
xorl %r13d, %r13d
jmp 0x44c68
movq %rax, %rbx
cmpl $0x1, (%rax)
jne 0x44c45
movl 0x148(%rbx), %ecx
testl %ecx, %ecx
jg 0x44c40
leaq 0x2ea81(%rip), %rdx     # 0x7367c
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 0x30de7(%rip), %rax     # 0x75a06
leaq 0x30e1e(%rip), %rdx     # 0x75a44
movq %r14, %rdi
movl $0x1d, %esi
movq %r12, %rcx
pushq $0xa8b                  # imm = 0xA8B
pushq %rax
callq 0x143da
addq $0x10, %rsp
movq %rbx, %r13
jmp 0x44c68
movq 0x48(%r15), %rdi
movq 0x148(%rbx), %rdx
xorl %r13d, %r13d
movl $0x35, %esi
xorl %ecx, %ecx
movq %r14, %r8
callq 0x2bc8f
cmpl $0x0, (%r14)
je 0x44c7a
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 0x44ca1
callq 0x2cc99
movq %rax, %r13
movq 0x48(%r15), %rdi
movq %rax, 0xb0(%rdi)
callq 0x2cc99
movq %rax, %rbp
movq 0x48(%r15), %rdi
movl $0x43, %esi
movq %r12, %rdx
movq %rax, %rcx
movq %r13, %r8
movq %r14, %r9
callq 0x2bd42
cmpl $0x0, (%r14)
jne 0x44bda
movq 0x48(%r15), %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x2cca6
cmpl $0x0, (%r14)
jne 0x44bda
jmp 0x44c40
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/array_type.c
// Function: prv_check_arrays_compat
static void prv_check_arrays_compat(subtilis_parser_t *p,
				    const subtilis_type_t *el_type,
				    subtilis_exp_t *a1, subtilis_exp_t *a2,
				    subtilis_error_t *err)
{
	subtilis_type_t el_type2;

	if (a1->type.type != a2->type.type) {
		/*
		 * Check to see if a2 is an array.  We can append an
		 * array to a vector, but not the other way around.
		 */

		/*
		 * Number of dimensions aren't important here.  We're
		 * just going to copy all the elements from a2.
		 */

		if (!subtilis_type_if_is_array(&a2->type)) {
			subtilis_error_set_array_type_mismatch(
			    err, p->l->stream->name, p->l->line);
			return;
		}

		subtilis_type_if_element_type(p, &a2->type, &el_type2, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;

		if (!subtilis_type_eq(el_type, &el_type2))
			subtilis_error_set_array_type_mismatch(
			    err, p->l->stream->name, p->l->line);

		subtilis_type_free(&el_type2);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
cmpl %edx, (%rcx)
je 0x4531e
movq %r8, %rbx
movq %rcx, %r12
movq %rsi, %r15
movq %rdi, %r14
movq %rcx, %rdi
callq 0x376b5
testb %al, %al
je 0x4532d
movq %rsp, %rdx
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rcx
callq 0x360be
cmpl $0x0, (%rbx)
jne 0x4531e
movq %rsp, %rsi
movq %r15, %rdi
callq 0x2f0ec
testb %al, %al
jne 0x45316
movq (%r14), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x30703(%rip), %r8      # 0x75a06
movq %rbx, %rdi
movl $0x41, %esi
movl $0xb46, %r9d            # imm = 0xB46
callq 0x145c8
movq %rsp, %rdi
callq 0x2f56e
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq (%r14), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x306c8(%rip), %r8      # 0x75a06
movq %rbx, %rdi
movl $0x41, %esi
movl $0xb3c, %r9d            # imm = 0xB3C
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x145c8
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/array_type.c
// Function: prv_div_by_const
static size_t prv_div_by_const(subtilis_parser_t *p, size_t reg,
			       int32_t divisor, subtilis_error_t *err)
{
	subtilis_exp_t *a1;
	subtilis_exp_t *a2 = NULL;

	a1 = subtilis_exp_new_int32_var(reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return SIZE_MAX;

	a2 = subtilis_exp_new_int32(divisor, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		subtilis_exp_delete(a1);
		return SIZE_MAX;
	}

	a1 = subtilis_type_if_div(p, a1, a2, err);
	reg = a1->exp.ir_op.reg;
	subtilis_exp_delete(a1);

	return reg;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movl %edx, %ebp
movq %rdi, %r15
movl %esi, %edi
movq %rcx, %rsi
callq 0x2b71f
movq $-0x1, %r12
cmpl $0x0, (%r14)
jne 0x453c3
movq %rax, %rbx
movl %ebp, %edi
movq %r14, %rsi
callq 0x2b7af
movq $-0x1, %r12
cmpl $0x0, (%r14)
jne 0x453bb
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0x36e2e
movq %rax, %rbx
movq 0x148(%rax), %r12
movq %rbx, %rdi
callq 0x2b166
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_type_dup
void subtilis_array_type_dup(subtilis_exp_t *src, subtilis_exp_t *dst,
			     subtilis_error_t *err)
{
	subtilis_type_copy(&dst->type, &src->type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (src->temporary) {
		dst->temporary = malloc(strlen(src->temporary) + 1);
		if (!dst->temporary) {
			subtilis_error_set_oom(err);
			return;
		}
		strcpy(dst->temporary, src->temporary);
	} else {
		dst->temporary = NULL;
	}
	dst->exp.ir_op.reg = src->exp.ir_op.reg;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x2f78a
cmpl $0x0, (%r15)
jne 0x45725
movq 0x158(%r14), %rdi
testq %rdi, %rdi
je 0x4570c
callq 0x120f0
leaq 0x1(%rax), %rdi
callq 0x121d0
movq %rax, 0x158(%rbx)
testq %rax, %rax
je 0x4572b
movq 0x158(%r14), %rsi
movq %rax, %rdi
callq 0x12070
jmp 0x45717
movq $0x0, 0x158(%rbx)
movq 0x148(%r14), %rax
movq %rax, 0x148(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x302d4(%rip), %rdx     # 0x75a06
movq %r15, %rdi
movl $0x1, %esi
movl $0xc3c, %ecx            # imm = 0xC3C
popq %rbx
popq %r14
popq %r15
jmp 0x145a4
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/sizet_vector.c
// Function: subtilis_sizet_vector_append
void subtilis_sizet_vector_append(subtilis_sizet_vector_t *v, size_t val,
				  subtilis_error_t *err)
{
	size_t new_max;
	size_t *new_vals;

	if (v->len == v->max_len) {
		new_max = v->len + SUBTILIS_CONFIG_SIZET_SIZE;
		new_vals = realloc(v->vals, new_max * sizeof(size_t));
		if (!new_vals) {
			subtilis_error_set_oom(err);
			return;
		}
		v->max_len = new_max;
		v->vals = new_vals;
	}
	v->vals[v->len++] = val;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r12
cmpq 0x8(%rdi), %r12
jne 0x4579c
movq %rdx, %r15
movq 0x10(%r14), %rdi
leaq 0x200(,%r12,8), %rsi
callq 0x12210
testq %rax, %rax
je 0x457b8
addq $0x40, %r12
movq %r12, 0x8(%r14)
movq %rax, 0x10(%r14)
movq (%r14), %r12
jmp 0x457a0
movq 0x10(%r14), %rax
leaq 0x1(%r12), %rcx
movq %rcx, (%r14)
movq %rbx, (%rax,%r12,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x30296(%rip), %rdx     # 0x75a55
movq %r15, %rdi
movl $0x1, %esi
movl $0x27, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x145a4
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/rec_type.c
// Function: subtilis_rec_type_init_array
void subtilis_rec_type_init_array(subtilis_parser_t *p,
				  const subtilis_type_t *type,
				  const char *var_name, size_t mem_reg,
				  size_t loc, subtilis_error_t *err)
{
	size_t i;
	subtilis_ir_operand_t op;
	subtilis_exp_t *e[SUBTILIS_MAX_DIMENSIONS] = {NULL};
	const subtilis_type_array_t *arr = &type->params.array;

	for (i = 0; i < arr->num_dims; i++) {
		e[i] = subtilis_exp_new_int32(arr->dims[i], err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
	}

	op.reg = mem_reg;
	subtilis_array_type_allocate(p, var_name, type, loc, e, op, false, err);

cleanup:
	for (i = 0; i < arr->num_dims; i++)
		subtilis_exp_delete(e[i]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, %r14
movq %r8, %r12
movq %rcx, 0x8(%rsp)
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %rbp
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
cmpl $0x0, 0x8(%rsi)
je 0x45857
xorl %r15d, %r15d
movl 0xc(%rbx,%r15,4), %edi
movq %r14, %rsi
callq 0x2b7af
movq %rax, 0x10(%rsp,%r15,8)
cmpl $0x0, (%r14)
jne 0x4587a
incq %r15
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
jb 0x45833
leaq 0x10(%rsp), %r8
movq %rbp, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r12, %rcx
movq 0x8(%rsp), %r9
pushq %r14
pushq $0x0
callq 0x41600
addq $0x10, %rsp
cmpl $0x0, 0x8(%rbx)
je 0x45899
xorl %r14d, %r14d
movq 0x10(%rsp,%r14,8), %rdi
callq 0x2b166
incq %r14
movslq 0x8(%rbx), %rax
cmpq %rax, %r14
jb 0x45883
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/rec_type.c
// Function: subtilis_rec_type_init_vector
void subtilis_rec_type_init_vector(subtilis_parser_t *p,
				   const subtilis_type_t *type, size_t mem_reg,
				   size_t loc, int32_t vec_dim,
				   subtilis_error_t *err)
{
	subtilis_ir_operand_t op;
	subtilis_exp_t *e = NULL;

	e = subtilis_exp_new_int32(vec_dim, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	op.reg = mem_reg;
	subtilis_array_type_vector_alloc(p, loc, type, e, op, false, err);
	subtilis_exp_delete(e);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %rbp
movl %r8d, %edi
movq %r9, %rsi
callq 0x2b7af
cmpl $0x0, (%r15)
je 0x458e2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
movq %r15, (%rsp)
movq %rbp, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rax, %rcx
movq %rbx, %r8
xorl %r9d, %r9d
callq 0x41b6a
movq %r13, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b166
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/rec_type.c
// Function: subtilis_rec_type_init_field
void subtilis_rec_type_init_field(subtilis_parser_t *p,
				  const subtilis_type_t *type,
				  subtilis_type_field_t *field, size_t mem_reg,
				  size_t loc, bool memset,
				  subtilis_error_t *err)
{
	subtilis_exp_t *e;

	if (subtilis_type_if_is_array(type)) {
		subtilis_rec_type_init_array(p, type, field->name, mem_reg, loc,
					     err);
	} else if (subtilis_type_if_is_vector(type) && (field->vec_dim >= 0)) {
		subtilis_rec_type_init_vector(p, type, mem_reg, loc,
					      field->vec_dim, err);
	} else if (subtilis_type_if_is_reference(type)) {
		subtilis_type_if_zero_ref(p, type, mem_reg, loc, false, err);
	} else if (type->type == SUBTILIS_TYPE_REC) {
		prv_rec_type_zero(p, type, mem_reg, loc, memset, err);
	} else if (subtilis_type_if_is_numeric(type) ||
		   (type->type == SUBTILIS_TYPE_FN)) {
		e = subtilis_type_if_zero(p, type, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		subtilis_type_if_assign_to_mem(p, mem_reg, loc, e, err);
	} else {
		subtilis_error_set_assertion_failed(err);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, 0x4(%rsp)
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, %r12
movq 0x40(%rsp), %rbx
movq %rsi, %rdi
callq 0x376b5
testb %al, %al
je 0x4596c
movq (%rbp), %rdx
movq %r12, %rdi
movq %r13, %rsi
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 0x457ec
movq %r13, %rdi
callq 0x376d3
testb %al, %al
je 0x459a3
movl 0x10(%rbp), %r8d
testl %r8d, %r8d
js 0x459a3
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x458a8
movq %r13, %rdi
callq 0x376f1
testb %al, %al
je 0x459d4
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
movq %rbx, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x35e59
cmpl $0x16, (%r13)
jne 0x45a00
movzbl 0x4(%rsp), %r8d
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x45a7e
movq %r13, %rdi
callq 0x37534
testb %al, %al
jne 0x45a13
cmpl $0x9, (%r13)
jne 0x45a57
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x35e20
cmpl $0x0, (%rbx)
je 0x45a35
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x362c6
leaq 0x3000d(%rip), %rdx     # 0x75a6b
movq %rbx, %rdi
movl $0xf, %esi
movl $0x6c, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x145a4
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/rec_type.c
// Function: prv_rec_type_zero
static void prv_rec_type_zero(subtilis_parser_t *p, const subtilis_type_t *type,
			      size_t mem_reg, size_t loc, bool memset,
			      subtilis_error_t *err)
{
	if (memset)
		prv_uninit_fields(p, type, mem_reg, loc, err);
	else
		prv_init_fields(p, type, mem_reg, loc, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %rbx
movq %rcx, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, %r12
movq %rdi, 0x10(%rsp)
leaq 0x8(%rsi), %rax
movq %rax, 0x8(%rsp)
testl %r8d, %r8d
je 0x45b36
cmpq $0x0, 0x28(%r12)
je 0x45b9e
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %r14d, %r14d
movq 0x18(%r12), %r15
addq %rbp, %r15
movq %r15, %rdi
callq 0x37534
testb %al, %al
jne 0x45b1f
cmpl $0x7, (%r15)
je 0x45b1f
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x2fe6a
movq 0x20(%r12), %rdx
addq %r13, %rdx
movl %eax, %r8d
addq 0x20(%rsp), %r8
movq %rbx, (%rsp)
movq 0x10(%rsp), %rdi
movq %r15, %rsi
movq 0x18(%rsp), %rcx
movl $0x1, %r9d
callq 0x45916
cmpl $0x0, (%rbx)
jne 0x45b9e
incq %r14
addq $0x148, %rbp            # imm = 0x148
addq $0x18, %r13
cmpq 0x28(%r12), %r14
jb 0x45ac7
jmp 0x45b9e
cmpq $0x0, 0x28(%r12)
je 0x45b9e
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %r14d, %r14d
movq 0x18(%r12), %r15
addq %rbp, %r15
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x2fe6a
movq 0x20(%r12), %rdx
addq %r13, %rdx
movl %eax, %r8d
addq 0x20(%rsp), %r8
movq %rbx, (%rsp)
movq 0x10(%rsp), %rdi
movq %r15, %rsi
movq 0x18(%rsp), %rcx
xorl %r9d, %r9d
callq 0x45916
cmpl $0x0, (%rbx)
jne 0x45b9e
incq %r14
addq $0x148, %rbp            # imm = 0x148
addq $0x18, %r13
cmpq 0x28(%r12), %r14
jb 0x45b46
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/rec_type.c
// Function: subtilis_rec_type_zero_body
void subtilis_rec_type_zero_body(subtilis_parser_t *p,
				 const subtilis_type_t *type, size_t mem_reg,
				 size_t loc, size_t zero_fill_size,
				 subtilis_error_t *err)
{
	bool memset = false;

	/*
	 * If the record and any nested records contain more than 16 bytes
	 * of data that can be zero initialised, we'll just memset the whole
	 * thing.
	 */

	if (zero_fill_size > 16) {
		prv_rec_memset_zero(p, type, mem_reg, loc, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		memset = true;
	}

	prv_rec_type_zero(p, type, mem_reg, loc, memset, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %rbp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
cmpq $0x11, %r8
jb 0x45c00
movq %r12, %rdi
callq 0x2fee3
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %rcx
movq %rbx, %r8
callq 0x309e8
cmpl $0x0, (%rbx)
je 0x45c00
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r8d, %r8d
cmpq $0x11, %rbp
setae %r8b
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x45a7e
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/rec_type.c
// Function: subtilis_rec_type_zero
void subtilis_rec_type_zero(subtilis_parser_t *p, const subtilis_type_t *type,
			    size_t mem_reg, size_t loc, bool push,
			    subtilis_error_t *err)
{
	size_t zfs = subtilis_type_rec_zero_fill_size(type);

	if (subtilis_type_rec_size(type) - zfs < 16) {
		subtilis_rec_type_zero_body(p, type, mem_reg, loc, zfs, err);
	} else {
		mem_reg = subtilis_reference_get_pointer(p, mem_reg, loc, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		loc = 0;
		subtilis_builtin_ir_rec_zero(p, type, mem_reg, err);
	}
	if (err->type != SUBTILIS_ERROR_OK)
		return;

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbp
movl %r8d, 0xc(%rsp)
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r13
movq %rsi, %rdi
callq 0x30088
movq %rax, %r15
movq %r14, %rdi
callq 0x2fee3
subq %r15, %rax
movq %r13, %rdi
cmpq $0xf, %rax
ja 0x45c89
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, 0x10(%rsp)
movq %r12, %rcx
movq %r15, %r8
movq %rbp, %r9
callq 0x45bad
jmp 0x45cba
movq %rbx, %rsi
movq %r12, %rdx
movq %rbp, %rcx
callq 0x4d71f
cmpl $0x0, (%rbp)
jne 0x45cfc
movq %rax, %rbx
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq %rbp, %rcx
callq 0x34a1a
movq $0x0, 0x10(%rsp)
cmpl $0x0, (%rbp)
setne %al
movl 0xc(%rsp), %ecx
xorb $0x1, %cl
orb %al, %cl
jne 0x45cfc
movq %r14, %rdi
callq 0x30171
testb %al, %al
je 0x45cfc
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq 0x10(%rsp), %rcx
movq %rbp, %r8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4d4a6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/rec_type.c
// Function: subtilis_rec_type_copy
void subtilis_rec_type_copy(subtilis_parser_t *p, const subtilis_type_t *type,
			    size_t dest_reg, size_t loc, size_t src_reg,
			    bool new_rec, subtilis_error_t *err)
{
	size_t zfs;
	subtilis_ir_operand_t op1;
	subtilis_ir_operand_t op2;

	zfs = subtilis_type_rec_zero_fill_size(type);
	if (subtilis_type_rec_is_scalar(type) && (zfs > 16)) {
		prv_memcpy_struct(p, type, dest_reg, loc, src_reg, err);
		return;
	}

	if (subtilis_type_rec_size(type) - zfs < 16) {
		subtilis_type_rec_copy_ref(p, type, dest_reg, loc, src_reg,
					   new_rec, err);
	} else {
		op1.reg = dest_reg;
		op2.integer = loc;
		dest_reg = subtilis_ir_section_add_instr(
		    p->current, SUBTILIS_OP_INSTR_ADDI_I32, op1, op2, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		subtilis_builtin_ir_rec_copy(p, type, dest_reg, src_reg,
					     new_rec, err);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, 0x14(%rsp)
movq %r8, 0x18(%rsp)
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movq 0x60(%rsp), %rbp
movq %rsi, %rdi
callq 0x30088
movq %rax, %rbx
movq %r15, %rdi
callq 0x2ff1c
cmpq $0x11, %rbx
setae %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x4601f
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq 0x18(%rsp), %r8
movq %rbp, %r9
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x46137
movq %r14, 0x20(%rsp)
movq %r15, %rdi
callq 0x2fee3
subq %rbx, %rax
cmpq $0xf, %rax
ja 0x46059
movq %rbp, (%rsp)
movzbl 0x14(%rsp), %r9d
movq %r13, %rdi
movq %r15, %rsi
movq 0x20(%rsp), %rdx
movq %r12, %rcx
movq 0x18(%rsp), %r8
callq 0x45d0b
jmp 0x4607d
movq 0x48(%r13), %rdi
movl %r12d, %ecx
movl $0x9, %esi
movq 0x20(%rsp), %rdx
movq %rbp, %r8
callq 0x2bc8f
cmpl $0x0, (%rbp)
movq 0x18(%rsp), %rcx
je 0x4608c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl 0x14(%rsp), %r8d
movq %r13, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %rbp, %r9
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34ba2
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/rec_type.c
// Function: subtilis_rec_type_tmp_copy
void subtilis_rec_type_tmp_copy(subtilis_parser_t *p,
				const subtilis_type_t *type, size_t dest_reg,
				size_t loc, size_t src_reg,
				subtilis_error_t *err)
{
	if (subtilis_type_rec_is_scalar(type) &&
	    subtilis_type_rec_zero_fill_size(type) <= 16)
		subtilis_type_rec_copy_ref(p, type, dest_reg, loc, src_reg,
					   true, err);
	else
		prv_memcpy_struct(p, type, dest_reg, loc, src_reg, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movq %rsi, %rdi
callq 0x2ff1c
testb %al, %al
je 0x46115
movq %r13, %rdi
callq 0x30088
cmpq $0x10, %rax
ja 0x46115
movq %r15, (%rsp)
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %rbx, %r8
movl $0x1, %r9d
callq 0x45d0b
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 %r14, %rcx
movq %rbx, %r8
movq %r15, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x46137
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/rec_type.c
// Function: prv_memcpy_struct
static void prv_memcpy_struct(subtilis_parser_t *p, const subtilis_type_t *type,
			      size_t dest_reg, size_t loc, size_t src_reg,
			      subtilis_error_t *err)
{
	subtilis_ir_operand_t op;
	size_t size_reg;

	dest_reg = subtilis_reference_get_pointer(p, dest_reg, loc, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	op.integer = subtilis_type_rec_size(type);
	size_reg = subtilis_ir_section_add_instr2(
	    p->current, SUBTILIS_OP_INSTR_MOVI_I32, op, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_reference_type_memcpy_dest(p, dest_reg, src_reg, size_reg,
					    err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %rbx
movq %r8, %r14
movq %rsi, %r13
movq %rdi, %r15
movq %rdx, %rsi
movq %rcx, %rdx
movq %r9, %rcx
callq 0x4d71f
cmpl $0x0, (%rbx)
jne 0x46182
movq %rax, %r12
movq %r13, %rdi
callq 0x2fee3
movq 0x48(%r15), %rdi
movl %eax, %edx
movl $0x1b, %esi
movq %rbx, %rcx
callq 0x2be09
cmpl $0x0, (%rbx)
je 0x4618c
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rax, %rcx
movq %rbx, %r8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4d7ec
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/rec_type.c
// Function: prv_make_ref_fn_name
static char *prv_make_ref_fn_name(const subtilis_type_t *type, const char *base,
				  subtilis_error_t *err)
{
	char *fn_name;
	int name_len;
	const subtilis_type_rec_t *rec = &type->params.rec;

	name_len = strlen(rec->name);
	fn_name = malloc(name_len + 1 + 1 + strlen(base));
	if (!fn_name) {
		subtilis_error_set_oom(err);
		return NULL;
	}
	fn_name[0] = '_';
	strcpy(&fn_name[1], rec->name);
	strcpy(&fn_name[name_len + 1], base);

	return fn_name;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r12
callq 0x120f0
movq %rax, %r14
shlq $0x20, %r14
movabsq $0x200000000, %r15      # imm = 0x200000000
addq %r14, %r15
sarq $0x20, %r15
movq %rbx, %rdi
callq 0x120f0
addq %rax, %r15
movq %r15, %rdi
callq 0x121d0
movq %rax, %r15
testq %rax, %rax
je 0x46234
movb $0x5f, (%r15)
leaq 0x1(%r15), %rdi
movq %r12, %rsi
callq 0x12070
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %r14
sarq $0x20, %r14
addq %r15, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x12070
jmp 0x4624d
leaq 0x2f830(%rip), %rdx     # 0x75a6b
movq %r13, %rdi
movl $0x1, %esi
movl $0x171, %ecx            # imm = 0x171
callq 0x145a4
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/rec_type.c
// Function: subtilis_rec_type_deref
void subtilis_rec_type_deref(subtilis_parser_t *p, const subtilis_type_t *type,
			     size_t mem_reg, size_t loc, subtilis_error_t *err)
{
	size_t base_reg;

	if (!subtilis_type_rec_need_deref(type))
		return;

	base_reg = subtilis_reference_get_pointer(p, mem_reg, loc, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	subtilis_builtin_call_ir_rec_deref(p, type, base_reg, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x30171
testb %al, %al
je 0x462a7
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x4d71f
cmpl $0x0, (%rbx)
je 0x462b1
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 0x348a0
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/rec_type.c
// Function: subtilis_rec_type_ref
void subtilis_rec_type_ref(subtilis_parser_t *p, const subtilis_type_t *type,
			   size_t mem_reg, size_t loc, subtilis_error_t *err)
{
	if (subtilis_type_rec_need_ref_fn(type)) {
		mem_reg = subtilis_reference_get_pointer(p, mem_reg, loc, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;

		subtilis_builtin_call_ir_rec_ref(p, type, mem_reg, err);
		return;
	}
	subtilis_rec_type_ref_gen(p, type, mem_reg, loc, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x300f8
testb %al, %al
je 0x4630f
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x4d71f
cmpl $0x0, (%rbx)
je 0x4632c
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq %rbx, %r8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x46346
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3491d
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/rec_type.c
// Function: subtilis_rec_type_ref_gen
void subtilis_rec_type_ref_gen(subtilis_parser_t *p,
			       const subtilis_type_t *type, size_t mem_reg,
			       size_t loc, subtilis_error_t *err)
{
	bool check_size;
	size_t i;
	size_t offset;
	subtilis_type_t *field;
	const subtilis_type_rec_t *rec = &type->params.rec;

	for (i = 0; i < rec->num_fields; i++) {
		field = &rec->field_types[i];

		if (!subtilis_type_if_is_reference(field) &&
		    (field->type != SUBTILIS_TYPE_REC))
			continue;

		offset = loc + subtilis_type_rec_field_offset_id(rec, i);
		if (subtilis_type_if_is_reference(field)) {
			check_size = !subtilis_type_if_is_array(field);
			subtilis_reference_type_ref(p, mem_reg, offset,
						    check_size, err);
		} else {
			subtilis_rec_type_ref(p, field, mem_reg, offset, err);
		}
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x20(%rsp)
movq %rdx, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x28(%rsi)
je 0x46413
movq %r8, %rbx
movq %rsi, %r12
leaq 0x8(%rsi), %rax
movq %rax, 0x18(%rsp)
xorl %ebp, %ebp
xorl %r14d, %r14d
movq 0x18(%r12), %r15
addq %rbp, %r15
movq %r15, %rdi
callq 0x376f1
testb %al, %al
jne 0x4639c
cmpl $0x16, (%r15)
jne 0x463fe
movq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x2fe6a
movl %eax, %r13d
addq 0x20(%rsp), %r13
movq %r15, %rdi
callq 0x376f1
testb %al, %al
je 0x463e1
movq %r15, %rdi
callq 0x376b5
xorb $0x1, %al
movzbl %al, %ecx
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
movq %rbx, %r8
callq 0x4d349
jmp 0x463f9
movq 0x8(%rsp), %rdi
movq %r15, %rsi
movq 0x10(%rsp), %rdx
movq %r13, %rcx
movq %rbx, %r8
callq 0x462cb
cmpl $0x0, (%rbx)
jne 0x46413
incq %r14
addq $0x148, %rbp            # imm = 0x148
cmpq 0x28(%r12), %r14
jb 0x46382
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/rec_type.c
// Function: subtilis_rec_type_copy_ret
void subtilis_rec_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_rec_type_tmp_copy(p, t, dest_reg, 0, source_reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (!subtilis_type_rec_need_deref(t))
		return;

	/*
	 * It's important that this comes last as the reference we're
	 * copying might be left on the stack of a previous function.
	 * We don't want to overwrite the data before we've copied it.
	 */

	subtilis_reference_push_ref(p, t, dest_reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_reference_inc_cleanup_stack(p, t, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r8
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
xorl %ecx, %ecx
movq %rbx, %r9
callq 0x460b1
cmpl $0x0, (%rbx)
jne 0x4646a
movq %r14, %rdi
callq 0x30171
testb %al, %al
je 0x4646a
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x4cfe9
cmpl $0x0, (%rbx)
je 0x46476
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4d28c
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/rec_type.c
// Function: subtilis_rec_type_assign_to_reg
void subtilis_rec_type_assign_to_reg(subtilis_parser_t *p, size_t reg,
				     subtilis_exp_t *e, subtilis_error_t *err)
{
	subtilis_ir_operand_t op0;
	bool ref_needed = subtilis_type_rec_need_deref(&e->type);

	op0.reg = reg;
	subtilis_ir_section_add_instr_no_reg2(p->current, SUBTILIS_OP_INSTR_MOV,
					      op0, e->exp.ir_op, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	if (ref_needed)
		subtilis_rec_type_ref(p, &e->type, reg, 0, err);

cleanup:
	subtilis_exp_delete(e);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq %rdx, %rdi
callq 0x30171
movl %eax, %ebp
movq 0x48(%r12), %rdi
movq 0x148(%rbx), %rcx
movl $0x1d, %esi
movq %r15, %rdx
movq %r14, %r8
callq 0x2be2c
cmpl $0x0, (%r14)
sete %al
andb %bpl, %al
cmpb $0x1, %al
jne 0x464ea
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
movq %r14, %r8
callq 0x462cb
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2b166
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/string_type_if.c
// Function: prv_exp_to_var_const
static subtilis_exp_t *prv_exp_to_var_const(subtilis_parser_t *p,
					    subtilis_exp_t *e,
					    subtilis_error_t *err)
{
	size_t reg;
	const subtilis_symbol_t *s;
	subtilis_type_t type;

	subtilis_string_init_type(p, &type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto free_e;

	s = subtilis_symbol_table_insert_tmp(p->local_st, &type, NULL, err);
	subtilis_type_free(&type);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_string_type_new_ref(p, &e->type, SUBTILIS_IR_REG_LOCAL, s->loc,
				     e, err);
	e = NULL;
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	reg = subtilis_reference_get_pointer(p, SUBTILIS_IR_REG_LOCAL, s->loc,
					     err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	return subtilis_exp_new_var(&s->t, reg, err);

cleanup:
	subtilis_type_free(&type);

free_e:

	subtilis_exp_delete(e);

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %rsi
callq 0x481e0
cmpl $0x0, (%rbx)
jne 0x46b0e
movq 0x68(%r15), %rdi
leaq 0x8(%rsp), %r13
movq %r13, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x2e6f1
movq %rax, %r12
movq %r13, %rdi
callq 0x2f56e
cmpl $0x0, (%rbx)
jne 0x46b04
movq (%r12), %rcx
movl $0x2, %edx
movq %r15, %rdi
movq %r14, %rsi
movq %r14, %r8
movq %rbx, %r9
callq 0x48e65
cmpl $0x0, (%rbx)
je 0x46b29
xorl %r14d, %r14d
leaq 0x8(%rsp), %rdi
callq 0x2f56e
movq %r14, %rdi
callq 0x2b166
xorl %eax, %eax
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq (%r12), %rdx
movl $0x2, %esi
movq %r15, %rdi
movq %rbx, %rcx
callq 0x4d71f
cmpl $0x0, (%rbx)
jne 0x46b16
addq $0x8, %r12
movq %r12, %rdi
movl %eax, %esi
movq %rbx, %rdx
callq 0x2b5fb
jmp 0x46b18
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/string_type_if.c
// Function: prv_dup_const
static void prv_dup_const(subtilis_exp_t *e1, subtilis_exp_t *e2,
			  subtilis_error_t *err)
{
	subtilis_buffer_init(&e2->exp.str, e1->exp.str.granularity);
	subtilis_buffer_append(&e2->exp.str,
			       subtilis_buffer_get_string(&e1->exp.str),
			       subtilis_buffer_get_size(&e1->exp.str), err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl $0x148, %r14d           # imm = 0x148
leaq (%rsi,%r14), %r15
addq %rdi, %r14
movq 0x148(%rdi), %rsi
movq %r15, %rdi
callq 0x149f4
movq %r14, %rdi
callq 0x14db1
movq %rax, %r12
movq %r14, %rdi
callq 0x14b57
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x14ae8
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/string_type_if.c
// Function: prv_coerce_type_const
static subtilis_exp_t *prv_coerce_type_const(subtilis_parser_t *p,
					     subtilis_exp_t *e,
					     const subtilis_type_t *type,
					     subtilis_error_t *err)
{
	if (type->type != SUBTILIS_TYPE_STRING) {
		subtilis_error_set_bad_conversion(
		    err, subtilis_type_name(&e->type), subtilis_type_name(type),
		    p->l->stream->name, p->l->line);
		subtilis_exp_delete(e);
		return NULL;
	}

	return prv_exp_to_var_const(p, e, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rsi, %rbx
movq %rdi, %r15
cmpl $0x7, (%rdx)
jne 0x46bf1
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x46a94
movq %rdx, %r12
movq %rbx, %rdi
callq 0x2f5ad
movq %rax, %r13
movq %r12, %rdi
callq 0x2f5ad
movq (%r15), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x2eead(%rip), %r10     # 0x75ac6
movq %r14, %rdi
movl $0x45, %esi
movq %r13, %rdx
movq %rax, %rcx
pushq $0x4f
pushq %r10
callq 0x143da
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x2b166
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/string_type_if.c
// Function: prv_add_const
static subtilis_exp_t *prv_add_const(subtilis_parser_t *p, subtilis_exp_t *a1,
				     subtilis_exp_t *a2, bool swapped,
				     subtilis_error_t *err)
{
	size_t len;

	len = subtilis_buffer_get_size(&a2->exp.str);
	subtilis_buffer_remove_terminator(&a1->exp.str);
	subtilis_buffer_append(&a1->exp.str, a2->exp.str.buffer->data, len,
			       err);
	subtilis_exp_delete(a2);
	if (err->type != SUBTILIS_ERROR_OK) {
		subtilis_exp_delete(a1);
		return NULL;
	}
	return a1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %r14
movq %rdx, %r15
movq %rsi, %rbx
movl $0x148, %r12d           # imm = 0x148
leaq (%rdx,%r12), %rdi
callq 0x14b57
movq %rax, %r13
addq %rbx, %r12
movq %r12, %rdi
callq 0x14d35
movq 0x150(%r15), %rsi
addq $0x18, %rsi
movq %r12, %rdi
movq %r13, %rdx
movq %r14, %rcx
callq 0x14ae8
movq %r15, %rdi
callq 0x2b166
cmpl $0x0, (%r14)
je 0x46ca8
movq %rbx, %rdi
callq 0x2b166
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/string_type_if.c
// Function: prv_eq_const
static subtilis_exp_t *prv_eq_const(subtilis_parser_t *p, subtilis_exp_t *a1,
				    subtilis_exp_t *a2, subtilis_error_t *err)
{
	int32_t res;

	/* a2 must be const */

	switch (a2->type.type) {
	case SUBTILIS_TYPE_CONST_STRING:
		res = strcmp(subtilis_buffer_get_string(&a1->exp.str),
			     subtilis_buffer_get_string(&a2->exp.str)) == 0
			  ? -1
			  : 0;
		subtilis_buffer_free(&a1->exp.str);
		a1->exp.ir_op.integer = res;
		a1->type.type = SUBTILIS_TYPE_CONST_INTEGER;
		break;
	default:
		subtilis_exp_delete(a1);
		subtilis_exp_delete(a2);
		subtilis_error_set_bad_expression(err, p->l->stream->name,
						  p->l->line);
		return NULL;
	}

	subtilis_exp_delete(a2);
	return a1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
cmpl $0x3, (%rdx)
jne 0x46d1b
movl $0x148, %r15d           # imm = 0x148
leaq (%rbx,%r15), %r12
movq %r12, %rdi
callq 0x14db1
movq %rax, %r13
addq %r14, %r15
movq %r15, %rdi
callq 0x14db1
movq %r13, %rdi
movq %rax, %rsi
callq 0x12160
xorl %ebp, %ebp
cmpl $0x1, %eax
sbbl %ebp, %ebp
movq %r12, %rdi
callq 0x14d5c
movl %ebp, 0x148(%rbx)
movl $0x1, (%rbx)
movq %r14, %rdi
callq 0x2b166
jmp 0x46d58
movq %rcx, %r15
movq %rdi, %r12
movq %rbx, %rdi
callq 0x2b166
movq %r14, %rdi
callq 0x2b166
movq (%r12), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2ed83(%rip), %r8      # 0x75ac6
movq %r15, %rdi
movl $0x19, %esi
movl $0x8f, %r9d
callq 0x145c8
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/string_type_if.c
// Function: prv_gt_const
static subtilis_exp_t *prv_gt_const(subtilis_parser_t *p, subtilis_exp_t *a1,
				    subtilis_exp_t *a2, bool swapped,
				    subtilis_error_t *err)
{
	int res;

	/* a2 must be const */

	switch (a2->type.type) {
	case SUBTILIS_TYPE_CONST_STRING:
		res = strcmp(subtilis_buffer_get_string(&a1->exp.str),
			     subtilis_buffer_get_string(&a2->exp.str)) > 0
			  ? -1
			  : 0;
		subtilis_buffer_free(&a1->exp.str);
		a1->exp.ir_op.integer = res;
		a1->type.type = SUBTILIS_TYPE_CONST_INTEGER;
		break;
	default:
		subtilis_exp_delete(a1);
		subtilis_exp_delete(a2);
		subtilis_error_set_bad_expression(err, p->l->stream->name,
						  p->l->line);
		return NULL;
	}

	subtilis_exp_delete(a2);
	return a1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
cmpl $0x3, (%rdx)
jne 0x46e87
movl $0x148, %r15d           # imm = 0x148
leaq (%rbx,%r15), %r12
movq %r12, %rdi
callq 0x14db1
movq %rax, %r13
addq %r14, %r15
movq %r15, %rdi
callq 0x14db1
movq %r13, %rdi
movq %rax, %rsi
callq 0x12160
xorl %ebp, %ebp
testl %eax, %eax
setg %bpl
negl %ebp
movq %r12, %rdi
callq 0x14d5c
movl %ebp, 0x148(%rbx)
movl $0x1, (%rbx)
movq %r14, %rdi
callq 0x2b166
jmp 0x46ec4
movq %r8, %r15
movq %rdi, %r12
movq %rbx, %rdi
callq 0x2b166
movq %r14, %rdi
callq 0x2b166
movq (%r12), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2ec17(%rip), %r8      # 0x75ac6
movq %r15, %rdi
movl $0x19, %esi
movl $0xca, %r9d
callq 0x145c8
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/string_type_if.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)
{
	if (gran) {
		subtilis_error_set_too_many_args(err, 3, 2, p->l->stream->name,
						 p->l->line);
		subtilis_exp_delete(gran);
		subtilis_exp_delete(a2);
		subtilis_exp_delete(a1);
		return;
	}
	subtilis_string_type_add_eq(p, a1->exp.ir_op.reg, 0, a2, err);
	subtilis_exp_delete(a1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
testq %rcx, %rcx
je 0x471d9
movq %rcx, %r15
movq (%rdi), %rcx
movq 0x30(%rcx), %rax
movl 0x38(%rcx), %r9d
leaq 0x2e924(%rip), %r10     # 0x75ac6
movq %r8, %rdi
movl $0x29, %esi
movl $0x3, %edx
movl $0x2, %ecx
movq %rax, %r8
pushq $0x1c9                  # imm = 0x1C9
pushq %r10
callq 0x14486
addq $0x10, %rsp
movq %r15, %rdi
callq 0x2b166
movq %r14, %rdi
callq 0x2b166
jmp 0x471ea
movq 0x148(%rbx), %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x4bec6
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2b166
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/string_type_if.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)
{
	size_t reg;

	if (loc > 0) {
		reg = subtilis_reference_get_pointer(p, mem_reg, loc, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return NULL;
	} else {
		reg = mem_reg;
	}

	return subtilis_exp_new_var(&subtilis_type_string, reg, err);
}

// Assembly:
pushq %rbx
movq %r8, %rbx
movq %rdx, %rsi
testq %rcx, %rcx
je 0x4721a
movq %rcx, %rdx
movq %rbx, %rcx
callq 0x4d71f
cmpl $0x0, (%rbx)
je 0x47217
xorl %eax, %eax
popq %rbx
retq
movq %rax, %rsi
leaq 0x2d987(%rip), %rdi     # 0x74ba8
movq %rbx, %rdx
popq %rbx
jmp 0x2b5fb
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/string_type_if.c
// Function: prv_compare_fixed_len
static subtilis_exp_t *prv_compare_fixed_len(subtilis_parser_t *p, size_t a1,
					     size_t a2,
					     subtilis_op_instr_type_t iload,
					     subtilis_op_instr_type_t icmp,
					     subtilis_error_t *err)
{
	subtilis_ir_operand_t a1_ptr;
	subtilis_ir_operand_t a2_ptr;
	subtilis_ir_operand_t offset;
	subtilis_ir_operand_t op0;

	offset.integer = 0;
	op0.reg = a1;
	a1_ptr.reg =
	    subtilis_ir_section_add_instr(p->current, iload, op0, offset, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	op0.reg = a2;
	a2_ptr.reg =
	    subtilis_ir_section_add_instr(p->current, iload, op0, offset, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	a1 = subtilis_ir_section_add_instr(p->current, icmp, a1_ptr, a2_ptr,
					   err);
	return subtilis_exp_new_var(&subtilis_type_integer, a1, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %rdx
movq %rdi, %r14
movq 0x48(%rdi), %rdi
movl %ecx, %esi
xorl %ecx, %ecx
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x47e86
movq %rax, %r15
movq 0x48(%r14), %rdi
movl %ebp, %esi
movq %r12, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
je 0x47e91
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x48(%r14), %rdi
movl $0x2b, %esi
movq %r15, %rdx
movq %rax, %rcx
movq %rbx, %r8
callq 0x2bc8f
leaq 0x2ca69(%rip), %rdi     # 0x74918
movl %eax, %esi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2b5fb