// File: /workspace/github_cpp_makefile_star2_O3/kage08[P]RegexLibrary/Resource.cpp
// Function: toPostFix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::set<char, std::less<char>, std::allocator<char>>)
string toPostFix(string& regex, set<char> alphabet){
  if(regex=="%") return regex;
  stack<char> opst;
  string ans="";
  for(char c:regex){
    if(alphabet.find(c)!=alphabet.end() || c=='@' || c=='%')
      ans.append(string(1,c));
    else if(c=='(')
      opst.push(c);
    else if(c==')'){
      while(!opst.empty() && opst.top()!='('){
        ans.append(string(1,opst.top()));
        opst.pop();
      }
      opst.pop();
    }
    else if(c=='*')
      opst.push('*');
    else if(c=='.'){
      while(!opst.empty() && opst.top()=='*'){
        ans.append(string(1,'*'));
        opst.pop();
      }
      opst.push(c);
    }
    else if(c=='+'){

      while(!opst.empty() && (opst.top()=='*' || opst.top()=='.')){
        ans.append(string(1,'*'));
        opst.pop();
      }
      opst.push(c);
    }
  }

  while(!opst.empty()){
    ans.append(string(1,opst.top()));
    opst.pop();
  }
  return ans;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, 0x88(%rsp)
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x36b6(%rip), %rsi      # 0x7098
movq %r15, %rdi
callq 0x2060
testl %eax, %eax
je 0x3efa
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0x5f40
leaq 0x10(%rbx), %rax
movq %rax, 0x90(%rsp)
movq %rax, (%rbx)
leaq 0x366b(%rip), %rdx      # 0x7095
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x5232
movq 0x8(%r15), %r12
testq %r12, %r12
je 0x3e21
movq (%r15), %r15
addq %r15, %r12
movq 0x88(%rsp), %rax
leaq 0x8(%rax), %r14
leaq 0x20(%rsp), %rbp
leaq 0x10(%rsp), %r13
movzbl (%r15), %eax
movb %al, 0xf(%rsp)
movq 0x88(%rsp), %rcx
movq 0x10(%rcx), %rdx
testq %rdx, %rdx
je 0x3a9b
movq %r14, %rcx
xorl %esi, %esi
cmpb %al, 0x20(%rdx)
setl %sil
cmovgeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x3a7a
cmpq %r14, %rcx
je 0x3a9b
cmpb 0x20(%rcx), %al
jge 0x3ada
leal -0x25(%rax), %ecx
cmpl $0x9, %ecx
ja 0x3ad1
leaq 0x359e(%rip), %rdx      # 0x7048
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x60(%rsp), %rax
movq 0x70(%rsp), %rcx
decq %rcx
cmpq %rcx, %rax
je 0x3dc2
movb $0x28, (%rax)
jmp 0x3dbb
cmpl $0x40, %eax
jne 0x3e15
movq %rbp, 0x10(%rsp)
movsbl %al, %edx
movl $0x1, %esi
movq %r13, %rdi
callq 0x21c0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x2070
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3e15
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x3e15
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rdi
cmpq 0x40(%rsp), %rax
je 0x3dd3
cmpq %rdi, %rax
je 0x3b40
movb -0x1(%rax), %cl
jmp 0x3b4f
movq 0x78(%rsp), %rcx
movq -0x8(%rcx), %rcx
movb 0x1ff(%rcx), %cl
cmpb $0x28, %cl
je 0x3dd3
movq %rbp, 0x10(%rsp)
movsbl %cl, %edx
movl $0x1, %esi
movq %r13, %rdi
callq 0x21c0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x2070
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3b96
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rdi
cmpq %rdi, %rax
je 0x3baa
decq %rax
jmp 0x3bde
movl $0x200, %esi            # imm = 0x200
callq 0x2180
movq 0x78(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x78(%rsp)
movq -0x8(%rax), %rdi
movq %rdi, 0x68(%rsp)
leaq 0x200(%rdi), %rax
movq %rax, 0x70(%rsp)
leaq 0x1ff(%rdi), %rax
movq %rax, 0x60(%rsp)
jmp 0x3b2b
movq 0x60(%rsp), %rax
cmpq 0x40(%rsp), %rax
je 0x3da8
movq 0x68(%rsp), %rdi
movq %rax, %rcx
cmpq %rdi, %rax
jne 0x3c16
movq 0x78(%rsp), %rcx
movq -0x8(%rcx), %rcx
movl $0x200, %edx            # imm = 0x200
addq %rdx, %rcx
cmpb $0x2a, -0x1(%rcx)
jne 0x3da8
movq %rbp, 0x10(%rsp)
movl $0x1, %esi
movq %r13, %rdi
movl $0x2a, %edx
callq 0x21c0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x2070
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3c60
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rdi
cmpq %rdi, %rax
je 0x3c74
decq %rax
jmp 0x3ca8
movl $0x200, %esi            # imm = 0x200
callq 0x2180
movq 0x78(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x78(%rsp)
movq -0x8(%rax), %rdi
movq %rdi, 0x68(%rsp)
leaq 0x200(%rdi), %rax
movq %rax, 0x70(%rsp)
leaq 0x1ff(%rdi), %rax
movq %rax, 0x60(%rsp)
cmpq 0x40(%rsp), %rax
jne 0x3bfd
jmp 0x3da8
movb $0x2a, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x62c0
jmp 0x3e15
movq 0x60(%rsp), %rax
cmpq 0x40(%rsp), %rax
je 0x3da8
movq 0x68(%rsp), %rdi
cmpq %rdi, %rax
je 0x3cf3
movb -0x1(%rax), %cl
jmp 0x3d02
movq 0x78(%rsp), %rcx
movq -0x8(%rcx), %rcx
movb 0x1ff(%rcx), %cl
cmpb $0x2a, %cl
je 0x3d10
cmpb $0x2e, %cl
jne 0x3da8
movq %rbp, 0x10(%rsp)
movl $0x1, %esi
movq %r13, %rdi
movl $0x2a, %edx
callq 0x21c0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x2070
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3d50
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rdi
cmpq %rdi, %rax
je 0x3d64
decq %rax
jmp 0x3d98
movl $0x200, %esi            # imm = 0x200
callq 0x2180
movq 0x78(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x78(%rsp)
movq -0x8(%rax), %rdi
movq %rdi, 0x68(%rsp)
leaq 0x200(%rdi), %rax
movq %rax, 0x70(%rsp)
leaq 0x1ff(%rdi), %rax
movq %rax, 0x60(%rsp)
cmpq 0x40(%rsp), %rax
jne 0x3ce9
movq 0x70(%rsp), %rcx
decq %rcx
cmpq %rcx, %rax
je 0x3dc2
movb 0xf(%rsp), %cl
movb %cl, (%rax)
incq 0x60(%rsp)
jmp 0x3e15
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rsi
callq 0x60b8
jmp 0x3e15
cmpq %rdi, %rax
je 0x3ddd
decq %rax
jmp 0x3e10
movl $0x200, %esi            # imm = 0x200
callq 0x2180
movq 0x78(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x78(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x68(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x70(%rsp)
addq $0x1ff, %rax            # imm = 0x1FF
movq %rax, 0x60(%rsp)
incq %r15
cmpq %r12, %r15
jne 0x3a5e
movq 0x60(%rsp), %rax
cmpq 0x40(%rsp), %rax
je 0x3eee
leaq 0x20(%rsp), %r15
movq 0x68(%rsp), %rdi
movl $0x200, %r12d           # imm = 0x200
leaq 0x10(%rsp), %r14
cmpq %rdi, %rax
jne 0x3e57
movq 0x78(%rsp), %rax
movq -0x8(%rax), %rax
addq %r12, %rax
movsbl -0x1(%rax), %edx
movq %r15, 0x10(%rsp)
movl $0x1, %esi
movq %r14, %rdi
callq 0x21c0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x2070
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x3e96
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rdi
cmpq %rdi, %rax
je 0x3eaa
decq %rax
jmp 0x3ede
movl $0x200, %esi            # imm = 0x200
callq 0x2180
movq 0x78(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x78(%rsp)
movq -0x8(%rax), %rdi
movq %rdi, 0x68(%rsp)
leaq 0x200(%rdi), %rax
movq %rax, 0x70(%rsp)
leaq 0x1ff(%rdi), %rax
movq %rax, 0x60(%rsp)
cmpq 0x40(%rsp), %rax
jne 0x3e46
leaq 0x30(%rsp), %rdi
callq 0x5144
jmp 0x3f13
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x519c
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x3f88
jmp 0x3f4e
jmp 0x3f4e
jmp 0x3f53
jmp 0x3f4e
jmp 0x3f53
jmp 0x3f4e
jmp 0x3f4e
jmp 0x3f53
jmp 0x3f4e
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
jne 0x3f60
jmp 0x3f6d
movq %rax, %r14
jmp 0x3f6d
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3f6d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2180
movq (%rbx), %rdi
movq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3f88
movq (%rax), %rsi
incq %rsi
callq 0x2180
leaq 0x30(%rsp), %rdi
callq 0x5144
movq %r14, %rdi
callq 0x2270