LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/string_type.c
// Function: subtilis_string_lca_const_zt
subtilis_exp_t *subtilis_string_lca_const_zt(subtilis_parser_t *p,
					     subtilis_exp_t *e,
					     subtilis_error_t *err)
{
	size_t reg;
	subtilis_exp_t *ret_val = NULL;

	subtilis_buffer_zero_terminate(&e->exp.str, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	reg = subtilis_string_type_lca_const(
	    p, subtilis_buffer_get_string(&e->exp.str),
	    subtilis_buffer_get_size(&e->exp.str), err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	ret_val = subtilis_exp_new_int32_var(reg, err);

cleanup:

	subtilis_exp_delete(e);

	return ret_val;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x148(%rsi), %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0x14d4b
cmpl $0x0, (%r14)
jne 0x48770
movq %r12, %rdi
callq 0x14dfb
movq %rax, %r13
movq %r12, %rdi
callq 0x14ba1
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0x48267
cmpl $0x0, (%r14)
je 0x48788
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x2b4c3
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl %eax, %edi
movq %r14, %rsi
callq 0x2ba99
movq %rax, %r14
jmp 0x48773
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/string_type.c
// Function: prv_init_string_from_const
static void prv_init_string_from_const(subtilis_parser_t *p, size_t mem_reg,
				       size_t loc, const subtilis_buffer_t *str,
				       bool push, subtilis_error_t *err)
{
	size_t id;
	size_t src_reg;
	subtilis_ir_operand_t op1;
	subtilis_exp_t *sizee = NULL;
	size_t buf_size = subtilis_buffer_get_size(str);

	if (buf_size == 1) {
		subtilis_string_type_zero_ref(p, &subtilis_type_string, mem_reg,
					      loc, push, err);
		return;
	}

	buf_size--;
	id = prv_add_string_constant(p, subtilis_buffer_get_string(str),
				     buf_size, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	sizee = subtilis_exp_new_int32((int32_t)buf_size, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

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

	op1.integer = (int32_t)id;
	src_reg = subtilis_ir_section_add_instr2(
	    p->current, SUBTILIS_OP_INSTR_LCA, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_string_init_from_lca(p, mem_reg, loc, src_reg,
				      sizee->exp.ir_op.reg, push, err);
cleanup:

	subtilis_exp_delete(sizee);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x10(%rsp)
movl %r8d, %r12d
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbp
movq %rdi, %rbx
movq %rcx, %rdi
callq 0x14ba1
cmpq $0x1, %rax
jne 0x48e21
movzbl %r12b, %r8d
leaq 0x2bd88(%rip), %rsi     # 0x74b88
movq %rbx, %rdi
movq %rbp, %rdx
movq %r15, %rcx
movq 0x10(%rsp), %r9
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4832a
movq %rax, %r13
movq %rbp, 0x18(%rsp)
movq %r15, 0x20(%rsp)
decq %r13
movq %r14, %rdi
callq 0x14dfb
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %rdx
movq 0x10(%rsp), %r15
movq %r15, %rcx
callq 0x4829f
cmpl $0x0, (%r15)
jne 0x48e6c
movq %rax, %rbp
movq %rbx, %r14
movl %r13d, %edi
movq %r15, %rsi
callq 0x2bb29
cmpl $0x0, (%r15)
je 0x48e7b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x36269
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0x48ecf
movq 0x48(%r14), %rdi
movl %ebp, %edx
movl $0x7d, %esi
movq %r15, %rcx
callq 0x2c189
cmpl $0x0, (%r15)
jne 0x48ecf
movq 0x148(%rbx), %r8
movq %r15, (%rsp)
movzbl %r12b, %r9d
movq %r14, %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rax, %rcx
callq 0x4851e
movq %rbx, %rdi
addq $0x28, %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/string_type.c
// Function: subtilis_string_type_new_ref
void subtilis_string_type_new_ref(subtilis_parser_t *p,
				  const subtilis_type_t *type, size_t mem_reg,
				  size_t loc, subtilis_exp_t *e,
				  subtilis_error_t *err)
{
	switch (e->type.type) {
	case SUBTILIS_TYPE_STRING:
		subtilis_reference_type_new_ref(p, type, mem_reg, loc,
						e->exp.ir_op.reg, true, err);
		break;
	case SUBTILIS_TYPE_CONST_STRING:
		prv_init_string_from_const(p, mem_reg, loc, &e->exp.str, true,
					   err);
		break;
	default:
		subtilis_error_set_string_expected(err, p->l->stream->name,
						   p->l->line);
		break;
	}

	subtilis_exp_delete(e);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movl (%r8), %eax
cmpl $0x3, %eax
je 0x48f12
cmpl $0x7, %eax
jne 0x48f2f
movq 0x148(%rbx), %r8
movq %r9, (%rsp)
movl $0x1, %r9d
callq 0x4d541
jmp 0x48f53
leaq 0x148(%rbx), %rax
movq %rdx, %rsi
movq %rcx, %rdx
movq %rax, %rcx
movl $0x1, %r8d
callq 0x48dc5
jmp 0x48f53
movq (%rdi), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2cb5c(%rip), %r8      # 0x75a9c
movq %r9, %rdi
movl $0x49, %esi
movl $0x2a8, %r9d            # imm = 0x2A8
callq 0x14618
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x2b4c3
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/string_type.c
// Function: subtilis_string_type_new_field_ref
void subtilis_string_type_new_field_ref(subtilis_parser_t *p,
					const subtilis_type_t *type,
					size_t mem_reg, size_t loc,
					subtilis_exp_t *e,
					subtilis_error_t *err)
{
	switch (e->type.type) {
	case SUBTILIS_TYPE_STRING:
		subtilis_reference_type_init_ref(
		    p, mem_reg, loc, e->exp.ir_op.reg, true, true, err);
		break;
	case SUBTILIS_TYPE_CONST_STRING:
		prv_init_string_from_const(p, mem_reg, loc, &e->exp.str, false,
					   err);
		break;
	default:
		subtilis_error_set_string_expected(err, p->l->stream->name,
						   p->l->line);
		break;
	}

	subtilis_exp_delete(e);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movl (%r8), %eax
cmpl $0x3, %eax
je 0x48f9c
cmpl $0x7, %eax
jne 0x48fb6
movq 0x148(%rbx), %rax
movq %r9, (%rsp)
movq %rdx, %rsi
movq %rcx, %rdx
movq %rax, %rcx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x4ce10
jmp 0x48fda
leaq 0x148(%rbx), %rax
movq %rdx, %rsi
movq %rcx, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
callq 0x48dc5
jmp 0x48fda
movq (%rdi), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2cad5(%rip), %r8      # 0x75a9c
movq %r9, %rdi
movl $0x49, %esi
movl $0x2c0, %r9d            # imm = 0x2C0
callq 0x14618
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x2b4c3
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/string_type.c
// Function: subtilis_string_type_assign_ref
void subtilis_string_type_assign_ref(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_reference_type_deref(p, mem_reg, loc, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_string_type_assign_new_ref(p, type, mem_reg, loc, e, err);
	return;
cleanup:

	subtilis_exp_delete(e);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %r13
movq %rdx, %rsi
movq %rcx, %rdx
movq %r9, %rcx
callq 0x4db70
cmpl $0x0, (%rbx)
je 0x490aa
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2b4c3
movq %r13, %rdi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x48fe7
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/string_type.c
// Function: subtilis_string_type_assign_no_rc
void subtilis_string_type_assign_no_rc(subtilis_parser_t *p,
				       const subtilis_type_t *type,
				       size_t mem_reg, size_t loc,
				       subtilis_exp_t *e, subtilis_error_t *err)
{
	if (e->type.type != SUBTILIS_TYPE_STRING)
		subtilis_error_set_assertion_failed(err);
	else
		subtilis_reference_type_init_ref(
		    p, mem_reg, loc, e->exp.ir_op.reg, true, false, err);
	subtilis_exp_delete(e);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
cmpl $0x7, (%r8)
jne 0x490f9
movq 0x148(%rbx), %rax
movq %r9, (%rsp)
movq %rdx, %rsi
movq %rcx, %rdx
movq %rax, %rcx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x4ce10
jmp 0x49112
leaq 0x2c99c(%rip), %rdx     # 0x75a9c
movq %r9, %rdi
movl $0xf, %esi
movl $0x2f5, %ecx            # imm = 0x2F5
callq 0x145f4
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x2b4c3
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/string_type.c
// Function: subtilis_string_type_len
subtilis_exp_t *subtilis_string_type_len(subtilis_parser_t *p,
					 subtilis_exp_t *e,
					 subtilis_error_t *err)
{
	subtilis_ir_operand_t offset;
	size_t size;
	int32_t bytes;
	subtilis_exp_t *len = NULL;

	switch (e->type.type) {
	case SUBTILIS_TYPE_STRING:
		offset.integer = SUBTIILIS_STRING_SIZE_OFF;
		size = subtilis_ir_section_add_instr(
		    p->current, SUBTILIS_OP_INSTR_LOADO_I32, e->exp.ir_op,
		    offset, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
		len = subtilis_exp_new_int32_var(size, err);
		break;
	case SUBTILIS_TYPE_CONST_STRING:
		bytes = (int32_t)subtilis_buffer_get_size(&e->exp.str);
		if (bytes > 0)
			bytes--;
		len = subtilis_exp_new_int32(bytes, err);
		break;
	default:
		subtilis_error_set_string_expected(err, p->l->stream->name,
						   p->l->line);
		break;
	}

cleanup:

	subtilis_exp_delete(e);

	return len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movl (%rsi), %eax
cmpl $0x3, %eax
je 0x49172
cmpl $0x7, %eax
jne 0x49196
movq 0x48(%rdi), %rdi
movq 0x148(%rbx), %rdx
xorl %r15d, %r15d
movl $0x12, %esi
xorl %ecx, %ecx
movq %r14, %r8
callq 0x2c00f
cmpl $0x0, (%r14)
jne 0x491bd
movl %eax, %edi
movq %r14, %rsi
callq 0x2ba99
jmp 0x49191
leaq 0x148(%rbx), %rdi
callq 0x14ba1
xorl %ecx, %ecx
testl %eax, %eax
setg %cl
subl %ecx, %eax
movl %eax, %edi
movq %r14, %rsi
callq 0x2bb29
movq %rax, %r15
jmp 0x491bd
movq (%rdi), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2c8f5(%rip), %r8      # 0x75a9c
movq %r14, %rdi
movl $0x49, %esi
movl $0x31e, %r9d            # imm = 0x31E
callq 0x14618
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x2b4c3
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/string_type.c
// Function: subtilis_string_type_asc
subtilis_exp_t *subtilis_string_type_asc(subtilis_parser_t *p,
					 subtilis_exp_t *e,
					 subtilis_error_t *err)
{
	int32_t byte;
	int32_t bytes;
	size_t start;
	subtilis_exp_t *retval = NULL;

	switch (e->type.type) {
	case SUBTILIS_TYPE_STRING:
		retval = prv_asc_var(p, e->exp.ir_op, err);
		break;
	case SUBTILIS_TYPE_CONST_STRING:
		bytes = (int32_t)subtilis_buffer_get_size(&e->exp.str);
		if (bytes <= 1) {
			byte = -1;
		} else {
			start = e->exp.str.buffer->start;
			byte = e->exp.str.buffer->data[start];
		}
		retval = subtilis_exp_new_int32(byte, err);
		break;
	default:
		subtilis_error_set_string_expected(err, p->l->stream->name,
						   p->l->line);
		break;
	}

	subtilis_exp_delete(e);

	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movl (%rsi), %eax
cmpl $0x3, %eax
je 0x49313
movq %rdi, %r15
cmpl $0x7, %eax
jne 0x49346
movq 0x148(%rbx), %r13
movq 0x48(%r15), %rdi
xorl %ebp, %ebp
movl $0x12, %esi
movq %r13, %rdx
xorl %ecx, %ecx
movq %r14, %r8
callq 0x2c00f
cmpl $0x0, (%r14)
jne 0x4936c
movq %rax, %r12
movq 0x48(%r15), %rdi
callq 0x2d00a
movq %rax, %rbp
movq 0x48(%r15), %rdi
callq 0x2d00a
movq %rax, 0x10(%rsp)
movq 0x48(%r15), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1b, %esi
movq %r14, %rcx
callq 0x2c189
cmpl $0x0, (%r14)
jne 0x4936a
movq %rax, 0x8(%rsp)
movq 0x48(%r15), %rdi
movl $0x43, %esi
movq %r12, %rdx
movq 0x10(%rsp), %rcx
movq %rbp, %r8
movq %r14, %r9
callq 0x2c0c2
cmpl $0x0, (%r14)
jne 0x4936a
movq %rbp, %r12
movq 0x48(%r15), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
callq 0x2d017
cmpl $0x0, (%r14)
jne 0x4936a
movq 0x48(%r15), %rdi
movl $0x4, %ecx
movl $0x12, %esi
movq %r13, %rdx
movq %r14, %r8
callq 0x2c00f
cmpl $0x0, (%r14)
jne 0x4936a
movq 0x48(%r15), %rdi
xorl %ebp, %ebp
movl $0x11, %esi
movq 0x8(%rsp), %rdx
movq %rax, %rcx
xorl %r8d, %r8d
movq %r14, %r9
callq 0x2c0c2
cmpl $0x0, (%r14)
jne 0x4936c
movq 0x48(%r15), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2d017
cmpl $0x0, (%r14)
jne 0x4936a
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x2ba99
jmp 0x49341
leaq 0x148(%rbx), %rdi
callq 0x14ba1
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
cmpl $0x2, %eax
jl 0x49339
movq 0x150(%rbx), %rax
movq 0x8(%rax), %rcx
movzbl 0x18(%rax,%rcx), %edi
movq %r14, %rsi
callq 0x2bb29
movq %rax, %rbp
jmp 0x4936c
movq (%r15), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2c745(%rip), %r8      # 0x75a9c
movq %r14, %rdi
movl $0x49, %esi
movl $0x379, %r9d            # imm = 0x379
callq 0x14618
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x2b4c3
movq %rbp, %rax
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/string_type.c
// Function: subtilis_string_type_print
void subtilis_string_type_print(subtilis_parser_t *p, subtilis_exp_t *e,
				subtilis_error_t *err)
{
	subtilis_ir_operand_t zero;
	subtilis_ir_operand_t gtzero;
	subtilis_ir_operand_t offset;
	subtilis_ir_operand_t str;
	subtilis_ir_operand_t size;

	offset.integer = SUBTIILIS_STRING_SIZE_OFF;
	size.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_LOADO_I32, e->exp.ir_op, offset, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	zero.label = subtilis_ir_section_new_label(p->current);
	gtzero.label = subtilis_ir_section_new_label(p->current);
	subtilis_ir_section_add_instr_reg(p->current, SUBTILIS_OP_INSTR_JMPC,
					  size, gtzero, zero, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_ir_section_add_label(p->current, gtzero.label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	offset.integer = SUBTIILIS_STRING_DATA_OFF;
	str.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_LOADO_I32, e->exp.ir_op, offset, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_ir_section_add_instr_no_reg2(
	    p->current, SUBTILIS_OP_INSTR_PRINT_STR, str, size, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_ir_section_add_label(p->current, zero.label, err);

cleanup:

	subtilis_exp_delete(e);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq 0x48(%rdi), %rdi
movq 0x148(%rsi), %rdx
movl $0x12, %esi
xorl %ecx, %ecx
movq %r14, %r8
callq 0x2c00f
cmpl $0x0, (%r14)
jne 0x4945d
movq %rax, %r13
movq 0x48(%r15), %rdi
callq 0x2d00a
movq %rax, %r12
movq 0x48(%r15), %rdi
callq 0x2d00a
movq %rax, %rbp
movq 0x48(%r15), %rdi
movl $0x43, %esi
movq %r13, %rdx
movq %rax, %rcx
movq %r12, %r8
movq %r14, %r9
callq 0x2c0c2
cmpl $0x0, (%r14)
jne 0x4945d
movq 0x48(%r15), %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x2d017
cmpl $0x0, (%r14)
jne 0x4945d
movq 0x48(%r15), %rdi
movq 0x148(%rbx), %rdx
movl $0x4, %ecx
movl $0x12, %esi
movq %r14, %r8
callq 0x2c00f
cmpl $0x0, (%r14)
jne 0x4945d
movq 0x48(%r15), %rdi
movl $0x1f, %esi
movq %rax, %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x2c1ac
cmpl $0x0, (%r14)
jne 0x4945d
movq 0x48(%r15), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2d017
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/string_type.c
// Function: subtilis_string_type_print_const
void subtilis_string_type_print_const(subtilis_parser_t *p, subtilis_exp_t *e,
				      subtilis_error_t *err)
{
	size_t id;
	subtilis_ir_operand_t op1;
	subtilis_ir_operand_t str;
	size_t buf_size = subtilis_buffer_get_size(&e->exp.str);

	if (buf_size == 1)
		goto cleanup;

	buf_size--;
	id = prv_add_string_constant(p, subtilis_buffer_get_string(&e->exp.str),
				     buf_size, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	op1.integer = (int32_t)id;
	str.reg = subtilis_ir_section_add_instr2(
	    p->current, SUBTILIS_OP_INSTR_LCA, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	op1.integer = buf_size;
	op1.reg = subtilis_ir_section_add_instr2(
	    p->current, SUBTILIS_OP_INSTR_MOVI_I32, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_ir_section_add_instr_no_reg2(
	    p->current, SUBTILIS_OP_INSTR_PRINT_STR, str, op1, err);

cleanup:

	subtilis_exp_delete(e);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x148(%rsi), %r13
movq %r13, %rdi
callq 0x14ba1
cmpq $0x1, %rax
je 0x4950c
movq %rax, %r12
decq %r12
movq %r13, %rdi
callq 0x14dfb
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x4829f
cmpl $0x0, (%r14)
jne 0x4950c
movq 0x48(%r15), %rdi
movl %eax, %edx
movl $0x7d, %esi
movq %r14, %rcx
callq 0x2c189
cmpl $0x0, (%r14)
jne 0x4950c
movq %rax, %r13
movq 0x48(%r15), %rdi
movl %r12d, %edx
movl $0x1b, %esi
movq %r14, %rcx
callq 0x2c189
cmpl $0x0, (%r14)
jne 0x4950c
movq 0x48(%r15), %rdi
movl $0x1f, %esi
movq %r13, %rdx
movq %rax, %rcx
movq %r14, %r8
callq 0x2c1ac
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/string_type.c
// Function: subtilis_string_type_eq
subtilis_exp_t *subtilis_string_type_eq(subtilis_parser_t *p, size_t a_reg,
					size_t b_reg, size_t len,
					subtilis_error_t *err)
{
	subtilis_ir_arg_t *args;
	char *name = NULL;
	static const char memcpy[] = "_memcmp";

	name = malloc(sizeof(memcpy));
	if (!name) {
		subtilis_error_set_oom(err);
		return NULL;
	}
	strcpy(name, memcpy);

	args = malloc(sizeof(*args) * 3);
	if (!args) {
		free(name);
		subtilis_error_set_oom(err);
		return NULL;
	}

	args[0].type = SUBTILIS_IR_REG_TYPE_INTEGER;
	args[0].reg = a_reg;
	args[1].type = SUBTILIS_IR_REG_TYPE_INTEGER;
	args[1].reg = b_reg;
	args[2].type = SUBTILIS_IR_REG_TYPE_INTEGER;
	args[2].reg = len;

	return subtilis_exp_add_call(p, name, SUBTILIS_BUILTINS_MEMCMP, NULL,
				     args, &subtilis_type_integer, 3, true,
				     err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
movl $0x8, %edi
callq 0x121d0
testq %rax, %rax
je 0x495a7
movq %rax, %r12
movabsq $0x706d636d656d5f, %rax # imm = 0x706D636D656D5F
movq %rax, (%r12)
movl $0x48, %edi
callq 0x121d0
testq %rax, %rax
je 0x495bd
xorl %ecx, %ecx
movl %ecx, (%rax)
movq %rbp, 0x8(%rax)
movl %ecx, 0x18(%rax)
movq %r13, 0x20(%rax)
movl %ecx, 0x30(%rax)
movq %r15, 0x38(%rax)
subq $0x8, %rsp
leaq 0x2b371(%rip), %r9      # 0x748f8
movq %r14, %rdi
movq %r12, %rsi
movl $0x3, %edx
xorl %ecx, %ecx
movq %rax, %r8
pushq %rbx
pushq $0x1
pushq $0x3
callq 0x2b507
addq $0x28, %rsp
jmp 0x495e4
leaq 0x2c4ee(%rip), %rdx     # 0x75a9c
movq %rbx, %rdi
movl $0x1, %esi
movl $0x3dd, %ecx            # imm = 0x3DD
jmp 0x495d9
movq %r12, %rdi
callq 0x122c0
leaq 0x2c4d0(%rip), %rdx     # 0x75a9c
movq %rbx, %rdi
movl $0x1, %esi
movl $0x3e5, %ecx            # imm = 0x3E5
callq 0x145f4
xorl %eax, %eax
addq $0x8, %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/string_type.c
// Function: subtilis_string_type_compare
subtilis_exp_t *subtilis_string_type_compare(subtilis_parser_t *p, size_t a_reg,
					     size_t a_len_reg, size_t b_reg,
					     size_t b_len_reg,
					     subtilis_error_t *err)
{
	subtilis_ir_arg_t *args;
	char *name = NULL;
	static const char memcpy[] = "_compare";

	name = malloc(sizeof(memcpy));
	if (!name) {
		subtilis_error_set_oom(err);
		return NULL;
	}
	strcpy(name, memcpy);

	args = malloc(sizeof(*args) * 4);
	if (!args) {
		free(name);
		subtilis_error_set_oom(err);
		return NULL;
	}

	args[0].type = SUBTILIS_IR_REG_TYPE_INTEGER;
	args[0].reg = a_reg;
	args[1].type = SUBTILIS_IR_REG_TYPE_INTEGER;
	args[1].reg = a_len_reg;
	args[2].type = SUBTILIS_IR_REG_TYPE_INTEGER;
	args[2].reg = b_reg;
	args[3].type = SUBTILIS_IR_REG_TYPE_INTEGER;
	args[3].reg = b_len_reg;

	return subtilis_exp_add_call(p, name, SUBTILIS_BUILTINS_COMPARE, NULL,
				     args, &subtilis_type_integer, 4, true,
				     err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r15
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, (%rsp)
movl $0x9, %edi
callq 0x121d0
testq %rax, %rax
je 0x4968c
movq %rax, %r12
movabsq $0x657261706d6f635f, %rax # imm = 0x657261706D6F635F
movq %rax, (%r12)
movb $0x0, 0x8(%r12)
movl $0x60, %edi
callq 0x121d0
testq %rax, %rax
je 0x496a2
xorl %ecx, %ecx
movl %ecx, (%rax)
movq %r14, 0x8(%rax)
movl %ecx, 0x18(%rax)
movq %rbp, 0x20(%rax)
movl %ecx, 0x30(%rax)
movq %r13, 0x38(%rax)
movl %ecx, 0x48(%rax)
movq %r15, 0x50(%rax)
subq $0x8, %rsp
leaq 0x2b28e(%rip), %r9      # 0x748f8
movq 0x8(%rsp), %rdi
movq %r12, %rsi
movl $0x4, %edx
xorl %ecx, %ecx
movq %rax, %r8
pushq %rbx
pushq $0x1
pushq $0x4
callq 0x2b507
addq $0x28, %rsp
jmp 0x496c9
leaq 0x2c409(%rip), %rdx     # 0x75a9c
movq %rbx, %rdi
movl $0x1, %esi
movl $0x400, %ecx            # imm = 0x400
jmp 0x496be
movq %r12, %rdi
callq 0x122c0
leaq 0x2c3eb(%rip), %rdx     # 0x75a9c
movq %rbx, %rdi
movl $0x1, %esi
movl $0x408, %ecx            # imm = 0x408
callq 0x145f4
xorl %eax, %eax
addq $0x8, %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/string_type.c
// Function: prv_left_right_const_str
static subtilis_exp_t *prv_left_right_const_str(subtilis_exp_t *str,
						subtilis_exp_t *len,
						size_t start,
						subtilis_error_t *err)
{
	size_t const_str_len;
	size_t const_int_val;

	const_str_len = subtilis_buffer_get_size(&str->exp.str) - 1;
	const_int_val = len->exp.ir_op.integer;
	if (const_int_val < const_str_len) {
		subtilis_buffer_delete(&str->exp.str, start,
				       const_str_len - const_int_val, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
		subtilis_buffer_zero_terminate(&str->exp.str, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
	}

	subtilis_exp_delete(len);
	return str;

cleanup:

	subtilis_exp_delete(str);
	subtilis_exp_delete(len);

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x148(%rdi), %r12
movq %r12, %rdi
callq 0x14ba1
decq %rax
movslq 0x148(%rbx), %rcx
subq %rcx, %rax
jbe 0x49c1c
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
movq %r15, %rcx
callq 0x14cbb
cmpl $0x0, (%r15)
jne 0x49c11
movq %r12, %rdi
movq %r15, %rsi
callq 0x14d4b
cmpl $0x0, (%r15)
je 0x49c1c
movq %r14, %rdi
callq 0x2b4c3
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x2b4c3
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/string_type.c
// Function: prv_left_right_check_args
static subtilis_exp_t *prv_left_right_check_args(subtilis_parser_t *p,
						 subtilis_exp_t *str,
						 subtilis_exp_t *len,
						 subtilis_exp_t *value,
						 subtilis_error_t *err)
{
	size_t buf_size;

	if (str->type.type != SUBTILIS_TYPE_STRING) {
		subtilis_error_set_string_variable_expected(
		    err, p->l->stream->name, p->l->line);
		goto cleanup;
	}

	switch (value->type.type) {
	case SUBTILIS_TYPE_CONST_STRING:
		buf_size = subtilis_buffer_get_size(&value->exp.str);

		/*
		 * No error here.  We just don't do anything.
		 */

		if (buf_size == 1)
			goto cleanup;
		break;
	case SUBTILIS_TYPE_STRING:
		break;
	default:
		subtilis_error_set_string_expected(err, p->l->stream->name,
						   p->l->line);
		goto cleanup;
	}

	len = subtilis_type_if_to_int(p, len, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	if (len->type.type == SUBTILIS_TYPE_CONST_INTEGER) {
		/*
		 * No error here.  We just don't do anything.
		 */

		if (len->exp.ir_op.integer == 0)
			goto cleanup;
	}

	return len;

cleanup:

	subtilis_exp_delete(len);
	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %r14
movq %rdx, %rbx
movq %rdi, %r15
cmpl $0x7, (%rsi)
jne 0x4b08a
movl (%rcx), %eax
cmpl $0x7, %eax
je 0x4b063
cmpl $0x3, %eax
jne 0x4b0ab
addq $0x148, %rcx            # imm = 0x148
movq %rcx, %rdi
callq 0x14ba1
cmpq $0x1, %rax
je 0x4b0cf
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3691f
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x4b0cf
cmpl $0x1, (%rbx)
jne 0x4b0d9
cmpl $0x0, 0x148(%rbx)
jne 0x4b0d9
jmp 0x4b0cf
movq (%r15), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2aa01(%rip), %r8      # 0x75a9c
movq %r14, %rdi
movl $0x4b, %esi
movl $0x9b4, %r9d            # imm = 0x9B4
jmp 0x4b0ca
movq (%r15), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2a9e0(%rip), %r8      # 0x75a9c
movq %r14, %rdi
movl $0x49, %esi
movl $0x9c7, %r9d            # imm = 0x9C7
callq 0x14618
movq %rbx, %rdi
callq 0x2b4c3
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/string_type.c
// Function: prv_string_str_non_const_lengt1
static subtilis_exp_t *prv_string_str_non_const_lengt1(subtilis_parser_t *p,
						       subtilis_exp_t *count,
						       size_t str_data,
						       subtilis_exp_t *str_len,
						       subtilis_error_t *err)
{
	const subtilis_symbol_t *s;
	char *tmp_name = NULL;

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

	prv_string_str_non_const_common(p, s, count, str_data, str_len, false,
					err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	str_data = subtilis_reference_get_pointer(p, SUBTILIS_IR_REG_LOCAL,
						  s->loc, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	return subtilis_exp_new_tmp_var(&subtilis_type_string, str_data,
					tmp_name, err);

cleanup:

	free(tmp_name);
	subtilis_exp_delete(count);
	subtilis_exp_delete(str_len);

	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r14
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r12
leaq 0x10(%rsp), %rdx
movq $0x0, (%rdx)
movq 0x68(%rdi), %rdi
leaq 0x290ef(%rip), %rsi     # 0x74b88
movq %r8, %rcx
callq 0x2ea12
cmpl $0x0, (%r14)
jne 0x4bae5
movq %rax, %rbp
movq %r14, (%rsp)
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r13, %rcx
movq %rbx, %r8
xorl %r9d, %r9d
callq 0x4ca3d
cmpl $0x0, (%r14)
jne 0x4bae5
movq (%rbp), %rdx
movl $0x2, %esi
movq %r12, %rdi
movq %r14, %rcx
callq 0x4d763
cmpl $0x0, (%r14)
je 0x4bb10
movq 0x10(%rsp), %rdi
callq 0x122c0
movq %r15, %rdi
callq 0x2b4c3
movq %rbx, %rdi
callq 0x2b4c3
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rdx
leaq 0x2906c(%rip), %rdi     # 0x74b88
movl %eax, %esi
movq %r14, %rcx
callq 0x2b99d
jmp 0x4bb01
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/string_type.c
// Function: prv_get_string_details
static bool prv_get_string_details(subtilis_parser_t *p, subtilis_exp_t *a2,
				   subtilis_ir_operand_t *a2_size,
				   subtilis_ir_operand_t *a2_data,
				   char **a2_tmp, subtilis_error_t *err)
{
	size_t len;
	bool retval = true;
	subtilis_ir_operand_t op1;
	subtilis_ir_operand_t op2;

	switch (a2->type.type) {
	case SUBTILIS_TYPE_CONST_STRING:
		len = subtilis_buffer_get_size(&a2->exp.str) - 1;
		if (len == 0) {
			retval = false;
			goto cleanup;
		}

		op1.integer = len;
		a2_size->reg = subtilis_ir_section_add_instr2(
		    p->current, SUBTILIS_OP_INSTR_MOVI_I32, op1, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;

		*a2_tmp = a2->temporary;
		a2_data->reg = subtilis_string_type_lca_const(
		    p, subtilis_buffer_get_string(&a2->exp.str), len, err);
		break;
	case SUBTILIS_TYPE_STRING:
		op2.integer = SUBTIILIS_STRING_SIZE_OFF;
		a2_size->reg = subtilis_ir_section_add_instr(
		    p->current, SUBTILIS_OP_INSTR_LOADO_I32, a2->exp.ir_op, op2,
		    err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;

		*a2_tmp = a2->temporary;
		a2_data->reg =
		    subtilis_reference_get_data(p, a2->exp.ir_op.reg, 0, err);
		break;
	default:
		subtilis_error_set_string_expected(err, p->l->stream->name,
						   p->l->line);
	}

cleanup:

	subtilis_exp_delete(a2);

	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r14
movq %r8, %r13
movq %rcx, %r15
movq %rdx, %rbp
movq %rsi, %rbx
movq %rdi, %r12
movl (%rsi), %eax
cmpl $0x7, %eax
je 0x4be78
cmpl $0x3, %eax
jne 0x4bec4
movq %r15, 0x10(%rsp)
leaq 0x148(%rbx), %rdi
movq %rdi, 0x8(%rsp)
callq 0x14ba1
movq %rax, %r15
decq %r15
je 0x4beee
movq 0x48(%r12), %rdi
movl %r15d, %edx
movl $0x1b, %esi
movq %r14, %rcx
callq 0x2c189
movq %rax, (%rbp)
movb $0x1, %bpl
cmpl $0x0, (%r14)
jne 0x4bef0
movq 0x158(%rbx), %rax
movq %rax, (%r13)
movq 0x8(%rsp), %rdi
callq 0x14dfb
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x48267
movq 0x10(%rsp), %rcx
movq %rax, (%rcx)
jmp 0x4bef0
movq 0x48(%r12), %rdi
movq 0x148(%rbx), %rdx
movl $0x12, %esi
xorl %ecx, %ecx
movq %r14, %r8
callq 0x2c00f
movq %rax, (%rbp)
movb $0x1, %bpl
cmpl $0x0, (%r14)
jne 0x4bef0
movq 0x158(%rbx), %rax
movq %rax, (%r13)
movq 0x148(%rbx), %rsi
movq %r12, %rdi
xorl %edx, %edx
movq %r14, %rcx
callq 0x4d29c
movq %rax, (%r15)
jmp 0x4bef0
movq (%r12), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x29bc6(%rip), %r8      # 0x75a9c
movq %r14, %rdi
movl $0x49, %esi
movl $0xd39, %r9d            # imm = 0xD39
callq 0x14618
movb $0x1, %bpl
jmp 0x4bef0
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x2b4c3
movl %ebp, %eax
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/string_type.c
// Function: subtilis_string_type_add_eq
void subtilis_string_type_add_eq(subtilis_parser_t *p, size_t store_reg,
				 size_t loc, subtilis_exp_t *a2,
				 subtilis_error_t *err)
{
	size_t dest_reg;
	char *a2_tmp;
	subtilis_ir_operand_t a1_size;
	subtilis_ir_operand_t a2_size;
	subtilis_ir_operand_t op2;
	subtilis_ir_operand_t a2_data;
	subtilis_ir_operand_t store;
	bool a2_gt_0;
	subtilis_exp_t *e;

	a2_data.reg = SIZE_MAX;
	a2_size.reg = SIZE_MAX;

	store.reg = store_reg;
	a2_gt_0 =
	    prv_get_string_details(p, a2, &a2_size, &a2_data, &a2_tmp, err);
	if (err->type != SUBTILIS_ERROR_OK || !a2_gt_0)
		return;

	op2.integer = loc + SUBTIILIS_STRING_SIZE_OFF;
	a1_size.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_LOADO_I32, store, op2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

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

	e = subtilis_builtin_ir_call_ref_grow(p, store_reg, a1_size.reg,
					      a2_size.reg, a2_size.reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	dest_reg = e->exp.ir_op.reg;
	subtilis_exp_delete(e);

	subtilis_reference_type_memcpy_dest(p, dest_reg, a2_data.reg,
					    a2_size.reg, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r8, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq $-0x1, %rsi
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
leaq 0x10(%rsp), %rdx
movq %rsi, (%rdx)
leaq 0x18(%rsp), %r8
movq %rcx, %rsi
movq %rax, %rcx
movq %rbx, %r9
callq 0x4bdcc
testb %al, %al
je 0x4bfab
cmpl $0x0, (%rbx)
jne 0x4bfab
movq 0x48(%r14), %rdi
movl %r15d, %ecx
movl $0x12, %esi
movq %r12, %rdx
movq %rbx, %r8
callq 0x2c00f
cmpl $0x0, (%rbx)
jne 0x4bfab
movq %rax, %r13
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x4d763
cmpl $0x0, (%rbx)
jne 0x4bfab
movq 0x10(%rsp), %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %r15, %rcx
movq %r15, %r8
movq %rbx, %r9
callq 0x33365
cmpl $0x0, (%rbx)
je 0x4bfb9
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x148(%rax), %r12
movq %rax, %rdi
callq 0x2b4c3
movq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rcx
movq %rbx, %r8
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4d830
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/reference_type.c
// Function: subtilis_reference_push_ref
void subtilis_reference_push_ref(subtilis_parser_t *p, const subtilis_type_t *t,
				 size_t reg, subtilis_error_t *err)
{
	subtilis_ir_operand_t op2;

	op2.reg = reg;
	subtilis_ir_section_add_instr_no_reg(
	    p->current, SUBTILIS_OP_INSTR_PUSH_I32, op2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	op2.integer = subtilis_type_if_destructor(p, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	op2.reg = subtilis_ir_section_add_instr2(
	    p->current, SUBTILIS_OP_INSTR_GET_PROC_ADDR, op2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_instr_no_reg(
	    p->current, SUBTILIS_OP_INSTR_PUSH_I32, op2, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq 0x48(%rdi), %rdi
movl $0x7b, %esi
callq 0x2c19f
cmpl $0x0, (%rbx)
jne 0x4d08f
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x37b1b
cmpl $0x0, (%rbx)
jne 0x4d08f
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
andq %rcx, %r15
movq 0x48(%r14), %rdi
movl %eax, %edx
orq %r15, %rdx
movl $0x9b, %esi
movq %rbx, %rcx
callq 0x2c189
cmpl $0x0, (%rbx)
je 0x4d09b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x48(%r14), %rdi
movl $0x7b, %esi
movq %rax, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2c19f
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/reference_type.c
// Function: subtilis_reference_type_copy_ref
void subtilis_reference_type_copy_ref(subtilis_parser_t *p,
				      const subtilis_type_t *t,
				      size_t dest_mem_reg, size_t dest_loc,
				      size_t source_reg, subtilis_error_t *err)
{
	subtilis_ir_operand_t store_op;
	subtilis_ir_operand_t op2;

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

	store_op.reg = dest_mem_reg;
	if (dest_loc > 0) {
		op2.integer = dest_loc;
		op2.reg = subtilis_ir_section_add_instr(
		    p->current, SUBTILIS_OP_INSTR_ADDI_I32, store_op, op2, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	} else {
		op2.reg = dest_mem_reg;
	}

	subtilis_reference_push_ref(p, t, op2.reg, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r9, %rbx
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movq %r9, (%rsp)
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x4ce10
cmpl $0x0, (%rbx)
je 0x4d107
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
testq %r13, %r13
je 0x4d12b
movq 0x48(%r15), %rdi
movl %r13d, %ecx
movl $0x9, %esi
movq %r12, %rdx
movq %rbx, %r8
callq 0x2c00f
cmpl $0x0, (%rbx)
jne 0x4d0f9
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4d02d
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/reference_type.c
// Function: subtilis_reference_inc_cleanup_stack
void subtilis_reference_inc_cleanup_stack(subtilis_parser_t *p,
					  const subtilis_type_t *type,
					  subtilis_error_t *err)
{
	subtilis_ir_operand_t op2;
	subtilis_ir_operand_t dest;

	prv_ensure_cleanup_stack(p, false, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	op2.integer = 1;
	dest.reg = p->current->cleanup_stack;
	subtilis_ir_section_add_instr_reg(
	    p->current, SUBTILIS_OP_INSTR_ADDI_I32, dest, dest, op2, err);
}

// Assembly:
movq %rdx, %r9
movq 0x48(%rdi), %rax
cmpq $-0x1, 0xb8(%rax)
jne 0x4d310
movq 0x48(%rax), %rcx
movq 0xc0(%rax), %rdx
movq (%rcx,%rdx,8), %rcx
movq 0xc8(%rax), %rdx
movq %rdx, 0xb8(%rax)
movl $0x1b, 0x8(%rcx)
movq %rdx, 0x10(%rcx)
movl $0x0, 0x18(%rcx)
cmpl $0x0, (%r9)
je 0x4d317
retq
movq 0x48(%rdi), %rdi
movq 0xb8(%rdi), %rcx
movl $0x1, %r8d
movl $0x9, %esi
movq %rcx, %rdx
jmp 0x2c0c2
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/reference_type.c
// Function: subtilis_reference_type_ref
void subtilis_reference_type_ref(subtilis_parser_t *p, size_t mem_reg,
				 size_t loc, bool check_size,
				 subtilis_error_t *err)
{
	subtilis_ir_operand_t op0;
	subtilis_ir_operand_t op1;
	subtilis_ir_operand_t size;
	subtilis_ir_operand_t zero;
	subtilis_ir_operand_t gtzero;

	op0.reg = mem_reg;
	if (check_size) {
		op1.integer = loc + SUBTIILIS_REFERENCE_SIZE_OFF;
		size.reg = subtilis_ir_section_add_instr(
		    p->current, SUBTILIS_OP_INSTR_LOADO_I32, op0, op1, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;

		zero.label = subtilis_ir_section_new_label(p->current);
		gtzero.label = subtilis_ir_section_new_label(p->current);
		subtilis_ir_section_add_instr_reg(p->current,
						  SUBTILIS_OP_INSTR_JMPC, size,
						  gtzero, zero, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		subtilis_ir_section_add_label(p->current, gtzero.label, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	}

	op1.integer = loc + SUBTIILIS_REFERENCE_HEAP_OFF;
	op0.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_LOADO_I32, op0, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_instr_no_reg(p->current, SUBTILIS_OP_INSTR_REF,
					     op0, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
testl %ecx, %ecx
je 0x4d41a
movq 0x48(%r14), %rdi
movl %r12d, %ecx
movl $0x12, %esi
movq %r13, %rdx
movq %rbx, %r8
callq 0x2c00f
cmpl $0x0, (%rbx)
jne 0x4d47b
movq %rax, %r15
movq 0x48(%r14), %rdi
callq 0x2d00a
movq %rax, (%rsp)
movq 0x48(%r14), %rdi
callq 0x2d00a
movq 0x48(%r14), %rdi
movl $0x43, %esi
movq %r15, %rdx
movq %rax, %r15
movq %rax, %rcx
movq (%rsp), %r8
movq %rbx, %r9
callq 0x2c0c2
cmpl $0x0, (%rbx)
jne 0x4d47b
movq 0x48(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2d017
cmpl $0x0, (%rbx)
jne 0x4d47b
addl $0x8, %r12d
movq 0x48(%r14), %rdi
movl $0x12, %esi
movq %r13, %rdx
movq %r12, %rcx
movq %rbx, %r8
callq 0x2c00f
cmpl $0x0, (%rbx)
jne 0x4d47b
movq 0x48(%r14), %rdi
movl $0x78, %esi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x2c19f
cmpl $0x0, (%rbx)
setne %al
xorb $0x1, %bpl
orb %al, %bpl
jne 0x4d47b
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
addq $0x8, %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/reference_type.c
// Function: subtilis_reference_type_assign_to_reg
void subtilis_reference_type_assign_to_reg(subtilis_parser_t *p, size_t reg,
					   subtilis_exp_t *e, bool check_size,
					   subtilis_error_t *err)
{
	subtilis_ir_operand_t op0;

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

	subtilis_reference_type_ref(p, reg, 0, check_size, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movq 0x48(%rdi), %rdi
movq 0x148(%rdx), %rcx
movl $0x1d, %esi
movq %r14, %rdx
callq 0x2c1ac
movq %r12, %rdi
callq 0x2b4c3
cmpl $0x0, (%rbx)
je 0x4d4ce
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movzbl %bpl, %ecx
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rbx, %r8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4d38d
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/reference_type.c
// Function: subtilis_reference_type_push_reference
void subtilis_reference_type_push_reference(subtilis_parser_t *p,
					    const subtilis_type_t *type,
					    size_t reg, size_t loc,
					    subtilis_error_t *err)
{
	subtilis_ir_operand_t store_op;
	subtilis_ir_operand_t op2;

	store_op.reg = reg;

	if (loc > 0) {
		op2.integer = loc;
		op2.reg = subtilis_ir_section_add_instr(
		    p->current, SUBTILIS_OP_INSTR_ADDI_I32, store_op, op2, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	} else {
		op2.reg = reg;
	}

	subtilis_reference_push_ref(p, type, op2.reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_reference_inc_cleanup_stack(p, type, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %rbx
movq %rsi, %r15
movq %rdi, %r14
testq %rcx, %rcx
je 0x4d518
movq 0x48(%r14), %rdi
movl %ecx, %ecx
movl $0x9, %esi
movq %rbx, %r8
callq 0x2c00f
cmpl $0x0, (%rbx)
jne 0x4d52b
movq %rax, %rdx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rcx
callq 0x4d02d
cmpl $0x0, (%rbx)
je 0x4d531
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x4d2d0
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/reference_type.c
// Function: reference_type_call_deref
void reference_type_call_deref(subtilis_parser_t *p,
			       subtilis_ir_operand_t address,
			       subtilis_error_t *err)
{
	if (p->backend.caps & SUBTILIS_BACKEND_HAVE_ALLOC)
		subtilis_ir_section_add_instr_no_reg(
		    p->current, SUBTILIS_OP_INSTR_DEREF, address, err);
	else
		(void)subtilis_parser_call_1_arg_fn(
		    p, "_deref", address.reg, SUBTILIS_BUILTINS_DEREF,
		    SUBTILIS_IR_REG_TYPE_INTEGER, &subtilis_type_void, true,
		    err);
}

// Assembly:
movq %rdx, %rax
movq %rsi, %rdx
testb $0x10, 0x8(%rdi)
jne 0x4d5e0
pushq %rax
leaq 0x27d06(%rip), %rsi     # 0x752c9
leaq 0x27706(%rip), %r9      # 0x74cd0
movl $0x7, %ecx
xorl %r8d, %r8d
pushq %rax
pushq $0x1
callq 0x1e9b2
addq $0x10, %rsp
popq %rax
retq
movq 0x48(%rdi), %rdi
movl $0x79, %esi
movq %rax, %rcx
jmp 0x2c19f
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/reference_type.c
// Function: subtilis_reference_type_assign_ref
void subtilis_reference_type_assign_ref(subtilis_parser_t *p,
					size_t dest_mem_reg, size_t dest_loc,
					size_t source_reg, bool check_size,
					subtilis_error_t *err)
{
	subtilis_ir_operand_t op0;
	subtilis_ir_operand_t op1;
	subtilis_ir_operand_t copy;

	/*
	 * For vectors we need to check before we deref
	 */

	if (check_size) {
		prv_deref(p, dest_mem_reg, dest_loc, false, err);
	} else {
		op0.reg = dest_mem_reg;
		op1.integer = dest_loc + SUBTIILIS_REFERENCE_HEAP_OFF;

		copy.reg = subtilis_ir_section_add_instr(
		    p->current, SUBTILIS_OP_INSTR_LOADO_I32, op0, op1, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;

		reference_type_call_deref(p, copy, err);
	}
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_reference_type_init_ref(p, dest_mem_reg, dest_loc, source_reg,
					 check_size, true, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r13
testl %r8d, %r8d
je 0x4d626
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x4d686
jmp 0x4d652
leal 0x8(%r14), %ecx
movq 0x48(%r13), %rdi
movl $0x12, %esi
movq %r12, %rdx
movq %r15, %r8
callq 0x2c00f
cmpl $0x0, (%r15)
jne 0x4d677
movq %r13, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x4d5af
cmpl $0x0, (%r15)
jne 0x4d677
movq %r15, (%rsp)
movzbl %bpl, %r8d
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movl $0x1, %r9d
callq 0x4ce10
addq $0x8, %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/reference_type.c
// Function: prv_deref
static void prv_deref(subtilis_parser_t *p, size_t mem_reg, size_t loc,
		      bool destructor, subtilis_error_t *err)
{
	subtilis_ir_operand_t el_start;
	subtilis_ir_operand_t offset;
	subtilis_ir_operand_t size;
	subtilis_ir_operand_t op2;
	subtilis_ir_operand_t non_zero;
	subtilis_ir_operand_t zero;

	non_zero.label = subtilis_ir_section_new_label(p->current);
	zero.label = subtilis_ir_section_new_label(p->current);

	el_start.reg = mem_reg;
	op2.integer = SUBTIILIS_REFERENCE_SIZE_OFF + loc;
	size.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_LOADO_I32, el_start, op2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_instr_reg(p->current, SUBTILIS_OP_INSTR_JMPC,
					  size, non_zero, zero, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	subtilis_ir_section_add_label(p->current, non_zero.label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	op2.integer = loc + SUBTIILIS_REFERENCE_HEAP_OFF;
	offset.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_LOADO_I32, el_start, op2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	reference_type_call_deref(p, offset, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_label(p->current, zero.label, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
movq 0x48(%rdi), %rdi
callq 0x2d00a
movq %rax, %rbp
movq 0x48(%r14), %rdi
callq 0x2d00a
movq %rax, %r15
movq 0x48(%r14), %rdi
movl %r12d, %ecx
movl $0x12, %esi
movq %r13, %rdx
movq %rbx, %r8
callq 0x2c00f
cmpl $0x0, (%rbx)
jne 0x4d737
movq 0x48(%r14), %rdi
movl $0x43, %esi
movq %rax, %rdx
movq %rbp, %rcx
movq %r15, %r8
movq %rbx, %r9
callq 0x2c0c2
cmpl $0x0, (%rbx)
jne 0x4d737
movq 0x48(%r14), %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x2d017
cmpl $0x0, (%rbx)
jne 0x4d737
addl $0x8, %r12d
movq 0x48(%r14), %rdi
movl $0x12, %esi
movq %r13, %rdx
movq %r12, %rcx
movq %rbx, %r8
callq 0x2c00f
cmpl $0x0, (%rbx)
jne 0x4d737
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x4d5af
cmpl $0x0, (%rbx)
je 0x4d746
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x48(%r14), %rdi
movq %r15, %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/reference_type.c
// Function: subtilis_reference_type_memcpy
void subtilis_reference_type_memcpy(subtilis_parser_t *p, size_t mem_reg,
				    size_t loc, size_t src_reg, size_t size_reg,
				    subtilis_error_t *err)
{
	size_t dest_reg;

	dest_reg = subtilis_reference_get_data(p, mem_reg, loc, 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 %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rsi, %rax
movq %rdi, %r12
leal 0x4(%rdx), %ecx
movq 0x48(%rdi), %rdi
movl $0x12, %esi
movq %rax, %rdx
movq %r9, %r8
callq 0x2c00f
cmpl $0x0, (%rbx)
je 0x4d811
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4d830