// File: /workspace/github_c_makefile_star2_O2/orangeduck[P]mpc/mpc.c
// Function: mpca_lang_st
static mpc_err_t *mpca_lang_st(mpc_input_t *i, mpca_grammar_st_t *st) {

  mpc_result_t r;
  mpc_err_t *e;
  mpc_parser_t *Lang, *Stmt, *Grammar, *Term, *Factor, *Base;

  Lang    = mpc_new("lang");
  Stmt    = mpc_new("stmt");
  Grammar = mpc_new("grammar");
  Term    = mpc_new("term");
  Factor  = mpc_new("factor");
  Base    = mpc_new("base");

  mpc_define(Lang, mpc_apply_to(
    mpc_total(mpc_predictive(mpc_many(mpca_stmt_fold, Stmt)), mpca_stmt_list_delete),
    mpca_stmt_list_apply_to, st
  ));

  mpc_define(Stmt, mpc_and(5, mpca_stmt_afold,
    mpc_tok(mpc_ident()), mpc_maybe(mpc_tok(mpc_string_lit())), mpc_sym(":"), Grammar, mpc_sym(";"),
    free, free, free, mpc_soft_delete
  ));

  mpc_define(Grammar, mpc_and(2, mpcaf_grammar_or,
      Term,
      mpc_maybe(mpc_and(2, mpcf_snd_free, mpc_sym("|"), Grammar, free)),
      mpc_soft_delete
  ));

  mpc_define(Term, mpc_many1(mpcaf_grammar_and, Factor));

  mpc_define(Factor, mpc_and(2, mpcaf_grammar_repeat,
    Base,
      mpc_or(6,
        mpc_sym("*"),
        mpc_sym("+"),
        mpc_sym("?"),
        mpc_sym("!"),
        mpc_tok_brackets(mpc_int(), free),
        mpc_pass()),
    mpc_soft_delete
  ));

  mpc_define(Base, mpc_or(5,
    mpc_apply_to(mpc_tok(mpc_string_lit()), mpcaf_grammar_string, st),
    mpc_apply_to(mpc_tok(mpc_char_lit()),   mpcaf_grammar_char, st),
    mpc_tok(mpc_and(3, mpcaf_fold_regex, mpc_regex_lit(), mpc_many(mpcf_strfold, mpc_oneof("ms")), mpc_lift_val(st), free, free)),
    mpc_apply_to(mpc_tok_braces(mpc_or(2, mpc_digits(), mpc_ident()), free), mpcaf_grammar_id, st),
    mpc_tok_parens(Grammar, mpc_soft_delete)
  ));

  mpc_optimise(Lang);
  mpc_optimise(Stmt);
  mpc_optimise(Grammar);
  mpc_optimise(Term);
  mpc_optimise(Factor);
  mpc_optimise(Base);

  if (!mpc_parse_input(i, Lang, &r)) {
    e = r.error;
  } else {
    e = NULL;
  }

  mpc_cleanup(6, Lang, Stmt, Grammar, Term, Factor, Base);

  return e;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r12
movq %rsi, 0x38(%rsp)
movq %rdi, 0x48(%rsp)
leaq 0x26bf(%rip), %rdi      # 0xc855
callq 0x40c0
movq %rax, %rbx
movq %rax, 0x40(%rsp)
leaq 0x26b0(%rip), %rdi      # 0xc85a
callq 0x40c0
movq %rax, %r14
leaq 0x241b(%rip), %rdi      # 0xc5d4
callq 0x40c0
movq %rax, %r15
leaq 0x23aa(%rip), %rdi      # 0xc572
callq 0x40c0
movq %rax, 0x8(%rsp)
leaq 0x239e(%rip), %rdi      # 0xc577
callq 0x40c0
movq %rax, (%rsp)
leaq 0x2395(%rip), %rdi      # 0xc57e
callq 0x40c0
movq %rax, 0x30(%rsp)
leaq 0x19c2(%rip), %rdi      # 0xbbbc
movq %r14, %rsi
movq %r14, 0x10(%rsp)
callq 0x4290
movq %rax, %rdi
callq 0x40d0
leaq 0x19ea(%rip), %rsi      # 0xbc00
movq %rax, %rdi
callq 0x4670
leaq 0x1a23(%rip), %rsi      # 0xbc48
movq %rax, %rdi
movq %r12, %rdx
callq 0x44d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x40f0
callq 0x46f0
movq %rax, %rdi
callq 0x47b0
movq %rax, %r12
callq 0x4330
movq %rax, %rdi
callq 0x47b0
movq %rax, %rdi
callq 0x47d0
movq %rax, %r13
leaq 0x25f5(%rip), %rdi      # 0xc85f
callq 0x47e0
movq %rax, %rbp
leaq 0x25e8(%rip), %rdi      # 0xc861
callq 0x47e0
movq %rax, %r10
subq $0x8, %rsp
leaq -0x551(%rip), %r11      # 0x9d3b
movq 0x6c8d(%rip), %rbx      # 0x10f20
leaq 0x1a48(%rip), %rsi      # 0xbce2
pushq $0x5
popq %rdi
movq %r12, %rdx
movq %r13, %rcx
movq %rbp, %r8
movq %r15, %r9
xorl %eax, %eax
pushq %r11
movq %r11, %r12
pushq %rbx
pushq %rbx
pushq %rbx
movq %rbx, %r13
pushq %r10
callq 0x41d0
addq $0x30, %rsp
movq %r14, %rdi
movq %rax, %rsi
callq 0x40f0
leaq 0x22b7(%rip), %rdi      # 0xc58a
callq 0x47e0
movq 0x6c31(%rip), %rsi      # 0x10f10
pushq $0x2
popq %rbx
movl %ebx, %edi
movq %rax, %rdx
movq %r15, %rcx
movq %r15, 0x28(%rsp)
movq %r13, %r8
xorl %eax, %eax
callq 0x41d0
movq %rax, %rdi
callq 0x47d0
leaq -0x5c6(%rip), %rsi      # 0x9d42
movl %ebx, %edi
movq 0x8(%rsp), %rbx
movq %rbx, %rdx
movq %rax, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x41d0
movq %r15, %rdi
movq %rax, %rsi
callq 0x40f0
leaq -0x5d2(%rip), %rdi      # 0x9d5f
movq (%rsp), %r14
movq %r14, %rsi
callq 0x4260
movq %rbx, %rdi
movq %rax, %rsi
callq 0x40f0
leaq 0x228d(%rip), %rdi      # 0xc5dc
callq 0x47e0
movq %rax, %r12
leaq 0x2280(%rip), %rdi      # 0xc5de
callq 0x47e0
movq %rax, %r13
leaq 0x247e(%rip), %rdi      # 0xc7eb
callq 0x47e0
movq %rax, %rbp
leaq 0x24d7(%rip), %rdi      # 0xc853
callq 0x47e0
movq %rax, %rbx
callq 0x4340
movq %rax, %rdi
movq 0x6b8d(%rip), %rsi      # 0x10f20
callq 0x4410
movq %rax, %r15
callq 0x4560
movq %rax, %r10
subq $0x8, %rsp
pushq $0x6
popq %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
movq %rbx, %r8
movq %r15, %r9
xorl %eax, %eax
pushq %r10
callq 0x47c0
popq %rcx
popq %rdx
leaq -0x621(%rip), %rsi      # 0x9daa
pushq $0x2
popq %rdi
movq 0x30(%rsp), %rbp
movq %rbp, %rdx
movq %rax, %rcx
leaq -0x6a5(%rip), %r8       # 0x9d3b
xorl %eax, %eax
callq 0x41d0
movq %r14, %rdi
movq %rax, %rsi
callq 0x40f0
callq 0x4330
movq %rax, %rdi
callq 0x47b0
leaq -0x5c9(%rip), %rsi      # 0x9e3d
movq %rax, %rdi
movq 0x38(%rsp), %r13
movq %r13, %rdx
callq 0x44d0
movq %rax, 0x20(%rsp)
callq 0x46a0
movq %rax, %rdi
callq 0x47b0
leaq -0x591(%rip), %rsi      # 0x9e9e
movq %rax, %rdi
movq %r13, %rdx
callq 0x44d0
movq %rax, 0x18(%rsp)
callq 0x4790
movq %rax, %rbx
leaq 0x2192(%rip), %rdi      # 0xc5e0
callq 0x4090
movq 0x6b66(%rip), %rdi      # 0x10fc0
movq %rax, %rsi
callq 0x4290
movq %rax, %r15
movq %r13, %rdi
callq 0x42d0
subq $0x8, %rsp
leaq -0x579(%rip), %rsi      # 0x9eff
pushq $0x3
popq %rdi
movq %rbx, %rdx
movq %r15, %rcx
movq 0x30(%rsp), %r14
movq %rax, %r8
movq 0x6a90(%rip), %r9       # 0x10f20
xorl %eax, %eax
pushq %r9
movq %r9, %r15
callq 0x41d0
popq %rcx
popq %rdx
movq %rax, %rdi
callq 0x47b0
movq %rax, %r12
callq 0x4270
movq %rax, %rbx
callq 0x46f0
pushq $0x2
popq %rdi
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x47c0
movq %rax, %rdi
movq %r15, %rsi
callq 0x4450
leaq -0x52f(%rip), %rsi      # 0x9fa9
movq %rax, %rdi
movq %r13, %rdx
callq 0x44d0
movq %rax, %rbx
movq %r14, %rdi
leaq -0x7b5(%rip), %rsi      # 0x9d3b
callq 0x44c0
pushq $0x5
popq %rdi
movq 0x20(%rsp), %rsi
movq (%rsp), %r13
movq 0x18(%rsp), %rdx
movq %r12, %rcx
movq 0x8(%rsp), %r12
movq %rbx, %r8
movq 0x40(%rsp), %rbx
movq %rax, %r9
xorl %eax, %eax
callq 0x47c0
movq %rbp, %rdi
movq %rax, %rsi
callq 0x40f0
movq %rbx, %rdi
callq 0x4530
movq 0x10(%rsp), %rdi
callq 0x4530
movq %r14, %r15
movq %r14, %rdi
callq 0x4530
movq %r12, %rdi
callq 0x4530
movq %r13, %rdi
callq 0x4530
movq %rbp, %rdi
callq 0x4530
leaq 0x50(%rsp), %rdx
movq 0x48(%rsp), %rdi
movq %rbx, %rsi
callq 0x40b0
testl %eax, %eax
jne 0xa57d
movq 0x50(%rsp), %r14
jmp 0xa580
xorl %r14d, %r14d
subq $0x8, %rsp
pushq $0x6
popq %rdi
movq %rbx, %rsi
movq 0x18(%rsp), %rdx
movq %r15, %rcx
movq %r12, %r8
movq %r13, %r9
xorl %eax, %eax
pushq %rbp
callq 0x4720
popq %rax
popq %rcx
movq %r14, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq