// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1c31a
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1c628
jmp 0x1c31c
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
callq 0x1c640
cmpl $0x8d, -0x14(%rbp)
jne 0x1c341
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x1c390
cmpq $0x7fffffff, -0x20(%rbp) # imm = 0x7FFFFFFF
jg 0x1c360
cmpq $-0x80000000, -0x20(%rbp) # imm = 0x80000000
jge 0x1c390
jmp 0x1c362
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0xe, %esi
callq 0x1cb30
cmpl $0x0, %eax
je 0x1c387
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1c628
jmp 0x1c389
movl $0xe, -0x14(%rbp)
cmpl $0x3f, -0x14(%rbp)
jg 0x1c4aa
movslq -0x14(%rbp), %rcx
leaq 0x143bb(%rip), %rax     # 0x30760
movzbl (%rax,%rcx), %eax
cmpl $0x8, %eax
jge 0x1c423
movq -0x10(%rbp), %rdi
movl $0x3, %esi
callq 0x1a330
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1c3d5
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1c628
jmp 0x1c3d7
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x2, (%rax)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rcx
addq $0x2, %rcx
movq %rcx, 0x60(%rax)
movslq -0x14(%rbp), %rcx
leaq 0x1437c(%rip), %rax     # 0x30780
movzbl (%rax,%rcx), %eax
addl $0x50, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
jmp 0x1c4a5
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x1a330
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1c44a
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1c628
jmp 0x1c44c
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x3, (%rax)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rcx
addq $0x3, %rcx
movq %rcx, 0x60(%rax)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x41, (%rax)
movslq -0x14(%rbp), %rcx
leaq 0x142f5(%rip), %rax     # 0x30780
movzbl (%rax,%rcx), %eax
addl $0x50, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
jmp 0x1c60f
movl -0x14(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1c56b
movq -0x10(%rbp), %rax
movl $0x1, 0x70(%rax)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %r8d
movq -0x20(%rbp), %r9
movl $0x1, %esi
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x1b8f0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1c4fb
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1c628
jmp 0x1c4fd
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $-0x1, (%rax)
movq -0x28(%rbp), %rax
movzbl (%rax), %ecx
orl $0x30, %ecx
movb %cl, (%rax)
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x1a330
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1c542
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1c628
jmp 0x1c544
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x1, (%rax)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x60(%rax)
jmp 0x1c60d
jmp 0x1c56d
cmpq $0x7fffffff, -0x20(%rbp) # imm = 0x7FFFFFFF
jg 0x1c581
cmpq $-0x80000000, -0x20(%rbp) # imm = 0x80000000
jge 0x1c599
leaq 0x142a0(%rip), %rdi     # 0x30828
movl $0x2a1, %esi            # imm = 0x2A1
movb $0x0, %al
callq 0x2070
callq 0x2040
jmp 0x1c59b
movq -0x10(%rbp), %rdi
movl $0x7, %esi
callq 0x1a330
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1c5bf
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1c628
jmp 0x1c5c1
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x6, (%rax)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rcx
addq $0x6, %rcx
movq %rcx, 0x60(%rax)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x68, (%rax)
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
jmp 0x1c60f
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $-0x3d, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)