// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/regex_src/regexJIT.c
// Function: compile_range_check
static long compile_range_check(struct compiler_common *compiler_common, long ind)
{
	struct sljit_compiler *compiler = compiler_common->compiler;
	struct stack_item *dfa_transitions = compiler_common->dfa_transitions;
	struct sljit_jump **range_jump_list = compiler_common->range_jump_list;
	int invert = dfa_transitions[ind].value;
	struct sljit_label *label;
	long no_states;
	long offset;
	int init_range = 1, prev_value = 0;

	ind++;

	while (dfa_transitions[ind].type != type_rng_end) {
		if (dfa_transitions[ind].type == type_rng_char) {
			EMIT_CMP(*range_jump_list, SLJIT_EQUAL, R_CURR_CHAR, 0, SLJIT_IMM, dfa_transitions[ind].value);
			range_jump_list++;
		}
		else {
			SLJIT_ASSERT(dfa_transitions[ind].type == type_rng_left);
			if (init_range) {
				EMIT_OP1(SLJIT_MOV, R_TEMP, 0, R_CURR_CHAR, 0);
				init_range = 0;
			}
			if (dfa_transitions[ind].value != prev_value) {
				/* Best compatibility to all archs. */
				prev_value -= dfa_transitions[ind].value;
				if (prev_value < 0) {
					EMIT_OP2(SLJIT_SUB, R_TEMP, 0, R_TEMP, 0, SLJIT_IMM, -prev_value);
				}
				else {
					EMIT_OP2(SLJIT_ADD, R_TEMP, 0, R_TEMP, 0, SLJIT_IMM, prev_value);
				}
				prev_value = dfa_transitions[ind].value;
			}
			EMIT_CMP(*range_jump_list, SLJIT_LESS_EQUAL, R_TEMP, 0, SLJIT_IMM, dfa_transitions[ind + 1].value - dfa_transitions[ind].value);
			range_jump_list++;
			ind++;
		}
		ind++;
	}

	*range_jump_list = NULL;

	if (!invert) {
		no_states = compiler_common->no_states;
		offset = TERM_OFFSET_OF(compiler_common->search_states[ind].type, 1);
		EMIT_OP1(SLJIT_MOV, R_TEMP, 0, SLJIT_MEM1(R_CURR_STATE), offset);
		EMIT_OP1(SLJIT_MOV, SLJIT_MEM1(R_CURR_STATE), offset, SLJIT_IMM, -1);
		CHECK(sljit_emit_ijump(compiler, SLJIT_JUMP, SLJIT_MEM2(R_CURR_STATE, R_TEMP), 0));

		EMIT_LABEL(label);
		range_set_label(compiler_common->range_jump_list, label);
		/* Clears the jump list. */
		*compiler_common->range_jump_list = NULL;
	}
	return ind;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
movl %eax, -0x34(%rbp)
movl $0x1, -0x54(%rbp)
movl $0x0, -0x58(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpl $0x6, (%rax,%rcx,8)
je 0x6e39
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpl $0x7, (%rax,%rcx,8)
jne 0x6c86
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq 0x4(%rax,%rcx,8), %r9
xorl %esi, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
callq 0x1c790
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x6c75
movq $0x0, -0x8(%rbp)
jmp 0x6f4d
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
jmp 0x6e28
jmp 0x6c88
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpl $0x8, (%rax,%rcx,8)
je 0x6cae
leaq 0x18b73(%rip), %rdi     # 0x1f810
movl $0x6d8, %esi            # imm = 0x6D8
movb $0x0, %al
callq 0x2060
callq 0x2040
jmp 0x6cb0
cmpl $0x0, -0x54(%rbp)
je 0x6cf0
movq -0x20(%rbp), %rdi
movl $0x20, %esi
movl $0x3, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x2, %r8d
movq %r9, %rcx
callq 0xeee0
cmpl $0x0, %eax
je 0x6ce9
movq $0x0, -0x8(%rbp)
jmp 0x6f4d
movl $0x0, -0x54(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
cmpl -0x58(%rbp), %eax
je 0x6db7
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %ecx
movl -0x58(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x58(%rbp)
cmpl $0x0, -0x58(%rbp)
jge 0x6d65
movq -0x20(%rbp), %rdi
xorl %eax, %eax
subl -0x58(%rbp), %eax
cltq
movl $0x62, %esi
movl $0x3, %r8d
xorl %ecx, %ecx
movl %ecx, %r9d
movl %r8d, %edx
movq %r9, %rcx
movl $0x40, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x113e0
cmpl $0x0, %eax
je 0x6d63
movq $0x0, -0x8(%rbp)
jmp 0x6f4d
jmp 0x6da8
movq -0x20(%rbp), %rdi
movslq -0x58(%rbp), %rax
movl $0x60, %esi
movl $0x3, %r8d
xorl %ecx, %ecx
movl %ecx, %r9d
movl %r8d, %edx
movq %r9, %rcx
movl $0x40, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x113e0
cmpl $0x0, %eax
je 0x6da6
movq $0x0, -0x8(%rbp)
jmp 0x6f4d
jmp 0x6da8
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
movl %eax, -0x58(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0xc(%rax,%rcx,8), %eax
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rdx
subl 0x4(%rcx,%rdx,8), %eax
movslq %eax, %r9
movl $0x5, %esi
movl $0x3, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
callq 0x1c790
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x6e10
movq $0x0, -0x8(%rbp)
jmp 0x6f4d
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x6c0d
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
cmpl $0x0, -0x34(%rbp)
jne 0x6f45
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x18(%rbp), %rcx
movslq (%rax,%rcx,8), %rax
imulq -0x48(%rbp), %rax
addq $0x1, %rax
shlq $0x3, %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rdi
movq -0x50(%rbp), %r9
movl $0x20, %esi
movl $0x3, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x8c, %r8d
callq 0xeee0
cmpl $0x0, %eax
je 0x6eae
movq $0x0, -0x8(%rbp)
jmp 0x6f4d
movq -0x20(%rbp), %rdi
movq -0x50(%rbp), %rcx
movl $0x20, %esi
movl $0x8c, %edx
movl $0x40, %r8d
movq $-0x1, %r9
callq 0xeee0
cmpl $0x0, %eax
je 0x6ee1
movq $0x0, -0x8(%rbp)
jmp 0x6f4d
movq -0x20(%rbp), %rdi
movl $0x16, %esi
movl $0x38c, %edx            # imm = 0x38C
xorl %eax, %eax
movl %eax, %ecx
callq 0x1a3c0
cmpl $0x0, %eax
je 0x6f07
movq $0x0, -0x8(%rbp)
jmp 0x6f4d
movq -0x20(%rbp), %rdi
callq 0x19d30
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x6f25
movq $0x0, -0x8(%rbp)
jmp 0x6f4d
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rdi
movq -0x40(%rbp), %rsi
callq 0x7da0
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq $0x0, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)