LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/string_type.c
// Function: subtilis_string_type_new_tmp_from_char
subtilis_exp_t *subtilis_string_type_new_tmp_from_char(subtilis_parser_t *p,
						       subtilis_exp_t *e,
						       subtilis_error_t *err)
{
	subtilis_type_t type;
	const subtilis_symbol_t *s;
	size_t reg;
	char *tmp_name = NULL;

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

	subtilis_string_type_new_ref_from_char(p, SUBTILIS_IR_REG_LOCAL, s->loc,
					       e, err);
	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)
		goto cleanup;

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

cleanup:

	free(tmp_name);
	subtilis_exp_delete(e);

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movq %rsi, %r14
andq $0x0, (%rsp)
movl $0x7, 0x8(%rsp)
cmpl $0x0, (%rdx)
jne 0x45c4d
movq %rdx, %rbx
movq %rdi, %r12
movq 0x68(%rdi), %rdi
leaq 0x8(%rsp), %r13
movq %rsp, %rdx
movq %r13, %rsi
movq %rbx, %rcx
callq 0x2cee3
movq %rax, %r15
movq %r13, %rdi
callq 0x2dc7c
cmpl $0x0, (%rbx)
jne 0x45c4d
movq (%r15), %rdx
pushq $0x2
popq %rsi
movq %r12, %rdi
movq %r14, %rcx
movq %rbx, %r8
callq 0x45c88
cmpl $0x0, (%rbx)
jne 0x45c4d
movq (%r15), %rdx
pushq $0x2
popq %rsi
movq %r12, %rdi
movq %rbx, %rcx
callq 0x4ab28
cmpl $0x0, (%rbx)
je 0x45c71
movq (%rsp), %rdi
callq 0x122c0
movq %r14, %rdi
callq 0x29d88
xorl %eax, %eax
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
addq $0x8, %r15
movq (%rsp), %rdx
movq %r15, %rdi
movl %eax, %esi
movq %rbx, %rcx
callq 0x2a252
jmp 0x45c60
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/string_type.c
// Function: subtilis_string_type_new_ref_from_char
void subtilis_string_type_new_ref_from_char(subtilis_parser_t *p,
					    size_t mem_reg, size_t loc,
					    subtilis_exp_t *e,
					    subtilis_error_t *err)
{
	size_t dest_reg;
	subtilis_ir_operand_t dest_op;
	subtilis_ir_operand_t zero_op;
	subtilis_exp_t *sizee = NULL;

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

	e = subtilis_type_if_exp_to_var(p, e, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	sizee = subtilis_exp_new_int32(1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

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

	dest_reg = subtilis_reference_type_alloc(p, &subtilis_type_string, loc,
						 mem_reg, sizee->exp.ir_op.reg,
						 true, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	dest_op.reg = dest_reg;
	zero_op.integer = 0;
	subtilis_ir_section_add_instr_reg(p->current,
					  SUBTILIS_OP_INSTR_STOREO_I8,
					  e->exp.ir_op, dest_op, zero_op, err);

cleanup:

	subtilis_exp_delete(sizee);
	subtilis_exp_delete(e);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, %r15
movq %rcx, %rsi
movq %r8, %rdx
callq 0x347d5
cmpl $0x0, (%rbx)
jne 0x45cc2
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x3415f
cmpl $0x0, (%rbx)
je 0x45cd1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
pushq $0x1
popq %rdi
movq %rbx, %rsi
callq 0x2a369
movq %rax, %r12
cmpl $0x0, (%rbx)
jne 0x45d43
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x3415f
movq %rax, %r12
cmpl $0x0, (%rbx)
jne 0x45d43
movq 0x148(%r12), %r8
movq %rbx, (%rsp)
leaq 0x28e48(%rip), %rsi     # 0x6eb58
pushq $0x1
popq %r9
movq %r15, %rdi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x4b101
cmpl $0x0, (%rbx)
jne 0x45d43
movq 0x48(%r15), %rdi
movq 0x148(%r14), %rdx
pushq $0x16
popq %rsi
movq %rax, %rcx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x2a8c1
movq %r12, %rdi
callq 0x29d88
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x29d88
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/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 0x149a8
cmpl $0x0, (%r14)
jne 0x45db5
movq %r12, %rdi
callq 0x14a53
movq %rax, %r13
movq %r12, %rdi
callq 0x14804
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0x458cb
cmpl $0x0, (%r14)
je 0x45dcd
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x29d88
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl %eax, %edi
movq %r14, %rsi
callq 0x2a336
movq %rax, %r14
jmp 0x45db8
// File: /workspace/github_c_makefile_star2_O2/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 0x14804
cmpq $0x1, %rax
jne 0x4644d
movzbl %r12b, %r8d
leaq 0x2872c(%rip), %rsi     # 0x6eb58
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 0x45982
movq %rax, %r13
movq %rbp, 0x18(%rsp)
movq %r15, 0x20(%rsp)
decq %r13
movq %r14, %rdi
callq 0x14a53
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %rdx
movq 0x10(%rsp), %r15
movq %r15, %rcx
callq 0x45901
cmpl $0x0, (%r15)
jne 0x46498
movq %rax, %rbp
movq %rbx, %r14
movl %r13d, %edi
movq %r15, %rsi
callq 0x2a369
cmpl $0x0, (%r15)
je 0x464a7
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 0x3415f
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0x464f9
movq 0x48(%r14), %rdi
movl %ebp, %edx
pushq $0x7d
popq %rsi
movq %r15, %rcx
callq 0x2a981
cmpl $0x0, (%r15)
jne 0x464f9
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 0x45b72
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x29d88
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/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 0x4653a
cmpl $0x7, %eax
jne 0x46555
movq 0x148(%rbx), %r8
movq %r9, (%rsp)
pushq $0x1
popq %r9
callq 0x4a913
jmp 0x46577
leaq 0x148(%rbx), %rax
pushq $0x1
popq %r8
movq %rdx, %rsi
movq %rcx, %rdx
movq %rax, %rcx
callq 0x463f1
jmp 0x46577
movq (%rdi), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x29506(%rip), %r8      # 0x6fa6c
pushq $0x49
popq %rsi
movq %r9, %rdi
movl $0x2a8, %r9d            # imm = 0x2A8
callq 0x142c0
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x29d88
// File: /workspace/github_c_makefile_star2_O2/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 0x465bb
cmpl $0x7, %eax
jne 0x465d5
movq 0x148(%rbx), %rax
movq %r9, (%rsp)
pushq $0x1
popq %r8
movq %rdx, %rsi
movq %rcx, %rdx
movq %rax, %rcx
movl %r8d, %r9d
callq 0x4a250
jmp 0x465f7
leaq 0x148(%rbx), %rax
movq %rdx, %rsi
movq %rcx, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
callq 0x463f1
jmp 0x465f7
movq (%rdi), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x29486(%rip), %r8      # 0x6fa6c
pushq $0x49
popq %rsi
movq %r9, %rdi
movl $0x2c0, %r9d            # imm = 0x2C0
callq 0x142c0
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x29d88
// File: /workspace/github_c_makefile_star2_O2/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 0x4aeaa
cmpl $0x0, (%rbx)
je 0x466c0
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x29d88
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 0x46604
// File: /workspace/github_c_makefile_star2_O2/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 0x4670d
movq 0x148(%rbx), %rax
movq %r9, (%rsp)
pushq $0x1
popq %r8
movq %rdx, %rsi
movq %rcx, %rdx
movq %rax, %rcx
xorl %r9d, %r9d
callq 0x4a250
jmp 0x46724
leaq 0x29358(%rip), %rdx     # 0x6fa6c
pushq $0xf
popq %rsi
movq %r9, %rdi
movl $0x2f5, %ecx            # imm = 0x2F5
callq 0x1429e
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x29d88
// File: /workspace/github_c_makefile_star2_O2/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 0x46780
cmpl $0x7, %eax
jne 0x467a4
movq 0x48(%rdi), %rdi
movq 0x148(%rbx), %rdx
xorl %r15d, %r15d
pushq $0x12
popq %rsi
xorl %ecx, %ecx
movq %r14, %r8
callq 0x2a819
cmpl $0x0, (%r14)
jne 0x467c9
movl %eax, %edi
movq %r14, %rsi
callq 0x2a336
jmp 0x4679f
leaq 0x148(%rbx), %rdi
callq 0x14804
xorl %ecx, %ecx
testl %eax, %eax
setg %cl
subl %ecx, %eax
movl %eax, %edi
movq %r14, %rsi
callq 0x2a369
movq %rax, %r15
jmp 0x467c9
movq (%rdi), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x292b7(%rip), %r8      # 0x6fa6c
pushq $0x49
popq %rsi
movq %r14, %rdi
movl $0x31e, %r9d            # imm = 0x31E
callq 0x142c0
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x29d88
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4690f
movq %rdi, %r15
cmpl $0x7, %eax
jne 0x46925
movq 0x148(%rbx), %r13
movq 0x48(%r15), %rdi
xorl %ebp, %ebp
pushq $0x12
popq %rsi
movq %r13, %rdx
xorl %ecx, %ecx
movq %r14, %r8
callq 0x2a819
cmpl $0x0, (%r14)
jne 0x46966
movq %rax, %r12
movq 0x48(%r15), %rdi
callq 0x2b774
movq %rax, %rbp
movq 0x48(%r15), %rdi
callq 0x2b774
movq %rax, 0x10(%rsp)
movq 0x48(%r15), %rdi
pushq $0x1b
popq %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r14, %rcx
callq 0x2a981
cmpl $0x0, (%r14)
jne 0x46947
movq %rax, 0x8(%rsp)
movq 0x48(%r15), %rdi
pushq $0x43
popq %rsi
movq %r12, %rdx
movq 0x10(%rsp), %rcx
movq %rbp, %r8
movq %r14, %r9
callq 0x2a8c1
cmpl $0x0, (%r14)
jne 0x46947
movq %rbp, %r12
movq 0x48(%r15), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
callq 0x2b781
cmpl $0x0, (%r14)
jne 0x46947
movq 0x48(%r15), %rdi
pushq $0x12
popq %rsi
pushq $0x4
popq %rcx
movq %r13, %rdx
movq %r14, %r8
callq 0x2a819
cmpl $0x0, (%r14)
jne 0x46947
movq 0x48(%r15), %rdi
xorl %ebp, %ebp
pushq $0x11
popq %rsi
movq 0x8(%rsp), %rdx
movq %rax, %rcx
xorl %r8d, %r8d
movq %r14, %r9
callq 0x2a8c1
cmpl $0x0, (%r14)
jne 0x46966
movq 0x48(%r15), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2b781
cmpl $0x0, (%r14)
jne 0x46947
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x2a336
jmp 0x46963
leaq 0x148(%rbx), %rdi
callq 0x14804
cmpl $0x2, %eax
jge 0x4694b
pushq $-0x1
popq %rdi
jmp 0x4695b
movq (%r15), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x29136(%rip), %r8      # 0x6fa6c
pushq $0x49
popq %rsi
movq %r14, %rdi
movl $0x379, %r9d            # imm = 0x379
callq 0x142c0
xorl %ebp, %ebp
jmp 0x46966
movq 0x150(%rbx), %rax
movq 0x8(%rax), %rcx
movzbl 0x18(%rax,%rcx), %edi
movq %r14, %rsi
callq 0x2a369
movq %rax, %rbp
movq %rbx, %rdi
callq 0x29d88
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_O2/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
pushq $0x12
popq %rsi
xorl %ecx, %ecx
movq %r14, %r8
callq 0x2a819
cmpl $0x0, (%r14)
jne 0x46a4d
movq %rax, %r13
movq 0x48(%r15), %rdi
callq 0x2b774
movq %rax, %r12
movq 0x48(%r15), %rdi
callq 0x2b774
movq %rax, %rbp
movq 0x48(%r15), %rdi
pushq $0x43
popq %rsi
movq %r13, %rdx
movq %rax, %rcx
movq %r12, %r8
movq %r14, %r9
callq 0x2a8c1
cmpl $0x0, (%r14)
jne 0x46a4d
movq 0x48(%r15), %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x2b781
cmpl $0x0, (%r14)
jne 0x46a4d
movq 0x48(%r15), %rdi
movq 0x148(%rbx), %rdx
pushq $0x12
popq %rsi
pushq $0x4
popq %rcx
movq %r14, %r8
callq 0x2a819
cmpl $0x0, (%r14)
jne 0x46a4d
movq 0x48(%r15), %rdi
pushq $0x1f
popq %rsi
movq %rax, %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x2a9a4
cmpl $0x0, (%r14)
jne 0x46a4d
movq 0x48(%r15), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2b781
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x29d88
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/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 0x14804
cmpq $0x1, %rax
je 0x46af6
movq %rax, %r12
decq %r12
movq %r13, %rdi
callq 0x14a53
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x45901
cmpl $0x0, (%r14)
jne 0x46af6
movq 0x48(%r15), %rdi
movl %eax, %edx
pushq $0x7d
popq %rsi
movq %r14, %rcx
callq 0x2a981
cmpl $0x0, (%r14)
jne 0x46af6
movq %rax, %r13
movq 0x48(%r15), %rdi
movl %r12d, %edx
pushq $0x1b
popq %rsi
movq %r14, %rcx
callq 0x2a981
cmpl $0x0, (%r14)
jne 0x46af6
movq 0x48(%r15), %rdi
pushq $0x1f
popq %rsi
movq %r13, %rdx
movq %rax, %rcx
movq %r14, %r8
callq 0x2a9a4
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x29d88
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/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, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
pushq $0x8
popq %rdi
callq 0x121d0
testq %rax, %rax
je 0x46b8b
movq %rax, %r15
movabsq $0x706d636d656d5f, %rax # imm = 0x706D636D656D5F
movq %rax, (%r15)
pushq $0x48
popq %rdi
callq 0x121d0
testq %rax, %rax
je 0x46b9f
andl $0x0, (%rax)
movq %rbp, 0x8(%rax)
andl $0x0, 0x18(%rax)
movq %r13, 0x20(%rax)
andl $0x0, 0x30(%rax)
movq %r12, 0x38(%rax)
subq $0x8, %rsp
leaq 0x27d5b(%rip), %r9      # 0x6e8c8
pushq $0x3
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
movq %rax, %r8
pushq %rbx
pushq $0x1
pushq $0x3
callq 0x29dcc
addq $0x28, %rsp
jmp 0x46bc4
leaq 0x28eda(%rip), %rdx     # 0x6fa6c
pushq $0x1
popq %rsi
movq %rbx, %rdi
movl $0x3dd, %ecx            # imm = 0x3DD
jmp 0x46bb9
movq %r15, %rdi
callq 0x122c0
leaq 0x28ebe(%rip), %rdx     # 0x6fa6c
pushq $0x1
popq %rsi
movq %rbx, %rdi
movl $0x3e5, %ecx            # imm = 0x3E5
callq 0x1429e
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_O2/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)
pushq $0x9
popq %rdi
callq 0x121d0
testq %rax, %rax
je 0x46c68
movq %rax, %r12
movabsq $0x657261706d6f635f, %rax # imm = 0x657261706D6F635F
movq %rax, (%r12)
movb $0x0, 0x8(%r12)
pushq $0x60
popq %rdi
callq 0x121d0
testq %rax, %rax
je 0x46c7c
andl $0x0, (%rax)
movq %r14, 0x8(%rax)
andl $0x0, 0x18(%rax)
movq %rbp, 0x20(%rax)
andl $0x0, 0x30(%rax)
movq %r13, 0x38(%rax)
andl $0x0, 0x48(%rax)
movq %r15, 0x50(%rax)
subq $0x8, %rsp
leaq 0x27c80(%rip), %r9      # 0x6e8c8
pushq $0x4
popq %rdx
movq 0x8(%rsp), %rdi
movq %r12, %rsi
xorl %ecx, %ecx
movq %rax, %r8
pushq %rbx
pushq $0x1
pushq $0x4
callq 0x29dcc
addq $0x28, %rsp
jmp 0x46ca1
leaq 0x28dfd(%rip), %rdx     # 0x6fa6c
pushq $0x1
popq %rsi
movq %rbx, %rdi
movl $0x400, %ecx            # imm = 0x400
jmp 0x46c96
movq %r12, %rdi
callq 0x122c0
leaq 0x28de1(%rip), %rdx     # 0x6fa6c
pushq $0x1
popq %rsi
movq %rbx, %rdi
movl $0x408, %ecx            # imm = 0x408
callq 0x1429e
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_O2/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 0x14804
decq %rax
movslq 0x148(%rbx), %rcx
subq %rcx, %rax
jbe 0x471d2
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
movq %r15, %rcx
callq 0x1491c
cmpl $0x0, (%r15)
jne 0x471c7
movq %r12, %rdi
movq %r15, %rsi
callq 0x149a8
cmpl $0x0, (%r15)
je 0x471d2
movq %r14, %rdi
callq 0x29d88
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x29d88
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x485ce
movl (%rcx), %eax
cmpl $0x7, %eax
je 0x485a7
cmpl $0x3, %eax
jne 0x485ed
addq $0x148, %rcx            # imm = 0x148
movq %rcx, %rdi
callq 0x14804
cmpq $0x1, %rax
je 0x4860f
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x347d5
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x4860f
cmpl $0x1, (%rbx)
jne 0x48619
cmpl $0x0, 0x148(%rbx)
jne 0x48619
jmp 0x4860f
movq (%r15), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2748d(%rip), %r8      # 0x6fa6c
pushq $0x4b
popq %rsi
movq %r14, %rdi
movl $0x9b4, %r9d            # imm = 0x9B4
jmp 0x4860a
movq (%r15), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2746e(%rip), %r8      # 0x6fa6c
pushq $0x49
popq %rsi
movq %r14, %rdi
movl $0x9c7, %r9d            # imm = 0x9C7
callq 0x142c0
movq %rbx, %rdi
callq 0x29d88
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4932a
cmpl $0x3, %eax
jne 0x49374
movq %r15, 0x10(%rsp)
leaq 0x148(%rbx), %rdi
movq %rdi, 0x8(%rsp)
callq 0x14804
movq %rax, %r15
decq %r15
je 0x4939c
movq 0x48(%r12), %rdi
movl %r15d, %edx
pushq $0x1b
popq %rsi
movq %r14, %rcx
callq 0x2a981
movq %rax, (%rbp)
movb $0x1, %bpl
cmpl $0x0, (%r14)
jne 0x4939e
movq 0x158(%rbx), %rax
movq %rax, (%r13)
movq 0x8(%rsp), %rdi
callq 0x14a53
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x458cb
movq 0x10(%rsp), %rcx
movq %rax, (%rcx)
jmp 0x4939e
movq 0x48(%r12), %rdi
movq 0x148(%rbx), %rdx
pushq $0x12
popq %rsi
xorl %ecx, %ecx
movq %r14, %r8
callq 0x2a819
movq %rax, (%rbp)
movb $0x1, %bpl
cmpl $0x0, (%r14)
jne 0x4939e
movq 0x158(%rbx), %rax
movq %rax, (%r13)
movq 0x148(%rbx), %rsi
movq %r12, %rdi
xorl %edx, %edx
movq %r14, %rcx
callq 0x4a690
movq %rax, (%r15)
jmp 0x4939e
movq (%r12), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x266e6(%rip), %r8      # 0x6fa6c
pushq $0x49
popq %rsi
movq %r14, %rdi
movl $0xd39, %r9d            # imm = 0xD39
callq 0x142c0
movb $0x1, %bpl
jmp 0x4939e
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x29d88
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_O2/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
leaq 0x8(%rsp), %rax
orq $-0x1, (%rax)
leaq 0x10(%rsp), %rdx
orq $-0x1, (%rdx)
leaq 0x18(%rsp), %r8
movq %rcx, %rsi
movq %rax, %rcx
movq %rbx, %r9
callq 0x49284
testb %al, %al
je 0x49452
cmpl $0x0, (%rbx)
jne 0x49452
movq 0x48(%r14), %rdi
movl %r15d, %ecx
pushq $0x12
popq %rsi
movq %r12, %rdx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x49452
movq %rax, %r13
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x4ab28
cmpl $0x0, (%rbx)
jne 0x49452
movq 0x10(%rsp), %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %r15, %rcx
movq %r15, %r8
movq %rbx, %r9
callq 0x314cd
cmpl $0x0, (%rbx)
je 0x49460
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x148(%rax), %r12
movq %rax, %rdi
callq 0x29d88
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 0x4abdd
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x7b
popq %rsi
callq 0x2a997
cmpl $0x0, (%rbx)
jne 0x4a4b2
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x35ac5
cmpl $0x0, (%rbx)
jne 0x4a4b2
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 0x2a981
cmpl $0x0, (%rbx)
je 0x4a4be
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x48(%r14), %rdi
pushq $0x7b
popq %rsi
movq %rax, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2a997
// File: /workspace/github_c_makefile_star2_O2/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)
pushq $0x1
popq %r9
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
movl %r9d, %r8d
callq 0x4a250
cmpl $0x0, (%rbx)
je 0x4a523
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
testq %r13, %r13
je 0x4a545
movq 0x48(%r15), %rdi
movl %r13d, %ecx
pushq $0x9
popq %rsi
movq %r12, %rdx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x4a515
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 0x4a452
// File: /workspace/github_c_makefile_star2_O2/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 0x4a6fd
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)
andl $0x0, 0x18(%rcx)
cmpl $0x0, (%r9)
je 0x4a704
retq
movq 0x48(%rdi), %rdi
movq 0xb8(%rdi), %rcx
pushq $0x9
popq %rsi
pushq $0x1
popq %r8
movq %rcx, %rdx
jmp 0x2a8c1
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/reference_type.c
// Function: subtilis_reference_type_swap
void subtilis_reference_type_swap(subtilis_parser_t *p, size_t reg1,
				  size_t reg2, int32_t limit,
				  subtilis_error_t *err)
{
	int32_t i;

	for (i = 0; i <= limit; i += 4) {
		subtilis_exp_swap_int32_mem(p, reg1, reg2, i, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %r13d, %r13d
cmpl %ebp, %r13d
jg 0x4a75c
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %r13d, %ecx
movq %rbx, %r8
callq 0x1ec07
addl $0x4, %r13d
cmpl $0x0, (%rbx)
je 0x4a73a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/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 0x4a7f4
movq 0x48(%r14), %rdi
movl %r12d, %ecx
pushq $0x12
popq %rsi
movq %r13, %rdx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x4a851
movq %rax, %r15
movq 0x48(%r14), %rdi
callq 0x2b774
movq %rax, (%rsp)
movq 0x48(%r14), %rdi
callq 0x2b774
movq 0x48(%r14), %rdi
pushq $0x43
popq %rsi
movq %r15, %rdx
movq %rax, %r15
movq %rax, %rcx
movq (%rsp), %r8
movq %rbx, %r9
callq 0x2a8c1
cmpl $0x0, (%rbx)
jne 0x4a851
movq 0x48(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2b781
cmpl $0x0, (%rbx)
jne 0x4a851
addl $0x8, %r12d
movq 0x48(%r14), %rdi
pushq $0x12
popq %rsi
movq %r13, %rdx
movq %r12, %rcx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x4a851
movq 0x48(%r14), %rdi
pushq $0x78
popq %rsi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x2a997
cmpl $0x0, (%rbx)
setne %al
xorb $0x1, %bpl
orb %al, %bpl
jne 0x4a851
movq 0x48(%r14), %rdi
movq (%rsp), %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b781
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/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
pushq $0x1d
popq %rsi
movq %r14, %rdx
callq 0x2a9a4
movq %r12, %rdi
callq 0x29d88
cmpl $0x0, (%rbx)
je 0x4a8a2
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 0x4a76b
// File: /workspace/github_c_makefile_star2_O2/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 0x4a8ea
movq 0x48(%r14), %rdi
movl %ecx, %ecx
pushq $0x9
popq %rsi
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x4a8fd
movq %rax, %rdx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rcx
callq 0x4a452
cmpl $0x0, (%rbx)
je 0x4a903
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x4a6c0
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/reference_type.c
// Function: subtilis_reference_type_new_ref
void subtilis_reference_type_new_ref(subtilis_parser_t *p,
				     const subtilis_type_t *type,
				     size_t dest_mem_reg, size_t dest_loc,
				     size_t source_reg, bool check_size,
				     subtilis_error_t *err)
{
	subtilis_reference_type_init_ref(p, dest_mem_reg, dest_loc, source_reg,
					 check_size, true, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_reference_type_push_reference(p, type, dest_mem_reg, dest_loc,
					       err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r9d, %eax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r13
movq 0x40(%rsp), %r15
movq %r15, (%rsp)
pushq $0x1
popq %r9
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
movl %eax, %r8d
callq 0x4a250
cmpl $0x0, (%r15)
je 0x4a961
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movq %r15, %r8
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4a8be
// File: /workspace/github_c_makefile_star2_O2/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 0x4a9af
pushq %rax
leaq 0x24903(%rip), %rsi     # 0x6f299
leaq 0x24303(%rip), %r9      # 0x6eca0
pushq $0x7
popq %rcx
xorl %r8d, %r8d
pushq %rax
pushq $0x1
callq 0x1de0d
popq %rcx
popq %rdx
popq %rax
retq
movq 0x48(%rdi), %rdi
pushq $0x79
popq %rsi
movq %rax, %rcx
jmp 0x2a997