// File: /workspace/github_c_makefile_star2_O2/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 0x14a81
movq %rdi, %rbx
movl 0x48(%rdi), %eax
cmpl $-0x1, %eax
je 0x148d2
movq %rdx, %r15
movl 0x4c(%rbx), %edx
cmpl $-0x1, %edx
je 0x148d2
movl %esi, %r14d
testl %esi, %esi
setg %cl
cmpl %esi, %eax
setge %sil
pushq $0xc
popq %rbp
testb %sil, %cl
jne 0x146ba
movl %ebp, %ecx
subl %edx, %ecx
cmpl %r14d, %ecx
setge %dl
cmpl $0xd, %r14d
setge %sil
orb %dl, %sil
jne 0x1473a
testq %r15, %r15
jne 0x148d2
movq 0x78(%rbx), %rcx
testq %rcx, %rcx
je 0x14714
leaq 0xcddc(%rip), %rdi      # 0x214af
pushq $0xe
popq %rsi
pushq $0x1
popq %rdx
callq 0x2130
movl %r14d, %r13d
andl $0x40, %r13d
jne 0x14720
testb %r14b, %r14b
js 0x14767
testl %r14d, %r14d
je 0x1480c
movq 0x78(%rbx), %rdi
cmpl %r14d, 0x48(%rbx)
jge 0x14839
subl %r14d, %ebp
leaq 0xce55(%rip), %rsi      # 0x21562
movl %ebp, %edx
jmp 0x14844
movl %r14d, %r13d
andl $0x40, %r13d
jmp 0x14931
movq 0x78(%rbx), %rdi
leaq 0xccd6(%rip), %rsi      # 0x21401
movq %r15, %rdx
xorl %eax, %eax
callq 0x20c0
jmp 0x14925
cmpl $0x40, %r14d
je 0x146c3
cmpl $0x8d, %r14d
jne 0x1479f
testq %r15, %r15
js 0x148d2
movslq 0x80(%rbx), %rax
cmpq %r15, %rax
jg 0x146c3
jmp 0x148d2
movl %r14d, %r12d
movq 0x78(%rbx), %rsi
andl $0x3f, %r12d
je 0x14827
pushq $0x5b
popq %rdi
callq 0x20a0
movq 0x78(%rbx), %rdi
cmpl 0x48(%rbx), %r12d
jle 0x14850
movl %ebp, %edx
subl %r12d, %edx
leaq 0xcdc8(%rip), %rsi      # 0x21562
jmp 0x1485d
testb %r14b, %r14b
jns 0x148d2
movl %r14d, %edx
andl $0x3f, %edx
je 0x148bd
cmpl %eax, %edx
jle 0x147c9
cmpl $0xc, %edx
ja 0x148d2
cmpl %ecx, %edx
jle 0x148d2
testw $0x3f00, %r14w          # imm = 0x3F00
je 0x148c5
movl %r14d, %edx
shrl $0x8, %edx
andl $0x3f, %edx
setne %sil
cmpl %eax, %edx
setle %al
testb %al, %sil
jne 0x147fd
cmpl $0xc, %edx
ja 0x148d2
cmpl %ecx, %edx
jle 0x148d2
cmpq $0x4, %r15
jb 0x148c5
jmp 0x148d2
movq 0x78(%rbx), %rcx
leaq 0xcc07(%rip), %rdi      # 0x2141e
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
callq 0x2130
jmp 0x14925
leaq 0xcbe9(%rip), %rax      # 0x21417
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x1472b
leal -0x1(%r14), %edx
leaq 0xcd19(%rip), %rsi      # 0x2155d
xorl %eax, %eax
callq 0x20c0
jmp 0x14925
decl %r12d
leaq 0xcd03(%rip), %rsi      # 0x2155d
movl %r12d, %edx
xorl %eax, %eax
callq 0x20c0
testw $0x3f00, %r14w          # imm = 0x3F00
je 0x148a1
movq 0x78(%rbx), %rcx
leaq 0xcb8f(%rip), %rdi      # 0x21406
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
callq 0x2130
movl %r14d, %edx
shrl $0x8, %edx
andl $0x3f, %edx
movq 0x78(%rbx), %rdi
cmpl 0x48(%rbx), %edx
jle 0x148ea
subl %edx, %ebp
leaq 0xccc5(%rip), %rsi      # 0x21562
movl %ebp, %edx
jmp 0x148f3
testq %r15, %r15
je 0x14919
movq 0x78(%rbx), %rdi
leaq 0xcb5f(%rip), %rsi      # 0x21410
movq %r15, %rdx
xorl %eax, %eax
callq 0x20c0
jmp 0x14919
testw $0x3f00, %r14w          # imm = 0x3F00
jne 0x148d2
cmpl $0x4000, %r14d          # imm = 0x4000
jb 0x146c3
leaq 0xca26(%rip), %rdi      # 0x212ff
movl $0x3e9, %esi            # imm = 0x3E9
xorl %eax, %eax
callq 0x2080
callq 0x2040
decl %edx
leaq 0xcc6a(%rip), %rsi      # 0x2155d
xorl %eax, %eax
callq 0x20c0
testq %r15, %r15
je 0x14919
movq 0x78(%rbx), %rdi
pushq $0x1
popq %rdx
movl %r15d, %ecx
shll %cl, %edx
leaq 0xcaf8(%rip), %rsi      # 0x2140a
xorl %eax, %eax
callq 0x20c0
movq 0x78(%rbx), %rsi
pushq $0x5d
popq %rdi
callq 0x20a0
movq 0x78(%rbx), %rsi
pushq $0xa
popq %rdi
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 0x1496f
pushq $0xe
popq %r14
movq %rbx, %rdi
movl %r14d, %esi
movq %r12, %rdx
callq 0x14aa1
testl %eax, %eax
jne 0x14a7f
jmp 0x14975
cmpl $0x3f, %r14d
jg 0x149c3
movslq %r14d, %r14
movl $0xf10f, %eax           # imm = 0xF10F
btq %r14, %rax
jb 0x149fe
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x1354f
testq %rax, %rax
je 0x14a7f
movq %rax, %rcx
movb $0x3, (%rax)
addq $0x3, 0x60(%rbx)
movb $0x41, 0x1(%rax)
leaq 0xc803(%rip), %rax      # 0x211b0
movb (%r14,%rax), %dl
addb $0x50, %dl
movq %rcx, %rax
addq $0x3, %rax
movb %dl, 0x2(%rcx)
jmp 0x14a78
testb %r14b, %r14b
js 0x14a33
movslq %r12d, %rax
cmpq %r12, %rax
jne 0x14a90
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x1354f
testq %rax, %rax
je 0x14a7f
movb $0x6, (%rax)
addq $0x6, 0x60(%rbx)
movb $0x68, 0x1(%rax)
movl %r12d, 0x2(%rax)
addq $0x6, %rax
jmp 0x14a78
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x1354f
testq %rax, %rax
je 0x14a7f
movq %rax, %rcx
movb $0x2, (%rax)
addq $0x2, 0x60(%rbx)
leaq 0xc790(%rip), %rax      # 0x211b0
movb (%r14,%rax), %dl
addb $0x50, %dl
movq %rcx, %rax
addq $0x2, %rax
movb %dl, 0x1(%rcx)
jmp 0x14a78
movl $0x1, 0x70(%rbx)
pushq $0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movl %r14d, %r8d
movq %r12, %r9
callq 0x14061
testq %rax, %rax
je 0x14a7f
movb $-0x1, (%rax)
orb $0x30, 0x1(%rax)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x1354f
testq %rax, %rax
je 0x14a7f
movq %rax, %rcx
incq %rax
movb $0x1, (%rcx)
incq 0x60(%rbx)
movb $-0x3d, (%rax)
xorl %eax, %eax
jmp 0x14a81
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc832(%rip), %rdi      # 0x212c9
movl $0x2a1, %esi            # imm = 0x2A1
jmp 0x148de