#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*/ dictionary(char **, int);
scalar_t__ malloc(int);
int main(int argc, char const *argv[]) {
  char **words = (char **)malloc(sizeof(char *) * 5);
  words[0] = "gg";
  words[1] = "kia";
  words[2] = "lotte";
  words[3] = "lg";
  words[4] = "hanwha";
  dictionary(words, 5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x28,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
lea    0xeb1(%rip),%rcx
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
lea    0xea6(%rip),%rcx
mov    %rcx,0x8(%rax)
mov    -0x18(%rbp),%rax
lea    0xe9b(%rip),%rcx
mov    %rcx,0x10(%rax)
mov    -0x18(%rbp),%rax
lea    0xe92(%rip),%rcx
mov    %rcx,0x18(%rax)
mov    -0x18(%rbp),%rax
lea    0xe86(%rip),%rcx
mov    %rcx,0x20(%rax)
mov    -0x18(%rbp),%rdi
mov    $0x5,%esi
call   1040 <dictionary@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x28,%edi
call   1030 <malloc@plt>
lea    0xece(%rip),%rcx
mov    %rcx,(%rax)
lea    0xec7(%rip),%rcx
mov    %rcx,0x8(%rax)
lea    0xec0(%rip),%rcx
mov    %rcx,0x10(%rax)
lea    0xebb(%rip),%rcx
mov    %rcx,0x18(%rax)
lea    0xeb3(%rip),%rcx
mov    %rcx,0x20(%rax)
mov    %rax,%rdi
mov    $0x5,%esi
call   1040 <dictionary@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"gg\00"
@.str.1 = [4 x i8] c"kia\00"
@.str.2 = [6 x i8] c"lotte\00"
@.str.3 = [3 x i8] c"lg\00"
@.str.4 = [7 x i8] c"hanwha\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i64 @malloc(i32 40)
%8 = inttoptr i64 %7 to i8**
store i8** %8, i8*** %6
%9 = load i8**, i8*** %6
%10 = getelementptr inbounds i8*, i8** %9, i64 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %10
%11 = load i8**, i8*** %6
%12 = getelementptr inbounds i8*, i8** %11, i64 1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %12
%13 = load i8**, i8*** %6
%14 = getelementptr inbounds i8*, i8** %13, i64 2
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %14
%15 = load i8**, i8*** %6
%16 = getelementptr inbounds i8*, i8** %15, i64 3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %16
%17 = load i8**, i8*** %6
%18 = getelementptr inbounds i8*, i8** %17, i64 4
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8** %18
%19 = load i8**, i8*** %6
%20 = call i32 @dictionary(i8** %19, i32 5)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"gg\00"
@.str.1 = [4 x i8] c"kia\00"
@.str.2 = [6 x i8] c"lotte\00"
@.str.3 = [3 x i8] c"lg\00"
@.str.4 = [7 x i8] c"hanwha\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @malloc(i32 40)
%4 = inttoptr i64 %3 to i8**
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds i8*, i8** %4, i64 1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds i8*, i8** %4, i64 2
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds i8*, i8** %4, i64 3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds i8*, i8** %4, i64 4
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8** %8
%9 = tail call i32 @dictionary(i8** %4, i32 5)
ret i32 0
}