// File: /workspace/github_c_makefile_star2_O1/mmcco[P]sljit/regex_src/regexJIT.c
// Function: compile_cond_tran
static int compile_cond_tran(struct compiler_common *compiler_common, long curr_index)
{
	struct sljit_compiler *compiler = compiler_common->compiler;
	struct stack *stack = &compiler_common->stack;
	struct stack_item *search_states = compiler_common->search_states;
	long offset;
	int flags;
	long no_states;
	long value;
	struct sljit_jump *jump1;
	struct sljit_jump *jump2;
	struct sljit_jump *jump3;
	struct sljit_jump *jump4;
	struct sljit_jump *jump5;
	struct sljit_label *label1;

	flags = compiler_common->flags;
	no_states = compiler_common->no_states;

	EMIT_OP1(SLJIT_MOV, SLJIT_MEM1(R_REGEX_MATCH), SLJIT_OFFSETOF(struct regex_match, fast_forward), SLJIT_IMM, 0);
	if (!(flags & (REGEX_ID_CHECK | REGEX_MATCH_BEGIN))) {
		EMIT_OP1(SLJIT_MOV, R_TEMP, 0, SLJIT_MEM1(R_CURR_STATE), TERM_OFFSET_OF(curr_index, 2));
	}

	while (stack->count > 0) {
		value = stack_pop(stack)->value;
		if (search_states[value].type >= 0) {
#ifdef REGEX_MATCH_VERBOSE
			if (flags & REGEX_MATCH_VERBOSE)
				printf("-> (%3d:%3d) ", search_states[value].type, search_states[value].value);
#endif
			offset = TERM_OFFSET_OF(search_states[value].type, 0);

			if (!(flags & REGEX_ID_CHECK)) {
				if (!(flags & REGEX_MATCH_BEGIN)) {
					/* Check whether item is inserted. */
					EMIT_CMP(jump1, SLJIT_NOT_EQUAL, SLJIT_MEM1(R_NEXT_STATE), offset + sizeof(long), SLJIT_IMM, -1);
					EMIT_OP1(SLJIT_MOV, SLJIT_MEM1(R_NEXT_STATE), offset + sizeof(long), R_NEXT_HEAD, 0);
					if (offset > 0) {
						EMIT_OP1(SLJIT_MOV, R_NEXT_HEAD, 0, SLJIT_IMM, offset);
					}
					EMIT_JUMP(jump2, SLJIT_JUMP);

					/* Check whether old index <= index. */
					EMIT_LABEL(label1);
					sljit_set_label(jump1, label1);

					EMIT_CMP(jump1, SLJIT_LESS_EQUAL, SLJIT_MEM1(R_NEXT_STATE), offset + 2 * sizeof(long), R_TEMP, 0);

					EMIT_LABEL(label1);
					sljit_set_label(jump2, label1);
					EMIT_OP1(SLJIT_MOV, SLJIT_MEM1(R_NEXT_STATE), offset + 2 * sizeof(long), R_TEMP, 0);

					EMIT_LABEL(label1);
					sljit_set_label(jump1, label1);
				}
				else {
					/* Check whether item is inserted. */
					EMIT_CMP(jump1, SLJIT_NOT_EQUAL, SLJIT_MEM1(R_NEXT_STATE), offset + sizeof(long), SLJIT_IMM, -1);
					EMIT_OP1(SLJIT_MOV, SLJIT_MEM1(R_NEXT_STATE), offset + sizeof(long), R_NEXT_HEAD, 0);
					if (offset > 0) {
						EMIT_OP1(SLJIT_MOV, R_NEXT_HEAD, 0, SLJIT_IMM, offset);
					}
					EMIT_LABEL(label1);
					sljit_set_label(jump1, label1);
				}
			}
			else {
				if (!(flags & REGEX_MATCH_BEGIN)) {
					EMIT_OP1(SLJIT_MOV, R_TEMP, 0, SLJIT_MEM1(R_CURR_STATE), TERM_OFFSET_OF(curr_index, 2));

					/* Check whether item is inserted. */
					EMIT_CMP(jump1, SLJIT_NOT_EQUAL, SLJIT_MEM1(R_NEXT_STATE), offset + sizeof(long), SLJIT_IMM, -1);
					EMIT_OP1(SLJIT_MOV, SLJIT_MEM1(R_NEXT_STATE), offset + sizeof(long), R_NEXT_HEAD, 0);
					if (offset > 0) {
						EMIT_OP1(SLJIT_MOV, R_NEXT_HEAD, 0, SLJIT_IMM, offset);
					}
					EMIT_JUMP(jump2, SLJIT_JUMP);

					/* Check whether old index != index. */
					EMIT_LABEL(label1);
					sljit_set_label(jump1, label1);

					EMIT_OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, SLJIT_MEM1(R_NEXT_STATE), offset + 2 * sizeof(long), R_TEMP, 0);
					EMIT_JUMP(jump1, SLJIT_LESS);
					EMIT_JUMP(jump3, SLJIT_GREATER);

					/* Old index == index. */
					EMIT_OP1(SLJIT_MOV, R_TEMP, 0, SLJIT_MEM1(R_CURR_STATE), TERM_OFFSET_OF(curr_index, 3));
					if (search_states[value].value > 0) {
						EMIT_CMP(jump4, SLJIT_GREATER, R_TEMP, 0, SLJIT_IMM, search_states[value].value);

						EMIT_OP1(SLJIT_MOV, R_TEMP, 0, SLJIT_IMM, search_states[value].value);
						EMIT_LABEL(label1);
						sljit_set_label(jump4, label1);
					}

					EMIT_OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, SLJIT_MEM1(R_NEXT_STATE), offset + 3 * sizeof(long), R_TEMP, 0);
					EMIT_JUMP(jump4, SLJIT_GREATER_EQUAL);
					EMIT_JUMP(jump5, SLJIT_JUMP);

					/* Overwrite index & id. */
					EMIT_LABEL(label1);
					sljit_set_label(jump3, label1);
					sljit_set_label(jump2, label1);
					EMIT_OP1(SLJIT_MOV, SLJIT_MEM1(R_NEXT_STATE), offset + 2 * sizeof(long), R_TEMP, 0);

					EMIT_OP1(SLJIT_MOV, R_TEMP, 0, SLJIT_MEM1(R_CURR_STATE), TERM_OFFSET_OF(curr_index, 3));
					if (search_states[value].value > 0) {
						EMIT_CMP(jump3, SLJIT_GREATER, R_TEMP, 0, SLJIT_IMM, search_states[value].value);

						EMIT_OP1(SLJIT_MOV, R_TEMP, 0, SLJIT_IMM, search_states[value].value);
						EMIT_LABEL(label1);
						sljit_set_label(jump3, label1);
					}

					EMIT_LABEL(label1);
					sljit_set_label(jump5, label1);
					EMIT_OP1(SLJIT_MOV, SLJIT_MEM1(R_NEXT_STATE), offset + 3 * sizeof(long), R_TEMP, 0);

					/* Exit. */
					EMIT_LABEL(label1);
					sljit_set_label(jump1, label1);
					sljit_set_label(jump4, label1);
				}
				else {
					EMIT_OP1(SLJIT_MOV, R_TEMP, 0, SLJIT_MEM1(R_CURR_STATE), TERM_OFFSET_OF(curr_index, 2));

					if (search_states[value].value > 0) {
						EMIT_CMP(jump1, SLJIT_GREATER, R_TEMP, 0, SLJIT_IMM, search_states[value].value);

						EMIT_OP1(SLJIT_MOV, R_TEMP, 0, SLJIT_IMM, search_states[value].value);
						EMIT_LABEL(label1);
						sljit_set_label(jump1, label1);
					}

					/* Check whether item is inserted. */
					EMIT_CMP(jump1, SLJIT_NOT_EQUAL, SLJIT_MEM1(R_NEXT_STATE), offset + sizeof(long), SLJIT_IMM, -1);
					EMIT_OP1(SLJIT_MOV, SLJIT_MEM1(R_NEXT_STATE), offset + sizeof(long), R_NEXT_HEAD, 0);
					if (offset > 0) {
						EMIT_OP1(SLJIT_MOV, R_NEXT_HEAD, 0, SLJIT_IMM, offset);
					}
					EMIT_JUMP(jump2, SLJIT_JUMP);

					/* Check whether old id >= id. */
					EMIT_LABEL(label1);
					sljit_set_label(jump1, label1);

					EMIT_CMP(jump1, SLJIT_GREATER_EQUAL, SLJIT_MEM1(R_NEXT_STATE), offset + 2 * sizeof(long), R_TEMP, 0);

					EMIT_LABEL(label1);
					sljit_set_label(jump2, label1);
					EMIT_OP1(SLJIT_MOV, SLJIT_MEM1(R_NEXT_STATE), offset + 2 * sizeof(long), R_TEMP, 0);

					EMIT_LABEL(label1);
					sljit_set_label(jump1, label1);
				}
			}
		}
		search_states[value].value = -1;
	}

#ifdef REGEX_MATCH_VERBOSE
	if (flags & REGEX_MATCH_VERBOSE)
		printf("\n");
#endif
	return REGEX_NO_ERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x68(%rdi), %r15
movq 0x60(%rdi), %r13
movl 0x30(%rdi), %r12d
movq 0x48(%rdi), %rbp
movl $0x40, %ecx
movq %r15, %rdi
movl $0x20, %esi
movl $0x81, %edx
movl $0x40, %r8d
xorl %r9d, %r9d
callq 0x9cef
movl $0x1, %ecx
testl %eax, %eax
je 0x5ea1
movl %ecx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, 0x8(%rsp)
testl $0x101, %r12d           # imm = 0x101
je 0x666c
cmpl $0x0, 0x14(%r14)
movq 0x8(%rsp), %r13
jle 0x664f
shlq $0x3, %rbp
imulq %rbp, %rbx
leaq 0x10(%rbx), %rax
movq %rax, 0x30(%rsp)
addq $0x18, %rbx
movq %rbx, 0x28(%rsp)
movl %r12d, 0x1c(%rsp)
movq %rbp, 0x20(%rsp)
movq %r14, %rdi
callq 0x4fb0
movslq 0x4(%rax), %rbx
movl (%r13,%rbx,8), %esi
testl %esi, %esi
js 0x663b
testb $0x10, %r12b
je 0x5f19
movl 0x4(%r13,%rbx,8), %edx
leaq 0xd7ff(%rip), %rdi      # 0x13711
xorl %eax, %eax
callq 0x2080
movslq (%r13,%rbx,8), %r13
imulq %rbp, %r13
btl $0x8, %r12d
movq %rbx, 0x10(%rsp)
jb 0x600c
movl %r12d, %ebp
leaq 0x8(%r13), %r12
movq %r15, %rdi
movl $0x1, %esi
movl $0x8b, %edx
movq %r12, %rcx
movl $0x40, %r8d
movq $-0x1, %r9
callq 0x1133a
movq %rax, %rbx
movl $0x1, %ecx
testb $0x1, %bpl
jne 0x63ec
testq %rbx, %rbx
je 0x5e90
movq %r15, %rdi
movl $0x20, %esi
movl $0x8b, %edx
movq %r12, %rcx
movl $0xa, %r8d
xorl %r9d, %r9d
callq 0x9cef
testl %eax, %eax
jne 0x66a7
testq %r13, %r13
jle 0x5fc6
movq %r15, %rdi
movl $0x20, %esi
movl $0xa, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
movq %r13, %r9
callq 0x9cef
testl %eax, %eax
jne 0x66a7
movq %r15, %rdi
movl $0x16, %esi
callq 0xfcae
testq %rax, %rax
je 0x66a7
movq %rax, %r12
movq %r15, %rdi
callq 0xfbc1
testq %rax, %rax
je 0x66a7
movq %rbx, %rdi
movq %rax, %rsi
callq 0x79c2
addq $0x10, %r13
movq %r15, %rdi
movl $0x5, %esi
jmp 0x65a2
movq %r15, %rdi
movl $0x20, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x8c, %r8d
testb $0x1, %r12b
jne 0x6441
movq 0x30(%rsp), %r9
callq 0x9cef
testl %eax, %eax
jne 0x66a7
leaq 0x8(%r13), %r12
movq %r15, %rdi
movl $0x1, %esi
movl $0x8b, %edx
movq %r12, %rcx
movl $0x40, %r8d
movq $-0x1, %r9
callq 0x1133a
testq %rax, %rax
je 0x66a7
movq %rax, %rbx
movq %r15, %rdi
movl $0x20, %esi
movl $0x8b, %edx
movq %r12, %rcx
movl $0xa, %r8d
xorl %r9d, %r9d
callq 0x9cef
testl %eax, %eax
jne 0x66a7
testq %r13, %r13
jle 0x60bf
movq %r15, %rdi
movl $0x20, %esi
movl $0xa, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
movq %r13, %r9
callq 0x9cef
testl %eax, %eax
jne 0x66a7
movq %r15, %rdi
movl $0x16, %esi
callq 0xfcae
testq %rax, %rax
je 0x66a7
movq %rax, %rbp
movq %r15, %rdi
callq 0xfbc1
testq %rax, %rax
je 0x66a7
movq %rbx, %rdi
movq %rax, %rsi
callq 0x79c2
leaq 0x10(%r13), %rbx
movq %r15, %rdi
movl $0x462, %esi            # imm = 0x462
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x8b, %r8d
movq %rbx, %r9
pushq $0x0
pushq $0x3
callq 0xb069
addq $0x10, %rsp
testl %eax, %eax
jne 0x66a7
movq %r15, %rdi
movl $0x2, %esi
callq 0xfcae
testq %rax, %rax
je 0x66a7
movq %rbx, 0x50(%rsp)
movq %rax, 0x48(%rsp)
movq %r15, %rdi
movl $0x4, %esi
callq 0xfcae
testq %rax, %rax
je 0x66a7
movq %rax, %rbx
movq %r15, %rdi
movl $0x20, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x8c, %r8d
movq 0x28(%rsp), %r9
callq 0x9cef
testl %eax, %eax
jne 0x66a7
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movslq 0x4(%rax,%rcx,8), %r9
testq %r9, %r9
jle 0x6209
movq %r15, %rdi
movl $0x4, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
callq 0x1133a
testq %rax, %rax
je 0x66a7
movq %rax, %r12
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movslq 0x4(%rax,%rcx,8), %r9
movq %r15, %rdi
movl $0x20, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
callq 0x9cef
testl %eax, %eax
jne 0x66a7
movq %r15, %rdi
callq 0xfbc1
testq %rax, %rax
je 0x66a7
movq %r12, %rdi
movq %rax, %rsi
callq 0x79c2
addq $0x18, %r13
movq %r15, %rdi
movl $0x462, %esi            # imm = 0x462
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x8b, %r8d
movq %r13, %r9
pushq $0x0
pushq $0x3
callq 0xb069
addq $0x10, %rsp
testl %eax, %eax
jne 0x66a7
movq %r15, %rdi
movl $0x3, %esi
callq 0xfcae
testq %rax, %rax
je 0x66a7
movq %rax, %r12
movq %r15, %rdi
movl $0x16, %esi
callq 0xfcae
testq %rax, %rax
je 0x66a7
movq %rax, 0x40(%rsp)
movq %r12, 0x38(%rsp)
movq %r15, %rdi
callq 0xfbc1
testq %rax, %rax
je 0x66a7
movq %rax, %r12
movq %rbx, %rdi
movq %rax, %rsi
callq 0x79c2
movq %rbp, %rdi
movq %r12, %rsi
callq 0x79c2
movq %r15, %rdi
movl $0x20, %esi
movl $0x8b, %edx
movq 0x50(%rsp), %rcx
movl $0x3, %r8d
xorl %r9d, %r9d
callq 0x9cef
testl %eax, %eax
jne 0x66a7
movq %r15, %rdi
movl $0x20, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x8c, %r8d
movq 0x28(%rsp), %r9
callq 0x9cef
testl %eax, %eax
jne 0x66a7
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movslq 0x4(%rax,%rcx,8), %r9
testq %r9, %r9
movl 0x1c(%rsp), %r12d
jle 0x6375
movq %r15, %rdi
movl $0x4, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
callq 0x1133a
testq %rax, %rax
je 0x66a7
movq %rax, %rbx
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movslq 0x4(%rax,%rcx,8), %r9
movq %r15, %rdi
movl $0x20, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
callq 0x9cef
testl %eax, %eax
jne 0x66a7
movq %r15, %rdi
callq 0xfbc1
testq %rax, %rax
je 0x66a7
movq %rbx, %rdi
movq %rax, %rsi
callq 0x79c2
movq %r15, %rdi
callq 0xfbc1
testq %rax, %rax
je 0x66a7
movq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0x79c2
movq %r15, %rdi
movl $0x20, %esi
movl $0x8b, %edx
movq %r13, %rcx
movl $0x3, %r8d
xorl %r9d, %r9d
callq 0x9cef
testl %eax, %eax
jne 0x66a7
movq %r15, %rdi
callq 0xfbc1
testq %rax, %rax
movl $0x1, %ecx
je 0x5e90
movq %rax, %rbx
movq 0x48(%rsp), %rdi
movq %rax, %rsi
callq 0x79c2
movq 0x38(%rsp), %rdi
movq %rbx, %rsi
jmp 0x6627
testq %rbx, %rbx
je 0x5e90
movq %r15, %rdi
movl $0x20, %esi
movl $0x8b, %edx
movq %r12, %rcx
movl $0xa, %r8d
xorl %r9d, %r9d
callq 0x9cef
testl %eax, %eax
jne 0x66a7
testq %r13, %r13
jle 0x6606
movq %r15, %rdi
movl $0x20, %esi
movl $0xa, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
movq %r13, %r9
jmp 0x65f9
movq 0x30(%rsp), %r9
callq 0x9cef
movl $0x1, %ecx
testl %eax, %eax
jne 0x5e90
movq 0x8(%rsp), %rax
movslq 0x4(%rax,%rbx,8), %r9
testq %r9, %r9
jle 0x64df
movq %r15, %rdi
movl $0x4, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
callq 0x1133a
testq %rax, %rax
je 0x66a7
movq %rax, %rbx
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movslq 0x4(%rax,%rcx,8), %r9
movq %r15, %rdi
movl $0x20, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
callq 0x9cef
testl %eax, %eax
jne 0x66a7
movq %r15, %rdi
callq 0xfbc1
testq %rax, %rax
movl $0x1, %ecx
je 0x5e90
movq %rbx, %rdi
movq %rax, %rsi
callq 0x79c2
leaq 0x8(%r13), %r12
movq %r15, %rdi
movl $0x1, %esi
movl $0x8b, %edx
movq %r12, %rcx
movl $0x40, %r8d
movq $-0x1, %r9
callq 0x1133a
testq %rax, %rax
je 0x66a7
movq %rax, %rbx
movq %r15, %rdi
movl $0x20, %esi
movl $0x8b, %edx
movq %r12, %rcx
movl $0xa, %r8d
xorl %r9d, %r9d
callq 0x9cef
testl %eax, %eax
jne 0x66a7
testq %r13, %r13
jle 0x6561
movq %r15, %rdi
movl $0x20, %esi
movl $0xa, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
movq %r13, %r9
callq 0x9cef
testl %eax, %eax
jne 0x66a7
movq %r15, %rdi
movl $0x16, %esi
callq 0xfcae
testq %rax, %rax
je 0x66a7
movq %rax, %r12
movq %r15, %rdi
callq 0xfbc1
testq %rax, %rax
je 0x66a7
movq %rbx, %rdi
movq %rax, %rsi
callq 0x79c2
addq $0x10, %r13
movq %r15, %rdi
movl $0x3, %esi
movl $0x8b, %edx
movq %r13, %rcx
movl $0x3, %r8d
xorl %r9d, %r9d
callq 0x1133a
testq %rax, %rax
je 0x66a7
movq %rax, %rbx
movq %r15, %rdi
callq 0xfbc1
testq %rax, %rax
je 0x66a7
movq %r12, %rdi
movq %rax, %rsi
callq 0x79c2
movq %r15, %rdi
movl $0x20, %esi
movl $0x8b, %edx
movq %r13, %rcx
movl $0x3, %r8d
xorl %r9d, %r9d
callq 0x9cef
testl %eax, %eax
jne 0x66a7
movq %r15, %rdi
callq 0xfbc1
testq %rax, %rax
movl 0x1c(%rsp), %r12d
movl $0x1, %ecx
je 0x5e90
movq %rbx, %rdi
movq %rax, %rsi
callq 0x79c2
movq 0x8(%rsp), %r13
movq 0x20(%rsp), %rbp
movq 0x10(%rsp), %rbx
movl $0xffffffff, 0x4(%r13,%rbx,8) # imm = 0xFFFFFFFF
cmpl $0x0, 0x14(%r14)
jg 0x5ee7
xorl %ecx, %ecx
testb $0x10, %r12b
je 0x5e90
movl $0xa, %edi
callq 0x2040
xorl %ecx, %ecx
jmp 0x5e90
movq %rbp, %rax
imulq %rbx, %rax
leaq 0x10(,%rax,8), %r9
movq %r15, %rdi
movl $0x20, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x8c, %r8d
callq 0x9cef
movl $0x1, %ecx
testl %eax, %eax
jne 0x5e90
jmp 0x5eb3
movl $0x1, %ecx
jmp 0x5e90