LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x453cb
movq %r8, %rbx
movq %rcx, %r12
movq %rsi, %r15
movq %rdi, %r14
movq %rcx, %rdi
callq 0x377f7
testb %al, %al
je 0x453da
movq %rsp, %rdx
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rcx
callq 0x3620e
cmpl $0x0, (%rbx)
jne 0x453cb
movq %rsp, %rsi
movq %r15, %rdi
callq 0x2f3e4
testb %al, %al
jne 0x453c3
movq (%r14), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x30612(%rip), %r8      # 0x759c2
movq %rbx, %rdi
movl $0x41, %esi
movl $0xb46, %r9d            # imm = 0xB46
callq 0x14618
movq %rsp, %rdi
callq 0x2f843
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 0x305d7(%rip), %r8      # 0x759c2
movq %rbx, %rdi
movl $0x41, %esi
movl $0xb3c, %r9d            # imm = 0xB3C
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x14618
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/array_type.c
// Function: prv_div_by_const
static size_t prv_div_by_const(subtilis_parser_t *p, size_t reg,
			       int32_t divisor, subtilis_error_t *err)
{
	subtilis_exp_t *a1;
	subtilis_exp_t *a2 = NULL;

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

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

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

	return reg;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movl %edx, %ebp
movq %rdi, %r15
movl %esi, %edi
movq %rcx, %rsi
callq 0x2ba99
movq $-0x1, %r12
cmpl $0x0, (%r14)
jne 0x45470
movq %rax, %rbx
movl %ebp, %edi
movq %r14, %rsi
callq 0x2bb29
movq $-0x1, %r12
cmpl $0x0, (%r14)
jne 0x45468
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0x36f6d
movq %rax, %rbx
movq 0x148(%rax), %r12
movq %rbx, %rdi
callq 0x2b4c3
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2fa5f
cmpl $0x0, (%r15)
jne 0x457d3
movq 0x158(%r14), %rdi
testq %rdi, %rdi
je 0x457ba
callq 0x120f0
leaq 0x1(%rax), %rdi
callq 0x121d0
movq %rax, 0x158(%rbx)
testq %rax, %rax
je 0x457d9
movq 0x158(%r14), %rsi
movq %rax, %rdi
callq 0x12070
jmp 0x457c5
movq $0x0, 0x158(%rbx)
movq 0x148(%r14), %rax
movq %rax, 0x148(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x301e2(%rip), %rdx     # 0x759c2
movq %r15, %rdi
movl $0x1, %esi
movl $0xc3c, %ecx            # imm = 0xC3C
popq %rbx
popq %r14
popq %r15
jmp 0x145f4
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x45843
movq %rdx, %r15
movq 0x10(%r14), %rdi
leaq 0x200(,%r12,8), %rsi
callq 0x12210
testq %rax, %rax
je 0x45861
addq $0x40, %r12
movq %r12, 0x8(%r14)
movq %rax, 0x10(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
movq %rbx, (%rcx,%rax,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x301a9(%rip), %rdx     # 0x75a11
movq %r15, %rdi
movl $0x1, %esi
movl $0x27, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x145f4
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/rec_type.c
// Function: subtilis_rec_type_init_array
void subtilis_rec_type_init_array(subtilis_parser_t *p,
				  const subtilis_type_t *type,
				  const char *var_name, size_t mem_reg,
				  size_t loc, subtilis_error_t *err)
{
	size_t i;
	subtilis_ir_operand_t op;
	subtilis_exp_t *e[SUBTILIS_MAX_DIMENSIONS] = {NULL};
	const subtilis_type_array_t *arr = &type->params.array;

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

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, %r14
movq %r8, %r12
movq %rcx, 0x8(%rsp)
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %rbp
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
cmpl $0x0, 0x8(%rsi)
je 0x458ff
xorl %r15d, %r15d
movl 0xc(%rbx,%r15,4), %edi
movq %r14, %rsi
callq 0x2bb29
movq %rax, 0x10(%rsp,%r15,8)
cmpl $0x0, (%r14)
jne 0x45922
incq %r15
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
jb 0x458db
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 0x4172a
addq $0x10, %rsp
cmpl $0x0, 0x8(%rbx)
je 0x45941
xorl %r14d, %r14d
movq 0x10(%rsp,%r14,8), %rdi
callq 0x2b4c3
incq %r14
movslq 0x8(%rbx), %rax
cmpq %rax, %r14
jb 0x4592b
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/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 0x2bb29
cmpl $0x0, (%r15)
je 0x4598a
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 0x41c97
movq %r13, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b4c3
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/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 0x377f7
testb %al, %al
je 0x45a14
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 0x45894
movq %r13, %rdi
callq 0x37815
testb %al, %al
je 0x45a4b
movl 0x10(%rbp), %r8d
testl %r8d, %r8d
js 0x45a4b
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 0x45950
movq %r13, %rdi
callq 0x37833
testb %al, %al
je 0x45a7c
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 0x35fa9
cmpl $0x16, (%r13)
jne 0x45aa8
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 0x45b26
movq %r13, %rdi
callq 0x37676
testb %al, %al
jne 0x45abb
cmpl $0x9, (%r13)
jne 0x45aff
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x35f70
cmpl $0x0, (%rbx)
je 0x45add
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 0x36416
leaq 0x2ff21(%rip), %rdx     # 0x75a27
movq %rbx, %rdi
movl $0xf, %esi
movl $0x6c, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x145f4
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/rec_type.c
// Function: prv_rec_type_zero
static void prv_rec_type_zero(subtilis_parser_t *p, const subtilis_type_t *type,
			      size_t mem_reg, size_t loc, bool memset,
			      subtilis_error_t *err)
{
	if (memset)
		prv_uninit_fields(p, type, mem_reg, loc, err);
	else
		prv_init_fields(p, type, mem_reg, loc, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %rbx
movq %rcx, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, %r12
movq %rdi, 0x10(%rsp)
leaq 0x8(%rsi), %rax
movq %rax, 0x8(%rsp)
testl %r8d, %r8d
je 0x45bde
cmpq $0x0, 0x28(%r12)
je 0x45c46
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %r14d, %r14d
movq 0x18(%r12), %r15
addq %rbp, %r15
movq %r15, %rdi
callq 0x37676
testb %al, %al
jne 0x45bc7
cmpl $0x7, (%r15)
je 0x45bc7
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x30118
movq 0x20(%r12), %rdx
addq %r13, %rdx
movl %eax, %r8d
addq 0x20(%rsp), %r8
movq %rbx, (%rsp)
movq 0x10(%rsp), %rdi
movq %r15, %rsi
movq 0x18(%rsp), %rcx
movl $0x1, %r9d
callq 0x459be
cmpl $0x0, (%rbx)
jne 0x45c46
incq %r14
addq $0x148, %rbp            # imm = 0x148
addq $0x18, %r13
cmpq 0x28(%r12), %r14
jb 0x45b6f
jmp 0x45c46
cmpq $0x0, 0x28(%r12)
je 0x45c46
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %r14d, %r14d
movq 0x18(%r12), %r15
addq %rbp, %r15
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x30118
movq 0x20(%r12), %rdx
addq %r13, %rdx
movl %eax, %r8d
addq 0x20(%rsp), %r8
movq %rbx, (%rsp)
movq 0x10(%rsp), %rdi
movq %r15, %rsi
movq 0x18(%rsp), %rcx
xorl %r9d, %r9d
callq 0x459be
cmpl $0x0, (%rbx)
jne 0x45c46
incq %r14
addq $0x148, %rbp            # imm = 0x148
addq $0x18, %r13
cmpq 0x28(%r12), %r14
jb 0x45bee
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/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 0x45ca8
movq %r12, %rdi
callq 0x30197
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %rcx
movq %rbx, %r8
callq 0x30bb4
cmpl $0x0, (%rbx)
je 0x45ca8
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 0x45b26
// File: /workspace/github_c_makefile_star2_O1/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 0x30333
movq %rax, %r15
movq %r14, %rdi
callq 0x30197
subq %r15, %rax
movq %r13, %rdi
cmpq $0xf, %rax
ja 0x45d31
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, 0x10(%rsp)
movq %r12, %rcx
movq %r15, %r8
movq %rbp, %r9
callq 0x45c55
jmp 0x45d62
movq %rbx, %rsi
movq %r12, %rdx
movq %rbp, %rcx
callq 0x4d763
cmpl $0x0, (%rbp)
jne 0x45da4
movq %rax, %rbx
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq %rbp, %rcx
callq 0x34b90
movq $0x0, 0x10(%rsp)
cmpl $0x0, (%rbp)
setne %al
movl 0xc(%rsp), %ecx
xorb $0x1, %cl
orb %al, %cl
jne 0x45da4
movq %r14, %rdi
callq 0x3041c
testb %al, %al
je 0x45da4
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 0x4d4ea
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/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 0x30333
movq %rax, %rbx
movq %r15, %rdi
callq 0x301d0
cmpq $0x11, %rbx
setae %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x460c7
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 0x461df
movq %r14, 0x20(%rsp)
movq %r15, %rdi
callq 0x30197
subq %rbx, %rax
cmpq $0xf, %rax
ja 0x46101
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 0x45db3
jmp 0x46125
movq 0x48(%r13), %rdi
movl %r12d, %ecx
movl $0x9, %esi
movq 0x20(%rsp), %rdx
movq %rbp, %r8
callq 0x2c00f
cmpl $0x0, (%rbp)
movq 0x18(%rsp), %rcx
je 0x46134
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 0x34d0a
// File: /workspace/github_c_makefile_star2_O1/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 0x301d0
testb %al, %al
je 0x461bd
movq %r13, %rdi
callq 0x30333
cmpq $0x10, %rax
ja 0x461bd
movq %r15, (%rsp)
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %rbx, %r8
movl $0x1, %r9d
callq 0x45db3
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 0x461df
// File: /workspace/github_c_makefile_star2_O1/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 0x4d763
cmpl $0x0, (%rbx)
jne 0x4622a
movq %rax, %r12
movq %r13, %rdi
callq 0x30197
movq 0x48(%r15), %rdi
movl %eax, %edx
movl $0x1b, %esi
movq %rbx, %rcx
callq 0x2c189
cmpl $0x0, (%rbx)
je 0x46234
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 0x4d830
// File: /workspace/github_c_makefile_star2_O1/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), %r15
movq %r15, %rdi
callq 0x120f0
movq %rax, %r14
shlq $0x20, %r14
movabsq $0x200000000, %r13      # imm = 0x200000000
addq %r14, %r13
sarq $0x20, %r13
movq %rbx, %rdi
callq 0x120f0
addq %rax, %r13
movq %r13, %rdi
callq 0x121d0
testq %rax, %rax
je 0x462db
movq %rax, %r13
movb $0x5f, (%rax)
leaq 0x1(%rax), %rdi
movq %r15, %rsi
callq 0x12070
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %r14
sarq $0x20, %r14
addq %r13, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x12070
jmp 0x462f7
leaq 0x2f745(%rip), %rdx     # 0x75a27
movq %r12, %rdi
movl $0x1, %esi
movl $0x171, %ecx            # imm = 0x171
callq 0x145f4
xorl %r13d, %r13d
movq %r13, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3041c
testb %al, %al
je 0x4634d
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x4d763
cmpl $0x0, (%rbx)
je 0x46357
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 0x34a17
// File: /workspace/github_c_makefile_star2_O1/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 0x303a3
testb %al, %al
je 0x463b5
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x4d763
cmpl $0x0, (%rbx)
je 0x463d2
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 0x463ec
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x34a94
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/rec_type.c
// Function: subtilis_rec_type_ref_gen
void subtilis_rec_type_ref_gen(subtilis_parser_t *p,
			       const subtilis_type_t *type, size_t mem_reg,
			       size_t loc, subtilis_error_t *err)
{
	bool check_size;
	size_t i;
	size_t offset;
	subtilis_type_t *field;
	const subtilis_type_rec_t *rec = &type->params.rec;

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

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x20(%rsp)
movq %rdx, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x28(%rsi)
je 0x464b9
movq %r8, %rbx
movq %rsi, %r12
leaq 0x8(%rsi), %rax
movq %rax, 0x18(%rsp)
xorl %ebp, %ebp
xorl %r14d, %r14d
movq 0x18(%r12), %r15
addq %rbp, %r15
movq %r15, %rdi
callq 0x37833
testb %al, %al
jne 0x46442
cmpl $0x16, (%r15)
jne 0x464a4
movq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x30118
movl %eax, %r13d
addq 0x20(%rsp), %r13
movq %r15, %rdi
callq 0x37833
testb %al, %al
je 0x46487
movq %r15, %rdi
callq 0x377f7
xorb $0x1, %al
movzbl %al, %ecx
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
movq %rbx, %r8
callq 0x4d38d
jmp 0x4649f
movq 0x8(%rsp), %rdi
movq %r15, %rsi
movq 0x10(%rsp), %rdx
movq %r13, %rcx
movq %rbx, %r8
callq 0x46371
cmpl $0x0, (%rbx)
jne 0x464b9
incq %r14
addq $0x148, %rbp            # imm = 0x148
cmpq 0x28(%r12), %r14
jb 0x46428
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/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 0x46159
cmpl $0x0, (%rbx)
jne 0x46510
movq %r14, %rdi
callq 0x3041c
testb %al, %al
je 0x46510
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x4d02d
cmpl $0x0, (%rbx)
je 0x4651c
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 0x4d2d0
// File: /workspace/github_c_makefile_star2_O1/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 0x3041c
movl %eax, %ebp
movq 0x48(%r12), %rdi
movq 0x148(%rbx), %rcx
movl $0x1d, %esi
movq %r15, %rdx
movq %r14, %r8
callq 0x2c1ac
cmpl $0x0, (%r14)
sete %al
andb %bpl, %al
cmpb $0x1, %al
jne 0x46590
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
movq %r14, %r8
callq 0x46371
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2b4c3
// File: /workspace/github_c_makefile_star2_O1/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 0x48260
cmpl $0x0, (%rbx)
jne 0x46baa
movq 0x68(%r15), %rdi
leaq 0x8(%rsp), %r13
movq %r13, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x2ea12
movq %rax, %r12
movq %r13, %rdi
callq 0x2f843
cmpl $0x0, (%rbx)
jne 0x46ba0
movq (%r12), %rcx
movl $0x2, %edx
movq %r15, %rdi
movq %r14, %rsi
movq %r14, %r8
movq %rbx, %r9
callq 0x48ee5
cmpl $0x0, (%rbx)
je 0x46bc5
xorl %r14d, %r14d
leaq 0x8(%rsp), %rdi
callq 0x2f843
movq %r14, %rdi
callq 0x2b4c3
xorl %eax, %eax
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq (%r12), %rdx
movl $0x2, %esi
movq %r15, %rdi
movq %rbx, %rcx
callq 0x4d763
cmpl $0x0, (%rbx)
jne 0x46bb2
addq $0x8, %r12
movq %r12, %rdi
movl %eax, %esi
movq %rbx, %rdx
callq 0x2b971
jmp 0x46bb4
// File: /workspace/github_c_makefile_star2_O1/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 0x14a40
movq %r14, %rdi
callq 0x14dfb
movq %rax, %r12
movq %r14, %rdi
callq 0x14ba1
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x14b32
// File: /workspace/github_c_makefile_star2_O1/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 0x46c8d
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x46b30
movq %rdx, %r12
movq %rbx, %rdi
callq 0x2f882
movq %rax, %r13
movq %r12, %rdi
callq 0x2f882
movq (%r15), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x2edcd(%rip), %r10     # 0x75a82
movq %r14, %rdi
movl $0x45, %esi
movq %r13, %rdx
movq %rax, %rcx
pushq $0x4f
pushq %r10
callq 0x1442a
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x2b4c3
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x14ba1
movq %rax, %r13
addq %rbx, %r12
movq %r12, %rdi
callq 0x14d7f
movq 0x150(%r15), %rsi
addq $0x18, %rsi
movq %r12, %rdi
movq %r13, %rdx
movq %r14, %rcx
callq 0x14b32
movq %r15, %rdi
callq 0x2b4c3
cmpl $0x0, (%r14)
je 0x46d44
movq %rbx, %rdi
callq 0x2b4c3
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/string_type_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 0x46db7
movl $0x148, %r15d           # imm = 0x148
leaq (%rbx,%r15), %r12
movq %r12, %rdi
callq 0x14dfb
movq %rax, %r13
addq %r14, %r15
movq %r15, %rdi
callq 0x14dfb
movq %r13, %rdi
movq %rax, %rsi
callq 0x12160
xorl %ebp, %ebp
cmpl $0x1, %eax
sbbl %ebp, %ebp
movq %r12, %rdi
callq 0x14da6
movl %ebp, 0x148(%rbx)
movl $0x1, (%rbx)
movq %r14, %rdi
callq 0x2b4c3
jmp 0x46df4
movq %rcx, %r15
movq %rdi, %r12
movq %rbx, %rdi
callq 0x2b4c3
movq %r14, %rdi
callq 0x2b4c3
movq (%r12), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2eca3(%rip), %r8      # 0x75a82
movq %r15, %rdi
movl $0x19, %esi
movl $0x8f, %r9d
callq 0x14618
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_O1/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 0x46f23
movl $0x148, %r15d           # imm = 0x148
leaq (%rbx,%r15), %r12
movq %r12, %rdi
callq 0x14dfb
movq %rax, %r13
addq %r14, %r15
movq %r15, %rdi
callq 0x14dfb
movq %r13, %rdi
movq %rax, %rsi
callq 0x12160
xorl %ebp, %ebp
testl %eax, %eax
setg %bpl
negl %ebp
movq %r12, %rdi
callq 0x14da6
movl %ebp, 0x148(%rbx)
movl $0x1, (%rbx)
movq %r14, %rdi
callq 0x2b4c3
jmp 0x46f60
movq %r8, %r15
movq %rdi, %r12
movq %rbx, %rdi
callq 0x2b4c3
movq %r14, %rdi
callq 0x2b4c3
movq (%r12), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x2eb37(%rip), %r8      # 0x75a82
movq %r15, %rdi
movl $0x19, %esi
movl $0xca, %r9d
callq 0x14618
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_O1/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 0x47275
movq %rcx, %r15
movq (%rdi), %rcx
movq 0x30(%rcx), %rax
movl 0x38(%rcx), %r9d
leaq 0x2e844(%rip), %r10     # 0x75a82
movq %r8, %rdi
movl $0x29, %esi
movl $0x3, %edx
movl $0x2, %ecx
movq %rax, %r8
pushq $0x1c9                  # imm = 0x1C9
pushq %r10
callq 0x144d6
addq $0x10, %rsp
movq %r15, %rdi
callq 0x2b4c3
movq %r14, %rdi
callq 0x2b4c3
jmp 0x47286
movq 0x148(%rbx), %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x4bf09
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2b4c3
// File: /workspace/github_c_makefile_star2_O1/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 0x472b6
movq %rcx, %rdx
movq %rbx, %rcx
callq 0x4d763
cmpl $0x0, (%rbx)
je 0x472b3
xorl %eax, %eax
popq %rbx
retq
movq %rax, %rsi
leaq 0x2d8cb(%rip), %rdi     # 0x74b88
movq %rbx, %rdx
popq %rbx
jmp 0x2b971
// File: /workspace/github_c_makefile_star2_O1/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 0x2c00f
cmpl $0x0, (%rbx)
jne 0x47f06
movq %rax, %r15
movq 0x48(%r14), %rdi
movl %ebp, %esi
movq %r12, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x2c00f
cmpl $0x0, (%rbx)
je 0x47f11
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x48(%r14), %rdi
movl $0x2b, %esi
movq %r15, %rdx
movq %rax, %rcx
movq %rbx, %r8
callq 0x2c00f
leaq 0x2c9c9(%rip), %rdi     # 0x748f8
movl %eax, %esi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2b971
// File: /workspace/github_c_makefile_star2_O1/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 0x482fa
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 0x2f045
cmpl $0x0, (%rbx)
je 0x4831a
movq %r14, %rdi
callq 0x122c0
jmp 0x48313
leaq 0x2d79b(%rip), %rdx     # 0x75a9c
movq %rbx, %rdi
movl $0x1, %esi
movl $0x36, %ecx
callq 0x145f4
movq $-0x1, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/string_type.c
// Function: 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 0x2bb29
cmpl $0x0, (%rbx)
je 0x48365
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 0x36269
movq %rax, %r12
cmpl $0x0, (%rbx)
jne 0x483bc
movq 0x148(%r12), %rcx
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %r8
callq 0x4d921
cmpl $0x0, (%rbx)
setne %al
xorb $0x1, %bpl
orb %al, %bpl
jne 0x483bc
movq %r13, %rdi
movq (%rsp), %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x4d4ea
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b4c3
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/frontend/string_type.c
// Function: subtilis_string_type_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 0x48602
movq %rdx, %rbx
movq %rdi, %r15
movq 0x68(%rdi), %rdi
leaq 0x8(%rsp), %r13
movq %rsp, %rdx
movq %r13, %rsi
movq %rbx, %rcx
callq 0x2ea12
movq %rax, %r12
movq %r13, %rdi
callq 0x2f843
cmpl $0x0, (%rbx)
jne 0x48602
movq (%r12), %rdx
movl $0x2, %esi
movq %r15, %rdi
movq %r14, %rcx
movq %rbx, %r8
callq 0x4863d
cmpl $0x0, (%rbx)
jne 0x48602
movq (%r12), %rdx
movl $0x2, %esi
movq %r15, %rdi
movq %rbx, %rcx
callq 0x4d763
cmpl $0x0, (%rbx)
je 0x48626
movq (%rsp), %rdi
callq 0x122c0
movq %r14, %rdi
callq 0x2b4c3
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 0x2b99d
jmp 0x48615
// File: /workspace/github_c_makefile_star2_O1/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 0x3691f
cmpl $0x0, (%rbx)
jne 0x48677
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x36269
cmpl $0x0, (%rbx)
je 0x48686
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 0x2bb29
movq %rax, %r12
cmpl $0x0, (%rbx)
jne 0x486fe
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x36269
movq %rax, %r12
cmpl $0x0, (%rbx)
jne 0x486fe
movq 0x148(%r12), %r8
movq %rbx, (%rsp)
leaq 0x2c4c1(%rip), %rsi     # 0x74b88
movq %r15, %rdi
movq %rbp, %rdx
movq %r13, %rcx
movl $0x1, %r9d
callq 0x4ddee
cmpl $0x0, (%rbx)
jne 0x486fe
movq 0x48(%r15), %rdi
movq 0x148(%r14), %rdx
movl $0x16, %esi
movq %rax, %rcx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x2c0c2
movq %r12, %rdi
callq 0x2b4c3
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b4c3