// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/sljit_src/sljitNativeX86_64.c
// Function: emit_mov_int
static int emit_mov_int(struct sljit_compiler *compiler, int sign,
	int dst, long dstw,
	int src, long srcw)
{
	u_char* inst;
	int dst_r;

	compiler->mode32 = 0;

	if (dst == SLJIT_UNUSED && !(src & SLJIT_MEM))
		return SLJIT_SUCCESS; /* Empty instruction. */

	if (src & SLJIT_IMM) {
		if (FAST_IS_REG(dst)) {
			if (sign || ((unsigned long)srcw <= 0x7fffffff)) {
				inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, (long)(int)srcw, dst, dstw);
				FAIL_IF(!inst);
				*inst = MOV_rm_i32;
				return SLJIT_SUCCESS;
			}
			return emit_load_imm64(compiler, dst, srcw);
		}
		compiler->mode32 = 1;
		inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, (long)(int)srcw, dst, dstw);
		FAIL_IF(!inst);
		*inst = MOV_rm_i32;
		compiler->mode32 = 0;
		return SLJIT_SUCCESS;
	}

	dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;

	if ((dst & SLJIT_MEM) && FAST_IS_REG(src))
		dst_r = src;
	else {
		if (sign) {
			inst = emit_x86_instruction(compiler, 1, dst_r, 0, src, srcw);
			FAIL_IF(!inst);
			*inst++ = MOVSXD_r_rm;
		} else {
			compiler->mode32 = 1;
			FAIL_IF(emit_mov(compiler, dst_r, 0, src, srcw));
			compiler->mode32 = 0;
		}
	}

	if (dst & SLJIT_MEM) {
		compiler->mode32 = 1;
		inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw);
		FAIL_IF(!inst);
		*inst = MOV_rm_r;
		compiler->mode32 = 0;
	}

	return SLJIT_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %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 $0x0, 0x70(%rax)
cmpl $0x0, -0x18(%rbp)
jne 0x1ebd8
movl -0x24(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x1ebd8
movl $0x0, -0x4(%rbp)
jmp 0x1ee00
movl -0x24(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x1eccb
cmpl $0x3f, -0x18(%rbp)
jg 0x1ec65
cmpl $0x0, -0x14(%rbp)
jne 0x1ebfd
cmpq $0x7fffffff, -0x30(%rbp) # imm = 0x7FFFFFFF
ja 0x1ec4d
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movslq %eax, %rcx
movl -0x18(%rbp), %r8d
movq -0x20(%rbp), %r9
movl $0x1, %esi
movl $0x40, %edx
callq 0x1b8f0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x1ec38
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1ee00
jmp 0x1ec3a
movq -0x38(%rbp), %rax
movb $-0x39, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x1ee00
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
movq -0x30(%rbp), %rdx
callq 0x1cb30
movl %eax, -0x4(%rbp)
jmp 0x1ee00
movq -0x10(%rbp), %rax
movl $0x1, 0x70(%rax)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movslq %eax, %rcx
movl -0x18(%rbp), %r8d
movq -0x20(%rbp), %r9
movl $0x1, %esi
movl $0x40, %edx
callq 0x1b8f0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x1ecab
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1ee00
jmp 0x1ecad
movq -0x38(%rbp), %rax
movb $-0x39, (%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x70(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x1ee00
cmpl $0x3f, -0x18(%rbp)
jg 0x1ecd9
movl -0x18(%rbp), %eax
movl %eax, -0x40(%rbp)
jmp 0x1ece3
movl $0xe, %eax
movl %eax, -0x40(%rbp)
jmp 0x1ece3
movl -0x40(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x18(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1ed07
cmpl $0x3f, -0x24(%rbp)
jg 0x1ed07
movl -0x24(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x1ed9a
cmpl $0x0, -0x14(%rbp)
je 0x1ed59
movq -0x10(%rbp), %rdi
movl -0x3c(%rbp), %edx
movl -0x24(%rbp), %r8d
movq -0x30(%rbp), %r9
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %ecx
callq 0x1b8f0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x1ed43
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1ee00
jmp 0x1ed45
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb $0x63, (%rax)
jmp 0x1ed98
movq -0x10(%rbp), %rax
movl $0x1, 0x70(%rax)
movq -0x10(%rbp), %rdi
movl -0x3c(%rbp), %esi
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %r8
xorl %eax, %eax
movl %eax, %edx
callq 0x1d0a0
cmpl $0x0, %eax
je 0x1ed8b
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1ee00
jmp 0x1ed8d
movq -0x10(%rbp), %rax
movl $0x0, 0x70(%rax)
jmp 0x1ed9a
movl -0x18(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1edf9
movq -0x10(%rbp), %rax
movl $0x1, 0x70(%rax)
movq -0x10(%rbp), %rdi
movl -0x3c(%rbp), %edx
movl -0x18(%rbp), %r8d
movq -0x20(%rbp), %r9
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %ecx
callq 0x1b8f0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x1ede5
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1ee00
jmp 0x1ede7
movq -0x38(%rbp), %rax
movb $-0x77, (%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x70(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)