#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 */
int /*<<< orphan*/ printf(char *, char *, char *);
scalar_t__ uc(char *);
main() {
  char data[] = "song";
  char data1[] = "sing a song";
  printf("%s: Unique Char= %s\n", data, uc(data) ? "Yes" : "No");
  printf("%s: Unique Char= %s\n", data1, uc(data1) ? "Yes" : "No");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed9(%rip),%eax
mov    %eax,-0x5(%rbp)
mov    0xed4(%rip),%al
mov    %al,-0x1(%rbp)
mov    0xebf(%rip),%rax
mov    %rax,-0x11(%rbp)
mov    0xebd(%rip),%eax
mov    %eax,-0x9(%rbp)
lea    -0x5(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x5(%rbp),%rdi
call   1040 <uc@plt>
mov    -0x28(%rbp),%rsi
mov    %rax,%rcx
lea    0xeb8(%rip),%rdx
lea    0xead(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdx
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
lea    -0x11(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x11(%rbp),%rdi
call   1040 <uc@plt>
mov    -0x20(%rbp),%rsi
mov    %rax,%rcx
lea    0xe7e(%rip),%rdx
lea    0xe73(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdx
lea    0xe4f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
movb   $0x0,0x4(%rsp)
movl   $0x676e6f73,(%rsp)
movabs $0x73206120676e6973,%rax
61 20 73
mov    %rax,0x8(%rsp)
movl   $0x676e6f,0x10(%rsp)
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <uc@plt>
test   %rax,%rax
lea    0xec2(%rip),%r12
lea    0xeb7(%rip),%rbx
mov    %rbx,%rdx
cmove  %r12,%rdx
lea    0xe94(%rip),%r15
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
lea    0x8(%rsp),%r14
mov    %r14,%rdi
call   1040 <uc@plt>
test   %rax,%rax
cmove  %r12,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.data = [5 x i8] c"song\00"
@__const.main.data1 = [12 x i8] c"sing a song\00"
@.str = [21 x i8] c"%s: Unique Char= %s\0A\00"
@.str.1 = [4 x i8] c"Yes\00"
@.str.2 = [3 x i8] c"No\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = alloca [12 x i8]
%3 = bitcast [5 x i8]* %1 to i8*
%4 = bitcast [12 x i8]* %2 to i8*
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%7 = call i64 @uc(i8* %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0)
%11 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %10)
%12 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%13 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%14 = call i64 @uc(i8* %13)
%15 = icmp ne i64 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0)
%18 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %12, i8* %17)
ret i32 0
}

LLVM IR (-O2):
@__const.main.data = [5 x i8] c"song\00"
@__const.main.data1 = [12 x i8] c"sing a song\00"
@.str = [21 x i8] c"%s: Unique Char= %s\0A\00"
@.str.1 = [4 x i8] c"Yes\00"
@.str.2 = [3 x i8] c"No\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = alloca [12 x i8]
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%5 = call i64 @uc(i8* %3)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%8 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %7)
%9 = call i64 @uc(i8* %4)
%10 = icmp eq i64 %9, 0
%11 = select i1 %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%12 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %11)
ret i32 0
}