// File: /workspace/github_c_makefile_star2_O1/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 0x1dec6
movq %rdi, %rbx
movl 0x48(%rdi), %eax
cmpl $-0x1, %eax
je 0x1dd2d
movq %rdx, %r12
movl 0x4c(%rbx), %edx
cmpl $-0x1, %edx
je 0x1dd2d
movq %rcx, %r15
movl %esi, %r14d
testl %esi, %esi
je 0x1dbed
setg %cl
cmpl %r14d, %eax
setge %sil
testb %sil, %cl
jne 0x1dbed
movl $0xc, %ecx
subl %edx, %ecx
cmpl %r14d, %ecx
setge %dl
cmpl $0xd, %r14d
setge %sil
orb %dl, %sil
jne 0x1dc69
testq %r12, %r12
jne 0x1dd2d
movq 0x78(%rbx), %rcx
testq %rcx, %rcx
je 0x1de56
leaq 0x59d8(%rip), %rdi      # 0x235e2
movl $0xd, %esi
movl $0x1, %edx
callq 0x2120
testb $0x40, %r14b
jne 0x1dc4f
testb %r14b, %r14b
js 0x1dc90
testl %r14d, %r14d
je 0x1dd45
movq 0x78(%rbx), %rdi
cmpl %r14d, 0x48(%rbx)
jge 0x1dd76
movl $0xc, %edx
subl %r14d, %edx
leaq 0x5888(%rip), %rsi      # 0x234d2
jmp 0x1dd81
movq 0x78(%rbx), %rdi
leaq 0x5717(%rip), %rsi      # 0x23371
movq %r12, %rdx
xorl %eax, %eax
callq 0x20b0
jmp 0x1de41
cmpl $0x8d, %r14d
jne 0x1dcca
testq %r12, %r12
js 0x1dd2d
movslq 0x80(%rbx), %rax
cmpq %r12, %rax
jg 0x1dbf6
jmp 0x1dd2d
movl %r14d, %ebp
movq 0x78(%rbx), %rsi
andl $0x3f, %ebp
je 0x1dd64
movl $0x5b, %edi
callq 0x20a0
movq 0x78(%rbx), %rdi
cmpl 0x48(%rbx), %ebp
jle 0x1dd8d
movl $0xc, %edx
subl %ebp, %edx
leaq 0x580d(%rip), %rsi      # 0x234d2
jmp 0x1dd98
testb %r14b, %r14b
jns 0x1dd2d
movl %r14d, %edx
andl $0x3f, %edx
sete %sil
cmpl %eax, %edx
setle %dil
orb %sil, %dil
jne 0x1dced
cmpl $0xc, %edx
ja 0x1dd2d
cmpl %ecx, %edx
jle 0x1dd2d
testl $0x3f00, %r14d          # imm = 0x3F00
je 0x1dd20
testl %edx, %edx
je 0x1dd2d
movl %r14d, %edx
shrl $0x8, %edx
andl $0x3f, %edx
setne %sil
cmpl %eax, %edx
setle %al
testb %al, %sil
jne 0x1dd1a
cmpl $0xc, %edx
ja 0x1dd2d
cmpl %ecx, %edx
jle 0x1dd2d
cmpq $0x4, %r12
jae 0x1dd2d
cmpl $0x4000, %r14d          # imm = 0x4000
jb 0x1dbf6
leaq 0x553b(%rip), %rdi      # 0x2326f
movl $0x593, %esi            # imm = 0x593
xorl %eax, %eax
callq 0x2080
callq 0x2040
movq 0x78(%rbx), %rcx
leaq 0x563e(%rip), %rdi      # 0x2338e
movl $0x6, %esi
movl $0x1, %edx
callq 0x2120
jmp 0x1de41
leaq 0x561c(%rip), %rax      # 0x23387
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x1dc5a
leal -0x1(%r14), %edx
leaq 0x574c(%rip), %rsi      # 0x234cd
xorl %eax, %eax
callq 0x20b0
jmp 0x1de41
decl %ebp
leaq 0x5737(%rip), %rsi      # 0x234cd
movl %ebp, %edx
xorl %eax, %eax
callq 0x20b0
testl $0x3f00, %r14d          # imm = 0x3F00
je 0x1dde6
movq 0x78(%rbx), %rcx
leaq 0x55c3(%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 0x1de02
movl $0xc, %eax
subl %edx, %eax
leaq 0x56f0(%rip), %rsi      # 0x234d2
movl %eax, %edx
jmp 0x1de0b
testq %r12, %r12
je 0x1de33
movq 0x78(%rbx), %rdi
leaq 0x558a(%rip), %rsi      # 0x23380
movq %r12, %rdx
xorl %eax, %eax
callq 0x20b0
jmp 0x1de33
decl %edx
leaq 0x56c2(%rip), %rsi      # 0x234cd
xorl %eax, %eax
callq 0x20b0
testq %r12, %r12
je 0x1de33
movq 0x78(%rbx), %rdi
movl $0x1, %edx
movl %r12d, %ecx
shll %cl, %edx
leaq 0x554e(%rip), %rsi      # 0x2337a
xorl %eax, %eax
callq 0x20b0
movq 0x78(%rbx), %rsi
movl $0x5d, %edi
callq 0x20a0
movq 0x78(%rbx), %rdi
leaq 0x57a4(%rip), %rsi      # 0x235f0
movq %r15, %rdx
xorl %eax, %eax
callq 0x20b0
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 0x1ded7
movq %rbx, %rdi
movl $0xe, %esi
movq %rax, %rdx
callq 0x16832
testl %eax, %eax
jne 0x1dec4
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 0x19196
addq $0x10, %rsp
cmpl $0x4, %eax
je 0x1df2c
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 0x1df01
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 0x19196
addq $0x18, %rsp
jmp 0x1decc
xorl %ebp, %ebp
testl %r14d, %r14d
je 0x1dec6
movq %rbx, %rdi
movl $0x1, %esi
movl $0xd, %edx
xorl %ecx, %ecx
movl %r14d, %r8d
movq %r13, %r9
callq 0x15e07
testq %rax, %rax
je 0x1dec4
movb $-0x77, (%rax)
jmp 0x1dec6
leaq 0x52cc(%rip), %rdi      # 0x231ff
movl $0xb32, %esi            # imm = 0xB32
jmp 0x1dd39