// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfl/src/regex.c
// Function: regex_closure
static regex_node_t*
regex_closure(void) {
    regex_node_t* root = regex_tilde();
    if (!root)
        { return (NULL_NODE); }

    while (in_first(regex_spec->lex, T_REG_STAR, T_REG_PLUS,
                                            T_REG_QUES, T_REG_LBRACE, -1)) {
        int closure_kind = advance_token(regex_spec->lex);
        switch (closure_kind) {
            case T_REG_PLUS:
                if (root->kind_ast != AST_PLUS)
                    { root = new_regex_node(AST_PLUS, root); }
                break;
            case T_REG_QUES:
                if (root->kind_ast != AST_QUES)
                    { root = new_regex_node(AST_QUES, root); }
                break;
            case T_REG_STAR:
                if (root->kind_ast != AST_STAR)
                    { root = new_regex_node(AST_STAR, root); }
                break;
            case T_REG_LBRACE: root = finite_seq(root);
                break;
        }
        if (!root)
            { return (NULL_NODE); }
    }
    return (root);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x17ba2(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x38ba
xorl %r12d, %r12d
cmpl $0xe, %eax
jne 0x6351
movq 0x17b8b(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
incq %r12
movq 0x17b79(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x38ba
jmp 0x6329
movq 0x17b68(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x38ba
cmpl $0x1c, %eax
jg 0x63d3
leal -0x8(%rax), %ecx
cmpl $0x5, %ecx
ja 0x64b0
leaq 0x55dc(%rip), %rax      # 0xb954
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x17b38(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
callq 0x6207
movq %rax, %rbx
movq 0x17b21(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
cmpq $0x9, %rax
je 0x6642
movq %rbx, %rdi
callq 0x7b74
movq 0x17b00(%rip), %rax     # 0x1dec0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x567c(%rip), %rsi      # 0xba4a
jmp 0x6ba3
leal -0x1d(%rax), %ecx
cmpl $0x3, %ecx
jae 0x6411
movl %eax, %edi
callq 0x6bb1
cmpl $-0x1, %eax
je 0x6b29
movl %eax, %ebx
movq 0x17acc(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
movl $0xa, %edi
movl %ebx, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x77d0
jmp 0x663f
cmpl $0x20, %eax
jne 0x65b7
movq 0x17a9f(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
movq 0x17a90(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x38ba
movl %eax, %ebx
leal -0x22(%rbx), %eax
cmpl $0x3, %eax
ja 0x671c
movl $0x0, -0x30(%rbp)
leaq 0x5518(%rip), %r15      # 0xb96c
movl $0x0, -0x2c(%rbp)
xorl %r13d, %r13d
xorl %r14d, %r14d
movq 0x17a58(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
addl $-0x22, %ebx
movslq (%r15,%rbx,4), %rax
addq %r15, %rax
jmpq *%rax
movb $0x1, %r14b
jmp 0x6492
movb $0x1, %al
movl %eax, -0x2c(%rbp)
jmp 0x6492
movb $0x1, %al
movl %eax, -0x30(%rbp)
jmp 0x6492
movb $0x1, %r13b
movq 0x17a27(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x38ba
movl %eax, %ebx
addl $-0x22, %eax
cmpl $0x4, %eax
jb 0x6461
jmp 0x6730
cmpl $0x16, %eax
jne 0x65b7
callq 0x6d08
testq %rax, %rax
je 0x6b29
movq %rax, %rbx
movq 0x179ef(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
movl $0x13, %esi
movl $0x14, %edx
movl $0x15, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x38e8
testb %al, %al
je 0x684f
movl $0x2, %r13d
movq 0x179bb(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
movq %rax, %r14
movq 0x179a9(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x38ba
cmpl $0x16, %eax
jne 0x6912
callq 0x6d08
movq %rax, %r15
xorl %edi, %edi
cmpl $0x14, %r14d
setne %dil
cmpl $0x13, %r14d
movq 0x8(%rbx), %rsi
movq 0x8(%rax), %rdx
cmovel %r13d, %edi
callq 0x27f4
movq %r15, %rdi
callq 0x7b74
movq 0x17962(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
movl $0x13, %esi
movl $0x14, %edx
movl $0x15, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x38e8
testb %al, %al
jne 0x64fe
movq 0x8(%rbx), %rdi
callq 0x273a
testb %al, %al
je 0x664b
movq 0x17923(%rip), %rax     # 0x1dec0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x551f(%rip), %rsi      # 0xbaca
xorl %eax, %eax
callq 0x22f9
jmp 0x6860
movq 0x17902(%rip), %rax     # 0x1dec0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x549b(%rip), %rsi      # 0xba67
jmp 0x6ba3
movq 0x178e8(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
movq 0x178d9(%rip), %rax     # 0x1dec0
movq (%rax), %rax
movq 0x10(%rax), %rdi
movl $0x1, %esi
callq 0x30f3
movq 0x178c1(%rip), %rax     # 0x1dec0
movq (%rax), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
incq %rdi
callq 0x21f0
movl $0x8, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x77d0
jmp 0x663f
movq 0x17897(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
movl $0x9, %edi
xorl %esi, %esi
xorl %eax, %eax
callq 0x77d0
movq %rax, %rbx
testq %rbx, %rbx
je 0x6b29
testq %r12, %r12
je 0x6985
movl $0x6, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x77d0
movq %rax, %rbx
cmpq $0x1, %r12
je 0x697c
movl $0x6, %edi
jmp 0x696f
movq 0x1783f(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
movq 0x17830(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
movl $0xc, %esi
movl $0x70, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x38e8
testb %al, %al
jne 0x66c9
movq 0x1780c(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
movq %rax, %r14
cmpl $0x6f, %r14d
jne 0x6874
movl $0xb, %edi
xorl %eax, %eax
callq 0x77d0
movq %rax, %rbx
testq %rbx, %rbx
je 0x6b29
movq 0x177d8(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
cmpq $0xc, %rax
je 0x664b
movq %rbx, %rdi
callq 0x7b74
movq 0x177b7(%rip), %rax     # 0x1dec0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x545f(%rip), %rsi      # 0xbb76
jmp 0x6ba3
xorl %r14d, %r14d
xorl %r13d, %r13d
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movq 0x17789(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x38ba
cmpl $0x21, %eax
jne 0x67c1
movq 0x17775(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
movq 0x17766(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x38ba
movl %eax, %ebx
leal -0x22(%rbx), %eax
cmpl $0x3, %eax
ja 0x67c1
leaq 0x5209(%rip), %r15      # 0xb97c
movq 0x17746(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
addl $-0x22, %ebx
movslq (%r15,%rbx,4), %rax
addq %r15, %rax
jmpq *%rax
xorl %r14d, %r14d
jmp 0x67a8
movl $0x0, -0x2c(%rbp)
jmp 0x67a8
movl $0x0, -0x30(%rbp)
jmp 0x67a8
xorl %r13d, %r13d
movq 0x17711(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x38ba
movl %eax, %ebx
addl $-0x22, %eax
cmpl $0x4, %eax
jb 0x6773
movq 0x176f8(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
cmpq $0x26, %rax
jne 0x6835
callq 0x6207
testq %rax, %rax
je 0x6b29
movq %rax, %rbx
movq 0x176d2(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
cmpq $0x9, %rax
jne 0x68f8
andb $0x1, %r14b
movzbl %r14b, %esi
andb $0x1, %r13b
movzbl %r13b, %edx
movl -0x2c(%rbp), %eax
andb $0x1, %al
movzbl %al, %ecx
movl -0x30(%rbp), %eax
andb $0x1, %al
movzbl %al, %r8d
movl $0x7, %edi
movq %rbx, %r9
xorl %eax, %eax
callq 0x77d0
jmp 0x663f
movq 0x17684(%rip), %rax     # 0x1dec0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x5353(%rip), %rsi      # 0xbb9d
jmp 0x6ba3
movq 0x8(%rbx), %rdi
callq 0x273a
testb %al, %al
je 0x664b
movq 0x8(%rbx), %rdi
callq 0x24c6
movl $0xb, (%rbx)
jmp 0x664b
movl %r14d, %eax
xorl %ebx, %ebx
movl %eax, %edi
callq 0x6bb1
movl $0xa, %edi
movl %eax, %esi
movl $0x1, %edx
xorl %eax, %eax
callq 0x77d0
testq %rbx, %rbx
je 0x68aa
movl $0x1, %edi
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x77d0
movq %rax, %rbx
movq 0x1760c(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
movl $0xc, %esi
movl $0x70, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x38e8
testb %al, %al
jne 0x66d8
movq 0x175e4(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
cmpl $0x6f, %eax
jne 0x6879
cmpl $0x6f, %r14d
je 0x66c9
jmp 0x66d8
movq 0x175c1(%rip), %rax     # 0x1dec0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x52b6(%rip), %rsi      # 0xbbc3
jmp 0x6ba3
movq %rbx, %rdi
callq 0x7b74
cmpl $0x14, %r14d
leaq 0x519d(%rip), %rax      # 0xbac2
leaq 0x519a(%rip), %rcx      # 0xbac6
cmoveq %rax, %rcx
cmpl $0x13, %r14d
movq 0x17585(%rip), %rax     # 0x1dec0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x5175(%rip), %rdx      # 0xbabe
cmovneq %rcx, %rdx
leaq 0x5143(%rip), %rsi      # 0xba97
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x3f64
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rsi
xorl %eax, %eax
callq 0x77d0
movq %rax, %rbx
testq %rbx, %rbx
je 0x6b29
movq 0x17534(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
movl $0x5, %esi
movl $0x6, %edx
movl $0x7, %ecx
movl $0xf, %r8d
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x38e8
testb %al, %al
je 0x695d
movq 0x17504(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
cmpl $0x6, %eax
jg 0x69e3
cmpl $0x5, %eax
je 0x6b03
cmpl $0x6, %eax
jne 0x697c
movl $0x4, %edi
cmpl $0x4, (%rbx)
jne 0x696f
jmp 0x697c
cmpl $0x7, %eax
je 0x6b16
cmpl $0xf, %eax
jne 0x697c
movq 0x174c8(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
movq 0x174b9(%rip), %rcx     # 0x1dec0
movq (%rcx), %rcx
cmpq $0x11, %rax
jne 0x6b79
movq 0x10(%rcx), %rax
movq (%rax), %rdi
callq 0x21c0
movl %eax, %r13d
movslq %eax, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7cbb
movq %rax, %r14
movq 0x17485(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x38ba
cmpl $0x12, %eax
jne 0x6b5c
movq 0x1746d(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
movq 0x1745e(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x38ba
cmpl $0x11, %eax
jne 0x6b30
movq 0x17446(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
movq 0x17437(%rip), %rax     # 0x1dec0
movq (%rax), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
callq 0x21c0
movslq %eax, %r12
cmpl %r13d, %r12d
jae 0x6af9
movq %r14, %rdi
callq 0x7b74
movq 0x17411(%rip), %rax     # 0x1dec0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x514b(%rip), %rsi      # 0xbc08
xorl %ebx, %ebx
movq %r15, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x3f64
jmp 0x695d
movq %rbx, %rdi
callq 0x7bc7
movq %rax, %rbx
movq %rax, %rdi
movq %r15, %rsi
callq 0x7cbb
xorl %edi, %edi
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x77d0
movq %rax, %r14
incq %r15
cmpq %r12, %r15
jbe 0x6ad1
jmp 0x6b5c
movl $0x3, %edi
cmpl $0x3, (%rbx)
jne 0x696f
jmp 0x697c
movl $0x2, %edi
cmpl $0x2, (%rbx)
jne 0x696f
jmp 0x697c
xorl %ebx, %ebx
jmp 0x695d
movq %r14, %rdi
callq 0x7bc7
movl $0x3, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x77d0
movl $0x1, %edi
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x77d0
movq %rax, %r14
movq 0x1735d(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x330e
cmpq $0x10, %rax
jne 0x6b86
movq %r14, %rbx
jmp 0x697c
movslq 0x28(%rcx), %rdi
leaq 0x5065(%rip), %rsi      # 0xbbe9
jmp 0x6ba3
movq %r14, %rdi
callq 0x7b74
movq 0x1732b(%rip), %rax     # 0x1dec0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x50b0(%rip), %rsi      # 0xbc53
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x3f64
jmp 0x695d