// File: /workspace/github_c_makefile_star2_O0/orangeduck[P]mpc/tests/regex.c
// Function: test_regex_basic
void test_regex_basic(void) {

  mpc_parser_t *re0, *re1, *re2, *re3, *re4, *re5;

  re0 = mpc_re("abc|bcd");
  re1 = mpc_re("abc|bcd|e");
  re2 = mpc_re("ab()c(ab)*");
  re3 = mpc_re("abc(abdd)?");
  re4 = mpc_re("ab|c(abdd)?");
  re5 = mpc_re("abc(ab|dd)+g$");

  PT_ASSERT(regex_test_pass(re0, "abc", "abc"));
  PT_ASSERT(regex_test_pass(re0, "bcd", "bcd"));
  PT_ASSERT(regex_test_fail(re0, "bc", "bc"));
  PT_ASSERT(regex_test_fail(re0, "ab", "ab"));
  PT_ASSERT(regex_test_pass(re1, "e", "e"));
  PT_ASSERT(regex_test_pass(re2, "abc", "abc"));
  PT_ASSERT(regex_test_pass(re2, "abcabab", "abcabab"));
  PT_ASSERT(regex_test_pass(re2, "abcababd", "abcabab"));
  PT_ASSERT(regex_test_pass(re5, "abcddg", "abcddg"));

  mpc_delete(re0);
  mpc_delete(re1);
  mpc_delete(re2);
  mpc_delete(re3);
  mpc_delete(re4);
  mpc_delete(re5);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0x1007d(%rip), %rdi     # 0x162ac
callq 0xbc90
movq %rax, -0x8(%rbp)
leaq 0x10075(%rip), %rdi     # 0x162b4
callq 0xbc90
movq %rax, -0x10(%rbp)
leaq 0x1006f(%rip), %rdi     # 0x162be
callq 0xbc90
movq %rax, -0x18(%rbp)
leaq 0x1006a(%rip), %rdi     # 0x162c9
callq 0xbc90
movq %rax, -0x20(%rbp)
leaq 0x10065(%rip), %rdi     # 0x162d4
callq 0xbc90
movq %rax, -0x28(%rbp)
leaq 0x10061(%rip), %rdi     # 0x162e0
callq 0xbc90
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x1005b(%rip), %rdx     # 0x162ee
movq %rdx, %rsi
callq 0x6140
movl %eax, %edi
leaq 0x1004e(%rip), %rsi     # 0x162f2
leaq 0x1006a(%rip), %rdx     # 0x16315
movl $0x1d, %ecx
callq 0x5780
movq -0x8(%rbp), %rdi
leaq 0xfff0(%rip), %rdx      # 0x162b0
movq %rdx, %rsi
callq 0x6140
movl %eax, %edi
leaq 0x10052(%rip), %rsi     # 0x16323
leaq 0x1003d(%rip), %rdx     # 0x16315
movl $0x1e, %ecx
callq 0x5780
movq -0x8(%rbp), %rdi
leaq 0x10002(%rip), %rdx     # 0x162ef
movq %rdx, %rsi
callq 0x61e0
movl %eax, %edi
leaq 0x10048(%rip), %rsi     # 0x16346
leaq 0x10010(%rip), %rdx     # 0x16315
movl $0x1f, %ecx
callq 0x5780
movq -0x8(%rbp), %rdi
leaq 0x100b5(%rip), %rdx     # 0x163cf
movq %rdx, %rsi
callq 0x61e0
movl %eax, %edi
leaq 0x1003c(%rip), %rsi     # 0x16367
leaq 0xffe3(%rip), %rdx      # 0x16315
movl $0x20, %ecx
callq 0x5780
movq -0x10(%rbp), %rdi
leaq 0x10fab(%rip), %rdx     # 0x172f2
movq %rdx, %rsi
callq 0x6140
movl %eax, %edi
leaq 0x10030(%rip), %rsi     # 0x16388
leaq 0xffb6(%rip), %rdx      # 0x16315
movl $0x21, %ecx
callq 0x5780
movq -0x18(%rbp), %rdi
leaq 0xff7a(%rip), %rdx      # 0x162ee
movq %rdx, %rsi
callq 0x6140
movl %eax, %edi
leaq 0x10022(%rip), %rsi     # 0x163a7
leaq 0xff89(%rip), %rdx      # 0x16315
movl $0x22, %ecx
callq 0x5780
movq -0x18(%rbp), %rdi
leaq 0x10029(%rip), %rdx     # 0x163ca
movq %rdx, %rsi
callq 0x6140
movl %eax, %edi
leaq 0x10020(%rip), %rsi     # 0x163d2
leaq 0xff5c(%rip), %rdx      # 0x16315
movl $0x23, %ecx
callq 0x5780
movq -0x18(%rbp), %rdi
leaq 0x1002f(%rip), %rsi     # 0x163fd
leaq 0xfff5(%rip), %rdx      # 0x163ca
callq 0x6140
movl %eax, %edi
leaq 0x10023(%rip), %rsi     # 0x16406
leaq 0xff2b(%rip), %rdx      # 0x16315
movl $0x24, %ecx
callq 0x5780
movq -0x30(%rbp), %rdi
leaq 0x10033(%rip), %rdx     # 0x16432
movq %rdx, %rsi
callq 0x6140
movl %eax, %edi
leaq 0x10029(%rip), %rsi     # 0x16439
leaq 0xfefe(%rip), %rdx      # 0x16315
movl $0x25, %ecx
callq 0x5780
movq -0x8(%rbp), %rdi
callq 0x9160
movq -0x10(%rbp), %rdi
callq 0x9160
movq -0x18(%rbp), %rdi
callq 0x9160
movq -0x20(%rbp), %rdi
callq 0x9160
movq -0x28(%rbp), %rdi
callq 0x9160
movq -0x30(%rbp), %rdi
callq 0x9160
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)