// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq 0xca65(%rip), %rdi      # 0x112f0
callq 0x92b6
movq %rax, %rbx
movq %rax, 0x10(%rsp)
leaq 0xca59(%rip), %rdi      # 0x112f8
callq 0x92b6
movq %rax, %r15
movq %rax, 0x8(%rsp)
leaq 0xca4f(%rip), %rdi      # 0x11302
callq 0x92b6
movq %rax, 0x18(%rsp)
leaq 0xca49(%rip), %rdi      # 0x1130d
callq 0x92b6
movq %rax, 0x30(%rsp)
leaq 0xca43(%rip), %rdi      # 0x11318
callq 0x92b6
movq %rax, 0x28(%rsp)
leaq 0xca3e(%rip), %rdi      # 0x11324
callq 0x92b6
movq %rax, 0x20(%rsp)
leaq 0xca3b(%rip), %rdx      # 0x11332
leaq -0xc4(%rip), %r12       # 0x483a
movq 0x136c3(%rip), %r13     # 0x17fc8
leaq -0xc1(%rip), %r14       # 0x484b
movq %rbx, %rdi
movq %rdx, %rsi
movq %r12, %rcx
movq %r13, %r8
movq %r14, %r9
callq 0xaa3c
leaq 0xca0f(%rip), %rsi      # 0x11336
leaq 0xca2b(%rip), %rbp      # 0x11359
movl %eax, %edi
movq %rbp, %rdx
movl $0x1d, %ecx
callq 0x4050
leaq 0xc9b0(%rip), %rdx      # 0x112f4
movq %rbx, %rdi
movq %rdx, %rsi
movq %r12, %rcx
movq %r13, %r8
movq %r14, %r9
callq 0xaa3c
leaq 0xca08(%rip), %rsi      # 0x11367
movl %eax, %edi
movq %rbp, %rdx
movl $0x1e, %ecx
callq 0x4050
leaq 0xc9be(%rip), %rdx      # 0x11333
movq %rbx, %rdi
movq %rdx, %rsi
movq %r12, %rcx
movq %r13, %r8
movq %r14, %r9
callq 0xa9c0
leaq 0xc9fa(%rip), %rsi      # 0x1138a
movl %eax, %edi
movq %rbp, %rdx
movl $0x1f, %ecx
callq 0x4050
leaq 0xca6d(%rip), %rdx      # 0x11413
movq %rbx, %rdi
movq %rdx, %rsi
movq %r12, %rcx
movq %r13, %r8
movq %r14, %r9
callq 0xa9c0
leaq 0xc9ea(%rip), %rsi      # 0x113ab
movl %eax, %edi
movq %rbp, %rdx
movl $0x20, %ecx
callq 0x4050
leaq 0xd7b1(%rip), %rdx      # 0x12188
movq %r15, %rdi
movq %rdx, %rsi
movq %r12, %rcx
movq %r13, %r8
movq %r14, %r9
callq 0xaa3c
leaq 0xc9da(%rip), %rsi      # 0x113cc
movl %eax, %edi
movq %rbp, %rdx
movl $0x21, %ecx
callq 0x4050
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
leaq 0xc922(%rip), %rdx      # 0x11332
movq %rdx, %rsi
movq %r12, %rcx
movq %r13, %r8
movq %r14, %r9
callq 0xaa3c
leaq 0xc9c3(%rip), %rsi      # 0x113eb
movl %eax, %edi
movq %rbp, %rdx
movl $0x22, %ecx
callq 0x4050
leaq 0xc9d0(%rip), %r15      # 0x1140e
movq %rbx, %rdi
movq %r15, %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
movq %r14, %r9
callq 0xaa3c
leaq 0xc9ba(%rip), %rsi      # 0x11416
movl %eax, %edi
movq %rbp, %rdx
movl $0x23, %ecx
callq 0x4050
leaq 0xc9cf(%rip), %rsi      # 0x11441
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
movq %r14, %r9
callq 0xaa3c
leaq 0xc9bd(%rip), %rsi      # 0x1144a
movl %eax, %edi
movq %rbp, %rdx
movl $0x24, %ecx
callq 0x4050
leaq 0xc9d3(%rip), %rdx      # 0x11476
movq 0x20(%rsp), %r15
movq %r15, %rdi
movq %rdx, %rsi
movq %r12, %rcx
movq %r13, %r8
movq %r14, %r9
callq 0xaa3c
leaq 0xc9ba(%rip), %rsi      # 0x1147d
movl %eax, %edi
movq %rbp, %rdx
movl $0x25, %ecx
callq 0x4050
movq 0x10(%rsp), %rdi
callq 0x7052
movq 0x8(%rsp), %rdi
callq 0x7052
movq %rbx, %rdi
callq 0x7052
movq 0x30(%rsp), %rdi
callq 0x7052
movq 0x28(%rsp), %rdi
callq 0x7052
movq %r15, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7052