LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x55133
movq 0xc0(%rdi), %rcx
testq %rcx, %rcx
je 0x551c2
movq (%rcx), %r9
testq %r9, %r9
je 0x55180
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 0x55161
cmpq $0x5, 0x20(%rsi)
jb 0x551ab
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 0x55189
cmpq $0x5, 0x28(%rsi)
jb 0x551db
movq 0xc0(%rdi), %rax
movq 0x40(%rax), %rax
movq %r8, %rcx
jmpq *%rax
leaq 0x20a67(%rip), %rdx     # 0x75c30
movq %r8, %rdi
movl $0xf, %esi
movl $0x8c1, %ecx            # imm = 0x8C1
jmp 0x145a4
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x551ff
leaq 0x20a43(%rip), %rdx     # 0x75c30
movq %r9, %rdi
movl $0xf, %esi
movl $0x2eb, %ecx            # imm = 0x2EB
jmp 0x145a4
movq 0x28(%rcx), %r11
xorl %r10d, %r10d
testq %rax, %rax
je 0x55220
cmpq $0x7fffffff, (%r11,%r10,8) # imm = 0x7FFFFFFF
jne 0x55220
incq %r10
cmpq %r10, %rax
jne 0x5520b
movq %rax, %r10
movl (%r11,%r10,8), %eax
movq $0x7fffffff, (%r11,%r10,8) # imm = 0x7FFFFFFF
cmpq 0x30(%rcx), %r10
jne 0x55243
incq %r10
movq %r10, 0x30(%rcx)
cmpq %r10, 0x38(%rcx)
jae 0x55243
movq %r10, 0x38(%rcx)
movq 0x20(%rcx), %r10
movl %eax, (%r10,%rdx,4)
movq 0x60(%rsi), %rdx
cmpq $-0x1, %rdx
je 0x5526a
movq 0x38(%rdi), %rsi
movq (%rsi), %rsi
imulq $0x68, %rdx, %rdx
leaq (%rsi,%rdx), %rdi
addq $0x58, %rdi
jmp 0x5526e
addq $0x20, %rdi
movq (%rdi), %rdx
movq %rcx, %rdi
movl $0x1, %esi
movl %eax, %ecx
jmp 0x5527d
// File: /workspace/github_c_makefile_star2_O3/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 0x552db
movq %r9, (%rsp)
addq $0x10, %r13
movq 0x78(%r12), %rdi
movq %r13, %rsi
shlq $0x5, %rsi
callq 0x12210
testq %rax, %rax
je 0x55312
movq %rax, 0x78(%r12)
movq %r13, 0x88(%r12)
movq 0x80(%r12), %r13
jmp 0x552e0
movq 0x78(%r12), %rax
leaq 0x1(%r13), %rcx
movq %rcx, 0x80(%r12)
shlq $0x5, %r13
movl %r15d, (%rax,%r13)
movq %r14, 0x8(%rax,%r13)
movl %ebp, 0x10(%rax,%r13)
movq %rbx, 0x18(%rax,%r13)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20917(%rip), %rdx     # 0x75c30
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 0x145a4
// File: /workspace/github_c_makefile_star2_O3/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 0x558f9
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_O3/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 0x55cf2
movq %r9, %rbx
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq $-0x1, %r14
incq %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x5dc45
testb %al, %al
je 0x55ce4
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x55df7
cmpl $0x0, (%rbx)
jne 0x55cf2
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 0x55cbd
callq 0x4ef94
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 0x5077e
addq $0x20, %rsp
jmp 0x55cdf
movl $0xb, %r9d
movq 0x10(%rsp), %rsi
movl $0x13, %edx
movl 0xc(%rsp), %ecx
movq %r14, %r8
pushq %rbx
pushq %rbp
callq 0x50821
addq $0x10, %rsp
cmpl $0x0, (%rbx)
jne 0x55cf2
movslq 0x8(%r12), %rax
cmpq %rax, %r14
jl 0x55c4a
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_sub_section_real_links
static void prv_sub_section_real_links(subtilis_arm_reg_ud_t *ud,
				       subtilis_bitset_t *real_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 <= real_save->max_value; j++) {
		if (!subtilis_bitset_isset(real_save, j))
			continue;
		offset = prv_arm_presplit_real_offset(offsets, j, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		offset += ud->arm_s->locals;

		if (offset > ud->arm_s->fp_if->max_offset ||
		    offset < -(ud->arm_s->fp_if->max_offset + 1)) {
			reg = subtilis_arm_acquire_new_reg(ud->arm_s);
			ud->arm_s->fp_if->spill_imm_fn(
			    ud->arm_s, op, ud->arm_s->fp_if->store_type, ccode,
			    j, 11, reg, offset, err);
		} else {
			ud->arm_s->fp_if->stran_imm_fn(
			    ud->arm_s, op, ud->arm_s->fp_if->store_type, 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 0x55de8
movq %r9, %rbx
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq $-0x1, %r14
incq %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x5dc45
testb %al, %al
je 0x55dda
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x55e35
cmpl $0x0, (%rbx)
jne 0x55de8
movq %rax, %rbp
movq 0x18(%r13), %rdi
addl 0x30(%rdi), %ebp
movq 0xc0(%rdi), %rax
movl 0x8(%rax), %ecx
cmpl %ebp, %ecx
jl 0x55da0
notl %ecx
cmpl %ecx, %ebp
jl 0x55da0
movl 0x18(%rax), %edx
movl $0xb, %r9d
movq 0x10(%rsp), %rsi
movl 0xc(%rsp), %ecx
movq %r14, %r8
pushq %rbx
pushq %rbp
callq *0x60(%rax)
addq $0x10, %rsp
jmp 0x55dd5
callq 0x4ef94
movq 0x18(%r13), %rdi
movq 0xc0(%rdi), %r10
movl 0x18(%r10), %edx
subq $0x8, %rsp
movl $0xb, %r9d
movq 0x18(%rsp), %rsi
movl 0x14(%rsp), %ecx
movq %r14, %r8
pushq %rbx
pushq %rbp
pushq %rax
callq *0x58(%r10)
addq $0x20, %rsp
cmpl $0x0, (%rbx)
jne 0x55de8
movslq 0x8(%r12), %rax
cmpq %rax, %r14
jl 0x55d35
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_arm_presplit_int_offset
static size_t prv_arm_presplit_int_offset(subtilis_arm_prespilt_offsets_t *off,
					  size_t reg, subtilis_error_t *err)
{
	size_t i;

	for (i = 0; i < off->int_count; i++)
		if (off->int_offsets[i] == reg)
			return i * sizeof(int32_t);

	subtilis_error_set_assertion_failed(err);

	return 0;
}

// Assembly:
pushq %rax
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x55e15
movq (%rdi), %rdi
xorl %eax, %eax
cmpq %rsi, (%rdi,%rax,2)
je 0x55e33
addq $0x4, %rax
decq %rcx
jne 0x55e06
leaq 0x1fe14(%rip), %rax     # 0x75c30
movq %rdx, %rdi
movl $0xf, %esi
movq %rax, %rdx
movl $0x121, %ecx            # imm = 0x121
callq 0x145a4
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_arm_presplit_real_offset
static size_t prv_arm_presplit_real_offset(subtilis_arm_prespilt_offsets_t *off,
					   size_t reg, subtilis_error_t *err)
{
	size_t i;
	size_t offset = off->int_count * sizeof(int32_t);

	for (i = 0; i < off->real_count; i++)
		if (off->real_offsets[i] == reg)
			return offset + (i * sizeof(double));

	subtilis_error_set_assertion_failed(err);

	return 0;
}

// Assembly:
pushq %rax
movq 0x18(%rdi), %rcx
testq %rcx, %rcx
je 0x55e60
movq 0x10(%rdi), %rax
shlq $0x2, %rax
movq 0x8(%rdi), %rdi
xorl %r8d, %r8d
cmpq %rsi, (%rdi,%r8,8)
je 0x55e7e
incq %r8
addq $0x8, %rax
cmpq %r8, %rcx
jne 0x55e4e
leaq 0x1fdc9(%rip), %rax     # 0x75c30
movq %rdx, %rdi
movl $0xf, %esi
movq %rax, %rdx
movl $0x130, %ecx            # imm = 0x130
callq 0x145a4
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_compute_save_sets
static void prv_compute_save_sets(subtilis_bitset_t *old_link1_save,
				  subtilis_bitset_t *old_link2_save,
				  subtilis_bitset_t *common_save,
				  subtilis_bitset_t *link1_save,
				  subtilis_bitset_t *link2_save,
				  subtilis_error_t *err)
{
	subtilis_bitset_or(common_save, old_link1_save, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_bitset_and(common_save, old_link2_save);

	subtilis_bitset_or(link1_save, old_link1_save, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_bitset_or(link2_save, old_link2_save, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_bitset_sub(link1_save, common_save);
	subtilis_bitset_sub(link2_save, common_save);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r12
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbp
movq %rdx, %rdi
movq %rbp, %rsi
movq %r9, %rdx
callq 0x5dd9f
cmpl $0x0, (%r12)
jne 0x55ee7
movq %r14, %rdi
movq %r13, %rsi
callq 0x5dd15
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x5dd9f
cmpl $0x0, (%r12)
jne 0x55ee7
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x5dd9f
cmpl $0x0, (%r12)
je 0x55ef6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %r14, %rsi
callq 0x5de40
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5de40
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_check_current_ss
static void prv_check_current_ss(subtilis_arm_reg_ud_t *ud,
				 subtilis_arm_op_t *op, subtilis_error_t *err)
{
	if (op != ud->ss_terminators[ud->current_ss])
		return;

	if (ud->current_ss == ud->max_ss) {
		subtilis_error_set_assertion_failed(err);
		return;
	}

	ud->current_ss++;
}

// Assembly:
movq 0x38(%rdi), %rcx
movq 0x40(%rdi), %rax
cmpq %rsi, (%rcx,%rax,8)
je 0x55f29
retq
cmpq 0x48(%rdi), %rax
jne 0x55f4b
leaq 0x1fcfa(%rip), %rax     # 0x75c30
movq %rdx, %rdi
movl $0xf, %esi
movq %rax, %rdx
movl $0x1b4, %ecx            # imm = 0x1B4
jmp 0x145a4
incq %rax
movq %rax, 0x40(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_reg_alloc.c
// Function: prv_ensure_op2_reg
static subtilis_arm_reg_t *prv_ensure_op2_reg(subtilis_arm_reg_ud_t *ud,
					      subtilis_arm_op_t *op,
					      int *dist_op2,
					      subtilis_arm_reg_t *reg,
					      subtilis_error_t *err)
{
	size_t vreg_op2;
	bool fixed_reg;

	vreg_op2 = *reg;
	fixed_reg = subtilis_arm_reg_alloc_ensure(ud, op, ud->int_regs,
						  ud->int_regs, reg, err);
	if (fixed_reg || (err->type != SUBTILIS_ERROR_OK))
		return NULL;

	*dist_op2 = subtilis_arm_reg_alloc_calculate_dist(
	    ud, vreg_op2, op, &ud->int_regs->dist_walker, ud->int_regs);
	if (*dist_op2 == -1)
		ud->int_regs->phys_to_virt[*reg] = INT_MAX;

	return reg;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq (%rcx), %r13
movq 0x8(%rdi), %rcx
movq %rbx, %r8
movq %rbp, %r9
callq 0x52fd8
testb %al, %al
jne 0x55f89
cmpl $0x0, (%rbp)
je 0x55f9d
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r14), %r8
leaq 0x90(%r8), %rcx
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x52d7c
movl %eax, (%r15)
cmpl $-0x1, %eax
jne 0x55f8b
movq 0x8(%r14), %rax
movq 0x8(%rax), %rax
movq (%rbx), %rcx
movq $0x7fffffff, (%rax,%rcx,8) # imm = 0x7FFFFFFF
jmp 0x55f8b
nop
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_int_dist.c
// Function: prv_dist_data_instr
static void prv_dist_data_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)
{
	subtilis_dist_data_t *ud = user_data;

	if (instr->op1 == ud->reg_num) {
		subtilis_error_set_walker_failed(err);
		return;
	}

	prv_dist_handle_op2(ud, &instr->op2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (instr->dest == ud->reg_num) {
		ud->last_used = -1;
		subtilis_error_set_walker_failed(err);
		return;
	}

	ud->last_used++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %rbx
movq 0x10(%rcx), %rax
cmpq (%rdi), %rax
jne 0x561c5
leaq 0x1fa9d(%rip), %rdx     # 0x75c4b
movq %rbx, %rdi
movl $0x1f, %esi
movl $0x46, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0x145a4
movq %rcx, %r15
movq %rdi, %r14
leaq 0x18(%rcx), %rsi
movq %rbx, %rdx
callq 0x56c24
cmpl $0x0, (%rbx)
jne 0x56207
movq 0x8(%r15), %rax
cmpq (%r14), %rax
jne 0x56203
movl $0xffffffff, 0x8(%r14)  # imm = 0xFFFFFFFF
leaq 0x1fa57(%rip), %rdx     # 0x75c4b
movq %rbx, %rdi
movl $0x1f, %esi
movl $0x50, %ecx
jmp 0x561bb
incl 0x8(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_int_dist.c
// Function: prv_dist_mul_instr
static void prv_dist_mul_instr(void *user_data, subtilis_arm_op_t *op,
			       subtilis_arm_instr_type_t type,
			       subtilis_arm_mul_instr_t *instr,
			       subtilis_error_t *err)
{
	subtilis_dist_data_t *ud = user_data;

	if ((instr->rm == ud->reg_num) || (instr->rs == ud->reg_num)) {
		subtilis_error_set_walker_failed(err);
		return;
	}

	if (instr->dest == ud->reg_num) {
		ud->last_used = -1;
		subtilis_error_set_walker_failed(err);
		return;
	}

	ud->last_used++;
}

// Assembly:
movq (%rdi), %rax
cmpq %rax, 0x10(%rcx)
je 0x5621c
cmpq %rax, 0x18(%rcx)
jne 0x56235
leaq 0x1fa28(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0x1f, %esi
movl $0x5f, %ecx
jmp 0x145a4
cmpq %rax, 0x8(%rcx)
jne 0x5625b
movl $0xffffffff, 0x8(%rdi)  # imm = 0xFFFFFFFF
leaq 0x1fa02(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0x1f, %esi
movl $0x65, %ecx
jmp 0x145a4
incl 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_int_dist.c
// Function: prv_dist_cmp_instr
static void prv_dist_cmp_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)
{
	subtilis_dist_data_t *ud = user_data;

	if (instr->op1 == ud->reg_num) {
		subtilis_error_set_walker_failed(err);
		return;
	}

	prv_dist_handle_op2(ud, &instr->op2, err);

	ud->last_used++;
}

// Assembly:
movq 0x10(%rcx), %rax
cmpq (%rdi), %rax
jne 0x56281
leaq 0x1f9dc(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0x1f, %esi
movl $0x127, %ecx            # imm = 0x127
jmp 0x145a4
pushq %rbx
movq %rdi, %rbx
addq $0x18, %rcx
movq %rcx, %rsi
movq %r8, %rdx
callq 0x56c24
incl 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_int_dist.c
// Function: prv_dist_stran_instr
static void prv_dist_stran_instr(void *user_data, subtilis_arm_op_t *op,
				 subtilis_arm_instr_type_t type,
				 subtilis_arm_stran_instr_t *instr,
				 subtilis_error_t *err)
{
	subtilis_dist_data_t *ud = user_data;

	/*
	 * TODO: register allocator does not correctly cope with
	 * pre-index addressing or writeback.
	 */

	if (instr->base == ud->reg_num) {
		subtilis_error_set_walker_failed(err);
		return;
	}

	prv_dist_handle_op2(ud, &instr->offset, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (type == SUBTILIS_ARM_INSTR_LDR) {
		if (instr->dest == ud->reg_num) {
			ud->last_used = -1;
			subtilis_error_set_walker_failed(err);
			return;
		}
	} else {
		if (instr->dest == ud->reg_num) {
			subtilis_error_set_walker_failed(err);
			return;
		}
	}

	ud->last_used++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movq 0x10(%rcx), %rax
cmpq (%rdi), %rax
jne 0x56327
leaq 0x1f940(%rip), %rdx     # 0x75c4b
movq %rbx, %rdi
movl $0x1f, %esi
movl $0x79, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x145a4
movq %rcx, %r15
movl %edx, %ebp
movq %rdi, %r14
leaq 0x18(%rcx), %rsi
movq %rbx, %rdx
callq 0x56c24
cmpl $0x0, (%rbx)
jne 0x5638e
movq 0x8(%r15), %rax
movq (%r14), %rcx
cmpl $0x12, %ebp
jne 0x5636f
cmpq %rcx, %rax
jne 0x5638a
movl $0xffffffff, 0x8(%r14)  # imm = 0xFFFFFFFF
leaq 0x1f8eb(%rip), %rdx     # 0x75c4b
movq %rbx, %rdi
movl $0x1f, %esi
movl $0x84, %ecx
jmp 0x56318
cmpq %rcx, %rax
jne 0x5638a
leaq 0x1f8d0(%rip), %rdx     # 0x75c4b
movq %rbx, %rdi
movl $0x1f, %esi
movl $0x89, %ecx
jmp 0x56318
incl 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_int_dist.c
// Function: prv_dist_br_instr
static void prv_dist_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)
{
	subtilis_dist_data_t *ud = user_data;

	if ((instr->indirect) && (instr->target.reg == ud->reg_num)) {
		subtilis_error_set_walker_failed(err);
		return;
	}

	if ((instr->link_type == SUBTILIS_ARM_BR_LINK_INT) &&
	    (ud->reg_num == 0)) {
		ud->last_used = -1;
		subtilis_error_set_walker_failed(err);
		return;
	}

	ud->last_used++;
}

// Assembly:
cmpb $0x1, 0x6(%rcx)
jne 0x563c5
movq 0x10(%rcx), %rax
cmpq (%rdi), %rax
jne 0x563c5
leaq 0x1f898(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0x1f, %esi
movl $0xab, %ecx
jmp 0x145a4
cmpl $0x1, 0x8(%rcx)
jne 0x563d1
cmpq $0x0, (%rdi)
je 0x563d5
incl 0x8(%rdi)
retq
movl $0xffffffff, 0x8(%rdi)  # imm = 0xFFFFFFFF
leaq 0x1f868(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0x1f, %esi
movl $0xb2, %ecx
jmp 0x145a4
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_int_dist.c
// Function: prv_dist_swi_instr
static void prv_dist_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)
{
	subtilis_dist_data_t *ud = user_data;

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

	if ((ud->reg_num < 10) && (1 << ud->reg_num) & instr->reg_read_mask) {
		subtilis_error_set_walker_failed(err);
		return;
	}

	if ((ud->reg_num < 10) && (1 << ud->reg_num) & instr->reg_write_mask) {
		ud->last_used = -1;
		subtilis_error_set_walker_failed(err);
		return;
	}

	ud->last_used++;
}

// Assembly:
movq %rcx, %rax
movq (%rdi), %rcx
cmpq $0x9, %rcx
ja 0x5644e
movl $0x1, %edx
shll %cl, %edx
movl 0x10(%rax), %esi
btl %ecx, %esi
jae 0x56429
leaq 0x1f834(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0x1f, %esi
movl $0xc3, %ecx
jmp 0x145a4
testl %edx, 0x14(%rax)
je 0x5644e
movl $0xffffffff, 0x8(%rdi)  # imm = 0xFFFFFFFF
leaq 0x1f80f(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0x1f, %esi
movl $0xc9, %ecx
jmp 0x145a4
incl 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_int_dist.c
// Function: prv_dist_cmov_instr
static void prv_dist_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)
{
	subtilis_dist_data_t *ud = user_data;

	if (instr->op3 == ud->reg_num) {
		subtilis_error_set_walker_failed(err);
		return;
	}

	if (instr->op2 == ud->reg_num) {
		subtilis_error_set_walker_failed(err);
		return;
	}

	if (!instr->fused && instr->op1 == ud->reg_num) {
		subtilis_error_set_walker_failed(err);
		return;
	}

	if (instr->dest == ud->reg_num) {
		ud->last_used = -1;
		subtilis_error_set_walker_failed(err);
		return;
	}

	ud->last_used++;
}

// Assembly:
movq (%rdi), %rax
cmpq %rax, 0x18(%rcx)
jne 0x564fb
leaq 0x1f762(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0x1f, %esi
movl $0x108, %ecx            # imm = 0x108
jmp 0x145a4
cmpq %rax, 0x10(%rcx)
jne 0x5651a
leaq 0x1f743(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0x1f, %esi
movl $0x10d, %ecx            # imm = 0x10D
jmp 0x145a4
cmpb $0x0, 0x20(%rcx)
jne 0x5653f
cmpq %rax, 0x8(%rcx)
jne 0x5653f
leaq 0x1f71e(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0x1f, %esi
movl $0x112, %ecx            # imm = 0x112
jmp 0x145a4
cmpq %rax, (%rcx)
jne 0x56564
movl $0xffffffff, 0x8(%rdi)  # imm = 0xFFFFFFFF
leaq 0x1f6f9(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0x1f, %esi
movl $0x118, %ecx            # imm = 0x118
jmp 0x145a4
incl 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_int_dist.c
// Function: prv_dist_flags_instr
static void prv_dist_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_dist_data_t *ud = user_data;

	if (type == SUBTILIS_ARM_INSTR_MRS) {
		if (instr->op.reg == ud->reg_num) {
			ud->last_used = -1;
			subtilis_error_set_walker_failed(err);
			return;
		}
	} else if ((instr->flag_reg) && (instr->op.reg == ud->reg_num)) {
		subtilis_error_set_walker_failed(err);
		return;
	}

	ud->last_used++;
}

// Assembly:
cmpl $0x1d, %edx
jne 0x56596
movq 0x10(%rcx), %rax
cmpq (%rdi), %rax
jne 0x565be
movl $0xffffffff, 0x8(%rdi)  # imm = 0xFFFFFFFF
leaq 0x1f6c7(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0x1f, %esi
movl $0x13a, %ecx            # imm = 0x13A
jmp 0x145a4
cmpl $0x0, 0x4(%rcx)
je 0x565be
movq 0x10(%rcx), %rax
cmpq (%rdi), %rax
jne 0x565be
leaq 0x1f69f(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0x1f, %esi
movl $0x13e, %ecx            # imm = 0x13E
jmp 0x145a4
incl 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_int_dist.c
// Function: prv_dist_fpa_tran_instr
static void prv_dist_fpa_tran_instr(void *user_data, subtilis_arm_op_t *op,
				    subtilis_arm_instr_type_t type,
				    subtilis_fpa_tran_instr_t *instr,
				    subtilis_error_t *err)
{
	subtilis_dist_data_t *ud = user_data;

	if (type == SUBTILIS_FPA_INSTR_FLT) {
		if (!instr->immediate && instr->op2.reg == ud->reg_num) {
			subtilis_error_set_walker_failed(err);
			return;
		}
	} else {
		if (instr->dest == ud->reg_num) {
			ud->last_used = -1;
			subtilis_error_set_walker_failed(err);
			return;
		}
	}

	ud->last_used++;
}

// Assembly:
cmpl $0x3e, %edx
jne 0x5661d
cmpb $0x0, 0x10(%rcx)
jne 0x56646
movq 0x18(%rcx), %rax
cmpq (%rdi), %rax
jne 0x56646
leaq 0x1f640(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0x1f, %esi
movl $0x17b, %ecx            # imm = 0x17B
jmp 0x145a4
movq 0x8(%rcx), %rax
cmpq (%rdi), %rax
jne 0x56646
movl $0xffffffff, 0x8(%rdi)  # imm = 0xFFFFFFFF
leaq 0x1f617(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0x1f, %esi
movl $0x181, %ecx            # imm = 0x181
jmp 0x145a4
incl 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_int_dist.c
// Function: prv_dist_vfp_tran_dbl_instr
static void prv_dist_vfp_tran_dbl_instr(void *user_data, subtilis_arm_op_t *op,
					subtilis_arm_instr_type_t type,
					subtilis_vfp_tran_dbl_instr_t *instr,
					subtilis_error_t *err)
{
	subtilis_dist_data_t *ud = user_data;

	if (type != SUBTILIS_VFP_INSTR_FMRRD) {
		subtilis_error_set_assertion_failed(err);
		return;
	}

	if ((instr->dest1 == ud->reg_num) || (instr->dest2 == ud->reg_num)) {
		ud->last_used = -1;
		subtilis_error_set_walker_failed(err);
		return;
	}

	ud->last_used++;
}

// Assembly:
cmpl $0x7e, %edx
jne 0x566ea
movq (%rdi), %rax
cmpq %rax, 0x8(%rcx)
je 0x566ca
cmpq %rax, 0x10(%rcx)
jne 0x56703
movl $0xffffffff, 0x8(%rdi)  # imm = 0xFFFFFFFF
leaq 0x1f573(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0x1f, %esi
movl $0x1ef, %ecx            # imm = 0x1EF
jmp 0x145a4
leaq 0x1f55a(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0xf, %esi
movl $0x1e9, %ecx            # imm = 0x1E9
jmp 0x145a4
incl 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_int_dist.c
// Function: prv_dist_vfp_sysreg_instr
static void prv_dist_vfp_sysreg_instr(void *user_data, subtilis_arm_op_t *op,
				      subtilis_arm_instr_type_t type,
				      subtilis_vfp_sysreg_instr_t *instr,
				      subtilis_error_t *err)
{
	subtilis_dist_data_t *ud = user_data;

	if (type == SUBTILIS_VFP_INSTR_FMRX) {
		if (instr->arm_reg == ud->reg_num) {
			ud->last_used = -1;
			subtilis_error_set_walker_failed(err);
			return;
		}
	} else if (instr->arm_reg == ud->reg_num) {
		subtilis_error_set_walker_failed(err);
		return;
	}

	ud->last_used++;
}

// Assembly:
movq 0x8(%rcx), %rax
movq (%rdi), %rcx
cmpl $0x7c, %edx
jne 0x56795
cmpq %rcx, %rax
jne 0x567b3
movl $0xffffffff, 0x8(%rdi)  # imm = 0xFFFFFFFF
leaq 0x1f4c8(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0x1f, %esi
movl $0x235, %ecx            # imm = 0x235
jmp 0x145a4
cmpq %rcx, %rax
jne 0x567b3
leaq 0x1f4aa(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0x1f, %esi
movl $0x239, %ecx            # imm = 0x239
jmp 0x145a4
incl 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_int_dist.c
// Function: prv_used_swi_instr
static void prv_used_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)
{
	subtilis_dist_data_t *ud = user_data;

	if ((ud->reg_num < 10) && (1 << ud->reg_num) & instr->reg_write_mask) {
		ud->last_used = -1;
		subtilis_error_set_walker_failed(err);
		return;
	}

	ud->last_used++;
}

// Assembly:
movq (%rdi), %rax
cmpq $0x9, %rax
ja 0x56af7
movl 0x14(%rcx), %ecx
btl %eax, %ecx
jae 0x56af7
movl $0xffffffff, 0x8(%rdi)  # imm = 0xFFFFFFFF
leaq 0x1f166(%rip), %rdx     # 0x75c4b
movq %r8, %rdi
movl $0x1f, %esi
movl $0x2e8, %ecx            # imm = 0x2E8
jmp 0x145a4
incl 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_int_dist.c
// Function: prv_dist_handle_op2
static void prv_dist_handle_op2(subtilis_dist_data_t *ud,
				subtilis_arm_op2_t *op2, subtilis_error_t *err)
{
	if (op2->type == SUBTILIS_ARM_OP2_REG) {
		if (op2->op.reg == ud->reg_num) {
			subtilis_error_set_walker_failed(err);
			return;
		}
	} else if (op2->type == SUBTILIS_ARM_OP2_SHIFTED) {
		if (op2->op.shift.reg == ud->reg_num) {
			subtilis_error_set_walker_failed(err);
			return;
		}

		if (op2->op.shift.shift_reg &&
		    op2->op.shift.shift.reg == ud->reg_num) {
			subtilis_error_set_walker_failed(err);
			return;
		}
	}
}

// Assembly:
movl (%rsi), %eax
cmpl $0x2, %eax
je 0x56c3f
testl %eax, %eax
jne 0x56c75
movq 0x8(%rsi), %rax
movl $0x19, %ecx
cmpq (%rdi), %rax
je 0x56c4d
jmp 0x56c75
movq (%rdi), %rax
movl $0x1e, %ecx
cmpq %rax, 0x8(%rsi)
jne 0x56c64
leaq 0x1eff7(%rip), %rax     # 0x75c4b
movq %rdx, %rdi
movl $0x1f, %esi
movq %rax, %rdx
jmp 0x145a4
cmpb $0x1, 0x20(%rsi)
jne 0x56c75
movl $0x24, %ecx
cmpq %rax, 0x18(%rsi)
je 0x56c4d
retq
nop
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_encode.c
// Function: subtilis_arm_encode
void subtilis_arm_encode(subtilis_arm_prog_t *arm_p, const char *fname,
			 subtilis_arm_encode_plat_t plat, subtilis_error_t *err)
{
	subtilis_arm_encode_ud_t ud;

	prv_init_encode_ud(&ud, arm_p, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	prv_encode_prog(arm_p, &ud, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	if (plat) {
		plat(ud.code, ud.bytes_written, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
	}

	prv_write_file(&ud, fname, err);

cleanup:

	prv_free_encode_ud(&ud);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
movq %rsp, %rdi
movq %r12, %rsi
movq %rcx, %rdx
callq 0x56d9c
cmpl $0x0, (%rbx)
jne 0x56cb8
movq %rsp, %rsi
movq %r12, %rdi
movq %rbx, %rdx
callq 0x56eb4
cmpl $0x0, (%rbx)
je 0x56ccf
movq %rsp, %rdi
callq 0x574e8
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
testq %r15, %r15
je 0x56ce9
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rbx, %rdx
callq *%r15
cmpl $0x0, (%rbx)
jne 0x56cb8
leaq 0x20fc6(%rip), %rsi     # 0x77cb6
movq %r14, %rdi
callq 0x12240
testq %rax, %rax
je 0x56d4c
movq %rax, %r15
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rdx
movl $0x1, %esi
movq %rax, %rcx
callq 0x12290
cmpq 0x30(%rsp), %rax
jae 0x56d66
leaq 0x1d0f0(%rip), %rdx     # 0x73e15
leaq 0x1f154(%rip), %rcx     # 0x75e80
movq %rbx, %rdi
movl $0x4, %esi
movl $0x20f, %r8d            # imm = 0x20F
callq 0x145ed
movq %r15, %rdi
callq 0x120e0
jmp 0x56cb8
leaq 0x1f12d(%rip), %rcx     # 0x75e80
movq %rbx, %rdi
movl $0x2, %esi
movq %r14, %rdx
movl $0x20a, %r8d            # imm = 0x20A
jmp 0x56d92
movq %r15, %rdi
callq 0x120e0
testl %eax, %eax
je 0x56cb8
leaq 0x1d098(%rip), %rdx     # 0x73e15
leaq 0x1f0fc(%rip), %rcx     # 0x75e80
movq %rbx, %rdi
movl $0x5, %esi
movl $0x214, %r8d            # imm = 0x214
callq 0x145ed
jmp 0x56cb8
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_encode.c
// Function: prv_init_encode_ud
static void prv_init_encode_ud(subtilis_arm_encode_ud_t *ud,
			       subtilis_arm_prog_t *arm_p,
			       subtilis_error_t *err)
{
	size_t i;
	subtilis_arm_section_t *arm_s;
	size_t max_label_offsets = 0;
	size_t constants = 0;
	size_t real_constants = 0;

	memset(ud, 0, sizeof(*ud));

	for (i = 0; i < arm_p->num_sections; i++) {
		arm_s = arm_p->sections[i];
		if (arm_s->label_counter > max_label_offsets)
			max_label_offsets = arm_s->label_counter;
		constants += arm_s->constants.ui32_count;
		real_constants += arm_s->constants.real_count;
	}

	/*
	 * This may not be enough memory if we need multiple constant pools.
	 */

	ud->label_offsets = malloc(sizeof(size_t) * max_label_offsets);
	if (!ud->label_offsets) {
		subtilis_error_set_oom(err);
		goto on_error;
	}
	ud->max_label_offsets = max_label_offsets;

	/*
	 * This may not be enough memory if we need multiple constant pools.
	 */

	ud->max_bytes = ((arm_p->op_pool->len + constants) * sizeof(uint32_t)) +
			(real_constants * 8);
	ud->code = malloc(ud->max_bytes);
	if (!ud->code) {
		subtilis_error_set_oom(err);
		goto on_error;
	}

	ud->link = subtilis_arm_link_new(arm_p->num_sections, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;

	ud->reverse_fpa_consts =
	    arm_p->fp_if && arm_p->fp_if->reverse_fpa_consts;

	return;

on_error:

	prv_free_encode_ud(ud);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
movq %rsi, %r15
movq %rdi, %rbx
xorl %r13d, %r13d
movl $0x98, %edx
xorl %esi, %esi
callq 0x12140
movq 0x8(%r15), %r12
testq %r12, %r12
je 0x56dfb
movq (%r15), %rax
xorl %ebp, %ebp
xorl %r14d, %r14d
xorl %r13d, %r13d
xorl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq 0x10(%rdx), %rsi
cmpq %r13, %rsi
cmovaq %rsi, %r13
addq 0x60(%rdx), %r14
addq 0x78(%rdx), %rbp
incq %rcx
cmpq %rcx, %r12
jne 0x56dd6
shlq $0x3, %rbp
jmp 0x56e00
xorl %r14d, %r14d
xorl %ebp, %ebp
leaq (,%r13,8), %rdi
callq 0x121d0
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x56e69
movq %r13, 0x18(%rbx)
movq 0x28(%r15), %rax
addq 0x8(%rax), %r14
leaq (,%r14,4), %rdi
addq %rbp, %rdi
movq %rdi, 0x38(%rbx)
callq 0x121d0
movq %rax, 0x28(%rbx)
testq %rax, %rax
je 0x56e70
movq %r12, %rdi
movq (%rsp), %r14
movq %r14, %rsi
callq 0x5a1bc
movq %rax, 0x80(%rbx)
cmpl $0x0, (%r14)
jne 0x56e8a
movq 0x40(%r15), %rax
testq %rax, %rax
je 0x56ea0
movb 0xc(%rax), %al
jmp 0x56ea2
movl $0x8b, %ecx
jmp 0x56e75
movl $0x98, %ecx
leaq 0x1f004(%rip), %rdx     # 0x75e80
movq (%rsp), %rdi
movl $0x1, %esi
callq 0x145a4
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x574e8
xorl %eax, %eax
movb %al, 0x8(%rbx)
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_encode.c
// Function: prv_free_encode_ud
static void prv_free_encode_ud(subtilis_arm_encode_ud_t *ud)
{
	subtilis_arm_link_delete(ud->link);
	free(ud->back_patches);
	free(ud->constants);
	free(ud->code);
	free(ud->label_offsets);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x80(%rdi), %rdi
callq 0x5a696
movq 0x68(%rbx), %rdi
callq 0x122c0
movq 0x40(%rbx), %rdi
callq 0x122c0
movq 0x28(%rbx), %rdi
callq 0x122c0
movq 0x10(%rbx), %rdi
popq %rbx
jmp 0x122c0
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_encode.c
// Function: subtilis_arm_encode_buf
uint8_t *subtilis_arm_encode_buf(subtilis_arm_prog_t *arm_p,
				 size_t *bytes_written, subtilis_error_t *err)
{
	subtilis_arm_encode_ud_t ud;
	uint8_t *retval = NULL;

	prv_init_encode_ud(&ud, arm_p, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	prv_encode_prog(arm_p, &ud, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	*bytes_written = ud.bytes_written;
	retval = ud.code;
	ud.code = NULL;

cleanup:

	prv_free_encode_ud(&ud);

	return retval;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x56d9c
cmpl $0x0, (%r14)
jne 0x5755b
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x56eb4
cmpl $0x0, (%r14)
je 0x57577
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdi
callq 0x574e8
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x38(%rsp), %rax
movq %rax, (%rbx)
movq 0x30(%rsp), %rbx
movq $0x0, 0x30(%rsp)
jmp 0x5755d
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_encode.c
// Function: prv_ensure_code_size
static void prv_ensure_code_size(subtilis_arm_encode_ud_t *ud, size_t bytes,
				 subtilis_error_t *err)
{
	size_t new_max_bytes;
	uint8_t *new_code;

	if (ud->bytes_written + bytes < ud->max_bytes)
		return;

	if (bytes < SUBTILIS_ENCODER_CODE_GRAN)
		new_max_bytes = SUBTILIS_ENCODER_CODE_GRAN + ud->max_bytes;
	else
		new_max_bytes = bytes + ud->max_bytes;
	new_code = realloc(ud->code, new_max_bytes);
	if (!new_code) {
		subtilis_error_set_oom(err);
		return;
	}

	ud->max_bytes = new_max_bytes;
	ud->code = new_code;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x30(%rdi), %rax
addq %rsi, %rax
movq 0x38(%rdi), %r15
cmpq %r15, %rax
jb 0x575d6
movq %rdx, %rbx
movq %rdi, %r14
cmpq $0x1001, %rsi           # imm = 0x1001
movl $0x1000, %eax           # imm = 0x1000
cmovaeq %rsi, %rax
addq %rax, %r15
movq 0x28(%rdi), %rdi
movq %r15, %rsi
callq 0x12210
testq %rax, %rax
je 0x575dc
movq %r15, 0x38(%r14)
movq %rax, 0x28(%r14)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1e89d(%rip), %rdx     # 0x75e80
movq %rbx, %rdi
movl $0x1, %esi
movl $0xc2, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0x145a4
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_encode.c
// Function: prv_encode_label
static void prv_encode_label(void *user_data, subtilis_arm_op_t *op,
			     size_t label, subtilis_error_t *err)
{
	subtilis_arm_encode_ud_t *ud = user_data;
	size_t new_max_label_offsets;
	size_t *new_label_offsets;

	if (label > ud->max_labels) {
		subtilis_error_set_assertion_failed(err);
		return;
	}

	if ((label == ud->max_labels) && (label >= ud->max_label_offsets)) {
		new_max_label_offsets = label + SUBTILIS_ENCODER_BACKPATCH_GRAN;
		new_label_offsets = realloc(
		    ud->label_offsets, sizeof(size_t) * new_max_label_offsets);
		if (!new_label_offsets) {
			subtilis_error_set_oom(err);
			return;
		}
		ud->label_offsets = new_label_offsets;
		ud->max_label_offsets = new_max_label_offsets;
	}

	ud->label_offsets[label] = ud->bytes_written;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r15
cmpq %rdx, 0x20(%rdi)
jae 0x57626
leaq 0x1e871(%rip), %rdx     # 0x75e80
movq %r15, %rdi
movl $0xf, %esi
movl $0xd7, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0x145a4
movq %rdx, %rbx
movq %rdi, %r14
jne 0x57659
cmpq %rbx, 0x18(%r14)
ja 0x57659
movq 0x10(%r14), %rdi
leaq 0x400(,%rbx,8), %rsi
callq 0x12210
testq %rax, %rax
je 0x5766b
leaq 0x80(%rbx), %rcx
movq %rax, 0x10(%r14)
movq %rcx, 0x18(%r14)
movq 0x10(%r14), %rax
movq 0x30(%r14), %rcx
movq %rcx, (%rax,%rbx,8)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1e80e(%rip), %rdx     # 0x75e80
movq %r15, %rdi
movl $0x1, %esi
movl $0xe0, %ecx
jmp 0x5761c
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_encode.c
// Function: prv_encode_mul_instr
static void prv_encode_mul_instr(void *user_data, subtilis_arm_op_t *op,
				 subtilis_arm_instr_type_t type,
				 subtilis_arm_mul_instr_t *instr,
				 subtilis_error_t *err)
{
	subtilis_arm_encode_ud_t *ud = user_data;
	uint32_t word = 0x90;

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

	if ((instr->dest > 15) || (instr->rm > 15) || (instr->rs > 15)) {
		subtilis_error_set_assertion_failed(err);
		return;
	}

	if (type == SUBTILIS_ARM_INSTR_MLA) {
		word |= 1 << 21;
		word |= instr->rn << 12;
	}

	word |= instr->ccode << 28;
	if (instr->status)
		word |= 1 << 20;
	word |= instr->dest << 16;
	word |= instr->rs << 8;
	word |= instr->rm;

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

	prv_add_word(ud, word, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r12
movl %edx, %ebp
movq %rdi, %r14
xorl %esi, %esi
movq %r8, %rdx
callq 0x59e32
cmpl $0x0, (%rbx)
je 0x57a98
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r12), %r13
cmpq $0xf, %r13
ja 0x57ab9
movq 0x10(%r12), %r15
cmpq $0xf, %r15
ja 0x57ab9
movq 0x18(%r12), %rax
cmpq $0x10, %rax
jb 0x57ae0
leaq 0x1e3c0(%rip), %rdx     # 0x75e80
movq %rbx, %rdi
movl $0xf, %esi
movl $0x285, %ecx            # imm = 0x285
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x145a4
movq %rax, 0x10(%rsp)
movl $0x90, %eax
cmpl $0x11, %ebp
jne 0x57afc
movl 0x20(%r12), %eax
shll $0xc, %eax
orl $0x200090, %eax         # imm = 0x200090
movl %eax, 0xc(%rsp)
movl (%r12), %ebp
movb 0x4(%r12), %r12b
movl $0x4, %esi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x5758f
cmpl $0x0, (%rbx)
jne 0x57a89
shll $0x1c, %ebp
orl 0xc(%rsp), %ebp
movl %ebp, %eax
orl $0x100000, %eax         # imm = 0x100000
testb %r12b, %r12b
cmovel %ebp, %eax
movq 0x10(%rsp), %rcx
shll $0x8, %ecx
shll $0x10, %r13d
orl %r13d, %r15d
orl %ecx, %r15d
orl %eax, %r15d
movq %r14, %rdi
movl %r15d, %esi
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x59dfe
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_encode.c
// Function: prv_encode_br_instr
static void prv_encode_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)
{
	subtilis_arm_encode_ud_t *ud = user_data;
	uint32_t word = 0;

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

	word |= instr->ccode << 28;
	if (instr->indirect) {
		/*
		 * We're going to do a mov pc, reg.  There's no need to do
		 * any linking stuff as the address is computed at runtime.
		 */

		word |= SUBTILIS_ARM_INSTR_MOV << 21;
		word |= 15 << 12;
		word |= instr->target.reg & 0xf;
	} else {
		word |= 0x5 << 25;
		if (instr->link)
			word |= 1 << 24;
		if (instr->link && !instr->local) {
			subtilis_arm_link_add(ud->link, ud->bytes_written, err);
			word |= instr->target.label;
		} else {
			prv_add_back_patch(
			    ud, SUBTILIS_ARM_ENCODE_BP_TYPE_BRANCH,
			    instr->target.label, ud->bytes_written, err);
		}
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	}

	prv_ensure_code(ud, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	prv_add_word(ud, word, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdi, %rbx
xorl %esi, %esi
movq %r8, %rdx
callq 0x59e32
cmpl $0x0, (%r14)
jne 0x57ffd
movl (%r15), %r12d
shll $0x1c, %r12d
cmpb $0x1, 0x6(%r15)
jne 0x57f8b
movl 0x10(%r15), %eax
andl $0xf, %eax
leal (%r12,%rax), %ebp
addl $0x1a0f000, %ebp        # imm = 0x1A0F000
jmp 0x57fe7
movl %r12d, %ebp
orl $0xa000000, %ebp        # imm = 0xA000000
movb 0x4(%r15), %al
orl $0xb000000, %r12d       # imm = 0xB000000
testb %al, %al
cmovnel %r12d, %ebp
cmpb $0x1, %al
jne 0x57fb0
cmpb $0x0, 0x5(%r15)
je 0x57fc7
movq 0x10(%r15), %rdx
movq 0x30(%rbx), %rcx
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %r8
callq 0x59f2a
jmp 0x57fe1
movq 0x30(%rbx), %rsi
movq 0x80(%rbx), %rdi
movq %r14, %rdx
callq 0x5a25d
orl 0x10(%r15), %r12d
movl %r12d, %ebp
cmpl $0x0, (%r14)
jne 0x57ffd
movl $0x4, %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x5758f
cmpl $0x0, (%r14)
je 0x58006
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x30(%rbx), %rax
testb $0x3, %al
je 0x5802f
leaq 0x1de6b(%rip), %rdx     # 0x75e80
movq %r14, %rdi
movl $0x5d, %esi
movl $0xfb, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x145a4
movq 0x28(%rbx), %rcx
movl %ebp, (%rcx,%rax)
addq $0x4, %rax
movq %rax, 0x30(%rbx)
jmp 0x57ffd
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_encode.c
// Function: prv_encode_swi_instr
static void prv_encode_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)
{
	subtilis_arm_encode_ud_t *ud = user_data;
	uint32_t word = 0;

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

	word |= instr->ccode << 28;
	word |= 0xf << 24;
	word |= 0x0fffffff & instr->code;

	prv_ensure_code(ud, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	prv_add_word(ud, word, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdi, %rbx
xorl %esi, %esi
movq %r8, %rdx
callq 0x59e32
cmpl $0x0, (%r14)
jne 0x5807e
movl (%r15), %r12d
movq 0x8(%r15), %r15
movl $0x4, %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x5758f
cmpl $0x0, (%r14)
je 0x5808a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x30(%rbx), %rax
testb $0x3, %al
je 0x580b6
leaq 0x1dde7(%rip), %rdx     # 0x75e80
movq %r14, %rdi
movl $0x5d, %esi
movl $0xfb, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x145a4
andl $0xffffff, %r15d        # imm = 0xFFFFFF
shll $0x1c, %r12d
leal (%r12,%r15), %ecx
addl $0xf000000, %ecx        # imm = 0xF000000
movq 0x28(%rbx), %rdx
movl %ecx, (%rdx,%rax)
addq $0x4, %rax
movq %rax, 0x30(%rbx)
jmp 0x5807e
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_encode.c
// Function: prv_encode_ldrp_instr
static void prv_encode_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_encode_ud_t *ud = user_data;
	subtilis_arm_stran_instr_t stran;

	/*
	 * We need to make sure we have enough room for one PC relative load and
	 * an add and the constant.
	 */

	prv_check_pool_adj(ud, 12, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	prv_add_const(ud, instr->constant_label, ud->bytes_written,
		      SUBTILIS_ARM_ENCODE_BP_LDRP, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	ud->constants[ud->const_count - 1].section_label = instr->section_label;

	if (ud->ldrc_int == SIZE_MAX)
		ud->ldrc_int = ud->bytes_written;

	stran.ccode = instr->ccode;
	stran.dest = instr->dest;
	stran.base = 15;
	stran.offset.type = SUBTILIS_ARM_OP2_I32;
	stran.offset.op.integer = 0;
	stran.pre_indexed = true;
	stran.write_back = false;
	stran.subtract = false;
	stran.byte = false;
	prv_encode_stran_instr(user_data, op, SUBTILIS_ARM_INSTR_LDR, &stran,
			       err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %r8, %rbx
movq %rcx, %r15
movq %rdi, %r14
movl $0xc, %esi
movq %r8, %rdx
callq 0x59e32
cmpl $0x0, (%rbx)
jne 0x58227
movq 0x18(%r15), %rsi
movq 0x30(%r14), %rdx
movq %r14, %rdi
movl $0x1, %ecx
movq %rbx, %r8
callq 0x59fd3
cmpl $0x0, (%rbx)
jne 0x58227
movq 0x10(%r15), %rax
movq 0x40(%r14), %rcx
movq 0x48(%r14), %rdx
shlq $0x5, %rdx
movq %rax, -0x18(%rcx,%rdx)
cmpq $-0x1, 0x90(%r14)
jne 0x581eb
movq 0x30(%r14), %rax
movq %rax, 0x90(%r14)
movl (%r15), %eax
leaq 0x8(%rsp), %rcx
movl %eax, (%rcx)
movq 0x8(%r15), %rax
movq %rax, 0x8(%rcx)
movq $0xf, 0x10(%rcx)
movl $0x1, %eax
movl %eax, 0x18(%rcx)
movl $0x0, 0x20(%rcx)
movl %eax, 0x40(%rcx)
movq %r14, %rdi
movl $0x12, %edx
movq %rbx, %r8
callq 0x57bf3
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq