LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/fpa_gen.c
// Function: subtilis_fpa_preserve_regs
size_t subtilis_fpa_preserve_regs(subtilis_arm_section_t *arm_s,
				  int save_real_start, subtilis_error_t *err)
{
	int i;
	size_t stf_site = INT_MAX;

	for (i = save_real_start; i < SUBTILIS_ARM_REG_MAX_FPA_REGS; i++) {
		subtilis_fpa_push_reg(arm_s, SUBTILIS_ARM_CCODE_NV, i, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return INT_MAX;
		if (stf_site == INT_MAX)
			stf_site = arm_s->last_op;
	}

	return stf_site;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
cmpl $0x7, %esi
jg 0x6c52d
movq %rdx, %rbx
movq %rdi, %r14
movslq %esi, %r12
movq %r14, %rdi
movl $0xf, %esi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x5d5cc
cmpl $0x0, (%rbx)
jne 0x6c527
cmpq $0x7fffffff, %r15       # imm = 0x7FFFFFFF
jne 0x6c51c
movq 0x28(%r14), %r15
incq %r12
cmpl $0x8, %r12d
jne 0x6c4f7
jmp 0x6c52d
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/fpa_gen.c
// Function: subtilis_fpa_restore_regs
size_t subtilis_fpa_restore_regs(subtilis_arm_section_t *arm_s,
				 int save_real_start, subtilis_error_t *err)
{
	int i;
	size_t ldf_site = INT_MAX;

	for (i = SUBTILIS_ARM_REG_MAX_FPA_REGS - 1; i >= save_real_start; i--) {
		subtilis_fpa_pop_reg(arm_s, SUBTILIS_ARM_CCODE_NV, i, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return INT_MAX;
		if (ldf_site == INT_MAX)
			ldf_site = arm_s->last_op;
	}

	return ldf_site;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
cmpl $0x7, %esi
jg 0x6c594
movq %rdx, %rbx
movq %rdi, %r14
movslq %esi, %r13
movl $0x8, %r12d
decq %r12
movq %r14, %rdi
movl $0xf, %esi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x5d60e
cmpl $0x0, (%rbx)
jne 0x6c58e
cmpq $0x7fffffff, %r15       # imm = 0x7FFFFFFF
jne 0x6c587
movq 0x28(%r14), %r15
cmpq %r13, %r12
jg 0x6c55f
jmp 0x6c594
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/fpa_gen.c
// Function: subtilis_fpa_preserve_update
void subtilis_fpa_preserve_update(subtilis_arm_section_t *arm_s,
				  subtilis_arm_call_site_t *call_site,
				  size_t real_regs_saved, size_t real_regs_used,
				  subtilis_error_t *err)
{
	subtilis_arm_op_t *op;
	size_t i;
	size_t fpa_reg_count;

	if (real_regs_saved > SUBTILIS_ARM_REG_MAX_ARGS)
		real_regs_saved =
		    SUBTILIS_ARM_REG_MAX_FPA_REGS - SUBTILIS_ARM_REG_MAX_ARGS;
	else
		real_regs_saved =
		    SUBTILIS_ARM_REG_MAX_FPA_REGS - real_regs_saved;

	fpa_reg_count = SUBTILIS_ARM_REG_MAX_FPA_REGS - real_regs_saved;
	op = &arm_s->op_pool->ops[call_site->stf_site];

	for (; fpa_reg_count < SUBTILIS_ARM_REG_MAX_FPA_REGS; fpa_reg_count++) {
		if (real_regs_used & (1 << fpa_reg_count)) {
			op->op.instr.operands.fpa_stran.ccode =
			    SUBTILIS_ARM_CCODE_AL;
		}
		op = &arm_s->op_pool->ops[op->next];
	}

	fpa_reg_count = SUBTILIS_ARM_REG_MAX_FPA_REGS - 1;
	op = &arm_s->op_pool->ops[call_site->ldf_site];
	for (i = 0; i < real_regs_saved; i++) {
		if (real_regs_used & (1 << fpa_reg_count))
			op->op.instr.operands.fpa_stran.ccode =
			    SUBTILIS_ARM_CCODE_AL;
		op = &arm_s->op_pool->ops[op->next];
		fpa_reg_count--;
	}
}

// Assembly:
movl $0x8, %r8d
subq %rdx, %r8
cmpq $0x5, %rdx
movl $0x4, %r11d
cmovaeq %r11, %r8
testq %r8, %r8
je 0x6c657
movq %rcx, %rax
movq 0x38(%rdi), %rcx
movq (%rcx), %r9
imulq $0x68, 0x18(%rsi), %rcx
addq %r9, %rcx
cmpq $0x5, %rdx
cmovaeq %rdx, %r11
movq %rdx, %r10
subq %r11, %r10
addq $0x3, %r10
subl %r11d, %edx
addl $0x4, %edx
btq %rdx, %rax
jae 0x6c5ff
movl $0xe, 0x10(%rcx)
movq 0x38(%rdi), %r9
movq (%r9), %r9
imulq $0x68, 0x58(%rcx), %rcx
addq %r9, %rcx
incq %r10
incl %edx
cmpq $0x7, %r10
jb 0x6c5eb
testq %r8, %r8
je 0x6c657
imulq $0x68, 0x10(%rsi), %rdx
addq %r9, %rdx
movl $0x7, %ecx
xorl %esi, %esi
movl $0x1, %r10d
shll %cl, %r10d
movslq %r10d, %r10
testq %rax, %r10
je 0x6c645
movl $0xe, 0x10(%rdx)
movq 0x38(%rdi), %r9
movq (%r9), %r9
imulq $0x68, 0x58(%rdx), %rdx
addq %r9, %rdx
decl %ecx
incq %rsi
cmpq %r8, %rsi
jb 0x6c626
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/fpa_gen.c
// Function: subtilis_fpa_store_double
void subtilis_fpa_store_double(subtilis_arm_section_t *arm_s,
			       subtilis_arm_reg_t dest, subtilis_arm_reg_t base,
			       size_t offset, subtilis_error_t *err)
{
	subtilis_arm_instr_t *instr;
	subtilis_fpa_stran_instr_t *fstran;

	instr =
	    subtilis_arm_section_add_instr(arm_s, SUBTILIS_FPA_INSTR_STF, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	fstran = &instr->operands.fpa_stran;
	fstran->ccode = SUBTILIS_ARM_CCODE_AL;
	fstran->dest = dest;
	fstran->base = base;
	fstran->offset = offset / 4;
	fstran->size = 8;
	fstran->pre_indexed = true;
	fstran->write_back = false;
	fstran->subtract = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movl $0x1f, %esi
movq %r8, %rdx
callq 0x4f6e2
cmpl $0x0, (%r12)
jne 0x6c6d4
movl $0xe, 0x8(%rax)
movq %r15, 0x18(%rax)
movq %r14, 0x20(%rax)
shrl $0x2, %ebx
movb %bl, 0x28(%rax)
movq $0x8, 0x10(%rax)
movw $0x1, 0x29(%rax)
movb $0x1, 0x2b(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/fpa_gen.c
// Function: subtilis_arm_fpa_if_init
void subtilis_arm_fpa_if_init(subtilis_arm_fp_if_t *fp_if)
{
	double dummy_float = 1.0;
	uint32_t *lower_word = (uint32_t *)((void *)&dummy_float);

	fp_if->max_regs = SUBTILIS_ARM_REG_MAX_FPA_REGS;
	fp_if->max_offset = 1023;
	fp_if->store_type = SUBTILIS_FPA_INSTR_STF;
	fp_if->load_type = SUBTILIS_FPA_INSTR_LDF;

	/* Slightly weird but on ARM FPA the words of a double are big endian */
	fp_if->reverse_fpa_consts = (*lower_word) == 0;
	fp_if->preamble_fn = subtilis_fpa_gen_preamble;
	fp_if->preserve_regs_fn = subtilis_fpa_preserve_regs;
	fp_if->restore_regs_fn = subtilis_fpa_restore_regs;
	fp_if->update_regs_fn = subtilis_fpa_preserve_update;
	fp_if->update_offs_fn = subtilis_fpa_update_offsets;
	fp_if->store_dbl_fn = subtilis_fpa_store_double;
	fp_if->mov_reg_fn = subtilis_fpa_mov_reg;
	fp_if->spill_imm_fn = subtilis_fpa_insert_stran_spill_imm;
	fp_if->stran_imm_fn = subtilis_fpa_insert_stran_imm;
	fp_if->is_fixed_fn = subtilis_fpa_is_fixed;
	fp_if->init_dist_walker_fn = subtilis_init_fpa_dist_walker;
	fp_if->init_used_walker_fn = subtilis_init_fpa_used_walker;
	fp_if->init_real_alloc_fn = subtilis_fpa_alloc_init_walker;
}

// Assembly:
movq $0x8, (%rdi)
movl $0x3ff, 0x8(%rdi)       # imm = 0x3FF
movabsq $0x1e0000001f, %rax     # imm = 0x1E0000001F
movq %rax, 0x18(%rdi)
movb $0x1, 0xc(%rdi)
leaq -0x498(%rip), %rax      # 0x6c28d
movq %rax, 0x20(%rdi)
leaq -0x255(%rip), %rax      # 0x6c4db
movq %rax, 0x28(%rdi)
leaq -0x1ff(%rip), %rax      # 0x6c53c
movq %rax, 0x30(%rdi)
leaq -0x1a5(%rip), %rax      # 0x6c5a1
movq %rax, 0x38(%rdi)
leaq -0xf9(%rip), %rax       # 0x6c658
movq %rax, 0x40(%rdi)
leaq -0xd7(%rip), %rax       # 0x6c685
movq %rax, 0x48(%rdi)
leaq -0x87(%rip), %rax       # 0x6c6e0
movq %rax, 0x50(%rdi)
leaq -0xf300(%rip), %rax     # 0x5d472
movq %rax, 0x58(%rdi)
leaq -0xf24e(%rip), %rax     # 0x5d52f
movq %rax, 0x60(%rdi)
leaq -0xf8bc(%rip), %rax     # 0x5cecc
movq %rax, 0x68(%rdi)
leaq 0x939(%rip), %rax       # 0x6d0cc
movq %rax, 0x70(%rdi)
leaq 0xe58(%rip), %rax       # 0x6d5f6
movq %rax, 0x78(%rdi)
leaq 0x57(%rip), %rax        # 0x6c800
movq %rax, 0x80(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/fpa_gen.c
// Function: prv_cmp_simple
static void prv_cmp_simple(subtilis_ir_section_t *s, size_t start,
			   void *user_data, subtilis_arm_instr_type_t itype,
			   subtilis_arm_ccode_type_t ccode,
			   subtilis_error_t *err)
{
	subtilis_arm_reg_t op1;
	subtilis_arm_reg_t op2;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *ir_op = &s->ops[start]->op.instr;

	op1 = subtilis_arm_ir_to_freg(ir_op->operands[1].reg);
	op2 = subtilis_arm_ir_to_freg(ir_op->operands[2].reg);

	subtilis_fpa_add_cmp(arm_s, itype, ccode, op1, op2, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq (%rdi,%rsi,8), %r12
movq 0x18(%r12), %rdi
callq 0x4f526
movq %rax, %r15
movq 0x20(%r12), %rdi
callq 0x4f526
movq %r14, %rdi
movl $0x40, %esi
movl $0xe, %edx
movq %r15, %rcx
movq %rax, %r8
movq %rbx, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5d412
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/fpa_alloc.c
// Function: subtilis_fpa_alloc_init_walker
void subtilis_fpa_alloc_init_walker(subtlis_arm_walker_t *walker,
				    void *user_data)
{
	walker->fpa_data_monadic_fn = prv_alloc_fpa_data_monadic_instr;
	walker->fpa_data_dyadic_fn = prv_alloc_fpa_data_dyadic_instr;
	walker->fpa_stran_fn = prv_alloc_fpa_stran_instr;
	walker->fpa_tran_fn = prv_alloc_fpa_tran_instr;
	walker->fpa_cmp_fn = prv_alloc_fpa_cmp_instr;
	walker->fpa_ldrc_fn = prv_alloc_fpa_ldrc_instr;
	walker->fpa_cptran_fn = prv_alloc_fpa_cptran_instr;
	walker->vfp_stran_fn = prv_alloc_vfp_stran_instr;
	walker->vfp_copy_fn = prv_alloc_vfp_copy_instr;
	walker->vfp_ldrc_fn = prv_alloc_vfp_ldrc_instr;
	walker->vfp_tran_fn = prv_alloc_vfp_tran_instr;
	walker->vfp_tran_dbl_fn = prv_alloc_vfp_tran_dbl_instr;
	walker->vfp_cptran_fn = prv_alloc_vfp_cptran_instr;
	walker->vfp_data_fn = prv_alloc_vfp_data_instr;
	walker->vfp_cmp_fn = prv_alloc_vfp_cmp_instr;
	walker->vfp_sqrt_fn = prv_alloc_vfp_sqrt_instr;
	walker->vfp_sysreg_fn = prv_alloc_vfp_sysreg_instr;
}

// Assembly:
leaq 0xe8(%rip), %rax        # 0x6c8ef
movq %rax, 0x80(%rdi)
leaq 0x1c0(%rip), %rax       # 0x6c9d5
movq %rax, 0x88(%rdi)
leaq 0x2f8(%rip), %rax       # 0x6cb1b
movq %rax, 0x90(%rdi)
leaq 0x45f(%rip), %rax       # 0x6cc90
movq %rax, 0x98(%rdi)
leaq 0x5cb(%rip), %rax       # 0x6ce0a
movq %rax, 0xa0(%rdi)
leaq 0x6b6(%rip), %rax       # 0x6cf03
movq %rax, 0xa8(%rdi)
leaq 0x6d0(%rip), %rax       # 0x6cf2b
movq %rax, 0xb0(%rdi)
leaq 0x769(%rip), %rax       # 0x6cfd2
movq %rax, 0xb8(%rdi)
leaq 0x774(%rip), %rax       # 0x6cfeb
movq %rax, 0xc0(%rdi)
leaq 0x77f(%rip), %rax       # 0x6d004
movq %rax, 0xc8(%rdi)
leaq 0x78a(%rip), %rax       # 0x6d01d
movq %rax, 0xd0(%rdi)
leaq 0x795(%rip), %rax       # 0x6d036
movq %rax, 0xd8(%rdi)
leaq 0x7a0(%rip), %rax       # 0x6d04f
movq %rax, 0xe0(%rdi)
leaq 0x7ab(%rip), %rax       # 0x6d068
movq %rax, 0xe8(%rdi)
leaq 0x7b6(%rip), %rax       # 0x6d081
movq %rax, 0xf0(%rdi)
leaq 0x7c1(%rip), %rax       # 0x6d09a
movq %rax, 0xf8(%rdi)
leaq 0x7cc(%rip), %rax       # 0x6d0b3
movq %rax, 0x100(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/fpa_alloc.c
// Function: prv_alloc_fpa_data_monadic_instr
static void prv_alloc_fpa_data_monadic_instr(void *user_data,
					     subtilis_arm_op_t *op,
					     subtilis_arm_instr_type_t type,
					     subtilis_fpa_data_instr_t *instr,
					     subtilis_error_t *err)
{
	size_t vreg_op2;
	int dist_op2 = -1;
	subtilis_arm_reg_ud_t *ud = user_data;

	if (!instr->immediate) {
		vreg_op2 = instr->op2.reg;
		(void)subtilis_arm_reg_alloc_ensure(
		    ud, op, ud->int_regs, ud->real_regs, &instr->op2.reg, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		dist_op2 = subtilis_arm_reg_alloc_calculate_dist(
		    ud, vreg_op2, op, &ud->real_regs->dist_walker,
		    ud->real_regs);
		if (dist_op2 == -1)
			ud->real_regs->phys_to_virt[instr->op2.reg] = INT_MAX;
	}

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

	/* Need to check for useless moves */

	if (!instr->immediate &&
	    ((type != SUBTILIS_FPA_INSTR_MVF) || instr->op2.reg != instr->dest))
		ud->real_regs->next[instr->op2.reg] = dist_op2;

	ud->instr_count++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r14
movl %edx, 0x4(%rsp)
movq %rsi, %r12
movq %rdi, %rbx
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
cmpb $0x0, 0x20(%rcx)
je 0x6c95b
leaq 0x10(%r14), %rbp
movq %rbx, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %r15, %rcx
callq 0x53287
cmpl $0x0, (%r15)
jne 0x6c982
cmpb $0x0, 0x20(%r14)
jne 0x6c955
movq 0x28(%r14), %rax
cmpl $0x21, 0x4(%rsp)
jne 0x6c949
cmpq (%rbp), %rax
je 0x6c955
movq 0x10(%rbx), %rcx
movq 0x10(%rcx), %rcx
movl %r13d, (%rcx,%rax,4)
incq 0x20(%rbx)
jmp 0x6c982
leaq 0x28(%r14), %rbp
movq 0x28(%r14), %r13
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %rbp, %r8
movq %r15, %r9
callq 0x52fd8
cmpl $0x0, (%r15)
je 0x6c991
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rbx), %r8
leaq 0x90(%r8), %rcx
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x52d7c
movl %eax, %r13d
cmpl $-0x1, %eax
jne 0x6c916
movq 0x10(%rbx), %rax
movq 0x8(%rax), %rax
movq (%rbp), %rcx
movq $0x7fffffff, (%rax,%rcx,8) # imm = 0x7FFFFFFF
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0x6c916
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/fpa_alloc.c
// Function: prv_alloc_fpa_data_dyadic_instr
static void prv_alloc_fpa_data_dyadic_instr(void *user_data,
					    subtilis_arm_op_t *op,
					    subtilis_arm_instr_type_t type,
					    subtilis_fpa_data_instr_t *instr,
					    subtilis_error_t *err)
{
	int dist_op1;
	int dist_op2 = -1;
	size_t vreg_op1;
	size_t vreg_op2;
	subtilis_arm_reg_ud_t *ud = user_data;

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

	if (!instr->immediate) {
		vreg_op2 = instr->op2.reg;
		(void)subtilis_arm_reg_alloc_ensure(
		    ud, op, ud->int_regs, ud->real_regs, &instr->op2.reg, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		dist_op2 = subtilis_arm_reg_alloc_calculate_dist(
		    ud, vreg_op2, op, &ud->real_regs->dist_walker,
		    ud->real_regs);

		if (dist_op2 == -1)
			ud->real_regs->phys_to_virt[instr->op2.reg] = INT_MAX;
	}

	dist_op1 = subtilis_arm_reg_alloc_calculate_dist(
	    ud, vreg_op1, op, &ud->real_regs->dist_walker, ud->real_regs);
	if (dist_op1 == -1)
		ud->real_regs->phys_to_virt[instr->op1] = INT_MAX;

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

	ud->real_regs->next[instr->op1] = dist_op1;
	if (!instr->immediate)
		ud->real_regs->next[instr->op2.reg] = dist_op2;

	ud->instr_count++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r15
movq %rcx, %r14
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x18(%rcx), %r13
movq 0x18(%rcx), %rbp
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rcx
movq %r13, %r8
movq %r15, %r9
callq 0x52fd8
cmpl $0x0, (%r15)
jne 0x6cac6
movq 0x10(%rbx), %r8
movl $0xffffffff, 0x4(%rsp)  # imm = 0xFFFFFFFF
cmpb $0x0, 0x20(%r14)
je 0x6ca96
leaq 0x90(%r8), %rcx
movq %rbx, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x52d7c
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x6ca57
movq 0x10(%rbx), %rax
movq 0x8(%rax), %rax
movq (%r13), %rcx
movq $0x7fffffff, (%rax,%rcx,8) # imm = 0x7FFFFFFF
leaq 0x10(%r14), %rdx
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0x53287
cmpl $0x0, (%r15)
jne 0x6cac6
movq 0x10(%rbx), %rax
movq 0x10(%rax), %rax
movq 0x18(%r14), %rcx
movl %ebp, (%rax,%rcx,4)
cmpb $0x0, 0x20(%r14)
jne 0x6ca90
movq 0x28(%r14), %rcx
movl 0x4(%rsp), %edx
movl %edx, (%rax,%rcx,4)
incq 0x20(%rbx)
jmp 0x6cac6
leaq 0x28(%r14), %r9
movq 0x28(%r14), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%rbx), %rdx
movq %rbx, %rdi
movq %r12, %rsi
movq %r8, %rcx
movq %r9, 0x8(%rsp)
movq %r9, %r8
movq %r15, %r9
callq 0x52fd8
cmpl $0x0, (%r15)
je 0x6cad5
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rbx), %r8
leaq 0x90(%r8), %rcx
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
callq 0x52d7c
movq 0x10(%rbx), %r8
cmpl $-0x1, %eax
je 0x6cb02
movl %eax, 0x4(%rsp)
jmp 0x6ca27
movq 0x8(%r8), %rax
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movq $0x7fffffff, (%rax,%rcx,8) # imm = 0x7FFFFFFF
jmp 0x6ca27
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/fpa_alloc.c
// Function: prv_alloc_fpa_cmp_instr
static void prv_alloc_fpa_cmp_instr(void *user_data, subtilis_arm_op_t *op,
				    subtilis_arm_instr_type_t type,
				    subtilis_fpa_cmp_instr_t *instr,
				    subtilis_error_t *err)
{
	int dist_dest;
	int dist_op2;
	size_t vreg_dest;
	size_t vreg_op2;
	subtilis_arm_reg_ud_t *ud = user_data;

	vreg_dest = instr->dest;
	(void)subtilis_arm_reg_alloc_ensure(ud, op, ud->int_regs, ud->real_regs,
					    &instr->dest, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (!instr->immediate) {
		vreg_op2 = instr->op2.reg;
		(void)subtilis_arm_reg_alloc_ensure(
		    ud, op, ud->int_regs, ud->real_regs, &instr->op2.reg, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		dist_op2 = subtilis_arm_reg_alloc_calculate_dist(
		    ud, vreg_op2, op, &ud->real_regs->dist_walker,
		    ud->real_regs);
		if (dist_op2 == -1)
			ud->real_regs->phys_to_virt[instr->op2.reg] = INT_MAX;
		ud->real_regs->next[instr->op2.reg] = dist_op2;
	}

	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[instr->dest] = INT_MAX;
	ud->real_regs->next[instr->dest] = dist_dest;

	ud->instr_count++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbp
movq %rcx, %r13
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rcx), %r14
movq 0x8(%rcx), %r12
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rcx
movq %r14, %r8
movq %rbp, %r9
callq 0x52fd8
cmpl $0x0, (%rbp)
jne 0x6cef4
movq 0x10(%rbx), %r8
cmpb $0x0, 0x10(%r13)
jne 0x6ceb9
movq 0x18(%r13), %rax
movq %rax, (%rsp)
addq $0x18, %r13
movq 0x8(%rbx), %rdx
movq %rbx, %rdi
movq %r15, %rsi
movq %r8, %rcx
movq %r13, %r8
movq %rbp, %r9
callq 0x52fd8
cmpl $0x0, (%rbp)
jne 0x6cef4
movq 0x10(%rbx), %r8
leaq 0x90(%r8), %rcx
movq %rbx, %rdi
movq (%rsp), %rsi
movq %r15, %rdx
callq 0x52d7c
movq 0x10(%rbx), %r8
cmpl $-0x1, %eax
jne 0x6ceae
movq 0x8(%r8), %rcx
movq (%r13), %rdx
movq $0x7fffffff, (%rcx,%rdx,8) # imm = 0x7FFFFFFF
movq 0x10(%r8), %rcx
movq (%r13), %rdx
movl %eax, (%rcx,%rdx,4)
leaq 0x90(%r8), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x52d7c
movq 0x10(%rbx), %rcx
cmpl $-0x1, %eax
jne 0x6cee6
movq 0x8(%rcx), %rdx
movq (%r14), %rsi
movq $0x7fffffff, (%rdx,%rsi,8) # imm = 0x7FFFFFFF
movq 0x10(%rcx), %rcx
movq (%r14), %rdx
movl %eax, (%rcx,%rdx,4)
incq 0x20(%rbx)
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/fpa_alloc.c
// Function: prv_alloc_fpa_cptran_instr
static void prv_alloc_fpa_cptran_instr(void *user_data, subtilis_arm_op_t *op,
				       subtilis_arm_instr_type_t type,
				       subtilis_fpa_cptran_instr_t *instr,
				       subtilis_error_t *err)
{
	subtilis_arm_reg_ud_t *ud = user_data;
	size_t vreg_dest;
	bool fixed_reg_dest;
	int dist_dest;

	if (type == SUBTILIS_FPA_INSTR_RFS) {
		subtilis_arm_reg_alloc_alloc_dest(ud, op, &instr->dest, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	} else {
		vreg_dest = instr->dest;
		fixed_reg_dest = subtilis_arm_reg_alloc_ensure(
		    ud, op, ud->int_regs, ud->int_regs, &instr->dest, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		if (!fixed_reg_dest) {
			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[instr->dest] =
				    INT_MAX;

			ud->int_regs->next[instr->dest] = dist_dest;
		}
	}

	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
addq $0x8, %r14
cmpl $0x45, %edx
jne 0x6cf63
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x531e0
cmpl $0x0, (%r12)
jne 0x6cfc8
jmp 0x6cfc4
movq (%r14), %r13
movq 0x8(%rbx), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %rcx, %rdx
movq %r14, %r8
movq %r12, %r9
callq 0x52fd8
cmpl $0x0, (%r12)
jne 0x6cfc8
testb %al, %al
jne 0x6cfc4
movq 0x8(%rbx), %r8
leaq 0x90(%r8), %rcx
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x52d7c
movq 0x8(%rbx), %rcx
cmpl $-0x1, %eax
jne 0x6cfba
movq 0x8(%rcx), %rdx
movq (%r14), %rsi
movq $0x7fffffff, (%rdx,%rsi,8) # imm = 0x7FFFFFFF
movq 0x10(%rcx), %rcx
movq (%r14), %rdx
movl %eax, (%rcx,%rdx,4)
incq 0x20(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_fpa_dist.c
// Function: prv_dist_fpa_data_monadic_instr
static void prv_dist_fpa_data_monadic_instr(void *user_data,
					    subtilis_arm_op_t *op,
					    subtilis_arm_instr_type_t type,
					    subtilis_fpa_data_instr_t *instr,
					    subtilis_error_t *err)
{
	subtilis_dist_data_t *ud = user_data;

	if (!instr->immediate && ud->reg_num == instr->op2.reg) {
		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
cmpb $0x0, 0x20(%rcx)
jne 0x6d316
cmpq 0x28(%rcx), %rax
jne 0x6d316
leaq 0x9d68(%rip), %rdx      # 0x7706c
movq %r8, %rdi
movl $0x1f, %esi
movl $0xc9, %ecx
jmp 0x145a4
cmpq %rax, 0x10(%rcx)
jne 0x6d33c
movl $0xffffffff, 0x8(%rdi)  # imm = 0xFFFFFFFF
leaq 0x9d42(%rip), %rdx      # 0x7706c
movq %r8, %rdi
movl $0x1f, %esi
movl $0xcf, %ecx
jmp 0x145a4
incl 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/arch/arm32/arm_fpa_dist.c
// Function: prv_dist_fpa_cmp_instr
static void prv_dist_fpa_cmp_instr(void *user_data, subtilis_arm_op_t *op,
				   subtilis_arm_instr_type_t type,
				   subtilis_fpa_cmp_instr_t *instr,
				   subtilis_error_t *err)
{
	subtilis_dist_data_t *ud = user_data;

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

	if (!instr->immediate && instr->op2.reg == ud->reg_num) {
		subtilis_error_set_walker_failed(err);
		return;
	}

	ud->last_used++;
}

// Assembly:
movq (%rdi), %rax
cmpq %rax, 0x8(%rcx)
jne 0x6d485
leaq 0x9bf9(%rip), %rdx      # 0x7706c
movq %r8, %rdi
movl $0x1f, %esi
movl $0x114, %ecx            # imm = 0x114
jmp 0x145a4
cmpb $0x0, 0x10(%rcx)
jne 0x6d4aa
cmpq %rax, 0x18(%rcx)
jne 0x6d4aa
leaq 0x9bd4(%rip), %rdx      # 0x7706c
movq %r8, %rdi
movl $0x1f, %esi
movl $0x119, %ecx            # imm = 0x119
jmp 0x145a4
incl 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/backends/riscos/riscos_arm2.c
// Function: subtilis_riscos_arm_gcol_tint
void subtilis_riscos_arm_gcol_tint(subtilis_ir_section_t *s, size_t start,
				   void *user_data, subtilis_error_t *err)
{
	size_t col;
	size_t tint;
	subtilis_arm_reg_t dest;
	subtilis_arm_reg_t op2;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *gcol = &s->ops[start]->op.instr;
	const size_t vdu = 256 + 0x20000;

	col = subtilis_arm_ir_to_arm_reg(gcol->operands[1].reg);
	tint = subtilis_arm_ir_to_arm_reg(gcol->operands[2].reg);

	/* read_mask = 0 */
	/* write_mask = 0 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_AL, vdu + 18, 0, 0, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	dest = 0;
	op2 = subtilis_arm_ir_to_arm_reg(gcol->operands[0].reg);

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_VC, false, dest, op2,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	/* OS_WriteC */
	/* read_mask = 0x1 = r0 */
	/* write_mask = 0 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_VC, 0 + 0x20000, 1, 0,
			     err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	dest = 0;

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_VC, false, dest, col,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	/* OS_WriteC */
	/* read_mask = 0x1 = r0 */
	/* write_mask = 0 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_VC, 0 + 0x20000, 1, 0,
			     err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	prv_do_tint(arm_s, col, tint, 2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_riscos_handle_graphics_error(arm_s, s, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %rbp
movq 0x18(%rbp), %rdi
callq 0x4efba
movq %rax, %r12
movq 0x20(%rbp), %rdi
callq 0x4efba
movq %rax, %r13
movl $0x20112, %edx          # imm = 0x20112
movq %r14, %rdi
movl $0xe, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x50463
cmpl $0x0, (%rbx)
jne 0x6d9ad
movq 0x10(%rbp), %rdi
callq 0x4efba
movq %rbx, (%rsp)
movq %r14, %rdi
movl $0xd, %esi
movl $0x7, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x504b3
cmpl $0x0, (%rbx)
jne 0x6d9ad
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
movl $0x7, %esi
movl $0x1, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x50463
cmpl $0x0, (%rbx)
jne 0x6d9ad
movq %rbx, (%rsp)
movq %r14, %rdi
movl $0xd, %esi
movl $0x7, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r12, %r9
callq 0x504b3
cmpl $0x0, (%rbx)
jne 0x6d9ad
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
movl $0x7, %esi
movl $0x1, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x50463
cmpl $0x0, (%rbx)
jne 0x6d9ad
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
movl $0x2, %ecx
movq %rbx, %r8
callq 0x6dc73
cmpl $0x0, (%rbx)
je 0x6d9bc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6e975
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/backends/riscos/riscos_arm2.c
// Function: subtilis_riscos_tcol_tint
void subtilis_riscos_tcol_tint(subtilis_ir_section_t *s, size_t start,
			       void *user_data, subtilis_error_t *err)
{
	size_t col;
	size_t tint;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *tcol = &s->ops[start]->op.instr;

	col = subtilis_arm_ir_to_arm_reg(tcol->operands[0].reg);
	tint = subtilis_arm_ir_to_arm_reg(tcol->operands[1].reg);

	/* read_mask = 0 */
	/* write_mask = 0 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_AL, 256 + 17 + 0x20000,
			     0, 0, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_VC, false, 0, col,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	/* OS_WriteC */
	/* read_mask = 0x1 = r0 */
	/* write_mask = 0 */

	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_VC, 0 + 0x20000, 1, 0,
			     err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	prv_do_tint(arm_s, col, tint, 0, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_riscos_handle_graphics_error(arm_s, s, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r13
movq 0x10(%r13), %rdi
callq 0x4efba
movq %rax, %r12
movq 0x18(%r13), %rdi
callq 0x4efba
movq %rax, %r13
movl $0x20111, %edx          # imm = 0x20111
movq %r14, %rdi
movl $0xe, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x50463
cmpl $0x0, (%rbx)
jne 0x6da97
movq %rbx, (%rsp)
movq %r14, %rdi
movl $0xd, %esi
movl $0x7, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r12, %r9
callq 0x504b3
cmpl $0x0, (%rbx)
jne 0x6da97
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
movl $0x7, %esi
movl $0x1, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x50463
cmpl $0x0, (%rbx)
jne 0x6da97
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x6dc73
cmpl $0x0, (%rbx)
je 0x6daa5
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x6e975
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/backends/riscos/riscos_arm2.c
// Function: subtilis_riscos_arm2_syscall
void subtilis_riscos_arm2_syscall(subtilis_ir_section_t *s, size_t start,
				  void *user_data, subtilis_error_t *err)
{
	size_t flags_reg;
	subtilis_arm_instr_t *instr;
	subtilis_arm_data_instr_t *datai;
	subtilis_ir_sys_call_t *sys_call = &s->ops[start]->op.sys_call;
	subtilis_arm_section_t *arm_s = user_data;

	subtilis_riscos_arm_syscall(s, start, user_data,
				    subtilis_riscos_swi_list,
				    subtilis_riscos_known_swis, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	if (sys_call->flags_reg != SIZE_MAX) {
		if (sys_call->flags_local)
			flags_reg =
			    subtilis_arm_ir_to_arm_reg(sys_call->flags_reg);
		else
			flags_reg =
			    subtilis_arm_ir_to_arm_reg(arm_s->reg_counter++);
		subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_AL, false,
					 flags_reg, 15, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;

		instr = subtilis_arm_section_add_instr(
		    arm_s, SUBTILIS_ARM_INSTR_MOV, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		datai = &instr->operands.data;
		datai->ccode = SUBTILIS_ARM_CCODE_AL;
		datai->status = false;
		datai->dest = flags_reg;
		datai->op2.type = SUBTILIS_ARM_OP2_SHIFTED;
		datai->op2.op.shift.reg = flags_reg;
		datai->op2.op.shift.shift_reg = false;
		datai->op2.op.shift.shift.integer = 28;
		datai->op2.op.shift.type = SUBTILIS_ARM_SHIFT_LSR;

		if (!sys_call->flags_local)
			subtilis_arm_add_stran_imm(
			    arm_s, SUBTILIS_ARM_INSTR_STR,
			    SUBTILIS_ARM_CCODE_AL, flags_reg,
			    subtilis_arm_ir_to_arm_reg(sys_call->flags_reg), 0,
			    false, err);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r12
leaq 0xa4c3(%rip), %rax      # 0x77fa0
movq (%rax), %r8
leaq 0x36109(%rip), %rcx     # 0xa3bf0
movq %rbx, %r9
callq 0x7067c
cmpl $0x0, (%rbx)
je 0x6db00
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x18(%r12), %rdi
cmpq $-0x1, %rdi
je 0x6daf4
cmpb $0x0, 0x20(%r12)
jne 0x6db1d
movq (%r14), %rdi
leaq 0x1(%rdi), %rax
movq %rax, (%r14)
callq 0x4efba
movq %rax, %r15
subq $0x8, %rsp
movl $0xf, %r9d
movq %r14, %rdi
movl $0xd, %esi
movl $0xe, %edx
xorl %ecx, %ecx
movq %rax, %r8
pushq %rbx
callq 0x504b3
addq $0x10, %rsp
cmpl $0x0, (%rbx)
jne 0x6daf4
movq %r14, %rdi
movl $0xd, %esi
movq %rbx, %rdx
callq 0x4f6e2
cmpl $0x0, (%rbx)
jne 0x6daf4
movl $0xe, 0x8(%rax)
xorl %ecx, %ecx
movb %cl, 0xc(%rax)
movq %r15, 0x10(%rax)
movl $0x2, %edx
movl %edx, 0x20(%rax)
movq %r15, 0x28(%rax)
movb %cl, 0x40(%rax)
movl $0x1c, 0x38(%rax)
movl %edx, 0x30(%rax)
cmpb %cl, 0x20(%r12)
jne 0x6daf4
movq 0x18(%r12), %rdi
callq 0x4efba
movq %r14, %rdi
movl $0x13, %esi
movl $0xe, %edx
movq %r15, %rcx
movq %rax, %r8
xorl %r9d, %r9d
pushq %rbx
pushq $0x0
callq 0x50516
addq $0x18, %rsp
jmp 0x6daf8
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/backends/riscos/riscos_arm2.c
// Function: subtilis_riscos_arm2_sys_trans
size_t subtilis_riscos_arm2_sys_trans(const char *call_name)
{
	size_t *found;
	size_t error_bit = 0;

	if (call_name[0] == 'X') {
		call_name++;
		error_bit = 0x20000;
	}

	found = bsearch(call_name, &subtilis_riscos_swi_index[0],
			subtilis_riscos_known_swis, sizeof(*found),
			prv_sys_string_lookup);

	if (!found)
		return SIZE_MAX;

	return subtilis_riscos_swi_list[*found].num | error_bit;
}

// Assembly:
pushq %rbx
movb (%rdi), %bl
xorl %eax, %eax
cmpb $0x58, %bl
sete %al
addq %rax, %rdi
leaq 0xa3c1(%rip), %rax      # 0x77fa0
movq (%rax), %rdx
leaq 0xa3c7(%rip), %rsi      # 0x77fb0
leaq 0x39(%rip), %r8         # 0x6dc29
movl $0x8, %ecx
callq 0x122a0
testq %rax, %rax
je 0x6dc20
xorl %ecx, %ecx
cmpb $0x58, %bl
sete %cl
shll $0x11, %ecx
movq (%rax), %rax
leaq (%rax,%rax,2), %rax
leaq 0x35fd8(%rip), %rdx     # 0xa3bf0
movl (%rdx,%rax,8), %eax
orq %rcx, %rax
jmp 0x6dc27
movq $-0x1, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_arm_printstr
void subtilis_riscos_arm_printstr(subtilis_ir_section_t *s, size_t start,
				  void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t op2;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *printi = &s->ops[start]->op.instr;

	op2 = subtilis_arm_ir_to_arm_reg(printi->operands[0].reg);

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_AL, false, 0, op2,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	op2 = subtilis_arm_ir_to_arm_reg(printi->operands[1].reg);

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_AL, false, 1, op2,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	/* OS_WriteN */
	/* read_mask = 0x3 = r0, r1 */
	/* write_mask = 0 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_AL, 0x46 + 0x20000, 0x3,
			     0x0, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_riscos_handle_graphics_error(arm_s, s, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r12
movq 0x10(%r12), %rdi
callq 0x4efba
movq %rbx, (%rsp)
movq %r14, %rdi
movl $0xd, %esi
movl $0xe, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x504b3
cmpl $0x0, (%rbx)
jne 0x6ea53
movq 0x18(%r12), %rdi
callq 0x4efba
movq %rbx, (%rsp)
movl $0x1, %r8d
movq %r14, %rdi
movl $0xd, %esi
movl $0xe, %edx
xorl %ecx, %ecx
movq %rax, %r9
callq 0x504b3
cmpl $0x0, (%rbx)
jne 0x6ea53
movl $0x20046, %edx          # imm = 0x20046
movq %r14, %rdi
movl $0xe, %esi
movl $0x3, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x50463
cmpl $0x0, (%rbx)
je 0x6ea5f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6e975
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_arm_modei32
void subtilis_riscos_arm_modei32(subtilis_ir_section_t *s, size_t start,
				 void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t dest;
	subtilis_arm_reg_t op2;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *modei = &s->ops[start]->op.instr;
	const size_t vdu = 256 + 0x20000;

	dest = 0;
	op2 = subtilis_arm_ir_to_arm_reg(modei->operands[0].reg);

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_AL, false, dest, op2,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	/* read_mask = 0 */
	/* write_mask = 0 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_AL, vdu + 22, 0, 0, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_riscos_handle_graphics_error(arm_s, s, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	/* OS_WriteC */
	/* read_mask = 0x1 = r0 */
	/* write_mask = 0 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_VC, 0 + 0x20000, 1, 0,
			     err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_riscos_handle_graphics_error(arm_s, s, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %rax
movq 0x10(%rax), %rdi
callq 0x4efba
movq %rbx, (%rsp)
movq %r14, %rdi
movl $0xd, %esi
movl $0xe, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x504b3
cmpl $0x0, (%rbx)
jne 0x6eb2c
movl $0x20116, %edx          # imm = 0x20116
movq %r14, %rdi
movl $0xe, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x50463
cmpl $0x0, (%rbx)
jne 0x6eb2c
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x6e975
cmpl $0x0, (%rbx)
jne 0x6eb2c
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
movl $0x7, %esi
movl $0x1, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x50463
cmpl $0x0, (%rbx)
je 0x6eb36
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x6e975
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_arm_plot
void subtilis_riscos_arm_plot(subtilis_ir_section_t *s, size_t start,
			      void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t dest;
	subtilis_arm_reg_t op2;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *plot = &s->ops[start]->op.instr;
	const size_t os_plot = 0x45 + 0x20000;

	dest = 0;
	op2 = subtilis_arm_ir_to_arm_reg(plot->operands[0].reg);

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_AL, false, dest, op2,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	dest = 1;
	op2 = subtilis_arm_ir_to_arm_reg(plot->operands[1].reg);

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_AL, false, dest, op2,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	dest = 2;
	op2 = subtilis_arm_ir_to_arm_reg(plot->operands[2].reg);

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_AL, false, dest, op2,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	/* OS_Plot */
	/* read_mask = 0x7 = r0, r1, r2 */
	/* write_mask = 0x7 = r0, r1, r2 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_AL, os_plot, 0x7, 0x7,
			     err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_riscos_handle_graphics_error(arm_s, s, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r12
movq 0x10(%r12), %rdi
callq 0x4efba
movq %rbx, (%rsp)
movq %r14, %rdi
movl $0xd, %esi
movl $0xe, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x504b3
cmpl $0x0, (%rbx)
jne 0x6ec1c
movq 0x18(%r12), %rdi
callq 0x4efba
movq %rbx, (%rsp)
movl $0x1, %r8d
movq %r14, %rdi
movl $0xd, %esi
movl $0xe, %edx
xorl %ecx, %ecx
movq %rax, %r9
callq 0x504b3
cmpl $0x0, (%rbx)
jne 0x6ec1c
movq 0x20(%r12), %rdi
callq 0x4efba
movq %rbx, (%rsp)
movl $0x2, %r8d
movq %r14, %rdi
movl $0xd, %esi
movl $0xe, %edx
xorl %ecx, %ecx
movq %rax, %r9
callq 0x504b3
cmpl $0x0, (%rbx)
jne 0x6ec1c
movl $0x20045, %edx          # imm = 0x20045
movq %r14, %rdi
movl $0xe, %esi
movl $0x7, %ecx
movl $0x7, %r8d
movq %rbx, %r9
callq 0x50463
cmpl $0x0, (%rbx)
je 0x6ec28
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6e975
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: prv_pos
static void prv_pos(subtilis_ir_section_t *s, size_t start, void *user_data,
		    size_t src_reg, subtilis_error_t *err)
{
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *pos = &s->ops[start]->op.instr;
	subtilis_arm_reg_t dest;

	subtilis_arm_add_mov_imm(arm_s, SUBTILIS_ARM_CCODE_AL, false, 0, 134,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	/* OS_Byte */
	/* read_mask = 1 = r0  */
	/* write_mask = 6 = r1, r2 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_AL, 0x6 + 0x20000, 1, 6,
			     err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_riscos_handle_graphics_error(arm_s, s, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	dest = subtilis_arm_ir_to_arm_reg(pos->operands[0].reg);

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_VC, false, dest,
				 src_reg, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %r12
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r13
movq %rdx, %rdi
movl $0xd, %esi
movl $0xf, %edx
movl $0xe, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rbx
pushq $0x86
callq 0x50130
addq $0x10, %rsp
cmpl $0x0, (%rbx)
jne 0x6ecf8
movl $0x20006, %edx          # imm = 0x20006
movq %r15, %rdi
movl $0xe, %esi
movl $0x1, %ecx
movl $0x6, %r8d
movq %rbx, %r9
callq 0x50463
cmpl $0x0, (%rbx)
jne 0x6ecf8
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x6e975
cmpl $0x0, (%rbx)
jne 0x6ecf8
movq 0x10(%r13), %rdi
callq 0x4efba
subq $0x8, %rsp
movq %r15, %rdi
movl $0xd, %esi
movl $0x7, %edx
xorl %ecx, %ecx
movq %rax, %r8
movq %r14, %r9
pushq %rbx
callq 0x504b3
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_arm_at
void subtilis_riscos_arm_at(subtilis_ir_section_t *s, size_t start,
			    void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t dest;
	subtilis_arm_reg_t op2;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *at = &s->ops[start]->op.instr;
	const size_t os_tab = 256 + 31 + 0x20000;

	/* vdu 31 */
	/* read_mask = 0 */
	/* write_mask = 0 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_AL, os_tab, 0, 0, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	dest = 0;
	op2 = subtilis_arm_ir_to_arm_reg(at->operands[0].reg);

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_AL, false, dest, op2,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	/* OS_WriteC */
	/* read_mask = 0x1 = r0 */
	/* write_mask = 0 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_VC, 0 + 0x20000, 1, 0,
			     err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_riscos_handle_graphics_error(arm_s, s, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	dest = 0;
	op2 = subtilis_arm_ir_to_arm_reg(at->operands[1].reg);

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_VC, false, dest, op2,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	/* OS_WriteC */
	/* read_mask = 0x1 = r0 */
	/* write_mask = 0 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_VC, 0 + 0x20000, 1, 0,
			     err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	subtilis_riscos_handle_graphics_error(arm_s, s, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r12
movl $0x2011f, %edx          # imm = 0x2011F
movq %r14, %rdi
movl $0xe, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x50463
cmpl $0x0, (%rbx)
jne 0x6ee00
movq 0x10(%r12), %rdi
callq 0x4efba
movq %rbx, (%rsp)
movq %r14, %rdi
movl $0xd, %esi
movl $0xe, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x504b3
cmpl $0x0, (%rbx)
jne 0x6ee00
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
movl $0x7, %esi
movl $0x1, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x50463
cmpl $0x0, (%rbx)
jne 0x6ee00
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x6e975
cmpl $0x0, (%rbx)
jne 0x6ee00
movq 0x18(%r12), %rdi
callq 0x4efba
movq %rbx, (%rsp)
movq %r14, %rdi
movl $0xd, %esi
movl $0x7, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x504b3
cmpl $0x0, (%rbx)
jne 0x6ee00
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
movl $0x7, %esi
movl $0x1, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x50463
cmpl $0x0, (%rbx)
je 0x6ee0c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6e975
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_arm_gcol
void subtilis_riscos_arm_gcol(subtilis_ir_section_t *s, size_t start,
			      void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t dest;
	subtilis_arm_reg_t op2;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *gcol = &s->ops[start]->op.instr;
	const size_t vdu = 256 + 0x20000;

	/* read_mask = 0 */
	/* write_mask = 0 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_AL, vdu + 18, 0, 0, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_riscos_handle_graphics_error(arm_s, s, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	dest = 0;
	op2 = subtilis_arm_ir_to_arm_reg(gcol->operands[0].reg);

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_VC, false, dest, op2,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	/* OS_WriteC */
	/* read_mask = 0x1 = r0 */
	/* write_mask = 0 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_VC, 0 + 0x20000, 1, 0,
			     err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_riscos_handle_graphics_error(arm_s, s, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	dest = 0;
	op2 = subtilis_arm_ir_to_arm_reg(gcol->operands[1].reg);

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_VC, false, dest, op2,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	/* OS_WriteC */
	/* read_mask = 0x1 = r0 */
	/* write_mask = 0 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_VC, 0 + 0x20000, 1, 0,
			     err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_riscos_handle_graphics_error(arm_s, s, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r12
movl $0x20112, %edx          # imm = 0x20112
movq %r14, %rdi
movl $0xe, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x50463
cmpl $0x0, (%rbx)
jne 0x6ef2d
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x6e975
cmpl $0x0, (%rbx)
jne 0x6ef2d
movq 0x10(%r12), %rdi
callq 0x4efba
movq %rbx, (%rsp)
movq %r14, %rdi
movl $0xd, %esi
movl $0x7, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x504b3
cmpl $0x0, (%rbx)
jne 0x6ef2d
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
movl $0x7, %esi
movl $0x1, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x50463
cmpl $0x0, (%rbx)
jne 0x6ef2d
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x6e975
cmpl $0x0, (%rbx)
jne 0x6ef2d
movq 0x18(%r12), %rdi
callq 0x4efba
movq %rbx, (%rsp)
movq %r14, %rdi
movl $0xd, %esi
movl $0x7, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x504b3
cmpl $0x0, (%rbx)
jne 0x6ef2d
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
movl $0x7, %esi
movl $0x1, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x50463
cmpl $0x0, (%rbx)
je 0x6ef39
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6e975