LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/reference_type.c
// Function: reference_type_call_deref
void reference_type_call_deref(subtilis_parser_t *p,
			       subtilis_ir_operand_t address,
			       subtilis_error_t *err)
{
	if (p->backend.caps & SUBTILIS_BACKEND_HAVE_ALLOC)
		subtilis_ir_section_add_instr_no_reg(
		    p->current, SUBTILIS_OP_INSTR_DEREF, address, err);
	else
		(void)subtilis_parser_call_1_arg_fn(
		    p, "_deref", address.reg, SUBTILIS_BUILTINS_DEREF,
		    SUBTILIS_IR_REG_TYPE_INTEGER, &subtilis_type_void, true,
		    err);
}

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

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

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

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

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r13
testl %r8d, %r8d
je 0x4d5e2
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x4d642
jmp 0x4d60e
leal 0x8(%r14), %ecx
movq 0x48(%r13), %rdi
movl $0x12, %esi
movq %r12, %rdx
movq %r15, %r8
callq 0x2bc8f
cmpl $0x0, (%r15)
jne 0x4d633
movq %r13, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x4d56b
cmpl $0x0, (%r15)
jne 0x4d633
movq %r15, (%rsp)
movzbl %bpl, %r8d
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movl $0x1, %r9d
callq 0x4cdcc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/reference_type.c
// Function: prv_deref
static void prv_deref(subtilis_parser_t *p, size_t mem_reg, size_t loc,
		      bool destructor, subtilis_error_t *err)
{
	subtilis_ir_operand_t el_start;
	subtilis_ir_operand_t offset;
	subtilis_ir_operand_t size;
	subtilis_ir_operand_t op2;
	subtilis_ir_operand_t non_zero;
	subtilis_ir_operand_t zero;

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

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

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

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

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
movq 0x48(%rdi), %rdi
callq 0x2cc99
movq %rax, %rbp
movq 0x48(%r14), %rdi
callq 0x2cc99
movq %rax, %r15
movq 0x48(%r14), %rdi
movl %r12d, %ecx
movl $0x12, %esi
movq %r13, %rdx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x4d6f3
movq 0x48(%r14), %rdi
movl $0x43, %esi
movq %rax, %rdx
movq %rbp, %rcx
movq %r15, %r8
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
jne 0x4d6f3
movq 0x48(%r14), %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x2cca6
cmpl $0x0, (%rbx)
jne 0x4d6f3
addl $0x8, %r12d
movq 0x48(%r14), %rdi
movl $0x12, %esi
movq %r13, %rdx
movq %r12, %rcx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x4d6f3
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x4d56b
cmpl $0x0, (%rbx)
je 0x4d702
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x48(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2cca6
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/reference_type.c
// Function: subtilis_reference_type_memcpy
void subtilis_reference_type_memcpy(subtilis_parser_t *p, size_t mem_reg,
				    size_t loc, size_t src_reg, size_t size_reg,
				    subtilis_error_t *err)
{
	size_t dest_reg;

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

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rsi, %rax
movq %rdi, %r12
leal 0x4(%rdx), %ecx
movq 0x48(%rdi), %rdi
movl $0x12, %esi
movq %rax, %rdx
movq %r9, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
je 0x4d7cd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4d7ec
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/reference_type.c
// Function: subtilis_reference_type_memcpy_dest
void subtilis_reference_type_memcpy_dest(subtilis_parser_t *p, size_t dest_reg,
					 size_t src_reg, size_t size_reg,
					 subtilis_error_t *err)
{
	subtilis_ir_arg_t *args;
	char *name = NULL;
	static const char memcpy[] = "_memcpy";

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

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

	args[0].type = SUBTILIS_IR_REG_TYPE_INTEGER;
	args[0].reg = dest_reg;
	args[1].type = SUBTILIS_IR_REG_TYPE_INTEGER;
	args[1].reg = src_reg;
	args[2].type = SUBTILIS_IR_REG_TYPE_INTEGER;
	args[2].reg = size_reg;

	(void)subtilis_exp_add_call(p, name, SUBTILIS_BUILTINS_MEMCPY, NULL,
				    args, &subtilis_type_void, 3, true, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
movl $0x8, %edi
callq 0x121d0
testq %rax, %rax
je 0x4d87f
movq %rax, %r12
movabsq $0x7970636d656d5f, %rax # imm = 0x7970636D656D5F
movq %rax, (%r12)
movl $0x48, %edi
callq 0x121d0
testq %rax, %rax
je 0x4d895
xorl %ecx, %ecx
movl %ecx, (%rax)
movq %rbp, 0x8(%rax)
movl %ecx, 0x18(%rax)
movq %r13, 0x20(%rax)
movl %ecx, 0x30(%rax)
movq %r15, 0x38(%rax)
subq $0x8, %rsp
leaq 0x2749a(%rip), %r9      # 0x74cf0
movq %r14, %rdi
movq %r12, %rsi
movl $0x2, %edx
xorl %ecx, %ecx
movq %rax, %r8
pushq %rbx
pushq $0x1
pushq $0x3
callq 0x2b1aa
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28274(%rip), %rdx     # 0x75afa
movq %rbx, %rdi
movl $0x1, %esi
movl $0x214, %ecx            # imm = 0x214
jmp 0x4d8b1
movq %r12, %rdi
callq 0x122c0
leaq 0x28256(%rip), %rdx     # 0x75afa
movq %rbx, %rdi
movl $0x1, %esi
movl $0x21c, %ecx            # imm = 0x21C
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x145a4
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/reference_type.c
// Function: subtilis_reference_type_raw_alloc
size_t subtilis_reference_type_raw_alloc(subtilis_parser_t *p, size_t size_reg,
					 subtilis_error_t *err)
{
	subtilis_ir_operand_t op;
	subtilis_exp_t *e;
	subtilis_ir_operand_t size_op;

	size_op.reg = size_reg;

	if (p->backend.caps & SUBTILIS_BACKEND_HAVE_ALLOC) {
		op.reg = subtilis_ir_section_add_instr2(
		    p->current, SUBTILIS_OP_INSTR_ALLOC, size_op, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return SIZE_MAX;

		subtilis_exp_handle_errors(p, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return SIZE_MAX;
	} else {
		e = subtilis_parser_call_1_arg_fn(
		    p, "_alloc", size_reg, SUBTILIS_BUILTINS_ALLOC,
		    SUBTILIS_IR_REG_TYPE_INTEGER, &subtilis_type_integer, true,
		    err);
		if (err->type != SUBTILIS_ERROR_OK)
			return SIZE_MAX;
		op.reg = e->exp.ir_op.reg;
		subtilis_exp_delete(e);
	}

	return op.reg;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %rdx
movq %rdi, %r15
testb $0x10, 0x8(%rdi)
jne 0x4dae6
leaq 0x2776d(%rip), %rsi     # 0x75218
leaq 0x26e66(%rip), %r9      # 0x74918
movq %r15, %rdi
movl $0x6, %ecx
xorl %r8d, %r8d
pushq %rbx
pushq $0x1
callq 0x1ea76
addq $0x10, %rsp
movq $-0x1, %r14
cmpl $0x0, (%rbx)
jne 0x4db1d
movq 0x148(%rax), %r14
movq %rax, %rdi
callq 0x2b166
jmp 0x4db1d
movq 0x48(%r15), %rdi
movl $0x76, %esi
movq %rbx, %rcx
callq 0x2be09
movq $-0x1, %r14
cmpl $0x0, (%rbx)
jne 0x4db1d
movq %rax, %r12
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2b01f
xorl %r14d, %r14d
cmpl (%rbx), %r14d
sbbq %r14, %r14
orq %r12, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/reference_type.c
// Function: subtilis_reference_type_alloc
size_t subtilis_reference_type_alloc(subtilis_parser_t *p,
				     const subtilis_type_t *type, size_t loc,
				     size_t store_reg, size_t size_reg,
				     bool push, subtilis_error_t *err)
{
	subtilis_ir_operand_t op;
	subtilis_ir_operand_t op1;
	subtilis_ir_operand_t size_op;
	subtilis_ir_operand_t store_op;

	size_op.reg = size_reg;
	store_op.reg = store_reg;

	op1.integer = loc + SUBTIILIS_REFERENCE_SIZE_OFF;
	subtilis_ir_section_add_instr_reg(p->current,
					  SUBTILIS_OP_INSTR_STOREO_I32, size_op,
					  store_op, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return SIZE_MAX;

	subtilis_reference_type_set_orig_size(p, store_reg, loc, size_op.reg,
					      err);
	if (err->type != SUBTILIS_ERROR_OK)
		return SIZE_MAX;

	op1.integer = loc + SUBTIILIS_REFERENCE_DATA_OFF;
	op.reg = subtilis_reference_type_raw_alloc(p, size_reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return SIZE_MAX;

	if (push) {
		subtilis_reference_type_push_reference(p, type, store_reg, loc,
						       err);
		if (err->type != SUBTILIS_ERROR_OK)
			return SIZE_MAX;
	}

	subtilis_ir_section_add_instr_reg(
	    p->current, SUBTILIS_OP_INSTR_STOREO_I32, op, store_op, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return SIZE_MAX;

	op1.integer = loc + SUBTIILIS_REFERENCE_HEAP_OFF;
	subtilis_ir_section_add_instr_reg(
	    p->current, SUBTILIS_OP_INSTR_STOREO_I32, op, store_op, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return SIZE_MAX;

	return op.reg;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0xc(%rsp)
movq %r8, %rbp
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r13
movq 0x50(%rsp), %rbx
movq 0x48(%rdi), %rdi
movl %r15d, %r8d
movl $0x17, %esi
movq %rbp, %rdx
movq %rbx, %r9
callq 0x2bd42
movq $-0x1, %rax
cmpl $0x0, (%rbx)
jne 0x4de33
movq %r14, 0x10(%rsp)
leal 0xc(%r15), %r8d
movq 0x48(%r13), %rdi
movl $0x17, %esi
movq %rbp, %rdx
movq %r12, %rcx
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
jne 0x4de2c
movq %r13, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x4da8d
cmpl $0x0, (%rbx)
je 0x4de42
movq $-0x1, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbp
cmpb $0x0, 0xc(%rsp)
je 0x4de67
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %rbx, %r8
callq 0x4d4a6
cmpl $0x0, (%rbx)
jne 0x4de2c
leaq 0x4(%r15), %rax
movq 0x48(%r13), %rdi
movl %eax, %r8d
movl $0x17, %esi
movq %rbp, %rdx
movq %r12, %rcx
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
movq $-0x1, %rax
jne 0x4de33
addl $0x8, %r15d
movq 0x48(%r13), %rdi
movl $0x17, %esi
movq %rbp, %rdx
movq %r12, %rcx
movq %r15, %r8
movq %rbx, %r9
callq 0x2bd42
xorl %eax, %eax
cmpl (%rbx), %eax
sbbq %rax, %rax
orq %rbp, %rax
jmp 0x4de33
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/reference_type.c
// Function: subtilis_reference_type_pop_and_deref
void subtilis_reference_type_pop_and_deref(subtilis_parser_t *p,
					   subtilis_error_t *err)
{
	size_t reg;
	subtilis_ir_operand_t op2;
	subtilis_ir_operand_t dest;
	size_t fn_addr;
	subtilis_ir_arg_t *ir_args = malloc(sizeof(*ir_args));

	if (!ir_args) {
		subtilis_error_set_oom(err);
		return;
	}

	fn_addr = subtilis_ir_section_add_instr1(
	    p->current, SUBTILIS_OP_INSTR_POP_I32, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	reg = subtilis_ir_section_add_instr1(p->current,
					     SUBTILIS_OP_INSTR_POP_I32, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	ir_args[0].type = SUBTILIS_IR_REG_TYPE_INTEGER;
	ir_args[0].reg = reg;
	ir_args[0].nop = SIZE_MAX;

	subtilis_ir_section_add_call_ptr(p->current, 1, ir_args, fn_addr, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (p->current->cleanup_stack == SIZE_MAX) {
		subtilis_error_set_assertion_failed(err);
		return;
	}

	/*
	 * TODO: The part of the register allocator that preserves
	 * live registers between basic blocks can't handle the case
	 * when an instruction uses the same register for both source
	 * and destination.  Ultimately, all that code is going to dissapear
	 * when we have a global register allocator, so for now we're just
	 * going to live with it.
	 */

	/*
	 * H'mm, I think I may have fixed this so
	 * this comment may no longer be valid.
	 */

	op2.integer = 1;
	dest.reg = p->current->cleanup_stack;
	op2.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_SUBI_I32, dest, op2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_instr_no_reg2(p->current, SUBTILIS_OP_INSTR_MOV,
					      dest, op2, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x18, %edi
callq 0x121d0
testq %rax, %rax
je 0x4e883
movq %rax, %r15
movq 0x48(%r14), %rdi
movl $0x7c, %esi
movq %rbx, %rdx
callq 0x2be13
cmpl $0x0, (%rbx)
jne 0x4e877
movq %rax, %r12
movq 0x48(%r14), %rdi
movl $0x7c, %esi
movq %rbx, %rdx
callq 0x2be13
cmpl $0x0, (%rbx)
jne 0x4e877
movl $0x0, (%r15)
movq %rax, 0x8(%r15)
movq $-0x1, 0x10(%r15)
movq 0x48(%r14), %rdi
movl $0x1, %esi
movq %r15, %rdx
movq %r12, %rcx
movq %rbx, %r8
callq 0x2d037
cmpl $0x0, (%rbx)
je 0x4e8a7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x27270(%rip), %rdx     # 0x75afa
movq %rbx, %rdi
movl $0x1, %esi
movl $0x540, %ecx            # imm = 0x540
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x145a4
movq 0x48(%r14), %rdi
movq 0xb8(%rdi), %r15
cmpq $-0x1, %r15
je 0x4e8f4
movl $0x1, %ecx
movl $0xb, %esi
movq %r15, %rdx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x4e877
movq 0x48(%r14), %rdi
movl $0x1d, %esi
movq %r15, %rdx
movq %rax, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2be2c
leaq 0x271ff(%rip), %rdx     # 0x75afa
movq %rbx, %rdi
movl $0xf, %esi
movl $0x557, %ecx            # imm = 0x557
jmp 0x4e897
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/reference_type.c
// Function: subtilis_reference_deallocate_refs
void subtilis_reference_deallocate_refs(subtilis_parser_t *p,
					subtilis_ir_operand_t load_reg,
					subtilis_symbol_table_t *st,
					size_t level, subtilis_error_t *err)
{
	size_t i;
	const subtilis_symbol_t *s;
	subtilis_symbol_level_t *l = &st->levels[level];

	for (i = 0; i < l->size; i++) {
		s = l->symbols[i];
		if (!subtilis_type_if_is_reference(&s->t) || s->no_rc)
			continue;

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

// Assembly:
leaq (%rcx,%rcx,2), %rax
cmpq $0x0, (%rdx,%rax,8)
je 0x4e96b
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rdi, %r14
leaq (%rdx,%rax,8), %r15
xorl %r12d, %r12d
movq 0x10(%r15), %rax
movq (%rax,%r12,8), %r13
leaq 0x8(%r13), %rdi
callq 0x376f1
testb %al, %al
je 0x4e95a
cmpb $0x0, 0x2a9(%r13)
jne 0x4e95a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4e7f9
cmpl $0x0, (%rbx)
jne 0x4e962
incq %r12
cmpq (%r15), %r12
jb 0x4e92b
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_op_pool_delete
void subtilis_arm_op_pool_delete(subtilis_arm_op_pool_t *pool)
{
	size_t i;

	if (pool) {
		for (i = 0; i < pool->len; i++)
			if (pool->ops[i].type == SUBTILIS_ARM_OP_STRING)
				free(pool->ops[i].op.str);
		free(pool->ops);
		free(pool);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x4eefb
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x4eee6
movl $0x8, %r14d
xorl %r15d, %r15d
movq (%rbx), %rcx
cmpl $0x8, -0x8(%rcx,%r14)
jne 0x4eeda
movq (%rcx,%r14), %rdi
callq 0x122c0
movq 0x8(%rbx), %rax
incq %r15
addq $0x68, %r14
cmpq %rax, %r15
jb 0x4eec2
movq (%rbx), %rdi
callq 0x122c0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x122c0
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_op_pool_alloc
size_t subtilis_arm_op_pool_alloc(subtilis_arm_op_pool_t *pool,
				  subtilis_error_t *err)
{
	subtilis_arm_op_t *new_ops;
	size_t new_max;
	size_t new_op;

	new_op = pool->len;
	if (new_op < pool->max_len) {
		pool->len++;
		return new_op;
	}

	if (pool->max_len > SIZE_MAX - SUBTILIS_CONFIG_PROGRAM_GRAN) {
		subtilis_error_set_oom(err);
		return SIZE_MAX;
	}

	new_max = pool->max_len + SUBTILIS_CONFIG_PROGRAM_GRAN;
	new_ops = realloc(pool->ops, new_max * sizeof(subtilis_arm_op_t));
	if (!new_ops) {
		subtilis_error_set_oom(err);
		return SIZE_MAX;
	}
	pool->max_len = new_max;
	pool->ops = new_ops;
	pool->len++;
	return new_op;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq 0x8(%rdi), %rbx
movq 0x10(%rdi), %r12
cmpq %r12, %rbx
jae 0x4ef1e
leaq 0x1(%rbx), %rax
movq %rax, 0x8(%r15)
jmp 0x4ef85
movq %rsi, %r14
cmpq $-0x1000, %r12          # imm = 0xF000
jb 0x4ef40
leaq 0x26ca7(%rip), %rdx     # 0x75bd8
movq %r14, %rdi
movl $0x1, %esi
movl $0x5d, %ecx
jmp 0x4ef79
addq $0x1000, %r12           # imm = 0x1000
movq (%r15), %rdi
imulq $0x68, %r12, %rsi
callq 0x12210
testq %rax, %rax
je 0x4ef65
movq %r12, 0x10(%r15)
movq %rax, (%r15)
incq 0x8(%r15)
jmp 0x4ef85
leaq 0x26c6c(%rip), %rdx     # 0x75bd8
movq %r14, %rdi
movl $0x1, %esi
movl $0x64, %ecx
callq 0x145a4
movq $-0x1, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_section_new
subtilis_arm_section_t *subtilis_arm_section_new(subtilis_arm_op_pool_t *pool,
						 subtilis_type_section_t *stype,
						 size_t reg_counter,
						 size_t freg_counter,
						 size_t label_counter,
						 size_t locals,
						 const subtilis_settings_t *set,
						 const subtilis_arm_fp_if_t *fp,
						 int32_t start_address,
						 subtilis_error_t *err)
/* clang-format on */

{
	subtilis_arm_section_t *s = calloc(1, sizeof(*s));

	if (!s) {
		subtilis_error_set_oom(err);
		return NULL;
	}
	s->stype = subtilis_type_section_dup(stype);
	s->reg_counter = reg_counter;
	s->freg_counter = freg_counter;
	s->label_counter = label_counter;
	s->first_op = SIZE_MAX;
	s->last_op = SIZE_MAX;
	s->locals = locals;
	s->op_pool = pool;
	s->settings = set;
	s->fp_if = fp;
	s->no_cleanup_label = s->label_counter++;
	s->start_address = start_address;

	return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movq %r8, %r14
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, %r15
movq %rdi, %r12
movl $0x1, %edi
movl $0xc8, %esi
callq 0x12150
movq %rax, %rbx
testq %rax, %rax
je 0x4f091
movq %r15, %rdi
callq 0x2fb9e
movq %rax, 0xa0(%rbx)
movq %rbp, (%rbx)
movq %r13, 0x8(%rbx)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x20(%rbx)
movq (%rsp), %rax
movq %rax, 0x30(%rbx)
movq %r12, 0x38(%rbx)
movq 0x40(%rsp), %rax
movq %rax, 0xa8(%rbx)
movq 0x48(%rsp), %rax
movq %rax, 0xc0(%rbx)
leaq 0x1(%r14), %rax
movq %rax, 0x10(%rbx)
movq %r14, 0xb0(%rbx)
movl 0x50(%rsp), %eax
movl %eax, 0xb8(%rbx)
jmp 0x4f0ac
movq 0x58(%rsp), %rdi
leaq 0x26b3b(%rip), %rdx     # 0x75bd8
movl $0x1, %esi
movl $0x88, %ecx
callq 0x145a4
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_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_section_max_regs
void subtilis_arm_section_max_regs(subtilis_arm_section_t *s, size_t *int_regs,
				   size_t *real_regs)
{
	*int_regs = subtilis_arm_ir_to_arm_reg(s->reg_counter);
	if (*int_regs < SUBTILIS_ARM_INT_VIRT_REG_START)
		*int_regs = SUBTILIS_ARM_INT_VIRT_REG_START;
	*real_regs = subtilis_arm_ir_to_real_reg(s, s->freg_counter);
}

// Assembly:
movq (%rdi), %rax
addq $0xc, %rax
cmpq $0x11, %rax
movl $0x10, %ecx
cmovaeq %rax, %rcx
movq %rcx, (%rsi)
movq 0xc0(%rdi), %rax
movq (%rax), %rax
addq 0x8(%rdi), %rax
movq %rax, (%rdx)
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_section_delete
void subtilis_arm_section_delete(subtilis_arm_section_t *s)
{
	if (!s)
		return;

	subtilis_type_section_delete(s->stype);
	free(s->ret_sites);
	free(s->call_sites);
	prv_free_constants(&s->constants);
	free(s);
}

// Assembly:
testq %rdi, %rdi
je 0x4f12c
pushq %rbx
movq %rdi, %rbx
movq 0xa0(%rdi), %rdi
callq 0x2f4fb
movq 0x98(%rbx), %rdi
callq 0x122c0
movq 0x50(%rbx), %rdi
callq 0x122c0
movq 0x58(%rbx), %rdi
callq 0x122c0
movq 0x70(%rbx), %rdi
callq 0x122c0
movq %rbx, %rdi
popq %rbx
jmp 0x122c0
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_section_add_call_site
void subtilis_arm_section_add_call_site(subtilis_arm_section_t *s,
					size_t stm_site, size_t ldm_site,
					size_t stf_site, size_t ldf_site,
					size_t int_args, size_t real_args,
					size_t op, size_t *int_arg_ops,
					size_t *real_arg_ops,
					subtilis_error_t *err)
/* clang-format on */

{
	size_t new_max;
	subtilis_arm_call_site_t *site;
	subtilis_arm_call_site_t *new_call_sites;
	size_t i;

	if (s->call_site_count == s->max_call_site_count) {
		new_max = s->call_site_count + SUBTILIS_CONFIG_PROC_GRAN;
		new_call_sites =
		    realloc(s->call_sites, new_max * sizeof(*new_call_sites));
		if (!new_call_sites) {
			subtilis_error_set_oom(err);
			return;
		}
		s->call_sites = new_call_sites;
		s->max_call_site_count = new_max;
	}
	site = &s->call_sites[s->call_site_count++];
	site->stm_site = stm_site;
	site->ldm_site = ldm_site;
	site->stf_site = stf_site;
	site->ldf_site = ldf_site;
	site->int_args = int_args;
	site->real_args = real_args;
	site->call_site = op;

	if (int_args > 4)
		for (i = 0; i < int_args - 4; i++)
			site->int_arg_ops[i] = int_arg_ops[i];

	if (real_args > 4)
		for (i = 0; i < real_args - 4; i++)
			site->real_arg_ops[i] = real_arg_ops[i];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %rbx
movq %rdi, %rbp
movq 0x88(%rsp), %r14
movq 0x80(%rsp), %r12
movq 0x78(%rsp), %r9
movq 0x70(%rsp), %r15
movq 0x40(%rdi), %r13
cmpq 0x48(%rdi), %r13
jne 0x4f1cf
movq %rsi, 0x10(%rsp)
movq %r9, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x30(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x40, %r13
movq 0x50(%rbp), %rdi
imulq $0xf8, %r13, %rsi
callq 0x12210
testq %rax, %rax
je 0x4f254
movq %rax, 0x50(%rbp)
movq %r13, 0x48(%rbp)
movq 0x40(%rbp), %r13
movq 0x30(%rsp), %r8
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %r9
movq 0x10(%rsp), %rsi
jmp 0x4f1d3
movq 0x50(%rbp), %rax
leaq 0x1(%r13), %rdi
movq %rdi, 0x40(%rbp)
imulq $0xf8, %r13, %rdi
leaq (%rax,%rdi), %r10
movq %rsi, 0x8(%rax,%rdi)
movq %rdx, (%rax,%rdi)
movq %rcx, 0x18(%rax,%rdi)
movq %r8, 0x10(%rax,%rdi)
movq %rbx, 0x20(%rax,%rdi)
movq %r15, 0x28(%rax,%rdi)
movq %r9, 0x30(%rax,%rdi)
cmpq $0x5, %rbx
jb 0x4f225
addq $-0x4, %rbx
xorl %eax, %eax
movq (%r12,%rax,8), %rdx
movq %rdx, 0x38(%r10,%rax,8)
incq %rax
cmpq %rax, %rbx
jne 0x4f214
cmpq $0x5, %r15
jb 0x4f245
addq $-0x4, %r15
xorl %eax, %eax
movq (%r14,%rax,8), %rdx
movq %rdx, 0x98(%r10,%rax,8)
incq %rax
cmpq %rax, %r15
jne 0x4f231
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2697d(%rip), %rdx     # 0x75bd8
movq 0x8(%rsp), %rdi
movl $0x1, %esi
movl $0xd3, %ecx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x145a4
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_section_add_ret_site
void subtilis_arm_section_add_ret_site(subtilis_arm_section_t *s, size_t op,
				       subtilis_error_t *err)
{
	size_t new_max;
	size_t *new_ret_sites;

	if (s->ret_site_count == s->max_ret_site_count) {
		new_max = s->ret_site_count + SUBTILIS_CONFIG_PROC_GRAN;
		new_ret_sites =
		    realloc(s->ret_sites, new_max * sizeof(*new_ret_sites));
		if (!new_ret_sites) {
			subtilis_error_set_oom(err);
			return;
		}
		s->ret_sites = new_ret_sites;
		s->max_ret_site_count = new_max;
	}
	s->ret_sites[s->ret_site_count++] = op;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x88(%rdi), %r12
cmpq 0x90(%rdi), %r12
jne 0x4f2d2
movq %rdx, %r15
movq 0x98(%r14), %rdi
leaq 0x200(,%r12,8), %rsi
callq 0x12210
testq %rax, %rax
je 0x4f2f5
addq $0x40, %r12
movq %rax, 0x98(%r14)
movq %r12, 0x90(%r14)
movq 0x88(%r14), %r12
jmp 0x4f2d9
movq 0x98(%r14), %rax
leaq 0x1(%r12), %rcx
movq %rcx, 0x88(%r14)
movq %rbx, (%rax,%r12,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x268dc(%rip), %rdx     # 0x75bd8
movq %r15, %rdi
movl $0x1, %esi
movl $0xf6, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x145a4
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_prog_new
subtilis_arm_prog_t *subtilis_arm_prog_new(size_t max_sections,
					   subtilis_arm_op_pool_t *op_pool,
					   subtilis_string_pool_t *string_pool,
					   subtilis_constant_pool_t *cnst_pool,
					   const subtilis_settings_t *settings,
					   const subtilis_arm_fp_if_t *fp_if,
					   int32_t start_address,
					   subtilis_error_t *err)
/* clang-format on */

{
	subtilis_arm_prog_t *arm_p = malloc(sizeof(*arm_p));

	if (!arm_p) {
		subtilis_error_set_oom(err);
		return NULL;
	}

	arm_p->sections = malloc(sizeof(*arm_p->sections) * max_sections);
	if (!arm_p->sections) {
		subtilis_error_set_oom(err);
		goto cleanup;
	}

	arm_p->num_sections = 0;
	arm_p->max_sections = max_sections;
	arm_p->op_pool = op_pool;
	arm_p->string_pool = subtilis_string_pool_clone(string_pool);
	arm_p->constant_pool = subtilis_constant_pool_clone(cnst_pool);

	arm_p->settings = settings;
	arm_p->fp_if = fp_if;
	arm_p->start_address = start_address;

	return arm_p;

cleanup:
	subtilis_arm_prog_delete(arm_p);
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %r8, 0x8(%rsp)
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
movq 0x58(%rsp), %r15
movl $0x48, %edi
callq 0x121d0
testq %rax, %rax
je 0x4f3ae
movq %rax, %rbx
leaq (,%r14,8), %rdi
callq 0x121d0
movq %rax, (%rbx)
testq %rax, %rax
je 0x4f3c9
movl 0x50(%rsp), %r15d
movq $0x0, 0x8(%rbx)
movq %r14, 0x10(%rbx)
movq %rbp, 0x28(%rbx)
movq %r13, %rdi
callq 0x2ef12
movq %rax, 0x18(%rbx)
movq %r12, %rdi
callq 0x2ec48
movq %rax, 0x20(%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rbx)
movl %r15d, 0x38(%rbx)
jmp 0x4f3ee
leaq 0x26823(%rip), %rdx     # 0x75bd8
movq %r15, %rdi
movl $0x1, %esi
movl $0x10e, %ecx            # imm = 0x10E
callq 0x145a4
jmp 0x4f3ec
leaq 0x26808(%rip), %rdx     # 0x75bd8
movq 0x58(%rsp), %rdi
movl $0x1, %esi
movl $0x114, %ecx            # imm = 0x114
callq 0x145a4
movq %rbx, %rdi
callq 0x4f400
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_prog_delete
void subtilis_arm_prog_delete(subtilis_arm_prog_t *prog)
{
	size_t i;

	if (!prog)
		return;

	if (prog->sections) {
		for (i = 0; i < prog->num_sections; i++)
			subtilis_arm_section_delete(prog->sections[i]);
		free(prog->sections);
	}
	subtilis_constant_pool_delete(prog->constant_pool);
	subtilis_string_pool_delete(prog->string_pool);
	free(prog);
}

// Assembly:
testq %rdi, %rdi
je 0x4f45c
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x4f43b
cmpq $0x0, 0x8(%rbx)
je 0x4f436
xorl %r14d, %r14d
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x4f0e7
incq %r14
cmpq 0x8(%rbx), %r14
jb 0x4f41e
movq (%rbx), %rdi
callq 0x122c0
movq 0x20(%rbx), %rdi
callq 0x2ec50
movq 0x18(%rbx), %rdi
callq 0x2f052
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x122c0
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_prog_section_new
subtilis_arm_section_t *
subtilis_arm_prog_section_new(subtilis_arm_prog_t *prog,
			      subtilis_type_section_t *stype,
			      size_t reg_counter, size_t freg_counter,
			      size_t label_counter, size_t locals,
			      subtilis_error_t *err)
/* clang-format on */
{
	subtilis_arm_section_t *arm_s;

	if (prog->num_sections == prog->max_sections) {
		subtilis_error_set_assertion_failed(err);
		return NULL;
	}

	arm_s = subtilis_arm_section_new(
	    prog->op_pool, stype, reg_counter, freg_counter, label_counter,
	    locals, prog->settings, prog->fp_if, prog->start_address, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	prog->sections[prog->num_sections++] = arm_s;
	return arm_s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x20(%rsp), %r14
movq 0x8(%rdi), %rax
cmpq 0x10(%rdi), %rax
jne 0x4f48b
leaq 0x26761(%rip), %rdx     # 0x75bd8
movq %r14, %rdi
movl $0xf, %esi
movl $0x135, %ecx            # imm = 0x135
callq 0x145a4
jmp 0x4f4ad
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
movl 0x38(%rbx), %eax
pushq %r14
pushq %rax
pushq 0x40(%rbx)
pushq 0x30(%rbx)
callq 0x4effe
addq $0x20, %rsp
cmpl $0x0, (%r14)
je 0x4f4b7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x8(%rbx)
movq %rax, (%rcx,%rdx,8)
jmp 0x4f4af
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_prog_append_section
void subtilis_arm_prog_append_section(subtilis_arm_prog_t *prog,
				      subtilis_arm_section_t *arm_s,
				      subtilis_error_t *err)
{
	if (prog->num_sections == prog->max_sections) {
		subtilis_arm_section_delete(arm_s);
		subtilis_error_set_assertion_failed(err);
		return;
	}

	prog->sections[prog->num_sections++] = arm_s;
}

// Assembly:
movq 0x8(%rdi), %rax
cmpq 0x10(%rdi), %rax
jne 0x4f4fc
pushq %rbx
movq %rdx, %rbx
movq %rsi, %rdi
callq 0x4f0e7
leaq 0x266ef(%rip), %rdx     # 0x75bd8
movq %rbx, %rdi
movl $0xf, %esi
movl $0x149, %ecx            # imm = 0x149
popq %rbx
jmp 0x145a4
movq (%rdi), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x8(%rdi)
movq %rsi, (%rcx,%rax,8)
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_section_add_label
void subtilis_arm_section_add_label(subtilis_arm_section_t *s, size_t label,
				    subtilis_error_t *err)
{
	subtilis_arm_op_t *op;

	op = prv_append_op(s, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	op->type = SUBTILIS_ARM_OP_LABEL;
	op->op.label = label;
	s->label_counter++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x4f560
cmpl $0x0, (%r15)
jne 0x4f55a
movl $0x1, (%rax)
movq %r14, 0x8(%rax)
incq 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: prv_append_op
static subtilis_arm_op_t *prv_append_op(subtilis_arm_section_t *s,
					subtilis_error_t *err)
{
	size_t ptr;
	subtilis_arm_op_t *op;
	size_t prev = s->last_op;

	ptr = subtilis_arm_op_pool_alloc(s->op_pool, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;
	op = &s->op_pool->ops[ptr];
	memset(op, 0, sizeof(*op));
	op->next = SIZE_MAX;
	op->prev = prev;
	if (s->first_op == SIZE_MAX)
		s->first_op = ptr;
	else
		s->op_pool->ops[s->last_op].next = ptr;
	s->last_op = ptr;
	s->len++;

	return op;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rdi), %r15
movq 0x38(%rdi), %rdi
callq 0x4eefc
cmpl $0x0, (%r14)
je 0x4f582
xorl %eax, %eax
jmp 0x4f5f0
movq %rax, %rcx
movq 0x38(%rbx), %rax
movq (%rax), %rax
imulq $0x68, %rcx, %rdx
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rax,%rdx)
movups %xmm0, 0x30(%rax,%rdx)
movups %xmm0, 0x20(%rax,%rdx)
movups %xmm0, 0x10(%rax,%rdx)
movups %xmm0, (%rax,%rdx)
movq $0x0, 0x50(%rax,%rdx)
movq $-0x1, 0x58(%rax,%rdx)
movq %r15, 0x60(%rax,%rdx)
cmpq $-0x1, 0x20(%rbx)
je 0x4f5de
movq 0x38(%rbx), %rsi
movq (%rsi), %rsi
imulq $0x68, 0x28(%rbx), %rdi
addq %rdi, %rsi
addq $0x58, %rsi
jmp 0x4f5e2
leaq 0x20(%rbx), %rsi
addq %rdx, %rax
movq %rcx, (%rsi)
movq %rcx, 0x28(%rbx)
incq 0x18(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_section_insert_label
void subtilis_arm_section_insert_label(subtilis_arm_section_t *s, size_t label,
				       subtilis_arm_op_t *pos,
				       subtilis_error_t *err)
{
	subtilis_arm_op_t *op;

	op = prv_insert_op(s, pos, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	op->type = SUBTILIS_ARM_OP_LABEL;
	op->op.label = label;
	s->label_counter++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x60(%rdx), %rsi
movq %rcx, %rdx
callq 0x4f62a
cmpl $0x0, (%r15)
jne 0x4f624
movl $0x1, (%rax)
movq %r14, 0x8(%rax)
incq 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: prv_insert_op
static subtilis_arm_op_t *prv_insert_op(subtilis_arm_section_t *s,
					subtilis_arm_op_t *pos,
					subtilis_error_t *err)
{
	size_t ptr;
	size_t old_ptr;
	subtilis_arm_op_t *op;

	/*
	 * We need to figure out the pointer before we do the alloc,
	 * as the alloc may invalidate pos.
	 */

	if (pos->prev == SIZE_MAX)
		old_ptr = s->first_op;
	else
		old_ptr = s->op_pool->ops[pos->prev].next;

	ptr = subtilis_arm_op_pool_alloc(s->op_pool, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	/*
	 * pos may have been invalidated by the alloc.
	 */

	pos = &s->op_pool->ops[old_ptr];
	op = &s->op_pool->ops[ptr];
	memset(op, 0, sizeof(*op));
	op->next = old_ptr;
	op->prev = pos->prev;
	s->op_pool->ops[pos->prev].next = ptr;
	pos->prev = ptr;

	if (old_ptr == s->first_op)
		s->first_op = ptr;
	s->len++;

	return op;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
cmpq $-0x1, %rsi
je 0x4f64f
movq 0x38(%rbx), %rdi
movq (%rdi), %rax
imulq $0x68, %rsi, %rcx
addq %rcx, %rax
addq $0x58, %rax
jmp 0x4f657
leaq 0x20(%rbx), %rax
movq 0x38(%rbx), %rdi
movq (%rax), %r15
movq %r14, %rsi
callq 0x4eefc
cmpl $0x0, (%r14)
je 0x4f66c
xorl %eax, %eax
jmp 0x4f6dc
movq %rax, %rcx
movq 0x38(%rbx), %rax
movq (%rax), %rax
imulq $0x68, %rcx, %rdx
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rax,%rdx)
movups %xmm0, 0x40(%rax,%rdx)
movups %xmm0, 0x30(%rax,%rdx)
movups %xmm0, 0x20(%rax,%rdx)
movups %xmm0, 0x10(%rax,%rdx)
movups %xmm0, (%rax,%rdx)
movq $0x0, 0x60(%rax,%rdx)
movq %r15, 0x58(%rax,%rdx)
imulq $0x68, %r15, %rsi
movq 0x60(%rax,%rsi), %rdi
movq %rdi, 0x60(%rax,%rdx)
movq 0x38(%rbx), %r8
movq (%r8), %r8
imulq $0x68, %rdi, %rdi
movq %rcx, 0x58(%r8,%rdi)
movq %rcx, 0x60(%rax,%rsi)
cmpq 0x20(%rbx), %r15
jne 0x4f6d5
movq %rcx, 0x20(%rbx)
addq %rdx, %rax
incq 0x18(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_section_add_instr
subtilis_arm_instr_t *
subtilis_arm_section_add_instr(subtilis_arm_section_t *s,
			       subtilis_arm_instr_type_t type,
			       subtilis_error_t *err)
{
	subtilis_arm_op_t *op;

	op = prv_append_op(s, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	op->type = SUBTILIS_ARM_OP_INSTR;
	op->op.instr.type = type;
	return &op->op.instr;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebx
movq %rdx, %rsi
callq 0x4f560
cmpl $0x0, (%r14)
je 0x4f6fd
xorl %eax, %eax
jmp 0x4f70d
movq %rax, %rcx
movl $0x0, (%rax)
addq $0x8, %rax
movl %ebx, 0x8(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_section_insert_instr
subtilis_arm_instr_t *
subtilis_arm_section_insert_instr(subtilis_arm_section_t *s,
				  subtilis_arm_op_t *pos,
				  subtilis_arm_instr_type_t type,
				  subtilis_error_t *err)
/* clang-format on */
{
	subtilis_arm_op_t *op;

	op = prv_insert_op(s, pos, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	op->type = SUBTILIS_ARM_OP_INSTR;
	op->op.instr.type = type;
	return &op->op.instr;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebx
movq 0x60(%rsi), %rsi
movq %rcx, %rdx
callq 0x4f62a
cmpl $0x0, (%r14)
je 0x4f734
xorl %eax, %eax
jmp 0x4f744
movq %rax, %rcx
movl $0x0, (%rax)
addq $0x8, %rax
movl %ebx, 0x8(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_section_dup_instr
subtilis_arm_instr_t *subtilis_arm_section_dup_instr(subtilis_arm_section_t *s,
						     subtilis_error_t *err)
{
	subtilis_arm_op_t *src;
	subtilis_arm_op_t *op;

	if (s->len == 0) {
		subtilis_error_set_assertion_failed(err);
		return NULL;
	}

	src = &s->op_pool->ops[s->last_op];
	op = prv_append_op(s, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	*op = *src;
	op->next = SIZE_MAX;

	return &op->op.instr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpq $0x0, 0x18(%rdi)
je 0x4f796
movq 0x28(%rdi), %r15
movq 0x38(%rdi), %rax
movq (%rax), %r14
movq %rbx, %rsi
callq 0x4f560
cmpl $0x0, (%rbx)
jne 0x4f7af
imulq $0x68, %r15, %rcx
addq %rcx, %r14
movl $0xd, %ecx
movq %rax, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq $-0x1, 0x58(%rax)
addq $0x8, %rax
jmp 0x4f7b1
leaq 0x2643b(%rip), %rdx     # 0x75bd8
movq %rbx, %rdi
movl $0xf, %esi
movl $0x24a, %ecx            # imm = 0x24A
callq 0x145a4
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_encode_nearest
uint32_t subtilis_arm_encode_nearest(int32_t num, subtilis_error_t *err)
{
	bool can_encode;
	uint32_t encoded;
	size_t i;
	size_t new_num;
	size_t mask;
	size_t shift;

	can_encode = subtilis_arm_encode_imm(num, &encoded);
	if (can_encode)
		return encoded;

	if (((uint32_t)num) >= ((uint32_t)0xff000000)) {
		subtilis_error_set_assertion_failed(err);
		return 0;
	}

	/* First first bit that's set */

	for (i = 31; i > 7; i--)
		if (num & (1 << i))
			break;

	if (i == 7) {
		subtilis_error_set_assertion_failed(err);
		return 0;
	}

	shift = i - 7;

	if (shift & 1)
		shift++;
	mask = 0xff << shift;
	new_num = (((uint32_t)num) & mask) + (1 << shift);
	can_encode = subtilis_arm_encode_imm(new_num, &encoded);
	if (!can_encode) {
		subtilis_error_set_assertion_failed(err);
		return 0;
	}

	return encoded;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x4(%rsp), %rsi
callq 0x4f87d
testb %al, %al
je 0x4f7d6
movl 0x4(%rsp), %eax
jmp 0x4f876
cmpl $0xfeffffff, %ebp       # imm = 0xFEFFFFFF
jbe 0x4f7f4
leaq 0x263f3(%rip), %rdx     # 0x75bd8
movq %rbx, %rdi
movl $0xf, %esi
movl $0x287, %ecx            # imm = 0x287
jmp 0x4f86f
movl $0x1f, %edx
movabsq $0x100000019, %rcx      # imm = 0x100000019
movl $0x18, %eax
btl %edx, %ebp
jb 0x4f832
decq %rdx
decq %rcx
decq %rax
cmpq $0x7, %rdx
ja 0x4f808
leaq 0x263b5(%rip), %rdx     # 0x75bd8
movq %rbx, %rdi
movl $0xf, %esi
movl $0x292, %ecx            # imm = 0x292
jmp 0x4f86f
testb $0x1, %al
cmovel %eax, %ecx
movl $0xff, %eax
shll %cl, %eax
andl %ebp, %eax
movl $0x1, %edi
shll %cl, %edi
addl %eax, %edi
leaq 0x4(%rsp), %rsi
callq 0x4f87d
testb %al, %al
jne 0x4f7cd
leaq 0x26376(%rip), %rdx     # 0x75bd8
movq %rbx, %rdi
movl $0xf, %esi
movl $0x29e, %ecx            # imm = 0x29E
callq 0x145a4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_encode_imm
bool subtilis_arm_encode_imm(int32_t num, uint32_t *encoded)
{
	size_t i;
	uint32_t imm = (uint32_t)num;

	if (imm == 0) {
		*encoded = 0;
		return true;
	}

	for (i = 0; i < sizeof(subitlis_arm_imm_mask) / sizeof(uint32_t); i++) {
		if ((imm & ~subitlis_arm_imm_mask[i]) == 0)
			break;
	}
	if (i == sizeof(subitlis_arm_imm_mask) / sizeof(uint32_t))
		return false;

	prv_encode_imm(imm, i, encoded);

	return true;
}

// Assembly:
movq %rsi, %rdx
testl %edi, %edi
je 0x4f8a7
pushq %rax
leaq 0x262f4(%rip), %rax     # 0x75b80
xorl %esi, %esi
movl (%rax), %ecx
notl %ecx
testl %edi, %ecx
je 0x4f8b0
incq %rsi
addq $0x4, %rax
cmpq $0x10, %rsi
jne 0x4f88e
xorl %eax, %eax
jmp 0x4f8b7
movl $0x0, (%rdx)
movb $0x1, %al
retq
callq 0x4f8bc
movb $0x1, %al
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_encode_lvl2_imm
bool subtilis_arm_encode_lvl2_imm(int32_t num, uint32_t *encoded1,
				  uint32_t *encoded2)
{
	size_t i;
	uint32_t rem;
	uint32_t imm = (uint32_t)num;

	for (i = 0; i < sizeof(subitlis_arm_imm_mask) / sizeof(uint32_t); i++) {
		rem = imm & ~subitlis_arm_imm_mask[i];
		if (subtilis_arm_encode_imm(rem, encoded2))
			break;
	}
	if (i == sizeof(subitlis_arm_imm_mask) / sizeof(uint32_t))
		return false;

	prv_encode_imm(imm - rem, i, encoded1);

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, (%rsp)
movl %edi, %ebp
leaq 0x26271(%rip), %rbx     # 0x75b80
xorl %r14d, %r14d
movl (%rbx), %r13d
notl %r13d
andl %ebp, %r13d
movl %r13d, %edi
movq %r15, %rsi
callq 0x4f87d
movl %eax, %r12d
testb %al, %al
jne 0x4f93c
incq %r14
addq $0x4, %rbx
cmpq $0x10, %r14
jne 0x4f912
jmp 0x4f94d
subl %r13d, %ebp
movl %ebp, %edi
movq %r14, %rsi
movq (%rsp), %rdx
callq 0x4f8bc
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_arm_insert_data_imm_ldr
size_t subtilis_arm_insert_data_imm_ldr(subtilis_arm_section_t *s,
					subtilis_arm_op_t *current,
					subtilis_arm_ccode_type_t ccode,
					subtilis_arm_reg_t dest, int32_t op2,
					subtilis_error_t *err)
{
	subtilis_arm_ldrc_instr_t *ldrc;
	subtilis_arm_instr_t *instr;
	size_t label = s->label_counter++;

	prv_add_ui32_constant(s, label, (uint32_t)op2, false, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return 0;

	instr = subtilis_arm_section_insert_instr(s, current,
						  SUBTILIS_ARM_INSTR_LDRC, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return 0;

	ldrc = &instr->operands.ldrc;
	ldrc->ccode = ccode;
	ldrc->dest = dest;
	ldrc->label = label;
	ldrc->link_time = false;
	return label;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r13
movq %rdi, %r12
movq 0x10(%rdi), %rbx
leaq 0x1(%rbx), %rax
movq %rax, 0x10(%rdi)
movq %rbx, %rsi
movl %r8d, %edx
xorl %ecx, %ecx
movq %r9, %r8
callq 0x4f9e7
cmpl $0x0, (%r15)
jne 0x4f9c2
movq 0x60(%r13), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x4f62a
cmpl $0x0, (%r15)
jne 0x4f9c2
movl $0x0, (%rax)
movl $0x18, 0x8(%rax)
cmpl $0x0, (%r15)
je 0x4f9d6
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, 0x10(%rax)
movq %r14, 0x18(%rax)
movq %rbx, 0x20(%rax)
movb $0x0, 0x28(%rax)
jmp 0x4f9c4
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: prv_add_ui32_constant
static void prv_add_ui32_constant(subtilis_arm_section_t *s, size_t label,
				  uint32_t num, bool link_time,
				  subtilis_error_t *err)
{
	subtilis_arm_ui32_constant_t *c;
	subtilis_arm_ui32_constant_t *new_constants;
	size_t new_max;

	if (s->constants.ui32_count == s->constants.max_ui32) {
		new_max = s->constants.max_ui32 + 64;
		new_constants =
		    realloc(s->constants.ui32,
			    new_max * sizeof(subtilis_arm_ui32_constant_t));
		if (!new_constants) {
			subtilis_error_set_oom(err);
			return;
		}
		s->constants.max_ui32 = new_max;
		s->constants.ui32 = new_constants;
	}
	c = &s->constants.ui32[s->constants.ui32_count++];
	c->integer = num;
	c->label = label;
	c->link_time = link_time;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movq 0x58(%rdi), %rax
movq 0x60(%rdi), %r13
cmpq 0x68(%rdi), %r13
jne 0x4fa36
movq %r8, %r12
leaq 0x200(,%r13,8), %rcx
leaq (%rcx,%rcx,2), %rsi
movq %rax, %rdi
callq 0x12210
testq %rax, %rax
je 0x4fa64
addq $0x40, %r13
movq %r13, 0x68(%r15)
movq %rax, 0x58(%r15)
movq 0x60(%r15), %r13
leaq 0x1(%r13), %rcx
movq %rcx, 0x60(%r15)
leaq (,%r13,2), %rcx
addq %r13, %rcx
movl %ebp, (%rax,%rcx,8)
movq %r14, 0x8(%rax,%rcx,8)
movb %bl, 0x10(%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2616d(%rip), %rdx     # 0x75bd8
movq %r12, %rdi
movl $0x1, %esi
movl $0x214, %ecx            # imm = 0x214
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x145a4
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_add_explicit_ldr
size_t subtilis_add_explicit_ldr(subtilis_arm_section_t *s,
				 subtilis_arm_ccode_type_t ccode,
				 subtilis_arm_reg_t dest, int32_t op2,
				 bool link_time, subtilis_error_t *err)
{
	subtilis_arm_ldrc_instr_t *ldrc;
	subtilis_arm_instr_t *instr;
	size_t label = s->label_counter++;

	prv_add_ui32_constant(s, label, (uint32_t)op2, link_time, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return 0;

	instr = subtilis_arm_section_add_instr(s, SUBTILIS_ARM_INSTR_LDRC, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return 0;

	ldrc = &instr->operands.ldrc;
	ldrc->ccode = ccode;
	ldrc->dest = dest;
	ldrc->label = label;
	ldrc->link_time = link_time;

	return label;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r12
movl %r8d, %ebp
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %r13
movq 0x10(%rdi), %rbx
leaq 0x1(%rbx), %rax
movq %rax, 0x10(%rdi)
movq %rbx, %rsi
movl %ecx, %edx
movl %r8d, %ecx
movq %r9, %r8
callq 0x4f9e7
cmpl $0x0, (%r12)
jne 0x4faee
movq %r13, %rdi
movq %r12, %rsi
callq 0x4f560
cmpl $0x0, (%r12)
jne 0x4faee
movl $0x0, (%rax)
movl $0x18, 0x8(%rax)
cmpl $0x0, (%r12)
je 0x4fb02
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r15d, 0x10(%rax)
movq %r14, 0x18(%rax)
movq %rbx, 0x20(%rax)
movb %bpl, 0x28(%rax)
jmp 0x4faf0