LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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, %r12
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
testl %r8d, %r8d
je 0x4a9f3
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x4aa51
jmp 0x4aa1e
leal 0x8(%r14), %ecx
movq 0x48(%r13), %rdi
pushq $0x12
popq %rsi
movq %r15, %rdx
movq %r12, %r8
callq 0x2a819
cmpl $0x0, (%r12)
jne 0x4aa42
movq %r13, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x4a982
cmpl $0x0, (%r12)
jne 0x4aa42
movq %r12, (%rsp)
movzbl %bpl, %r8d
pushq $0x1
popq %r9
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x4a250
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/reference_type.c
// Function: 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 0x2b774
movq %rax, %rbp
movq 0x48(%r14), %rdi
callq 0x2b774
movq %rax, %r15
movq 0x48(%r14), %rdi
movl %r12d, %ecx
pushq $0x12
popq %rsi
movq %r13, %rdx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x4aafc
movq 0x48(%r14), %rdi
pushq $0x43
popq %rsi
movq %rax, %rdx
movq %rbp, %rcx
movq %r15, %r8
movq %rbx, %r9
callq 0x2a8c1
cmpl $0x0, (%rbx)
jne 0x4aafc
movq 0x48(%r14), %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x2b781
cmpl $0x0, (%rbx)
jne 0x4aafc
addl $0x8, %r12d
movq 0x48(%r14), %rdi
pushq $0x12
popq %rsi
movq %r13, %rdx
movq %r12, %rcx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x4aafc
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x4a982
cmpl $0x0, (%rbx)
je 0x4ab0b
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 0x2b781
// File: /workspace/github_c_makefile_star2_O2/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, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
pushq $0x8
popq %rdi
callq 0x121d0
testq %rax, %rax
je 0x4ac6a
movq %rax, %r15
movabsq $0x7970636d656d5f, %rax # imm = 0x7970636D656D5F
movq %rax, (%r15)
pushq $0x48
popq %rdi
callq 0x121d0
testq %rax, %rax
je 0x4ac7e
andl $0x0, (%rax)
movq %rbp, 0x8(%rax)
andl $0x0, 0x18(%rax)
movq %r13, 0x20(%rax)
andl $0x0, 0x30(%rax)
movq %r12, 0x38(%rax)
subq $0x8, %rsp
leaq 0x2405d(%rip), %r9      # 0x6eca0
pushq $0x2
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
movq %rax, %r8
pushq %rbx
pushq $0x1
pushq $0x3
callq 0x29dcc
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x24e15(%rip), %rdx     # 0x6fa86
pushq $0x1
popq %rsi
movq %rbx, %rdi
movl $0x214, %ecx            # imm = 0x214
jmp 0x4ac98
movq %r15, %rdi
callq 0x122c0
leaq 0x24df9(%rip), %rdx     # 0x6fa86
pushq $0x1
popq %rsi
movq %rbx, %rdi
movl $0x21c, %ecx            # imm = 0x21C
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1429e
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/frontend/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 %rbx
movq %rdx, %rbx
movq %rsi, %rdx
movq %rdi, %r14
testb $0x10, 0x8(%rdi)
jne 0x4ae6d
leaq 0x2438d(%rip), %rsi     # 0x6f1c8
leaq 0x23a86(%rip), %r9      # 0x6e8c8
pushq $0x6
popq %rcx
movq %r14, %rdi
xorl %r8d, %r8d
pushq %rbx
pushq $0x1
callq 0x1de0d
addq $0x10, %rsp
cmpl $0x0, (%rbx)
jne 0x4ae81
movq 0x148(%rax), %r14
movq %rax, %rdi
callq 0x29d88
jmp 0x4aea1
movq 0x48(%r14), %rdi
pushq $0x76
popq %rsi
movq %rbx, %rcx
callq 0x2a981
cmpl $0x0, (%rbx)
je 0x4ae87
pushq $-0x1
popq %r14
jmp 0x4aea1
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x29c49
xorl %r14d, %r14d
cmpl (%rbx), %r14d
sbbq %r14, %r14
orq %r15, %r14
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x17
popq %rsi
movq %rbp, %rdx
movq %rbx, %r9
callq 0x2a8c1
pushq $-0x1
popq %rax
cmpl $0x0, (%rbx)
jne 0x4b179
movq %r14, 0x10(%rsp)
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbp, %rcx
movq %rbx, %r8
callq 0x4aeaf
cmpl $0x0, (%rbx)
jne 0x4b176
movq %r13, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x4ae20
cmpl $0x0, (%rbx)
je 0x4b188
pushq $-0x1
popq %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 0x4b1ad
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %rbx, %r8
callq 0x4a8be
cmpl $0x0, (%rbx)
jne 0x4b176
leaq 0x4(%r15), %rax
movq 0x48(%r13), %rdi
movl %eax, %r8d
pushq $0x17
popq %rsi
movq %rbp, %rdx
movq %r12, %rcx
movq %rbx, %r9
callq 0x2a8c1
cmpl $0x0, (%rbx)
pushq $-0x1
popq %rax
jne 0x4b179
addl $0x8, %r15d
movq 0x48(%r13), %rdi
pushq $0x17
popq %rsi
movq %rbp, %rdx
movq %r12, %rcx
movq %r15, %r8
movq %rbx, %r9
callq 0x2a8c1
xorl %eax, %eax
cmpl (%rbx), %eax
sbbq %rax, %rax
orq %rbp, %rax
jmp 0x4b179
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x18
popq %rdi
callq 0x121d0
testq %rax, %rax
je 0x4bb43
movq %rax, %r15
movq 0x48(%r14), %rdi
pushq $0x7c
popq %rsi
movq %rbx, %rdx
callq 0x2a98b
cmpl $0x0, (%rbx)
jne 0x4bb37
movq %rax, %r12
movq 0x48(%r14), %rdi
pushq $0x7c
popq %rsi
movq %rbx, %rdx
callq 0x2a98b
cmpl $0x0, (%rbx)
jne 0x4bb37
andl $0x0, (%r15)
movq %rax, 0x8(%r15)
orq $-0x1, 0x10(%r15)
movq 0x48(%r14), %rdi
pushq $0x1
popq %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %rbx, %r8
callq 0x2bb0a
cmpl $0x0, (%rbx)
je 0x4bb65
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x23f3c(%rip), %rdx     # 0x6fa86
pushq $0x1
popq %rsi
movq %rbx, %rdi
movl $0x540, %ecx            # imm = 0x540
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1429e
movq 0x48(%r14), %rdi
movq 0xb8(%rdi), %r15
cmpq $-0x1, %r15
je 0x4bbac
pushq $0xb
popq %rsi
pushq $0x1
popq %rcx
movq %r15, %rdx
movq %rbx, %r8
callq 0x2a819
cmpl $0x0, (%rbx)
jne 0x4bb37
movq 0x48(%r14), %rdi
pushq $0x1d
popq %rsi
movq %r15, %rdx
movq %rax, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2a9a4
leaq 0x23ed3(%rip), %rdx     # 0x6fa86
pushq $0xf
popq %rsi
movq %rbx, %rdi
movl $0x557, %ecx            # imm = 0x557
jmp 0x4bb55
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rdi, %r14
imulq $0x18, %rcx, %r15
addq %rdx, %r15
xorl %r12d, %r12d
cmpq (%r15), %r12
jae 0x4bc12
movq 0x10(%r15), %rax
movq (%rax,%r12,8), %r13
leaq 0x8(%r13), %rdi
callq 0x35808
testb %al, %al
je 0x4bc0d
cmpb $0x0, 0x2a9(%r13)
jne 0x4bc0d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4bac7
cmpl $0x0, (%rbx)
jne 0x4bc12
incq %r12
jmp 0x4bbd9
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4c179
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x8
popq %r14
xorl %r15d, %r15d
movq (%rbx), %rdi
cmpq 0x8(%rbx), %r15
jae 0x4c167
cmpl $0x8, -0x8(%rdi,%r14)
jne 0x4c15e
movq (%rdi,%r14), %rdi
callq 0x122c0
incq %r15
addq $0x68, %r14
jmp 0x4c144
callq 0x122c0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x122c0
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4c19c
leaq 0x1(%rbx), %rax
movq %rax, 0x8(%r15)
jmp 0x4c1f3
movq %rsi, %r14
cmpq $-0x1000, %r12          # imm = 0xF000
jb 0x4c1b6
leaq 0x239b9(%rip), %rdx     # 0x6fb68
pushq $0x1
popq %rsi
pushq $0x5d
jmp 0x4c1e7
addq $0x1000, %r12           # imm = 0x1000
movq (%r15), %rdi
imulq $0x68, %r12, %rsi
callq 0x12210
testq %rax, %rax
je 0x4c1db
movq %r12, 0x10(%r15)
movq %rax, (%r15)
incq 0x8(%r15)
jmp 0x4c1f3
leaq 0x23986(%rip), %rdx     # 0x6fb68
pushq $0x1
popq %rsi
pushq $0x64
popq %rcx
movq %r14, %rdi
callq 0x1429e
pushq $-0x1
popq %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rdi
movl $0xc8, %esi
callq 0x12150
movq %rax, %rbx
testq %rax, %rax
je 0x4c2e9
movq %r15, %rdi
callq 0x2e260
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 0x4c302
movq 0x58(%rsp), %rdi
leaq 0x23873(%rip), %rdx     # 0x6fb68
pushq $0x1
popq %rsi
movl $0x88, %ecx
callq 0x1429e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/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:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rdi
callq 0x4c214
cmpq $0x11, %rax
pushq $0x10
popq %rcx
cmovaeq %rax, %rcx
movq %rcx, (%r14)
movq 0xc0(%r15), %rax
movq (%rax), %rax
addq 0x8(%r15), %rax
movq %rax, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4c394
pushq %rbx
movq %rdi, %rbx
movq 0xa0(%rdi), %rdi
callq 0x2dc17
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_O2/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 0x4c437
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 0x4c4c0
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 0x4c43b
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 0x4c48f
addq $-0x4, %rbx
xorl %eax, %eax
cmpq %rax, %rbx
je 0x4c48f
movq (%r12,%rax,8), %rdx
movq %rdx, 0x38(%r10,%rax,8)
incq %rax
jmp 0x4c47c
cmpq $0x5, %r15
jb 0x4c4b1
addq $-0x4, %r15
xorl %eax, %eax
cmpq %rax, %r15
je 0x4c4b1
movq (%r14,%rax,8), %rdx
movq %rdx, 0x98(%r10,%rax,8)
incq %rax
jmp 0x4c49b
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x236a1(%rip), %rdx     # 0x6fb68
pushq $0x1
popq %rsi
movq 0x8(%rsp), %rdi
movl $0xd3, %ecx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1429e
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/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 0x4c53c
movq %rdx, %r15
movq 0x98(%r14), %rdi
leaq 0x200(,%r12,8), %rsi
callq 0x12210
testq %rax, %rax
je 0x4c55f
addq $0x40, %r12
movq %rax, 0x98(%r14)
movq %r12, 0x90(%r14)
movq 0x88(%r14), %r12
jmp 0x4c543
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 0x23602(%rip), %rdx     # 0x6fb68
pushq $0x1
popq %rsi
movq %r15, %rdi
movl $0xf6, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1429e
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x48
popq %rdi
callq 0x121d0
testq %rax, %rax
je 0x4c611
movq %rax, %rbx
leaq (,%r14,8), %rdi
callq 0x121d0
movq %rax, (%rbx)
testq %rax, %rax
je 0x4c62a
andq $0x0, 0x8(%rbx)
movl 0x50(%rsp), %r15d
movq %r14, 0x10(%rbx)
movq %rbp, 0x28(%rbx)
movq %r13, %rdi
callq 0x2d686
movq %rax, 0x18(%rbx)
movq %r12, %rdi
callq 0x2d3f0
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 0x4c64d
leaq 0x23550(%rip), %rdx     # 0x6fb68
pushq $0x1
popq %rsi
movq %r15, %rdi
movl $0x10e, %ecx            # imm = 0x10E
callq 0x1429e
jmp 0x4c64b
leaq 0x23537(%rip), %rdx     # 0x6fb68
pushq $0x1
popq %rsi
movq 0x58(%rsp), %rdi
movl $0x114, %ecx            # imm = 0x114
callq 0x1429e
movq %rbx, %rdi
callq 0x4c65f
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_O2/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 0x4c6b1
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x4c690
xorl %r14d, %r14d
movq (%rbx), %rdi
cmpq 0x8(%rbx), %r14
jae 0x4c68b
movq (%rdi,%r14,8), %rdi
callq 0x4c34f
incq %r14
jmp 0x4c674
callq 0x122c0
movq 0x20(%rbx), %rdi
callq 0x2d3f8
movq 0x18(%rbx), %rdi
callq 0x2d7b8
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x122c0
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4c6de
leaq 0x2349c(%rip), %rdx     # 0x6fb68
pushq $0xf
popq %rsi
movq %r14, %rdi
movl $0x135, %ecx            # imm = 0x135
callq 0x1429e
jmp 0x4c700
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
movl 0x38(%rbx), %eax
pushq %r14
pushq %rax
pushq 0x40(%rbx)
pushq 0x30(%rbx)
callq 0x4c258
addq $0x20, %rsp
cmpl $0x0, (%r14)
je 0x4c70a
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 0x4c702
// File: /workspace/github_c_makefile_star2_O2/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 0x4c74d
pushq %rbx
movq %rdx, %rbx
movq %rsi, %rdi
callq 0x4c34f
leaq 0x2342c(%rip), %rdx     # 0x6fb68
pushq $0xf
popq %rsi
movq %rbx, %rdi
movl $0x149, %ecx            # imm = 0x149
popq %rbx
jmp 0x1429e
movq (%rdi), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x8(%rdi)
movq %rsi, (%rcx,%rax,8)
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4c7af
cmpl $0x0, (%r15)
jne 0x4c7a9
movl $0x1, (%rax)
movq %r14, 0x8(%rax)
incq 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4c17a
cmpl $0x0, (%r14)
je 0x4c7d1
xorl %eax, %eax
jmp 0x4c839
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)
andq $0x0, 0x50(%rax,%rdx)
movups %xmm0, (%rax,%rdx)
orq $-0x1, 0x58(%rax,%rdx)
movq %r15, 0x60(%rax,%rdx)
cmpq $-0x1, 0x20(%rbx)
je 0x4c827
movq 0x38(%rbx), %rsi
movq (%rsi), %rsi
imulq $0x68, 0x28(%rbx), %rdi
addq %rdi, %rsi
addq $0x58, %rsi
jmp 0x4c82b
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_O2/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 %rdx, %rsi
movq %rcx, %rdx
callq 0x4c872
cmpl $0x0, (%r15)
jne 0x4c86c
movl $0x1, (%rax)
movq %r14, 0x8(%rax)
incq 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
movq 0x60(%rsi), %rax
cmpq $-0x1, %rax
je 0x4c89b
movq 0x38(%rbx), %rdi
movq (%rdi), %rcx
imulq $0x68, %rax, %rax
addq %rcx, %rax
addq $0x58, %rax
jmp 0x4c8a3
leaq 0x20(%rbx), %rax
movq 0x38(%rbx), %rdi
movq (%rax), %r15
movq %r14, %rsi
callq 0x4c17a
cmpl $0x0, (%r14)
je 0x4c8b8
xorl %eax, %eax
jmp 0x4c925
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)
andq $0x0, 0x60(%rax,%rdx)
movups %xmm0, (%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 0x4c91e
movq %rcx, 0x20(%rbx)
addq %rdx, %rax
incq 0x18(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4c7af
cmpl $0x0, (%r14)
je 0x4c946
xorl %eax, %eax
jmp 0x4c953
movq %rax, %rcx
andl $0x0, (%rax)
addq $0x8, %rax
movl %ebx, 0x8(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rcx, %rdx
callq 0x4c872
cmpl $0x0, (%r14)
je 0x4c976
xorl %eax, %eax
jmp 0x4c983
movq %rax, %rcx
andl $0x0, (%rax)
addq $0x8, %rax
movl %ebx, 0x8(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4c9d0
movq 0x28(%rdi), %r15
movq 0x38(%rdi), %rax
movq (%rax), %r14
movq %rbx, %rsi
callq 0x4c7af
cmpl $0x0, (%rbx)
jne 0x4c9e7
imulq $0x68, %r15, %rcx
addq %rcx, %r14
pushq $0xd
popq %rcx
movq %rax, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
orq $-0x1, 0x58(%rax)
addq $0x8, %rax
jmp 0x4c9e9
leaq 0x23191(%rip), %rdx     # 0x6fb68
pushq $0xf
popq %rsi
movq %rbx, %rdi
movl $0x24a, %ecx            # imm = 0x24A
callq 0x1429e
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4caab
testb %al, %al
je 0x4ca0e
movl 0x4(%rsp), %eax
jmp 0x4caa4
cmpl $0xfeffffff, %ebp       # imm = 0xFEFFFFFF
jbe 0x4ca2a
leaq 0x2314b(%rip), %rdx     # 0x6fb68
pushq $0xf
popq %rsi
movq %rbx, %rdi
movl $0x287, %ecx            # imm = 0x287
jmp 0x4ca9d
pushq $0x1f
popq %rdx
movabsq $0x100000019, %rcx      # imm = 0x100000019
pushq $0x18
popq %rax
cmpq $0x8, %rdx
jb 0x4ca50
btl %edx, %ebp
jb 0x4ca64
decq %rdx
decq %rcx
decq %rax
jmp 0x4ca3a
leaq 0x23111(%rip), %rdx     # 0x6fb68
pushq $0xf
popq %rsi
movq %rbx, %rdi
movl $0x292, %ecx            # imm = 0x292
jmp 0x4ca9d
testb $0x1, %al
cmovel %eax, %ecx
movl $0xff, %eax
shll %cl, %eax
andl %ebp, %eax
pushq $0x1
popq %rdi
shll %cl, %edi
addl %eax, %edi
leaq 0x4(%rsp), %rsi
callq 0x4caab
testb %al, %al
jne 0x4ca05
leaq 0x230d6(%rip), %rdx     # 0x6fb68
pushq $0xf
popq %rsi
movq %rbx, %rdi
movl $0x29e, %ecx            # imm = 0x29E
callq 0x1429e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4cad3
pushq %rax
leaq 0x23056(%rip), %rax     # 0x6fb10
xorl %esi, %esi
cmpq $0x10, %rsi
je 0x4cad9
movl (%rax), %ecx
notl %ecx
testl %edi, %ecx
je 0x4cadd
incq %rsi
addq $0x4, %rax
jmp 0x4cabc
andl $0x0, (%rdx)
movb $0x1, %al
retq
xorl %eax, %eax
jmp 0x4cae4
callq 0x4cae9
movb $0x1, %al
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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, %r14
movl %edi, %ebp
leaq 0x22fd5(%rip), %r13     # 0x6fb10
xorl %ebx, %ebx
cmpq $0x10, %rbx
je 0x4cb75
movl (%r13), %r12d
notl %r12d
andl %ebp, %r12d
movl %r12d, %edi
movq %r15, %rsi
callq 0x4caab
testb %al, %al
jne 0x4cb65
incq %rbx
addq $0x4, %r13
jmp 0x4cb3d
subl %r12d, %ebp
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4cae9
cmpq $0x10, %rbx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/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, %r12
movq %rdi, %r13
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 0x4cc02
cmpl $0x0, (%r15)
jne 0x4cbdd
pushq $0x18
popq %rdx
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0x4c95b
cmpl $0x0, (%r15)
je 0x4cbf1
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
movb $0x0, 0x20(%rax)
jmp 0x4cbdf
// File: /workspace/github_c_makefile_star2_O2/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 0x4cc49
movq %r8, %r12
addq $0x40, %r13
imulq $0x18, %r13, %rsi
movq %rax, %rdi
callq 0x12210
testq %rax, %rax
je 0x4cc70
movq %r13, 0x68(%r15)
movq %rax, 0x58(%r15)
movq 0x60(%r15), %r13
leaq 0x1(%r13), %rcx
movq %rcx, 0x60(%r15)
imulq $0x18, %r13, %rcx
movl %ebp, (%rax,%rcx)
movq %r14, 0x8(%rax,%rcx)
movb %bl, 0x10(%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x22ef1(%rip), %rdx     # 0x6fb68
pushq $0x1
popq %rsi
movq %r12, %rdi
movl $0x214, %ecx            # imm = 0x214
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1429e
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/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 0x4cc02
cmpl $0x0, (%r12)
jne 0x4cce7
pushq $0x18
popq %rsi
movq %r13, %rdi
movq %r12, %rdx
callq 0x4c92b
cmpl $0x0, (%r12)
je 0x4ccfb
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r15d, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
movb %bpl, 0x20(%rax)
jmp 0x4cce9
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_add_adr
void subtilis_add_adr(subtilis_arm_section_t *s,
		      subtilis_arm_ccode_type_t ccode, subtilis_arm_reg_t dest,
		      size_t label, subtilis_error_t *err)
{
	subtilis_arm_adr_instr_t *adr;
	subtilis_arm_instr_t *instr;

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

	adr = &instr->operands.adr;
	adr->ccode = ccode;
	adr->dest = dest;
	adr->label = label;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
pushq $0x1b
popq %rsi
movq %r8, %rdx
callq 0x4c92b
cmpl $0x0, (%r15)
jne 0x4cd3b
movl %ebp, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/arch/arm32/arm_core.c
// Function: subtilis_add_ldrp
void subtilis_add_ldrp(subtilis_arm_section_t *s,
		       subtilis_arm_ccode_type_t ccode, subtilis_arm_reg_t dest,
		       size_t section_label, size_t constant_label,
		       subtilis_error_t *err)
{
	subtilis_arm_ldrp_instr_t *ldrp;
	subtilis_arm_instr_t *instr;

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

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

	ldrp = &instr->operands.ldrp;
	ldrp->ccode = ccode;
	ldrp->dest = dest;
	ldrp->section_label = section_label;
	ldrp->constant_label = constant_label;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r12
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r13
movq %r8, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r9, %r8
callq 0x4cc02
cmpl $0x0, (%r12)
jne 0x4cd9c
pushq $0x19
popq %rsi
movq %r13, %rdi
movq %r12, %rdx
callq 0x4c92b
cmpl $0x0, (%r12)
jne 0x4cd9c
movl %ebp, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
movq %rbx, 0x20(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq