// File: /workspace/github_c_makefile_star2_O1/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 0x505c
xorl %edi, %edi
movq %r15, %rsi
callq 0x4e9d
movl $0x1, %ebp
jmp 0x506e
movl $0x1, %ebp
movl $0x1, %edi
movq %r15, %rsi
callq 0x4e9d
testl %eax, %eax
je 0x5083
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x14(%r15)
jle 0x519e
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 0x4fb0
movslq 0x4(%rax), %r14
movslq (%r12,%r14,8), %rbp
testq %rbp, %rbp
js 0x5188
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 0x9cef
testl %eax, %eax
jne 0x5212
testq %rbp, %rbp
cmovgq %rbp, %r13
movq %r13, 0x10(%rsp)
movl 0xc(%rsp), %eax
testb $0x1, %al
jne 0x514e
leaq 0x10(%rbp), %rcx
movq 0x18(%rsp), %rdi
movl $0x20, %esi
movl %ebx, %r13d
movl %ebx, %edx
movl $0x3, %r8d
xorl %r9d, %r9d
callq 0x9cef
testl %eax, %eax
jne 0x5212
btl $0x8, 0xc(%rsp)
jae 0x5188
addq $0x18, %rbp
jmp 0x515b
btl $0x8, %eax
movl %ebx, %r13d
jae 0x5188
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 0x9cef
testl %eax, %eax
movl $0x1, %ebp
jne 0x5072
movl $0xffffffff, 0x4(%r12,%r14,8) # imm = 0xFFFFFFFF
cmpl $0x0, 0x14(%r15)
jg 0x50b5
jmp 0x51a7
movq $0x0, 0x10(%rsp)
cmpl $0xb, 0x24(%rsp)
jne 0x51dc
movq 0x18(%rsp), %rdi
movl $0x20, %esi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0xa, %r8d
xorl %r9d, %r9d
callq 0x9cef
movl $0x1, %ebp
testl %eax, %eax
jne 0x5072
jmp 0x51e4
btl $0x9, 0xc(%rsp)
jb 0x521c
movq 0x18(%rsp), %rdi
movl $0x20, %esi
movl $0xa, %edx
xorl %ecx, %ecx
movl $0x40, %r8d
movq 0x10(%rsp), %r9
callq 0x9cef
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
jmp 0x5072
movl $0x1, %ebp
jmp 0x5072
movq 0x58(%r15), %rax
cmpl $0x3, 0x8(%rax)
jne 0x52e9
cmpl $0x0, 0xc(%rax)
jne 0x52e9
testb $0x1, 0xc(%rsp)
movq 0x28(%rsp), %r14
movq 0x10(%rsp), %r9
jne 0x52f7
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 0x9cef
movl $0x1, %ebp
testl %eax, %eax
jne 0x5072
leaq 0x10(%r14), %rcx
movl $0x1, %r9d
movq %rbx, %rdi
movl $0x20, %esi
movl $0x8c, %edx
movl $0x40, %r8d
callq 0x9cef
testl %eax, %eax
jne 0x5072
btl $0x8, 0xc(%rsp)
jb 0x52c0
movq %r14, 0x10(%rsp)
jmp 0x51e4
leaq 0x18(%r14), %rcx
movq %rbx, %rdi
movl $0x20, %esi
movl $0x8c, %edx
movl $0x40, %r8d
xorl %r9d, %r9d
callq 0x9cef
movq %r14, 0x10(%rsp)
jmp 0x51d2
leaq 0xe3ec(%rip), %rdi      # 0x136dc
movl $0x54a, %esi            # imm = 0x54A
jmp 0x5303
leaq 0xe3de(%rip), %rdi      # 0x136dc
movl $0x54d, %esi            # imm = 0x54D
xorl %eax, %eax
callq 0x2080
callq 0x2050