// File: /workspace/github_c_makefile_star2_O2/mmcco[P]sljit/sljit_src/sljitNativeX86_common.c
// Function: sljit_emit_const
struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, int dst, long dstw, long init_value)
{
	u_char *inst;
	struct sljit_const *const_;
#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
	int reg;
#endif

	CHECK_ERROR_PTR();
	CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value));
	ADJUST_LOCAL_OFFSET(dst, dstw);

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

	const_ = ensure_abuf(compiler, sizeof(struct sljit_const));
	if (!const_)
		return NULL;
	set_const(const_, compiler);

#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
	compiler->mode32 = 0;
	reg = SLOW_IS_REG(dst) ? dst : TMP_REG1;

	if (emit_load_imm64(compiler, reg, init_value))
		return NULL;
#else
	if (dst == SLJIT_UNUSED)
		dst = TMP_REG1;

	if (emit_mov(compiler, dst, dstw, SLJIT_IMM, init_value))
		return NULL;
#endif

	inst = ensure_buf(compiler, 2);
	if (!inst)
		return NULL;

	*inst++ = 0;
	*inst++ = 1;

#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
	if (dst & SLJIT_MEM)
		if (emit_mov(compiler, dst, dstw, TMP_REG1, 0))
			return NULL;
#endif

	return const_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, (%rdi)
je 0x1bd22
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, %r14
movl 0x48(%rdi), %eax
cmpl $-0x1, %eax
je 0x1c06a
movq %rdx, %r12
movl 0x4c(%r14), %edx
cmpl $-0x1, %edx
je 0x1c06a
movq %rcx, %r15
movl %esi, %ebx
pushq $0xc
popq %rbp
testl %esi, %esi
je 0x1bd70
setg %cl
cmpl %ebx, %eax
setge %sil
testb %sil, %cl
jne 0x1bd70
movl %ebp, %ecx
subl %edx, %ecx
cmpl %ebx, %ecx
setge %dl
cmpl $0xd, %ebx
setge %sil
orb %dl, %sil
jne 0x1bde1
testq %r12, %r12
jne 0x1c06a
movq 0x78(%r14), %rcx
testq %rcx, %rcx
je 0x1bfa7
leaq 0x58fb(%rip), %rdi      # 0x21688
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2130
testb $0x40, %bl
jne 0x1bdc7
testb %bl, %bl
js 0x1be07
testl %ebx, %ebx
je 0x1bea8
movq 0x78(%r14), %rdi
cmpl %ebx, 0x48(%r14)
jge 0x1bed5
subl %ebx, %ebp
leaq 0x57a2(%rip), %rsi      # 0x21562
movl %ebp, %edx
jmp 0x1bedf
movq 0x78(%r14), %rdi
leaq 0x562f(%rip), %rsi      # 0x21401
movq %r12, %rdx
xorl %eax, %eax
callq 0x20c0
jmp 0x1bf92
cmpl $0x8d, %ebx
jne 0x1be3f
testq %r12, %r12
js 0x1c06a
movslq 0x80(%r14), %rax
cmpq %r12, %rax
jg 0x1bd79
jmp 0x1c06a
movl %ebx, %r13d
movq 0x78(%r14), %rsi
andl $0x3f, %r13d
je 0x1bec3
pushq $0x5b
popq %rdi
callq 0x20a0
movq 0x78(%r14), %rdi
cmpl 0x48(%r14), %r13d
jle 0x1beeb
movl %ebp, %edx
subl %r13d, %edx
leaq 0x5728(%rip), %rsi      # 0x21562
jmp 0x1bef8
testb %bl, %bl
jns 0x1c06a
movl %ebx, %edx
andl $0x3f, %edx
je 0x1c057
cmpl %eax, %edx
jle 0x1be67
cmpl $0xc, %edx
ja 0x1c06a
cmpl %ecx, %edx
jle 0x1c06a
testw $0x3f00, %bx            # imm = 0x3F00
je 0x1c05e
movl %ebx, %edx
shrl $0x8, %edx
andl $0x3f, %edx
setne %sil
cmpl %eax, %edx
setle %al
testb %al, %sil
jne 0x1be99
cmpl $0xc, %edx
ja 0x1c06a
cmpl %ecx, %edx
jle 0x1c06a
cmpq $0x4, %r12
jb 0x1c05e
jmp 0x1c06a
movq 0x78(%r14), %rcx
leaq 0x556b(%rip), %rdi      # 0x2141e
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
callq 0x2130
jmp 0x1bf92
leaq 0x554d(%rip), %rax      # 0x21417
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x1bdd2
leal -0x1(%rbx), %edx
leaq 0x567e(%rip), %rsi      # 0x2155d
xorl %eax, %eax
callq 0x20c0
jmp 0x1bf92
decl %r13d
leaq 0x5668(%rip), %rsi      # 0x2155d
movl %r13d, %edx
xorl %eax, %eax
callq 0x20c0
testw $0x3f00, %bx            # imm = 0x3F00
je 0x1bf3b
movq 0x78(%r14), %rcx
leaq 0x54f5(%rip), %rdi      # 0x21406
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
callq 0x2130
movl %ebx, %edx
shrl $0x8, %edx
andl $0x3f, %edx
movq 0x78(%r14), %rdi
cmpl 0x48(%r14), %edx
jle 0x1bf57
subl %edx, %ebp
leaq 0x562b(%rip), %rsi      # 0x21562
movl %ebp, %edx
jmp 0x1bf60
testq %r12, %r12
je 0x1bf86
movq 0x78(%r14), %rdi
leaq 0x54c5(%rip), %rsi      # 0x21410
movq %r12, %rdx
xorl %eax, %eax
callq 0x20c0
jmp 0x1bf86
decl %edx
leaq 0x55fd(%rip), %rsi      # 0x2155d
xorl %eax, %eax
callq 0x20c0
testq %r12, %r12
je 0x1bf86
movq 0x78(%r14), %rdi
pushq $0x1
popq %rdx
movl %r12d, %ecx
shll %cl, %edx
leaq 0x548b(%rip), %rsi      # 0x2140a
xorl %eax, %eax
callq 0x20c0
movq 0x78(%r14), %rsi
pushq $0x5d
popq %rdi
callq 0x20a0
movq 0x78(%r14), %rdi
leaq 0x56e3(%rip), %rsi      # 0x21680
movq %r15, %rdx
xorl %eax, %eax
callq 0x20c0
leaq 0x8(%r12), %r13
cmpl $0x8d, %ebx
cmovneq %r12, %r13
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x12cc6
testq %rax, %rax
je 0x1bd0d
movq %rax, %r12
andq $0x0, (%rax)
movq 0x60(%r14), %rax
movq %rax, 0x8(%r12)
movq 0x30(%r14), %rax
leaq 0x18(%r14), %rcx
testq %rax, %rax
cmovneq %rax, %rcx
movq %r12, (%rcx)
movq %r12, 0x30(%r14)
andl $0x0, 0x70(%r14)
leal -0x1(%rbx), %eax
cmpl $0x3f, %eax
pushq $0xe
popq %rsi
cmovbl %ebx, %esi
movq %r14, %rdi
movq %r15, %rdx
callq 0x14aa1
testl %eax, %eax
jne 0x1bd0d
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x1354f
testq %rax, %rax
je 0x1bd0d
movw $0x100, (%rax)          # imm = 0x100
testb %bl, %bl
jns 0x1c04f
xorl %r15d, %r15d
pushq $0xe
popq %rcx
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
xorl %r8d, %r8d
callq 0x14d14
testl %eax, %eax
jne 0x1bd10
movq %r12, %r15
jmp 0x1bd10
testw $0x3f00, %bx            # imm = 0x3F00
jne 0x1c06a
cmpl $0x4000, %ebx           # imm = 0x4000
jb 0x1bd79
leaq 0x528e(%rip), %rdi      # 0x212ff
movl $0x5a2, %esi            # imm = 0x5A2
xorl %eax, %eax
callq 0x2080
callq 0x2040