// File: /workspace/github_c_makefile_star2_O3/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, %r12
movq %rsi, 0x18(%rsp)
movq %rdi, 0x38(%rsp)
leaq 0x3307(%rip), %rdi      # 0xe865
callq 0x40a0
movq %rax, %r15
movq %rax, 0x30(%rsp)
leaq 0x32f8(%rip), %rdi      # 0xe86a
callq 0x40a0
movq %rax, %rbx
leaq 0x3063(%rip), %rdi      # 0xe5e4
callq 0x40a0
movq %rax, (%rsp)
leaq 0x2ff1(%rip), %rdi      # 0xe582
callq 0x40a0
movq %rax, 0x10(%rsp)
leaq 0x2fe5(%rip), %rdi      # 0xe587
callq 0x40a0
movq %rax, 0x8(%rsp)
leaq 0x2fdb(%rip), %rdi      # 0xe58e
callq 0x40a0
movq %rax, 0x20(%rsp)
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movq %rax, %r14
movb $0x14, %al
movb %al, 0x30(%r14)
movq %rbx, 0x18(%r14)
movq %rbx, 0x28(%rsp)
leaq 0x2247(%rip), %rax      # 0xd82c
movq %rax, 0x10(%r14)
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movb $0x11, 0x30(%rax)
movq %r14, 0x8(%rax)
movq %rax, %rdi
callq 0x4400
leaq 0x2268(%rip), %rsi      # 0xd877
movq %rax, %rdi
callq 0x4040
movq %rax, %r14
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movb $0x10, %cl
movb %cl, 0x30(%rax)
movq %r14, 0x8(%rax)
leaq 0x228f(%rip), %rcx      # 0xd8c8
movq %rcx, 0x10(%rax)
movq %r12, 0x18(%rax)
movq %r15, %rdi
movq %rax, %rsi
callq 0x40c0
callq 0x4480
movq %rax, %r14
callq 0x4340
movq 0x78f8(%rip), %r13      # 0x12f58
movq 0x7991(%rip), %r15      # 0x12ff8
movl $0x2, %edi
movq %r13, %rsi
movq %r14, %rdx
movq %rax, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x4140
movq %rax, %r12
callq 0x4210
movq %rax, %r14
callq 0x4340
movl $0x2, %edi
movq %r13, %rsi
movq %r14, %rdx
movq %rax, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x4140
movq %rax, %r14
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movq %rax, %r13
movb $0x13, %al
movb %al, 0x30(%r13)
movq %r14, 0x8(%r13)
movq 0x78cb(%rip), %rax      # 0x12f98
movq %rax, 0x18(%r13)
leaq 0x3197(%rip), %rdi      # 0xe86f
callq 0x4510
movq %rax, %rbp
leaq 0x318a(%rip), %rdi      # 0xe871
callq 0x4510
movq %rax, %r10
subq $0x8, %rsp
leaq -0x916(%rip), %r11      # 0xade4
movq 0x781f(%rip), %r15      # 0x12f20
leaq 0x2287(%rip), %rsi      # 0xd98f
movl $0x5, %edi
movq %r12, %rdx
movq %r13, %rcx
movq %rbp, %r8
movq 0x8(%rsp), %r14
movq %r14, %r9
movl $0x0, %eax
pushq %r11
movq %r11, %r13
pushq %r15
pushq %r15
pushq %r15
pushq %r10
callq 0x4140
addq $0x30, %rsp
movq %rbx, %rdi
movq %rax, %rsi
callq 0x40c0
leaq 0x2e4f(%rip), %rdi      # 0xe59a
callq 0x4510
movq 0x77b9(%rip), %rsi      # 0x12f10
movl $0x2, %edi
movq %rax, %rdx
movq %r14, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x4140
movq %rax, %r12
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movb $0x13, %cl
movb %cl, 0x30(%rax)
movq %r12, 0x8(%rax)
movq 0x780a(%rip), %rcx      # 0x12f98
movq %rcx, 0x18(%rax)
leaq -0x9ae(%rip), %rsi      # 0xadeb
movl $0x2, %edi
movq 0x10(%rsp), %rbx
movq %rbx, %rdx
movq %rax, %rcx
movq %r13, %r8
xorl %eax, %eax
callq 0x4140
movq %r14, %rdi
movq %rax, %rsi
callq 0x40c0
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movb $0x15, 0x30(%rax)
movq 0x8(%rsp), %r14
movq %r14, 0x18(%rax)
leaq -0x9d7(%rip), %rcx      # 0xae0a
movq %rcx, 0x10(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x40c0
leaq 0x2df5(%rip), %rdi      # 0xe5ec
callq 0x4510
movq %rax, %r12
leaq 0x2de8(%rip), %rdi      # 0xe5ee
callq 0x4510
movq %rax, %r13
leaq 0x2fe6(%rip), %rdi      # 0xe7fb
callq 0x4510
movq %rax, %rbp
leaq 0x303f(%rip), %rdi      # 0xe863
callq 0x4510
movq %rax, %rbx
callq 0x4220
leaq 0x2d46(%rip), %rdx      # 0xe57e
leaq 0x2fb1(%rip), %rcx      # 0xe7f0
movq %rax, %rdi
movq %r15, %rsi
callq 0x42e0
movq %rax, %r15
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movq %rax, %r10
movb $0x1, 0x30(%rax)
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 -0xa31(%rip), %rsi      # 0xae5e
movl $0x2, %edi
movq 0x20(%rsp), %rdx
movq %rax, %rcx
leaq -0xabf(%rip), %r8       # 0xade4
xorl %eax, %eax
callq 0x4140
movq %r14, %rdi
movq %rax, %rsi
callq 0x40c0
callq 0x4210
movq %rax, %rbx
callq 0x4340
movl $0x2, %edi
movq 0x768a(%rip), %rbp      # 0x12f58
movq %rbp, %rsi
movq %rbx, %rdx
movq %rax, %rcx
movq 0x771a(%rip), %r12      # 0x12ff8
movq %r12, %r8
xorl %eax, %eax
callq 0x4140
movq %rax, %rbx
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movq %rax, %r13
movb $0x10, %r14b
movb %r14b, 0x30(%rax)
movq %rbx, 0x8(%rax)
leaq -0x991(%rip), %rax      # 0xaf7e
movq %rax, 0x10(%r13)
movq 0x18(%rsp), %r15
movq %r15, 0x18(%r13)
callq 0x4450
movq %rax, %rbx
callq 0x4340
movl $0x2, %edi
movq %rbp, %rsi
movq %rbx, %rdx
movq %rax, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x4140
movq %rax, %rbx
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movq %rax, %rbp
movb %r14b, 0x30(%rax)
movq %rbx, 0x8(%rax)
leaq -0x8e2(%rip), %rax      # 0xb083
movq %rax, 0x10(%rbp)
movq %r15, 0x18(%rbp)
movq %r15, %r14
callq 0x44e0
movq %rax, %rbx
leaq 0x2c71(%rip), %rdi      # 0xe5f0
callq 0x4070
movq %rax, %r15
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movq %rax, %r12
movb $0x14, %al
movb %al, 0x30(%r12)
movq %r15, 0x18(%r12)
movq (%rsp), %r15
movq 0x7610(%rip), %rax      # 0x12fc0
movq %rax, 0x10(%r12)
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movb $0x4, 0x30(%rax)
movq %r14, 0x10(%rax)
subq $0x8, %rsp
leaq -0x82a(%rip), %rsi      # 0xb1ad
movl $0x3, %edi
movq %rbx, %rdx
movq %r12, %rcx
movq %rax, %r8
movq 0x7534(%rip), %r9       # 0x12f20
xorl %eax, %eax
pushq %r9
movq %r9, %r14
callq 0x4140
addq $0x10, %rsp
movq %rax, %rbx
callq 0x4340
movl $0x2, %edi
movq 0x7548(%rip), %rsi      # 0x12f58
movq %rbx, %rdx
movq %rax, %rcx
movq 0x75db(%rip), %r8       # 0x12ff8
xorl %eax, %eax
callq 0x4140
movq %rax, %r12
callq 0x41b0
movq %rax, %rbx
callq 0x4480
movl $0x2, %edi
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x4500
leaq 0x2b2f(%rip), %rdx      # 0xe57c
leaq 0x2d70(%rip), %rcx      # 0xe7c4
movq %rax, %rdi
movq %r14, %rsi
callq 0x42e0
movq %rax, %rbx
movl $0x1, %edi
movl $0x38, %esi
callq 0x4280
movq %rax, %r14
movb $0x10, %al
movb %al, 0x30(%r14)
movq %rbx, 0x8(%r14)
movq 0x30(%rsp), %rbx
leaq -0x797(%rip), %rax      # 0xb2f3
movq %rax, 0x10(%r14)
movq 0x18(%rsp), %rax
movq %rax, 0x18(%r14)
leaq 0x2d55(%rip), %rdx      # 0xe7f3
leaq 0x2ad5(%rip), %rcx      # 0xe57a
movq %r15, %rdi
leaq -0xccb(%rip), %rsi      # 0xade4
callq 0x42e0
movl $0x5, %edi
movq %r13, %rsi
movq 0x8(%rsp), %r13
movq %rbp, %rdx
movq 0x20(%rsp), %rbp
movq %r12, %rcx
movq 0x10(%rsp), %r12
movq %r14, %r8
movq 0x28(%rsp), %r14
movq %rax, %r9
xorl %eax, %eax
callq 0x4500
movq %rbp, %rdi
movq %rax, %rsi
callq 0x40c0
movq %rbx, %rdi
movl $0x1, %esi
callq 0xbfc5
movq %r14, %rdi
movl $0x1, %esi
callq 0xbfc5
movq %r15, %rdi
movl $0x1, %esi
callq 0xbfc5
movq %r12, %rdi
movl $0x1, %esi
callq 0xbfc5
movq %r13, %rdi
movl $0x1, %esi
callq 0xbfc5
movq %rbp, %rdi
movl $0x1, %esi
callq 0xbfc5
leaq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rdi
movq %rbx, %rsi
callq 0x4090
testl %eax, %eax
jne 0xbb59
movq 0x40(%rsp), %r15
jmp 0xbb5c
xorl %r15d, %r15d
subq $0x8, %rsp
movl $0x6, %edi
movq %rbx, %rsi
movq %r14, %rdx
movq 0x8(%rsp), %rcx
movq %r12, %r8
movq %r13, %r9
xorl %eax, %eax
pushq %rbp
callq 0x44a0
addq $0x10, %rsp
movq %r15, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq