// File: /workspace/github_c_makefile_star2_O3/orangeduck[P]mpc/tests/grammar.c
// Function: test_partial
void test_partial(void) {
  
  mpc_ast_t *t0;
  mpc_err_t *err;

  mpc_parser_t *Line = mpc_new("line");
  mpc_parser_t *Number = mpc_new("number");
  mpc_parser_t *QuotedString = mpc_new("quoted_string");
  mpc_parser_t *LinePragma = mpc_new("linepragma");
  mpc_parser_t *Parser = mpc_new("parser");
  
  mpc_define(Line, mpca_tag(mpc_apply(mpc_sym("#line"), mpcf_str_ast), "string"));
  
  err = mpca_lang(MPCA_LANG_PREDICTIVE,
    "number        : /[0-9]+/ ;\n"
    "quoted_string : /\"(\\.|[^\"])*\"/ ;\n"
    "linepragma    : <line> <number> <quoted_string>;\n"
    "parser        : /^/ (<linepragma>)* /$/ ;\n",
    Line, Number, QuotedString, LinePragma, Parser, NULL);
  
  PT_ASSERT(err == NULL);
  
  t0 = mpc_ast_build(3, ">", 
          mpc_ast_new("regex", ""),
          mpc_ast_build(3, "linepragma|>", 
            mpc_ast_new("line|string", "#line"),
            mpc_ast_new("number|regex", "10"),
            mpc_ast_new("quoted_string|regex", "\"test\"")),
          mpc_ast_new("regex", ""));
  
  PT_ASSERT(mpc_test_pass(Parser, "#line 10 \"test\"", t0, 
    (int(*)(const void*,const void*))mpc_ast_eq, 
    (mpc_dtor_t)mpc_ast_delete, 
    (void(*)(const void*))mpc_ast_print));
    
  mpc_ast_delete(t0);

  mpc_cleanup(5, Line, Number, QuotedString, LinePragma, Parser);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0xd0ec(%rip), %rdi      # 0x1032f
callq 0x71ca
movq %rax, %rbx
movq %rax, 0x20(%rsp)
leaq 0xd0b0(%rip), %rdi      # 0x10307
callq 0x71ca
movq %rax, %r14
movq %rax, 0x18(%rsp)
leaq 0xd0a3(%rip), %rdi      # 0x1030e
callq 0x71ca
movq %rax, %r15
movq %rax, 0x10(%rsp)
leaq 0xd09d(%rip), %rdi      # 0x1031c
callq 0x71ca
movq %rax, %r12
movq %rax, 0x8(%rsp)
leaq 0xd094(%rip), %rdi      # 0x10327
callq 0x71ca
movq %rax, %r13
leaq 0xd08c(%rip), %rdi      # 0x1032e
callq 0x8fc5
leaq 0x8120(%rip), %rsi      # 0xb3ce
movq %rax, %rdi
callq 0x7aef
leaq 0xd058(%rip), %rsi      # 0x10315
movq %rax, %rdi
callq 0xb458
movq %rbx, %rdi
movq %rax, %rsi
callq 0x747f
leaq 0xd05d(%rip), %rsi      # 0x10334
movl $0x1, %edi
movq %rbx, %rdx
movq %r14, %rcx
movq %r15, %r8
movq %r12, %r9
xorl %eax, %eax
pushq $0x0
pushq %r13
callq 0xccc2
addq $0x10, %rsp
xorl %edi, %edi
testq %rax, %rax
sete %dil
leaq 0xd0c5(%rip), %rsi      # 0x103cc
leaq 0xca2c(%rip), %rdx      # 0xfd3a
movl $0x97, %ecx
callq 0x4094
leaq 0xd559(%rip), %r15      # 0x10878
leaq 0xf17c(%rip), %rbp      # 0x124a2
movq %r15, %rdi
movq %rbp, %rsi
callq 0xaa70
movq %rax, %r14
leaq 0xd0aa(%rip), %rdi      # 0x103e5
leaq 0xcfec(%rip), %rsi      # 0x1032e
callq 0xaa70
movq %rax, %r12
leaq 0xd0a0(%rip), %rdi      # 0x103f1
leaq 0xd0a6(%rip), %rsi      # 0x103fe
callq 0xaa70
movq %rax, %rbx
leaq 0xd09a(%rip), %rdi      # 0x10401
leaq 0xd0b0(%rip), %rsi      # 0x1041e
callq 0xaa70
leaq 0xd05e(%rip), %rsi      # 0x103d8
movl $0x3, %edi
movq %r12, %rdx
movq %rbx, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0xaaea
movq %rax, %rbx
movq %r15, %rdi
movq %rbp, %rsi
callq 0xaa70
leaq 0xf13e(%rip), %rsi      # 0x124e2
movl $0x3, %edi
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0xaaea
movq %rax, %rbx
leaq 0xd052(%rip), %rsi      # 0x10415
leaq 0x78d0(%rip), %rcx      # 0xac9a
leaq 0x7647(%rip), %r8       # 0xaa18
leaq 0x7a9f(%rip), %r9       # 0xae77
movq %r13, %rdi
movq %rax, %rdx
callq 0xa93d
leaq 0xd03b(%rip), %rsi      # 0x10425
movl %eax, %edi
leaq 0xc947(%rip), %rdx      # 0xfd3a
movl $0xa4, %ecx
callq 0x4094
movq %rbx, %rdi
callq 0xaa18
movl $0x5, %edi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %r8
movq %r13, %r9
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x75de