// File: /workspace/github_c_makefile_star2_O3/mmcco[P]sljit/sljit_src/sljitNativeX86_64.c
// Function: sljit_emit_fast_return
int sljit_emit_fast_return(struct sljit_compiler *compiler, int src, long srcw)
{
	u_char *inst;

	CHECK_ERROR();
	CHECK(check_sljit_emit_fast_return(compiler, src, srcw));
	ADJUST_LOCAL_OFFSET(src, srcw);

	if ((src & SLJIT_IMM) && NOT_HALFWORD(srcw)) {
		FAIL_IF(emit_load_imm64(compiler, TMP_REG1, srcw));
		src = TMP_REG1;
	}

	if (FAST_IS_REG(src)) {
		if (reg_map[src] < 8) {
			inst = ensure_buf(compiler, 1 + 1 + 1);
			FAIL_IF(!inst);

			INC_SIZE(1 + 1);
			PUSH_REG(reg_lmap[src]);
		}
		else {
			inst = ensure_buf(compiler, 1 + 2 + 1);
			FAIL_IF(!inst);

			INC_SIZE(2 + 1);
			*inst++ = REX_B;
			PUSH_REG(reg_lmap[src]);
		}
	}
	else if (src & SLJIT_MEM) {
		/* REX_W is not necessary (src is not immediate). */
		compiler->mode32 = 1;
		inst = emit_x86_instruction(compiler, 1, 0, 0, src, srcw);
		FAIL_IF(!inst);
		*inst++ = GROUP_FF;
		*inst |= PUSH_rm;

		inst = ensure_buf(compiler, 1 + 1);
		FAIL_IF(!inst);
		INC_SIZE(1);
	}
	else {
		SLJIT_ASSERT(IS_HALFWORD(srcw));
		/* SLJIT_IMM. */
		inst = ensure_buf(compiler, 1 + 5 + 1);
		FAIL_IF(!inst);

		INC_SIZE(5 + 1);
		*inst++ = PUSH_i32;
		*(int*)inst = srcw;
		inst += sizeof(int);
	}

	RET();
	return SLJIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rdi), %eax
testl %eax, %eax
jne 0x1681c
movq %rdi, %rbx
movl 0x48(%rdi), %eax
cmpl $-0x1, %eax
je 0x16652
movq %rdx, %r15
movl 0x4c(%rbx), %edx
cmpl $-0x1, %edx
je 0x16652
movl %esi, %r14d
testl %esi, %esi
setg %cl
cmpl %esi, %eax
setge %sil
testb %sil, %cl
jne 0x1641b
movl $0xc, %ecx
subl %edx, %ecx
cmpl %r14d, %ecx
setge %dl
cmpl $0xd, %r14d
setge %sil
orb %dl, %sil
jne 0x164a6
testq %r15, %r15
jne 0x16652
movq 0x78(%rbx), %rcx
testq %rcx, %rcx
je 0x16480
leaq 0xd0bb(%rip), %rdi      # 0x234ef
movl $0xe, %esi
movl $0x1, %edx
callq 0x2130
movl %r14d, %r13d
andl $0x40, %r13d
jne 0x1648c
testb %r14b, %r14b
js 0x164d7
testl %r14d, %r14d
je 0x1657f
movq 0x78(%rbx), %rdi
cmpl %r14d, 0x48(%rbx)
jge 0x165b0
movl $0xc, %edx
subl %r14d, %edx
leaq 0xd127(%rip), %rsi      # 0x235a2
jmp 0x165bb
movl %r14d, %r13d
andl $0x40, %r13d
jmp 0x166b7
movq 0x78(%rbx), %rdi
leaq 0xcfaa(%rip), %rsi      # 0x23441
movq %r15, %rdx
xorl %eax, %eax
callq 0x20c0
jmp 0x166a9
cmpl $0x40, %r14d
je 0x16424
cmpl $0x8d, %r14d
jne 0x16511
testq %r15, %r15
js 0x16652
movslq 0x80(%rbx), %rax
cmpq %r15, %rax
jg 0x16424
jmp 0x16652
movl %r14d, %ebp
movq 0x78(%rbx), %rsi
andl $0x3f, %ebp
je 0x1659e
movl $0x5b, %edi
callq 0x20a0
movq 0x78(%rbx), %rdi
cmpl 0x48(%rbx), %ebp
jle 0x165c7
movl $0xc, %edx
subl %ebp, %edx
leaq 0xd096(%rip), %rsi      # 0x235a2
jmp 0x165d2
testb %r14b, %r14b
jns 0x16652
movl %r14d, %edx
andl $0x3f, %edx
je 0x1663c
cmpl %eax, %edx
jle 0x1653b
cmpl $0xc, %edx
ja 0x16652
cmpl %ecx, %edx
jle 0x16652
testl $0x3f00, %r14d          # imm = 0x3F00
je 0x16645
movl %r14d, %edx
shrl $0x8, %edx
andl $0x3f, %edx
setne %sil
cmpl %eax, %edx
setle %al
testb %al, %sil
jne 0x16570
cmpl $0xc, %edx
ja 0x16652
cmpl %ecx, %edx
jle 0x16652
cmpq $0x4, %r15
jb 0x16645
jmp 0x16652
movq 0x78(%rbx), %rcx
leaq 0xced4(%rip), %rdi      # 0x2345e
movl $0x6, %esi
movl $0x1, %edx
callq 0x2130
jmp 0x166a9
leaq 0xceb2(%rip), %rax      # 0x23457
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x16497
leal -0x1(%r14), %edx
leaq 0xcfe2(%rip), %rsi      # 0x2359d
xorl %eax, %eax
callq 0x20c0
jmp 0x166a9
decl %ebp
leaq 0xcfcd(%rip), %rsi      # 0x2359d
movl %ebp, %edx
xorl %eax, %eax
callq 0x20c0
testl $0x3f00, %r14d          # imm = 0x3F00
je 0x16620
movq 0x78(%rbx), %rcx
leaq 0xce59(%rip), %rdi      # 0x23446
movl $0x3, %esi
movl $0x1, %edx
callq 0x2130
movl %r14d, %edx
shrl $0x8, %edx
andl $0x3f, %edx
movq 0x78(%rbx), %rdi
cmpl 0x48(%rbx), %edx
jle 0x1666a
movl $0xc, %eax
subl %edx, %eax
leaq 0xcf86(%rip), %rsi      # 0x235a2
movl %eax, %edx
jmp 0x16673
testq %r15, %r15
je 0x1669b
movq 0x78(%rbx), %rdi
leaq 0xce20(%rip), %rsi      # 0x23450
movq %r15, %rdx
xorl %eax, %eax
callq 0x20c0
jmp 0x1669b
testl $0x3f00, %r14d          # imm = 0x3F00
jne 0x16652
cmpl $0x4000, %r14d          # imm = 0x4000
jb 0x16424
leaq 0xcce6(%rip), %rdi      # 0x2333f
movl $0x3e9, %esi            # imm = 0x3E9
xorl %eax, %eax
callq 0x2080
callq 0x2040
decl %edx
leaq 0xcf2a(%rip), %rsi      # 0x2359d
xorl %eax, %eax
callq 0x20c0
testq %r15, %r15
je 0x1669b
movq 0x78(%rbx), %rdi
movl $0x1, %edx
movl %r15d, %ecx
shll %cl, %edx
leaq 0xcdb6(%rip), %rsi      # 0x2344a
xorl %eax, %eax
callq 0x20c0
movq 0x78(%rbx), %rsi
movl $0x5d, %edi
callq 0x20a0
movq 0x78(%rbx), %rsi
movl $0xa, %edi
callq 0x20a0
leaq 0x8(%r15), %r12
cmpl $0x8d, %r14d
cmovneq %r15, %r12
testl %r13d, %r13d
sete %al
movslq %r12d, %rcx
cmpq %r12, %rcx
sete %cl
orb %al, %cl
jne 0x166f9
movl $0xe, %r14d
movq %rbx, %rdi
movl $0xe, %esi
movq %r12, %rdx
callq 0x1683c
testl %eax, %eax
jne 0x1681a
jmp 0x166ff
cmpl $0x3f, %r14d
jg 0x16753
movslq %r14d, %r14
movl $0xf10f, %eax           # imm = 0xF10F
btq %r14, %rax
jb 0x16793
movl $0x4, %esi
movq %rbx, %rdi
callq 0x15218
testq %rax, %rax
je 0x1681a
movq %rax, %rcx
movb $0x3, (%rax)
addq $0x3, 0x60(%rbx)
movb $0x41, 0x1(%rax)
leaq 0xcab3(%rip), %rax      # 0x231f0
movb (%r14,%rax), %dl
addb $0x50, %dl
movq %rcx, %rax
addq $0x3, %rax
movb %dl, 0x2(%rcx)
jmp 0x16813
testb %r14b, %r14b
js 0x167ca
movslq %r12d, %rax
cmpq %r12, %rax
jne 0x1682b
movl $0x7, %esi
movq %rbx, %rdi
callq 0x15218
testq %rax, %rax
je 0x1681a
movb $0x6, (%rax)
addq $0x6, 0x60(%rbx)
movb $0x68, 0x1(%rax)
movl %r12d, 0x2(%rax)
addq $0x6, %rax
jmp 0x16813
movl $0x3, %esi
movq %rbx, %rdi
callq 0x15218
testq %rax, %rax
je 0x1681a
movq %rax, %rcx
movb $0x2, (%rax)
addq $0x2, 0x60(%rbx)
leaq 0xca39(%rip), %rax      # 0x231f0
movb (%r14,%rax), %dl
addb $0x50, %dl
movq %rcx, %rax
addq $0x2, %rax
movb %dl, 0x1(%rcx)
jmp 0x16813
movl $0x1, 0x70(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl %r14d, %r8d
movq %r12, %r9
callq 0x15da2
testq %rax, %rax
je 0x1681a
movb $-0x1, (%rax)
orb $0x30, 0x1(%rax)
movl $0x2, %esi
movq %rbx, %rdi
callq 0x15218
testq %rax, %rax
je 0x1681a
movq %rax, %rcx
incq %rax
movb $0x1, (%rcx)
incq 0x60(%rbx)
movb $-0x3d, (%rax)
xorl %eax, %eax
jmp 0x1681c
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xcad7(%rip), %rdi      # 0x23309
movl $0x2a1, %esi            # imm = 0x2A1
jmp 0x1665e