// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/arch/arm32/arm_encode.c
// Function: prv_encode_vfp_tran_instr
static void prv_encode_vfp_tran_instr(void *user_data, subtilis_arm_op_t *op,
				      subtilis_arm_instr_type_t type,
				      subtilis_vfp_tran_instr_t *instr,
				      subtilis_error_t *err)
{
	uint32_t word;
	bool float32_src = true;
	bool float32_dest = true;
	subtilis_arm_reg_t src = instr->src;
	subtilis_arm_reg_t dest = instr->dest;
	subtilis_arm_encode_ud_t *ud = user_data;

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

	switch (type) {
	case SUBTILIS_VFP_INSTR_FTOSIS:
		word = 0xebd0a40;
		break;
	case SUBTILIS_VFP_INSTR_FTOUIS:
		word = 0xebc0a40;
		break;
	case SUBTILIS_VFP_INSTR_FTOUIZS:
		word = 0xebc0ac0;
		break;
	case SUBTILIS_VFP_INSTR_FTOSIZS:
		word = 0xebd0ac0;
		break;
	case SUBTILIS_VFP_INSTR_FSITOS:
		word = 0xeb80ac0;
		break;
	case SUBTILIS_VFP_INSTR_FUITOS:
		word = 0xeb80a40;
		break;
	case SUBTILIS_VFP_INSTR_FSITOD:
		word = 0xeb80bc0;
		float32_dest = false;
		if (instr->use_dregs)
			src *= 2;
		break;
	case SUBTILIS_VFP_INSTR_FTOSID:
		word = 0xebd0b40;
		float32_src = false;
		if (instr->use_dregs)
			dest *= 2;
		break;
	case SUBTILIS_VFP_INSTR_FTOUID:
		word = 0xebc0b40;
		float32_src = false;
		if (instr->use_dregs)
			dest *= 2;
		break;
	case SUBTILIS_VFP_INSTR_FTOSIZD:
		word = 0xebd0bc0;
		float32_src = false;
		if (instr->use_dregs)
			dest *= 2;
		break;
	case SUBTILIS_VFP_INSTR_FTOUIZD:
		word = 0xebc0bc0;
		float32_src = false;
		if (instr->use_dregs)
			dest *= 2;
		break;
	case SUBTILIS_VFP_INSTR_FUITOD:
		word = 0xebc0bc0;
		float32_dest = false;
		if (instr->use_dregs)
			src *= 2;
		break;
	default:
		subtilis_error_set_assertion_failed(err);
		return;
	}

	word |= instr->ccode << 28;
	word |= prv_encode_src_dest(src, dest, float32_src, float32_dest);

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

	prv_add_word(ud, word, err);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movb $0x1, -0x2d(%rbp)
movb $0x1, -0x2e(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x819a0
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x8011e
jmp 0x802db
movl -0x14(%rbp), %eax
addl $-0x51, %eax
movl %eax, %ecx
movq %rcx, -0x50(%rbp)
subl $0xb, %eax
ja 0x80264
movq -0x50(%rbp), %rax
leaq 0x2cb0a(%rip), %rcx     # 0xacc48
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0xebd0a40, -0x2c(%rbp) # imm = 0xEBD0A40
jmp 0x80280
movl $0xebc0a40, -0x2c(%rbp) # imm = 0xEBC0A40
jmp 0x80280
movl $0xebc0ac0, -0x2c(%rbp) # imm = 0xEBC0AC0
jmp 0x80280
movl $0xebd0ac0, -0x2c(%rbp) # imm = 0xEBD0AC0
jmp 0x80280
movl $0xeb80ac0, -0x2c(%rbp) # imm = 0xEB80AC0
jmp 0x80280
movl $0xeb80a40, -0x2c(%rbp) # imm = 0xEB80A40
jmp 0x80280
movl $0xeb80bc0, -0x2c(%rbp) # imm = 0xEB80BC0
movb $0x0, -0x2e(%rbp)
movq -0x20(%rbp), %rax
testb $0x1, 0x4(%rax)
je 0x801af
movq -0x38(%rbp), %rax
shlq %rax
movq %rax, -0x38(%rbp)
jmp 0x80280
movl $0xebd0b40, -0x2c(%rbp) # imm = 0xEBD0B40
movb $0x0, -0x2d(%rbp)
movq -0x20(%rbp), %rax
testb $0x1, 0x4(%rax)
je 0x801d4
movq -0x40(%rbp), %rax
shlq %rax
movq %rax, -0x40(%rbp)
jmp 0x80280
movl $0xebc0b40, -0x2c(%rbp) # imm = 0xEBC0B40
movb $0x0, -0x2d(%rbp)
movq -0x20(%rbp), %rax
testb $0x1, 0x4(%rax)
je 0x801f9
movq -0x40(%rbp), %rax
shlq %rax
movq %rax, -0x40(%rbp)
jmp 0x80280
movl $0xebd0bc0, -0x2c(%rbp) # imm = 0xEBD0BC0
movb $0x0, -0x2d(%rbp)
movq -0x20(%rbp), %rax
testb $0x1, 0x4(%rax)
je 0x8021e
movq -0x40(%rbp), %rax
shlq %rax
movq %rax, -0x40(%rbp)
jmp 0x80280
movl $0xebc0bc0, -0x2c(%rbp) # imm = 0xEBC0BC0
movb $0x0, -0x2d(%rbp)
movq -0x20(%rbp), %rax
testb $0x1, 0x4(%rax)
je 0x80240
movq -0x40(%rbp), %rax
shlq %rax
movq %rax, -0x40(%rbp)
jmp 0x80280
movl $0xebc0bc0, -0x2c(%rbp) # imm = 0xEBC0BC0
movb $0x0, -0x2e(%rbp)
movq -0x20(%rbp), %rax
testb $0x1, 0x4(%rax)
je 0x80262
movq -0x38(%rbp), %rax
shlq %rax
movq %rax, -0x38(%rbp)
jmp 0x80280
movq -0x28(%rbp), %rdi
movl $0xf, %esi
leaq 0x2cbbc(%rip), %rdx     # 0xace30
movl $0x6be, %ecx            # imm = 0x6BE
callq 0x158e0
jmp 0x802db
movq -0x20(%rbp), %rax
movl (%rax), %eax
shll $0x1c, %eax
orl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
movb -0x2d(%rbp), %cl
movb -0x2e(%rbp), %al
andb $0x1, %cl
andb $0x1, %al
movzbl %cl, %edx
movzbl %al, %ecx
callq 0x82440
orl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x48(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x81b90
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x802cb
jmp 0x802db
movq -0x48(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x28(%rbp), %rdx
callq 0x81bc0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)