// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/arch/arm32/arm_encode.c
// Function: prv_encode_vfp_data_instr
static void prv_encode_vfp_data_instr(void *user_data, subtilis_arm_op_t *op,
				      subtilis_arm_instr_type_t type,
				      subtilis_vfp_data_instr_t *instr,
				      subtilis_error_t *err)
{
	uint32_t word = 0;
	bool float32 = false;
	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_FMACS:
		word |= 0xe000a00;
		float32 = true;
		break;
	case SUBTILIS_VFP_INSTR_FMACD:
		word |= 0xe000b00;
		break;
	case SUBTILIS_VFP_INSTR_FNMACS:
		word |= 0xe000a40;
		float32 = true;
		break;
	case SUBTILIS_VFP_INSTR_FNMACD:
		word |= 0xe000b40;
		break;
	case SUBTILIS_VFP_INSTR_FMSCS:
		word |= 0xe100a00;
		float32 = true;
		break;
	case SUBTILIS_VFP_INSTR_FMSCD:
		word |= 0xe100b00;
		break;
	case SUBTILIS_VFP_INSTR_FNMSCS:
		word |= 0xe100a40;
		float32 = true;
		break;
	case SUBTILIS_VFP_INSTR_FNMSCD:
		word |= 0xe100b40;
		break;
	case SUBTILIS_VFP_INSTR_FMULS:
		word |= 0xe200a00;
		float32 = true;
		break;
	case SUBTILIS_VFP_INSTR_FMULD:
		word |= 0xe200b00;
		break;
	case SUBTILIS_VFP_INSTR_FNMULS:
		word |= 0xe200a40;
		float32 = true;
		break;
	case SUBTILIS_VFP_INSTR_FNMULD:
		word |= 0xe200b40;
		break;
	case SUBTILIS_VFP_INSTR_FADDS:
		word |= 0xe300a00;
		float32 = true;
		break;
	case SUBTILIS_VFP_INSTR_FADDD:
		word |= 0xe300b00;
		break;
	case SUBTILIS_VFP_INSTR_FSUBS:
		word |= 0xe300a40;
		float32 = true;
		break;
	case SUBTILIS_VFP_INSTR_FSUBD:
		word |= 0xe300b40;
		break;
	case SUBTILIS_VFP_INSTR_FDIVS:
		word |= 0xe800a00;
		float32 = true;
		break;
	case SUBTILIS_VFP_INSTR_FDIVD:
		word |= 0xe800b00;
		break;
	default:
		subtilis_error_set_assertion_failed(err);
		return;
	}

	word |= instr->ccode << 28;

	if (float32) {
		word |= ((instr->op1 >> 1) & 0xf) << 16;
		word |= (instr->op1 & 1) << 7;

		word |= (instr->op2 >> 1) & 0xf;
		word |= (instr->op2 & 1) << 5;

		word |= ((instr->dest >> 1) & 0xf) << 12;
		word |= (instr->dest & 1) << 22;
	} else {
		word |= (instr->op1 & 0xf) << 16;
		word |= instr->op2 & 0xf;
		word |= (instr->dest & 0xf) << 12;
	}

	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 $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movb $0x0, -0x2d(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x819a0
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x80749
jmp 0x809e5
movl -0x14(%rbp), %eax
addl $-0x5f, %eax
movl %eax, %ecx
movq %rcx, -0x40(%rbp)
subl $0x11, %eax
ja 0x808a1
movq -0x40(%rbp), %rax
leaq 0x2c51f(%rip), %rcx     # 0xacc88
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x2c(%rbp), %eax
orl $0xe000a00, %eax        # imm = 0xE000A00
movl %eax, -0x2c(%rbp)
movb $0x1, -0x2d(%rbp)
jmp 0x808c0
movl -0x2c(%rbp), %eax
orl $0xe000b00, %eax        # imm = 0xE000B00
movl %eax, -0x2c(%rbp)
jmp 0x808c0
movl -0x2c(%rbp), %eax
orl $0xe000a40, %eax        # imm = 0xE000A40
movl %eax, -0x2c(%rbp)
movb $0x1, -0x2d(%rbp)
jmp 0x808c0
movl -0x2c(%rbp), %eax
orl $0xe000b40, %eax        # imm = 0xE000B40
movl %eax, -0x2c(%rbp)
jmp 0x808c0
movl -0x2c(%rbp), %eax
orl $0xe100a00, %eax        # imm = 0xE100A00
movl %eax, -0x2c(%rbp)
movb $0x1, -0x2d(%rbp)
jmp 0x808c0
movl -0x2c(%rbp), %eax
orl $0xe100b00, %eax        # imm = 0xE100B00
movl %eax, -0x2c(%rbp)
jmp 0x808c0
movl -0x2c(%rbp), %eax
orl $0xe100a40, %eax        # imm = 0xE100A40
movl %eax, -0x2c(%rbp)
movb $0x1, -0x2d(%rbp)
jmp 0x808c0
movl -0x2c(%rbp), %eax
orl $0xe100b40, %eax        # imm = 0xE100B40
movl %eax, -0x2c(%rbp)
jmp 0x808c0
movl -0x2c(%rbp), %eax
orl $0xe200a00, %eax        # imm = 0xE200A00
movl %eax, -0x2c(%rbp)
movb $0x1, -0x2d(%rbp)
jmp 0x808c0
movl -0x2c(%rbp), %eax
orl $0xe200b00, %eax        # imm = 0xE200B00
movl %eax, -0x2c(%rbp)
jmp 0x808c0
movl -0x2c(%rbp), %eax
orl $0xe200a40, %eax        # imm = 0xE200A40
movl %eax, -0x2c(%rbp)
movb $0x1, -0x2d(%rbp)
jmp 0x808c0
movl -0x2c(%rbp), %eax
orl $0xe200b40, %eax        # imm = 0xE200B40
movl %eax, -0x2c(%rbp)
jmp 0x808c0
movl -0x2c(%rbp), %eax
orl $0xe300a00, %eax        # imm = 0xE300A00
movl %eax, -0x2c(%rbp)
movb $0x1, -0x2d(%rbp)
jmp 0x808c0
movl -0x2c(%rbp), %eax
orl $0xe300b00, %eax        # imm = 0xE300B00
movl %eax, -0x2c(%rbp)
jmp 0x808c0
movl -0x2c(%rbp), %eax
orl $0xe300a40, %eax        # imm = 0xE300A40
movl %eax, -0x2c(%rbp)
movb $0x1, -0x2d(%rbp)
jmp 0x808c0
movl -0x2c(%rbp), %eax
orl $0xe300b40, %eax        # imm = 0xE300B40
movl %eax, -0x2c(%rbp)
jmp 0x808c0
movl -0x2c(%rbp), %eax
orl $0xe800a00, %eax        # imm = 0xE800A00
movl %eax, -0x2c(%rbp)
movb $0x1, -0x2d(%rbp)
jmp 0x808c0
movl -0x2c(%rbp), %eax
orl $0xe800b00, %eax        # imm = 0xE800B00
movl %eax, -0x2c(%rbp)
jmp 0x808c0
movq -0x28(%rbp), %rdi
movl $0xf, %esi
leaq 0x2c57f(%rip), %rdx     # 0xace30
movl $0x77f, %ecx            # imm = 0x77F
callq 0x158e0
jmp 0x809e5
movq -0x20(%rbp), %rax
movl (%rax), %eax
shll $0x1c, %eax
orl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
testb $0x1, -0x2d(%rbp)
je 0x80976
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
shrq %rcx
andq $0xf, %rcx
shlq $0x10, %rcx
movl -0x2c(%rbp), %eax
orq %rcx, %rax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
andq $0x1, %rcx
shlq $0x7, %rcx
movl -0x2c(%rbp), %eax
orq %rcx, %rax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rcx
shrq %rcx
andq $0xf, %rcx
movl -0x2c(%rbp), %eax
orq %rcx, %rax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rcx
andq $0x1, %rcx
shlq $0x5, %rcx
movl -0x2c(%rbp), %eax
orq %rcx, %rax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
shrq %rcx
andq $0xf, %rcx
shlq $0xc, %rcx
movl -0x2c(%rbp), %eax
orq %rcx, %rax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
andq $0x1, %rcx
shlq $0x16, %rcx
movl -0x2c(%rbp), %eax
orq %rcx, %rax
movl %eax, -0x2c(%rbp)
jmp 0x809bd
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
andq $0xf, %rcx
shlq $0x10, %rcx
movl -0x2c(%rbp), %eax
orq %rcx, %rax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rcx
andq $0xf, %rcx
movl -0x2c(%rbp), %eax
orq %rcx, %rax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
andq $0xf, %rcx
shlq $0xc, %rcx
movl -0x2c(%rbp), %eax
orq %rcx, %rax
movl %eax, -0x2c(%rbp)
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x81b90
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x809d5
jmp 0x809e5
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x28(%rbp), %rdx
callq 0x81bc0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)