// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/sljit_src/sljitNativeX86_common.c
// Function: sljit_emit_fop1
int sljit_emit_fop1(struct sljit_compiler *compiler, int op,
	int dst, long dstw,
	int src, long srcw)
{
	int dst_r;

#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
	compiler->mode32 = 1;
#endif

	CHECK_ERROR();
	SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw);

	if (GET_OPCODE(op) == SLJIT_DMOV) {
		if (FAST_IS_REG(dst))
			return emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, dst, src, srcw);
		if (FAST_IS_REG(src))
			return emit_sse2_store(compiler, op & SLJIT_SINGLE_OP, dst, dstw, src);
		FAIL_IF(emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, TMP_FREG, src, srcw));
		return emit_sse2_store(compiler, op & SLJIT_SINGLE_OP, dst, dstw, TMP_FREG);
	}

	if (GET_OPCODE(op) == SLJIT_CONVD_FROMS) {
		dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG;
		if (FAST_IS_REG(src)) {
			/* We overwrite the high bits of source. From SLJIT point of view,
			   this is not an issue.
			   Note: In SSE3, we could also use MOVDDUP and MOVSLDUP. */
			FAIL_IF(emit_sse2_logic(compiler, UNPCKLPD_x_xm, op & SLJIT_SINGLE_OP, src, src, 0));
		}
		else {
			FAIL_IF(emit_sse2_load(compiler, !(op & SLJIT_SINGLE_OP), TMP_FREG, src, srcw));
			src = TMP_FREG;
		}

		FAIL_IF(emit_sse2_logic(compiler, CVTPD2PS_x_xm, op & SLJIT_SINGLE_OP, dst_r, src, 0));
		if (dst_r == TMP_FREG)
			return emit_sse2_store(compiler, op & SLJIT_SINGLE_OP, dst, dstw, TMP_FREG);
		return SLJIT_SUCCESS;
	}

	if (SLOW_IS_REG(dst)) {
		dst_r = dst;
		if (dst != src)
			FAIL_IF(emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, dst_r, src, srcw));
	}
	else {
		dst_r = TMP_FREG;
		FAIL_IF(emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, dst_r, src, srcw));
	}

	switch (GET_OPCODE(op)) {
	case SLJIT_DNEG:
		FAIL_IF(emit_sse2_logic(compiler, XORPD_x_xm, 1, dst_r, SLJIT_MEM0(), (long)(op & SLJIT_SINGLE_OP ? sse2_buffer : sse2_buffer + 8)));
		break;

	case SLJIT_DABS:
		FAIL_IF(emit_sse2_logic(compiler, ANDPD_x_xm, 1, dst_r, SLJIT_MEM0(), (long)(op & SLJIT_SINGLE_OP ? sse2_buffer + 4 : sse2_buffer + 12)));
		break;
	}

	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 $0x70, %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)
movq -0x10(%rbp), %rax
movl $0x1, 0x70(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x23a80
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x23fea
jmp 0x23a82
jmp 0x23a84
jmp 0x23a86
movl -0x14(%rbp), %eax
andl $0xffff80ff, %eax       # imm = 0xFFFF80FF
cmpl $0x82, %eax
jl 0x23c05
movl -0x14(%rbp), %eax
andl $0xffff80ff, %eax       # imm = 0xFFFF80FF
cmpl $0x86, %eax
jg 0x23c05
movl -0x14(%rbp), %eax
andl $0xffff80ff, %eax       # imm = 0xFFFF80FF
cmpl $0x86, %eax
jne 0x23b23
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
movq -0x30(%rbp), %r9
callq 0x24000
cmpl $0x8d, -0x18(%rbp)
jne 0x23aeb
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
cmpl $0x8d, -0x24(%rbp)
jne 0x23b00
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
movq -0x30(%rbp), %r9
callq 0x24aa0
movl %eax, -0x4(%rbp)
jmp 0x23fea
movl -0x14(%rbp), %eax
andl $0xffff80ff, %eax       # imm = 0xFFFF80FF
orl $0x1, %eax
cmpl $0x83, %eax
jne 0x23b9d
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
movq -0x30(%rbp), %r9
callq 0x24b40
cmpl $0x8d, -0x18(%rbp)
jne 0x23b65
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
cmpl $0x8d, -0x24(%rbp)
jne 0x23b7a
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
movq -0x30(%rbp), %r9
callq 0x25630
movl %eax, -0x4(%rbp)
jmp 0x23fea
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
movq -0x30(%rbp), %r9
callq 0x25740
cmpl $0x8d, -0x18(%rbp)
jne 0x23bcd
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
cmpl $0x8d, -0x24(%rbp)
jne 0x23be2
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
movq -0x30(%rbp), %r9
callq 0x26240
movl %eax, -0x4(%rbp)
jmp 0x23fea
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
movq -0x30(%rbp), %r9
callq 0x263b0
cmpl $0x8d, -0x18(%rbp)
jne 0x23c35
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
cmpl $0x8d, -0x24(%rbp)
jne 0x23c4a
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movl -0x14(%rbp), %eax
andl $0xffff80ff, %eax       # imm = 0xFFFF80FF
cmpl $0x80, %eax
jne 0x23d08
cmpl $0x3f, -0x18(%rbp)
jg 0x23c87
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
andl $0x100, %esi            # imm = 0x100
movl -0x18(%rbp), %edx
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %r8
callq 0x26e90
movl %eax, -0x4(%rbp)
jmp 0x23fea
cmpl $0x3f, -0x24(%rbp)
jg 0x23cb2
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
andl $0x100, %esi            # imm = 0x100
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
callq 0x26ed0
movl %eax, -0x4(%rbp)
jmp 0x23fea
jmp 0x23cb4
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
andl $0x100, %esi            # imm = 0x100
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %r8
xorl %edx, %edx
callq 0x26e90
cmpl $0x0, %eax
je 0x23ce2
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x23fea
jmp 0x23ce4
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 0x23fea
movl -0x14(%rbp), %eax
andl $0xffff80ff, %eax       # imm = 0xFFFF80FF
cmpl $0x81, %eax
jne 0x23e2d
cmpl $0x3f, -0x18(%rbp)
jg 0x23d29
movl -0x18(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x23d30
xorl %eax, %eax
movl %eax, -0x38(%rbp)
jmp 0x23d30
movl -0x38(%rbp), %eax
movl %eax, -0x34(%rbp)
cmpl $0x3f, -0x24(%rbp)
jg 0x23d78
jmp 0x23d3e
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
andl $0x100, %edx            # imm = 0x100
movl -0x24(%rbp), %ecx
movl -0x24(%rbp), %r8d
movl $0x14, %esi
xorl %eax, %eax
movl %eax, %r9d
callq 0x26f10
cmpl $0x0, %eax
je 0x23d74
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x23fea
jmp 0x23d76
jmp 0x23dbd
jmp 0x23d7a
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %esi
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %r8
xorl %edx, %edx
callq 0x26e90
cmpl $0x0, %eax
je 0x23db4
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x23fea
jmp 0x23db6
movl $0x0, -0x24(%rbp)
jmp 0x23dbf
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
andl $0x100, %edx            # imm = 0x100
movl -0x34(%rbp), %ecx
movl -0x24(%rbp), %r8d
movl $0x5a, %esi
xorl %eax, %eax
movl %eax, %r9d
callq 0x26f10
cmpl $0x0, %eax
je 0x23df5
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x23fea
jmp 0x23df7
cmpl $0x0, -0x34(%rbp)
jne 0x23e21
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 0x23fea
movl $0x0, -0x4(%rbp)
jmp 0x23fea
cmpl $0x0, -0x18(%rbp)
jle 0x23e7e
cmpl $0x3f, -0x18(%rbp)
jg 0x23e7e
movl -0x18(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x24(%rbp), %eax
je 0x23e7c
jmp 0x23e49
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
andl $0x100, %esi            # imm = 0x100
movl -0x34(%rbp), %edx
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %r8
callq 0x26e90
cmpl $0x0, %eax
je 0x23e78
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x23fea
jmp 0x23e7a
jmp 0x23e7c
jmp 0x23eb8
movl $0x0, -0x34(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
andl $0x100, %esi            # imm = 0x100
movl -0x34(%rbp), %edx
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %r8
callq 0x26e90
cmpl $0x0, %eax
je 0x23eb4
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x23fea
jmp 0x23eb6
jmp 0x23eb8
movl -0x14(%rbp), %eax
andl $0xffff80ff, %eax       # imm = 0xFFFF80FF
movl %eax, -0x3c(%rbp)
subl $0x87, %eax
je 0x23edb
jmp 0x23ecc
movl -0x3c(%rbp), %eax
subl $0x88, %eax
je 0x23f4b
jmp 0x23fbc
jmp 0x23edd
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x14(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x23f05
movq 0x104b1(%rip), %rax     # 0x343b0
movq %rax, -0x50(%rbp)
jmp 0x23f14
movq 0x104a4(%rip), %rax     # 0x343b0
addq $0x20, %rax
movq %rax, -0x50(%rbp)
movl -0x40(%rbp), %ecx
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %r9
movl $0x57, %esi
movl $0x1, %edx
movl $0x80, %r8d
callq 0x26f10
cmpl $0x0, %eax
je 0x23f47
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x23fea
jmp 0x23f49
jmp 0x23fbc
jmp 0x23f4d
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x14(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x23f79
movq 0x10441(%rip), %rax     # 0x343b0
addq $0x10, %rax
movq %rax, -0x68(%rbp)
jmp 0x23f88
movq 0x10430(%rip), %rax     # 0x343b0
addq $0x30, %rax
movq %rax, -0x68(%rbp)
movl -0x54(%rbp), %ecx
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %r9
movl $0x54, %esi
movl $0x1, %edx
movl $0x80, %r8d
callq 0x26f10
cmpl $0x0, %eax
je 0x23fb8
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x23fea
jmp 0x23fba
jmp 0x23fbc
cmpl $0x0, -0x34(%rbp)
jne 0x23fe3
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 0x23fea
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)