#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 */
scalar_t__ all_unique_characters(char *);
scalar_t__ all_unique_characters_using_memory(char *);
int /*<<< orphan*/ printf(char *, char *, char *);
int main() {
  char *test = "";
  printf("%s :: unique characters: %s\n", test,
         all_unique_characters(test) ? "yes" : "no");
  test = "hello";
  printf("%s :: unique characters: %s\n", test,
         all_unique_characters(test) ? "yes" : "no");
  test = "world";
  printf("%s :: unique characters: %s\n", test,
         all_unique_characters(test) ? "yes" : "no");
  test = "strings";
  printf("%s :: unique characters: %s\n", test,
         all_unique_characters_using_memory(test) ? "yes" : "no");
  test = "chars";
  printf("%s :: unique characters: %s\n", test,
         all_unique_characters_using_memory(test) ? "yes" : "no");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xedd(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <all_unique_characters@plt>
mov    -0x30(%rbp),%rsi
mov    %rax,%rcx
lea    0xebf(%rip),%rdx
lea    0xeb4(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdx
lea    0xe88(%rip),%rdi
call   1040 <printf@plt>
lea    0xea0(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <all_unique_characters@plt>
mov    -0x28(%rbp),%rsi
mov    %rax,%rcx
lea    0xe7a(%rip),%rdx
lea    0xe6f(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdx
lea    0xe43(%rip),%rdi
call   1040 <printf@plt>
lea    0xe61(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <all_unique_characters@plt>
mov    -0x20(%rbp),%rsi
mov    %rax,%rcx
lea    0xe35(%rip),%rdx
lea    0xe2a(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdx
lea    0xdfe(%rip),%rdi
call   1040 <printf@plt>
lea    0xe22(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <all_unique_characters_using_memory@plt>
mov    -0x18(%rbp),%rsi
mov    %rax,%rcx
lea    0xdf0(%rip),%rdx
lea    0xde5(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdx
lea    0xdb9(%rip),%rdi
call   1040 <printf@plt>
lea    0xde5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <all_unique_characters_using_memory@plt>
mov    -0x10(%rbp),%rsi
mov    %rax,%rcx
lea    0xdab(%rip),%rdx
lea    0xda0(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdx
lea    0xd74(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xedd(%rip),%r15
mov    %r15,%rdi
call   1030 <all_unique_characters@plt>
test   %rax,%rax
lea    0xed0(%rip),%r12
lea    0xec5(%rip),%rbx
mov    %rbx,%rdx
cmove  %r12,%rdx
lea    0xe9a(%rip),%r14
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <printf@plt>
lea    0xeac(%rip),%r15
mov    %r15,%rdi
call   1030 <all_unique_characters@plt>
test   %rax,%rax
mov    %rbx,%rdx
cmove  %r12,%rdx
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <printf@plt>
lea    0xe8e(%rip),%r15
mov    %r15,%rdi
call   1030 <all_unique_characters@plt>
test   %rax,%rax
mov    %rbx,%rdx
cmove  %r12,%rdx
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <printf@plt>
lea    0xe70(%rip),%r15
mov    %r15,%rdi
call   1050 <all_unique_characters_using_memory@plt>
test   %rax,%rax
mov    %rbx,%rdx
cmove  %r12,%rdx
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <printf@plt>
lea    0xe54(%rip),%r15
mov    %r15,%rdi
call   1050 <all_unique_characters_using_memory@plt>
test   %rax,%rax
cmove  %r12,%rbx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [29 x i8] c"%s :: unique characters: %s\0A\00"
@.str.2 = [4 x i8] c"yes\00"
@.str.3 = [3 x i8] c"no\00"
@.str.4 = [6 x i8] c"hello\00"
@.str.5 = [6 x i8] c"world\00"
@.str.6 = [8 x i8] c"strings\00"
@.str.7 = [6 x i8] c"chars\00"
define i32 @main() {
%1 = alloca i8*
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = load i8*, i8** %1
%4 = call i64 @all_unique_characters(i8* %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0)
%8 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %2, i8* %7)
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8** %1
%9 = load i8*, i8** %1
%10 = load i8*, i8** %1
%11 = call i64 @all_unique_characters(i8* %10)
%12 = icmp ne i64 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0)
%15 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %9, i8* %14)
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8** %1
%16 = load i8*, i8** %1
%17 = load i8*, i8** %1
%18 = call i64 @all_unique_characters(i8* %17)
%19 = icmp ne i64 %18, 0
%20 = zext i1 %19 to i64
%21 = select i1 %19, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0)
%22 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %16, i8* %21)
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8** %1
%23 = load i8*, i8** %1
%24 = load i8*, i8** %1
%25 = call i64 @all_unique_characters_using_memory(i8* %24)
%26 = icmp ne i64 %25, 0
%27 = zext i1 %26 to i64
%28 = select i1 %26, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0)
%29 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %23, i8* %28)
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8** %1
%30 = load i8*, i8** %1
%31 = load i8*, i8** %1
%32 = call i64 @all_unique_characters_using_memory(i8* %31)
%33 = icmp ne i64 %32, 0
%34 = zext i1 %33 to i64
%35 = select i1 %33, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0)
%36 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %30, i8* %35)
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [29 x i8] c"%s :: unique characters: %s\0A\00"
@.str.2 = [4 x i8] c"yes\00"
@.str.3 = [3 x i8] c"no\00"
@.str.4 = [6 x i8] c"hello\00"
@.str.5 = [6 x i8] c"world\00"
@.str.6 = [8 x i8] c"strings\00"
@.str.7 = [6 x i8] c"chars\00"
define i32 @main() {
%1 = tail call i64 @all_unique_characters(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i64 @all_unique_characters(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* %7)
%9 = tail call i64 @all_unique_characters(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
%11 = select i1 %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* %11)
%13 = tail call i64 @all_unique_characters_using_memory(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
%15 = select i1 %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* %15)
%17 = tail call i64 @all_unique_characters_using_memory(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
%19 = select i1 %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%20 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* %19)
ret i32 0
}