// File: /workspace/github_c_makefile_star2_O2/orangeduck[P]mpc/tests/grammar.c
// Function: test_regex_mode
void test_regex_mode(void) {
  
  mpc_parser_t *Line0, *Line1, *Line2, *Line3;
  mpc_ast_t *t0, *t1, *t2, *t3, *t4;
  
  Line0 = mpc_new("line0");
  Line1 = mpc_new("line1");
  Line2 = mpc_new("line2");
  Line3 = mpc_new("line3");
  
  mpca_lang(MPCA_LANG_DEFAULT, " line0 : /.*/; ", Line0);
  mpca_lang(MPCA_LANG_DEFAULT, " line1 : /.*/s; ", Line1);
  mpca_lang(MPCA_LANG_DEFAULT, " line2 : /(^[a-z]*$)*/; ", Line2);
  mpca_lang(MPCA_LANG_DEFAULT, " line3 : /(^[a-z]*$)*/m; ", Line3);
  
  t0 = mpc_ast_new("regex", "blah");
  t1 = mpc_ast_new("regex", "blah\nblah");
  t2 = mpc_ast_new("regex", "");
  t3 = mpc_ast_new("regex", "blah");
  t4 = mpc_ast_new("regex", "blah\nblah");
  
  PT_ASSERT(mpc_test_pass(Line0, "blah\nblah", t0,
    (int(*)(const void*,const void*))mpc_ast_eq,
    (mpc_dtor_t)mpc_ast_delete,
    (void(*)(const void*))mpc_ast_print));
  
  PT_ASSERT(mpc_test_pass(Line1, "blah\nblah", t1,
    (int(*)(const void*,const void*))mpc_ast_eq,
    (mpc_dtor_t)mpc_ast_delete,
    (void(*)(const void*))mpc_ast_print));
  
  PT_ASSERT(mpc_test_pass(Line2, "blah\nblah", t2,
    (int(*)(const void*,const void*))mpc_ast_eq,
    (mpc_dtor_t)mpc_ast_delete,
    (void(*)(const void*))mpc_ast_print));

  PT_ASSERT(mpc_test_pass(Line2, "blah", t3,
    (int(*)(const void*,const void*))mpc_ast_eq,
    (mpc_dtor_t)mpc_ast_delete,
    (void(*)(const void*))mpc_ast_print));
    
  PT_ASSERT(mpc_test_pass(Line3, "blah\nblah", t4,
    (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_ast_delete(t1);
  mpc_ast_delete(t2);
  mpc_ast_delete(t3);
  mpc_ast_delete(t4);
  
  mpc_cleanup(4, Line0, Line1, Line2, Line3);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0xb0be(%rip), %rdi      # 0xea74
callq 0x6a1e
movq %rax, %r15
leaq 0xb0b5(%rip), %rdi      # 0xea7a
callq 0x6a1e
movq %rax, %r14
movq %rax, 0x8(%rsp)
leaq 0xb0a7(%rip), %rdi      # 0xea80
callq 0x6a1e
movq %rax, %r13
movq %rax, (%rsp)
leaq 0xb09a(%rip), %rdi      # 0xea86
callq 0x6a1e
movq %rax, %r12
movq %rax, 0x40(%rsp)
leaq 0xb08c(%rip), %rsi      # 0xea8c
xorl %edi, %edi
movq %r15, %rdx
movq %r15, 0x38(%rsp)
xorl %eax, %eax
callq 0xafa2
leaq 0xb084(%rip), %rsi      # 0xea9c
xorl %edi, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0xafa2
leaq 0xb082(%rip), %rsi      # 0xeaad
xorl %edi, %edi
movq %r13, %rdx
xorl %eax, %eax
callq 0xafa2
leaq 0xb088(%rip), %rsi      # 0xeac6
xorl %edi, %edi
movq %r12, %rdx
xorl %eax, %eax
callq 0xafa2
leaq 0xae27(%rip), %rbx      # 0xe878
leaq 0xb08d(%rip), %r14      # 0xeae5
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9743
movq %rax, %r12
movq %rax, 0x30(%rsp)
leaq 0xb06e(%rip), %rbp      # 0xeae0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x9743
movq %rax, %r13
movq %rax, 0x20(%rsp)
leaq 0xca06(%rip), %rsi      # 0x10492
movq %rbx, %rdi
callq 0x9743
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9743
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
movq %rbp, %rbx
callq 0x9743
movq %rax, 0x28(%rsp)
leaq 0x5e59(%rip), %rbp      # 0x991c
leaq 0x5c29(%rip), %r8       # 0x96f3
leaq 0x6024(%rip), %r9       # 0x9af5
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %rbp, %rcx
movq %rbp, %r12
movq %r9, %r15
callq 0x9642
leaq 0xaffb(%rip), %rsi      # 0xeaea
leaq 0xa244(%rip), %r14      # 0xdd3a
movl %eax, %edi
movq %r14, %rdx
movl $0x135, %ecx            # imm = 0x135
callq 0x4040
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %rbp, %rcx
leaq 0x5bd9(%rip), %r8       # 0x96f3
movq %r8, %rbp
movq %r15, %r9
callq 0x9642
leaq 0xb053(%rip), %rsi      # 0xeb7f
movl %eax, %edi
movq %r14, %rdx
movl $0x13a, %ecx            # imm = 0x13A
callq 0x4040
movq (%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq 0x10(%rsp), %r13
movq %r13, %rdx
movq %r12, %rcx
movq %rbp, %r8
movq %r15, %r9
movq %r15, %rbx
callq 0x9642
leaq 0xb0af(%rip), %rsi      # 0xec14
movl %eax, %edi
leaq 0xa1cc(%rip), %rdx      # 0xdd3a
movq %rdx, %rbp
movl $0x13f, %ecx            # imm = 0x13F
callq 0x4040
movq %r14, %rdi
leaq 0xaf60(%rip), %rsi      # 0xeae5
movq 0x18(%rsp), %r15
movq %r15, %rdx
movq %r12, %rcx
leaq 0x5b5c(%rip), %r8       # 0x96f3
movq %rbx, %r9
callq 0x9642
leaq 0xb103(%rip), %rsi      # 0xeca9
movl %eax, %edi
movq %rbp, %rdx
movl $0x144, %ecx            # imm = 0x144
callq 0x4040
movq 0x40(%rsp), %r14
movq %r14, %rdi
leaq 0xaf1c(%rip), %rsi      # 0xeae0
movq 0x28(%rsp), %rbx
movq %rbx, %rdx
movq %r12, %rcx
leaq 0x5b1d(%rip), %r8       # 0x96f3
leaq 0x5f18(%rip), %r9       # 0x9af5
callq 0x9642
leaq 0xb14f(%rip), %rsi      # 0xed38
movl %eax, %edi
movq %rbp, %rdx
movl $0x149, %ecx            # imm = 0x149
callq 0x4040
movq 0x30(%rsp), %rdi
callq 0x96f3
movq 0x20(%rsp), %rdi
callq 0x96f3
movq %r13, %rdi
callq 0x96f3
movq %r15, %rdi
callq 0x96f3
movq %rbx, %rdi
callq 0x96f3
pushq $0x4
popq %rdi
movq 0x38(%rsp), %rsi
movq 0x8(%rsp), %rdx
movq (%rsp), %rcx
movq %r14, %r8
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6e12