// File: /workspace/github_c_makefile_star2_O3/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
testq %rdi, %rdi
je 0x5bfa
movq %rdi, %rbx
leaq 0x5d81(%rip), %r14      # 0xb8c8
leaq 0x2423(%rip), %r15      # 0x7f71
leaq 0x2433(%rip), %r12      # 0x7f88
movl (%rbx), %eax
cmpq $0xc, %rax
ja 0x5bfa
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
xorl %eax, %eax
jmp 0x5b71
incq %rax
movq 0x10(%rbx), %rbx
movl (%rbx), %ecx
cmpl $0x6, %ecx
je 0x5b6e
cmpl $0xa, %ecx
je 0x5b86
cmpl $0xc, %ecx
jne 0x5bea
testb $0x1, %al
je 0x5d7a
movq %rbx, %r13
jmp 0x5bdc
movq 0x10(%rbx), %r13
cmpb $0x1, 0x8(%rbx)
jne 0x5bac
movq %r13, %rdi
leaq 0x2419(%rip), %rsi      # 0x7fc0
callq 0x8119
cmpb $0x1, 0x9(%rbx)
jne 0x5bbd
movq %r13, %rdi
movq %r15, %rsi
callq 0x8119
cmpb $0x1, 0xa(%rbx)
jne 0x5bce
movq %r13, %rdi
movq %r12, %rsi
callq 0x8119
cmpb $0x1, 0xb(%rbx)
jne 0x5bdc
movq %r13, %rdi
callq 0x817d
movq %r13, %rbx
testq %r13, %r13
jne 0x5b55
jmp 0x5bfa
leaq 0x5d1f(%rip), %rsi      # 0xb910
xorl %edi, %edi
xorl %eax, %eax
callq 0x3f64
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x8(%rbx), %ebx
movl $0xfffffffc, %edi       # imm = 0xFFFFFFFC
xorl %eax, %eax
callq 0x54aa
testq %rax, %rax
je 0x5bfa
movl $0x4, %edi
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 0x58d4
movq 0x8(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5ffb
movl $0xfffffffc, %edi       # imm = 0xFFFFFFFC
xorl %eax, %eax
callq 0x54aa
testq %rax, %rax
je 0x5bfa
movl $0x5, %edi
movq %rax, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x58d4
movq 0x10(%rbx), %rdi
callq 0x5b26
testq %rax, %rax
je 0x5bfa
movq %rax, %rbx
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq %rax, %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x54aa
testq %rax, %rax
je 0x5e18
movq 0x28(%rbx), %rcx
cmpl $-0x4, 0x10(%rcx)
movl $0x101, %edx            # imm = 0x101
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
cmovel %edx, %esi
movl %esi, 0x10(%rcx)
movq %rax, 0x18(%rcx)
movl $0x1, %edi
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 0x58d4
movb 0x8(%rbx), %r14b
callq 0x247c
movq %rax, %rbx
cmpl $0xa, 0x4(%rax)
ja 0x5db0
movl $0xa, %esi
movq %rbx, %rdi
callq 0x25b0
jmp 0x5dbb
movl $0xb, %edi
xorl %eax, %eax
callq 0x77d0
movq %rax, 0x18(%rbx)
movl $0x0, (%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5e5a
movq 0x10(%rbx), %rdi
callq 0x7bc7
movl $0x3, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x77d0
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 0x5f39
cmpl $0xa, %ecx
jne 0x5de4
callq 0x247c
movq %rax, %r14
movslq 0x8(%rbx), %rcx
movl 0x4(%rax), %eax
cmpq %rax, %rcx
jae 0x5e25
movl $0x1, %eax
shlq %cl, %rax
movq 0x8(%r14), %rdx
shrq $0x6, %rcx
orq %rax, (%rdx,%rcx,8)
jmp 0x5e30
movq 0x8(%rbx), %rax
orq $0x400, (%rax)          # imm = 0x400
movl $0x3, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x27f4
testb %r14b, %r14b
je 0x5dfd
cmpl $0xa, 0x4(%rbx)
ja 0x5df2
movl $0xa, %esi
movq %rbx, %rdi
callq 0x25b0
jmp 0x5dfd
movq 0x8(%rbx), %rdi
callq 0x24f4
movq %rax, %r14
jmp 0x5e30
movq 0x8(%rbx), %rax
orq $0x400, (%rax)          # imm = 0x400
movq %rbx, %rdi
callq 0x5ffb
movq %rax, %r14
movq %rbx, %rdi
callq 0x24c6
movq %r14, %rax
jmp 0x5bfc
movq %rbx, %rdi
callq 0x547f
jmp 0x5bfa
movq %r14, %rdi
movq %rcx, %rsi
callq 0x25b0
movl $0x3, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x27f4
movq %rax, %rdi
callq 0x5ffb
movq %rax, %rbx
movq %r14, %rdi
callq 0x24c6
movq %rbx, %rax
jmp 0x5bfc