// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/arch/arm32/assembler.c
// Function: prv_get_fpa_op2
static bool prv_get_fpa_op2(subtilis_arm_ass_context_t *c,
			    subtilis_fpa_op2_t *op2, subtilis_error_t *err)
{
	subtilis_arm_exp_val_t *val;
	bool immediate = false;

	val = subtilis_arm_exp_val_get(c, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	switch (val->type) {
	case SUBTILIS_ARM_EXP_TYPE_FREG:
		op2->reg = val->val.reg;
		break;
	case SUBTILIS_ARM_EXP_TYPE_INT:
		if (!subtilis_fpa_encode_real((double)val->val.integer,
					      &op2->imm)) {
			subtilis_error_set_ass_bad_real_imm(
			    err, (double)val->val.integer, c->l->stream->name,
			    c->l->line);
			goto cleanup;
		}
		immediate = true;
		break;
	case SUBTILIS_ARM_EXP_TYPE_REAL:
		if (!subtilis_fpa_encode_real(val->val.real, &op2->imm)) {
			subtilis_error_set_ass_bad_real_imm(
			    err, val->val.real, c->l->stream->name, c->l->line);
			goto cleanup;
		}
		immediate = true;
		break;
	default:
		subtilis_error_set_expected(
		    err, "floating point register or immediate",
		    subtilis_arm_exp_type_name(val), c->l->stream->name,
		    c->l->line);
		goto cleanup;
	}

cleanup:

	subtilis_arm_exp_val_free(val);

	return immediate;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x21(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9b4f0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x94527
jmp 0x94677
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
testl %eax, %eax
je 0x9454d
jmp 0x94536
movl -0x28(%rbp), %eax
subl $0x6, %eax
je 0x94561
jmp 0x94540
movl -0x28(%rbp), %eax
subl $0x7, %eax
je 0x945c3
jmp 0x9461f
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x94675
movq -0x20(%rbp), %rax
cvtsi2sdl 0x8(%rax), %xmm0
movq -0x10(%rbp), %rdi
callq 0x87130
testb $0x1, %al
jne 0x945ba
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
cvtsi2sdl 0x8(%rax), %xmm0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %rdx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x38(%rax), %ecx
movl $0x63, %esi
xorps %xmm1, %xmm1
leaq 0x19b76(%rip), %r8      # 0xae120
movl $0x848, %r9d            # imm = 0x848
callq 0x15840
jmp 0x94677
movb $0x1, -0x21(%rbp)
jmp 0x94675
movq -0x20(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x10(%rbp), %rdi
callq 0x87130
testb $0x1, %al
jne 0x94619
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %rdx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x38(%rax), %ecx
movl $0x63, %esi
xorps %xmm1, %xmm1
leaq 0x19b14(%rip), %r8      # 0xae120
movl $0x850, %r9d            # imm = 0x850
callq 0x15840
jmp 0x94677
movb $0x1, -0x21(%rbp)
jmp 0x94675
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x9b550
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %r8
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x38(%rax), %r9d
movl $0x1d, %esi
leaq 0x19b30(%rip), %rdx     # 0xae18b
leaq 0x19abe(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x859, 0x8(%rsp)       # imm = 0x859
callq 0x156d0
jmp 0x94677
jmp 0x94677
movq -0x20(%rbp), %rdi
callq 0x9a4c0
movb -0x21(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)