// File: /workspace/github_cpp_makefile_star2_O2/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, 0x30(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x3df4(%rip), %rsi      # 0x7098
movq %r14, %rdi
callq 0x3c38
testb %al, %al
je 0x32c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2210
jmp 0x356b
leaq 0x38(%rsp), %rdi
callq 0x3c82
leaq 0x3dc4(%rip), %rsi      # 0x7095
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x3c46
movq (%r14), %r15
movq 0x8(%r14), %rax
addq %r15, %rax
movq %rax, 0x90(%rsp)
movq 0x30(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x88(%rsp)
leaq 0x20(%rsp), %rbp
leaq 0x10(%rsp), %r12
pushq $0x1
popq %r13
leaq 0x38(%rsp), %r14
cmpq 0x90(%rsp), %r15
je 0x34fa
movb (%r15), %al
movb %al, 0xf(%rsp)
movq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rsi
callq 0x512e
movzbl 0xf(%rsp), %ecx
cmpq 0x88(%rsp), %rax
je 0x3372
movq %rbp, 0x10(%rsp)
movsbl %cl, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x21b0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x22a0
movq %r12, %rdi
callq 0x20a0
jmp 0x34f2
leal -0x25(%rcx), %eax
cmpl $0x9, %eax
ja 0x34cd
leaq 0x3ca7(%rip), %rdx      # 0x702c
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movq %r14, %rdi
leaq 0xf(%rsp), %rsi
callq 0x5754
jmp 0x34f2
movq 0x68(%rsp), %rax
cmpq 0x48(%rsp), %rax
je 0x338e
cmpq 0x70(%rsp), %rax
je 0x33b8
movb -0x1(%rax), %al
jmp 0x33ca
movq 0x80(%rsp), %rax
movq -0x8(%rax), %rax
movb 0x1ff(%rax), %al
cmpb $0x2a, %al
je 0x33d2
cmpb $0x2e, %al
jne 0x338e
movq %rbp, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
pushq $0x2a
popq %rdx
callq 0x21b0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x22a0
movq %r12, %rdi
callq 0x20a0
movq %r14, %rdi
callq 0x5978
jmp 0x33a0
movq 0x68(%rsp), %rax
cmpq 0x48(%rsp), %rax
je 0x34ea
cmpq 0x70(%rsp), %rax
je 0x341e
movb -0x1(%rax), %al
jmp 0x3430
movq 0x80(%rsp), %rax
movq -0x8(%rax), %rax
movb 0x1ff(%rax), %al
cmpb $0x28, %al
je 0x34ea
movq %rbp, 0x10(%rsp)
movsbl %al, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x21b0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x22a0
movq %r12, %rdi
callq 0x20a0
movq %r14, %rdi
callq 0x5978
jmp 0x3402
movq 0x68(%rsp), %rax
cmpq 0x48(%rsp), %rax
je 0x338e
cmpq 0x70(%rsp), %rax
jne 0x3493
movq 0x80(%rsp), %rax
movq -0x8(%rax), %rax
movl $0x200, %ecx            # imm = 0x200
addq %rcx, %rax
cmpb $0x2a, -0x1(%rax)
jne 0x338e
movq %rbp, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
pushq $0x2a
popq %rdx
callq 0x21b0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x22a0
movq %r12, %rdi
callq 0x20a0
movq %r14, %rdi
callq 0x5978
jmp 0x3468
cmpl $0x40, %ecx
je 0x3347
jmp 0x34f2
movb $0x2a, 0x10(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x59cc
jmp 0x34f2
movq %r14, %rdi
callq 0x5978
incq %r15
jmp 0x3314
movl $0x200, %r13d           # imm = 0x200
leaq 0x10(%rsp), %r14
pushq $0x1
popq %r15
leaq 0x38(%rsp), %r12
movq 0x68(%rsp), %rax
cmpq 0x48(%rsp), %rax
je 0x3561
cmpq 0x70(%rsp), %rax
jne 0x3530
movq 0x80(%rsp), %rax
movq -0x8(%rax), %rax
addq %r13, %rax
movsbl -0x1(%rax), %edx
movq %rbp, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x21b0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22a0
movq %r14, %rdi
callq 0x20a0
movq %r12, %rdi
callq 0x5978
jmp 0x350e
leaq 0x38(%rsp), %rdi
callq 0x47fa
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x35b5
jmp 0x359b
jmp 0x359b
jmp 0x35a0
jmp 0x359b
jmp 0x35a0
jmp 0x359b
jmp 0x35a0
jmp 0x359b
jmp 0x359b
jmp 0x35a0
jmp 0x359b
movq %rax, %r14
jmp 0x35ad
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x20a0
leaq 0x38(%rsp), %rdi
callq 0x47fa
movq %r14, %rdi
callq 0x2270