// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/regex_src/regexJIT.c
// Function: trace_transitions
static int trace_transitions(int from, struct compiler_common *compiler_common)
{
	int id = 0;
	struct stack *stack = &compiler_common->stack;
	struct stack *depth = &compiler_common->depth;
	struct stack_item *dfa_transitions = compiler_common->dfa_transitions;
	struct stack_item *search_states = compiler_common->search_states;

	SLJIT_ASSERT(search_states[from].type >= 0);

	from++;

	/* Be prepared for any paths (loops, etc). */
	while (1) {
		if (dfa_transitions[from].type == type_id)
			if (id < dfa_transitions[from].value)
				id = dfa_transitions[from].value;

		if (search_states[from].value < id) {
			/* Forward step. */
			if (search_states[from].value == -1)
				if (stack_push(stack, 0, from))
					return REGEX_MEMORY_ERROR;
			search_states[from].value = id;

			if (dfa_transitions[from].type == type_branch) {
				if (stack_push(depth, id, from))
					return REGEX_MEMORY_ERROR;
				from++;
				continue;
			}
			else if (dfa_transitions[from].type == type_jump) {
				from = dfa_transitions[from].value;
				continue;
			}
			else if (search_states[from].type < 0) {
				from++;
				continue;
			}
		}

		/* Back tracking. */
		if (depth->count > 0) {
			id = stack_top(depth)->type;
			from = dfa_transitions[stack_pop(depth)->value].value;
			continue;
		}
		return 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movslq -0x8(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,8)
jge 0x59d8
leaq 0x19e49(%rip), %rdi     # 0x1f810
movl $0x4d7, %esi            # imm = 0x4D7
movb $0x0, %al
callq 0x2060
callq 0x2040
jmp 0x59da
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
movq -0x30(%rbp), %rax
movslq -0x8(%rbp), %rcx
cmpl $0x4, (%rax,%rcx,8)
jne 0x5a13
movl -0x14(%rbp), %eax
movq -0x30(%rbp), %rcx
movslq -0x8(%rbp), %rdx
cmpl 0x4(%rcx,%rdx,8), %eax
jge 0x5a11
movq -0x30(%rbp), %rax
movslq -0x8(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
movl %eax, -0x14(%rbp)
jmp 0x5a13
movq -0x38(%rbp), %rax
movslq -0x8(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
cmpl -0x14(%rbp), %eax
jge 0x5ae7
movq -0x38(%rbp), %rax
movslq -0x8(%rbp), %rcx
cmpl $-0x1, 0x4(%rax,%rcx,8)
jne 0x5a58
movq -0x20(%rbp), %rdi
movl -0x8(%rbp), %edx
xorl %esi, %esi
callq 0x8980
cmpl $0x0, %eax
je 0x5a56
movl $0x1, -0x4(%rbp)
jmp 0x5b2e
jmp 0x5a58
movl -0x14(%rbp), %edx
movq -0x38(%rbp), %rax
movslq -0x8(%rbp), %rcx
movl %edx, 0x4(%rax,%rcx,8)
movq -0x30(%rbp), %rax
movslq -0x8(%rbp), %rcx
cmpl $0xa, (%rax,%rcx,8)
jne 0x5aa3
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x8(%rbp), %edx
callq 0x8980
cmpl $0x0, %eax
je 0x5a95
movl $0x1, -0x4(%rbp)
jmp 0x5b2e
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x59e3
movq -0x30(%rbp), %rax
movslq -0x8(%rbp), %rcx
cmpl $0xb, (%rax,%rcx,8)
jne 0x5ac5
movq -0x30(%rbp), %rax
movslq -0x8(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
movl %eax, -0x8(%rbp)
jmp 0x59e3
movq -0x38(%rbp), %rax
movslq -0x8(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,8)
jge 0x5ae1
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x59e3
jmp 0x5ae3
jmp 0x5ae5
jmp 0x5ae7
movq -0x28(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jle 0x5b27
movq -0x28(%rbp), %rdi
callq 0x9d20
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rdi
callq 0x5b40
movq %rax, %rcx
movq -0x40(%rbp), %rax
movslq 0x4(%rcx), %rcx
movl 0x4(%rax,%rcx,8), %eax
movl %eax, -0x8(%rbp)
jmp 0x59e3
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)