// File: /workspace/github_c_makefile_star2_O1/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 0xd130(%rip), %rdi      # 0x1032f
callq 0x7191
movq %rax, %rbx
movq %rax, 0x20(%rsp)
leaq 0xd0f4(%rip), %rdi      # 0x10307
callq 0x7191
movq %rax, %r14
movq %rax, 0x18(%rsp)
leaq 0xd0e7(%rip), %rdi      # 0x1030e
callq 0x7191
movq %rax, %r15
movq %rax, 0x10(%rsp)
leaq 0xd0e1(%rip), %rdi      # 0x1031c
callq 0x7191
movq %rax, %r12
movq %rax, 0x8(%rsp)
leaq 0xd0d8(%rip), %rdi      # 0x10327
callq 0x7191
movq %rax, %r13
leaq 0xd0d0(%rip), %rdi      # 0x1032e
callq 0x9128
leaq 0x8236(%rip), %rsi      # 0xb4a0
movq %rax, %rdi
callq 0x7b78
leaq 0xd09c(%rip), %rsi      # 0x10315
movq %rax, %rdi
callq 0xb533
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7478
leaq 0xd0a1(%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 0xcd98
addq $0x10, %rsp
xorl %edi, %edi
testq %rax, %rax
sete %dil
leaq 0xd109(%rip), %rsi      # 0x103cc
leaq 0xca70(%rip), %rdx      # 0xfd3a
movl $0x97, %ecx
callq 0x4050
leaq 0xd59d(%rip), %r15      # 0x10878
leaq 0xf190(%rip), %rbp      # 0x12472
movq %r15, %rdi
movq %rbp, %rsi
callq 0xab6f
movq %rax, %r14
leaq 0xd0ee(%rip), %rdi      # 0x103e5
leaq 0xd030(%rip), %rsi      # 0x1032e
callq 0xab6f
movq %rax, %r12
leaq 0xd0e4(%rip), %rdi      # 0x103f1
leaq 0xd0ea(%rip), %rsi      # 0x103fe
callq 0xab6f
movq %rax, %rbx
leaq 0xd0de(%rip), %rdi      # 0x10401
leaq 0xd0f4(%rip), %rsi      # 0x1041e
callq 0xab6f
leaq 0xd0a2(%rip), %rsi      # 0x103d8
movl $0x3, %edi
movq %r12, %rdx
movq %rbx, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0xabe9
movq %rax, %rbx
movq %r15, %rdi
movq %rbp, %rsi
callq 0xab6f
leaq 0xf152(%rip), %rsi      # 0x124b2
movl $0x3, %edi
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0xabe9
movq %rax, %rbx
leaq 0xd096(%rip), %rsi      # 0x10415
leaq 0x7a13(%rip), %rcx      # 0xad99
leaq 0x778a(%rip), %r8       # 0xab17
leaq 0x7bea(%rip), %r9       # 0xaf7e
movq %r13, %rdi
movq %rax, %rdx
callq 0xaa3c
leaq 0xd07f(%rip), %rsi      # 0x10425
movl %eax, %edi
leaq 0xc98b(%rip), %rdx      # 0xfd3a
movl $0xa4, %ecx
callq 0x4050
movq %rbx, %rdi
callq 0xab17
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 0x75e0