// File: /workspace/github_c_makefile_star2_O0/voithos[P]awl/src/mpc.c
// Function: mpc_re
mpc_parser_t *mpc_re(const char *re) {
  
  char *err_msg;
  mpc_parser_t *err_out;
  mpc_result_t r;
  mpc_parser_t *Regex, *Term, *Factor, *Base, *Range, *RegexEnclose; 
  
  Regex  = mpc_new("regex");
  Term   = mpc_new("term");
  Factor = mpc_new("factor");
  Base   = mpc_new("base");
  Range  = mpc_new("range");
  
  mpc_define(Regex, mpc_and(2, 
    mpcf_re_or,
    Term, 
    mpc_maybe(mpc_and(2, mpcf_snd_free, mpc_char('|'), Regex, free)),
    (mpc_dtor_t)mpc_delete
  ));
  
  mpc_define(Term, mpc_many(mpcf_re_and, Factor));
  
  mpc_define(Factor, mpc_and(2, 
    mpcf_re_repeat,
    Base,
    mpc_or(5,
      mpc_char('*'), mpc_char('+'), mpc_char('?'),
      mpc_brackets(mpc_int(), free),
      mpc_pass()),
    (mpc_dtor_t)mpc_delete
  ));
  
  mpc_define(Base, mpc_or(4,
    mpc_parens(Regex, (mpc_dtor_t)mpc_delete),
    mpc_squares(Range, (mpc_dtor_t)mpc_delete),
    mpc_apply(mpc_escape(), mpcf_re_escape),
    mpc_apply(mpc_noneof(")|"), mpcf_re_escape)
  ));
  
  mpc_define(Range, mpc_apply(
    mpc_many(mpcf_strfold, mpc_or(2, mpc_escape(), mpc_noneof("]"))),
    mpcf_re_range
  ));
  
  RegexEnclose = mpc_whole(mpc_predictive(Regex), (mpc_dtor_t)mpc_delete);
  
  if(!mpc_parse("<mpc_re_compiler>", re, RegexEnclose, &r)) {
    err_msg = mpc_err_string(r.error);
    err_out = mpc_failf("Invalid Regex: %s", err_msg);
    mpc_err_delete(r.error);  
    free(err_msg);
    r.output = err_out;
  }
  
  mpc_delete(RegexEnclose);
  mpc_cleanup(5, Regex, Term, Factor, Base, Range);
  
  return r.output;
  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
leaq 0xb55f(%rip), %rdi      # 0x1b045
callq 0xdb00
movq %rax, -0x28(%rbp)
leaq 0xb55d(%rip), %rdi      # 0x1b053
callq 0xdb00
movq %rax, -0x30(%rbp)
leaq 0xb552(%rip), %rdi      # 0x1b058
callq 0xdb00
movq %rax, -0x38(%rbp)
leaq 0xb549(%rip), %rdi      # 0x1b05f
callq 0xdb00
movq %rax, -0x40(%rbp)
leaq 0xb53e(%rip), %rdi      # 0x1b064
callq 0xdb00
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0xc8(%rbp)
movl $0x7c, %edi
callq 0xe230
movq %rax, %rdx
movq -0x28(%rbp), %rcx
movl $0x2, %edi
leaq -0x332(%rip), %rsi      # 0xf830
movq 0x1244f(%rip), %r8      # 0x21fb8
movb $0x0, %al
callq 0xe8f0
movq %rax, %rdi
callq 0xe660
movq -0xc8(%rbp), %rdx
movq %rax, %rcx
movl $0x2, %edi
leaq 0x2a2(%rip), %rsi       # 0xfe30
leaq -0x2225(%rip), %r8      # 0xd970
movb $0x0, %al
callq 0xe8f0
movq -0xc0(%rbp), %rdi
movq %rax, %rsi
callq 0xdbe0
movq -0x30(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x38(%rbp), %rsi
leaq 0x2bf(%rip), %rdi       # 0xfe80
callq 0xe690
movq -0xb8(%rbp), %rdi
movq %rax, %rsi
callq 0xdbe0
movq -0x38(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x90(%rbp)
movl $0x2a, %edi
callq 0xe230
movq %rax, -0xb0(%rbp)
movl $0x2b, %edi
callq 0xe230
movq %rax, -0xa8(%rbp)
movl $0x3f, %edi
callq 0xe230
movq %rax, -0xa0(%rbp)
callq 0xef80
movq %rax, %rdi
movq 0x1238b(%rip), %rsi     # 0x21fb8
callq 0xf8e0
movq %rax, -0x98(%rbp)
callq 0xdf20
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
movq -0xa0(%rbp), %rcx
movq -0x98(%rbp), %r8
movq %rax, %r9
movl $0x5, %edi
movb $0x0, %al
callq 0xe790
movq -0x90(%rbp), %rdx
movq %rax, %rcx
movl $0x2, %edi
leaq 0x281(%rip), %rsi       # 0xff00
leaq -0x2316(%rip), %r8      # 0xd970
movb $0x0, %al
callq 0xe8f0
movq -0x88(%rbp), %rdi
movq %rax, %rsi
callq 0xdbe0
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x233f(%rip), %rsi     # 0xd970
callq 0xf860
movq %rax, -0x80(%rbp)
movq -0x48(%rbp), %rdi
leaq -0x2353(%rip), %rsi     # 0xd970
callq 0xf920
movq %rax, -0x78(%rbp)
callq 0xed10
movq %rax, %rdi
leaq 0x355(%rip), %rsi       # 0x10030
callq 0xe480
movq %rax, -0x70(%rbp)
leaq 0xb37f(%rip), %rdi      # 0x1b06a
callq 0xe350
movq %rax, %rdi
leaq 0x336(%rip), %rsi       # 0x10030
callq 0xe480
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
movq -0x70(%rbp), %rcx
movq %rax, %r8
movl $0x4, %edi
movb $0x0, %al
callq 0xe790
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0xdbe0
movq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
callq 0xed10
movq %rax, -0x60(%rbp)
leaq 0xb4fe(%rip), %rdi      # 0x1b23c
callq 0xe350
movq -0x60(%rbp), %rsi
movq %rax, %rdx
movl $0x2, %edi
movb $0x0, %al
callq 0xe790
movq %rax, %rsi
leaq -0x1190(%rip), %rdi     # 0xebd0
callq 0xe690
movq %rax, %rdi
leaq 0x431(%rip), %rsi       # 0x101a0
callq 0xe480
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0xdbe0
movq -0x28(%rbp), %rdi
callq 0xe530
movq %rax, %rdi
leaq -0x2423(%rip), %rsi     # 0xd970
callq 0xf650
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rsi
movq -0x50(%rbp), %rdx
leaq 0xb2c2(%rip), %rdi      # 0x1b06d
leaq -0x20(%rbp), %rcx
callq 0xd3f0
cmpl $0x0, %eax
jne 0xfdf6
movq -0x20(%rbp), %rdi
callq 0xa480
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rsi
leaq 0xb2ae(%rip), %rdi      # 0x1b07f
movb $0x0, %al
callq 0xdca0
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rdi
callq 0xa380
movq -0x10(%rbp), %rdi
callq 0x23a0
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x50(%rbp), %rdi
callq 0xd970
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %r8
movq -0x48(%rbp), %r9
movl $0x5, %edi
movb $0x0, %al
callq 0xdd90
movq -0x20(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)