// File: /workspace/github_c_makefile_star2_O2/orangeduck[P]mpc/tests/regex.c
// Function: test_regex_boundary
void test_regex_boundary(void) {

  mpc_parser_t *re0, *re1, *re2;

  re0 = mpc_re("\\bfoo\\b");
  re1 = mpc_re("(w| )?\\bfoo\\b");
  re2 = mpc_re("py\\B.*");

  PT_ASSERT(regex_test_pass(re0, "foo", "foo"));
  PT_ASSERT(regex_test_pass(re0, "foo.", "foo"));
  PT_ASSERT(regex_test_pass(re0, "foo)", "foo"));
  PT_ASSERT(regex_test_pass(re0, "foo baz", "foo"));

  PT_ASSERT(regex_test_fail(re0, "foobar", "foo"));
  PT_ASSERT(regex_test_fail(re0, "foo3", "foo"));

  PT_ASSERT(regex_test_pass(re1, "foo", "foo"));
  PT_ASSERT(regex_test_pass(re1, " foo", " foo"));
  PT_ASSERT(regex_test_fail(re1, "wfoo", "foo"));

  PT_ASSERT(regex_test_pass(re2, "python", "python"));
  PT_ASSERT(regex_test_pass(re2, "py3", "py3"));
  PT_ASSERT(regex_test_pass(re2, "py2", "py2"));
  PT_ASSERT(regex_test_fail(re2, "py", "py"));
  PT_ASSERT(regex_test_fail(re2, "py.", "py."));
  PT_ASSERT(regex_test_fail(re2, "py!", "py!"));

  mpc_delete(re0);
  mpc_delete(re1);
  mpc_delete(re2);

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0xab0d(%rip), %rdi      # 0xf4ac
callq 0x837c
movq %rax, %rbx
leaq 0xaaf8(%rip), %rdi      # 0xf4a6
callq 0x837c
movq %rax, %r14
leaq 0xaaf7(%rip), %rdi      # 0xf4b4
callq 0x837c
movq %rax, %r15
leaq 0xac0d(%rip), %r13      # 0xf5d9
movq %rbx, %rdi
movq %r13, %rsi
movq %r13, %rdx
callq 0x472c
leaq 0xaada(%rip), %rsi      # 0xf4bb
leaq 0xa971(%rip), %r12      # 0xf359
pushq $0x38
popq %rcx
movl %eax, %edi
movq %r12, %rdx
callq 0x4040
leaq 0xaae2(%rip), %rsi      # 0xf4de
movq %rbx, %rdi
movq %r13, %rdx
callq 0x472c
leaq 0xaad5(%rip), %rsi      # 0xf4e3
pushq $0x39
popq %rcx
movl %eax, %edi
movq %r12, %rdx
callq 0x4040
leaq 0xaae5(%rip), %rsi      # 0xf507
movq %rbx, %rdi
movq %r13, %rdx
callq 0x472c
leaq 0xaad8(%rip), %rsi      # 0xf50c
pushq $0x3a
popq %rcx
movl %eax, %edi
movq %r12, %rdx
callq 0x4040
leaq 0xaae8(%rip), %rsi      # 0xf530
movq %rbx, %rdi
movq %r13, %rdx
callq 0x472c
leaq 0xaade(%rip), %rsi      # 0xf538
pushq $0x3b
popq %rcx
movl %eax, %edi
movq %r12, %rdx
callq 0x4040
leaq 0xaaf1(%rip), %rsi      # 0xf55f
movq %rbx, %rdi
movq %r13, %rdx
callq 0x4768
leaq 0xaae6(%rip), %rsi      # 0xf566
pushq $0x3d
popq %rcx
movl %eax, %edi
movq %r12, %rdx
callq 0x4040
leaq 0xaaf8(%rip), %rsi      # 0xf58c
movq %rbx, %rdi
movq %r13, %rdx
callq 0x4768
leaq 0xaaeb(%rip), %rsi      # 0xf591
pushq $0x3e
popq %rcx
movl %eax, %edi
movq %r12, %rdx
callq 0x4040
movq %r14, %rdi
movq %r13, %rsi
movq %r13, %rdx
callq 0x472c
leaq 0xaaed(%rip), %rsi      # 0xf5b5
pushq $0x40
popq %rcx
movl %eax, %edi
movq %r12, %rdx
callq 0x4040
leaq 0xaafc(%rip), %rdx      # 0xf5d8
movq %r14, %rdi
movq %rdx, %rsi
callq 0x472c
leaq 0xaaef(%rip), %rsi      # 0xf5dd
pushq $0x41
popq %rcx
movl %eax, %edi
movq %r12, %rdx
callq 0x4040
leaq 0xab00(%rip), %rsi      # 0xf602
movq %r14, %rdi
movq %r13, %rdx
callq 0x4768
leaq 0xaaf3(%rip), %rsi      # 0xf607
pushq $0x42
popq %rcx
movl %eax, %edi
movq %r12, %rdx
callq 0x4040
leaq 0xab03(%rip), %rdx      # 0xf62b
movq %r15, %rdi
movq %rdx, %rsi
callq 0x472c
leaq 0xaaf8(%rip), %rsi      # 0xf632
pushq $0x44
popq %rcx
movl %eax, %edi
movq %r12, %rdx
callq 0x4040
leaq 0xab0d(%rip), %rdx      # 0xf65b
movq %r15, %rdi
movq %rdx, %rsi
callq 0x472c
leaq 0xaaff(%rip), %rsi      # 0xf65f
pushq $0x45
popq %rcx
movl %eax, %edi
movq %r12, %rdx
callq 0x4040
leaq 0xab0e(%rip), %rdx      # 0xf682
movq %r15, %rdi
movq %rdx, %rsi
callq 0x472c
leaq 0xab00(%rip), %rsi      # 0xf686
pushq $0x46
popq %rcx
movl %eax, %edi
movq %r12, %rdx
callq 0x4040
leaq 0x9000(%rip), %rdx      # 0xdb9a
movq %r15, %rdi
movq %rdx, %rsi
callq 0x4768
leaq 0xaafd(%rip), %rsi      # 0xf6a9
pushq $0x47
popq %rcx
movl %eax, %edi
movq %r12, %rdx
callq 0x4040
leaq 0xab0a(%rip), %rdx      # 0xf6ca
movq %r15, %rdi
movq %rdx, %rsi
callq 0x4768
leaq 0xaafc(%rip), %rsi      # 0xf6ce
pushq $0x48
popq %rcx
movl %eax, %edi
movq %r12, %rdx
callq 0x4040
leaq 0xab0b(%rip), %rdx      # 0xf6f1
movq %r15, %rdi
movq %rdx, %rsi
callq 0x4768
leaq 0xaafd(%rip), %rsi      # 0xf6f5
pushq $0x49
popq %rcx
movl %eax, %edi
movq %r12, %rdx
callq 0x4040
movq %rbx, %rdi
callq 0x68f0
movq %r14, %rdi
callq 0x68f0
movq %r15, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x68f0