// File: /workspace/github_c_makefile_star2_O0/mattn[P]orelang/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);
  
  mpc_optimise(RegexEnclose);
  mpc_optimise(Regex);
  mpc_optimise(Term);
  mpc_optimise(Factor);
  mpc_optimise(Base);
  mpc_optimise(Range);
  
  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_cleanup(6, RegexEnclose, Regex, Term, Factor, Base, Range);
  
  mpc_optimise(r.output);
  
  return r.output;
  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x13ea1(%rip), %rdi     # 0x1a627
callq 0x4260
movq %rax, -0x28(%rbp)
leaq 0x13e9f(%rip), %rdi     # 0x1a635
callq 0x4260
movq %rax, -0x30(%rbp)
leaq 0x13e94(%rip), %rdi     # 0x1a63a
callq 0x4260
movq %rax, -0x38(%rbp)
leaq 0x13e8b(%rip), %rdi     # 0x1a641
callq 0x4260
movq %rax, -0x40(%rbp)
leaq 0x13e80(%rip), %rdi     # 0x1a646
callq 0x4260
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0xc8(%rbp)
movl $0x7c, %edi
callq 0x4d30
movq %rax, %rdx
movq -0x28(%rbp), %rcx
movl $0x2, %edi
leaq -0x332(%rip), %rsi      # 0x64d0
movq 0x1a7a7(%rip), %r8      # 0x20fb0
movb $0x0, %al
callq 0x53f0
movq %rax, %rdi
callq 0x5160
movq -0xc8(%rbp), %rdx
movq %rax, %rcx
movl $0x2, %edi
leaq 0x2e2(%rip), %rsi       # 0x6b10
leaq -0x2765(%rip), %r8      # 0x40d0
movb $0x0, %al
callq 0x53f0
movq -0xc0(%rbp), %rdi
movq %rax, %rsi
callq 0x46d0
movq -0x30(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x38(%rbp), %rsi
leaq 0x2ff(%rip), %rdi       # 0x6b60
callq 0x5190
movq -0xb8(%rbp), %rdi
movq %rax, %rsi
callq 0x46d0
movq -0x38(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x90(%rbp)
movl $0x2a, %edi
callq 0x4d30
movq %rax, -0xb0(%rbp)
movl $0x2b, %edi
callq 0x4d30
movq %rax, -0xa8(%rbp)
movl $0x3f, %edi
callq 0x4d30
movq %rax, -0xa0(%rbp)
callq 0x5c20
movq %rax, %rdi
movq 0x1a6e3(%rip), %rsi     # 0x20fb0
callq 0x6580
movq %rax, -0x98(%rbp)
callq 0x4a10
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 0x5290
movq -0x90(%rbp), %rdx
movq %rax, %rcx
movl $0x2, %edi
leaq 0x2c1(%rip), %rsi       # 0x6be0
leaq -0x2856(%rip), %r8      # 0x40d0
movb $0x0, %al
callq 0x53f0
movq -0x88(%rbp), %rdi
movq %rax, %rsi
callq 0x46d0
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x287f(%rip), %rsi     # 0x40d0
callq 0x6500
movq %rax, -0x80(%rbp)
movq -0x48(%rbp), %rdi
leaq -0x2893(%rip), %rsi     # 0x40d0
callq 0x65c0
movq %rax, -0x78(%rbp)
callq 0x59b0
movq %rax, %rdi
leaq 0x395(%rip), %rsi       # 0x6d10
callq 0x4f80
movq %rax, -0x70(%rbp)
leaq 0x13cc1(%rip), %rdi     # 0x1a64c
callq 0x4e50
movq %rax, %rdi
leaq 0x376(%rip), %rsi       # 0x6d10
callq 0x4f80
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
movq -0x70(%rbp), %rcx
movq %rax, %r8
movl $0x4, %edi
movb $0x0, %al
callq 0x5290
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0x46d0
movq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
callq 0x59b0
movq %rax, -0x60(%rbp)
leaq 0x13e83(%rip), %rdi     # 0x1a861
callq 0x4e50
movq -0x60(%rbp), %rsi
movq %rax, %rdx
movl $0x2, %edi
movb $0x0, %al
callq 0x5290
movq %rax, %rsi
leaq -0x11c0(%rip), %rdi     # 0x5840
callq 0x5190
movq %rax, %rdi
leaq 0x471(%rip), %rsi       # 0x6e80
callq 0x4f80
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x46d0
movq -0x28(%rbp), %rdi
callq 0x5030
movq %rax, %rdi
leaq -0x2963(%rip), %rsi     # 0x40d0
callq 0x62f0
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x72b0
movq -0x28(%rbp), %rdi
callq 0x72b0
movq -0x30(%rbp), %rdi
callq 0x72b0
movq -0x38(%rbp), %rdi
callq 0x72b0
movq -0x40(%rbp), %rdi
callq 0x72b0
movq -0x48(%rbp), %rdi
callq 0x72b0
movq -0x8(%rbp), %rsi
movq -0x50(%rbp), %rdx
leaq 0x13bce(%rip), %rdi     # 0x1a64f
leaq -0x20(%rbp), %rcx
callq 0x3a10
cmpl $0x0, %eax
jne 0x6acc
movq -0x20(%rbp), %rdi
callq 0x2480
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rsi
leaq 0x13bba(%rip), %rdi     # 0x1a661
movb $0x0, %al
callq 0x4790
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2380
movq -0x10(%rbp), %rdi
callq 0x2280
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x50(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x40(%rbp), %r9
movq -0x48(%rbp), %rax
movl $0x6, %edi
movq %rax, (%rsp)
movb $0x0, %al
callq 0x4880
movq -0x20(%rbp), %rdi
callq 0x72b0
movq -0x20(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
nopw (%rax,%rax)