// File: /workspace/github_c_makefile_star2_O2/mmcco[P]sljit/regex_src/regexJIT.c
// Function: compile_uncond_tran
static int compile_uncond_tran(struct compiler_common *compiler_common, int reg)
{
	struct sljit_compiler *compiler = compiler_common->compiler;
	struct stack *stack = &compiler_common->stack;
	struct stack_item *search_states = compiler_common->search_states;
	int flags = compiler_common->flags;
	long no_states = compiler_common->no_states;
	unsigned long head = 0;
	long offset, value;

	if (reg != R_CURR_STATE || !(compiler_common->flags & REGEX_FAKE_MATCH_BEGIN)) {
		CHECK(trace_transitions(0, compiler_common));
	}
	else {
		CHECK(trace_transitions(1, compiler_common));
	}

	while (stack->count > 0) {
		value = stack_pop(stack)->value;
		if (search_states[value].type >= 0) {
			offset = TERM_OFFSET_OF(search_states[value].type, 0);
			EMIT_OP1(SLJIT_MOV, SLJIT_MEM1(reg), TERM_REL_OFFSET_OF(offset, 1), SLJIT_IMM, head);
			if (offset > 0)
				head = offset;

			if (!(flags & REGEX_MATCH_BEGIN)) {
				EMIT_OP1(SLJIT_MOV, SLJIT_MEM1(reg), TERM_REL_OFFSET_OF(offset, 2), R_TEMP, 0);
				if (flags & REGEX_ID_CHECK) {
					EMIT_OP1(SLJIT_MOV, SLJIT_MEM1(reg), TERM_REL_OFFSET_OF(offset, 3), SLJIT_IMM, search_states[value].value);
				}
			}
			else if (flags & REGEX_ID_CHECK) {
				EMIT_OP1(SLJIT_MOV, SLJIT_MEM1(reg), TERM_REL_OFFSET_OF(offset, 2), SLJIT_IMM, search_states[value].value);
			}
		}
		search_states[value].value = -1;
	}
	if (reg == R_NEXT_STATE) {
		EMIT_OP1(SLJIT_MOV, R_TEMP, 0, R_NEXT_HEAD, 0);
	}
	else if (flags & REGEX_FAKE_MATCH_BEGIN) {
		SLJIT_ASSERT(compiler_common->dfa_transitions[1].type == type_newline && !compiler_common->dfa_transitions[1].value);
		offset = TERM_OFFSET_OF(search_states[1].type, 0);

		SLJIT_ASSERT(!(flags & REGEX_MATCH_BEGIN));

		EMIT_OP1(SLJIT_MOV, SLJIT_MEM1(reg), TERM_REL_OFFSET_OF(offset, 1), SLJIT_IMM, head);
		head = offset;

		EMIT_OP1(SLJIT_MOV, SLJIT_MEM1(reg), TERM_REL_OFFSET_OF(offset, 2), SLJIT_IMM, 1);
		if (flags & REGEX_ID_CHECK) {
			EMIT_OP1(SLJIT_MOV, SLJIT_MEM1(reg), TERM_REL_OFFSET_OF(offset, 3), SLJIT_IMM, 0);
		}
	}
	EMIT_OP1(SLJIT_MOV, R_NEXT_HEAD, 0, SLJIT_IMM, head);
	return REGEX_NO_ERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r12
movq 0x68(%rdi), %r15
movq 0x60(%rdi), %r14
movl 0x30(%rdi), %ecx
movq 0x48(%rdi), %r13
movl %esi, 0x1c(%rsp)
cmpl $0xc, %esi
setne %al
movl %ecx, 0xc(%rsp)
btl $0x9, %ecx
setae %cl
orb %al, %cl
pushq $0x1
popq %rbx
cmpb $0x1, %cl
jne 0x5fe9
xorl %edi, %edi
jmp 0x5feb
movl %ebx, %edi
movq %r12, %rsi
callq 0x5e62
testl %eax, %eax
jne 0x61ae
movq %r15, 0x10(%rsp)
shlq $0x3, %r13
movq %r13, 0x20(%rsp)
movl 0x1c(%rsp), %r13d
orl $0x80, %r13d
xorl %r15d, %r15d
cmpl $0x0, 0x14(%r12)
jle 0x60db
movq %r12, %rdi
callq 0x5f64
movslq 0x4(%rax), %rbx
movslq (%r14,%rbx,8), %rbp
testq %rbp, %rbp
js 0x60c8
imulq 0x20(%rsp), %rbp
leaq 0x8(%rbp), %rcx
movq 0x10(%rsp), %rdi
pushq $0x20
popq %rsi
movl %r13d, %edx
pushq $0x40
popq %r8
movq %r15, %r9
callq 0x95f5
testl %eax, %eax
jne 0x60d3
testq %rbp, %rbp
cmovgq %rbp, %r15
movl 0xc(%rsp), %eax
testb $0x1, %al
jne 0x609e
leaq 0x10(%rbp), %rcx
movq 0x10(%rsp), %rdi
pushq $0x20
popq %rsi
movl %r13d, %edx
pushq $0x3
popq %r8
xorl %r9d, %r9d
callq 0x95f5
testl %eax, %eax
jne 0x60d3
btl $0x8, 0xc(%rsp)
jae 0x60c8
addq $0x18, %rbp
jmp 0x60a8
btl $0x8, %eax
jae 0x60c8
addq $0x10, %rbp
movslq 0x4(%r14,%rbx,8), %r9
movq 0x10(%rsp), %rdi
pushq $0x20
popq %rsi
movl %r13d, %edx
movq %rbp, %rcx
pushq $0x40
popq %r8
callq 0x95f5
testl %eax, %eax
jne 0x60d3
orl $-0x1, 0x4(%r14,%rbx,8)
jmp 0x6018
pushq $0x1
popq %rbx
jmp 0x61ae
cmpl $0xb, 0x1c(%rsp)
jne 0x610b
pushq $0x20
popq %rsi
pushq $0x3
popq %rdx
pushq $0xa
popq %r8
movq 0x10(%rsp), %r13
movq %r13, %rdi
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x95f5
testl %eax, %eax
pushq $0x1
popq %rbx
jne 0x61ae
jmp 0x611b
btl $0x9, 0xc(%rsp)
pushq $0x1
popq %rbx
movq 0x10(%rsp), %r13
jb 0x613b
pushq $0x20
popq %rsi
pushq $0xa
popq %rdx
pushq $0x40
popq %r8
movq %r13, %rdi
xorl %ecx, %ecx
movq %r15, %r9
callq 0x95f5
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
jmp 0x61ae
movq 0x58(%r12), %rax
cmpl $0x3, 0x8(%rax)
jne 0x61f0
cmpl $0x0, 0xc(%rax)
jne 0x61f0
movl 0xc(%rsp), %ebp
testb $0x1, %bpl
jne 0x61fe
movslq 0x8(%r14), %rax
movq 0x20(%rsp), %r14
imulq %rax, %r14
leaq 0x8(%r14), %rcx
pushq $0x20
popq %rsi
pushq $0x40
popq %r8
movq %r13, %rdi
movl $0x8c, %edx
movq %r15, %r9
callq 0x95f5
testl %eax, %eax
jne 0x61ae
leaq 0x10(%r14), %rcx
pushq $0x20
popq %rsi
pushq $0x40
popq %r8
pushq $0x1
popq %r9
movq %r13, %rdi
movl $0x8c, %edx
callq 0x95f5
testl %eax, %eax
je 0x61bf
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %r15
btl $0x8, %ebp
jae 0x611b
leaq 0x18(%r15), %rcx
pushq $0x20
popq %rsi
pushq $0x40
popq %r8
movq %r13, %rdi
movl $0x8c, %edx
xorl %r9d, %r9d
callq 0x95f5
testl %eax, %eax
jne 0x61ae
jmp 0x611b
leaq 0xc501(%rip), %rdi      # 0x126f8
movl $0x54a, %esi            # imm = 0x54A
jmp 0x620a
leaq 0xc4f3(%rip), %rdi      # 0x126f8
movl $0x54d, %esi            # imm = 0x54D
xorl %eax, %eax
callq 0x2080
callq 0x2050