LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/string_type.c
// Function: prv_add_string_constant
static size_t prv_add_string_constant(subtilis_parser_t *p, const char *str,
				      size_t len, subtilis_error_t *err)
{
	uint8_t *buf;
	size_t id;

	buf = malloc(len);
	if (!buf) {
		subtilis_error_set_oom(err);
		return SIZE_MAX;
	}
	memcpy(buf, str, len);

	id = subtilis_constant_pool_add(p->prog->constant_pool, buf, len, false,
					err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	return id;

cleanup:

	free(buf);
	return SIZE_MAX;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r12
movq %rdx, %rdi
callq 0x121d0
testq %rax, %rax
je 0x4827a
movq %rax, %r14
movq %rax, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x121b0
movq 0x58(%r12), %rax
movq 0x28(%rax), %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x2ed52
cmpl $0x0, (%rbx)
je 0x4829a
movq %r14, %rdi
callq 0x122c0
jmp 0x48293
leaq 0x2d85f(%rip), %rdx     # 0x75ae0
movq %rbx, %rdi
movl $0x1, %esi
movl $0x36, %ecx
callq 0x145a4
movq $-0x1, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/string_type.c
// Function: subtilis_string_type_zero_ref
void subtilis_string_type_zero_ref(subtilis_parser_t *p,
				   const subtilis_type_t *type, size_t mem_reg,
				   size_t loc, bool push, subtilis_error_t *err)
{
	subtilis_exp_t *zero = NULL;

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

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

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

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

cleanup:

	subtilis_exp_delete(zero);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
xorl %edi, %edi
movq %r9, %rsi
callq 0x2b7af
cmpl $0x0, (%rbx)
je 0x482e5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, (%rsp)
movq %r13, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x36119
movq %rax, %r12
cmpl $0x0, (%rbx)
jne 0x4833c
movq 0x148(%r12), %rcx
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %r8
callq 0x4d8dd
cmpl $0x0, (%rbx)
setne %al
xorb $0x1, %bpl
orb %al, %bpl
jne 0x4833c
movq %r13, %rdi
movq (%rsp), %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x4d4a6
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b166
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/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
movq $0x0, (%rsp)
movl $0x7, 0x8(%rsp)
cmpl $0x0, (%rdx)
jne 0x48582
movq %rdx, %rbx
movq %rdi, %r15
movq 0x68(%rdi), %rdi
leaq 0x8(%rsp), %r13
movq %rsp, %rdx
movq %r13, %rsi
movq %rbx, %rcx
callq 0x2e6f1
movq %rax, %r12
movq %r13, %rdi
callq 0x2f56e
cmpl $0x0, (%rbx)
jne 0x48582
movq (%r12), %rdx
movl $0x2, %esi
movq %r15, %rdi
movq %r14, %rcx
movq %rbx, %r8
callq 0x485bd
cmpl $0x0, (%rbx)
jne 0x48582
movq (%r12), %rdx
movl $0x2, %esi
movq %r15, %rdi
movq %rbx, %rcx
callq 0x4d71f
cmpl $0x0, (%rbx)
je 0x485a6
movq (%rsp), %rdi
callq 0x122c0
movq %r14, %rdi
callq 0x2b166
xorl %eax, %eax
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
addq $0x8, %r12
movq (%rsp), %rdx
movq %r12, %rdi
movl %eax, %esi
movq %rbx, %rcx
callq 0x2b627
jmp 0x48595
// File: /workspace/github_c_makefile_star2_O3/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 0x367cf
cmpl $0x0, (%rbx)
jne 0x485f7
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x36119
cmpl $0x0, (%rbx)
je 0x48606
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x1, %edi
movq %rbx, %rsi
callq 0x2b7af
movq %rax, %r12
cmpl $0x0, (%rbx)
jne 0x4867e
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x36119
movq %rax, %r12
cmpl $0x0, (%rbx)
jne 0x4867e
movq 0x148(%r12), %r8
movq %rbx, (%rsp)
leaq 0x2c561(%rip), %rsi     # 0x74ba8
movq %r15, %rdi
movq %rbp, %rdx
movq %r13, %rcx
movl $0x1, %r9d
callq 0x4ddaa
cmpl $0x0, (%rbx)
jne 0x4867e
movq 0x48(%r15), %rdi
movq 0x148(%r14), %rdx
movl $0x16, %esi
movq %rax, %rcx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x2bd42
movq %r12, %rdi
callq 0x2b166
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b166
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/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 0x14d01
cmpl $0x0, (%r14)
jne 0x486f0
movq %r12, %rdi
callq 0x14db1
movq %rax, %r13
movq %r12, %rdi
callq 0x14b57
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0x481e7
cmpl $0x0, (%r14)
je 0x48708
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x2b166
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl %eax, %edi
movq %r14, %rsi
callq 0x2b71f
movq %rax, %r14
jmp 0x486f3
// File: /workspace/github_c_makefile_star2_O3/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 0x14b57
cmpq $0x1, %rax
jne 0x48da1
movzbl %r12b, %r8d
leaq 0x2be28(%rip), %rsi     # 0x74ba8
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 0x482aa
movq %rax, %r13
movq %rbp, 0x18(%rsp)
movq %r15, 0x20(%rsp)
decq %r13
movq %r14, %rdi
callq 0x14db1
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %rdx
movq 0x10(%rsp), %r15
movq %r15, %rcx
callq 0x4821f
cmpl $0x0, (%r15)
jne 0x48dec
movq %rax, %rbp
movq %rbx, %r14
movl %r13d, %edi
movq %r15, %rsi
callq 0x2b7af
cmpl $0x0, (%r15)
je 0x48dfb
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 0x36119
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0x48e4f
movq 0x48(%r14), %rdi
movl %ebp, %edx
movl $0x7d, %esi
movq %r15, %rcx
callq 0x2be09
cmpl $0x0, (%r15)
jne 0x48e4f
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 0x4849e
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b166
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/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 0x48e92
cmpl $0x7, %eax
jne 0x48eaf
movq 0x148(%rbx), %r8
movq %r9, (%rsp)
movl $0x1, %r9d
callq 0x4d4fd
jmp 0x48ed3
leaq 0x148(%rbx), %rax
movq %rdx, %rsi
movq %rcx, %rdx
movq %rax, %rcx
movl $0x1, %r8d
callq 0x48d45
jmp 0x48ed3
movq (%rdi), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2cc20(%rip), %r8      # 0x75ae0
movq %r9, %rdi
movl $0x49, %esi
movl $0x2a8, %r9d            # imm = 0x2A8
callq 0x145c8
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x2b166
// File: /workspace/github_c_makefile_star2_O3/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 0x48f1c
cmpl $0x7, %eax
jne 0x48f36
movq 0x148(%rbx), %rax
movq %r9, (%rsp)
movq %rdx, %rsi
movq %rcx, %rdx
movq %rax, %rcx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x4cdcc
jmp 0x48f5a
leaq 0x148(%rbx), %rax
movq %rdx, %rsi
movq %rcx, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
callq 0x48d45
jmp 0x48f5a
movq (%rdi), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2cb99(%rip), %r8      # 0x75ae0
movq %r9, %rdi
movl $0x49, %esi
movl $0x2c0, %r9d            # imm = 0x2C0
callq 0x145c8
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x2b166
// File: /workspace/github_c_makefile_star2_O3/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 0x4db2c
cmpl $0x0, (%rbx)
je 0x4902a
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2b166
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 0x48f67
// File: /workspace/github_c_makefile_star2_O3/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 0x49079
movq 0x148(%rbx), %rax
movq %r9, (%rsp)
movq %rdx, %rsi
movq %rcx, %rdx
movq %rax, %rcx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x4cdcc
jmp 0x49092
leaq 0x2ca60(%rip), %rdx     # 0x75ae0
movq %r9, %rdi
movl $0xf, %esi
movl $0x2f5, %ecx            # imm = 0x2F5
callq 0x145a4
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x2b166
// File: /workspace/github_c_makefile_star2_O3/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 0x490f2
cmpl $0x7, %eax
jne 0x49116
movq 0x48(%rdi), %rdi
movq 0x148(%rbx), %rdx
xorl %r15d, %r15d
movl $0x12, %esi
xorl %ecx, %ecx
movq %r14, %r8
callq 0x2bc8f
cmpl $0x0, (%r14)
jne 0x4913d
movl %eax, %edi
movq %r14, %rsi
callq 0x2b71f
jmp 0x49111
leaq 0x148(%rbx), %rdi
callq 0x14b57
xorl %ecx, %ecx
testl %eax, %eax
setg %cl
subl %ecx, %eax
movl %eax, %edi
movq %r14, %rsi
callq 0x2b7af
movq %rax, %r15
jmp 0x4913d
movq (%rdi), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2c9b9(%rip), %r8      # 0x75ae0
movq %r14, %rdi
movl $0x49, %esi
movl $0x31e, %r9d            # imm = 0x31E
callq 0x145c8
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x2b166
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x49293
movq %rdi, %r15
cmpl $0x7, %eax
jne 0x492c6
movq 0x148(%rbx), %r13
movq 0x48(%r15), %rdi
xorl %ebp, %ebp
movl $0x12, %esi
movq %r13, %rdx
xorl %ecx, %ecx
movq %r14, %r8
callq 0x2bc8f
cmpl $0x0, (%r14)
jne 0x492ec
movq %rax, %r12
movq 0x48(%r15), %rdi
callq 0x2cc99
movq %rax, %rbp
movq 0x48(%r15), %rdi
callq 0x2cc99
movq %rax, 0x10(%rsp)
movq 0x48(%r15), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1b, %esi
movq %r14, %rcx
callq 0x2be09
cmpl $0x0, (%r14)
jne 0x492ea
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 0x2bd42
cmpl $0x0, (%r14)
jne 0x492ea
movq %rbp, %r12
movq 0x48(%r15), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
callq 0x2cca6
cmpl $0x0, (%r14)
jne 0x492ea
movq 0x48(%r15), %rdi
movl $0x4, %ecx
movl $0x12, %esi
movq %r13, %rdx
movq %r14, %r8
callq 0x2bc8f
cmpl $0x0, (%r14)
jne 0x492ea
movq 0x48(%r15), %rdi
xorl %ebp, %ebp
movl $0x11, %esi
movq 0x8(%rsp), %rdx
movq %rax, %rcx
xorl %r8d, %r8d
movq %r14, %r9
callq 0x2bd42
cmpl $0x0, (%r14)
jne 0x492ec
movq 0x48(%r15), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2cca6
cmpl $0x0, (%r14)
jne 0x492ea
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x2b71f
jmp 0x492c1
leaq 0x148(%rbx), %rdi
callq 0x14b57
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
cmpl $0x2, %eax
jl 0x492b9
movq 0x150(%rbx), %rax
movq 0x8(%rax), %rcx
movzbl 0x18(%rax,%rcx), %edi
movq %r14, %rsi
callq 0x2b7af
movq %rax, %rbp
jmp 0x492ec
movq (%r15), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2c809(%rip), %r8      # 0x75ae0
movq %r14, %rdi
movl $0x49, %esi
movl $0x379, %r9d            # imm = 0x379
callq 0x145c8
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x2b166
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_O3/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 0x2bc8f
cmpl $0x0, (%r14)
jne 0x493dd
movq %rax, %r13
movq 0x48(%r15), %rdi
callq 0x2cc99
movq %rax, %r12
movq 0x48(%r15), %rdi
callq 0x2cc99
movq %rax, %rbp
movq 0x48(%r15), %rdi
movl $0x43, %esi
movq %r13, %rdx
movq %rax, %rcx
movq %r12, %r8
movq %r14, %r9
callq 0x2bd42
cmpl $0x0, (%r14)
jne 0x493dd
movq 0x48(%r15), %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x2cca6
cmpl $0x0, (%r14)
jne 0x493dd
movq 0x48(%r15), %rdi
movq 0x148(%rbx), %rdx
movl $0x4, %ecx
movl $0x12, %esi
movq %r14, %r8
callq 0x2bc8f
cmpl $0x0, (%r14)
jne 0x493dd
movq 0x48(%r15), %rdi
movl $0x1f, %esi
movq %rax, %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x2be2c
cmpl $0x0, (%r14)
jne 0x493dd
movq 0x48(%r15), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2cca6
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b166
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/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 0x14b57
cmpq $0x1, %rax
je 0x4948c
movq %rax, %r12
decq %r12
movq %r13, %rdi
callq 0x14db1
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x4821f
cmpl $0x0, (%r14)
jne 0x4948c
movq 0x48(%r15), %rdi
movl %eax, %edx
movl $0x7d, %esi
movq %r14, %rcx
callq 0x2be09
cmpl $0x0, (%r14)
jne 0x4948c
movq %rax, %r13
movq 0x48(%r15), %rdi
movl %r12d, %edx
movl $0x1b, %esi
movq %r14, %rcx
callq 0x2be09
cmpl $0x0, (%r14)
jne 0x4948c
movq 0x48(%r15), %rdi
movl $0x1f, %esi
movq %r13, %rdx
movq %rax, %rcx
movq %r14, %r8
callq 0x2be2c
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2b166
// File: /workspace/github_c_makefile_star2_O3/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 0x49527
movq %rax, %r12
movabsq $0x706d636d656d5f, %rax # imm = 0x706D636D656D5F
movq %rax, (%r12)
movl $0x48, %edi
callq 0x121d0
testq %rax, %rax
je 0x4953d
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 0x2b411(%rip), %r9      # 0x74918
movq %r14, %rdi
movq %r12, %rsi
movl $0x3, %edx
xorl %ecx, %ecx
movq %rax, %r8
pushq %rbx
pushq $0x1
pushq $0x3
callq 0x2b1aa
addq $0x28, %rsp
jmp 0x49564
leaq 0x2c5b2(%rip), %rdx     # 0x75ae0
movq %rbx, %rdi
movl $0x1, %esi
movl $0x3dd, %ecx            # imm = 0x3DD
jmp 0x49559
movq %r12, %rdi
callq 0x122c0
leaq 0x2c594(%rip), %rdx     # 0x75ae0
movq %rbx, %rdi
movl $0x1, %esi
movl $0x3e5, %ecx            # imm = 0x3E5
callq 0x145a4
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_O3/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 0x4960c
movq %rax, %r12
movabsq $0x657261706d6f635f, %rax # imm = 0x657261706D6F635F
movq %rax, (%r12)
movb $0x0, 0x8(%r12)
movl $0x60, %edi
callq 0x121d0
testq %rax, %rax
je 0x49622
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 0x2b32e(%rip), %r9      # 0x74918
movq 0x8(%rsp), %rdi
movq %r12, %rsi
movl $0x4, %edx
xorl %ecx, %ecx
movq %rax, %r8
pushq %rbx
pushq $0x1
pushq $0x4
callq 0x2b1aa
addq $0x28, %rsp
jmp 0x49649
leaq 0x2c4cd(%rip), %rdx     # 0x75ae0
movq %rbx, %rdi
movl $0x1, %esi
movl $0x400, %ecx            # imm = 0x400
jmp 0x4963e
movq %r12, %rdi
callq 0x122c0
leaq 0x2c4af(%rip), %rdx     # 0x75ae0
movq %rbx, %rdi
movl $0x1, %esi
movl $0x408, %ecx            # imm = 0x408
callq 0x145a4
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_O3/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 0x14b57
decq %rax
movslq 0x148(%rbx), %rcx
subq %rcx, %rax
jbe 0x49b9c
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
movq %r15, %rcx
callq 0x14c71
cmpl $0x0, (%r15)
jne 0x49b91
movq %r12, %rdi
movq %r15, %rsi
callq 0x14d01
cmpl $0x0, (%r15)
je 0x49b9c
movq %r14, %rdi
callq 0x2b166
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x2b166
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/string_type.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, %esi
jne 0x4b023
movl (%rcx), %eax
cmpl $0x7, %eax
je 0x4affc
cmpl $0x3, %eax
jne 0x4b044
addq $0x148, %rcx            # imm = 0x148
movq %rcx, %rdi
callq 0x14b57
cmpq $0x1, %rax
je 0x4b068
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x367cf
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x4b068
cmpl $0x1, (%rbx)
jne 0x4b072
cmpl $0x0, 0x148(%rbx)
jne 0x4b072
jmp 0x4b068
movq (%r15), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2aaac(%rip), %r8      # 0x75ae0
movq %r14, %rdi
movl $0x4b, %esi
movl $0x9b4, %r9d            # imm = 0x9B4
jmp 0x4b063
movq (%r15), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2aa8b(%rip), %r8      # 0x75ae0
movq %r14, %rdi
movl $0x49, %esi
movl $0x9c7, %r9d            # imm = 0x9C7
callq 0x145c8
movq %rbx, %rdi
callq 0x2b166
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2915d(%rip), %rsi     # 0x74ba8
movq %r8, %rcx
callq 0x2e6f1
cmpl $0x0, (%r14)
jne 0x4ba97
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 0x4c9fa
cmpl $0x0, (%r14)
jne 0x4ba97
movq (%rbp), %rdx
movl $0x2, %esi
movq %r12, %rdi
movq %r14, %rcx
callq 0x4d71f
cmpl $0x0, (%r14)
je 0x4bac2
movq 0x10(%rsp), %rdi
callq 0x122c0
movq %r15, %rdi
callq 0x2b166
movq %rbx, %rdi
callq 0x2b166
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rdx
leaq 0x290da(%rip), %rdi     # 0x74ba8
movl %eax, %esi
movq %r14, %rcx
callq 0x2b627
jmp 0x4bab3
// File: /workspace/github_c_makefile_star2_O3/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 0x4be35
cmpl $0x3, %eax
jne 0x4be81
movq %r15, 0x10(%rsp)
leaq 0x148(%rbx), %rdi
movq %rdi, 0x8(%rsp)
callq 0x14b57
movq %rax, %r15
decq %r15
je 0x4beab
movq 0x48(%r12), %rdi
movl %r15d, %edx
movl $0x1b, %esi
movq %r14, %rcx
callq 0x2be09
movq %rax, (%rbp)
movb $0x1, %bpl
cmpl $0x0, (%r14)
jne 0x4bead
movq 0x158(%rbx), %rax
movq %rax, (%r13)
movq 0x8(%rsp), %rdi
callq 0x14db1
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x481e7
movq 0x10(%rsp), %rcx
movq %rax, (%rcx)
jmp 0x4bead
movq 0x48(%r12), %rdi
movq 0x148(%rbx), %rdx
movl $0x12, %esi
xorl %ecx, %ecx
movq %r14, %r8
callq 0x2bc8f
movq %rax, (%rbp)
movb $0x1, %bpl
cmpl $0x0, (%r14)
jne 0x4bead
movq 0x158(%rbx), %rax
movq %rax, (%r13)
movq 0x148(%rbx), %rsi
movq %r12, %rdi
xorl %edx, %edx
movq %r14, %rcx
callq 0x4d258
movq %rax, (%r15)
jmp 0x4bead
movq (%r12), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x29c4d(%rip), %r8      # 0x75ae0
movq %r14, %rdi
movl $0x49, %esi
movl $0xd39, %r9d            # imm = 0xD39
callq 0x145c8
movb $0x1, %bpl
jmp 0x4bead
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x2b166
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_O3/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 0x4bd89
testb %al, %al
je 0x4bf68
cmpl $0x0, (%rbx)
jne 0x4bf68
movq 0x48(%r14), %rdi
movl %r15d, %ecx
movl $0x12, %esi
movq %r12, %rdx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x4bf68
movq %rax, %r13
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x4d71f
cmpl $0x0, (%rbx)
jne 0x4bf68
movq 0x10(%rsp), %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %r15, %rcx
movq %r15, %r8
movq %rbx, %r9
callq 0x331a0
cmpl $0x0, (%rbx)
je 0x4bf76
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x148(%rax), %r12
movq %rax, %rdi
callq 0x2b166
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 0x4d7ec
// File: /workspace/github_c_makefile_star2_O3/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 0x2be1f
cmpl $0x0, (%rbx)
jne 0x4d04b
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x379b8
cmpl $0x0, (%rbx)
jne 0x4d04b
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 0x2be09
cmpl $0x0, (%rbx)
je 0x4d057
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 0x2be1f
// File: /workspace/github_c_makefile_star2_O3/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 0x4cdcc
cmpl $0x0, (%rbx)
je 0x4d0c3
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
testq %r13, %r13
je 0x4d0e7
movq 0x48(%r15), %rdi
movl %r13d, %ecx
movl $0x9, %esi
movq %r12, %rdx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x4d0b5
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 0x4cfe9
// File: /workspace/github_c_makefile_star2_O3/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 0x4d2cc
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 0x4d2d3
retq
movq 0x48(%rdi), %rdi
movq 0xb8(%rdi), %rcx
movl $0x1, %r8d
movl $0x9, %esi
movq %rcx, %rdx
jmp 0x2bd42
// File: /workspace/github_c_makefile_star2_O3/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 0x4d3d6
movq 0x48(%r14), %rdi
movl %r12d, %ecx
movl $0x12, %esi
movq %r13, %rdx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x4d437
movq %rax, %r15
movq 0x48(%r14), %rdi
callq 0x2cc99
movq %rax, (%rsp)
movq 0x48(%r14), %rdi
callq 0x2cc99
movq 0x48(%r14), %rdi
movl $0x43, %esi
movq %r15, %rdx
movq %rax, %r15
movq %rax, %rcx
movq (%rsp), %r8
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
jne 0x4d437
movq 0x48(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2cca6
cmpl $0x0, (%rbx)
jne 0x4d437
addl $0x8, %r12d
movq 0x48(%r14), %rdi
movl $0x12, %esi
movq %r13, %rdx
movq %r12, %rcx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x4d437
movq 0x48(%r14), %rdi
movl $0x78, %esi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x2be1f
cmpl $0x0, (%rbx)
setne %al
xorb $0x1, %bpl
orb %al, %bpl
jne 0x4d437
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 0x2cca6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/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 0x2be2c
movq %r12, %rdi
callq 0x2b166
cmpl $0x0, (%rbx)
je 0x4d48a
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 0x4d349
// File: /workspace/github_c_makefile_star2_O3/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 0x4d4d4
movq 0x48(%r14), %rdi
movl %ecx, %ecx
movl $0x9, %esi
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x4d4e7
movq %rax, %rdx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rcx
callq 0x4cfe9
cmpl $0x0, (%rbx)
je 0x4d4ed
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x4d28c