LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_walker.c
// Function: subtilis_arm_walk_from_to
void subtilis_arm_walk_from_to(subtilis_arm_section_t *arm_s,
			       subtlis_arm_walker_t *walker,
			       subtilis_arm_op_t *from, subtilis_arm_op_t *to,
			       subtilis_error_t *err)
{
	size_t ptr;

	if (from->next == SIZE_MAX)
		ptr = arm_s->last_op;
	else
		ptr = arm_s->op_pool->ops[from->next].prev;
	prv_arm_walk(arm_s, ptr, to, walker, err);
}

// Assembly:
movq %rsi, %rax
movq 0x58(%rdx), %rdx
cmpq $-0x1, %rdx
je 0x528b8
movq 0x38(%rdi), %rsi
movq (%rsi), %rsi
imulq $0x68, %rdx, %rdx
addq %rsi, %rdx
addq $0x60, %rdx
jmp 0x528bc
leaq 0x28(%rdi), %rdx
movq (%rdx), %rsi
movq %rcx, %rdx
movq %rax, %rcx
jmp 0x5276a
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_walker.c
// Function: prv_call_stran_misc_fn
static void prv_call_stran_misc_fn(subtlis_arm_walker_t *walker,
				   void *user_data, subtilis_arm_op_t *op,
				   subtilis_error_t *err)
{
	subtilis_arm_instr_t *instr = &op->op.instr;

	if (!walker->stran_misc_fn) {
		subtilis_error_set_assertion_failed(err);
		return;
	}

	walker->stran_misc_fn(walker->user_data, op, instr->type,
			      &instr->operands.stran_misc, err);
}

// Assembly:
movq %rcx, %r8
movq 0x110(%rdi), %r9
testq %r9, %r9
je 0x52cc3
movq (%rdi), %rdi
movl 0x8(%rdx), %eax
leaq 0x10(%rdx), %rcx
movq %rdx, %rsi
movl %eax, %edx
jmpq *%r9
leaq 0x22f39(%rip), %rdx     # 0x75c03
movq %r8, %rdi
movl $0xf, %esi
movl $0x139, %ecx            # imm = 0x139
jmp 0x145a4
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_walker.c
// Function: prv_call_simd_fn
static void prv_call_simd_fn(subtlis_arm_walker_t *walker, void *user_data,
			     subtilis_arm_op_t *op, subtilis_error_t *err)
{
	subtilis_arm_instr_t *instr = &op->op.instr;

	if (!walker->simd_fn) {
		subtilis_error_set_assertion_failed(err);
		return;
	}

	walker->simd_fn(walker->user_data, op, instr->type,
			&instr->operands.reg_only, err);
}

// Assembly:
movq %rcx, %r8
movq 0x118(%rdi), %r9
testq %r9, %r9
je 0x52cfd
movq (%rdi), %rdi
movl 0x8(%rdx), %eax
leaq 0x10(%rdx), %rcx
movq %rdx, %rsi
movl %eax, %edx
jmpq *%r9
leaq 0x22eff(%rip), %rdx     # 0x75c03
movq %r8, %rdi
movl $0xf, %esi
movl $0x147, %ecx            # imm = 0x147
jmp 0x145a4
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_walker.c
// Function: prv_call_signx_fn
static void prv_call_signx_fn(subtlis_arm_walker_t *walker, void *user_data,
			      subtilis_arm_op_t *op, subtilis_error_t *err)
{
	subtilis_arm_instr_t *instr = &op->op.instr;

	if (!walker->signx_fn) {
		subtilis_error_set_assertion_failed(err);
		return;
	}

	walker->signx_fn(walker->user_data, op, instr->type,
			 &instr->operands.signx, err);
}

// Assembly:
movq %rcx, %r8
movq 0x120(%rdi), %r9
testq %r9, %r9
je 0x52d37
movq (%rdi), %rdi
movl 0x8(%rdx), %eax
leaq 0x10(%rdx), %rcx
movq %rdx, %rsi
movl %eax, %edx
jmpq *%r9
leaq 0x22ec5(%rip), %rdx     # 0x75c03
movq %r8, %rdi
movl $0xf, %esi
movl $0x155, %ecx            # imm = 0x155
jmp 0x145a4
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: subtilis_arm_reg_alloc_calculate_dist
int subtilis_arm_reg_alloc_calculate_dist(subtilis_arm_reg_ud_t *ud,
					  size_t reg_num, subtilis_arm_op_t *op,
					  subtlis_arm_walker_t *walker,
					  subtilis_arm_reg_class_t *regs)
{
	subtilis_error_t err;
	subtilis_arm_op_t *to;

	subtilis_error_init(&err);

	if (op->next == SIZE_MAX)
		return -1;

	op = &ud->arm_s->op_pool->ops[op->next];

	/*
	 * If we're calculating the distance for a virtual register
	 * we only need to go to the end of the basic block and not
	 * to the end of the function.  For fixed registers we need
	 * to go to the end of the function as these registers aren't
	 * currently preserved and restored as we move between basic
	 * blocks, although perhaps they should be.
	 */

	if (ud->ss_terminators && !regs->is_fixed(reg_num))
		to = ud->ss_terminators[ud->current_ss];
	else
		to = NULL;
	ud->dist_data.reg_num = reg_num;
	ud->dist_data.last_used = ud->instr_count + 1;

	subtilis_arm_walk_from_to(ud->arm_s, walker, op, to, &err);
	if (err.type != SUBTILIS_ERROR_OK)
		return ud->dist_data.last_used;
	else
		return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc18, %rsp            # imm = 0xC18
movq %r8, %r13
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xc(%rsp), %rdi
callq 0x143b4
movq 0x58(%r12), %rax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq $-0x1, %rax
je 0x52e13
movq 0x18(%rbx), %rcx
movq 0x38(%rcx), %rcx
imulq $0x68, %rax, %r12
addq (%rcx), %r12
cmpq $0x0, 0x38(%rbx)
je 0x52dd7
movq %r15, %rdi
callq *0x70(%r13)
testb %al, %al
je 0x52ddb
xorl %ecx, %ecx
jmp 0x52de7
movq 0x38(%rbx), %rax
movq 0x40(%rbx), %rcx
movq (%rax,%rcx,8), %rcx
movq %r15, 0x28(%rbx)
movl 0x20(%rbx), %eax
incl %eax
movl %eax, 0x30(%rbx)
movq 0x18(%rbx), %rdi
leaq 0xc(%rsp), %r15
movq %r14, %rsi
movq %r12, %rdx
movq %r15, %r8
callq 0x52897
cmpl $0x0, (%r15)
je 0x52e13
movl 0x30(%rbx), %ebp
movl %ebp, %eax
addq $0xc18, %rsp            # imm = 0xC18
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_reg_alloc.c
// Function: subtilis_arm_reg_alloc_alloc
void subtilis_arm_reg_alloc_alloc(subtilis_arm_reg_ud_t *ud,
				  subtilis_arm_op_t *current,
				  subtilis_arm_reg_class_t *int_regs,
				  subtilis_arm_reg_class_t *regs,
				  subtilis_arm_reg_t *reg,
				  subtilis_arm_reg_t restricted,
				  subtilis_error_t *err)
{
	size_t assigned;
	size_t virt_num = *reg;

	if (regs->is_fixed(*reg)) {
		if (*reg >= regs->max_regs)
			return;
		prv_allocate_fixed(ud, current, int_regs, regs, reg, err);
	} else {
		assigned = prv_virt_to_phys(regs, reg);
		if (assigned != INT_MAX) {
			*reg = assigned;
		} else {
			prv_allocate_floating(ud, current, int_regs, regs, reg,
					      restricted, err);
		}
	}

	if (err->type != SUBTILIS_ERROR_OK)
		return;

	regs->phys_to_virt[*reg] = virt_num;
}

// 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 %rsi, %r13
movq %rdi, %rbp
movq (%r8), %r15
movq %r15, %rdi
callq *0x70(%rcx)
testb %al, %al
je 0x52e8f
movq (%rbx), %r8
cmpq (%r14), %r8
jae 0x52ee7
movq 0x8(%r14), %rax
movq (%rax,%r8,8), %rdx
cmpq $0x7fffffff, %rdx       # imm = 0x7FFFFFFF
sete %al
cmpq %r8, %rdx
sete %cl
orb %al, %cl
movq 0x40(%rsp), %r12
jne 0x52ed5
movq 0x18(%rbp), %rdi
movq %r13, %rsi
movq %r14, %rcx
movq %r12, %r9
callq 0x551dc
jmp 0x52ed5
movq (%r14), %rax
testq %rax, %rax
je 0x52eb9
movq 0x8(%r14), %rdx
movq (%rbx), %rsi
xorl %ecx, %ecx
cmpq %rsi, (%rdx,%rcx,8)
je 0x52eb0
incq %rcx
cmpq %rcx, %rax
jne 0x52ea0
jmp 0x52eb9
cmpq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
jne 0x52ef6
movq %rbp, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movq %r12, %r8
movq 0x40(%rsp), %r12
movq %r12, %r9
callq 0x52f00
cmpl $0x0, (%r12)
jne 0x52ee7
movq 0x8(%r14), %rax
movq (%rbx), %rcx
movq %r15, (%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rcx, (%rbx)
movq 0x40(%rsp), %r12
jmp 0x52ed5
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_allocate_floating
static void
prv_allocate_floating(subtilis_arm_reg_ud_t *ud, subtilis_arm_op_t *current,
		      subtilis_arm_reg_class_t *int_regs,
		      subtilis_arm_reg_class_t *regs, subtilis_arm_reg_t *reg,
		      subtilis_arm_reg_t restricted, subtilis_error_t *err)
{
	subtilis_arm_reg_t target_reg;
	int i;
	int next = regs->max_regs;
	int max_next = -1;

	/* Virtual register is not already assigned. */

	for (i = regs->max_regs - 1; i >= 0; i--)
		if ((regs->phys_to_virt[i] == INT_MAX) &&
		    (restricted == SIZE_MAX || restricted != i))
			break;

	if (i >= 0) {
		target_reg = (size_t)i;
	} else {
		/* No free physical regs.  Need to spill. */

		for (i = 0; i < regs->max_regs; i++)
			if ((regs->next[i] > max_next) &&
			    (restricted == SIZE_MAX || restricted != i)) {
				max_next = regs->next[i];
				next = i;
			}
		if (next == regs->max_regs) {
			subtilis_error_set_assertion_failed(err);
			return;
		}
		target_reg = next;
		prv_spill_reg(ud, current, regs->phys_to_virt[next], int_regs,
			      regs, target_reg, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	}

	*reg = target_reg;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r9, %r14
movq %rcx, %rbx
movq %rdx, %rcx
movq (%rdx), %rax
movl %eax, %edx
movl %eax, %r9d
decq %r9
testl %r9d, %r9d
js 0x52f49
movl %r9d, %r15d
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
decq %r9
cmpq %r8, %r15
je 0x52f1c
movq 0x8(%rcx), %r10
cmpq $0x7fffffff, (%r10,%r15,8) # imm = 0x7FFFFFFF
jne 0x52f1c
movq %r15, (%rbx)
jmp 0x52fcf
testq %rax, %rax
je 0x52f85
movq 0x10(%rcx), %r9
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
xorl %r10d, %r10d
movl (%r9,%r10,4), %ebp
cmpl %r11d, %ebp
setle %r15b
cmpq %r10, %r8
sete %r12b
orb %r15b, %r12b
jne 0x52f78
movl %r10d, %edx
movl %ebp, %r11d
incq %r10
cmpq %r10, %rax
jne 0x52f5b
movslq %edx, %r15
jmp 0x52f88
xorl %r15d, %r15d
cmpq %r15, %rax
jne 0x52fae
leaq 0x22c9c(%rip), %rdx     # 0x75c30
movq %r14, %rdi
movl $0xf, %esi
movl $0x33a, %ecx            # imm = 0x33A
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x145a4
movq 0x8(%rcx), %rax
movq (%rax,%r15,8), %rdx
movq 0x18(%rdi), %rdi
movq %r15, %r8
movq %r14, %r9
callq 0x551dc
cmpl $0x0, (%r14)
je 0x52f41
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: subtilis_arm_reg_alloc_ensure
bool subtilis_arm_reg_alloc_ensure(subtilis_arm_reg_ud_t *ud,
				   subtilis_arm_op_t *current,
				   subtilis_arm_reg_class_t *int_regs,
				   subtilis_arm_reg_class_t *regs,
				   subtilis_arm_reg_t *reg,
				   subtilis_error_t *err)
{
	size_t assigned;
	subtilis_arm_reg_t target_reg;

	if (regs->is_fixed(*reg)) {
		/*
		 * Register has fixed use and is unavailable to user's code
		 * Physical register has already been allocated, e.g., r12, r13
		 */
		if (*reg >= regs->max_regs)
			return true;

		assigned = regs->phys_to_virt[*reg];
		if (assigned != *reg) {
			prv_allocate_fixed(ud, current, int_regs, regs, reg,
					   err);
			if (err->type != SUBTILIS_ERROR_OK)
				return false;
			prv_load_spilled_reg(ud, current, regs, *reg, *reg,
					     err);
			if (err->type != SUBTILIS_ERROR_OK)
				return false;
		}
	} else {
		assigned = prv_virt_to_phys(regs, reg);
		if (assigned != INT_MAX) {
			*reg = assigned;
		} else {
			target_reg = *reg;
			prv_allocate_floating(ud, current, int_regs, regs,
					      &target_reg, SIZE_MAX, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return false;
			prv_load_spilled_reg(ud, current, regs, *reg,
					     target_reg, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return false;
			*reg = target_reg;
		}
	}

	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq (%r8), %rdi
callq *0x70(%rcx)
testb %al, %al
je 0x53059
movq (%r14), %r8
movb $0x1, %al
cmpq (%r15), %r8
jae 0x530d1
movq 0x8(%r15), %rax
movq (%rax,%r8,8), %rdx
cmpq %r8, %rdx
je 0x530cf
cmpq $0x7fffffff, %rdx       # imm = 0x7FFFFFFF
je 0x53036
movq 0x18(%r13), %rdi
movq %r12, %rsi
movq %r15, %rcx
movq %rbx, %r9
callq 0x551dc
cmpl $0x0, (%rbx)
jne 0x530cf
movq (%r14), %rcx
movq 0x18(%r13), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rcx, %r8
movq %rbx, %r9
callq 0x530e0
jmp 0x530cf
movq (%r15), %rcx
movq (%r14), %rax
testq %rcx, %rcx
je 0x53083
movq 0x8(%r15), %rsi
xorl %edx, %edx
cmpq %rax, (%rsi,%rdx,8)
je 0x5307a
incq %rdx
cmpq %rdx, %rcx
jne 0x5306a
jmp 0x53083
cmpq $0x7fffffff, %rdx       # imm = 0x7FFFFFFF
jne 0x530cc
movq %rsp, %rcx
movq %rax, (%rcx)
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq $-0x1, %r8
movq %rbx, %r9
callq 0x52f00
cmpl $0x0, (%rbx)
jne 0x530cf
movq (%r14), %rcx
movq (%rsp), %rbp
movq 0x18(%r13), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbp, %r8
movq %rbx, %r9
callq 0x530e0
cmpl $0x0, (%rbx)
jne 0x530cf
movq %rbp, (%r14)
jmp 0x530cf
movq %rdx, (%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_load_spilled_reg
static void prv_load_spilled_reg(subtilis_arm_reg_ud_t *ud,
				 subtilis_arm_op_t *current,
				 subtilis_arm_reg_class_t *regs,
				 subtilis_arm_reg_t virt,
				 subtilis_arm_reg_t phys, subtilis_error_t *err)
{
	int i;
	size_t pos;
	subtilis_arm_section_t *arm_s = ud->arm_s;
	int32_t basic_offset = regs->spilt_regs[virt];

	if (basic_offset == INT_MAX) {
		subtilis_error_set_assertion_failed(err);
		return;
	}

	if (regs->spill_top == 0) {
		subtilis_error_set_assertion_failed(err);
		return;
	}

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

	prv_add_spill_point(regs, SUBTILIS_SPILL_POINT_LOAD, pos, basic_offset,
			    phys, err);

	regs->phys_to_virt[phys] = virt;
	regs->spilt_regs[virt] = INT_MAX;
	i = basic_offset / regs->reg_size;
	regs->spill_stack[i] = basic_offset;
	if (i == regs->spill_top - 1) {
		regs->spill_top--;
		for (i = i - 1; i >= 0; i--) {
			if (regs->spill_stack[i] == INT_MAX)
				break;
			regs->spill_top--;
		}
	}
	regs->next[phys] = -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x20(%rdx), %rax
movslq (%rax,%rcx,4), %r15
cmpq $0x7fffffff, %r15       # imm = 0x7FFFFFFF
jne 0x5310f
leaq 0x22b30(%rip), %rdx     # 0x75c30
movq %r9, %rdi
movl $0xf, %esi
movl $0x2c0, %ecx            # imm = 0x2C0
jmp 0x53152
movq %rdx, %r14
cmpq $0x0, 0x30(%rdx)
je 0x5313e
movq %r8, %rbx
movq %rcx, %r12
movq 0x60(%rsi), %rax
cmpq $-0x1, %rax
je 0x53162
movq 0x38(%rdi), %rcx
movq (%rcx), %rcx
imulq $0x68, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $0x58, %rdi
jmp 0x53166
leaq 0x22aeb(%rip), %rdx     # 0x75c30
movq %r9, %rdi
movl $0xf, %esi
movl $0x2c5, %ecx            # imm = 0x2C5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x145a4
addq $0x20, %rdi
movq (%rdi), %rdx
movq %r14, %rdi
xorl %esi, %esi
movl %r15d, %ecx
movq %rbx, %r8
callq 0x5527d
movq 0x8(%r14), %rax
movq %r12, (%rax,%rbx,8)
movq 0x20(%r14), %rax
movl $0x7fffffff, (%rax,%r12,4) # imm = 0x7FFFFFFF
movq %r15, %rax
xorl %edx, %edx
divq 0x40(%r14)
movq 0x28(%r14), %rcx
movslq %eax, %rsi
movq %r15, (%rcx,%rsi,8)
movq 0x30(%r14), %rdx
decq %rdx
cmpq %rdx, %rsi
jne 0x531c9
movl %eax, %eax
movq %rdx, 0x30(%r14)
testl %eax, %eax
jle 0x531c9
decq %rdx
cmpq $0x7fffffff, -0x8(%rcx,%rax,8) # imm = 0x7FFFFFFF
leaq -0x1(%rax), %rax
jne 0x531af
movq 0x10(%r14), %rax
movl $0xffffffff, (%rax,%rbx,4) # imm = 0xFFFFFFFF
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_reg_alloc.c
// Function: prv_allocate_dest_restricted
static void prv_allocate_dest_restricted(subtilis_arm_reg_ud_t *ud,
					 subtilis_arm_op_t *op,
					 subtilis_arm_reg_t *dest,
					 subtilis_arm_reg_t restricted,
					 subtilis_error_t *err)
{
	int dist_dest;
	size_t vreg_dest = *dest;

	if ((ud->int_regs->is_fixed(vreg_dest)) &&
	    (vreg_dest >= SUBTILIS_ARM_REG_MAX_INT_REGS))
		return;

	subtilis_arm_reg_alloc_alloc(ud, op, ud->int_regs, ud->int_regs, dest,
				     restricted, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	dist_dest = subtilis_arm_reg_alloc_calculate_dist(
	    ud, vreg_dest, op, &ud->int_regs->dist_walker, ud->int_regs);
	if (dist_dest == -1)
		ud->int_regs->phys_to_virt[*dest] = INT_MAX;
	ud->int_regs->next[*dest] = dist_dest;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r13
movq %rcx, %rbp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdx), %r12
movq 0x8(%rdi), %rax
movq %r12, %rdi
callq *0x70(%rax)
cmpq $0xb, %r12
jb 0x5321d
testb %al, %al
jne 0x53278
movq 0x8(%r14), %rcx
movq %r13, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %r8
movq %rbp, %r9
callq 0x52e27
cmpl $0x0, (%r13)
jne 0x53278
movq 0x8(%r14), %r8
leaq 0x90(%r8), %rcx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x52d7c
movq 0x8(%r14), %rcx
cmpl $-0x1, %eax
jne 0x5326e
movq 0x8(%rcx), %rdx
movq (%rbx), %rsi
movq $0x7fffffff, (%rdx,%rsi,8) # imm = 0x7FFFFFFF
movq 0x10(%rcx), %rcx
movq (%rbx), %rdx
movl %eax, (%rcx,%rdx,4)
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_reg_alloc.c
// Function: subtilis_arm_reg_alloc_alloc_fp_dest
void subtilis_arm_reg_alloc_alloc_fp_dest(subtilis_arm_reg_ud_t *ud,
					  subtilis_arm_op_t *op,
					  subtilis_arm_reg_t *dest,
					  subtilis_error_t *err)
{
	int dist_dest;
	size_t vreg_dest = *dest;

	subtilis_arm_reg_alloc_alloc(ud, op, ud->int_regs, ud->real_regs, dest,
				     SIZE_MAX, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	dist_dest = subtilis_arm_reg_alloc_calculate_dist(
	    ud, vreg_dest, op, &ud->real_regs->dist_walker, ud->real_regs);
	if (dist_dest == -1)
		ud->real_regs->phys_to_virt[*dest] = INT_MAX;
	ud->real_regs->next[*dest] = dist_dest;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r13
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdx), %r12
movq 0x10(%rdi), %rcx
movq %r13, (%rsp)
movq %rdx, %r8
movq $-0x1, %r9
callq 0x52e27
cmpl $0x0, (%r13)
jne 0x532fc
movq 0x10(%r14), %r8
leaq 0x90(%r8), %rcx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x52d7c
movq 0x10(%r14), %rcx
cmpl $-0x1, %eax
jne 0x532f2
movq 0x8(%rcx), %rdx
movq (%rbx), %rsi
movq $0x7fffffff, (%rdx,%rsi,8) # imm = 0x7FFFFFFF
movq 0x10(%rcx), %rcx
movq (%rbx), %rdx
movl %eax, (%rcx,%rdx,4)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_alloc_mov_instr
static void prv_alloc_mov_instr(void *user_data, subtilis_arm_op_t *op,
				subtilis_arm_instr_type_t type,
				subtilis_arm_data_instr_t *instr,
				subtilis_error_t *err)
{
	int dist_op2_shift;
	subtilis_arm_reg_t *reg;
	subtilis_arm_reg_t *shift_reg;
	int dist_op2 = -1;
	subtilis_arm_reg_ud_t *ud = user_data;

	reg = prv_ensure_op2(ud, op, &instr->op2, &dist_op2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	shift_reg =
	    prv_ensure_op2_shift_reg(ud, op, &instr->op2, &dist_op2_shift, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_arm_reg_alloc_alloc_dest(ud, op, &instr->dest, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	/* Need to check for useless moves */

	if (reg && !shift_reg && ((type != SUBTILIS_ARM_INSTR_MOV) ||
				  (instr->dest != instr->op2.op.reg)))
		ud->int_regs->next[*reg] = dist_op2;

	if (shift_reg)
		ud->int_regs->next[*shift_reg] = dist_op2_shift;

	ud->instr_count++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r12
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r13
movq %rdi, %rbx
movl $0xffffffff, 0x4(%rsp)  # imm = 0xFFFFFFFF
testl $0xfffffffd, 0x18(%rcx) # imm = 0xFFFFFFFD
jne 0x53f2e
leaq 0x20(%r14), %rcx
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %r8
callq 0x55f53
movq %rax, %r15
jmp 0x53f31
xorl %r15d, %r15d
cmpl $0x0, (%r12)
jne 0x53fe4
cmpl $0x2, 0x18(%r14)
jne 0x53f6f
cmpb $0x1, 0x38(%r14)
jne 0x53f6f
leaq 0x30(%r14), %rcx
leaq 0x14(%rsp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %r8
callq 0x55f53
movq %rax, 0x8(%rsp)
cmpl $0x0, (%r12)
jne 0x53fe4
jmp 0x53f78
movq $0x0, 0x8(%rsp)
leaq 0x8(%r14), %rdx
movq %rbx, %rdi
movq %r13, %rsi
movq $-0x1, %rcx
movq %r12, %r8
callq 0x531ec
cmpl $0x0, (%r12)
jne 0x53fe4
testq %r15, %r15
sete %al
movq 0x8(%rsp), %rdx
testq %rdx, %rdx
setne %cl
orb %al, %cl
je 0x53fbc
testq %rdx, %rdx
je 0x53fe0
leaq 0x14(%rsp), %rax
movq %rdx, %r15
jmp 0x53fd0
leaq 0x4(%rsp), %rax
cmpl $0xd, %ebp
jne 0x53fd0
movq 0x8(%r14), %rcx
cmpq 0x20(%r14), %rcx
je 0x53fe0
movl (%rax), %eax
movq 0x8(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq (%r15), %rdx
movl %eax, (%rcx,%rdx,4)
incq 0x20(%rbx)
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_reg_alloc.c
// Function: prv_alloc_br_instr
static void prv_alloc_br_instr(void *user_data, subtilis_arm_op_t *op,
			       subtilis_arm_instr_type_t type,
			       subtilis_arm_br_instr_t *instr,
			       subtilis_error_t *err)
{
	size_t vreg_op1;
	bool fixed_reg_op1 = true;
	int dist_op1 = -1;
	subtilis_arm_reg_ud_t *ud = user_data;
	size_t reg = 0;
	subtilis_arm_reg_class_t *regs = NULL;

	if (instr->indirect) {
		vreg_op1 = instr->target.reg;
		fixed_reg_op1 = subtilis_arm_reg_alloc_ensure(
		    ud, op, ud->int_regs, ud->int_regs, &instr->target.reg,
		    err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		if (!fixed_reg_op1) {
			dist_op1 = subtilis_arm_reg_alloc_calculate_dist(
			    ud, vreg_op1, op, &ud->int_regs->dist_walker,
			    ud->int_regs);
			if (dist_op1 == -1)
				ud->int_regs->phys_to_virt[instr->target.reg] =
				    INT_MAX;
		}
	}

	/*
	 * We need to make sure that F0 or R0 are marked as being
	 * allocated when we return from a function.  Otherwise we
	 * can get an assertion when we ensure them later in the code.
	 */

	if (instr->link_type == SUBTILIS_ARM_BR_LINK_INT)
		regs = ud->int_regs;
	else if (instr->link_type == SUBTILIS_ARM_BR_LINK_REAL)
		regs = ud->real_regs;

	if (regs) {
		subtilis_arm_reg_alloc_alloc(ud, op, ud->int_regs, regs, &reg,
					     SIZE_MAX, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	}

	if (instr->indirect && !fixed_reg_op1)
		ud->int_regs->next[instr->target.reg] = dist_op1;

	ud->instr_count++;

	prv_check_current_ss(ud, op, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r12
movq %rsi, %r14
movq %rdi, %r15
movq $0x0, 0x10(%rsp)
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
cmpb $0x1, 0x6(%rcx)
jne 0x54227
leaq 0x10(%r12), %r13
movq 0x10(%r12), %rbp
movq 0x8(%r15), %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %r8
movq %rbx, %r9
callq 0x52fd8
cmpl $0x0, (%rbx)
jne 0x5426d
testb %al, %al
je 0x542bb
xorl %ebp, %ebp
movl 0x8(%r12), %eax
cmpl $0x1, %eax
je 0x5423f
cmpl $0x2, %eax
jne 0x5427c
movl $0x10, %eax
jmp 0x54244
movl $0x8, %eax
movq (%r15,%rax), %rcx
testq %rcx, %rcx
je 0x5427c
movq %rbx, (%rsp)
leaq 0x10(%rsp), %r8
movq %r15, %rdi
movq %r14, %rsi
movq $-0x1, %r9
callq 0x52e27
cmpl $0x0, (%rbx)
je 0x5427c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
andb 0x6(%r12), %bpl
cmpb $0x1, %bpl
jne 0x5429b
movq 0x8(%r15), %rax
movq 0x10(%rax), %rax
movq 0x10(%r12), %rcx
movl 0xc(%rsp), %edx
movl %edx, (%rax,%rcx,4)
incq 0x20(%r15)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x55f1a
movq 0x8(%r15), %r8
leaq 0x90(%r8), %rcx
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x52d7c
movb $0x1, %bpl
cmpl $-0x1, %eax
je 0x542e5
movl %eax, 0xc(%rsp)
jmp 0x54229
movq 0x8(%r15), %rax
movq 0x8(%rax), %rax
movq (%r13), %rcx
movq $0x7fffffff, (%rax,%rcx,8) # imm = 0x7FFFFFFF
jmp 0x54229
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_alloc_swi_instr
static void prv_alloc_swi_instr(void *user_data, subtilis_arm_op_t *op,
				subtilis_arm_instr_type_t type,
				subtilis_arm_swi_instr_t *instr,
				subtilis_error_t *err)
{
	size_t i;
	int dist;
	subtilis_arm_reg_t reg;
	subtilis_arm_reg_ud_t *ud = user_data;

	/* SWIs can only use the first 10 regs */

	for (i = 0; i < 10; i++) {
		if ((1 << i) & instr->reg_read_mask) {
			reg = i;
			subtilis_arm_reg_alloc_ensure(ud, op, ud->int_regs,
						      ud->int_regs, &reg, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return;
			dist = subtilis_arm_reg_alloc_calculate_dist(
			    ud, reg, op, &ud->int_regs->dist_walker,
			    ud->int_regs);
			if (dist == -1)
				ud->int_regs->phys_to_virt[reg] = INT_MAX;
			ud->int_regs->next[reg] = dist;
		} else if ((1 << i) & instr->reg_write_mask) {
			reg = i;
			subtilis_arm_reg_alloc_alloc_dest(ud, op, &reg, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return;
		}
	}

	ud->instr_count++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rsi, %r12
movq %rdi, %r15
xorl %r13d, %r13d
movl $0x1, %eax
movl %r13d, %ecx
shll %cl, %eax
movl 0x10(%r14), %ecx
btl %r13d, %ecx
jae 0x54385
movq %r13, (%rsp)
movq 0x8(%r15), %rcx
movq %r15, %rdi
movq %r12, %rsi
movq %rsp, %r8
movq %rbx, %r9
callq 0x52fd8
cmpl $0x0, (%rbx)
jne 0x543bd
movq (%rsp), %rbp
movq 0x8(%r15), %r8
leaq 0x90(%r8), %rcx
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x52d7c
movq 0x8(%r15), %rcx
cmpl $-0x1, %eax
jne 0x5437c
movq 0x8(%rcx), %rdx
movq $0x7fffffff, (%rdx,%rbp,8) # imm = 0x7FFFFFFF
movq 0x10(%rcx), %rcx
movl %eax, (%rcx,%rbp,4)
jmp 0x543ac
testl %eax, 0x14(%r14)
je 0x543ac
movq %r13, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
movq %rsp, %rdx
movq $-0x1, %rcx
movq %rbx, %r8
callq 0x531ec
cmpl $0x0, (%rbx)
jne 0x543bd
incq %r13
cmpq $0xa, %r13
jne 0x54318
incq 0x20(%r15)
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_reg_alloc.c
// Function: prv_alloc_ldrc_instr
static void prv_alloc_ldrc_instr(void *user_data, subtilis_arm_op_t *op,
				 subtilis_arm_instr_type_t type,
				 subtilis_arm_ldrc_instr_t *instr,
				 subtilis_error_t *err)
{
	subtilis_arm_reg_ud_t *ud = user_data;

	subtilis_arm_reg_alloc_alloc_dest(ud, op, &instr->dest, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	ud->instr_count++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rdi, %rbx
leaq 0x8(%rcx), %rdx
movq $-0x1, %rcx
callq 0x531ec
cmpl $0x0, (%r14)
jne 0x543f0
incq 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_alloc_ldrp_instr
static void prv_alloc_ldrp_instr(void *user_data, subtilis_arm_op_t *op,
				 subtilis_arm_instr_type_t type,
				 subtilis_arm_ldrp_instr_t *instr,
				 subtilis_error_t *err)
{
	subtilis_arm_reg_ud_t *ud = user_data;

	subtilis_arm_reg_alloc_alloc_dest(ud, op, &instr->dest, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	ud->instr_count++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rdi, %rbx
leaq 0x8(%rcx), %rdx
movq $-0x1, %rcx
callq 0x531ec
cmpl $0x0, (%r14)
jne 0x5441c
incq 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_alloc_cmov_instr
static void prv_alloc_cmov_instr(void *user_data, subtilis_arm_op_t *op,
				 subtilis_arm_instr_type_t type,
				 subtilis_arm_cmov_instr_t *instr,
				 subtilis_error_t *err)
{
	int dist_op[3];
	size_t vreg_op[3];
	bool fixed_reg_op[3];
	subtilis_arm_reg_t *reg_ptr[3];
	size_t i;
	subtilis_arm_reg_ud_t *ud = user_data;
	size_t count = 2;

	if (!instr->fused)
		count++;

	i = 0;

	if (!instr->fused) {
		vreg_op[i] = instr->op1;
		reg_ptr[i++] = &instr->op1;
	}
	vreg_op[i] = instr->op2;
	reg_ptr[i++] = &instr->op2;
	vreg_op[i] = instr->op3;
	reg_ptr[i] = &instr->op3;

	for (i = 0; i < count; i++) {
		fixed_reg_op[i] = subtilis_arm_reg_alloc_ensure(
		    ud, op, ud->int_regs, ud->int_regs, reg_ptr[i], err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	}

	for (i = 0; i < count; i++) {
		if (!fixed_reg_op[i]) {
			dist_op[i] = subtilis_arm_reg_alloc_calculate_dist(
			    ud, vreg_op[i], op, &ud->int_regs->dist_walker,
			    ud->int_regs);
			if (dist_op[i] == -1)
				ud->int_regs->phys_to_virt[*reg_ptr[i]] =
				    INT_MAX;
		}
	}

	subtilis_arm_reg_alloc_alloc_dest(ud, op, &instr->dest, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	for (i = 0; i < count; i++)
		if (!fixed_reg_op[i])
			ud->int_regs->next[*reg_ptr[i]] = dist_op[i];

	ud->instr_count++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %r14
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movzbl 0x20(%rcx), %r13d
leaq 0x18(%rsp), %rax
leaq 0x38(%rsp), %rcx
testq %r13, %r13
je 0x5448a
leaq 0x30(%rsp), %rdx
leaq 0x10(%rsp), %rsi
jmp 0x544aa
movq %rcx, %rdx
leaq 0x40(%rsp), %rcx
movq %rax, %rsi
leaq 0x20(%rsp), %rax
leaq 0x8(%r15), %rdi
movq 0x8(%r15), %r8
movq %r8, -0x10(%rcx)
movq %rdi, -0x10(%rax)
xorq $0x3, %r13
leaq 0x10(%r15), %rdi
movq 0x10(%r15), %r8
movq %r8, (%rdx)
movq %rdi, (%rsi)
leaq 0x18(%r15), %rdx
movq 0x18(%r15), %rsi
movq %rsi, (%rcx)
movq %rdx, (%rax)
xorl %ebp, %ebp
movq 0x8(%rbx), %rcx
movq 0x10(%rsp,%rbp,8), %r8
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %r9
callq 0x52fd8
movb %al, 0xd(%rsp,%rbp)
cmpl $0x0, (%r14)
jne 0x54590
incq %rbp
cmpq %rbp, %r13
jne 0x544cc
xorl %ebp, %ebp
cmpb $0x0, 0xd(%rsp,%rbp)
jne 0x5453e
movq 0x30(%rsp,%rbp,8), %rsi
movq 0x8(%rbx), %r8
leaq 0x90(%r8), %rcx
movq %rbx, %rdi
movq %r12, %rdx
callq 0x52d7c
movl %eax, 0x4c(%rsp,%rbp,4)
cmpl $-0x1, %eax
jne 0x5453e
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x10(%rsp,%rbp,8), %rcx
movq (%rcx), %rcx
movq $0x7fffffff, (%rax,%rcx,8) # imm = 0x7FFFFFFF
incq %rbp
cmpq %rbp, %r13
jne 0x544fb
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq $-0x1, %rcx
movq %r14, %r8
callq 0x531ec
cmpl $0x0, (%r14)
jne 0x54590
xorl %eax, %eax
cmpb $0x0, 0xd(%rsp,%rax)
jne 0x54584
movl 0x4c(%rsp,%rax,4), %ecx
movq 0x8(%rbx), %rdx
movq 0x10(%rdx), %rdx
movq 0x10(%rsp,%rax,8), %rsi
movq (%rsi), %rsi
movl %ecx, (%rdx,%rsi,4)
incq %rax
cmpq %rax, %r13
jne 0x54566
incq 0x20(%rbx)
addq $0x58, %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_reg_alloc.c
// Function: prv_alloc_flags_instr
static void prv_alloc_flags_instr(void *user_data, subtilis_arm_op_t *op,
				  subtilis_arm_instr_type_t type,
				  subtilis_arm_flags_instr_t *instr,
				  subtilis_error_t *err)
{
	subtilis_arm_reg_t vreg;
	subtilis_arm_reg_ud_t *ud = user_data;
	bool fixed_reg;
	int dist;

	if (type == SUBTILIS_ARM_INSTR_MRS) {
		subtilis_arm_reg_alloc_alloc_dest(ud, op, &instr->op.reg, err);
	} else if (instr->flag_reg) {
		vreg = instr->op.reg;
		fixed_reg = subtilis_arm_reg_alloc_ensure(
		    ud, op, ud->int_regs, ud->int_regs, &instr->op.reg, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		if (!fixed_reg) {
			dist = subtilis_arm_reg_alloc_calculate_dist(
			    ud, vreg, op, &ud->int_regs->dist_walker,
			    ud->int_regs);
			if (dist == -1)
				ud->int_regs->phys_to_virt[instr->op.reg] =
				    INT_MAX;
			ud->int_regs->next[instr->op.reg] = dist;
		}
	}

	ud->instr_count++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %r12
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x1d, %edx
jne 0x545d7
addq $0x10, %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq $-0x1, %rcx
movq %r12, %r8
callq 0x531ec
jmp 0x54641
cmpl $0x0, 0x4(%r14)
je 0x54641
movq 0x10(%r14), %r13
addq $0x10, %r14
movq 0x8(%rbx), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %r8
movq %r12, %r9
callq 0x52fd8
cmpl $0x0, (%r12)
jne 0x54645
testb %al, %al
jne 0x54641
movq 0x8(%rbx), %r8
leaq 0x90(%r8), %rcx
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x52d7c
movq 0x8(%rbx), %rcx
cmpl $-0x1, %eax
jne 0x54637
movq 0x8(%rcx), %rdx
movq (%r14), %rsi
movq $0x7fffffff, (%rdx,%rsi,8) # imm = 0x7FFFFFFF
movq 0x10(%rcx), %rcx
movq (%r14), %rdx
movl %eax, (%rcx,%rdx,4)
incq 0x20(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_alloc_signx_instr
static void prv_alloc_signx_instr(void *user_data, subtilis_arm_op_t *op,
				  subtilis_arm_instr_type_t type,
				  subtilis_arm_signx_instr_t *instr,
				  subtilis_error_t *err)
{
	size_t vreg_op1;
	bool fixed_reg_op1;
	int dist_op1 = -1;
	subtilis_arm_reg_ud_t *ud = user_data;

	vreg_op1 = instr->op1;
	fixed_reg_op1 = subtilis_arm_reg_alloc_ensure(
	    ud, op, ud->int_regs, ud->int_regs, &instr->op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (!fixed_reg_op1) {
		dist_op1 = subtilis_arm_reg_alloc_calculate_dist(
		    ud, vreg_op1, op, &ud->int_regs->dist_walker, ud->int_regs);
		if (dist_op1 == -1)
			ud->int_regs->phys_to_virt[instr->op1] = INT_MAX;
	}

	subtilis_arm_reg_alloc_alloc_dest(ud, op, &instr->dest, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (!fixed_reg_op1)
		ud->int_regs->next[instr->op1] = dist_op1;

	ud->instr_count++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x10(%rcx), %r15
movq 0x10(%rcx), %rbp
movq 0x8(%rdi), %rcx
movq %r15, %r8
movq %r14, %r9
callq 0x52fd8
cmpl $0x0, (%r14)
je 0x54692
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb %al, %al
je 0x546ba
addq $0x8, %r12
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq $-0x1, %rcx
movq %r14, %r8
callq 0x531ec
cmpl $0x0, (%r14)
jne 0x54683
jmp 0x54721
movq 0x8(%rbx), %r8
leaq 0x90(%r8), %rcx
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x52d7c
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x546ed
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rax
movq (%r15), %rcx
movq $0x7fffffff, (%rax,%rcx,8) # imm = 0x7FFFFFFF
addq $0x8, %r12
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq $-0x1, %rcx
movq %r14, %r8
callq 0x531ec
cmpl $0x0, (%r14)
jne 0x54683
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rax
movq (%r15), %rcx
movl %ebp, (%rax,%rcx,4)
incq 0x20(%rbx)
jmp 0x54683
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_free_arm_reg_ud
static void prv_free_arm_reg_ud(subtilis_arm_reg_ud_t *ud)
{
	if (!ud)
		return;

	prv_free_regs(ud->real_regs);
	prv_free_regs(ud->int_regs);
	free(ud->ss_terminators);
}

// Assembly:
testq %rdi, %rdi
je 0x5496e
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x558ba
movq 0x8(%rbx), %rdi
callq 0x558ba
movq 0x38(%rbx), %rdi
popq %rbx
jmp 0x122c0
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: subtilis_arm_regs_used_before_from_tov
void subtilis_arm_regs_used_before_from_tov(subtilis_arm_section_t *arm_s,
					    subtilis_arm_op_t *from,
					    subtilis_arm_op_t *op,
					    size_t int_args, size_t real_args,
					    subtilis_regs_used_virt_t *used,
					    subtilis_error_t *err)
{
	size_t i;
	subtilis_arm_reg_ud_t ud;

	prv_init_arm_reg_ud(&ud, arm_s, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	for (i = SUBTILIS_ARM_INT_VIRT_REG_START; i < int_args; i++) {
		if (prv_is_reg_used_before(&ud, i, &ud.int_regs->used_walker,
					   from, op)) {
			subtilis_bitset_set(&used->int_regs, i, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return;
		}
	}

	for (i = arm_s->fp_if->max_regs; i < real_args; i++) {
		if (prv_is_reg_used_before(&ud, i, &ud.real_regs->used_walker,
					   from, op)) {
			subtilis_bitset_set(&used->real_regs, i, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return;
		}
	}

	prv_free_arm_reg_ud(&ud);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, %rbx
movq %r8, 0x8(%rsp)
movq %rcx, %rbp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rsi
movq 0xa0(%rsp), %r13
leaq 0x18(%rsp), %rdi
movq %rsi, 0x10(%rsp)
movq %r13, %rdx
callq 0x538a3
cmpl $0x0, (%r13)
jne 0x54a85
cmpq $0x11, %rbp
jb 0x54a07
movl $0x10, %r14d
movq 0x20(%rsp), %rdx
movl $0x1b8, %eax            # imm = 0x1B8
addq %rax, %rdx
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rcx
movq %r15, %r8
callq 0x54a94
testb %al, %al
je 0x549ff
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x5db68
cmpl $0x0, (%r13)
jne 0x54a85
incq %r14
cmpq %r14, %rbp
jne 0x549c2
movq 0x10(%rsp), %rax
movq 0xc0(%rax), %rax
movq (%rax), %rbp
cmpq 0x8(%rsp), %rbp
jae 0x54a67
addq $0x18, %rbx
leaq 0x18(%rsp), %r14
movq 0x28(%rsp), %rdx
movl $0x1b8, %eax            # imm = 0x1B8
addq %rax, %rdx
movq %r14, %rdi
movq %rbp, %rsi
movq %r12, %rcx
movq %r15, %r8
callq 0x54a94
testb %al, %al
je 0x54a5d
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x5db68
cmpl $0x0, (%r13)
jne 0x54a85
incq %rbp
cmpq %rbp, 0x8(%rsp)
jne 0x54a26
movq 0x28(%rsp), %rdi
callq 0x558ba
movq 0x20(%rsp), %rdi
callq 0x558ba
movq 0x50(%rsp), %rdi
callq 0x122c0
addq $0x68, %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_reg_alloc.c
// Function: prv_is_reg_used_before
static bool prv_is_reg_used_before(subtilis_arm_reg_ud_t *ud, size_t reg_num,
				   subtlis_arm_walker_t *used_walker,
				   subtilis_arm_op_t *from,
				   subtilis_arm_op_t *to)
{
	subtilis_error_t err;

	subtilis_error_init(&err);
	ud->dist_data.reg_num = reg_num;
	ud->dist_data.last_used = 0;
	subtilis_arm_walk_from_to(ud->arm_s, used_walker, from, to, &err);
	if ((err.type == SUBTILIS_ERROR_OK) || (ud->dist_data.last_used != -1))
		return false;

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc18, %rsp            # imm = 0xC18
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq 0xc(%rsp), %rbp
movq %rbp, %rdi
callq 0x143b4
movq %r13, 0x28(%rbx)
movl $0x0, 0x30(%rbx)
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbp, %r8
callq 0x52897
cmpl $0x0, (%rbp)
je 0x54af0
cmpl $-0x1, 0x30(%rbx)
sete %al
jmp 0x54af2
xorl %eax, %eax
addq $0xc18, %rsp            # imm = 0xC18
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_reg_alloc.c
// Function: subtilis_arm_regs_used_before
void subtilis_arm_regs_used_before(subtilis_arm_section_t *arm_s,
				   subtilis_arm_op_t *op, size_t int_args,
				   size_t real_args,
				   subtilis_regs_used_t *regs_used,
				   subtilis_error_t *err)
{
	subtilis_arm_op_t *from;

	from = &arm_s->op_pool->ops[arm_s->first_op];
	prv_arm_regs_used_before_from_to(arm_s, from, op, int_args, real_args,
					 regs_used, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, %rbp
movq %r8, %r13
movq %rcx, 0x10(%rsp)
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x38(%rdi), %rax
imulq $0x68, 0x20(%rdi), %r12
addq (%rax), %r12
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
movq %r9, %rdx
callq 0x538a3
cmpl $0x0, (%rbp)
jne 0x54c49
movq %r13, 0x8(%rsp)
cmpq $0x4, %rbx
movl $0x4, %ebp
cmovbq %rbx, %rbp
xorl %r13d, %r13d
movq 0x10(%rsp), %rbx
movq 0xa0(%r15), %rax
cmpq 0x158(%rax), %rbp
jb 0x54b9a
movq 0x20(%rsp), %rdx
movl $0x1b8, %eax            # imm = 0x1B8
addq %rax, %rdx
leaq 0x18(%rsp), %rdi
movq %rbp, %rsi
movq %r12, %rcx
movq %r14, %r8
callq 0x54a94
testb %al, %al
je 0x54ba6
movl $0x1, %eax
movl %ebp, %ecx
shll %cl, %eax
orq %rax, %r13
incq %rbp
cmpq $0xb, %rbp
jne 0x54b66
cmpq $0x4, %rbx
movl $0x4, %ebp
cmovbq %rbx, %rbp
movq 0xc0(%r15), %rax
cmpq (%rax), %rbp
jae 0x54c1d
xorl %ebx, %ebx
movq 0xa0(%r15), %rax
cmpq 0x160(%rax), %rbp
jb 0x54bfe
movq 0x28(%rsp), %rdx
movl $0x1b8, %eax            # imm = 0x1B8
addq %rax, %rdx
leaq 0x18(%rsp), %rdi
movq %rbp, %rsi
movq %r12, %rcx
movq %r14, %r8
callq 0x54a94
testb %al, %al
je 0x54c0c
movl $0x1, %eax
movl %ebp, %ecx
shll %cl, %eax
cltq
orq %rax, %rbx
incq %rbp
movq 0xc0(%r15), %rax
cmpq (%rax), %rbp
jb 0x54bca
jmp 0x54c1f
xorl %ebx, %ebx
movq 0x8(%rsp), %rax
movq %r13, (%rax)
movq %rbx, 0x8(%rax)
movq 0x28(%rsp), %rdi
callq 0x558ba
movq 0x20(%rsp), %rdi
callq 0x558ba
movq 0x50(%rsp), %rdi
callq 0x122c0
addq $0x68, %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_reg_alloc.c
// Function: subtilis_arm_regs_used_afterv
void subtilis_arm_regs_used_afterv(subtilis_arm_section_t *arm_s,
				   subtilis_arm_op_t *from,
				   subtilis_arm_op_t *to, size_t int_args,
				   size_t real_args, size_t count,
				   subtilis_regs_used_virt_t *used,
				   subtilis_error_t *err)
{
	size_t i;
	subtilis_arm_reg_ud_t ud;

	prv_init_arm_reg_ud(&ud, arm_s, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	ud.instr_count = count + 1;

	for (i = SUBTILIS_ARM_INT_VIRT_REG_START; i < int_args; i++) {
		if (prv_is_reg_used_after_to(&ud, i, &ud.int_regs->dist_walker,
					     from, to)) {
			subtilis_bitset_set(&used->int_regs, i, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return;
		}
	}

	for (i = arm_s->fp_if->max_regs; i < real_args; i++) {
		if (prv_is_reg_used_after_to(&ud, i, &ud.real_regs->dist_walker,
					     from, to)) {
			subtilis_bitset_set(&used->real_regs, i, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return;
		}
	}

	prv_free_arm_reg_ud(&ud);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, %rbx
movq %r8, 0x8(%rsp)
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rsi
movq 0xa8(%rsp), %r12
leaq 0x18(%rsp), %rdi
movq %rsi, 0x10(%rsp)
movq %r12, %rdx
callq 0x538a3
cmpl $0x0, (%r12)
jne 0x54d7d
movq 0xa0(%rsp), %r13
incq %rbx
movq %rbx, 0x38(%rsp)
cmpq $0x11, %rbp
jb 0x54cff
movl $0x10, %ebx
movq 0x20(%rsp), %rdx
movl $0x90, %eax
addq %rax, %rdx
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rcx
movq %r14, %r8
callq 0x54d8c
testb %al, %al
je 0x54cf7
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x5db68
cmpl $0x0, (%r12)
jne 0x54d7d
incq %rbx
cmpq %rbx, %rbp
jne 0x54cba
movq 0x10(%rsp), %rax
movq 0xc0(%rax), %rax
movq (%rax), %rbp
cmpq 0x8(%rsp), %rbp
jae 0x54d5f
addq $0x18, %r13
leaq 0x18(%rsp), %rbx
movq 0x28(%rsp), %rdx
movl $0x90, %eax
addq %rax, %rdx
movq %rbx, %rdi
movq %rbp, %rsi
movq %r15, %rcx
movq %r14, %r8
callq 0x54d8c
testb %al, %al
je 0x54d55
movq %r13, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x5db68
cmpl $0x0, (%r12)
jne 0x54d7d
incq %rbp
cmpq %rbp, 0x8(%rsp)
jne 0x54d1e
movq 0x28(%rsp), %rdi
callq 0x558ba
movq 0x20(%rsp), %rdi
callq 0x558ba
movq 0x50(%rsp), %rdi
callq 0x122c0
addq $0x68, %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_reg_alloc.c
// Function: prv_is_reg_used_after_to
static bool prv_is_reg_used_after_to(subtilis_arm_reg_ud_t *ud, size_t reg_num,
				     subtlis_arm_walker_t *dist_walker,
				     subtilis_arm_op_t *from,
				     subtilis_arm_op_t *to)
{
	subtilis_error_t err;

	subtilis_error_init(&err);

	ud->dist_data.reg_num = reg_num;
	ud->dist_data.last_used = ud->instr_count + 1;

	subtilis_arm_walk_from_to(ud->arm_s, dist_walker, from, to, &err);

	/*
	 * Check that reg_num is used and that the  first usage of
	 * reg_num is not a write.
	 */

	return (err.type != SUBTILIS_ERROR_OK) &&
	       (ud->dist_data.last_used != -1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc18, %rsp            # imm = 0xC18
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq 0xc(%rsp), %rbp
movq %rbp, %rdi
callq 0x143b4
movq %r13, 0x28(%rbx)
movl 0x20(%rbx), %eax
incl %eax
movl %eax, 0x30(%rbx)
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbp, %r8
callq 0x52897
cmpl $0x0, (%rbp)
je 0x54de9
cmpl $-0x1, 0x30(%rbx)
setne %al
jmp 0x54deb
xorl %eax, %eax
addq $0xc18, %rsp            # imm = 0xC18
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_reg_alloc.c
// Function: subtilis_arm_regs_used_after
void subtilis_arm_regs_used_after(subtilis_arm_section_t *arm_s,
				  subtilis_arm_op_t *op, size_t int_args,
				  size_t real_args,
				  subtilis_regs_used_t *regs_used,
				  subtilis_error_t *err)
{
	size_t i;
	subtilis_arm_reg_ud_t ud;
	size_t int_reg_list = 0;
	size_t real_reg_list = 0;

	prv_init_arm_reg_ud(&ud, arm_s, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	i = int_args;
	if (i > SUBTILIS_ARM_REG_MAX_ARGS)
		i = SUBTILIS_ARM_REG_MAX_ARGS;
	for (; i <= SUBTILIS_ARM_REG_MAX_INT_REGS - 1; i++) {
		if (prv_is_reg_used_after(&ud, i, &ud.int_regs->dist_walker,
					  op))
			int_reg_list |= 1 << i;
	}

	i = real_args;
	if (i > SUBTILIS_ARM_REG_MAX_ARGS)
		i = SUBTILIS_ARM_REG_MAX_ARGS;
	for (; i < arm_s->fp_if->max_regs; i++) {
		if (prv_is_reg_used_after(&ud, i, &ud.real_regs->dist_walker,
					  op))
			real_reg_list |= 1 << i;
	}

	regs_used->int_regs = int_reg_list;
	regs_used->real_regs = real_reg_list;

	prv_free_arm_reg_ud(&ud);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, %r13
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
movq %r9, %rdx
callq 0x538a3
cmpl $0x0, (%r13)
jne 0x54f47
movq %r12, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
cmpq $0x4, %rbp
movl $0x4, %r13d
cmovbq %rbp, %r13
xorl %ebx, %ebx
movl $0x90, %r12d
leaq 0x18(%rsp), %rbp
movq 0x20(%rsp), %rdx
addq %r12, %rdx
movq 0x30(%rsp), %rax
movq 0x38(%rax), %rcx
imulq $0x68, 0x28(%rax), %r8
addq (%rcx), %r8
movq %rbp, %rdi
movq %r13, %rsi
movq %r14, %rcx
callq 0x54d8c
movl $0x1, %edx
movl %r13d, %ecx
shll %cl, %edx
testb %al, %al
jne 0x54e94
xorl %edx, %edx
orq %rdx, %rbx
incq %r13
cmpq $0xb, %r13
jne 0x54e5d
movq 0x8(%rsp), %rax
cmpq $0x4, %rax
movl $0x4, %r13d
cmovbq %rax, %r13
movq 0xc0(%r15), %rax
cmpq (%rax), %r13
jae 0x54f1b
xorl %ebp, %ebp
leaq 0x18(%rsp), %r12
movq 0x28(%rsp), %rdx
movl $0x90, %eax
addq %rax, %rdx
movq 0x30(%rsp), %rax
movq 0x38(%rax), %rcx
imulq $0x68, 0x28(%rax), %r8
addq (%rcx), %r8
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rcx
callq 0x54d8c
movl $0x1, %edx
movl %r13d, %ecx
shll %cl, %edx
testb %al, %al
jne 0x54f04
xorl %eax, %eax
jmp 0x54f07
movslq %edx, %rax
orq %rax, %rbp
incq %r13
movq 0xc0(%r15), %rax
cmpq (%rax), %r13
jb 0x54ec6
jmp 0x54f1d
xorl %ebp, %ebp
movq 0x10(%rsp), %rax
movq %rbx, (%rax)
movq %rbp, 0x8(%rax)
movq 0x28(%rsp), %rdi
callq 0x558ba
movq 0x20(%rsp), %rdi
callq 0x558ba
movq 0x50(%rsp), %rdi
callq 0x122c0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq