#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 */
typedef int /*<<< orphan*/ regex_t;

/* Variables and functions */
int REG_EXTENDED;
int REG_NOMATCH;
int regcomp(int /*<<< orphan*/ *, char *, int);
int regexec(int /*<<< orphan*/ *, char *, int /*<<< orphan*/,
            int /*<<< orphan*/ *, int /*<<< orphan*/);
int isMinimal(char *p) {
  regex_t patternCompiled;
  int result = 0;
  char *patternString = "/(\\.\\.|\\.)/";
  int regexFlags = REG_EXTENDED;
  result = regcomp(&patternCompiled, patternString, regexFlags);
  result = regexec(&patternCompiled, p, 0, NULL, 0);
  return (result == REG_NOMATCH);
}


x86 assembly (clang, -O0):
<isMinimal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xec6(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2e93(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
lea    -0xc(%rbp),%rdi
call   1030 <regcomp@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
xor    %r8d,%r8d
xor    %eax,%eax
mov    %eax,%ecx
mov    %r8d,%edx
call   1040 <regexec@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    0x2e67(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isMinimal>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
lea    0xec9(%rip),%rsi
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1030 <regcomp@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <regexec@plt>
mov    0x2e8b(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"/(\\.\\.|\\.)/\00"
@REG_EXTENDED = global i32 0
@REG_NOMATCH = global i32 0
define i32 @isMinimal(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %4
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %5
%7 = load i32, i32* @REG_EXTENDED
store i32 %7, i32* %6
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @regcomp(i32* %3, i8* %8, i32 %9)
store i32 %10, i32* %4
%11 = load i8*, i8** %2
%12 = call i32 @regexec(i32* %3, i8* %11, i32 0, i32* null, i32 0)
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = load i32, i32* @REG_NOMATCH
%15 = icmp eq i32 %13, %14
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
@.str = [12 x i8] c"/(\\.\\.|\\.)/\00"
@REG_EXTENDED = global i32 0
@REG_NOMATCH = global i32 0
define i32 @isMinimal(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @REG_EXTENDED
%5 = call i32 @regcomp(i32* %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @regexec(i32* %2, i8* %0, i32 0, i32* null, i32 0)
%7 = load i32, i32* @REG_NOMATCH
%8 = icmp eq i32 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}