// File: /workspace/github_c_makefile_star2_O2/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
subq $0x18, %rsp
movl (%rdi), %eax
testl %eax, %eax
jne 0x1bc91
movq %rdi, %rbx
movl 0x48(%rdi), %eax
cmpl $-0x1, %eax
je 0x1bcd7
movq %rdx, %r12
movl 0x4c(%rbx), %edx
cmpl $-0x1, %edx
je 0x1bcd7
movq %rcx, %r15
movl %esi, %r14d
pushq $0xc
popq %rbp
testl %esi, %esi
je 0x1b9b3
setg %cl
cmpl %r14d, %eax
setge %sil
testb %sil, %cl
jne 0x1b9b3
movl %ebp, %ecx
subl %edx, %ecx
cmpl %r14d, %ecx
setge %dl
cmpl $0xd, %r14d
setge %sil
orb %dl, %sil
jne 0x1ba28
testq %r12, %r12
jne 0x1bcd7
movq 0x78(%rbx), %rcx
testq %rcx, %rcx
je 0x1bbf5
leaq 0x5ca2(%rip), %rdi      # 0x21672
pushq $0xd
popq %rsi
pushq $0x1
popq %rdx
callq 0x2130
testb $0x40, %r14b
jne 0x1ba0e
testb %r14b, %r14b
js 0x1ba4f
testl %r14d, %r14d
je 0x1baf4
movq 0x78(%rbx), %rdi
cmpl %r14d, 0x48(%rbx)
jge 0x1bb21
subl %r14d, %ebp
leaq 0x5b5b(%rip), %rsi      # 0x21562
movl %ebp, %edx
jmp 0x1bb2c
movq 0x78(%rbx), %rdi
leaq 0x59e8(%rip), %rsi      # 0x21401
movq %r12, %rdx
xorl %eax, %eax
callq 0x20c0
jmp 0x1bbe0
cmpl $0x8d, %r14d
jne 0x1ba87
testq %r12, %r12
js 0x1bcd7
movslq 0x80(%rbx), %rax
cmpq %r12, %rax
jg 0x1b9bc
jmp 0x1bcd7
movl %r14d, %r13d
movq 0x78(%rbx), %rsi
andl $0x3f, %r13d
je 0x1bb0f
pushq $0x5b
popq %rdi
callq 0x20a0
movq 0x78(%rbx), %rdi
cmpl 0x48(%rbx), %r13d
jle 0x1bb38
movl %ebp, %edx
subl %r13d, %edx
leaq 0x5ae0(%rip), %rsi      # 0x21562
jmp 0x1bb45
testb %r14b, %r14b
jns 0x1bcd7
movl %r14d, %edx
andl $0x3f, %edx
je 0x1bcc2
cmpl %eax, %edx
jle 0x1bab1
cmpl $0xc, %edx
ja 0x1bcd7
cmpl %ecx, %edx
jle 0x1bcd7
testw $0x3f00, %r14w          # imm = 0x3F00
je 0x1bcca
movl %r14d, %edx
shrl $0x8, %edx
andl $0x3f, %edx
setne %sil
cmpl %eax, %edx
setle %al
testb %al, %sil
jne 0x1bae5
cmpl $0xc, %edx
ja 0x1bcd7
cmpl %ecx, %edx
jle 0x1bcd7
cmpq $0x4, %r12
jb 0x1bcca
jmp 0x1bcd7
movq 0x78(%rbx), %rcx
leaq 0x591f(%rip), %rdi      # 0x2141e
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
callq 0x2130
jmp 0x1bbe0
leaq 0x5901(%rip), %rax      # 0x21417
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x1ba19
leal -0x1(%r14), %edx
leaq 0x5a31(%rip), %rsi      # 0x2155d
xorl %eax, %eax
callq 0x20c0
jmp 0x1bbe0
decl %r13d
leaq 0x5a1b(%rip), %rsi      # 0x2155d
movl %r13d, %edx
xorl %eax, %eax
callq 0x20c0
testw $0x3f00, %r14w          # imm = 0x3F00
je 0x1bb89
movq 0x78(%rbx), %rcx
leaq 0x58a7(%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 0x1bba5
subl %edx, %ebp
leaq 0x59dd(%rip), %rsi      # 0x21562
movl %ebp, %edx
jmp 0x1bbae
testq %r12, %r12
je 0x1bbd4
movq 0x78(%rbx), %rdi
leaq 0x5877(%rip), %rsi      # 0x21410
movq %r12, %rdx
xorl %eax, %eax
callq 0x20c0
jmp 0x1bbd4
decl %edx
leaq 0x59af(%rip), %rsi      # 0x2155d
xorl %eax, %eax
callq 0x20c0
testq %r12, %r12
je 0x1bbd4
movq 0x78(%rbx), %rdi
pushq $0x1
popq %rdx
movl %r12d, %ecx
shll %cl, %edx
leaq 0x583d(%rip), %rsi      # 0x2140a
xorl %eax, %eax
callq 0x20c0
movq 0x78(%rbx), %rsi
pushq $0x5d
popq %rdi
callq 0x20a0
movq 0x78(%rbx), %rdi
leaq 0x5a95(%rip), %rsi      # 0x21680
movq %r15, %rdx
xorl %eax, %eax
callq 0x20c0
leaq 0x8(%r12), %r13
cmpl $0x8d, %r14d
cmovneq %r12, %r13
andl $0x0, 0x70(%rbx)
leaq 0x8(%r15), %rdx
addq $-0x7ffffff8, %r15      # imm = 0x80000008
movabsq $-0x100000001, %rax     # imm = 0xFFFFFFFEFFFFFFFF
cmpq %rax, %r15
ja 0x1bc66
pushq $0xe
popq %rsi
movq %rbx, %rdi
callq 0x14aa1
testl %eax, %eax
jne 0x1bc62
andq $0x0, 0x8(%rsp)
movl $0xe, (%rsp)
pushq $0xd
popq %r8
movq %rbx, %rdi
movl $0x4000, %esi           # imm = 0x4000
movl %r14d, %edx
movq %r13, %rcx
xorl %r9d, %r9d
callq 0x174af
cmpl $0x4, %eax
je 0x1bcef
movl (%rbx), %eax
jmp 0x1bc91
testq %rdx, %rdx
je 0x1bca0
movq %rdx, 0x8(%rsp)
movl $0x40, (%rsp)
pushq $0xd
popq %r8
movq %rbx, %rdi
movl $0x4000, %esi           # imm = 0x4000
movl %r14d, %edx
movq %r13, %rcx
xorl %r9d, %r9d
callq 0x174af
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0xd
popq %rcx
movq %rbx, %rdi
movl %r14d, %esi
movq %r13, %rdx
xorl %r8d, %r8d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x14d14
testw $0x3f00, %r14w          # imm = 0x3F00
jne 0x1bcd7
cmpl $0x4000, %r14d          # imm = 0x4000
jb 0x1b9bc
leaq 0x5621(%rip), %rdi      # 0x212ff
movl $0x593, %esi            # imm = 0x593
xorl %eax, %eax
callq 0x2080
callq 0x2040
leaq 0x5599(%rip), %rdi      # 0x2128f
movl $0xb32, %esi            # imm = 0xB32
jmp 0x1bce3