#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 strlen(char *);
int checkAllUniqueChars(char text[]) {
  int checker = 0;
  char c;
  int i = 0;
  if (strlen(text) > ('z' - 'a'))
    return 0;
  while ((c = text[i++]) != 0) {
    int letterMask = 1 << (c - 'a');
    if (checker == (checker | letterMask))
      return 0;
    checker |= letterMask;
  }
  return 1;
}


x86 assembly (clang, -O0):
<checkAllUniqueChars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
movsbl %al,%eax
cmp    $0x19,%eax
jle    114b <checkAllUniqueChars+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    11b7 <checkAllUniqueChars+0xa7>
jmp    1150 <checkAllUniqueChars+0x40>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x1c(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x15(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     11b0 <checkAllUniqueChars+0xa0>
movsbl -0x15(%rbp),%ecx
sub    $0x61,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x14(%rbp),%ecx
or     -0x20(%rbp),%ecx
cmp    %ecx,%eax
jne    11a2 <checkAllUniqueChars+0x92>
movl   $0x0,-0x4(%rbp)
jmp    11b7 <checkAllUniqueChars+0xa7>
mov    -0x20(%rbp),%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1150 <checkAllUniqueChars+0x40>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkAllUniqueChars>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x19,%cl
jg     114b <checkAllUniqueChars+0x3b>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rbx),%ecx
test   %ecx,%ecx
je     114d <checkAllUniqueChars+0x3d>
add    $0x9f,%cl
mov    %eax,%edx
bts    %ecx,%edx
add    $0x1,%rbx
cmp    %edx,%eax
mov    %edx,%eax
jne    1130 <checkAllUniqueChars+0x20>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @checkAllUniqueChars(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
store i32 0, i32* %6
%8 = load i8*, i8** %3
%9 = call signext i8 @strlen(i8* %8)
%10 = sext i8 %9 to i32
%11 = icmp sgt i32 %10, 25
br i1 %11, label %12, label %13
12: ; preds = %1
store i32 0, i32* %2
br label %39
13: ; preds = %1
br label %14
14: ; preds = %34, %13
%15 = load i8*, i8** %3
%16 = load i32, i32* %6
%17 = add nsw i32 %16, 1
store i32 %17, i32* %6
%18 = sext i32 %16 to i64
%19 = getelementptr inbounds i8, i8* %15, i64 %18
%20 = load i8, i8* %19
store i8 %20, i8* %5
%21 = sext i8 %20 to i32
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %38
23: ; preds = %14
%24 = load i8, i8* %5
%25 = sext i8 %24 to i32
%26 = sub nsw i32 %25, 97
%27 = shl i32 1, %26
store i32 %27, i32* %7
%28 = load i32, i32* %4
%29 = load i32, i32* %4
%30 = load i32, i32* %7
%31 = or i32 %29, %30
%32 = icmp eq i32 %28, %31
br i1 %32, label %33, label %34
33: ; preds = %23
store i32 0, i32* %2
br label %39
34: ; preds = %23
%35 = load i32, i32* %7
%36 = load i32, i32* %4
%37 = or i32 %36, %35
store i32 %37, i32* %4
br label %14
38: ; preds = %14
store i32 1, i32* %2
br label %39
39: ; preds = %38, %33, %12
%40 = load i32, i32* %2
ret i32 %40
}

LLVM IR (-O2):
define i32 @checkAllUniqueChars(i8* %0) {
%2 = tail call signext i8 @strlen(i8* %0)
%3 = icmp sgt i8 %2, 25
br i1 %3, label %17, label %4
4: ; preds = %1, %10
%5 = phi i64 [ %11, %10 ], [ 0, %1 ]
%6 = phi i32 [ %15, %10 ], [ 0, %1 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %5
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %17, label %10
10: ; preds = %4
%11 = add nuw i64 %5, 1
%12 = sext i8 %8 to i32
%13 = add nsw i32 %12, -97
%14 = shl nuw nsw i32 1, %13
%15 = or i32 %14, %6
%16 = icmp eq i32 %6, %15
br i1 %16, label %17, label %4
17: ; preds = %4, %10, %1
%18 = phi i32 [ 0, %1 ], [ 1, %4 ], [ 0, %10 ]
ret i32 %18
}