#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*/ get_word(char *, char *, char **);
scalar_t__ strcmp(char *, char *);
char *get_word_01a() {
  char hex[] = "0000";
  char *wordlist[] = {"aahing", "aardvark", "aardvarks", "aardwolf"};
  char word[11];
  get_word(word, hex, wordlist);
  do {
    if (!(strcmp(word, "aahing") == 0))
      return "return the first word in the wordlist when given '0000'";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<get_word_01a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0xd(%rbp)
mov    0xecd(%rip),%al
mov    %al,-0x9(%rbp)
mov    0x2cbf(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cbc(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2cb9(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cb6(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x3b(%rbp),%rdi
lea    -0xd(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1040 <get_word@plt>
lea    -0x3b(%rbp),%rdi
lea    0xe83(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     11a1 <get_word_01a+0x81>
lea    0xe90(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11ae <get_word_01a+0x8e>
jmp    11a6 <get_word_01a+0x86>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_word_01a>:
push   %rbx
sub    $0x40,%rsp
movb   $0x0,0xc(%rsp)
movl   $0x30303030,0x8(%rsp)
30
movaps 0x2cd7(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0x2cbb(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x35(%rsp),%rbx
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    %rbx,%rdi
call   1040 <get_word@plt>
lea    0xe9d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
lea    0xeae(%rip),%rcx
cmovne %rcx,%rax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.get_word_01a.hex = [5 x i8] c"0000\00"
@.str = [7 x i8] c"aahing\00"
@.str.1 = [9 x i8] c"aardvark\00"
@.str.2 = [10 x i8] c"aardvarks\00"
@.str.3 = [9 x i8] c"aardwolf\00"
@__const.get_word_01a.wordlist = [4 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i32 0, i32 0)]
@.str.4 = [56 x i8] c"return the first word in the wordlist when given '0000'\00"
define i8* @get_word_01a() {
%1 = alloca i8*
%2 = alloca [5 x i8]
%3 = alloca [4 x i8*]
%4 = alloca [11 x i8]
%5 = bitcast [5 x i8]* %2 to i8*
%6 = bitcast [4 x i8*]* %3 to i8*
%7 = getelementptr inbounds [11 x i8], [11 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%9 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 0
%10 = call i32 @get_word(i8* %7, i8* %8, i8** %9)
br label %11
11: ; preds = %0
%12 = getelementptr inbounds [11 x i8], [11 x i8]* %4, i64 0, i64 0
%13 = call i64 @strcmp(i8* %12, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %16, label %15
15: ; preds = %11
store i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.4, i64 0, i64 0), i8** %1
br label %18
16: ; preds = %11
br label %17
17: ; preds = %16
store i8* null, i8** %1
br label %18
18: ; preds = %17, %15
%19 = load i8*, i8** %1
ret i8* %19
}

LLVM IR (-O2):
@__const.get_word_01a.hex = [5 x i8] c"0000\00"
@.str = [7 x i8] c"aahing\00"
@.str.1 = [9 x i8] c"aardvark\00"
@.str.2 = [10 x i8] c"aardvarks\00"
@.str.3 = [9 x i8] c"aardwolf\00"
@__const.get_word_01a.wordlist = [4 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i32 0, i32 0)]
@.str.4 = [56 x i8] c"return the first word in the wordlist when given '0000'\00"
define i8* @get_word_01a() {
%1 = alloca [5 x i8]
%2 = alloca [4 x i8*]
%3 = alloca [11 x i8]
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%5 = bitcast [4 x i8*]* %2 to i8*
%6 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 0
%8 = call i32 @get_word(i8* %6, i8* %4, i8** %7)
%9 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
%11 = select i1 %10, i8* null, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.4, i64 0, i64 0)
ret i8* %11
}