#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 */
char *strtok(char *, char *);
int hasConflict(char andClause[]) {
  int variable[26] = {0}, varState, varAlpha;
  char *literal, delimAndClause[] = ")(&\n";
  literal = strtok(andClause, delimAndClause);
  while (literal != NULL) {
    varState = 1;
    if (literal[0] == '~') {
      varState = 2;
      varAlpha = literal[1];
    } else {
      varAlpha = literal[0];
    }
    varAlpha -= 'a';
    if (variable[varAlpha] == 0)
      variable[varAlpha] = varState;
    else if (variable[varAlpha] != varState)
      return 1;
    literal = strtok(NULL, delimAndClause);
  }
  return 0;
}


x86 assembly (clang, -O0):
<hasConflict>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x68,%edx
call   1030 <memset@plt>
mov    0xebb(%rip),%eax
mov    %eax,-0x95(%rbp)
mov    0xeb3(%rip),%al
mov    %al,-0x91(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x95(%rbp),%rsi
call   1040 <strtok@plt>
mov    %rax,-0x90(%rbp)
cmpq   $0x0,-0x90(%rbp)
je     1244 <hasConflict+0x124>
movl   $0x1,-0x84(%rbp)
mov    -0x90(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7e,%eax
jne    11b9 <hasConflict+0x99>
movl   $0x2,-0x84(%rbp)
mov    -0x90(%rbp),%rax
movsbl 0x1(%rax),%eax
mov    %eax,-0x88(%rbp)
jmp    11c9 <hasConflict+0xa9>
mov    -0x90(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x88(%rbp)
mov    -0x88(%rbp),%eax
sub    $0x61,%eax
mov    %eax,-0x88(%rbp)
movslq -0x88(%rbp),%rax
cmpl   $0x0,-0x80(%rbp,%rax,4)
jne    1200 <hasConflict+0xe0>
mov    -0x84(%rbp),%ecx
movslq -0x88(%rbp),%rax
mov    %ecx,-0x80(%rbp,%rax,4)
jmp    1228 <hasConflict+0x108>
movslq -0x88(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%eax
cmp    -0x84(%rbp),%eax
je     1223 <hasConflict+0x103>
movl   $0x1,-0x4(%rbp)
jmp    124b <hasConflict+0x12b>
jmp    1228 <hasConflict+0x108>
lea    -0x95(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
call   1040 <strtok@plt>
mov    %rax,-0x90(%rbp)
jmp    116e <hasConflict+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hasConflict>:
push   %r14
push   %rbx
sub    $0x78,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movq   $0x0,0x70(%rsp)
movb   $0x0,0xc(%rsp)
movl   $0xa262829,0x8(%rsp)
0a
lea    0x8(%rsp),%rsi
call   1030 <strtok@plt>
test   %rax,%rax
je     11b8 <hasConflict+0xa8>
lea    0x8(%rsp),%r14
jmp    1188 <hasConflict+0x78>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ecx,-0x174(%rsp,%rax,4)
xor    %ebx,%ebx
xor    %edi,%edi
mov    %r14,%rsi
call   1030 <strtok@plt>
test   %rax,%rax
je     11ba <hasConflict+0xaa>
movzbl (%rax),%edx
mov    $0x1,%ecx
cmp    $0x7e,%dl
jne    119e <hasConflict+0x8e>
movzbl 0x1(%rax),%edx
mov    $0x2,%ecx
movsbq %dl,%rax
mov    -0x174(%rsp,%rax,4),%edx
test   %edx,%edx
je     1170 <hasConflict+0x60>
cmp    %ecx,%edx
je     1177 <hasConflict+0x67>
mov    $0x1,%ebx
jmp    11ba <hasConflict+0xaa>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.hasConflict.delimAndClause = [5 x i8] c")(&\0A\00"
define i32 @hasConflict(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [26 x i32]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca [5 x i8]
store i8* %0, i8** %3
%9 = bitcast [26 x i32]* %4 to i8*
%10 = bitcast [5 x i8]* %8 to i8*
%11 = load i8*, i8** %3
%12 = getelementptr inbounds [5 x i8], [5 x i8]* %8, i64 0, i64 0
%13 = call i8* @strtok(i8* %11, i8* %12)
store i8* %13, i8** %7
br label %14
14: ; preds = %55, %1
%15 = load i8*, i8** %7
%16 = icmp ne i8* %15, null
br i1 %16, label %17, label %58
17: ; preds = %14
store i32 1, i32* %5
%18 = load i8*, i8** %7
%19 = getelementptr inbounds i8, i8* %18, i64 0
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 126
br i1 %22, label %23, label %28
23: ; preds = %17
store i32 2, i32* %5
%24 = load i8*, i8** %7
%25 = getelementptr inbounds i8, i8* %24, i64 1
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
store i32 %27, i32* %6
br label %33
28: ; preds = %17
%29 = load i8*, i8** %7
%30 = getelementptr inbounds i8, i8* %29, i64 0
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
store i32 %32, i32* %6
br label %33
33: ; preds = %28, %23
%34 = load i32, i32* %6
%35 = sub nsw i32 %34, 97
store i32 %35, i32* %6
%36 = load i32, i32* %6
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [26 x i32], [26 x i32]* %4, i64 0, i64 %37
%39 = load i32, i32* %38
%40 = icmp eq i32 %39, 0
br i1 %40, label %41, label %46
41: ; preds = %33
%42 = load i32, i32* %5
%43 = load i32, i32* %6
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [26 x i32], [26 x i32]* %4, i64 0, i64 %44
store i32 %42, i32* %45
br label %55
46: ; preds = %33
%47 = load i32, i32* %6
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [26 x i32], [26 x i32]* %4, i64 0, i64 %48
%50 = load i32, i32* %49
%51 = load i32, i32* %5
%52 = icmp ne i32 %50, %51
br i1 %52, label %53, label %54
53: ; preds = %46
store i32 1, i32* %2
br label %59
54: ; preds = %46
br label %55
55: ; preds = %54, %41
%56 = getelementptr inbounds [5 x i8], [5 x i8]* %8, i64 0, i64 0
%57 = call i8* @strtok(i8* null, i8* %56)
store i8* %57, i8** %7
br label %14
58: ; preds = %14
store i32 0, i32* %2
br label %59
59: ; preds = %58, %53
%60 = load i32, i32* %2
ret i32 %60
}

LLVM IR (-O2):
@__const.hasConflict.delimAndClause = [5 x i8] c")(&\0A\00"
define i32 @hasConflict(i8* %0) {
%2 = alloca [26 x i32]
%3 = alloca [5 x i8]
%4 = bitcast [26 x i32]* %2 to i8*
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%6 = call i8* @strtok(i8* %0, i8* %5)
%7 = icmp eq i8* %6, null
br i1 %7, label %29, label %8
8: ; preds = %1, %26
%9 = phi i8* [ %27, %26 ], [ %6, %1 ]
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 126
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = getelementptr inbounds i8, i8* %9, i64 1
%14 = load i8, i8* %13
br label %15
15: ; preds = %8, %12
%16 = phi i32 [ 2, %12 ], [ 1, %8 ]
%17 = phi i8 [ %14, %12 ], [ %10, %8 ]
%18 = sext i8 %17 to i64
%19 = add nsw i64 %18, -97
%20 = getelementptr inbounds [26 x i32], [26 x i32]* %2, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %15
store i32 %16, i32* %20
br label %26
24: ; preds = %15
%25 = icmp eq i32 %21, %16
br i1 %25, label %26, label %29
26: ; preds = %24, %23
%27 = call i8* @strtok(i8* null, i8* %5)
%28 = icmp eq i8* %27, null
br i1 %28, label %29, label %8
29: ; preds = %24, %26, %1
%30 = phi i32 [ 0, %1 ], [ 0, %26 ], [ 1, %24 ]
ret i32 %30
}