// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/sljit_src/sljitNativeX86_common.c
// Function: sljit_emit_fop1_convd_fromw
static __inline int sljit_emit_fop1_convd_fromw(struct sljit_compiler *compiler, int op,
	int dst, long dstw,
	int src, long srcw)
{
	int dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG;
	u_char *inst;

#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
	if (GET_OPCODE(op) == SLJIT_CONVD_FROMW)
		compiler->mode32 = 0;
#endif

	if (src & SLJIT_IMM) {
#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
		if (GET_OPCODE(op) == SLJIT_CONVD_FROMI)
			srcw = (int)srcw;
#endif
		EMIT_MOV(compiler, TMP_REG1, 0, src, srcw);
		src = TMP_REG1;
		srcw = 0;
	}

	inst = emit_x86_instruction(compiler, 2 | ((op & SLJIT_SINGLE_OP) ? EX86_PREF_F3 : EX86_PREF_F2) | EX86_SSE2_OP1, dst_r, 0, src, srcw);
	FAIL_IF(!inst);
	*inst++ = GROUP_0F;
	*inst = CVTSI2SD_x_rm;

#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
	compiler->mode32 = 1;
#endif
	if (dst_r == TMP_FREG)
		return emit_sse2_store(compiler, op & SLJIT_SINGLE_OP, dst, dstw, TMP_FREG);
	return SLJIT_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
cmpl $0x3f, -0x18(%rbp)
jg 0x2626c
movl -0x18(%rbp), %eax
movl %eax, -0x44(%rbp)
jmp 0x26273
xorl %eax, %eax
movl %eax, -0x44(%rbp)
jmp 0x26273
movl -0x44(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x14(%rbp), %eax
andl $0xffff80ff, %eax       # imm = 0xFFFF80FF
cmpl $0x84, %eax
jne 0x26293
movq -0x10(%rbp), %rax
movl $0x0, 0x70(%rax)
movl -0x24(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x262f6
movl -0x14(%rbp), %eax
andl $0xffff80ff, %eax       # imm = 0xFFFF80FF
cmpl $0x85, %eax
jne 0x262b7
movq -0x30(%rbp), %rax
cltq
movq %rax, -0x30(%rbp)
jmp 0x262b9
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %r8
movl $0xe, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x1d0a0
cmpl $0x0, %eax
je 0x262e5
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x2639a
jmp 0x262e7
movl $0xe, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %ecx
andl $0x100, %ecx            # imm = 0x100
movl $0x800, %esi            # imm = 0x800
movl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %ecx
cmovnel %eax, %esi
orl $0x2, %esi
orl $0x2000, %esi           # imm = 0x2000
movl -0x34(%rbp), %edx
movl -0x24(%rbp), %r8d
movq -0x30(%rbp), %r9
xorl %eax, %eax
movl %eax, %ecx
callq 0x1b8f0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x26346
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x2639a
jmp 0x26348
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movb $0xf, (%rax)
movq -0x40(%rbp), %rax
movb $0x2a, (%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x70(%rax)
cmpl $0x0, -0x34(%rbp)
jne 0x26393
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
andl $0x100, %esi            # imm = 0x100
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
xorl %r8d, %r8d
callq 0x26ed0
movl %eax, -0x4(%rbp)
jmp 0x2639a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)