// File: /workspace/github_c_makefile_star2_O3/mmcco[P]sljit/sljit_src/sljitNativeX86_common.c
// Function: sljit_get_local_base
int sljit_get_local_base(struct sljit_compiler *compiler, int dst, long dstw, long offset)
{
	CHECK_ERROR();
	CHECK(check_sljit_get_local_base(compiler, dst, dstw, offset));
	ADJUST_LOCAL_OFFSET(dst, dstw);

	CHECK_EXTRA_REGS(dst, dstw, (void)0);

#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
	compiler->mode32 = 0;
#endif

	ADJUST_LOCAL_OFFSET(SLJIT_MEM1(SLJIT_SP), offset);

#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
	if (NOT_HALFWORD(offset)) {
		FAIL_IF(emit_load_imm64(compiler, TMP_REG1, offset));
#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
		SLJIT_ASSERT(emit_lea_binary(compiler, SLJIT_KEEP_FLAGS, dst, dstw, SLJIT_SP, 0, TMP_REG1, 0) != SLJIT_ERR_UNSUPPORTED);
		return compiler->error;
#else
		return emit_lea_binary(compiler, SLJIT_KEEP_FLAGS, dst, dstw, SLJIT_SP, 0, TMP_REG1, 0);
#endif
	}
#endif

	if (offset != 0)
		return emit_lea_binary(compiler, SLJIT_KEEP_FLAGS, dst, dstw, SLJIT_SP, 0, SLJIT_IMM, offset);
	return emit_mov(compiler, dst, dstw, SLJIT_SP, 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rdi), %ebp
testl %ebp, %ebp
jne 0x1e376
movq %rdi, %rbx
movl 0x48(%rdi), %eax
cmpl $-0x1, %eax
je 0x1e3f2
movq %rdx, %r12
movl 0x4c(%rbx), %edx
cmpl $-0x1, %edx
je 0x1e3f2
movq %rcx, %r15
movl %esi, %r14d
testl %esi, %esi
je 0x1e0a6
setg %cl
cmpl %r14d, %eax
setge %sil
testb %sil, %cl
jne 0x1e0a6
movl $0xc, %ecx
subl %edx, %ecx
cmpl %r14d, %ecx
setge %dl
cmpl $0xd, %r14d
setge %sil
orb %dl, %sil
jne 0x1e122
testq %r12, %r12
jne 0x1e3f2
movq 0x78(%rbx), %rcx
testq %rcx, %rcx
je 0x1e302
leaq 0x55ef(%rip), %rdi      # 0x236b2
movl $0xd, %esi
movl $0x1, %edx
callq 0x2130
testb $0x40, %r14b
jne 0x1e108
testb %r14b, %r14b
js 0x1e149
testl %r14d, %r14d
je 0x1e1f1
movq 0x78(%rbx), %rdi
cmpl %r14d, 0x48(%rbx)
jge 0x1e222
movl $0xc, %edx
subl %r14d, %edx
leaq 0x549f(%rip), %rsi      # 0x235a2
jmp 0x1e22d
movq 0x78(%rbx), %rdi
leaq 0x532e(%rip), %rsi      # 0x23441
movq %r12, %rdx
xorl %eax, %eax
callq 0x20c0
jmp 0x1e2ed
cmpl $0x8d, %r14d
jne 0x1e183
testq %r12, %r12
js 0x1e3f2
movslq 0x80(%rbx), %rax
cmpq %r12, %rax
jg 0x1e0af
jmp 0x1e3f2
movl %r14d, %ebp
movq 0x78(%rbx), %rsi
andl $0x3f, %ebp
je 0x1e210
movl $0x5b, %edi
callq 0x20a0
movq 0x78(%rbx), %rdi
cmpl 0x48(%rbx), %ebp
jle 0x1e239
movl $0xc, %edx
subl %ebp, %edx
leaq 0x5424(%rip), %rsi      # 0x235a2
jmp 0x1e244
testb %r14b, %r14b
jns 0x1e3f2
movl %r14d, %edx
andl $0x3f, %edx
je 0x1e3dc
cmpl %eax, %edx
jle 0x1e1ad
cmpl $0xc, %edx
ja 0x1e3f2
cmpl %ecx, %edx
jle 0x1e3f2
testl $0x3f00, %r14d          # imm = 0x3F00
je 0x1e3e5
movl %r14d, %edx
shrl $0x8, %edx
andl $0x3f, %edx
setne %sil
cmpl %eax, %edx
setle %al
testb %al, %sil
jne 0x1e1e2
cmpl $0xc, %edx
ja 0x1e3f2
cmpl %ecx, %edx
jle 0x1e3f2
cmpq $0x4, %r12
jb 0x1e3e5
jmp 0x1e3f2
movq 0x78(%rbx), %rcx
leaq 0x5262(%rip), %rdi      # 0x2345e
movl $0x6, %esi
movl $0x1, %edx
callq 0x2130
jmp 0x1e2ed
leaq 0x5240(%rip), %rax      # 0x23457
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x1e113
leal -0x1(%r14), %edx
leaq 0x5370(%rip), %rsi      # 0x2359d
xorl %eax, %eax
callq 0x20c0
jmp 0x1e2ed
decl %ebp
leaq 0x535b(%rip), %rsi      # 0x2359d
movl %ebp, %edx
xorl %eax, %eax
callq 0x20c0
testl $0x3f00, %r14d          # imm = 0x3F00
je 0x1e292
movq 0x78(%rbx), %rcx
leaq 0x51e7(%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 0x1e2ae
movl $0xc, %eax
subl %edx, %eax
leaq 0x5314(%rip), %rsi      # 0x235a2
movl %eax, %edx
jmp 0x1e2b7
testq %r12, %r12
je 0x1e2df
movq 0x78(%rbx), %rdi
leaq 0x51ae(%rip), %rsi      # 0x23450
movq %r12, %rdx
xorl %eax, %eax
callq 0x20c0
jmp 0x1e2df
decl %edx
leaq 0x52e6(%rip), %rsi      # 0x2359d
xorl %eax, %eax
callq 0x20c0
testq %r12, %r12
je 0x1e2df
movq 0x78(%rbx), %rdi
movl $0x1, %edx
movl %r12d, %ecx
shll %cl, %edx
leaq 0x5172(%rip), %rsi      # 0x2344a
xorl %eax, %eax
callq 0x20c0
movq 0x78(%rbx), %rsi
movl $0x5d, %edi
callq 0x20a0
movq 0x78(%rbx), %rdi
leaq 0x53c8(%rip), %rsi      # 0x236c0
movq %r15, %rdx
xorl %eax, %eax
callq 0x20c0
leaq 0x8(%r12), %r13
cmpl $0x8d, %r14d
cmovneq %r12, %r13
movl $0x0, 0x70(%rbx)
leaq 0x8(%r15), %rax
addq $-0x7ffffff8, %r15      # imm = 0x80000008
movabsq $-0x100000001, %rcx     # imm = 0xFFFFFFFEFFFFFFFF
cmpq %rcx, %r15
ja 0x1e387
movq %rbx, %rdi
movl $0xe, %esi
movq %rax, %rdx
callq 0x1683c
testl %eax, %eax
jne 0x1e374
movq %rbx, %rdi
movl $0x4000, %esi           # imm = 0x4000
movl %r14d, %edx
movq %r13, %rcx
movl $0xd, %r8d
xorl %r9d, %r9d
pushq $0x0
pushq $0xe
callq 0x192c7
addq $0x10, %rsp
cmpl $0x4, %eax
je 0x1e40a
movl (%rbx), %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %rax, %rax
je 0x1e3b1
movq %rbx, %rdi
movl $0x4000, %esi           # imm = 0x4000
movl %r14d, %edx
movq %r13, %rcx
movl $0xd, %r8d
xorl %r9d, %r9d
pushq %rax
pushq $0x40
callq 0x192c7
addq $0x18, %rsp
jmp 0x1e37c
xorl %ebp, %ebp
testl %r14d, %r14d
je 0x1e376
movq %rbx, %rdi
movl $0x1, %esi
movl $0xd, %edx
xorl %ecx, %ecx
movl %r14d, %r8d
movq %r13, %r9
callq 0x15da2
testq %rax, %rax
je 0x1e374
movb $-0x77, (%rax)
jmp 0x1e376
testl $0x3f00, %r14d          # imm = 0x3F00
jne 0x1e3f2
cmpl $0x4000, %r14d          # imm = 0x4000
jb 0x1e0af
leaq 0x4f46(%rip), %rdi      # 0x2333f
movl $0x593, %esi            # imm = 0x593
xorl %eax, %eax
callq 0x2080
callq 0x2040
leaq 0x4ebe(%rip), %rdi      # 0x232cf
movl $0xb32, %esi            # imm = 0xB32
jmp 0x1e3fe