// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
movl (%rdi), %eax
testl %eax, %eax
jne 0x16818
movq %rdi, %rbx
movl 0x48(%rdi), %eax
cmpl $-0x1, %eax
je 0x16593
movq %rdx, %r15
movl 0x4c(%rbx), %edx
cmpl $-0x1, %edx
je 0x16593
movl %esi, %r14d
testl %esi, %esi
setg %cl
cmpl %esi, %eax
setge %sil
testb %sil, %cl
jne 0x1644d
movl $0xc, %ecx
subl %edx, %ecx
cmpl %r14d, %ecx
setge %dl
cmpl $0xd, %r14d
setge %sil
orb %dl, %sil
jne 0x164c9
testq %r15, %r15
jne 0x16593
movq 0x78(%rbx), %rcx
testq %rcx, %rcx
je 0x166b5
leaq 0xcfb5(%rip), %rdi      # 0x2341f
movl $0xe, %esi
movl $0x1, %edx
callq 0x2120
testb $0x40, %r14b
jne 0x164af
testb %r14b, %r14b
js 0x164f6
testl %r14d, %r14d
je 0x165ab
movq 0x78(%rbx), %rdi
cmpl %r14d, 0x48(%rbx)
jge 0x165dc
movl $0xc, %edx
subl %r14d, %edx
leaq 0xd028(%rip), %rsi      # 0x234d2
jmp 0x165e7
movq 0x78(%rbx), %rdi
leaq 0xceb7(%rip), %rsi      # 0x23371
movq %r15, %rdx
xorl %eax, %eax
callq 0x20b0
jmp 0x166a7
cmpl $0x40, %r14d
je 0x16456
cmpl $0x8d, %r14d
jne 0x16530
testq %r15, %r15
js 0x16593
movslq 0x80(%rbx), %rax
cmpq %r15, %rax
jg 0x16456
jmp 0x16593
movl %r14d, %ebp
movq 0x78(%rbx), %rsi
andl $0x3f, %ebp
je 0x165ca
movl $0x5b, %edi
callq 0x20a0
movq 0x78(%rbx), %rdi
cmpl 0x48(%rbx), %ebp
jle 0x165f3
movl $0xc, %edx
subl %ebp, %edx
leaq 0xcfa7(%rip), %rsi      # 0x234d2
jmp 0x165fe
testb %r14b, %r14b
jns 0x16593
movl %r14d, %edx
andl $0x3f, %edx
sete %sil
cmpl %eax, %edx
setle %dil
orb %sil, %dil
jne 0x16553
cmpl $0xc, %edx
ja 0x16593
cmpl %ecx, %edx
jle 0x16593
testl $0x3f00, %r14d          # imm = 0x3F00
je 0x16586
testl %edx, %edx
je 0x16593
movl %r14d, %edx
shrl $0x8, %edx
andl $0x3f, %edx
setne %sil
cmpl %eax, %edx
setle %al
testb %al, %sil
jne 0x16580
cmpl $0xc, %edx
ja 0x16593
cmpl %ecx, %edx
jle 0x16593
cmpq $0x4, %r15
jae 0x16593
cmpl $0x4000, %r14d          # imm = 0x4000
jb 0x16456
leaq 0xccd5(%rip), %rdi      # 0x2326f
movl $0x3e9, %esi            # imm = 0x3E9
xorl %eax, %eax
callq 0x2080
callq 0x2040
movq 0x78(%rbx), %rcx
leaq 0xcdd8(%rip), %rdi      # 0x2338e
movl $0x6, %esi
movl $0x1, %edx
callq 0x2120
jmp 0x166a7
leaq 0xcdb6(%rip), %rax      # 0x23387
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x164ba
leal -0x1(%r14), %edx
leaq 0xcee6(%rip), %rsi      # 0x234cd
xorl %eax, %eax
callq 0x20b0
jmp 0x166a7
decl %ebp
leaq 0xced1(%rip), %rsi      # 0x234cd
movl %ebp, %edx
xorl %eax, %eax
callq 0x20b0
testl $0x3f00, %r14d          # imm = 0x3F00
je 0x1664c
movq 0x78(%rbx), %rcx
leaq 0xcd5d(%rip), %rdi      # 0x23376
movl $0x3, %esi
movl $0x1, %edx
callq 0x2120
movl %r14d, %edx
shrl $0x8, %edx
andl $0x3f, %edx
movq 0x78(%rbx), %rdi
cmpl 0x48(%rbx), %edx
jle 0x16668
movl $0xc, %eax
subl %edx, %eax
leaq 0xce8a(%rip), %rsi      # 0x234d2
movl %eax, %edx
jmp 0x16671
testq %r15, %r15
je 0x16699
movq 0x78(%rbx), %rdi
leaq 0xcd24(%rip), %rsi      # 0x23380
movq %r15, %rdx
xorl %eax, %eax
callq 0x20b0
jmp 0x16699
decl %edx
leaq 0xce5c(%rip), %rsi      # 0x234cd
xorl %eax, %eax
callq 0x20b0
testq %r15, %r15
je 0x16699
movq 0x78(%rbx), %rdi
movl $0x1, %edx
movl %r15d, %ecx
shll %cl, %edx
leaq 0xcce8(%rip), %rsi      # 0x2337a
xorl %eax, %eax
callq 0x20b0
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
testb $0x40, %r14b
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 0x16832
testl %eax, %eax
je 0x166f9
movl (%rbx), %eax
jmp 0x16818
cmpl $0x3f, %r14d
jg 0x1674b
movslq %r14d, %r15
movl $0xf10f, %eax           # imm = 0xF10F
btq %r14, %rax
jb 0x16787
movl $0x4, %esi
movq %rbx, %rdi
callq 0x152be
testq %rax, %rax
je 0x166f2
movq %rax, %rcx
movb $0x3, (%rax)
addq $0x3, 0x60(%rbx)
movb $0x41, 0x1(%rax)
leaq 0xc9eb(%rip), %rax      # 0x23120
movb (%r15,%rax), %dl
addb $0x50, %dl
movq %rcx, %rax
addq $0x3, %rax
movb %dl, 0x2(%rcx)
jmp 0x16813
testb %r14b, %r14b
js 0x167c2
movslq %r12d, %rax
cmpq %r12, %rax
jne 0x16821
movl $0x7, %esi
movq %rbx, %rdi
callq 0x152be
testq %rax, %rax
je 0x166f2
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 0x152be
testq %rax, %rax
je 0x166f2
movq %rax, %rcx
movb $0x2, (%rax)
addq $0x2, 0x60(%rbx)
leaq 0xc971(%rip), %rax      # 0x23120
movb (%r15,%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 0x15e07
testq %rax, %rax
je 0x166f2
movb $-0x1, (%rax)
orb $0x30, 0x1(%rax)
movl $0x2, %esi
movq %rbx, %rdi
callq 0x152be
testq %rax, %rax
je 0x166f2
movq %rax, %rcx
incq %rax
movb $0x1, (%rcx)
incq 0x60(%rbx)
movb $-0x3d, (%rax)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xca11(%rip), %rdi      # 0x23239
movl $0x2a1, %esi            # imm = 0x2A1
jmp 0x1659f