#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ _tap_ok(char *, int, int, char *);
int globdir_str_is_pattern(char *, int);
int tap_finish();
int /*<<< orphan*/ tap_plan(int);
int main(void) {
  tap_plan(8);
  _tap_ok("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/andrewgregory/pacutils/refs/heads/master/"
          "ext/globdir.c/t/10-is_pattern.c",
          11, globdir_str_is_pattern("foo*", 0), "foo*");
  _tap_ok("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/andrewgregory/pacutils/refs/heads/master/"
          "ext/globdir.c/t/10-is_pattern.c",
          12, globdir_str_is_pattern("foo?", 0), "foo?");
  _tap_ok("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/andrewgregory/pacutils/refs/heads/master/"
          "ext/globdir.c/t/10-is_pattern.c",
          13, globdir_str_is_pattern("fo[o]", 0), "fo[o]");
  _tap_ok("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/andrewgregory/pacutils/refs/heads/master/"
          "ext/globdir.c/t/10-is_pattern.c",
          14, globdir_str_is_pattern("foo\\*", 1), "foo\\* (NOESCAPE)");
  _tap_ok("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/andrewgregory/pacutils/refs/heads/master/"
          "ext/globdir.c/t/10-is_pattern.c",
          16, !globdir_str_is_pattern("foo", 0), "foo");
  _tap_ok("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/andrewgregory/pacutils/refs/heads/master/"
          "ext/globdir.c/t/10-is_pattern.c",
          17, !globdir_str_is_pattern("foo\\*", 0), "foo\\*");
  _tap_ok("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/andrewgregory/pacutils/refs/heads/master/"
          "ext/globdir.c/t/10-is_pattern.c",
          18, !globdir_str_is_pattern("foo\\", 0), "foo\\");
  _tap_ok("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/andrewgregory/pacutils/refs/heads/master/"
          "ext/globdir.c/t/10-is_pattern.c",
          19, !globdir_str_is_pattern("foo\\", 1), "foo\\ (NOESCAPE)");
  return tap_finish();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x8,%edi
call   1040 <tap_plan@plt>
lea    0xf43(%rip),%rdi
xor    %esi,%esi
call   1030 <globdir_str_is_pattern@plt>
mov    %eax,%edx
lea    0xe90(%rip),%rdi
mov    $0xb,%esi
lea    0xf27(%rip),%rcx
call   1050 <_tap_ok@plt>
lea    0xf20(%rip),%rdi
xor    %esi,%esi
call   1030 <globdir_str_is_pattern@plt>
mov    %eax,%edx
lea    0xe68(%rip),%rdi
mov    $0xc,%esi
lea    0xf04(%rip),%rcx
call   1050 <_tap_ok@plt>
lea    0xefd(%rip),%rdi
xor    %esi,%esi
call   1030 <globdir_str_is_pattern@plt>
mov    %eax,%edx
lea    0xe40(%rip),%rdi
mov    $0xd,%esi
lea    0xee1(%rip),%rcx
call   1050 <_tap_ok@plt>
lea    0xedb(%rip),%rdi
mov    $0x1,%esi
call   1030 <globdir_str_is_pattern@plt>
mov    %eax,%edx
lea    0xe15(%rip),%rdi
mov    $0xe,%esi
lea    0xec2(%rip),%rcx
call   1050 <_tap_ok@plt>
lea    0xec7(%rip),%rdi
xor    %esi,%esi
call   1030 <globdir_str_is_pattern@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edx
lea    0xde2(%rip),%rdi
mov    $0x10,%esi
lea    0xea0(%rip),%rcx
call   1050 <_tap_ok@plt>
lea    0xe7d(%rip),%rdi
xor    %esi,%esi
call   1030 <globdir_str_is_pattern@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edx
lea    0xdaf(%rip),%rdi
mov    $0x11,%esi
lea    0xe56(%rip),%rcx
call   1050 <_tap_ok@plt>
lea    0xe65(%rip),%rdi
xor    %esi,%esi
call   1030 <globdir_str_is_pattern@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edx
lea    0xd7c(%rip),%rdi
mov    $0x12,%esi
lea    0xe3e(%rip),%rcx
call   1050 <_tap_ok@plt>
lea    0xe32(%rip),%rdi
mov    $0x1,%esi
call   1030 <globdir_str_is_pattern@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edx
lea    0xd46(%rip),%rdi
mov    $0x13,%esi
lea    0xe0d(%rip),%rcx
call   1050 <_tap_ok@plt>
mov    $0x0,%al
call   1060 <tap_finish@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0x8,%edi
call   1040 <tap_plan@plt>
lea    0xf4d(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <globdir_str_is_pattern@plt>
lea    0xe99(%rip),%r15
mov    %r15,%rdi
mov    $0xb,%esi
mov    %eax,%edx
mov    %rbx,%rcx
call   1050 <_tap_ok@plt>
lea    0xf28(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <globdir_str_is_pattern@plt>
mov    %r15,%rdi
mov    $0xc,%esi
mov    %eax,%edx
mov    %rbx,%rcx
call   1050 <_tap_ok@plt>
lea    0xf0a(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <globdir_str_is_pattern@plt>
mov    %r15,%rdi
mov    $0xd,%esi
mov    %eax,%edx
mov    %rbx,%rcx
call   1050 <_tap_ok@plt>
lea    0xeed(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <globdir_str_is_pattern@plt>
lea    0xedf(%rip),%rcx
mov    %r15,%rdi
mov    $0xe,%esi
mov    %eax,%edx
call   1050 <_tap_ok@plt>
lea    0xeda(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <globdir_str_is_pattern@plt>
xor    %edx,%edx
test   %eax,%eax
sete   %dl
mov    %r15,%rdi
mov    $0x10,%esi
mov    %rbx,%rcx
call   1050 <_tap_ok@plt>
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <globdir_str_is_pattern@plt>
xor    %edx,%edx
test   %eax,%eax
sete   %dl
mov    %r15,%rdi
mov    $0x11,%esi
mov    %r14,%rcx
call   1050 <_tap_ok@plt>
lea    0xe95(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <globdir_str_is_pattern@plt>
xor    %edx,%edx
test   %eax,%eax
sete   %dl
mov    %r15,%rdi
mov    $0x12,%esi
mov    %rbx,%rcx
call   1050 <_tap_ok@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <globdir_str_is_pattern@plt>
xor    %edx,%edx
test   %eax,%eax
sete   %dl
lea    0xe5e(%rip),%rcx
mov    %r15,%rdi
mov    $0x13,%esi
call   1050 <_tap_ok@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1060 <tap_finish@plt>

LLVM IR (-O0):
@.str = [163 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/andrewgregory/pacutils/refs/heads/master/ext/globdir.c/t/10-is_pattern.c\00"
@.str.1 = [5 x i8] c"foo*\00"
@.str.2 = [5 x i8] c"foo?\00"
@.str.3 = [6 x i8] c"fo[o]\00"
@.str.4 = [6 x i8] c"foo\\*\00"
@.str.5 = [17 x i8] c"foo\\* (NOESCAPE)\00"
@.str.6 = [4 x i8] c"foo\00"
@.str.7 = [5 x i8] c"foo\\\00"
@.str.8 = [16 x i8] c"foo\\ (NOESCAPE)\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @tap_plan(i32 8)
%3 = call i32 @globdir_str_is_pattern(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 0)
%4 = call i32 @_tap_ok(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 11, i32 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @globdir_str_is_pattern(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 0)
%6 = call i32 @_tap_ok(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 12, i32 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @globdir_str_is_pattern(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 0)
%8 = call i32 @_tap_ok(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 13, i32 %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 @globdir_str_is_pattern(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 1)
%10 = call i32 @_tap_ok(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 14, i32 %9, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 @globdir_str_is_pattern(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 0)
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
%15 = call i32 @_tap_ok(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 16, i32 %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%16 = call i32 @globdir_str_is_pattern(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 0)
%17 = icmp ne i32 %16, 0
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
%20 = call i32 @_tap_ok(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 17, i32 %19, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%21 = call i32 @globdir_str_is_pattern(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 0)
%22 = icmp ne i32 %21, 0
%23 = xor i1 %22, true
%24 = zext i1 %23 to i32
%25 = call i32 @_tap_ok(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 18, i32 %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%26 = call i32 @globdir_str_is_pattern(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 1)
%27 = icmp ne i32 %26, 0
%28 = xor i1 %27, true
%29 = zext i1 %28 to i32
%30 = call i32 @_tap_ok(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 19, i32 %29, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%31 = call i32 (...) @tap_finish()
ret i32 %31
}

LLVM IR (-O2):
@.str = [163 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/andrewgregory/pacutils/refs/heads/master/ext/globdir.c/t/10-is_pattern.c\00"
@.str.1 = [5 x i8] c"foo*\00"
@.str.2 = [5 x i8] c"foo?\00"
@.str.3 = [6 x i8] c"fo[o]\00"
@.str.4 = [6 x i8] c"foo\\*\00"
@.str.5 = [17 x i8] c"foo\\* (NOESCAPE)\00"
@.str.6 = [4 x i8] c"foo\00"
@.str.7 = [5 x i8] c"foo\\\00"
@.str.8 = [16 x i8] c"foo\\ (NOESCAPE)\00"
define i32 @main() {
%1 = tail call i32 @tap_plan(i32 8)
%2 = tail call i32 @globdir_str_is_pattern(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 0)
%3 = tail call i32 @_tap_ok(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 11, i32 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @globdir_str_is_pattern(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 0)
%5 = tail call i32 @_tap_ok(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 12, i32 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @globdir_str_is_pattern(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 0)
%7 = tail call i32 @_tap_ok(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 13, i32 %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 @globdir_str_is_pattern(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 1)
%9 = tail call i32 @_tap_ok(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 14, i32 %8, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%10 = tail call i32 @globdir_str_is_pattern(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 0)
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
%13 = tail call i32 @_tap_ok(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 16, i32 %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%14 = tail call i32 @globdir_str_is_pattern(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 0)
%15 = icmp eq i32 %14, 0
%16 = zext i1 %15 to i32
%17 = tail call i32 @_tap_ok(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 17, i32 %16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%18 = tail call i32 @globdir_str_is_pattern(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 0)
%19 = icmp eq i32 %18, 0
%20 = zext i1 %19 to i32
%21 = tail call i32 @_tap_ok(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 18, i32 %20, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%22 = tail call i32 @globdir_str_is_pattern(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 1)
%23 = icmp eq i32 %22, 0
%24 = zext i1 %23 to i32
%25 = tail call i32 @_tap_ok(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 19, i32 %24, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%26 = tail call i32 (...) @tap_finish()
ret i32 %26
}