#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*/ assert(int);
int /*<<< orphan*/ printf(char *, int);
int uniqueMorseRepresentations(char **, int);
int main(int argc, char **argv) {
  int wordsSize = 4;
  char *words[] = {"gin", "zen", "gig", "msg"};
  int n = uniqueMorseRepresentations(words, wordsSize);
  printf("return size %d\n", n);
  assert(n == 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
mov    0x2cac(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0x2ca9(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0x2ca6(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2ca3(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1050 <uniqueMorseRepresentations@plt>
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%esi
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x2,-0x44(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movaps 0x2cd4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2cb8(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
call   1050 <uniqueMorseRepresentations@plt>
mov    %eax,%ebx
lea    0xeae(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %edi,%edi
cmp    $0x2,%ebx
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"gin\00"
@.str.1 = [4 x i8] c"zen\00"
@.str.2 = [4 x i8] c"gig\00"
@.str.3 = [4 x i8] c"msg\00"
@__const.main.words = [4 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0)]
@.str.4 = [16 x i8] c"return size %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [4 x i8*]
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 4, i32* %6
%9 = bitcast [4 x i8*]* %7 to i8*
%10 = getelementptr inbounds [4 x i8*], [4 x i8*]* %7, i64 0, i64 0
%11 = load i32, i32* %6
%12 = call i32 @uniqueMorseRepresentations(i8** %10, i32 %11)
store i32 %12, i32* %8
%13 = load i32, i32* %8
%14 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %8
%16 = icmp eq i32 %15, 2
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"gin\00"
@.str.1 = [4 x i8] c"zen\00"
@.str.2 = [4 x i8] c"gig\00"
@.str.3 = [4 x i8] c"msg\00"
@__const.main.words = [4 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0)]
@.str.4 = [16 x i8] c"return size %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x i8*]
%4 = bitcast [4 x i8*]* %3 to i8*
%5 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 0
%6 = call i32 @uniqueMorseRepresentations(i8** %5, i32 4)
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %6)
%8 = icmp eq i32 %6, 2
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
ret i32 0
}