// File: 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
movq %rsp, %rbp
subq $0x410, %rsp            # imm = 0x410
movq %rdi, -0x3c8(%rbp)
movq %rdi, %rax
movq %rax, -0x3c0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x5ea0
leaq -0x80(%rbp), %rdi
callq 0x5460
movq -0x18(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0x5ed0
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rdi
callq 0x5f00
movq %rax, -0x98(%rbp)
leaq -0x90(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x5f30
testb $0x1, %al
jne 0x3764
jmp 0x37b1
leaq -0x90(%rbp), %rdi
callq 0x5f60
movb (%rax), %al
movb %al, -0x99(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x99(%rbp), %rsi
callq 0x5f90
jmp 0x378a
jmp 0x378c
leaq -0x90(%rbp), %rdi
callq 0x6000
jmp 0x374b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x3c09
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x21a0
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x2110
movq %rax, -0xc8(%rbp)
leaq -0xc0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x6030
testb $0x1, %al
jne 0x37fe
jmp 0x3bc0
leaq -0xc0(%rbp), %rdi
callq 0x6070
movb (%rax), %al
movb %al, -0xc9(%rbp)
movq -0x18(%rbp), %rdi
leaq -0xc9(%rbp), %rsi
callq 0x6090
movq %rax, -0x3d0(%rbp)
jmp 0x382b
movq -0x3d0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5f00
movq %rax, -0xe0(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x5f30
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x3d1(%rbp)
jne 0x387e
movsbl -0xc9(%rbp), %eax
cmpl $0x40, %eax
sete %al
movb %al, -0x3d1(%rbp)
movb -0x3d1(%rbp), %al
testb $0x1, %al
jne 0x388a
jmp 0x38e9
movsbl -0xc9(%rbp), %edx
leaq -0x148(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x26f0
jmp 0x38a3
leaq -0x68(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x60d0
jmp 0x38b5
leaq -0x148(%rbp), %rdi
callq 0x5aa0
jmp 0x3bad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x5aa0
jmp 0x3c09
movsbl -0xc9(%rbp), %eax
cmpl $0x25, %eax
jne 0x394d
leaq -0x1b0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x29f0
jmp 0x3907
leaq -0x68(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x60d0
jmp 0x3919
leaq -0x1b0(%rbp), %rdi
callq 0x5aa0
jmp 0x3bab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x5aa0
jmp 0x3c09
movsbl -0xc9(%rbp), %eax
cmpl $0x2a, %eax
jne 0x39d1
leaq -0x68(%rbp), %rdi
callq 0x6100
movq %rax, -0x3e0(%rbp)
jmp 0x396b
movq -0x3e0(%rbp), %rsi
leaq -0x218(%rbp), %rdi
callq 0x3270
jmp 0x3980
leaq -0x68(%rbp), %rdi
callq 0x6120
jmp 0x398b
leaq -0x68(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x6140
jmp 0x399d
leaq -0x218(%rbp), %rdi
callq 0x5aa0
jmp 0x3ba9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x5aa0
jmp 0x3c09
movsbl -0xc9(%rbp), %eax
cmpl $0x2e, %eax
jne 0x3abe
leaq -0x68(%rbp), %rdi
callq 0x6100
movq %rax, -0x3e8(%rbp)
jmp 0x39f3
movq -0x3e8(%rbp), %rsi
leaq -0x280(%rbp), %rdi
callq 0x5df0
jmp 0x3a08
leaq -0x68(%rbp), %rdi
callq 0x6120
jmp 0x3a13
leaq -0x68(%rbp), %rdi
callq 0x6100
movq %rax, -0x3f0(%rbp)
jmp 0x3a25
movq -0x3f0(%rbp), %rsi
leaq -0x2e8(%rbp), %rdi
leaq -0x280(%rbp), %rdx
callq 0x3380
jmp 0x3a41
leaq -0x68(%rbp), %rdi
callq 0x6120
jmp 0x3a4c
leaq -0x68(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
callq 0x6140
jmp 0x3a5e
leaq -0x2e8(%rbp), %rdi
callq 0x5aa0
leaq -0x280(%rbp), %rdi
callq 0x5aa0
jmp 0x3ba7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x3aad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0x2e8(%rbp), %rdi
callq 0x5aa0
leaq -0x280(%rbp), %rdi
callq 0x5aa0
jmp 0x3c09
movsbl -0xc9(%rbp), %eax
cmpl $0x2b, %eax
jne 0x3ba5
leaq -0x68(%rbp), %rdi
callq 0x6100
movq %rax, -0x3f8(%rbp)
jmp 0x3ae0
movq -0x3f8(%rbp), %rsi
leaq -0x350(%rbp), %rdi
callq 0x5df0
jmp 0x3af5
leaq -0x68(%rbp), %rdi
callq 0x6120
jmp 0x3b00
leaq -0x68(%rbp), %rdi
callq 0x6100
movq %rax, -0x400(%rbp)
jmp 0x3b12
movq -0x400(%rbp), %rsi
leaq -0x3b8(%rbp), %rdi
leaq -0x350(%rbp), %rdx
callq 0x2e90
jmp 0x3b2e
leaq -0x68(%rbp), %rdi
callq 0x6120
jmp 0x3b39
leaq -0x68(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0x6140
jmp 0x3b4b
leaq -0x3b8(%rbp), %rdi
callq 0x5aa0
leaq -0x350(%rbp), %rdi
callq 0x5aa0
jmp 0x3ba5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x3b97
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0x3b8(%rbp), %rdi
callq 0x5aa0
leaq -0x350(%rbp), %rdi
callq 0x5aa0
jmp 0x3c09
jmp 0x3ba7
jmp 0x3ba9
jmp 0x3bab
jmp 0x3bad
jmp 0x3baf
leaq -0xc0(%rbp), %rdi
callq 0x6170
jmp 0x37e2
leaq -0x68(%rbp), %rdi
callq 0x6100
movq %rax, -0x408(%rbp)
jmp 0x3bd2
movq -0x408(%rbp), %rsi
movq -0x3c8(%rbp), %rdi
callq 0x5df0
jmp 0x3be7
leaq -0x80(%rbp), %rdi
callq 0x5840
leaq -0x68(%rbp), %rdi
callq 0x6190
movq -0x3c0(%rbp), %rax
addq $0x410, %rsp            # imm = 0x410
popq %rbp
retq
leaq -0x80(%rbp), %rdi
callq 0x5840
leaq -0x68(%rbp), %rdi
callq 0x6190
movq -0xa8(%rbp), %rdi
callq 0x2380
nopw (%rax,%rax)