// File: /workspace/github_c_makefile_star2_O0/MaoKo[P]FGFX/fgfl/src/nfa.c
// Function: new_nfa_state
nfa_state_t*
new_nfa_state(int symbol_edge, ...) {
    nfa_state_t* state = NEW(nfa_state_t, 1);

    if (!state)
        { return (NULL_NFA_STATE); }
    memset(state, 0, sizeof(*state));

    if (!record_nfa_state)
        { record_nfa_state = new_vector(); }

    va_list args;
    va_start(args, symbol_edge);

    state->symbol_edge = symbol_edge;
    switch (symbol_edge) {
        case EDGE_AUTOMATA:
            state->edge = va_arg(args, nfa_automaton_t*);
            state->edge2 = va_arg(args, nfa_automaton_t*);
            break;

        case EDGE_CLASS:
            state->class = va_arg(args, bitset_t*);            
            state->out_state = va_arg(args, nfa_state_t*);
            break;

        case NO_EDGE:
            break;

        default:
            state->out_state = va_arg(args, nfa_state_t*);
    }

    state->final_type = NO_FINAL;

    state->index = SIZE_VECTOR(record_nfa_state);
    PUSH_BACK_VECTOR(record_nfa_state, state);

    va_end(args);
    return (state);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
testb %al, %al
je 0x6498
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
movq %rsi, -0xd8(%rbp)
movl %edi, -0xc(%rbp)
movl $0x38, %edi
callq 0x38d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x64e0
movq $0x0, -0x8(%rbp)
jmp 0x67c6
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x10b0
cmpq $0x0, 0x1b8b8(%rip)     # 0x21db0
jne 0x6506
callq 0x1f00
movq %rax, 0x1b8aa(%rip)     # 0x21db0
leaq -0xe0(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x30, -0x2c(%rbp)
movl $0x8, -0x30(%rbp)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0xc(%rbp), %eax
movl %eax, -0xe4(%rbp)
subl $-0x4, %eax
je 0x6716
jmp 0x6545
movl -0xe4(%rbp), %eax
subl $-0x2, %eax
je 0x6640
jmp 0x6556
movl -0xe4(%rbp), %eax
subl $-0x1, %eax
jne 0x6718
jmp 0x6567
leaq -0x30(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0xe8(%rbp)
cmpl $0x28, %eax
ja 0x65a2
movq -0xf0(%rbp), %rcx
movl -0xe8(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0xf8(%rbp)
jmp 0x65bf
movq -0xf0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
leaq -0x30(%rbp), %rax
movq %rax, -0x108(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0xfc(%rbp)
cmpl $0x28, %eax
ja 0x660c
movq -0x108(%rbp), %rcx
movl -0xfc(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x110(%rbp)
jmp 0x6629
movq -0x108(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x6782
leaq -0x30(%rbp), %rax
movq %rax, -0x120(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x114(%rbp)
cmpl $0x28, %eax
ja 0x667b
movq -0x120(%rbp), %rcx
movl -0x114(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x128(%rbp)
jmp 0x6698
movq -0x120(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
leaq -0x30(%rbp), %rax
movq %rax, -0x138(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x12c(%rbp)
cmpl $0x28, %eax
ja 0x66e5
movq -0x138(%rbp), %rcx
movl -0x12c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x140(%rbp)
jmp 0x6702
movq -0x138(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x6782
jmp 0x6782
leaq -0x30(%rbp), %rax
movq %rax, -0x150(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x144(%rbp)
cmpl $0x28, %eax
ja 0x6753
movq -0x150(%rbp), %rcx
movl -0x144(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x158(%rbp)
jmp 0x6770
movq -0x150(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movq 0x1b61c(%rip), %rax     # 0x21db0
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq 0x1b60a(%rip), %rdi     # 0x21db0
movq 0x1b603(%rip), %rax     # 0x21db0
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x2090
leaq -0x30(%rbp), %rax
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
nopw %cs:(%rax,%rax)