LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_add
void subtilis_array_add(subtilis_parser_t *p, const char *var_name,
			const subtilis_type_t *type,
			const subtilis_type_t *el_type, size_t mem_reg,
			size_t loc, subtilis_exp_t *e, subtilis_exp_t **indices,
			size_t index_count, subtilis_error_t *err)
{
	subtilis_exp_t *offset;
	subtilis_exp_t *cur_val;

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

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

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

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

	subtilis_type_if_assign_to_mem(p, offset->exp.ir_op.reg, 0, e, err);

cleanup:
	subtilis_exp_delete(offset);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %rax
movq %rcx, %r12
movq %rdi, %r14
movq 0x48(%rsp), %rbx
movq 0x30(%rsp), %r13
movq 0x38(%rsp), %r9
movq %r8, %rcx
movq %rax, %r8
pushq %rbx
pushq 0x48(%rsp)
callq 0x4108f
addq $0x10, %rsp
cmpl $0x0, (%rbx)
je 0x4189f
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r15
movq 0x148(%rax), %rdx
movq %r14, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x343a4
cmpl $0x0, (%rbx)
jne 0x41901
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x34b18
cmpl $0x0, (%rbx)
jne 0x41901
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x35977
cmpl $0x0, (%rbx)
jne 0x41901
movq 0x148(%r15), %rsi
movq %r14, %rdi
xorl %edx, %edx
movq %rax, %rcx
movq %rbx, %r8
callq 0x34300
movq %r15, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x29d88
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_sub
void subtilis_array_sub(subtilis_parser_t *p, const char *var_name,
			const subtilis_type_t *type,
			const subtilis_type_t *el_type, size_t mem_reg,
			size_t loc, subtilis_exp_t *e, subtilis_exp_t **indices,
			size_t index_count, subtilis_error_t *err)
{
	subtilis_exp_t *offset;
	subtilis_exp_t *cur_val;

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

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

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

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

	subtilis_type_if_assign_to_mem(p, offset->exp.ir_op.reg, 0, e, err);

cleanup:
	subtilis_exp_delete(offset);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %rax
movq %rcx, %r12
movq %rdi, %r14
movq 0x48(%rsp), %rbx
movq 0x30(%rsp), %r13
movq 0x38(%rsp), %r9
movq %r8, %rcx
movq %rax, %r8
pushq %rbx
pushq 0x48(%rsp)
callq 0x4108f
addq $0x10, %rsp
cmpl $0x0, (%rbx)
je 0x41956
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r15
movq 0x148(%rax), %rdx
movq %r14, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x343a4
cmpl $0x0, (%rbx)
jne 0x419b8
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x34e98
cmpl $0x0, (%rbx)
jne 0x419b8
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x35977
cmpl $0x0, (%rbx)
jne 0x419b8
movq 0x148(%r15), %rsi
movq %r14, %rdi
xorl %edx, %edx
movq %rax, %rcx
movq %rbx, %r8
callq 0x34300
movq %r15, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x29d88
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: prv_check_arrays_compat
static void prv_check_arrays_compat(subtilis_parser_t *p,
				    const subtilis_type_t *el_type,
				    subtilis_exp_t *a1, subtilis_exp_t *a2,
				    subtilis_error_t *err)
{
	subtilis_type_t el_type2;

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

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

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

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

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

		subtilis_type_free(&el_type2);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movl (%rdx), %eax
cmpl (%rcx), %eax
je 0x42b35
movq %r8, %rbx
movq %rcx, %r12
movq %rsi, %r15
movq %rdi, %r14
movq %rcx, %rdi
callq 0x357cc
testb %al, %al
je 0x42b44
movq %rsp, %rdx
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rcx
callq 0x34108
cmpl $0x0, (%rbx)
jne 0x42b35
movq %rsp, %rsi
movq %r15, %rdi
callq 0x2d844
testb %al, %al
jne 0x42b2d
movq (%r14), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2ce76(%rip), %r8      # 0x6f992
pushq $0x41
popq %rsi
movq %rbx, %rdi
movl $0xb46, %r9d            # imm = 0xB46
callq 0x142c0
movq %rsp, %rdi
callq 0x2dc7c
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq (%r14), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2ce3d(%rip), %r8      # 0x6f992
pushq $0x41
popq %rsi
movq %rbx, %rdi
movl $0xb3c, %r9d            # imm = 0xB3C
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x142c0
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: prv_div_by_const
static size_t prv_div_by_const(subtilis_parser_t *p, size_t reg,
			       int32_t divisor, subtilis_error_t *err)
{
	subtilis_exp_t *a1;
	subtilis_exp_t *a2 = NULL;

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

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

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

	return reg;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebp
movq %rdi, %r15
movl %esi, %edi
movq %rcx, %rsi
callq 0x2a336
cmpl $0x0, (%r14)
je 0x42b99
pushq $-0x1
popq %r14
jmp 0x42bd5
movq %rax, %rbx
movl %ebp, %edi
movq %r14, %rsi
callq 0x2a369
cmpl $0x0, (%r14)
je 0x42bb2
pushq $-0x1
popq %r14
jmp 0x42bcd
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0x34efa
movq %rax, %rbx
movq 0x148(%rax), %r14
movq %rbx, %rdi
callq 0x29d88
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/array_type.c
// Function: subtilis_array_type_dup
void subtilis_array_type_dup(subtilis_exp_t *src, subtilis_exp_t *dst,
			     subtilis_error_t *err)
{
	subtilis_type_copy(&dst->type, &src->type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x2de8a
cmpl $0x0, (%r15)
jne 0x42f27
movq 0x158(%r14), %rdi
testq %rdi, %rdi
je 0x42f11
callq 0x120f0
leaq 0x1(%rax), %rdi
callq 0x121d0
movq %rax, 0x158(%rbx)
testq %rax, %rax
je 0x42f2d
movq 0x158(%r14), %rsi
movq %rax, %rdi
callq 0x12070
jmp 0x42f19
andq $0x0, 0x158(%rbx)
movq 0x148(%r14), %rax
movq %rax, 0x148(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2ca5e(%rip), %rdx     # 0x6f992
pushq $0x1
popq %rsi
movq %r15, %rdi
movl $0xc3c, %ecx            # imm = 0xC3C
popq %rbx
popq %r14
popq %r15
jmp 0x1429e
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/common/sizet_vector.c
// Function: subtilis_sizet_vector_append
void subtilis_sizet_vector_append(subtilis_sizet_vector_t *v, size_t val,
				  subtilis_error_t *err)
{
	size_t new_max;
	size_t *new_vals;

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

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

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

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, %r14
movq %r8, %r12
movq %rcx, 0x8(%rsp)
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %rbp
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
xorl %r15d, %r15d
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
jae 0x43047
movl 0xc(%rbx,%r15,4), %edi
movq %r14, %rsi
callq 0x2a369
movq %rax, 0x10(%rsp,%r15,8)
incq %r15
cmpl $0x0, (%r14)
je 0x43021
jmp 0x43068
leaq 0x10(%rsp), %r8
movq %rbp, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r12, %rcx
movq 0x8(%rsp), %r9
pushq %r14
pushq $0x0
callq 0x3f0d9
popq %rax
popq %rcx
xorl %r14d, %r14d
movslq 0x8(%rbx), %rax
cmpq %rax, %r14
jae 0x43083
movq 0x10(%rsp,%r14,8), %rdi
callq 0x29d88
incq %r14
jmp 0x4306b
addq $0x68, %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/rec_type.c
// Function: subtilis_rec_type_init_vector
void subtilis_rec_type_init_vector(subtilis_parser_t *p,
				   const subtilis_type_t *type, size_t mem_reg,
				   size_t loc, int32_t vec_dim,
				   subtilis_error_t *err)
{
	subtilis_ir_operand_t op;
	subtilis_exp_t *e = NULL;

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %rbp
movl %r8d, %edi
movq %r9, %rsi
callq 0x2a369
cmpl $0x0, (%r15)
je 0x430cc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
movq %r15, (%rsp)
movq %rbp, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rax, %rcx
movq %rbx, %r8
xorl %r9d, %r9d
callq 0x3f601
movq %r13, %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/rec_type.c
// Function: subtilis_rec_type_init_field
void subtilis_rec_type_init_field(subtilis_parser_t *p,
				  const subtilis_type_t *type,
				  subtilis_type_field_t *field, size_t mem_reg,
				  size_t loc, bool memset,
				  subtilis_error_t *err)
{
	subtilis_exp_t *e;

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, 0x4(%rsp)
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, %r12
movq 0x40(%rsp), %rbx
movq %rsi, %rdi
callq 0x357cc
testb %al, %al
je 0x43156
movq (%rbp), %rdx
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x42fe0
movq %r13, %rdi
callq 0x357ea
testb %al, %al
je 0x4318d
movl 0x10(%rbp), %r8d
testl %r8d, %r8d
js 0x4318d
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x43092
movq %r13, %rdi
callq 0x35808
testb %al, %al
je 0x431be
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
movq %rbx, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x33ebd
cmpl $0x16, (%r13)
jne 0x431ea
movzbl 0x4(%rsp), %r8d
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x43264
movq %r13, %rdi
callq 0x35655
testb %al, %al
jne 0x431fd
cmpl $0x9, (%r13)
jne 0x43241
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x33e86
cmpl $0x0, (%rbx)
je 0x4321f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34300
leaq 0x2c7af(%rip), %rdx     # 0x6f9f7
pushq $0xf
popq %rsi
pushq $0x6c
popq %rcx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1429e
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/rec_type.c
// Function: prv_rec_type_zero
static void prv_rec_type_zero(subtilis_parser_t *p, const subtilis_type_t *type,
			      size_t mem_reg, size_t loc, bool memset,
			      subtilis_error_t *err)
{
	if (memset)
		prv_uninit_fields(p, type, mem_reg, loc, err);
	else
		prv_init_fields(p, type, mem_reg, loc, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %rbx
movq %rcx, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, %r12
movq %rdi, 0x10(%rsp)
leaq 0x8(%rsi), %rax
movq %rax, 0x8(%rsp)
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %r14d, %r14d
testl %r8d, %r8d
je 0x4330e
cmpq 0x28(%r12), %r14
jae 0x43366
movq 0x18(%r12), %r15
addq %r13, %r15
movq %r15, %rdi
callq 0x35655
testb %al, %al
jne 0x432fe
cmpl $0x7, (%r15)
je 0x432fe
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x2e515
movq 0x20(%r12), %rdx
addq %rbp, %rdx
movl %eax, %r8d
addq 0x20(%rsp), %r8
movq %rbx, (%rsp)
movq 0x10(%rsp), %rdi
movq %r15, %rsi
movq 0x18(%rsp), %rcx
pushq $0x1
popq %r9
callq 0x43100
cmpl $0x0, (%rbx)
jne 0x43366
incq %r14
addq $0x18, %rbp
addq $0x148, %r13            # imm = 0x148
jmp 0x4329d
cmpq 0x28(%r12), %r14
jae 0x43366
movq 0x18(%r12), %r15
addq %r13, %r15
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x2e515
movq 0x20(%r12), %rdx
addq %rbp, %rdx
movl %eax, %r8d
addq 0x20(%rsp), %r8
movq %rbx, (%rsp)
movq 0x10(%rsp), %rdi
movq %r15, %rsi
movq 0x18(%rsp), %rcx
xorl %r9d, %r9d
callq 0x43100
incq %r14
addq $0x18, %rbp
addq $0x148, %r13            # imm = 0x148
cmpl $0x0, (%rbx)
je 0x4330e
addq $0x28, %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/rec_type.c
// Function: subtilis_rec_type_zero_body
void subtilis_rec_type_zero_body(subtilis_parser_t *p,
				 const subtilis_type_t *type, size_t mem_reg,
				 size_t loc, size_t zero_fill_size,
				 subtilis_error_t *err)
{
	bool memset = false;

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

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

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

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

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbp
movl %r8d, 0xc(%rsp)
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r13
movq %rsi, %rdi
callq 0x2e6d8
movq %rax, %r15
movq %r14, %rdi
callq 0x2e586
subq %r15, %rax
movq %r13, %rdi
cmpq $0xf, %rax
ja 0x43451
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, 0x10(%rsp)
movq %r12, %rcx
movq %r15, %r8
movq %rbp, %r9
callq 0x43375
jmp 0x43482
movq %rbx, %rsi
movq %r12, %rdx
movq %rbp, %rcx
callq 0x4ab28
cmpl $0x0, (%rbp)
jne 0x434c4
movq %rax, %rbx
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq %rbp, %rcx
callq 0x332f7
movq $0x0, 0x10(%rsp)
cmpl $0x0, (%rbp)
setne %al
movl 0xc(%rsp), %ecx
xorb $0x1, %cl
orb %al, %cl
jne 0x434c4
movq %r14, %rdi
callq 0x2e7c9
testb %al, %al
je 0x434c4
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq 0x10(%rsp), %rcx
movq %rbp, %r8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4a8be
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/rec_type.c
// Function: subtilis_rec_type_copy
void subtilis_rec_type_copy(subtilis_parser_t *p, const subtilis_type_t *type,
			    size_t dest_reg, size_t loc, size_t src_reg,
			    bool new_rec, subtilis_error_t *err)
{
	size_t zfs;
	subtilis_ir_operand_t op1;
	subtilis_ir_operand_t op2;

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, 0x14(%rsp)
movq %r8, 0x18(%rsp)
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movq 0x60(%rsp), %rbp
movq %rsi, %rdi
callq 0x2e6d8
movq %rax, %rbx
movq %r15, %rdi
callq 0x2e5bf
cmpq $0x11, %rbx
setae %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x437e0
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq 0x18(%rsp), %r8
movq %rbp, %r9
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x438f4
movq %r14, 0x20(%rsp)
movq %r15, %rdi
callq 0x2e586
subq %rbx, %rax
cmpq $0xf, %rax
ja 0x4381a
movq %rbp, (%rsp)
movzbl 0x14(%rsp), %r9d
movq %r13, %rdi
movq %r15, %rsi
movq 0x20(%rsp), %rdx
movq %r12, %rcx
movq 0x18(%rsp), %r8
callq 0x434d3
jmp 0x4383c
movq 0x48(%r13), %rdi
movl %r12d, %ecx
pushq $0x9
popq %rsi
movq 0x20(%rsp), %rdx
movq %rbp, %r8
callq 0x2a819
cmpl $0x0, (%rbp)
movq 0x18(%rsp), %rcx
je 0x4384b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl 0x14(%rsp), %r8d
movq %r13, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %rbp, %r9
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3346a
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/rec_type.c
// Function: subtilis_rec_type_tmp_copy
void subtilis_rec_type_tmp_copy(subtilis_parser_t *p,
				const subtilis_type_t *type, size_t dest_reg,
				size_t loc, size_t src_reg,
				subtilis_error_t *err)
{
	if (subtilis_type_rec_is_scalar(type) &&
	    subtilis_type_rec_zero_fill_size(type) <= 16)
		subtilis_type_rec_copy_ref(p, type, dest_reg, loc, src_reg,
					   true, err);
	else
		prv_memcpy_struct(p, type, dest_reg, loc, src_reg, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movq %rsi, %rdi
callq 0x2e5bf
testb %al, %al
je 0x438d2
movq %r13, %rdi
callq 0x2e6d8
cmpq $0x10, %rax
ja 0x438d2
movq %r15, (%rsp)
pushq $0x1
popq %r9
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x434d3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %rbx, %r8
movq %r15, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x438f4
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/rec_type.c
// Function: prv_memcpy_struct
static void prv_memcpy_struct(subtilis_parser_t *p, const subtilis_type_t *type,
			      size_t dest_reg, size_t loc, size_t src_reg,
			      subtilis_error_t *err)
{
	subtilis_ir_operand_t op;
	size_t size_reg;

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

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

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

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

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

	return fn_name;
}

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

	if (!subtilis_type_rec_need_deref(type))
		return;

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

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x2e7c9
testb %al, %al
je 0x43a5c
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x4ab28
cmpl $0x0, (%rbx)
je 0x43a66
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x33177
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/rec_type.c
// Function: subtilis_rec_type_ref
void subtilis_rec_type_ref(subtilis_parser_t *p, const subtilis_type_t *type,
			   size_t mem_reg, size_t loc, subtilis_error_t *err)
{
	if (subtilis_type_rec_need_ref_fn(type)) {
		mem_reg = subtilis_reference_get_pointer(p, mem_reg, loc, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;

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

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

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

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %rbx
movq %rcx, 0x20(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, %r12
movq %rdi, 0x8(%rsp)
leaq 0x8(%rsi), %rax
movq %rax, 0x18(%rsp)
xorl %ebp, %ebp
xorl %r14d, %r14d
cmpq 0x28(%r12), %r14
jae 0x43bc2
movq 0x18(%r12), %r15
addq %rbp, %r15
movq %r15, %rdi
callq 0x35808
testb %al, %al
jne 0x43b51
cmpl $0x16, (%r15)
jne 0x43bb3
movq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x2e515
movl %eax, %r13d
addq 0x20(%rsp), %r13
movq %r15, %rdi
callq 0x35808
testb %al, %al
je 0x43b96
movq %r15, %rdi
callq 0x357cc
xorb $0x1, %al
movzbl %al, %ecx
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
movq %rbx, %r8
callq 0x4a76b
jmp 0x43bae
movq 0x8(%rsp), %rdi
movq %r15, %rsi
movq 0x10(%rsp), %rdx
movq %r13, %rcx
movq %rbx, %r8
callq 0x43a80
cmpl $0x0, (%rbx)
jne 0x43bc2
incq %r14
addq $0x148, %rbp            # imm = 0x148
jmp 0x43b2c
addq $0x28, %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/rec_type.c
// Function: subtilis_rec_type_copy_ret
void subtilis_rec_type_copy_ret(subtilis_parser_t *p, const subtilis_type_t *t,
				size_t dest_reg, size_t source_reg,
				subtilis_error_t *err)
{
	subtilis_rec_type_tmp_copy(p, t, dest_reg, 0, source_reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (!subtilis_type_rec_need_deref(t))
		return;

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

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

	subtilis_reference_inc_cleanup_stack(p, t, err);
}

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

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

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

cleanup:
	subtilis_exp_delete(e);
}

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

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

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

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

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

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

cleanup:
	subtilis_type_free(&type);

free_e:

	subtilis_exp_delete(e);

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %rsi
callq 0x458c4
cmpl $0x0, (%rbx)
jne 0x4426c
movq 0x68(%r15), %rdi
leaq 0x8(%rsp), %r13
movq %r13, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x2cee3
movq %rax, %r12
movq %r13, %rdi
callq 0x2dc7c
cmpl $0x0, (%rbx)
jne 0x44262
movq (%r12), %rcx
pushq $0x2
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
movq %r14, %r8
movq %rbx, %r9
callq 0x4650f
cmpl $0x0, (%rbx)
je 0x44287
xorl %r14d, %r14d
leaq 0x8(%rsp), %rdi
callq 0x2dc7c
movq %r14, %rdi
callq 0x29d88
xorl %eax, %eax
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq (%r12), %rdx
pushq $0x2
popq %rsi
movq %r15, %rdi
movq %rbx, %rcx
callq 0x4ab28
cmpl $0x0, (%rbx)
jne 0x44274
addq $0x8, %r12
movq %r12, %rdi
movl %eax, %esi
movq %rbx, %rdx
callq 0x2a226
jmp 0x44276
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/string_type_if.c
// Function: prv_dup_const
static void prv_dup_const(subtilis_exp_t *e1, subtilis_exp_t *e2,
			  subtilis_error_t *err)
{
	subtilis_buffer_init(&e2->exp.str, e1->exp.str.granularity);
	subtilis_buffer_append(&e2->exp.str,
			       subtilis_buffer_get_string(&e1->exp.str),
			       subtilis_buffer_get_size(&e1->exp.str), err);
}

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

	return prv_exp_to_var_const(p, e, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rsi, %rbx
movq %rdi, %r15
cmpl $0x7, (%rdx)
jne 0x4434d
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x441f4
movq %rdx, %r12
movq %rbx, %rdi
callq 0x2dcbb
movq %rax, %r13
movq %r12, %rdi
callq 0x2dcbb
movq (%r15), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x2b6dd(%rip), %r10     # 0x6fa52
pushq $0x45
popq %rsi
movq %r14, %rdi
movq %r13, %rdx
movq %rax, %rcx
pushq $0x4f
pushq %r10
callq 0x140cd
popq %rax
popq %rcx
movq %rbx, %rdi
callq 0x29d88
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/string_type_if.c
// Function: prv_add_const
static subtilis_exp_t *prv_add_const(subtilis_parser_t *p, subtilis_exp_t *a1,
				     subtilis_exp_t *a2, bool swapped,
				     subtilis_error_t *err)
{
	size_t len;

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

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %r14
movq %rdx, %r15
movq %rsi, %rbx
movl $0x148, %r12d           # imm = 0x148
leaq (%rdx,%r12), %rdi
callq 0x14804
movq %rax, %r13
addq %rbx, %r12
movq %r12, %rdi
callq 0x149da
movq 0x150(%r15), %rsi
addq $0x18, %rsi
movq %r12, %rdi
movq %r13, %rdx
movq %r14, %rcx
callq 0x14795
movq %r15, %rdi
callq 0x29d88
cmpl $0x0, (%r14)
je 0x44400
movq %rbx, %rdi
callq 0x29d88
xorl %ebx, %ebx
movq %rbx, %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_if.c
// Function: prv_eq_const
static subtilis_exp_t *prv_eq_const(subtilis_parser_t *p, subtilis_exp_t *a1,
				    subtilis_exp_t *a2, subtilis_error_t *err)
{
	int32_t res;

	/* a2 must be const */

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

	subtilis_exp_delete(a2);
	return a1;
}

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

	/* a2 must be const */

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

	subtilis_exp_delete(a2);
	return a1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
cmpl $0x3, (%rdx)
jne 0x445db
movl $0x148, %r15d           # imm = 0x148
leaq (%rbx,%r15), %r12
movq %r12, %rdi
callq 0x14a53
movq %rax, %r13
addq %r14, %r15
movq %r15, %rdi
callq 0x14a53
movq %r13, %rdi
movq %rax, %rsi
callq 0x12160
xorl %ebp, %ebp
testl %eax, %eax
setg %bpl
negl %ebp
movq %r12, %rdi
callq 0x14a01
movl %ebp, 0x148(%rbx)
movl $0x1, (%rbx)
movq %r14, %rdi
callq 0x29d88
jmp 0x44616
movq %r8, %r15
movq %rdi, %r12
movq %rbx, %rdi
callq 0x29d88
movq %r14, %rdi
callq 0x29d88
movq (%r12), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2b44f(%rip), %r8      # 0x6fa52
pushq $0x19
popq %rsi
movq %r15, %rdi
movl $0xca, %r9d
callq 0x142c0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/string_type_if.c
// Function: prv_append
static void prv_append(subtilis_parser_t *p, subtilis_exp_t *a1,
		       subtilis_exp_t *a2, subtilis_exp_t *gran,
		       subtilis_error_t *err)
{
	if (gran) {
		subtilis_error_set_too_many_args(err, 3, 2, p->l->stream->name,
						 p->l->line);
		subtilis_exp_delete(gran);
		subtilis_exp_delete(a2);
		subtilis_exp_delete(a1);
		return;
	}
	subtilis_string_type_add_eq(p, a1->exp.ir_op.reg, 0, a2, err);
	subtilis_exp_delete(a1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
testq %rcx, %rcx
je 0x44917
movq %rcx, %r15
movq (%rdi), %rcx
movq 0x30(%rcx), %rax
movl 0x38(%rcx), %r9d
leaq 0x2b16a(%rip), %r10     # 0x6fa52
pushq $0x29
popq %rsi
pushq $0x3
popq %rdx
pushq $0x2
popq %rcx
movq %r8, %rdi
movq %rax, %r8
pushq $0x1c9                  # imm = 0x1C9
pushq %r10
callq 0x14179
popq %rax
popq %rcx
movq %r15, %rdi
callq 0x29d88
movq %r14, %rdi
callq 0x29d88
jmp 0x44928
movq 0x148(%rbx), %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x493b7
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x29d88
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/string_type_if.c
// Function: prv_load_from_mem
static subtilis_exp_t *prv_load_from_mem(subtilis_parser_t *p,
					 const subtilis_type_t *type,
					 size_t mem_reg, size_t loc,
					 subtilis_error_t *err)
{
	size_t reg;

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

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

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

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

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %rdx
movq %rdi, %r14
movq 0x48(%rdi), %rdi
movl %ecx, %esi
xorl %ecx, %ecx
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x4556e
movq %rax, %r15
movq 0x48(%r14), %rdi
movl %ebp, %esi
movq %r12, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
je 0x45579
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x48(%r14), %rdi
pushq $0x2b
popq %rsi
movq %r15, %rdx
movq %rax, %rcx
movq %rbx, %r8
callq 0x2a819
leaq 0x29333(%rip), %rdi     # 0x6e8c8
movl %eax, %esi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2a226
// File: /workspace/github_c_makefile_star2_O2/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 0x4595c
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 0x2d4e8
cmpl $0x0, (%rbx)
je 0x45974
movq %r14, %rdi
callq 0x122c0
jmp 0x45971
leaq 0x2a109(%rip), %rdx     # 0x6fa6c
pushq $0x1
popq %rsi
pushq $0x36
popq %rcx
movq %rbx, %rdi
callq 0x1429e
pushq $-0x1
popq %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: 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 0x2a369
cmpl $0x0, (%rbx)
je 0x459bd
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 0x3415f
movq %rax, %r12
cmpl $0x0, (%rbx)
jne 0x45a14
movq 0x148(%r12), %rcx
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %r8
callq 0x4acc2
cmpl $0x0, (%rbx)
setne %al
xorb $0x1, %bpl
orb %al, %bpl
jne 0x45a14
movq %r13, %rdi
movq (%rsp), %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x4a8be
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x29d88