// File: /workspace/github_c_makefile_star2_O1/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 $0x48, %rsp
movq %rsi, %r13
movq %rsi, 0x20(%rsp)
movq %rdi, 0x38(%rsp)
leaq 0x3213(%rip), %rdi      # 0xe835
callq 0x40a0
movq %rax, %rbx
movq %rax, 0x30(%rsp)
leaq 0x3204(%rip), %rdi      # 0xe83a
callq 0x40a0
movq %rax, %r12
movq %rax, (%rsp)
leaq 0x2f6b(%rip), %rdi      # 0xe5b4
callq 0x40a0
movq %rax, 0x18(%rsp)
leaq 0x2ef8(%rip), %rdi      # 0xe552
callq 0x40a0
movq %rax, 0x10(%rsp)
leaq 0x2eec(%rip), %rdi      # 0xe557
callq 0x40a0
movq %rax, 0x8(%rsp)
leaq 0x2ee2(%rip), %rdi      # 0xe55e
callq 0x40a0
movq %rax, 0x28(%rsp)
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movq %rax, %r14
xorl %eax, %eax
movq %rax, (%r14)
xorl %r15d, %r15d
movw $0x14, %ax
movw %ax, 0x30(%r14)
movq %r12, 0x18(%r14)
leaq 0x22fb(%rip), %rax      # 0xd9af
movq %rax, 0x10(%r14)
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movq %r15, (%rax)
xorl %r15d, %r15d
movw $0x11, 0x30(%rax)
movq %r14, 0x8(%rax)
movq %rax, %rdi
callq 0x4410
leaq 0x2314(%rip), %rsi      # 0xd9fa
movq %rax, %rdi
callq 0x4040
movq %rax, %r14
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movq %r15, (%rax)
movw $0x10, %cx
movw %cx, 0x30(%rax)
movq %r14, 0x8(%rax)
leaq 0x2335(%rip), %rcx      # 0xda4b
movq %rcx, 0x10(%rax)
movq %r13, 0x18(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x40c0
callq 0x4490
movq %rax, %r14
callq 0x4340
movq 0x781b(%rip), %r13      # 0x12f58
movq 0x78b4(%rip), %rbx      # 0x12ff8
movl $0x2, %edi
movq %r13, %rsi
movq %r14, %rdx
movq %rax, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x4130
movq %rax, %r12
callq 0x4210
movq %rax, %r14
callq 0x4340
movl $0x2, %edi
movq %r13, %rsi
movq %r14, %rdx
movq %rax, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x4130
movq %rax, %r14
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movq %rax, %r13
movq %r15, (%rax)
movw $0x13, %bx
movw %bx, 0x30(%rax)
movq %r14, 0x8(%rax)
movq 0x77e9(%rip), %r15      # 0x12f98
movq %r15, 0x18(%rax)
leaq 0x3085(%rip), %rdi      # 0xe83f
callq 0x4510
movq %rax, %rbp
leaq 0x3078(%rip), %rdi      # 0xe841
callq 0x4510
movq %rax, %r10
subq $0x8, %rsp
leaq -0x8c4(%rip), %r11      # 0xaf18
movq 0x773d(%rip), %r14      # 0x12f20
leaq 0x2332(%rip), %rsi      # 0xdb1c
movl $0x5, %edi
movq %r12, %rdx
movq %r13, %rcx
movq %rbp, %r8
movq 0x20(%rsp), %rbp
movq %rbp, %r9
movl $0x0, %eax
pushq %r11
movq %r11, %r13
pushq %r14
pushq %r14
pushq %r14
pushq %r10
callq 0x4130
addq $0x30, %rsp
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x40c0
leaq 0x2d3c(%rip), %rdi      # 0xe56a
callq 0x4510
movq 0x76d6(%rip), %rsi      # 0x12f10
movl $0x2, %edi
movq %rax, %rdx
movq %rbp, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x4130
movq %rax, %r12
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
xorl %r14d, %r14d
movq %r14, (%rax)
movw %bx, 0x30(%rax)
movq %r12, 0x8(%rax)
movq %r15, 0x18(%rax)
leaq -0x95b(%rip), %rsi      # 0xaf1f
movl $0x2, %edi
movq 0x10(%rsp), %rbx
movq %rbx, %rdx
movq %rax, %rcx
movq %r13, %r8
xorl %eax, %eax
callq 0x4130
movq %rbp, %rdi
movq %rax, %rsi
callq 0x40c0
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movq %r14, (%rax)
movw $0x15, 0x30(%rax)
movq 0x8(%rsp), %r14
movq %r14, 0x18(%rax)
leaq -0x989(%rip), %rcx      # 0xaf3e
movq %rcx, 0x10(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x40c0
leaq 0x2cdf(%rip), %rdi      # 0xe5bc
callq 0x4510
movq %rax, %r12
leaq 0x2cd2(%rip), %rdi      # 0xe5be
callq 0x4510
movq %rax, %r13
leaq 0x2ed0(%rip), %rdi      # 0xe7cb
callq 0x4510
movq %rax, %rbp
leaq 0x2f29(%rip), %rdi      # 0xe833
callq 0x4510
movq %rax, %rbx
callq 0x4220
leaq 0x2c30(%rip), %rdx      # 0xe54e
leaq 0x2e9b(%rip), %rcx      # 0xe7c0
movq %rax, %rdi
movq 0x75f1(%rip), %rsi      # 0x12f20
callq 0x42e0
movq %rax, %r15
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movq %rax, %r10
xorl %eax, %eax
movq %rax, (%r10)
movw $0x1, 0x30(%r10)
subq $0x8, %rsp
movl $0x6, %edi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
movq %rbx, %r8
movq %r15, %r9
xorl %eax, %eax
pushq %r10
callq 0x4500
addq $0x10, %rsp
leaq -0x9e6(%rip), %rsi      # 0xaf9b
movl $0x2, %edi
movq 0x28(%rsp), %rdx
movq %rax, %rcx
leaq -0xa7d(%rip), %r8       # 0xaf18
xorl %eax, %eax
callq 0x4130
movq %r14, %rdi
movq %rax, %rsi
callq 0x40c0
callq 0x4210
movq %rax, %rbx
callq 0x4340
movl $0x2, %edi
movq 0x7598(%rip), %rbp      # 0x12f58
movq %rbp, %rsi
movq %rbx, %rdx
movq %rax, %rcx
movq 0x7628(%rip), %r12      # 0x12ff8
movq %r12, %r8
xorl %eax, %eax
callq 0x4130
movq %rax, %rbx
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movq %rax, %r13
xorl %eax, %eax
movq %rax, (%r13)
movw $0x10, %r14w
movw %r14w, 0x30(%r13)
movq %rbx, 0x8(%r13)
leaq -0x922(%rip), %rax      # 0xb0e8
movq %rax, 0x10(%r13)
movq 0x20(%rsp), %r15
movq %r15, 0x18(%r13)
callq 0x4460
movq %rax, %rbx
callq 0x4340
movl $0x2, %edi
movq %rbp, %rsi
movq %rbx, %rdx
movq %rax, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x4130
movq %rax, %rbx
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movq %rax, %rbp
xorl %eax, %eax
movq %rax, (%rbp)
movw %r14w, 0x30(%rbp)
movq %rbx, 0x8(%rbp)
leaq -0x89e(%rip), %rax      # 0xb1c9
movq %rax, 0x10(%rbp)
movq %r15, 0x18(%rbp)
movq %r15, %r14
callq 0x44f0
movq %rax, %r12
leaq 0x2b3f(%rip), %rdi      # 0xe5c0
callq 0x4070
movq %rax, %rbx
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movq %rax, %r15
xorl %eax, %eax
movq %rax, (%r15)
movw $0x14, %ax
movw %ax, 0x30(%r15)
movq %rbx, 0x18(%r15)
movq 0x750c(%rip), %rax      # 0x12fc0
movq %rax, 0x10(%r15)
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
xorl %ecx, %ecx
movq %rcx, (%rax)
movw $0x4, 0x30(%rax)
movq %r14, 0x10(%rax)
subq $0x8, %rsp
leaq -0x837(%rip), %rsi      # 0xb2aa
movl $0x3, %edi
movq %r12, %rdx
movq %r15, %rcx
movq %rax, %r8
movq 0x742a(%rip), %r9       # 0x12f20
xorl %eax, %eax
pushq %r9
movq %r9, %r14
callq 0x4130
addq $0x10, %rsp
movq %rax, %rbx
callq 0x4340
movl $0x2, %edi
movq 0x743e(%rip), %rsi      # 0x12f58
movq %rbx, %rdx
movq %rax, %rcx
movq 0x74d1(%rip), %r8       # 0x12ff8
xorl %eax, %eax
callq 0x4130
movq %rax, %r12
callq 0x41b0
movq %rax, %rbx
callq 0x4490
movl $0x2, %edi
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x4500
leaq 0x29f5(%rip), %rdx      # 0xe54c
leaq 0x2c36(%rip), %rcx      # 0xe794
movq %rax, %rdi
movq %r14, %rsi
callq 0x42e0
movq %rax, %rbx
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movq %rax, %r14
xorl %eax, %eax
movq %rax, (%r14)
movw $0x10, %ax
movw %ax, 0x30(%r14)
movq %rbx, 0x8(%r14)
leaq -0x7cb(%rip), %rax      # 0xb3cc
movq %rax, 0x10(%r14)
movq 0x20(%rsp), %rax
movq %rax, 0x18(%r14)
leaq 0x2c18(%rip), %rdx      # 0xe7c3
leaq 0x2998(%rip), %rcx      # 0xe54a
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
leaq -0xca9(%rip), %rsi      # 0xaf18
callq 0x42e0
movl $0x5, %edi
movq %r13, %rsi
movq 0x10(%rsp), %r13
movq %rbp, %rdx
movq 0x8(%rsp), %rbp
movq %r12, %rcx
movq %rbx, %r12
movq %r14, %r8
movq 0x30(%rsp), %r14
movq %rax, %r9
xorl %eax, %eax
callq 0x4500
movq 0x28(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x40c0
movq %r14, %rdi
movl $0x1, %esi
callq 0xc0b6
movq (%rsp), %rdi
movl $0x1, %esi
callq 0xc0b6
movq %r12, %rdi
movl $0x1, %esi
callq 0xc0b6
movq %r13, %rdi
movl $0x1, %esi
callq 0xc0b6
movq %rbp, %rdi
movl $0x1, %esi
callq 0xc0b6
movq %rbx, %r15
movq %rbx, %rdi
movl $0x1, %esi
callq 0xc0b6
leaq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x4090
movl $0x0, %ebx
testl %eax, %eax
jne 0xbc75
movq 0x40(%rsp), %rbx
subq $0x8, %rsp
movl $0x6, %edi
movq %r14, %rsi
movq 0x8(%rsp), %rdx
movq %r12, %rcx
movq %r13, %r8
movq %rbp, %r9
xorl %eax, %eax
pushq %r15
callq 0x44b0
addq $0x10, %rsp
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq