// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %r12
movq 0x17f64(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x3559
movq 0x17f55(%rip), %rcx     # 0x1ded0
movq (%rcx), %rdi
cmpl $0xe, %eax
jne 0x5f8d
callq 0x306d
decq %r12
jmp 0x5f65
callq 0x3559
leal -0x8(%rax), %ecx
cmpl $0x5, %ecx
jbe 0x5fda
leal -0x1d(%rax), %ecx
cmpl $0x3, %ecx
jae 0x603c
movl %eax, %edi
callq 0x66fe
cmpl $-0x1, %eax
je 0x6464
movl %eax, %ebx
movq 0x17f11(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
pushq $0xa
popq %rdi
movl %ebx, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x71a4
jmp 0x6245
leaq 0x595f(%rip), %rax      # 0xb940
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x17edf(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
callq 0x5e3e
movq %rax, %r15
movq 0x17ec8(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
cmpq $0x9, %rax
je 0x6248
movq %r15, %rdi
callq 0x751f
movq 0x17ea7(%rip), %rax     # 0x1ded0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x59cf(%rip), %rsi      # 0xba06
jmp 0x66b3
cmpl $0x20, %eax
je 0x646c
cmpl $0x16, %eax
jne 0x60ea
callq 0x6829
testq %rax, %rax
je 0x6464
movq %rax, %r15
xorl %ebx, %ebx
pushq $-0x1
popq %r13
movq 0x17e64(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
pushq $0x13
popq %rsi
pushq $0x14
popq %rdx
pushq $0x15
popq %rcx
movl %r13d, %r8d
xorl %eax, %eax
callq 0x3585
testb %al, %al
je 0x65df
movq 0x17e3f(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
movq %rax, %rbx
movq 0x17e2d(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x3559
cmpl $0x16, %eax
jne 0x6626
callq 0x6829
movq %rax, %r14
xorl %edi, %edi
cmpl $0x14, %ebx
setne %dil
cmpl $0x13, %ebx
movq 0x8(%r15), %rsi
movq 0x8(%rax), %rdx
pushq $0x2
popq %rax
cmovel %eax, %edi
callq 0x261d
movq %r14, %rdi
callq 0x751f
movb $0x1, %bl
jmp 0x6065
movq 0x17ddf(%rip), %rax     # 0x1ded0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x5924(%rip), %rsi      # 0xba23
jmp 0x66b3
movq 0x17dc5(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
movb $0x1, %r14b
pushq $-0x1
popq %rbx
pushq $0x1
popq %r13
xorl %eax, %eax
movq %rax, %r15
movq 0x17da7(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
pushq $0xc
popq %rsi
pushq $0x70
popq %rdx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x3585
testb %al, %al
jne 0x6186
movq 0x17d8a(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
cmpl $0x6f, %eax
je 0x6186
movl %eax, %edi
callq 0x66fe
xorl %r14d, %r14d
pushq $0xa
popq %rdi
movl %eax, %esi
movl %r13d, %edx
xorl %eax, %eax
callq 0x71a4
testq %r15, %r15
je 0x611f
xorl %r14d, %r14d
movl %r13d, %edi
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x71a4
jmp 0x611f
testb $0x1, %r14b
je 0x6199
pushq $0xb
popq %rdi
xorl %eax, %eax
callq 0x71a4
movq %rax, %r15
testq %r15, %r15
je 0x6464
movq 0x17d27(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
cmpq $0xc, %rax
je 0x6251
movq %r15, %rdi
callq 0x751f
movq 0x17d06(%rip), %rax     # 0x1ded0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x595a(%rip), %rsi      # 0xbb32
jmp 0x66b3
movq 0x17cec(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
pushq $0x9
popq %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x71a4
jmp 0x6245
movq 0x17ccf(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
movq 0x17cc0(%rip), %rax     # 0x1ded0
movq (%rax), %rax
movq 0x10(%rax), %rdi
pushq $0x1
popq %rsi
callq 0x2eb9
movq 0x17caa(%rip), %rax     # 0x1ded0
movq (%rax), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
incq %rdi
callq 0x21f0
pushq $0x8
popq %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x71a4
movq %rax, %r15
testq %r15, %r15
je 0x6464
cmpq $0x1, %r12
je 0x6285
pushq $0x6
popq %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x71a4
movq %rax, %r15
testq %r12, %r12
je 0x627c
pushq $0x6
popq %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x71a4
movq %rax, %r15
testq %r15, %r15
je 0x6464
pushq $0x2
popq %r13
pushq $0x5
popq %rbx
pushq $0x6
popq %r14
pushq $0x7
popq %r12
movq 0x17c35(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
movl %ebx, %esi
movl %r14d, %edx
movl %r12d, %ecx
pushq $0xf
popq %r8
pushq $-0x1
popq %r9
xorl %eax, %eax
callq 0x3585
testb %al, %al
je 0x66bd
movq 0x17c0c(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
cmpl $0x5, %eax
je 0x63ee
cmpl $0xf, %eax
je 0x62f7
cmpl $0x7, %eax
je 0x63e3
cmpl $0x6, %eax
jne 0x645b
cmpl $0x4, (%r15)
pushq $0x4
jmp 0x63f4
movq 0x17bd2(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
movq 0x17bc3(%rip), %rcx     # 0x1ded0
movq (%rcx), %rcx
cmpq $0x11, %rax
jne 0x6672
movq 0x10(%rcx), %rax
movq (%rax), %rdi
callq 0x21c0
movl %eax, %r14d
movslq %eax, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x765a
movq %rax, %rbx
movq 0x17b8f(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x3559
cmpl $0x12, %eax
jne 0x642e
movq 0x17b77(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
movq 0x17b68(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x3559
cmpl $0x11, %eax
jne 0x6406
movq 0x17b50(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
movq 0x17b41(%rip), %rax     # 0x1ded0
movq (%rax), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
callq 0x21c0
movslq %eax, %r13
cmpl %r14d, %r13d
jb 0x66cf
incq %r12
pushq $0x6
popq %r14
cmpq %r13, %r12
ja 0x6434
movq %r15, %rdi
callq 0x7572
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x765a
xorl %edi, %edi
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x71a4
movq %rax, %rbx
incq %r12
jmp 0x63b1
cmpl $0x2, (%r15)
movl %r13d, %edi
jne 0x63f7
jmp 0x645b
cmpl $0x3, (%r15)
pushq $0x3
popq %rdi
je 0x645b
movq %r15, %rsi
xorl %eax, %eax
callq 0x71a4
movq %rax, %r15
jmp 0x645b
movq %rbx, %rdi
callq 0x7572
pushq $0x3
popq %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x71a4
pushq $0x1
popq %rdi
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x71a4
movq %rax, %rbx
pushq $0x6
popq %r14
jmp 0x6438
pushq $0x2
popq %r13
movq 0x17a91(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
cmpq $0x10, %rax
pushq $0x7
popq %r12
jne 0x667f
movq %rbx, %r15
pushq $0x5
popq %rbx
testq %r15, %r15
jne 0x6294
xorl %r15d, %r15d
jmp 0x66bd
movq 0x17a5d(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
movl $0x0, -0x2c(%rbp)
leaq 0x54df(%rip), %r13      # 0xb968
xorl %r15d, %r15d
movl $0x0, -0x30(%rbp)
xorl %r14d, %r14d
movl %r14d, %eax
movl %eax, %r14d
movq 0x17a2d(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x3559
movl %eax, %ebx
addl $-0x22, %ebx
movq 0x17a19(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
cmpl $0x3, %ebx
ja 0x64e3
callq 0x306d
movb $0x1, %al
movslq (%r13,%rbx,4), %rcx
addq %r13, %rcx
jmpq *%rcx
movb $0x1, %al
movl %eax, -0x2c(%rbp)
jmp 0x6496
movb $0x1, %al
movl %eax, -0x30(%rbp)
jmp 0x6496
movb $0x1, %r15b
jmp 0x6496
callq 0x3559
cmpl $0x21, %eax
jne 0x6554
movq 0x179dc(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
leaq 0x5455(%rip), %r13      # 0xb958
movl %r14d, %eax
movl %eax, %r14d
movq 0x179c0(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x3559
movl %eax, %ebx
addl $-0x22, %ebx
cmpl $0x3, %ebx
ja 0x6554
movq 0x179a7(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
xorl %eax, %eax
movslq (%r13,%rbx,4), %rcx
addq %r13, %rcx
jmpq *%rcx
movl $0x0, -0x2c(%rbp)
jmp 0x6503
movl $0x0, -0x30(%rbp)
jmp 0x6503
xorl %r15d, %r15d
jmp 0x6503
movq 0x17975(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
cmpq $0x26, %rax
jne 0x65c5
callq 0x5e3e
testq %rax, %rax
je 0x6464
movq %rax, %rbx
movq 0x1794f(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
cmpq $0x9, %rax
jne 0x669e
movl -0x2c(%rbp), %eax
andb $0x1, %al
movzbl %al, %esi
andb $0x1, %r15b
movzbl %r15b, %edx
movl -0x30(%rbp), %eax
andb $0x1, %al
movzbl %al, %ecx
andb $0x1, %r14b
movzbl %r14b, %r8d
pushq $0x7
popq %rdi
movq %rbx, %r9
xorl %eax, %eax
callq 0x71a4
jmp 0x6245
movq 0x17904(%rip), %rax     # 0x1ded0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x557f(%rip), %rsi      # 0xbb59
jmp 0x66b3
movq 0x8(%r15), %rdi
callq 0x257c
testb %al, %al
je 0x6251
testb $0x1, %bl
je 0x6611
movq 0x178d4(%rip), %rax     # 0x1ded0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x547c(%rip), %rsi      # 0xba86
xorl %eax, %eax
callq 0x3d40
movq 0x8(%r15), %rdi
callq 0x2351
movl $0xb, (%r15)
jmp 0x6251
movq %r15, %rdi
callq 0x751f
cmpl $0x14, %ebx
leaq 0x5446(%rip), %rax      # 0xba7e
leaq 0x5443(%rip), %rcx      # 0xba82
cmoveq %rax, %rcx
cmpl $0x13, %ebx
movq 0x17883(%rip), %rax     # 0x1ded0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x541f(%rip), %rdx      # 0xba7a
cmovneq %rcx, %rdx
leaq 0x53ed(%rip), %rsi      # 0xba53
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x3bdc
jmp 0x66bd
movslq 0x28(%rcx), %rdi
leaq 0x5528(%rip), %rsi      # 0xbba5
jmp 0x66b3
movq %rbx, %rdi
callq 0x751f
movq 0x17842(%rip), %rax     # 0x1ded0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x5573(%rip), %rsi      # 0xbc0f
jmp 0x66b3
movq 0x1782b(%rip), %rax     # 0x1ded0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x54cc(%rip), %rsi      # 0xbb7f
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x3bdc
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x751f
movq 0x177f2(%rip), %rax     # 0x1ded0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x54d8(%rip), %rsi      # 0xbbc4
xorl %r15d, %r15d
movq %r12, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x3bdc
jmp 0x66bd