// File: /workspace/github_c_makefile_star2_O2/mmcco[P]sljit/sljit_src/sljitNativeX86_common.c
// Function: sljit_emit_ijump
int sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, long srcw)
{
	u_char *inst;
	struct sljit_jump *jump;

	CHECK_ERROR();
	CHECK(check_sljit_emit_ijump(compiler, type, src, srcw));
	ADJUST_LOCAL_OFFSET(src, srcw);

	CHECK_EXTRA_REGS(src, srcw, (void)0);

	if (compiler->flags_saved) {
		if (type <= SLJIT_JUMP)
			FAIL_IF(emit_restore_flags(compiler, 0));
		compiler->flags_saved = 0;
	}

	if (type >= SLJIT_CALL1) {
#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
		if (src == SLJIT_R2) {
			EMIT_MOV(compiler, TMP_REG1, 0, src, 0);
			src = TMP_REG1;
		}
		if (src == SLJIT_MEM1(SLJIT_SP) && type >= SLJIT_CALL3)
			srcw += sizeof(long);
#endif
#endif
#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) && defined(_WIN64)
		if (src == SLJIT_R2) {
			EMIT_MOV(compiler, TMP_REG1, 0, src, 0);
			src = TMP_REG1;
		}
#endif
		FAIL_IF(call_with_args(compiler, type));
	}

	if (src == SLJIT_IMM) {
		jump = ensure_abuf(compiler, sizeof(struct sljit_jump));
		if (jump == NULL) {
			compiler->error = SLJIT_ERR_ALLOC_FAILED;
			return SLJIT_ERR_ALLOC_FAILED;
		}
		set_jump(jump, compiler, JUMP_ADDR);
		jump->u.target = srcw;

		/* Worst case size. */
#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
		compiler->size += 5;
#else
		compiler->size += 10 + 3;
#endif

		inst = ensure_buf(compiler, 2);
		if (inst == NULL) {
			compiler->error = SLJIT_ERR_ALLOC_FAILED;
			return SLJIT_ERR_ALLOC_FAILED;
		}

		*inst++ = 0;
		*inst++ = type + 4;
	}
	else {
#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
		/* REX_W is not necessary (src is not immediate). */
		compiler->mode32 = 1;
#endif
		inst = emit_x86_instruction(compiler, 1, 0, 0, src, srcw);
		FAIL_IF(!inst);
		*inst++ = GROUP_FF;
		*inst |= (type >= SLJIT_FAST_CALL) ? CALL_rm : JMP_rm;
	}
	return SLJIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rdi), %ebp
testl %ebp, %ebp
jne 0x1b126
movq %rcx, %r15
movl %edx, %r12d
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x0, 0x84(%rdi)
je 0x1ad72
andl $0x0, 0x84(%r14)
jmp 0x1b034
leal -0x16(%rbx), %eax
cmpl $0x6, %eax
jae 0x1b137
movl 0x48(%r14), %eax
cmpl $-0x1, %eax
je 0x1afdc
movl 0x4c(%r14), %edx
cmpl $-0x1, %edx
je 0x1afdc
testl %r12d, %r12d
setg %cl
cmpl %r12d, %eax
setge %sil
pushq $0xc
popq %rbp
testb %sil, %cl
jne 0x1adc4
movl %ebp, %ecx
subl %edx, %ecx
cmpl %r12d, %ecx
setge %dl
cmpl $0xd, %r12d
setge %sil
orb %dl, %sil
jne 0x1ae42
testq %r15, %r15
jne 0x1afdc
movq 0x78(%r14), %rdi
testq %rdi, %rdi
je 0x1b034
movl %ebx, %eax
leaq 0xef1d(%rip), %rcx      # 0x29d00
movq (%rcx,%rax,8), %rdx
leaq 0x685e(%rip), %rsi      # 0x2164c
xorl %eax, %eax
callq 0x20c0
testb $0x40, %r12b
jne 0x1ae28
testb %r12b, %r12b
js 0x1ae6f
testl %r12d, %r12d
je 0x1af14
movq 0x78(%r14), %rdi
cmpl %r12d, 0x48(%r14)
jge 0x1af41
subl %r12d, %ebp
leaq 0x6741(%rip), %rsi      # 0x21562
movl %ebp, %edx
jmp 0x1af4d
movq 0x78(%r14), %rdi
leaq 0x65ce(%rip), %rsi      # 0x21401
movq %r15, %rdx
xorl %eax, %eax
callq 0x20c0
jmp 0x1b028
cmpl $0x40, %r12d
je 0x1adcd
cmpl $0x8d, %r12d
jne 0x1aea7
testq %r15, %r15
js 0x1afdc
movslq 0x80(%r14), %rax
cmpq %r15, %rax
jg 0x1adcd
jmp 0x1afdc
movl %r12d, %r13d
movq 0x78(%r14), %rsi
andl $0x3f, %r13d
je 0x1af2f
pushq $0x5b
popq %rdi
callq 0x20a0
movq 0x78(%r14), %rdi
cmpl 0x48(%r14), %r13d
jle 0x1af59
movl %ebp, %edx
subl %r13d, %edx
leaq 0x66c0(%rip), %rsi      # 0x21562
jmp 0x1af66
testb %r12b, %r12b
jns 0x1afdc
movl %r12d, %edx
andl $0x3f, %edx
je 0x1afc7
cmpl %eax, %edx
jle 0x1aed1
cmpl $0xc, %edx
ja 0x1afdc
cmpl %ecx, %edx
jle 0x1afdc
testw $0x3f00, %r12w          # imm = 0x3F00
je 0x1afcf
movl %r12d, %edx
shrl $0x8, %edx
andl $0x3f, %edx
setne %sil
cmpl %eax, %edx
setle %al
testb %al, %sil
jne 0x1af05
cmpl $0xc, %edx
ja 0x1afdc
cmpl %ecx, %edx
jle 0x1afdc
cmpq $0x4, %r15
jb 0x1afcf
jmp 0x1afdc
movq 0x78(%r14), %rcx
leaq 0x64ff(%rip), %rdi      # 0x2141e
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
callq 0x2130
jmp 0x1b028
leaq 0x64e1(%rip), %rax      # 0x21417
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x1ae33
leal -0x1(%r12), %edx
leaq 0x6610(%rip), %rsi      # 0x2155d
xorl %eax, %eax
callq 0x20c0
jmp 0x1b028
decl %r13d
leaq 0x65fa(%rip), %rsi      # 0x2155d
movl %r13d, %edx
xorl %eax, %eax
callq 0x20c0
testw $0x3f00, %r12w          # imm = 0x3F00
je 0x1afab
movq 0x78(%r14), %rcx
leaq 0x6486(%rip), %rdi      # 0x21406
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
callq 0x2130
movl %r12d, %edx
shrl $0x8, %edx
andl $0x3f, %edx
movq 0x78(%r14), %rdi
cmpl 0x48(%r14), %edx
jle 0x1afed
subl %edx, %ebp
leaq 0x65bb(%rip), %rsi      # 0x21562
movl %ebp, %edx
jmp 0x1aff6
testq %r15, %r15
je 0x1b01c
movq 0x78(%r14), %rdi
leaq 0x6455(%rip), %rsi      # 0x21410
movq %r15, %rdx
xorl %eax, %eax
callq 0x20c0
jmp 0x1b01c
testw $0x3f00, %r12w          # imm = 0x3F00
jne 0x1afdc
cmpl $0x4000, %r12d          # imm = 0x4000
jb 0x1adcd
leaq 0x631c(%rip), %rdi      # 0x212ff
movl $0x561, %esi            # imm = 0x561
jmp 0x1b143
decl %edx
leaq 0x6567(%rip), %rsi      # 0x2155d
xorl %eax, %eax
callq 0x20c0
testq %r15, %r15
je 0x1b01c
pushq $0x1
popq %rdx
movq 0x78(%r14), %rdi
movl %r15d, %ecx
shll %cl, %edx
leaq 0x63f5(%rip), %rsi      # 0x2140a
xorl %eax, %eax
callq 0x20c0
movq 0x78(%r14), %rsi
pushq $0x5d
popq %rdi
callq 0x20a0
movq 0x78(%r14), %rsi
pushq $0xa
popq %rdi
callq 0x20a0
leaq 0x8(%r15), %r13
cmpl $0x8d, %r12d
cmovneq %r15, %r13
cmpl $0x0, 0x74(%r14)
je 0x1b066
cmpl $0x16, %ebx
jg 0x1b061
movq %r14, %rdi
xorl %esi, %esi
callq 0x17b48
testl %eax, %eax
jne 0x1b117
andl $0x0, 0x74(%r14)
cmpl $0x19, %ebx
jl 0x1b07d
movq %r14, %rdi
movl %ebx, %esi
callq 0x1acda
testl %eax, %eax
jne 0x1b117
cmpl $0x40, %r12d
jne 0x1b0df
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x12cc6
testq %rax, %rax
je 0x1b11c
andq $0x0, (%rax)
movq $0x2, 0x10(%rax)
movq 0x28(%r14), %rcx
leaq 0x10(%r14), %rdx
testq %rcx, %rcx
cmovneq %rcx, %rdx
movq %rax, (%rdx)
movq %rax, 0x28(%r14)
movq %r15, 0x18(%rax)
addq $0xd, 0x60(%r14)
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x1354f
testq %rax, %rax
je 0x1b11c
movb $0x0, (%rax)
addb $0x4, %bl
movb %bl, 0x1(%rax)
xorl %ebp, %ebp
jmp 0x1b126
movl $0x1, 0x70(%r14)
xorl %ebp, %ebp
pushq $0x1
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movl %r12d, %r8d
movq %r13, %r9
callq 0x14061
testq %rax, %rax
je 0x1b117
movb $-0x1, (%rax)
cmpl $0x17, %ebx
setl %cl
shlb $0x4, %cl
addb $0x10, %cl
orb %cl, 0x1(%rax)
jmp 0x1b126
movl (%r14), %ebp
jmp 0x1b126
movl $0x2, (%r14)
pushq $0x2
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x61c1(%rip), %rdi      # 0x212ff
movl $0x560, %esi            # imm = 0x560
xorl %eax, %eax
callq 0x2080
callq 0x2040