LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 0x4c214
movq %rax, %r12
movq 0x20(%rbp), %rdi
callq 0x4c214
movq %rax, %r13
pushq $0xe
popq %rsi
movl $0x20112, %edx          # imm = 0x20112
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
jne 0x68505
movq 0x10(%rbp), %rdi
callq 0x4c214
movq %rbx, (%rsp)
pushq $0xd
popq %rsi
pushq $0x7
popq %rdx
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x4d518
cmpl $0x0, (%rbx)
jne 0x68505
pushq $0x7
popq %rsi
pushq $0x1
popq %rcx
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
jne 0x68505
movq %rbx, (%rsp)
pushq $0xd
popq %rsi
pushq $0x7
popq %rdx
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r12, %r9
callq 0x4d518
cmpl $0x0, (%rbx)
jne 0x68505
pushq $0x7
popq %rsi
pushq $0x1
popq %rcx
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
jne 0x68505
pushq $0x2
popq %rcx
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbx, %r8
callq 0x687a6
cmpl $0x0, (%rbx)
je 0x68514
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 0x696e4
// File: /workspace/github_c_makefile_star2_O2/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 0x4c214
movq %rax, %r12
movq 0x18(%r13), %rdi
callq 0x4c214
movq %rax, %r13
pushq $0xe
popq %rsi
movl $0x20111, %edx          # imm = 0x20111
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
jne 0x685e3
movq %rbx, (%rsp)
pushq $0xd
popq %rsi
pushq $0x7
popq %rdx
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r12, %r9
callq 0x4d518
cmpl $0x0, (%rbx)
jne 0x685e3
pushq $0x7
popq %rsi
pushq $0x1
popq %rcx
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
jne 0x685e3
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x687a6
cmpl $0x0, (%rbx)
je 0x685f1
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 0x696e4
// File: /workspace/github_c_makefile_star2_O2/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
subq $0x18, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r12
leaq 0x98e4(%rip), %rax      # 0x71f10
movq (%rax), %r8
leaq 0x3b5ba(%rip), %rcx     # 0xa3bf0
movq %r14, %r9
callq 0x6b18d
cmpl $0x0, (%r14)
je 0x68650
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x18(%r12), %rdi
cmpq $-0x1, %rdi
je 0x68644
cmpb $0x0, 0x20(%r12)
jne 0x6866d
movq (%rbx), %rdi
leaq 0x1(%rdi), %rax
movq %rax, (%rbx)
callq 0x4c214
movq %rax, %r15
movq %r14, (%rsp)
pushq $0xd
popq %rsi
pushq $0xe
popq %rdx
pushq $0xf
popq %r9
movq %rbx, %rdi
xorl %ecx, %ecx
movq %rax, %r8
callq 0x4d518
cmpl $0x0, (%r14)
jne 0x68644
pushq $0xd
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4c92b
cmpl $0x0, (%r14)
jne 0x68644
movl $0xe, 0x8(%rax)
xorl %ecx, %ecx
movb %cl, 0xc(%rax)
movq %r15, 0x10(%rax)
pushq $0x2
popq %rdx
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 0x68644
movq 0x18(%r12), %rdi
callq 0x4c214
movq %r14, 0x8(%rsp)
andl $0x0, (%rsp)
pushq $0x13
popq %rsi
pushq $0xe
popq %rdx
movq %rbx, %rdi
movq %r15, %rcx
movq %rax, %r8
xorl %r9d, %r9d
callq 0x4d55b
jmp 0x68644
// File: /workspace/github_c_makefile_star2_O2/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 0x97f0(%rip), %rax      # 0x71f10
movq (%rax), %rdx
leaq 0x97f6(%rip), %rsi      # 0x71f20
leaq 0x30(%rip), %r8         # 0x68761
pushq $0x8
popq %rcx
callq 0x122a0
testq %rax, %rax
je 0x6875c
xorl %ecx, %ecx
cmpb $0x58, %bl
sete %cl
imulq $0x18, (%rax), %rax
shll $0x11, %ecx
leaq 0x3b49c(%rip), %rdx     # 0xa3bf0
movl (%rdx,%rax), %eax
orq %rcx, %rax
jmp 0x6875f
pushq $-0x1
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4c214
movq %rbx, (%rsp)
pushq $0xd
popq %rsi
pushq $0xe
popq %rdx
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x4d518
cmpl $0x0, (%rbx)
jne 0x697b2
movq 0x18(%r12), %rdi
callq 0x4c214
movq %rbx, (%rsp)
pushq $0xd
popq %rsi
pushq $0xe
popq %rdx
pushq $0x1
popq %r8
movq %r14, %rdi
xorl %ecx, %ecx
movq %rax, %r9
callq 0x4d518
cmpl $0x0, (%rbx)
jne 0x697b2
pushq $0xe
popq %rsi
pushq $0x3
popq %rcx
movl $0x20046, %edx          # imm = 0x20046
movq %r14, %rdi
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
je 0x697be
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 0x696e4
// File: /workspace/github_c_makefile_star2_O2/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 0x4c214
movq %rbx, (%rsp)
pushq $0xd
popq %rsi
pushq $0xe
popq %rdx
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x4d518
cmpl $0x0, (%rbx)
jne 0x6987f
pushq $0xe
popq %rsi
movl $0x20116, %edx          # imm = 0x20116
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
jne 0x6987f
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x696e4
cmpl $0x0, (%rbx)
jne 0x6987f
pushq $0x7
popq %rsi
pushq $0x1
popq %rcx
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
je 0x69889
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 0x696e4
// File: /workspace/github_c_makefile_star2_O2/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 0x4c214
movq %rbx, (%rsp)
pushq $0xd
popq %rsi
pushq $0xe
popq %rdx
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x4d518
cmpl $0x0, (%rbx)
jne 0x69954
movq 0x18(%r12), %rdi
callq 0x4c214
movq %rbx, (%rsp)
pushq $0xd
popq %rsi
pushq $0xe
popq %rdx
pushq $0x1
popq %r8
movq %r14, %rdi
xorl %ecx, %ecx
movq %rax, %r9
callq 0x4d518
cmpl $0x0, (%rbx)
jne 0x69954
movq 0x20(%r12), %rdi
callq 0x4c214
movq %rbx, (%rsp)
pushq $0xd
popq %rsi
pushq $0xe
popq %rdx
pushq $0x2
popq %r8
movq %r14, %rdi
xorl %ecx, %ecx
movq %rax, %r9
callq 0x4d518
cmpl $0x0, (%rbx)
jne 0x69954
pushq $0xe
popq %rsi
pushq $0x7
popq %rcx
movl $0x20045, %edx          # imm = 0x20045
movq %r14, %rdi
movl %ecx, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
je 0x69960
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 0x696e4
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0xd
popq %rsi
pushq $0xf
popq %rdx
pushq $0xe
popq %rcx
movq %r15, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rbx
pushq $0x86
callq 0x4d213
popq %rax
popq %rcx
cmpl $0x0, (%rbx)
jne 0x69a1a
pushq $0xe
popq %rsi
pushq $0x1
popq %rcx
pushq $0x6
popq %r8
movl $0x20006, %edx          # imm = 0x20006
movq %r15, %rdi
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
jne 0x69a1a
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x696e4
cmpl $0x0, (%rbx)
jne 0x69a1a
movq 0x10(%r13), %rdi
callq 0x4c214
subq $0x8, %rsp
pushq $0xd
popq %rsi
pushq $0x7
popq %rdx
movq %r15, %rdi
xorl %ecx, %ecx
movq %rax, %r8
movq %r14, %r9
pushq %rbx
callq 0x4d518
popq %rax
popq %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0xe
popq %rsi
movl $0x2011f, %edx          # imm = 0x2011F
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
jne 0x69b0a
movq 0x10(%r12), %rdi
callq 0x4c214
movq %rbx, (%rsp)
pushq $0xd
popq %rsi
pushq $0xe
popq %rdx
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x4d518
cmpl $0x0, (%rbx)
jne 0x69b0a
pushq $0x7
popq %rsi
pushq $0x1
popq %rcx
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
jne 0x69b0a
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x696e4
cmpl $0x0, (%rbx)
jne 0x69b0a
movq 0x18(%r12), %rdi
callq 0x4c214
movq %rbx, (%rsp)
pushq $0xd
popq %rsi
pushq $0x7
popq %rdx
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x4d518
cmpl $0x0, (%rbx)
jne 0x69b0a
pushq $0x7
popq %rsi
pushq $0x1
popq %rcx
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
je 0x69b16
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 0x696e4
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0xe
popq %rsi
movl $0x20112, %edx          # imm = 0x20112
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
jne 0x69c21
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x696e4
cmpl $0x0, (%rbx)
jne 0x69c21
movq 0x10(%r12), %rdi
callq 0x4c214
movq %rbx, (%rsp)
pushq $0xd
popq %rsi
pushq $0x7
popq %rdx
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x4d518
cmpl $0x0, (%rbx)
jne 0x69c21
pushq $0x7
popq %rsi
pushq $0x1
popq %rcx
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
jne 0x69c21
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x696e4
cmpl $0x0, (%rbx)
jne 0x69c21
movq 0x18(%r12), %rdi
callq 0x4c214
movq %rbx, (%rsp)
pushq $0xd
popq %rsi
pushq $0x7
popq %rdx
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x4d518
cmpl $0x0, (%rbx)
jne 0x69c21
pushq $0x7
popq %rsi
pushq $0x1
popq %rcx
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
je 0x69c2d
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 0x696e4
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_arm_gettime
void subtilis_riscos_arm_gettime(subtilis_ir_section_t *s, size_t start,
				 void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t one;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *origin = &s->ops[start]->op.instr;
	size_t ir_dest = origin->operands[0].reg;
	subtilis_arm_reg_t dest = subtilis_arm_ir_to_arm_reg(ir_dest);

	/*
	 * TOOD: Need to check for stack overflow.
	 */

	subtilis_arm_add_data_imm(arm_s, SUBTILIS_ARM_INSTR_SUB,
				  SUBTILIS_ARM_CCODE_AL, false, 1, 13, 8, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

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

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

	one = subtilis_arm_ir_to_arm_reg(arm_s->reg_counter++);
	subtilis_arm_gen_sete_load_reg(arm_s, s, SUBTILIS_ARM_CCODE_VS, one,
				       err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_arm_add_stran_imm(arm_s, SUBTILIS_ARM_INSTR_LDR,
				   SUBTILIS_ARM_CCODE_VC, dest, 1, 0, false,
				   err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r12
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %rax
movq 0x10(%rax), %rdi
callq 0x4c214
movq %rax, %r15
pushq $0x2
popq %rsi
pushq $0xe
popq %rdx
pushq $0x1
popq %r8
pushq $0xd
popq %r9
movq %rbx, %rdi
xorl %ecx, %ecx
pushq %r14
pushq $0x8
callq 0x4d357
popq %rax
popq %rcx
cmpl $0x0, (%r14)
jne 0x69e49
pushq $0xd
popq %rsi
pushq $0xf
popq %rdx
pushq $0xe
popq %rcx
movq %rbx, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r14
pushq $0x1
callq 0x4d213
popq %rax
popq %rcx
cmpl $0x0, (%r14)
jne 0x69e49
pushq $0xe
popq %rsi
pushq $0x3
popq %rcx
movl $0x20007, %edx          # imm = 0x20007
movq %rbx, %rdi
xorl %r8d, %r8d
movq %r14, %r9
callq 0x4d4d9
cmpl $0x0, (%r14)
jne 0x69e49
movq (%rbx), %rdi
leaq 0x1(%rdi), %rax
movq %rax, (%rbx)
callq 0x4c214
pushq $0x6
popq %rdx
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rcx
movq %r14, %r8
callq 0x4f21a
cmpl $0x0, (%r14)
je 0x69e55
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
subq $0x10, %rsp
movq %r14, 0x8(%rsp)
andl $0x0, (%rsp)
pushq $0x12
popq %rsi
pushq $0x7
popq %rdx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r15, %rcx
xorl %r9d, %r9d
callq 0x4d55b
addq $0x18, %rsp
jmp 0x69e4d
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_arm_wait
void subtilis_riscos_arm_wait(subtilis_ir_section_t *s, size_t start,
			      void *user_data, subtilis_error_t *err)
{
	subtilis_arm_section_t *arm_s = user_data;

	subtilis_arm_add_mov_imm(arm_s, SUBTILIS_ARM_CCODE_AL, false, 0, 19,
				 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);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r15
movq %rdi, %r14
pushq $0xd
popq %rsi
pushq $0xf
popq %rdx
pushq $0xe
popq %rcx
movq %r15, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rbx
pushq $0x13
callq 0x4d213
popq %rax
popq %rcx
cmpl $0x0, (%rbx)
jne 0x69fde
pushq $0xe
popq %rsi
pushq $0x1
popq %rcx
pushq $0x6
popq %r8
movl $0x20006, %edx          # imm = 0x20006
movq %r15, %rdi
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
je 0x69fe4
popq %rbx
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x696e4
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_arm_get
void subtilis_riscos_arm_get(subtilis_ir_section_t *s, size_t start,
			     void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t one;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *get = &s->ops[start]->op.instr;
	size_t ir_dest = get->operands[0].reg;
	subtilis_arm_reg_t dest = subtilis_arm_ir_to_arm_reg(ir_dest);

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

	one = subtilis_arm_ir_to_arm_reg(arm_s->reg_counter++);
	subtilis_arm_gen_sete_load_reg(arm_s, s, SUBTILIS_ARM_CCODE_VS, one,
				       err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r12
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %rax
movq 0x10(%rax), %rdi
callq 0x4c214
movq %rax, %r15
pushq $0xe
popq %rsi
pushq $0x1
popq %r8
movl $0x20004, %edx          # imm = 0x20004
movq %rbx, %rdi
xorl %ecx, %ecx
movq %r14, %r9
callq 0x4d4d9
cmpl $0x0, (%r14)
jne 0x6a07e
movq (%rbx), %rdi
leaq 0x1(%rdi), %rax
movq %rax, (%rbx)
callq 0x4c214
pushq $0x6
popq %rdx
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rcx
movq %r14, %r8
callq 0x4f21a
cmpl $0x0, (%r14)
jne 0x6a07e
movq %r14, (%rsp)
pushq $0xd
popq %rsi
pushq $0x7
popq %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
movq %r15, %r8
xorl %r9d, %r9d
callq 0x4d518
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_arm_os_byte_id
void subtilis_riscos_arm_os_byte_id(subtilis_ir_section_t *s, size_t start,
				    void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t one;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *getto = &s->ops[start]->op.instr;
	size_t ir_dest = getto->operands[0].reg;
	subtilis_arm_reg_t dest = subtilis_arm_ir_to_arm_reg(ir_dest);

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

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

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

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

	one = subtilis_arm_ir_to_arm_reg(arm_s->reg_counter++);
	subtilis_arm_gen_sete_load_reg(arm_s, s, SUBTILIS_ARM_CCODE_VS, one,
				       err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r12
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %rax
movq 0x10(%rax), %rdi
callq 0x4c214
movq %rax, %r15
movq %r14, 0x8(%rsp)
movl $0x81, (%rsp)
pushq $0xd
popq %rsi
pushq $0xf
popq %rdx
pushq $0xe
popq %rcx
movq %rbx, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x4d213
cmpl $0x0, (%r14)
jne 0x6a4ec
andl $0x0, (%rsp)
movq %r14, 0x8(%rsp)
pushq $0xd
popq %rsi
pushq $0xf
popq %rdx
pushq $0xe
popq %rcx
pushq $0x1
popq %r9
movq %rbx, %rdi
xorl %r8d, %r8d
callq 0x4d213
cmpl $0x0, (%r14)
jne 0x6a4ec
movq %r14, 0x8(%rsp)
movl $0xff, (%rsp)
pushq $0xd
popq %rsi
pushq $0xf
popq %rdx
pushq $0xe
popq %rcx
pushq $0x2
popq %r9
movq %rbx, %rdi
xorl %r8d, %r8d
callq 0x4d213
cmpl $0x0, (%r14)
jne 0x6a4ec
pushq $0xe
popq %rsi
pushq $0x7
popq %rcx
pushq $0x6
popq %r8
movl $0x20006, %edx          # imm = 0x20006
movq %rbx, %rdi
movq %r14, %r9
callq 0x4d4d9
cmpl $0x0, (%r14)
jne 0x6a4ec
movq (%rbx), %rdi
leaq 0x1(%rdi), %rax
movq %rax, (%rbx)
callq 0x4c214
pushq $0x6
popq %rdx
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rcx
movq %r14, %r8
callq 0x4f21a
cmpl $0x0, (%r14)
jne 0x6a4ec
movq %r14, (%rsp)
pushq $0xd
popq %rsi
pushq $0x7
popq %rdx
pushq $0x1
popq %r9
movq %rbx, %rdi
xorl %ecx, %ecx
movq %r15, %r8
callq 0x4d518
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_arm_vdui
void subtilis_riscos_arm_vdui(subtilis_ir_section_t *s, size_t start,
			      void *user_data, subtilis_error_t *err)
{
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *vdu = &s->ops[start]->op.instr;
	size_t ch = vdu->operands[0].integer & 0xff;

	/* read_mask = 0 */
	/* write_mask = 0 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_AL, 256 + ch + 0x20000,
			     0, 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
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %rax
movzbl 0x10(%rax), %edx
orq $0x20100, %rdx          # imm = 0x20100
pushq $0xe
popq %rsi
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
je 0x6a537
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x696e4
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_arm_vdu
void subtilis_riscos_arm_vdu(subtilis_ir_section_t *s, size_t start,
			     void *user_data, subtilis_error_t *err)
{
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *vdu = &s->ops[start]->op.instr;
	size_t ir_src = vdu->operands[0].reg;
	subtilis_arm_reg_t src = subtilis_arm_ir_to_arm_reg(ir_src);

	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_AL, false, 0, src,
				 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_AL, 0x0 + 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 0x4c214
movq %rbx, (%rsp)
pushq $0xd
popq %rsi
pushq $0xe
popq %rdx
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x4d518
cmpl $0x0, (%rbx)
jne 0x6a5aa
pushq $0xe
popq %rsi
pushq $0x1
popq %rcx
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
je 0x6a5b4
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 0x696e4
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_arm_point_tint
void subtilis_riscos_arm_point_tint(subtilis_ir_section_t *s, size_t start,
				    void *user_data, size_t res_reg,
				    subtilis_error_t *err)
{
	subtilis_arm_reg_t x;
	subtilis_arm_reg_t y;
	subtilis_arm_reg_t dest;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *plot = &s->ops[start]->op.instr;

	x = subtilis_arm_ir_to_arm_reg(plot->operands[1].reg);
	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_AL, false, 0, x,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	y = subtilis_arm_ir_to_arm_reg(plot->operands[2].reg);
	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_AL, false, 1, y,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	/* OS_ReadPoint */
	/* read_mask = 0x3 = r0, r1 */
	/* write_mask = 0x1c = r2, r3, r4 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_AL, 0x32 + 0x20000, 3,
			     0x1C, 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(plot->operands[0].reg);
	subtilis_arm_add_mov_reg(arm_s, SUBTILIS_ARM_CCODE_VC, false, dest,
				 res_reg, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r15
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r12
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r13
movq 0x18(%r13), %rdi
callq 0x4c214
movq %r15, (%rsp)
pushq $0xd
popq %rsi
pushq $0xe
popq %rdx
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x4d518
cmpl $0x0, (%r15)
jne 0x6a69a
movq 0x20(%r13), %rdi
callq 0x4c214
movq %r15, (%rsp)
pushq $0xd
popq %rsi
pushq $0xe
popq %rdx
pushq $0x1
popq %r8
movq %r14, %rdi
xorl %ecx, %ecx
movq %rax, %r9
callq 0x4d518
cmpl $0x0, (%r15)
jne 0x6a69a
pushq $0xe
popq %rsi
pushq $0x3
popq %rcx
pushq $0x1c
popq %r8
movl $0x20032, %edx          # imm = 0x20032
movq %r14, %rdi
movq %r15, %r9
callq 0x4d4d9
cmpl $0x0, (%r15)
jne 0x6a69a
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x696e4
cmpl $0x0, (%r15)
jne 0x6a69a
movq 0x10(%r13), %rdi
callq 0x4c214
movq %r15, (%rsp)
pushq $0xd
popq %rsi
pushq $0x7
popq %rdx
movq %r14, %rdi
xorl %ecx, %ecx
movq %rax, %r8
movq %rbx, %r9
callq 0x4d518
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_arm_ref
void subtilis_riscos_arm_ref(subtilis_ir_section_t *s, size_t start,
			     void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t count;
	subtilis_arm_reg_t block;
	subtilis_ir_inst_t *ref = &s->ops[start]->op.instr;
	subtilis_arm_section_t *arm_s = user_data;

	/*
	 * Subtract 8 from the memory address provided by program
	 */

	block = subtilis_arm_ir_to_arm_reg(ref->operands[0].reg);
	count = subtilis_arm_ir_to_arm_reg(arm_s->reg_counter++);

	subtilis_arm_add_stran_imm(arm_s, SUBTILIS_ARM_INSTR_LDR,
				   SUBTILIS_ARM_CCODE_AL, count, block, -8,
				   false, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

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

	subtilis_arm_add_stran_imm(arm_s, SUBTILIS_ARM_INSTR_STR,
				   SUBTILIS_ARM_CCODE_AL, count, block, -8,
				   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), %rax
movq 0x10(%rax), %rdi
callq 0x4c214
movq %rax, %r15
movq (%r14), %rdi
leaq 0x1(%rdi), %rax
movq %rax, (%r14)
callq 0x4c214
movq %rax, %r12
pushq $0x12
popq %rsi
pushq $0xe
popq %rdx
pushq $-0x8
popq %r9
movq %r14, %rdi
movq %rax, %rcx
movq %r15, %r8
pushq %rbx
pushq $0x0
callq 0x4d55b
popq %rax
popq %rcx
cmpl $0x0, (%rbx)
jne 0x6aa09
subq $0x8, %rsp
pushq $0x4
popq %rsi
pushq $0x2
popq %rdx
pushq $0xe
popq %rcx
movq %r14, %rdi
xorl %r8d, %r8d
movq %r12, %r9
pushq %rbx
pushq $0x1
pushq %r12
callq 0x4ced7
addq $0x20, %rsp
cmpl $0x0, (%rbx)
je 0x6aa15
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $0x13
popq %rsi
pushq $0xe
popq %rdx
pushq $-0x8
popq %r9
movq %r14, %rdi
movq %r12, %rcx
movq %r15, %r8
pushq %rbx
pushq $0x0
callq 0x4d55b
addq $0x18, %rsp
jmp 0x6aa0d
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_arm_getref
void subtilis_riscos_arm_getref(subtilis_ir_section_t *s, size_t start,
				void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t count;
	subtilis_arm_reg_t ptr;
	subtilis_arm_reg_t block;
	subtilis_ir_inst_t *getref = &s->ops[start]->op.instr;
	subtilis_arm_section_t *arm_s = user_data;

	count = subtilis_arm_ir_to_arm_reg(getref->operands[0].reg);
	ptr = subtilis_arm_ir_to_arm_reg(getref->operands[1].reg);
	block = subtilis_arm_ir_to_arm_reg(arm_s->reg_counter++);

	/*
	 * Subtract 8 from the memory address provided by program
	 */

	subtilis_arm_add_sub_imm(arm_s, SUBTILIS_ARM_CCODE_AL, false, block,
				 ptr, 8, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_arm_add_stran_imm(arm_s, SUBTILIS_ARM_INSTR_LDR,
				   SUBTILIS_ARM_CCODE_AL, count, block, 0,
				   false, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r12
movq 0x10(%r12), %rdi
callq 0x4c214
movq %rax, %r15
movq 0x18(%r12), %rdi
callq 0x4c214
movq %rax, %r13
movq (%rbx), %rdi
leaq 0x1(%rdi), %rax
movq %rax, (%rbx)
callq 0x4c214
movq %rax, %r12
movq %r14, 0x10(%rsp)
movq %r13, (%rsp)
movl $0x8, 0x8(%rsp)
pushq $0x2
popq %rsi
pushq $0x4
popq %rdx
pushq $0xe
popq %rcx
movq %rbx, %rdi
xorl %r8d, %r8d
movq %rax, %r9
callq 0x4ced7
cmpl $0x0, (%r14)
jne 0x6aacb
movq %r14, 0x8(%rsp)
andl $0x0, (%rsp)
pushq $0x12
popq %rsi
pushq $0xe
popq %rdx
movq %rbx, %rdi
movq %r15, %rcx
movq %r12, %r8
xorl %r9d, %r9d
callq 0x4d55b
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_tcol
void subtilis_riscos_tcol(subtilis_ir_section_t *s, size_t start,
			  void *user_data, subtilis_error_t *err)
{
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *tcol = &s->ops[start]->op.instr;
	size_t col;

	/* 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;

	col = subtilis_arm_ir_to_arm_reg(tcol->operands[0].reg);
	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;

	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
pushq $0xe
popq %rsi
movl $0x20111, %edx          # imm = 0x20111
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
jne 0x6ab56
movq 0x10(%r12), %rdi
callq 0x4c214
movq %rbx, (%rsp)
pushq $0xd
popq %rsi
pushq $0x7
popq %rdx
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x4d518
cmpl $0x0, (%rbx)
jne 0x6ab56
pushq $0x7
popq %rsi
pushq $0x1
popq %rcx
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
je 0x6ab62
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 0x696e4
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_arm_i32_to_dec
void subtilis_riscos_arm_i32_to_dec(subtilis_ir_section_t *s, size_t start,
				    void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t dest;
	subtilis_arm_reg_t buffer;
	subtilis_arm_reg_t val;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *to_deci = &s->ops[start]->op.instr;

	dest = subtilis_arm_ir_to_arm_reg(to_deci->operands[0].reg);
	val = subtilis_arm_ir_to_arm_reg(to_deci->operands[1].reg);
	buffer = subtilis_arm_ir_to_arm_reg(to_deci->operands[2].reg);

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

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

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

	/* OS_ConvertInteger4 */
	/* read_mask = 0x7 = r0, r1, r2 */
	/* write_mask = 0x7 = r0, r1, r2 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_AL, 0xdc, 0x7, 0x7, err);

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

	subtilis_arm_add_data_imm(arm_s, SUBTILIS_ARM_INSTR_RSB,
				  SUBTILIS_ARM_CCODE_AL, false, dest, 2, 12,
				  err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r12
movq 0x10(%r12), %rdi
callq 0x4c214
movq %rax, %r15
movq 0x18(%r12), %rdi
callq 0x4c214
movq %rax, %r13
movq 0x20(%r12), %rdi
callq 0x4c214
movq %rax, %r12
subq $0x8, %rsp
pushq $0xd
popq %rsi
pushq $0xe
popq %rdx
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r13, %r9
pushq %rbx
callq 0x4d518
popq %rax
popq %rcx
cmpl $0x0, (%rbx)
jne 0x6ad7a
subq $0x8, %rsp
pushq $0xd
popq %rsi
pushq $0xe
popq %rdx
pushq $0x1
popq %r8
movq %r14, %rdi
xorl %ecx, %ecx
movq %r12, %r9
pushq %rbx
callq 0x4d518
popq %rax
popq %rcx
cmpl $0x0, (%rbx)
jne 0x6ad7a
pushq $0xd
popq %rsi
pushq $0xf
popq %rdx
pushq $0xe
popq %rcx
pushq $0x2
popq %r9
movq %r14, %rdi
xorl %r8d, %r8d
pushq %rbx
pushq $0xc
callq 0x4d213
popq %rax
popq %rcx
cmpl $0x0, (%rbx)
jne 0x6ad7a
pushq $0xe
popq %rsi
pushq $0x7
popq %rcx
movl $0xdc, %edx
movq %r14, %rdi
movl %ecx, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
jne 0x6ad7a
pushq $0x3
popq %rsi
pushq $0xe
popq %rdx
pushq $0x2
popq %r9
movq %r14, %rdi
xorl %ecx, %ecx
movq %r15, %r8
pushq %rbx
pushq $0xc
callq 0x4d357
popq %rax
popq %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/backends/riscos_common/riscos_arm.c
// Function: subtilis_riscos_arm_i32_to_hex
void subtilis_riscos_arm_i32_to_hex(subtilis_ir_section_t *s, size_t start,
				    void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t dest;
	subtilis_arm_reg_t buffer;
	subtilis_arm_reg_t val;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *to_hexi = &s->ops[start]->op.instr;

	dest = subtilis_arm_ir_to_arm_reg(to_hexi->operands[0].reg);
	val = subtilis_arm_ir_to_arm_reg(to_hexi->operands[1].reg);
	buffer = subtilis_arm_ir_to_arm_reg(to_hexi->operands[2].reg);

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

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

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

	/* OS_ConvertHex8 */
	/* read_mask = 0x7 = r0, r1, r2 */
	/* write_mask = 0x7 = r0, r1, r2 */
	subtilis_arm_add_swi(arm_s, SUBTILIS_ARM_CCODE_AL, 0xd4, 0x7, 0x7, err);

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

	subtilis_arm_add_data_imm(arm_s, SUBTILIS_ARM_INSTR_RSB,
				  SUBTILIS_ARM_CCODE_AL, false, dest, 2, 11,
				  err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r12
movq 0x10(%r12), %rdi
callq 0x4c214
movq %rax, %r15
movq 0x18(%r12), %rdi
callq 0x4c214
movq %rax, %r13
movq 0x20(%r12), %rdi
callq 0x4c214
movq %rax, %r12
subq $0x8, %rsp
pushq $0xd
popq %rsi
pushq $0xe
popq %rdx
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r13, %r9
pushq %rbx
callq 0x4d518
popq %rax
popq %rcx
cmpl $0x0, (%rbx)
jne 0x6ae63
subq $0x8, %rsp
pushq $0xd
popq %rsi
pushq $0xe
popq %rdx
pushq $0x1
popq %r8
movq %r14, %rdi
xorl %ecx, %ecx
movq %r12, %r9
pushq %rbx
callq 0x4d518
popq %rax
popq %rcx
cmpl $0x0, (%rbx)
jne 0x6ae63
pushq $0xd
popq %rsi
pushq $0xf
popq %rdx
pushq $0xe
popq %rcx
pushq $0x2
popq %r9
movq %r14, %rdi
xorl %r8d, %r8d
pushq %rbx
pushq $0xb
callq 0x4d213
popq %rax
popq %rcx
cmpl $0x0, (%rbx)
jne 0x6ae63
pushq $0xe
popq %rsi
pushq $0x7
popq %rcx
movl $0xd4, %edx
movq %r14, %rdi
movl %ecx, %r8d
movq %rbx, %r9
callq 0x4d4d9
cmpl $0x0, (%rbx)
jne 0x6ae63
pushq $0x3
popq %rsi
pushq $0xe
popq %rdx
pushq $0x2
popq %r9
movq %r14, %rdi
xorl %ecx, %ecx
movq %r15, %r8
pushq %rbx
pushq $0xb
callq 0x4d357
popq %rax
popq %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq