// File: /workspace/github_c_makefile_star2_O1/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 0x5c52(%rip), %r14      # 0xb8c8
leaq 0x2412(%rip), %r15      # 0x808f
leaq 0x2426(%rip), %r12      # 0x80aa
testq %rbx, %rbx
je 0x5d2f
movl (%rbx), %eax
cmpq $0xc, %rax
ja 0x5d2f
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
xorl %eax, %eax
movq 0x10(%rbx), %rbx
movl (%rbx), %ecx
cmpl $0x6, %ecx
jne 0x5cb4
incq %rax
jmp 0x5ca4
cmpl $0xa, %ecx
je 0x5cbe
cmpl $0xc, %ecx
jne 0x5d1f
testb $0x1, %al
jne 0x5c84
jmp 0x5eaf
movq 0x10(%rbx), %r13
cmpb $0x1, 0x8(%rbx)
jne 0x5ce0
movq %r13, %rdi
leaq 0x240b(%rip), %rsi      # 0x80e6
callq 0x8242
cmpb $0x1, 0x9(%rbx)
jne 0x5cf1
movq %r13, %rdi
movq %r15, %rsi
callq 0x8242
cmpb $0x1, 0xa(%rbx)
jne 0x5d02
movq %r13, %rdi
movq %r12, %rsi
callq 0x8242
cmpb $0x1, 0xb(%rbx)
movq %r13, %rbx
jne 0x5c84
movq %r13, %rdi
callq 0x82a6
movq %r13, %rbx
jmp 0x5c84
leaq 0x5bea(%rip), %rsi      # 0xb910
xorl %edi, %edi
xorl %eax, %eax
callq 0x4060
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 0x562e
testq %rax, %rax
je 0x5d2f
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 0x5a70
movl $0xfffffffc, %edi       # imm = 0xFFFFFFFC
xorl %eax, %eax
callq 0x562e
testq %rax, %rax
je 0x5d2f
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 0x5a70
movb 0x8(%rbx), %r14b
callq 0x247c
movq %rax, %rbx
cmpl $0xa, 0x4(%rax)
ja 0x5ee5
movl $0xa, %esi
movq %rbx, %rdi
callq 0x25a8
jmp 0x5ef0
movq 0x10(%rbx), %rdi
callq 0x5c5e
testq %rax, %rax
je 0x5d2f
movq %rax, %rbx
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq %rax, %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x562e
testq %rax, %rax
je 0x5f4d
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 0x5a70
movl $0xb, %edi
xorl %eax, %eax
callq 0x7948
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 0x5f8f
movq 0x10(%rbx), %rdi
callq 0x7d00
movl $0x3, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x7948
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 0x606e
movq 0x8(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6132
cmpl $0xa, %ecx
jne 0x5f19
callq 0x247c
movq %rax, %r14
movslq 0x8(%rbx), %rcx
movl 0x4(%rax), %eax
cmpq %rax, %rcx
jae 0x5f5a
movl $0x1, %eax
shlq %cl, %rax
movq 0x8(%r14), %rdx
shrq $0x6, %rcx
orq %rax, (%rdx,%rcx,8)
jmp 0x5f65
movq 0x8(%rbx), %rax
orq $0x400, (%rax)          # imm = 0x400
movl $0x3, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2809
testb %r14b, %r14b
je 0x5f32
cmpl $0xa, 0x4(%rbx)
ja 0x5f27
movl $0xa, %esi
movq %rbx, %rdi
callq 0x25a8
jmp 0x5f32
movq 0x8(%rbx), %rdi
callq 0x24f8
movq %rax, %r14
jmp 0x5f65
movq 0x8(%rbx), %rax
orq $0x400, (%rax)          # imm = 0x400
movq %rbx, %rdi
callq 0x6132
movq %rax, %r14
movq %rbx, %rdi
callq 0x24ca
movq %r14, %rax
jmp 0x5d31
movq %rbx, %rdi
callq 0x5603
jmp 0x5d2f
movq %r14, %rdi
movq %rcx, %rsi
callq 0x25a8
movl $0x3, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2809
movq %rax, %rdi
callq 0x6132
movq %rax, %rbx
movq %r14, %rdi
callq 0x24ca
movq %rbx, %rax
jmp 0x5d31