// File: /workspace/github_c_makefile_star2_O2/MaoKo[P]FGFX/fgfl/src/nfa.c
// Function: dfs_regex_node
static nfa_automaton_t* 
dfs_regex_node(regex_node_t* root) {
    if (root) {
        switch (root->kind_ast) {
            case AST_UNION:
                return (regex_node_union(root));

            case AST_LOOK:
            case AST_CONCAT:
                return (regex_node_concat(root));

            case AST_QUES:
            case AST_PLUS:
            case AST_STAR:
                return (regex_node_closure(root));

            case AST_TILDE:
                return (regex_node_tilde(root->left));

            case AST_OPTION:
                return (regex_node_option(root));

            case AST_SYMBOL:
                return (regex_node_symbol(root->symbol));

            case AST_EPSILON:
                return (regex_node_epsilon());

            case AST_DOT:
                return (regex_node_dot(root->is_dotall));

            case AST_CLASS:
                return (regex_node_class(root->class));

            default:
                break;
        }   
    }
    return (NULL_AUTOMATON);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x60e6(%rip), %r14      # 0xb8b0
leaq 0x2120(%rip), %r15      # 0x78f1
leaq 0x2130(%rip), %r12      # 0x7908
testq %rbx, %rbx
je 0x5883
movl (%rbx), %eax
cmpq $0xc, %rax
ja 0x5883
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
xorl %eax, %eax
movq 0x10(%rbx), %rbx
movl (%rbx), %ecx
cmpl $0x6, %ecx
jne 0x5808
incq %rax
jmp 0x57f8
cmpl $0xa, %ecx
je 0x5812
cmpl $0xc, %ecx
jne 0x5873
testb $0x1, %al
jne 0x57d8
jmp 0x59e8
movq 0x10(%rbx), %r13
cmpb $0x1, 0x8(%rbx)
jne 0x5834
movq %r13, %rdi
leaq 0x2111(%rip), %rsi      # 0x7940
callq 0x7a84
cmpb $0x1, 0x9(%rbx)
jne 0x5845
movq %r13, %rdi
movq %r15, %rsi
callq 0x7a84
cmpb $0x1, 0xa(%rbx)
jne 0x5856
movq %r13, %rdi
movq %r12, %rsi
callq 0x7a84
cmpb $0x1, 0xb(%rbx)
movq %r13, %rbx
jne 0x57d8
movq %r13, %rdi
callq 0x7ae8
movq %r13, %rbx
jmp 0x57d8
leaq 0x6082(%rip), %rsi      # 0xb8fc
xorl %edi, %edi
xorl %eax, %eax
callq 0x3bdc
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x8(%rbx), %ebx
pushq $-0x4
popq %rdi
xorl %eax, %eax
callq 0x519a
testq %rax, %rax
je 0x5883
pushq $0x4
popq %rdi
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5567
pushq $-0x4
popq %rdi
xorl %eax, %eax
callq 0x519a
testq %rax, %rax
je 0x5883
pushq $0x5
popq %rdi
movq %rax, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5567
movq 0x10(%rbx), %rdi
callq 0x57b2
testq %rax, %rax
je 0x5883
movq %rax, %rbx
pushq $-0x1
popq %rdi
movq %rax, %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x519a
testq %rax, %rax
je 0x5a7d
movq 0x28(%rbx), %rcx
cmpl $-0x4, 0x10(%rcx)
movl $0x101, %edx            # imm = 0x101
pushq $-0x3
popq %rsi
cmovel %edx, %esi
movl %esi, 0x10(%rcx)
movq %rax, 0x18(%rcx)
pushq $0x1
popq %rdi
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5567
movb 0x8(%rbx), %r14b
callq 0x230c
movq %rax, %rbx
cmpl $0xa, 0x4(%rax)
ja 0x5a19
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0x23f9
jmp 0x5a24
pushq $0xb
popq %rdi
xorl %eax, %eax
callq 0x71a4
movq %rax, 0x18(%rbx)
andl $0x0, (%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5abd
movq 0x10(%rbx), %rdi
callq 0x7572
pushq $0x3
popq %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x71a4
movq %rax, 0x18(%rbx)
movl $0x1, (%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5b8d
movq 0x8(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5c47
cmpl $0xa, %ecx
jne 0x5a49
callq 0x230c
movq %rax, %r14
movslq 0x8(%rbx), %rcx
movl 0x4(%rax), %eax
cmpq %rax, %rcx
jae 0x5a8a
pushq $0x1
popq %rax
shlq %cl, %rax
movq 0x8(%r14), %rdx
shrq $0x6, %rcx
orq %rax, (%rdx,%rcx,8)
jmp 0x5a95
movq 0x8(%rbx), %rax
orq $0x400, (%rax)          # imm = 0x400
pushq $0x3
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x261d
testb %r14b, %r14b
je 0x5a62
cmpl $0xa, 0x4(%rbx)
ja 0x5a57
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0x23f9
jmp 0x5a62
movq 0x8(%rbx), %rdi
callq 0x237f
movq %rax, %r14
jmp 0x5a95
movq 0x8(%rbx), %rax
orq $0x400, (%rax)          # imm = 0x400
movq %rbx, %rdi
callq 0x5c47
movq %rax, %r14
movq %rbx, %rdi
callq 0x2351
movq %r14, %rax
jmp 0x5885
movq %rbx, %rdi
callq 0x516f
jmp 0x5883
movq %r14, %rdi
movq %rcx, %rsi
callq 0x23f9
pushq $0x3
popq %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x261d
movq %rax, %rdi
callq 0x5c47
movq %rax, %rbx
movq %r14, %rdi
callq 0x2351
movq %rbx, %rax
jmp 0x5885