#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 */
struct wlist_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
struct wlist_t *wlist_load(char *);
int /*<<< orphan*/ wlist_show(struct wlist_t *);
int main(int argc, char *argv[]) {
  struct wlist_t *wlist = NULL;
  wlist = wlist_load("wordlist.txt");
  if (!wlist) {
    fprintf(stderr, "error: Failed to load wordlist '%s'\n", "wordlist.txt");
  }
  wlist_show(wlist);
  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)
movq   $0x0,-0x18(%rbp)
lea    0xeab(%rip),%rdi
call   1040 <wlist_load@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1185 <main+0x55>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
lea    0xe80(%rip),%rdx
call   1030 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1050 <wlist_show@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1040 <wlist_load@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1161 <main+0x31>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    0xeb8(%rip),%rsi
lea    0xea4(%rip),%rdx
call   1030 <fprintf@plt>
mov    %rbx,%rdi
call   1050 <wlist_show@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.wlist_t = type { i32 }
@.str = [13 x i8] c"wordlist.txt\00"
@stderr = global i32 0
@.str.1 = [37 x i8] c"error: Failed to load wordlist '%s'\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.wlist_t*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store %struct.wlist_t* null, %struct.wlist_t** %6
%7 = call %struct.wlist_t* @wlist_load(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store %struct.wlist_t* %7, %struct.wlist_t** %6
%8 = load %struct.wlist_t*, %struct.wlist_t** %6
%9 = icmp ne %struct.wlist_t* %8, null
br i1 %9, label %13, label %10
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %10, %2
%14 = load %struct.wlist_t*, %struct.wlist_t** %6
%15 = call i32 @wlist_show(%struct.wlist_t* %14)
ret i32 0
}

LLVM IR (-O2):
%struct.wlist_t = type { i32 }
@.str = [13 x i8] c"wordlist.txt\00"
@stderr = global i32 0
@.str.1 = [37 x i8] c"error: Failed to load wordlist '%s'\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call %struct.wlist_t* @wlist_load(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq %struct.wlist_t* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %5, %2
%9 = tail call i32 @wlist_show(%struct.wlist_t* %3)
ret i32 0
}