// File: /workspace/github_cpp_makefile_star2_O2/kage08[P]RegexLibrary/Resource.cpp
// Function: makeNFA(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::set<char, std::less<char>, std::allocator<char>>&)
NFA makeNFA(string& regex,set<char>& alpha){
  stack<NFA> stNFA;
  vector<char> alphac;
  for(char c:alpha)
    alphac.push_back(c);
  for(char c:regex){
    if(alpha.find(c)!=alpha.end() || c=='@')
      stNFA.push(NFA(alphac,c));
    else if(c=='%')
      stNFA.push(emptyLang(alphac));
    else if(c=='*'){
      NFA temp=Kleeny(stNFA.top());
      stNFA.pop();
      stNFA.push(temp);
    }
    else if(c=='.'){
      NFA temp=stNFA.top();
      stNFA.pop();
      NFA temp2=concat(stNFA.top(),temp);
      stNFA.pop();
      stNFA.push(temp2);
    }
    else if(c=='+'){
       NFA temp=stNFA.top();
      stNFA.pop();
      NFA temp2=(stNFA.top()+temp);
      stNFA.pop();
      stNFA.push(temp2);

    }
  }
  return stNFA.top();

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rdx, %r14
movq %rsi, %rbp
movq %rdi, 0x68(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x3c02
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %r15
andq $0x0, 0x10(%r15)
movaps %xmm0, (%r15)
movq 0x18(%r14), %r13
leaq 0x8(%r14), %rbx
leaq 0x88(%rsp), %r12
cmpq %rbx, %r13
je 0x2bec
movb 0x20(%r13), %al
movb %al, 0x88(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x3c1e
movq %r13, %rdi
callq 0x21a0
movq %rax, %r13
jmp 0x2bc4
movq (%rbp), %r13
movq 0x8(%rbp), %r15
xorl %ebp, %ebp
leaq 0x88(%rsp), %r12
movq %r14, 0x8(%rsp)
movq %r13, 0x10(%rsp)
cmpq %rbp, %r15
je 0x2e20
movb (%r13,%rbp), %al
movb %al, 0x7(%rsp)
movq %r14, %rdi
leaq 0x7(%rsp), %rsi
callq 0x512e
cmpq %rbx, %rax
setne %cl
movb 0x7(%rsp), %al
cmpb $0x40, %al
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x2c67
movsbl %al, %edx
movq %r12, %rdi
leaq 0x70(%rsp), %rsi
callq 0x24e4
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x5180
movq %r12, %rdi
callq 0x3b6a
jmp 0x2e18
movzbl %al, %eax
addl $-0x25, %eax
cmpl $0x9, %eax
ja 0x2e18
leaq 0x4387(%rip), %rcx      # 0x7004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r12, %rdi
leaq 0x70(%rsp), %rsi
callq 0x2668
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x5180
jmp 0x2c5a
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
jne 0x2cbf
movq 0x60(%rsp), %rax
movq -0x8(%rax), %rsi
movl $0x1a0, %eax            # imm = 0x1A0
addq %rax, %rsi
addq $-0x68, %rsi
movq %r12, %rdi
callq 0x3b8e
leaq 0xf0(%rsp), %r14
leaq 0x18(%rsp), %rdi
callq 0x5464
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
jne 0x2cfa
movq 0x60(%rsp), %rax
movq -0x8(%rax), %rsi
movl $0x1a0, %eax            # imm = 0x1A0
addq %rax, %rsi
addq $-0x68, %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x283a
movq %r14, %r13
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x5464
movq %r14, %rdi
movq %r13, %rsi
callq 0x54c4
jmp 0x2dfe
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
jne 0x2d46
movq 0x60(%rsp), %rax
movq -0x8(%rax), %rsi
movl $0x1a0, %eax            # imm = 0x1A0
addq %rax, %rsi
addq $-0x68, %rsi
movq %r12, %rdi
callq 0x29ba
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x5464
movq %r14, %rdi
movq %r12, %rsi
callq 0x54c4
movq %r12, %rdi
callq 0x3b6a
movq 0x8(%rsp), %r14
jmp 0x2e18
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
jne 0x2d99
movq 0x60(%rsp), %rax
movq -0x8(%rax), %rsi
movl $0x1a0, %eax            # imm = 0x1A0
addq %rax, %rsi
addq $-0x68, %rsi
movq %r12, %rdi
callq 0x3b8e
leaq 0xf0(%rsp), %r14
leaq 0x18(%rsp), %rdi
callq 0x5464
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
jne 0x2dd4
movq 0x60(%rsp), %rax
movq -0x8(%rax), %rsi
movl $0x1a0, %eax            # imm = 0x1A0
addq %rax, %rsi
addq $-0x68, %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x2a35
movq %r14, %r13
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x5464
movq %r14, %rdi
movq %r13, %rsi
callq 0x54c4
movq %r13, %rdi
callq 0x3b6a
movq %r12, %rdi
callq 0x3b6a
movq 0x8(%rsp), %r14
movq 0x10(%rsp), %r13
incq %rbp
jmp 0x2c08
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
jne 0x2e3a
movq 0x60(%rsp), %rax
movl $0x1a0, %esi            # imm = 0x1A0
addq -0x8(%rax), %rsi
addq $-0x68, %rsi
movq 0x68(%rsp), %rbx
movq %rbx, %rdi
callq 0x3b8e
leaq 0x70(%rsp), %rdi
callq 0x457e
leaq 0x18(%rsp), %rdi
callq 0x45f8
movq %rbx, %rax
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2eb0
jmp 0x2e9c
jmp 0x2eb0
jmp 0x2e9c
jmp 0x2eb0
jmp 0x2e84
jmp 0x2e9c
jmp 0x2eb0
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x3b6a
jmp 0x2e9f
jmp 0x2e9c
jmp 0x2eb0
jmp 0x2eb0
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x3b6a
jmp 0x2eb3
jmp 0x2eb0
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x457e
leaq 0x18(%rsp), %rdi
callq 0x45f8
movq %rbx, %rdi
callq 0x2270