#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 */
bool isUniqueChars(char *str) {
  int frequencyDictionary[127] = {};
  while (*str) {
    frequencyDictionary[(int)*str]++;
    if (frequencyDictionary[(int)*str] > 1) {
      return false;
    }
    str++;
  }
  return true;
}


x86 assembly (clang, -O0):
<isUniqueChars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x210(%rbp),%rdi
xor    %esi,%esi
mov    $0x1fc,%edx
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     118d <isUniqueChars+0x7d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cltq
mov    -0x210(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x210(%rbp,%rax,4)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cltq
cmpl   $0x1,-0x210(%rbp,%rax,4)
01
jle    117c <isUniqueChars+0x6c>
movl   $0x0,-0x4(%rbp)
jmp    1194 <isUniqueChars+0x84>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1132 <isUniqueChars+0x22>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isUniqueChars>:
push   %rbx
sub    $0x200,%rsp
mov    %rdi,%rbx
mov    %rsp,%rdi
mov    $0x1fc,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    (%rbx),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1160 <isUniqueChars+0x50>
add    $0x1,%rbx
nopl   0x0(%rax)
movsbq %cl,%rcx
mov    (%rsp,%rcx,4),%edx
lea    0x1(%rdx),%esi
mov    %esi,(%rsp,%rcx,4)
test   %edx,%edx
jg     115e <isUniqueChars+0x4e>
movzbl (%rbx),%ecx
add    $0x1,%rbx
test   %cl,%cl
jne    1140 <isUniqueChars+0x30>
jmp    1160 <isUniqueChars+0x50>
xor    %eax,%eax
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isUniqueChars(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [127 x i32]
store i8* %0, i8** %3
%5 = bitcast [127 x i32]* %4 to i8*
br label %6
6: ; preds = %26, %1
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %29
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [127 x i32], [127 x i32]* %4, i64 0, i64 %14
%16 = load i32, i32* %15
%17 = add nsw i32 %16, 1
store i32 %17, i32* %15
%18 = load i8*, i8** %3
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [127 x i32], [127 x i32]* %4, i64 0, i64 %21
%23 = load i32, i32* %22
%24 = icmp sgt i32 %23, 1
br i1 %24, label %25, label %26
25: ; preds = %10
store i32 0, i32* %2
br label %30
26: ; preds = %10
%27 = load i8*, i8** %3
%28 = getelementptr inbounds i8, i8* %27, i32 1
store i8* %28, i8** %3
br label %6
29: ; preds = %6
store i32 1, i32* %2
br label %30
30: ; preds = %29, %25
%31 = load i32, i32* %2
ret i32 %31
}

LLVM IR (-O2):
define i32 @isUniqueChars(i8* nocapture %0) {
%2 = alloca [127 x i32]
%3 = bitcast [127 x i32]* %2 to i8*
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %18, label %9
6: ; preds = %9
%7 = load i8, i8* %17
%8 = icmp eq i8 %7, 0
br i1 %8, label %18, label %9
9: ; preds = %1, %6
%10 = phi i8 [ %7, %6 ], [ %4, %1 ]
%11 = phi i8* [ %17, %6 ], [ %0, %1 ]
%12 = sext i8 %10 to i64
%13 = getelementptr inbounds [127 x i32], [127 x i32]* %2, i64 0, i64 %12
%14 = load i32, i32* %13
%15 = add nsw i32 %14, 1
store i32 %15, i32* %13
%16 = icmp sgt i32 %14, 0
%17 = getelementptr inbounds i8, i8* %11, i64 1
br i1 %16, label %18, label %6
18: ; preds = %9, %6, %1
%19 = phi i32 [ 1, %1 ], [ 1, %6 ], [ 0, %9 ]
ret i32 %19
}