// File: /workspace/github_c_makefile_star2_O3/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 0x9c63
movl $0x1, %ecx
testl %eax, %eax
je 0x5def
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 0x65ae
cmpl $0x0, 0x14(%r14)
jle 0x65f3
shlq $0x3, %rbp
movl %r12d, %r13d
andl $0x10, %r13d
imulq %rbp, %rbx
leaq 0x10(%rbx), %rax
movq %rax, 0x50(%rsp)
addq $0x18, %rbx
movq %rbx, 0x28(%rsp)
movl %r12d, 0x14(%rsp)
movq 0x8(%rsp), %rbx
movq %rbp, 0x20(%rsp)
movl %r13d, 0x10(%rsp)
movq %r14, %rdi
callq 0x4ee0
movslq 0x4(%rax), %rax
movq %rax, 0x18(%rsp)
movl (%rbx,%rax,8), %esi
testl %esi, %esi
js 0x6594
testl %r13d, %r13d
je 0x5e7e
movq 0x18(%rsp), %r13
movl 0x4(%rbx,%r13,8), %edx
leaq 0xd8ba(%rip), %rdi      # 0x1372d
xorl %eax, %eax
callq 0x2080
movl (%rbx,%r13,8), %esi
movslq %esi, %r13
imulq %rbp, %r13
btl $0x8, %r12d
jb 0x5f6a
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 0x117ca
movq %rax, %rbx
movl $0x1, %ecx
testb $0x1, %bpl
jne 0x634a
testq %rbx, %rbx
je 0x5dde
movq %r15, %rdi
movl $0x20, %esi
movl $0x8b, %edx
movq %r12, %rcx
movl $0xa, %r8d
xorl %r9d, %r9d
callq 0x9c63
testl %eax, %eax
jne 0x65e9
testq %r13, %r13
jle 0x5f24
movq %r15, %rdi
movl $0x20, %esi
movl $0xa, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
movq %r13, %r9
callq 0x9c63
testl %eax, %eax
jne 0x65e9
movq %r15, %rdi
movl $0x16, %esi
callq 0x100e3
testq %rax, %rax
je 0x65e9
movq %rax, %r12
movq %r15, %rdi
callq 0xfff6
testq %rax, %rax
je 0x65e9
movq %rbx, %rdi
movq %rax, %rsi
callq 0x78d1
addq $0x10, %r13
movq %r15, %rdi
movl $0x5, %esi
jmp 0x64fb
movq %r15, %rdi
movl $0x20, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x8c, %r8d
movq 0x50(%rsp), %r9
callq 0x9c63
testb $0x1, %r12b
jne 0x639f
testl %eax, %eax
jne 0x65e9
leaq 0x8(%r13), %r12
movq %r15, %rdi
movl $0x1, %esi
movl $0x8b, %edx
movq %r12, %rcx
movl $0x40, %r8d
movq $-0x1, %r9
callq 0x117ca
testq %rax, %rax
je 0x65e9
movq %rax, %rbx
movq %r15, %rdi
movl $0x20, %esi
movl $0x8b, %edx
movq %r12, %rcx
movl $0xa, %r8d
xorl %r9d, %r9d
callq 0x9c63
testl %eax, %eax
jne 0x65e9
testq %r13, %r13
jle 0x601d
movq %r15, %rdi
movl $0x20, %esi
movl $0xa, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
movq %r13, %r9
callq 0x9c63
testl %eax, %eax
jne 0x65e9
movq %r15, %rdi
movl $0x16, %esi
callq 0x100e3
testq %rax, %rax
je 0x65e9
movq %rax, %rbp
movq %r15, %rdi
callq 0xfff6
testq %rax, %rax
je 0x65e9
movq %rbx, %rdi
movq %rax, %rsi
callq 0x78d1
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 0xb023
addq $0x10, %rsp
testl %eax, %eax
jne 0x65e9
movq %r15, %rdi
movl $0x2, %esi
callq 0x100e3
testq %rax, %rax
je 0x65e9
movq %rbx, 0x48(%rsp)
movq %rax, 0x40(%rsp)
movq %r15, %rdi
movl $0x4, %esi
callq 0x100e3
testq %rax, %rax
je 0x65e9
movq %rax, %rbx
movq %r15, %rdi
movl $0x20, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x8c, %r8d
movq 0x28(%rsp), %r9
callq 0x9c63
testl %eax, %eax
jne 0x65e9
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movslq 0x4(%rax,%rcx,8), %r9
testq %r9, %r9
jle 0x6167
movq %r15, %rdi
movl $0x4, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
callq 0x117ca
testq %rax, %rax
je 0x65e9
movq %rax, %r12
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movslq 0x4(%rax,%rcx,8), %r9
movq %r15, %rdi
movl $0x20, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
callq 0x9c63
testl %eax, %eax
jne 0x65e9
movq %r15, %rdi
callq 0xfff6
testq %rax, %rax
je 0x65e9
movq %r12, %rdi
movq %rax, %rsi
callq 0x78d1
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 0xb023
addq $0x10, %rsp
testl %eax, %eax
jne 0x65e9
movq %r15, %rdi
movl $0x3, %esi
callq 0x100e3
testq %rax, %rax
je 0x65e9
movq %rax, %r12
movq %r15, %rdi
movl $0x16, %esi
callq 0x100e3
testq %rax, %rax
je 0x65e9
movq %rax, 0x38(%rsp)
movq %r12, 0x30(%rsp)
movq %r15, %rdi
callq 0xfff6
testq %rax, %rax
je 0x65e9
movq %rax, %r12
movq %rbx, %rdi
movq %rax, %rsi
callq 0x78d1
movq %rbp, %rdi
movq %r12, %rsi
callq 0x78d1
movq %r15, %rdi
movl $0x20, %esi
movl $0x8b, %edx
movq 0x48(%rsp), %rcx
movl $0x3, %r8d
xorl %r9d, %r9d
callq 0x9c63
testl %eax, %eax
jne 0x65e9
movq %r15, %rdi
movl $0x20, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x8c, %r8d
movq 0x28(%rsp), %r9
callq 0x9c63
testl %eax, %eax
jne 0x65e9
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movslq 0x4(%rax,%rcx,8), %r9
testq %r9, %r9
movl 0x14(%rsp), %r12d
jle 0x62d3
movq %r15, %rdi
movl $0x4, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
callq 0x117ca
testq %rax, %rax
je 0x65e9
movq %rax, %rbx
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movslq 0x4(%rax,%rcx,8), %r9
movq %r15, %rdi
movl $0x20, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
callq 0x9c63
testl %eax, %eax
jne 0x65e9
movq %r15, %rdi
callq 0xfff6
testq %rax, %rax
je 0x65e9
movq %rbx, %rdi
movq %rax, %rsi
callq 0x78d1
movq %r15, %rdi
callq 0xfff6
testq %rax, %rax
je 0x65e9
movq 0x38(%rsp), %rdi
movq %rax, %rsi
callq 0x78d1
movq %r15, %rdi
movl $0x20, %esi
movl $0x8b, %edx
movq %r13, %rcx
movl $0x3, %r8d
xorl %r9d, %r9d
callq 0x9c63
testl %eax, %eax
jne 0x65e9
movq %r15, %rdi
callq 0xfff6
testq %rax, %rax
movl $0x1, %ecx
je 0x5dde
movq %rax, %rbx
movq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0x78d1
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
jmp 0x6580
testq %rbx, %rbx
je 0x5dde
movq %r15, %rdi
movl $0x20, %esi
movl $0x8b, %edx
movq %r12, %rcx
movl $0xa, %r8d
xorl %r9d, %r9d
callq 0x9c63
testl %eax, %eax
jne 0x65e9
testq %r13, %r13
jle 0x655f
movq %r15, %rdi
movl $0x20, %esi
movl $0xa, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
movq %r13, %r9
jmp 0x6552
movl $0x1, %ecx
testl %eax, %eax
jne 0x5dde
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movslq 0x4(%rax,%rcx,8), %r9
testq %r9, %r9
jle 0x6438
movq %r15, %rdi
movl $0x4, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
callq 0x117ca
testq %rax, %rax
je 0x65e9
movq %rax, %rbx
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movslq 0x4(%rax,%rcx,8), %r9
movq %r15, %rdi
movl $0x20, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
callq 0x9c63
testl %eax, %eax
jne 0x65e9
movq %r15, %rdi
callq 0xfff6
testq %rax, %rax
movl $0x1, %ecx
je 0x5dde
movq %rbx, %rdi
movq %rax, %rsi
callq 0x78d1
leaq 0x8(%r13), %r12
movq %r15, %rdi
movl $0x1, %esi
movl $0x8b, %edx
movq %r12, %rcx
movl $0x40, %r8d
movq $-0x1, %r9
callq 0x117ca
testq %rax, %rax
je 0x65e9
movq %rax, %rbx
movq %r15, %rdi
movl $0x20, %esi
movl $0x8b, %edx
movq %r12, %rcx
movl $0xa, %r8d
xorl %r9d, %r9d
callq 0x9c63
testl %eax, %eax
jne 0x65e9
testq %r13, %r13
jle 0x64ba
movq %r15, %rdi
movl $0x20, %esi
movl $0xa, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
movq %r13, %r9
callq 0x9c63
testl %eax, %eax
jne 0x65e9
movq %r15, %rdi
movl $0x16, %esi
callq 0x100e3
testq %rax, %rax
je 0x65e9
movq %rax, %r12
movq %r15, %rdi
callq 0xfff6
testq %rax, %rax
je 0x65e9
movq %rbx, %rdi
movq %rax, %rsi
callq 0x78d1
addq $0x10, %r13
movq %r15, %rdi
movl $0x3, %esi
movl $0x8b, %edx
movq %r13, %rcx
movl $0x3, %r8d
xorl %r9d, %r9d
callq 0x117ca
testq %rax, %rax
je 0x65e9
movq %rax, %rbx
movq %r15, %rdi
callq 0xfff6
testq %rax, %rax
je 0x65e9
movq %r12, %rdi
movq %rax, %rsi
callq 0x78d1
movq %r15, %rdi
movl $0x20, %esi
movl $0x8b, %edx
movq %r13, %rcx
movl $0x3, %r8d
xorl %r9d, %r9d
callq 0x9c63
testl %eax, %eax
jne 0x65e9
movq %r15, %rdi
callq 0xfff6
testq %rax, %rax
movl 0x14(%rsp), %r12d
movl $0x1, %ecx
je 0x5dde
movq %rbx, %rdi
movq %rax, %rsi
callq 0x78d1
movq 0x8(%rsp), %rbx
movq 0x20(%rsp), %rbp
movl 0x10(%rsp), %r13d
movq 0x18(%rsp), %rax
movl $0xffffffff, 0x4(%rbx,%rax,8) # imm = 0xFFFFFFFF
cmpl $0x0, 0x14(%r14)
jg 0x5e41
jmp 0x65fa
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 0x9c63
movl $0x1, %ecx
testl %eax, %eax
jne 0x5dde
jmp 0x5e01
movl $0x1, %ecx
jmp 0x5dde
andl $0x10, %r12d
movl %r12d, %r13d
xorl %ecx, %ecx
testl %r13d, %r13d
je 0x5dde
movl $0xa, %edi
callq 0x2040
xorl %ecx, %ecx
jmp 0x5dde