// File: /workspace/github_c_makefile_star2_O3/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 $0x38, %rsp
movq %rdi, %r15
movq 0x68(%rdi), %rax
movq %rax, 0x18(%rsp)
movq 0x60(%rdi), %r12
movl 0x30(%rdi), %ecx
movq 0x48(%rdi), %rax
movq %rax, 0x28(%rsp)
movl %esi, 0x24(%rsp)
cmpl $0xc, %esi
setne %al
movl %ecx, 0xc(%rsp)
btl $0x9, %ecx
setae %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x4f8c
xorl %edi, %edi
movq %r15, %rsi
callq 0x4dcb
movl $0x1, %ebp
jmp 0x4f9e
movl $0x1, %ebp
movl $0x1, %edi
movq %r15, %rsi
callq 0x4dcb
testl %eax, %eax
je 0x4fb3
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x14(%r15)
jle 0x50ce
movq 0x28(%rsp), %rax
leaq (,%rax,8), %rax
movq %rax, 0x30(%rsp)
movl 0x24(%rsp), %r13d
orl $0x80, %r13d
movq $0x0, 0x10(%rsp)
movq %r15, %rdi
callq 0x4ee0
movslq 0x4(%rax), %r14
movslq (%r12,%r14,8), %rbp
testq %rbp, %rbp
js 0x50b8
imulq 0x30(%rsp), %rbp
leaq 0x8(%rbp), %rcx
movq 0x18(%rsp), %rdi
movl $0x20, %esi
movl %r13d, %ebx
movl %r13d, %edx
movl $0x40, %r8d
movq 0x10(%rsp), %r13
movq %r13, %r9
callq 0x9c63
testl %eax, %eax
jne 0x5142
testq %rbp, %rbp
cmovgq %rbp, %r13
movq %r13, 0x10(%rsp)
movl 0xc(%rsp), %eax
testb $0x1, %al
jne 0x507e
leaq 0x10(%rbp), %rcx
movq 0x18(%rsp), %rdi
movl $0x20, %esi
movl %ebx, %r13d
movl %ebx, %edx
movl $0x3, %r8d
xorl %r9d, %r9d
callq 0x9c63
testl %eax, %eax
jne 0x5142
btl $0x8, 0xc(%rsp)
jae 0x50b8
addq $0x18, %rbp
jmp 0x508b
btl $0x8, %eax
movl %ebx, %r13d
jae 0x50b8
addq $0x10, %rbp
movslq 0x4(%r12,%r14,8), %r9
movq 0x18(%rsp), %rdi
movl $0x20, %esi
movl %r13d, %edx
movq %rbp, %rcx
movl $0x40, %r8d
callq 0x9c63
testl %eax, %eax
movl $0x1, %ebp
jne 0x4fa2
movl $0xffffffff, 0x4(%r12,%r14,8) # imm = 0xFFFFFFFF
cmpl $0x0, 0x14(%r15)
jg 0x4fe5
jmp 0x50d7
movq $0x0, 0x10(%rsp)
cmpl $0xb, 0x24(%rsp)
jne 0x510c
movq 0x18(%rsp), %rdi
movl $0x20, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0xa, %r8d
xorl %r9d, %r9d
callq 0x9c63
movl $0x1, %ebp
testl %eax, %eax
jne 0x4fa2
jmp 0x5114
btl $0x9, 0xc(%rsp)
jb 0x514c
movq 0x18(%rsp), %rdi
movl $0x20, %esi
movl $0xa, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
movq 0x10(%rsp), %r9
callq 0x9c63
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
jmp 0x4fa2
movl $0x1, %ebp
jmp 0x4fa2
movq 0x58(%r15), %rax
cmpl $0x3, 0x8(%rax)
jne 0x5219
cmpl $0x0, 0xc(%rax)
jne 0x5219
testb $0x1, 0xc(%rsp)
movq 0x28(%rsp), %r14
movq 0x10(%rsp), %r9
jne 0x5227
movslq 0x8(%r12), %rax
imulq %rax, %r14
shlq $0x3, %r14
leaq 0x8(%r14), %rcx
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
movl $0x20, %esi
movl $0x8c, %edx
movl $0x40, %r8d
callq 0x9c63
movl $0x1, %ebp
testl %eax, %eax
jne 0x4fa2
leaq 0x10(%r14), %rcx
movl $0x1, %r9d
movq %rbx, %rdi
movl $0x20, %esi
movl $0x8c, %edx
movl $0x40, %r8d
callq 0x9c63
testl %eax, %eax
jne 0x4fa2
btl $0x8, 0xc(%rsp)
jb 0x51f0
movq %r14, 0x10(%rsp)
jmp 0x5114
leaq 0x18(%r14), %rcx
movq %rbx, %rdi
movl $0x20, %esi
movl $0x8c, %edx
movl $0x40, %r8d
xorl %r9d, %r9d
callq 0x9c63
movq %r14, 0x10(%rsp)
jmp 0x5102
leaq 0xe4d8(%rip), %rdi      # 0x136f8
movl $0x54a, %esi            # imm = 0x54A
jmp 0x5233
leaq 0xe4ca(%rip), %rdi      # 0x136f8
movl $0x54d, %esi            # imm = 0x54D
xorl %eax, %eax
callq 0x2080
callq 0x2050