LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x5301a
movq (%rbx), %r8
cmpq (%r14), %r8
jae 0x53083
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 0x53071
movq %rbp, %rdi
movq %r13, %rsi
movq %r14, %rcx
movq %r12, %r9
callq 0x552f4
jmp 0x53071
movq (%r14), %rcx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
testq %rcx, %rcx
je 0x53043
movq 0x8(%r14), %rdx
movq (%rbx), %rdi
xorl %esi, %esi
cmpq %rdi, (%rdx,%rsi,8)
je 0x53040
incq %rsi
cmpq %rsi, %rcx
jne 0x53030
jmp 0x53043
movq %rsi, %rax
cmpq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
jne 0x53069
movq %rbp, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movq %r12, %r8
movq 0x40(%rsp), %r12
movq %r12, %r9
callq 0x53092
jmp 0x53071
movq %rax, (%rbx)
movq 0x40(%rsp), %r12
cmpl $0x0, (%r12)
jne 0x53083
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
// File: /workspace/github_c_makefile_star2_O1/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 0x530d8
movl %r9d, %r15d
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
decq %r9
cmpq %r8, %r15
je 0x530ae
movq 0x8(%rcx), %r10
cmpq $0x7fffffff, (%r10,%r15,8) # imm = 0x7FFFFFFF
jne 0x530ae
movq %r15, (%rbx)
jmp 0x53151
testq %rax, %rax
je 0x5310f
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 0x53107
movl %r10d, %edx
movl %ebp, %r11d
incq %r10
cmpq %r10, %rax
jne 0x530ea
movslq %edx, %r15
cmpq %r15, %rax
jne 0x53138
leaq 0x22abd(%rip), %rdx     # 0x75bdb
movq %r14, %rdi
movl $0xf, %esi
movl $0x33a, %ecx            # imm = 0x33A
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x145f4
movq 0x8(%rcx), %rax
movq (%rax,%r15,8), %rdx
movq %r15, %r8
movq %r14, %r9
callq 0x552f4
cmpl $0x0, (%r14)
je 0x530d3
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x531d9
movq (%r14), %r8
movb $0x1, %al
cmpq (%r15), %r8
jae 0x5325a
movq 0x8(%r15), %rax
movq (%rax,%r8,8), %rdx
cmpq %r8, %rdx
je 0x53258
cmpq $0x7fffffff, %rdx       # imm = 0x7FFFFFFF
je 0x531b7
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rcx
movq %rbx, %r9
callq 0x552f4
cmpl $0x0, (%rbx)
jne 0x53258
movq (%r14), %rcx
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rcx, %r8
movq %rbx, %r9
callq 0x53269
jmp 0x53258
movq (%r15), %rcx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
testq %rcx, %rcx
je 0x53202
movq 0x8(%r15), %rdx
movq (%r14), %rdi
xorl %esi, %esi
cmpq %rdi, (%rdx,%rsi,8)
je 0x531ff
incq %rsi
cmpq %rsi, %rcx
jne 0x531ef
jmp 0x53202
movq %rsi, %rax
cmpq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
jne 0x53255
movq (%r14), %rax
movq %rsp, %rcx
movq %rax, (%rcx)
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq $-0x1, %r8
movq %rbx, %r9
callq 0x53092
cmpl $0x0, (%rbx)
jne 0x53258
movq (%r14), %rcx
movq (%rsp), %rbp
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbp, %r8
movq %rbx, %r9
callq 0x53269
cmpl $0x0, (%rbx)
jne 0x53258
movq %rbp, (%r14)
jmp 0x53258
movq %rax, (%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_O1/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 0x53298
leaq 0x22952(%rip), %rdx     # 0x75bdb
movq %r9, %rdi
movl $0xf, %esi
movl $0x2c0, %ecx            # imm = 0x2C0
jmp 0x532de
movq %rdx, %r14
cmpq $0x0, 0x30(%rdx)
je 0x532ca
movq %r8, %rbx
movq %rcx, %r12
movq 0x18(%rdi), %rax
movq 0x60(%rsi), %rcx
cmpq $-0x1, %rcx
je 0x532ee
movq 0x38(%rax), %rax
movq (%rax), %rax
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
addq $0x58, %rax
jmp 0x532f2
leaq 0x2290a(%rip), %rdx     # 0x75bdb
movq %r9, %rdi
movl $0xf, %esi
movl $0x2c5, %ecx            # imm = 0x2C5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x145f4
addq $0x20, %rax
movq (%rax), %rdx
movq %r14, %rdi
xorl %esi, %esi
movl %r15d, %ecx
movq %rbx, %r8
callq 0x553a5
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 0x53355
movl %eax, %eax
movq %rdx, 0x30(%r14)
testl %eax, %eax
jle 0x53355
decq %rdx
cmpq $0x7fffffff, -0x8(%rcx,%rax,8) # imm = 0x7FFFFFFF
leaq -0x1(%rax), %rax
jne 0x5333b
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_O1/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 0x533a9
testb %al, %al
jne 0x53408
movq 0x8(%r14), %rcx
movq %r13, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %r8
movq %rbp, %r9
callq 0x52fb3
cmpl $0x0, (%r13)
jne 0x53408
movq 0x8(%r14), %r8
leaq 0x90(%r8), %rcx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x52f08
cmpl $-0x1, %eax
jne 0x533fa
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rcx
movq (%rbx), %rdx
movq $0x7fffffff, (%rcx,%rdx,8) # imm = 0x7FFFFFFF
movq 0x8(%r14), %rcx
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_O1/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 0x52fb3
cmpl $0x0, (%r13)
jne 0x53490
movq 0x10(%r14), %r8
leaq 0x90(%r8), %rcx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x52f08
cmpl $-0x1, %eax
jne 0x53482
movq 0x10(%r14), %rcx
movq 0x8(%rcx), %rcx
movq (%rbx), %rdx
movq $0x7fffffff, (%rcx,%rdx,8) # imm = 0x7FFFFFFF
movq 0x10(%r14), %rcx
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_O1/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, 0xc(%rsp)
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x10(%rsp), %rcx
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
leaq 0x18(%r14), %rbp
movq %rbp, %rdx
callq 0x55dc3
cmpl $0x0, (%r12)
jne 0x540f6
movq %rax, %r15
cmpl $0x2, (%rbp)
jne 0x5407e
cmpb $0x1, 0x38(%r14)
jne 0x5407e
leaq 0x30(%r14), %rcx
leaq 0x14(%rsp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %r8
callq 0x55ddd
movq %rax, %rbp
jmp 0x54080
xorl %ebp, %ebp
cmpl $0x0, (%r12)
jne 0x540f6
leaq 0x8(%r14), %rdx
movq %rbx, %rdi
movq %r13, %rsi
movq $-0x1, %rcx
movq %r12, %r8
callq 0x53378
cmpl $0x0, (%r12)
jne 0x540f6
testq %r15, %r15
sete %al
testq %rbp, %rbp
setne %cl
orb %al, %cl
jne 0x540da
cmpl $0xd, 0xc(%rsp)
jne 0x540c8
movq 0x8(%r14), %rax
cmpq 0x20(%r14), %rax
je 0x540da
movl 0x10(%rsp), %eax
movq 0x8(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq (%r15), %rdx
movl %eax, (%rcx,%rdx,4)
testq %rbp, %rbp
je 0x540f2
movl 0x14(%rsp), %eax
movq 0x8(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq (%rbp), %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_O1/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 0x544a7
movq %r13, (%rsp)
movq 0x8(%r15), %rcx
movq %r15, %rdi
movq %r12, %rsi
movq %rsp, %r8
movq %rbx, %r9
callq 0x5315a
cmpl $0x0, (%rbx)
jne 0x544df
movq (%rsp), %rbp
movq 0x8(%r15), %r8
leaq 0x90(%r8), %rcx
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x52f08
cmpl $-0x1, %eax
jne 0x5449a
movq 0x8(%r15), %rcx
movq 0x8(%rcx), %rcx
movq $0x7fffffff, (%rcx,%rbp,8) # imm = 0x7FFFFFFF
movq 0x8(%r15), %rcx
movq 0x10(%rcx), %rcx
movl %eax, (%rcx,%rbp,4)
jmp 0x544ce
testl %eax, 0x14(%r14)
je 0x544ce
movq %r13, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
movq %rsp, %rdx
movq $-0x1, %rcx
movq %rbx, %r8
callq 0x53378
cmpl $0x0, (%rbx)
jne 0x544df
incq %r13
cmpq $0xa, %r13
jne 0x54436
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_O1/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 0x53378
cmpl $0x0, (%r14)
jne 0x54512
incq 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x53378
cmpl $0x0, (%r14)
jne 0x5453e
incq 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_alloc_adr_instr
static void prv_alloc_adr_instr(void *user_data, subtilis_arm_op_t *op,
				subtilis_arm_instr_type_t type,
				subtilis_arm_adr_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 0x53378
cmpl $0x0, (%r14)
jne 0x5456a
incq 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
testq %r13, %r13
je 0x545ac
leaq 0x18(%rsp), %rax
leaq 0x30(%rsp), %rdx
leaq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %rcx
jmp 0x545d0
leaq 0x40(%rsp), %rcx
leaq 0x20(%rsp), %rax
leaq 0x38(%rsp), %rdx
leaq 0x18(%rsp), %rsi
leaq 0x8(%r15), %rdi
movq 0x8(%r15), %r8
movq %r8, -0x8(%rdx)
movq %rdi, -0x8(%rsi)
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 0x5315a
movb %al, 0xd(%rsp,%rbp)
cmpl $0x0, (%r14)
jne 0x546b6
incq %rbp
cmpq %rbp, %r13
jne 0x545f2
xorl %ebp, %ebp
cmpb $0x0, 0xd(%rsp,%rbp)
jne 0x54664
movq 0x30(%rsp,%rbp,8), %rsi
movq 0x8(%rbx), %r8
leaq 0x90(%r8), %rcx
movq %rbx, %rdi
movq %r12, %rdx
callq 0x52f08
movl %eax, 0x4c(%rsp,%rbp,4)
cmpl $-0x1, %eax
jne 0x54664
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 0x54621
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq $-0x1, %rcx
movq %r14, %r8
callq 0x53378
cmpl $0x0, (%r14)
jne 0x546b6
xorl %eax, %eax
cmpb $0x0, 0xd(%rsp,%rax)
jne 0x546aa
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 0x5468c
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_O1/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 0x546fd
addq $0x10, %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq $-0x1, %rcx
movq %r12, %r8
callq 0x53378
jmp 0x5476b
cmpl $0x0, 0x4(%r14)
je 0x5476b
movq 0x10(%r14), %r13
addq $0x10, %r14
movq 0x8(%rbx), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %r8
movq %r12, %r9
callq 0x5315a
cmpl $0x0, (%r12)
jne 0x5476f
testb %al, %al
jne 0x5476b
movq 0x8(%rbx), %r8
leaq 0x90(%r8), %rcx
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x52f08
cmpl $-0x1, %eax
jne 0x5475d
movq 0x8(%rbx), %rcx
movq 0x8(%rcx), %rcx
movq (%r14), %rdx
movq $0x7fffffff, (%rcx,%rdx,8) # imm = 0x7FFFFFFF
movq 0x8(%rbx), %rcx
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_O1/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, %r15
movq %rcx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x10(%rcx), %r14
movq 0x10(%rcx), %rbp
movq 0x8(%rdi), %rcx
movq %r14, %r8
movq %r15, %r9
callq 0x5315a
cmpl $0x0, (%r15)
jne 0x54834
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movb %al, 0x7(%rsp)
testb %al, %al
jne 0x547f6
movq 0x8(%rbx), %r8
leaq 0x90(%r8), %rcx
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x52f08
movl %eax, %ecx
cmpl $-0x1, %eax
jne 0x547f6
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rax
movq (%r14), %rcx
movq $0x7fffffff, (%rax,%rcx,8) # imm = 0x7FFFFFFF
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, %ebp
addq $0x8, %r12
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq $-0x1, %rcx
movq %r15, %r8
callq 0x53378
cmpl $0x0, (%r15)
movb 0x7(%rsp), %al
jne 0x54834
testb %al, %al
jne 0x54830
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rax
movq (%r14), %rcx
movl %ebp, (%rax,%rcx,4)
incq 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/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 0x54a7f
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x5572a
movq 0x8(%rbx), %rdi
callq 0x5572a
movq 0x38(%rbx), %rdi
popq %rbx
jmp 0x122c0
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x53a00
cmpl $0x0, (%r13)
jne 0x54b96
cmpq $0x11, %rbp
jb 0x54b18
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 0x54ba5
testb %al, %al
je 0x54b10
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x5db60
cmpl $0x0, (%r13)
jne 0x54b96
incq %r14
cmpq %r14, %rbp
jne 0x54ad3
movq 0x10(%rsp), %rax
movq 0xc0(%rax), %rax
movq (%rax), %rbp
cmpq 0x8(%rsp), %rbp
jae 0x54b78
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 0x54ba5
testb %al, %al
je 0x54b6e
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x5db60
cmpl $0x0, (%r13)
jne 0x54b96
incq %rbp
cmpq %rbp, 0x8(%rsp)
jne 0x54b37
movq 0x28(%rsp), %rdi
callq 0x5572a
movq 0x20(%rsp), %rdi
callq 0x5572a
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_O1/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 0x14404
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 0x52a23
cmpl $0x0, (%rbp)
je 0x54c01
cmpl $-0x1, 0x30(%rbx)
sete %al
jmp 0x54c03
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_O1/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 0x53a00
cmpl $0x0, (%rbp)
jne 0x54d5a
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 0x54cab
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 0x54ba5
testb %al, %al
je 0x54cb7
movl $0x1, %eax
movl %ebp, %ecx
shll %cl, %eax
orq %rax, %r13
incq %rbp
cmpq $0xb, %rbp
jne 0x54c77
cmpq $0x4, %rbx
movl $0x4, %ebp
cmovbq %rbx, %rbp
movq 0xc0(%r15), %rax
cmpq (%rax), %rbp
jae 0x54d2e
xorl %ebx, %ebx
movq 0xa0(%r15), %rax
cmpq 0x160(%rax), %rbp
jb 0x54d0f
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 0x54ba5
testb %al, %al
je 0x54d1d
movl $0x1, %eax
movl %ebp, %ecx
shll %cl, %eax
cltq
orq %rax, %rbx
incq %rbp
movq 0xc0(%r15), %rax
cmpq (%rax), %rbp
jb 0x54cdb
jmp 0x54d30
xorl %ebx, %ebx
movq 0x8(%rsp), %rax
movq %r13, (%rax)
movq %rbx, 0x8(%rax)
movq 0x28(%rsp), %rdi
callq 0x5572a
movq 0x20(%rsp), %rdi
callq 0x5572a
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_O1/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 0x53a00
cmpl $0x0, (%r12)
jne 0x54e8e
movq 0xa0(%rsp), %r13
incq %rbx
movq %rbx, 0x38(%rsp)
cmpq $0x11, %rbp
jb 0x54e10
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 0x54e9d
testb %al, %al
je 0x54e08
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x5db60
cmpl $0x0, (%r12)
jne 0x54e8e
incq %rbx
cmpq %rbx, %rbp
jne 0x54dcb
movq 0x10(%rsp), %rax
movq 0xc0(%rax), %rax
movq (%rax), %rbp
cmpq 0x8(%rsp), %rbp
jae 0x54e70
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 0x54e9d
testb %al, %al
je 0x54e66
movq %r13, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x5db60
cmpl $0x0, (%r12)
jne 0x54e8e
incq %rbp
cmpq %rbp, 0x8(%rsp)
jne 0x54e2f
movq 0x28(%rsp), %rdi
callq 0x5572a
movq 0x20(%rsp), %rdi
callq 0x5572a
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_O1/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 0x14404
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 0x52a23
cmpl $0x0, (%rbp)
je 0x54efa
cmpl $-0x1, 0x30(%rbx)
setne %al
jmp 0x54efc
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_O1/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 0x53a00
cmpl $0x0, (%r13)
jne 0x55058
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 0x54e9d
movl $0x1, %edx
movl %r13d, %ecx
shll %cl, %edx
testb %al, %al
jne 0x54fa5
xorl %edx, %edx
orq %rdx, %rbx
incq %r13
cmpq $0xb, %r13
jne 0x54f6e
movq 0x8(%rsp), %rax
cmpq $0x4, %rax
movl $0x4, %r13d
cmovbq %rax, %r13
movq 0xc0(%r15), %rax
cmpq (%rax), %r13
jae 0x5502c
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 0x54e9d
movl $0x1, %edx
movl %r13d, %ecx
shll %cl, %edx
testb %al, %al
jne 0x55015
xorl %eax, %eax
jmp 0x55018
movslq %edx, %rax
orq %rax, %rbp
incq %r13
movq 0xc0(%r15), %rax
cmpq (%rax), %r13
jb 0x54fd7
jmp 0x5502e
xorl %ebp, %ebp
movq 0x10(%rsp), %rax
movq %rbx, (%rax)
movq %rbp, 0x8(%rax)
movq 0x28(%rsp), %rdi
callq 0x5572a
movq 0x20(%rsp), %rdi
callq 0x5572a
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_O1/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_update_arg_offsets
static void prv_update_arg_offsets(subtilis_arm_section_t *arm_s,
				   subtilis_arm_call_site_t *call_site,
				   size_t int_regs_used, size_t real_regs_used,
				   subtilis_error_t *err)
{
	size_t i;
	size_t ptr;
	subtilis_arm_op_t *op;
	subtilis_arm_stran_instr_t *st;
	size_t bytes_saved = 0;

	for (i = 0; i < 15; i++)
		if (1 << i & int_regs_used)
			bytes_saved += sizeof(int32_t);

	if (!arm_s->fp_if) {
		subtilis_error_set_assertion_failed(err);
		return;
	}

	for (i = 0; i < arm_s->fp_if->max_regs; i++)
		if (1 << i & real_regs_used)
			bytes_saved += sizeof(double);

	if (call_site->int_args > 4) {
		for (i = 0; i < call_site->int_args - 4; i++) {
			ptr = call_site->int_arg_ops[i];
			op = &arm_s->op_pool->ops[ptr];
			st = &op->op.instr.operands.stran;
			st->offset.op.integer += bytes_saved;
		}
	}

	if (call_site->real_args > 4)
		arm_s->fp_if->update_offs_fn(arm_s, call_site, bytes_saved,
					     err);
}

// Assembly:
movq %rcx, %rax
movq %rdx, %rcx
xorl %edx, %edx
xorl %r9d, %r9d
movq %rdx, %r10
addq $0x4, %rdx
btq %r9, %rcx
cmovaeq %r10, %rdx
incq %r9
cmpq $0xf, %r9
jne 0x55244
movq 0xc0(%rdi), %rcx
testq %rcx, %rcx
je 0x552da
movq (%rcx), %r9
testq %r9, %r9
je 0x55291
xorl %ecx, %ecx
movl $0x1, %r10d
shll %cl, %r10d
movslq %r10d, %r10
leaq 0x8(%rdx), %r11
testq %rax, %r10
cmovneq %r11, %rdx
incq %rcx
cmpq %rcx, %r9
jne 0x55272
cmpq $0x5, 0x20(%rsi)
jb 0x552c3
cmpq $0x4, 0x20(%rsi)
je 0x552c3
xorl %eax, %eax
movq 0x38(%rdi), %rcx
imulq $0x68, 0x38(%rsi,%rax,8), %r9
movq (%rcx), %rcx
addl %edx, 0x30(%rcx,%r9)
incq %rax
movq 0x20(%rsi), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
jb 0x552a1
cmpq $0x5, 0x28(%rsi)
jb 0x552f3
movq 0xc0(%rdi), %rax
movq 0x40(%rax), %rax
movq %r8, %rcx
jmpq *%rax
leaq 0x208fa(%rip), %rdx     # 0x75bdb
movq %r8, %rdi
movl $0xf, %esi
movl $0x8c1, %ecx            # imm = 0x8C1
jmp 0x145f4
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_spill_reg
static void prv_spill_reg(subtilis_arm_reg_ud_t *ud, subtilis_arm_op_t *current,
			  size_t assigned, subtilis_arm_reg_class_t *int_regs,
			  subtilis_arm_reg_class_t *regs,
			  subtilis_arm_reg_t reg, subtilis_error_t *err)
{
	size_t i;
	int32_t offset;
	size_t pos;
	subtilis_arm_section_t *arm_s = ud->arm_s;

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

	for (i = 0; i < regs->spill_top; i++)
		if (regs->spill_stack[i] != INT_MAX)
			break;

	offset = (int32_t)regs->spill_stack[i];
	regs->spill_stack[i] = INT_MAX;
	if (i == regs->spill_top) {
		regs->spill_top++;
		if (regs->spill_max < regs->spill_top)
			regs->spill_max = regs->spill_top;
	}

	regs->spilt_regs[assigned] = offset;

	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_STORE, pos, offset, reg,
			    err);
}

// Assembly:
movq 0x30(%rcx), %rax
cmpq 0x18(%rcx), %rax
jne 0x55317
leaq 0x208d6(%rip), %rdx     # 0x75bdb
movq %r9, %rdi
movl $0xf, %esi
movl $0x2eb, %ecx            # imm = 0x2EB
jmp 0x145f4
testq %rax, %rax
je 0x5533a
movq 0x28(%rcx), %r11
xorl %r10d, %r10d
cmpq $0x7fffffff, (%r11,%r10,8) # imm = 0x7FFFFFFF
jne 0x5533d
incq %r10
cmpq %r10, %rax
jne 0x55323
movq %rax, %r10
jmp 0x5533d
xorl %r10d, %r10d
movq 0x18(%rdi), %rdi
movq 0x28(%rcx), %r11
movl (%r11,%r10,8), %eax
movq $0x7fffffff, (%r11,%r10,8) # imm = 0x7FFFFFFF
movq 0x30(%rcx), %r11
cmpq %r11, %r10
jne 0x5536b
incq %r11
movq %r11, 0x30(%rcx)
cmpq %r11, 0x38(%rcx)
jae 0x5536b
movq %r11, 0x38(%rcx)
movq 0x20(%rcx), %r10
movl %eax, (%r10,%rdx,4)
movq 0x60(%rsi), %rdx
cmpq $-0x1, %rdx
je 0x55392
movq 0x38(%rdi), %rsi
movq (%rsi), %rsi
imulq $0x68, %rdx, %rdx
leaq (%rsi,%rdx), %rdi
addq $0x58, %rdi
jmp 0x55396
addq $0x20, %rdi
movq (%rdi), %rdx
movq %rcx, %rdi
movl $0x1, %esi
movl %eax, %ecx
jmp 0x553a5
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_add_spill_point
static void prv_add_spill_point(subtilis_arm_reg_class_t *regs,
				subtilis_spill_point_type_t type, size_t pos,
				int32_t offset, subtilis_arm_reg_t phys,
				subtilis_error_t *err)
{
	subtilis_spill_point_t *sp;
	size_t new_max;

	if (regs->spill_points_count == regs->spill_points_max) {
		new_max = regs->spill_points_count + SUBTILIS_CONFIG_SSS_GRAN;
		sp = realloc(regs->spill_points, new_max * sizeof(*sp));
		if (!sp) {
			subtilis_error_set_oom(err);
			return;
		}
		regs->spill_points = sp;
		regs->spill_points_max = new_max;
	}
	sp = &regs->spill_points[regs->spill_points_count++];
	sp->type = type;
	sp->pos = pos;
	sp->offset = offset;
	sp->phys = phys;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %r12
movq 0x80(%rdi), %r13
cmpq 0x88(%rdi), %r13
jne 0x553f9
movq %r9, (%rsp)
addq $0x10, %r13
movq 0x78(%r12), %rdi
movq %r13, %rsi
shlq $0x5, %rsi
callq 0x12210
testq %rax, %rax
je 0x55437
movq %rax, 0x78(%r12)
movq %r13, 0x88(%r12)
movq 0x78(%r12), %rax
movq 0x80(%r12), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x80(%r12)
shlq $0x5, %rcx
movl %r15d, (%rax,%rcx)
movq %r14, 0x8(%rax,%rcx)
movl %ebp, 0x10(%rax,%rcx)
movq %rbx, 0x18(%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2079d(%rip), %rdx     # 0x75bdb
movq (%rsp), %rdi
movl $0x1, %esi
movl $0x1d3, %ecx            # imm = 0x1D3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x145f4
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_free_regs
static void prv_free_regs(subtilis_arm_reg_class_t *regs)
{
	if (regs) {
		free(regs->spill_points);
		free(regs->spill_stack);
		free(regs->spilt_regs);
		free(regs->next);
		free(regs->phys_to_virt);
		free(regs);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x55769
pushq %rbx
movq %rdi, %rbx
movq 0x78(%rdi), %rdi
callq 0x122c0
movq 0x28(%rbx), %rdi
callq 0x122c0
movq 0x20(%rbx), %rdi
callq 0x122c0
movq 0x10(%rbx), %rdi
callq 0x122c0
movq 0x8(%rbx), %rdi
callq 0x122c0
movq %rbx, %rdi
popq %rbx
jmp 0x122c0
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_sub_section_int_links
static void prv_sub_section_int_links(subtilis_arm_reg_ud_t *ud,
				      subtilis_bitset_t *int_save,
				      subtilis_arm_ccode_type_t ccode,
				      subtilis_arm_prespilt_offsets_t *offsets,
				      subtilis_arm_op_t *op,
				      subtilis_error_t *err)
{
	int j;
	int32_t offset;
	subtilis_arm_reg_t reg;

	for (j = 0; j <= int_save->max_value; j++) {
		if (!subtilis_bitset_isset(int_save, j))
			continue;
		offset = prv_arm_presplit_int_offset(offsets, j, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		offset += ud->arm_s->locals;

		if (offset > 4095 || offset < -4095) {
			reg = subtilis_arm_acquire_new_reg(ud->arm_s);
			subtilis_arm_insert_stran_spill_imm(
			    ud->arm_s, op, SUBTILIS_ARM_INSTR_STR, ccode, j, 11,
			    reg, offset, err);
		} else {
			subtilis_arm_insert_stran_imm(
			    ud->arm_s, op, SUBTILIS_ARM_INSTR_STR, ccode, j, 11,
			    offset, err);
		}
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x10(%rsp)
movl %edx, 0xc(%rsp)
cmpl $0x0, 0x8(%rsi)
js 0x55b62
movq %r9, %rbx
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq $-0x1, %r14
incq %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x5dc3d
testb %al, %al
je 0x55b54
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x55c67
cmpl $0x0, (%rbx)
jne 0x55b62
movq 0x18(%r13), %rdi
movl 0x30(%rdi), %ecx
leal (%rcx,%rax), %ebp
addl %ecx, %eax
addl $0xfffff000, %eax       # imm = 0xFFFFF000
cmpl $0xffffe000, %eax       # imm = 0xFFFFE000
ja 0x55b2d
callq 0x4efd1
movq 0x18(%r13), %rdi
subq $0x8, %rsp
movl $0xb, %r9d
movq 0x18(%rsp), %rsi
movl $0x13, %edx
movl 0x14(%rsp), %ecx
movq %r14, %r8
pushq %rbx
pushq %rbp
pushq %rax
callq 0x50928
addq $0x20, %rsp
jmp 0x55b4f
movl $0xb, %r9d
movq 0x10(%rsp), %rsi
movl $0x13, %edx
movl 0xc(%rsp), %ecx
movq %r14, %r8
pushq %rbx
pushq %rbp
callq 0x509cb
addq $0x10, %rsp
cmpl $0x0, (%rbx)
jne 0x55b62
movslq 0x8(%r12), %rax
cmpq %rax, %r14
jl 0x55aba
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq