#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 */
typedef int /*<<< orphan*/ lines;

/* Variables and functions */
int /*<<< orphan*/ complete_from_string_list(char const *, char const **, int);
void complete_history(const char str[]) {
  static const char *lines[] = {
      ".", "dir",     "@", "input", "/", "search", "fsearch",
      "?", "bsearch", ":", "cmd",   "=", "filter",
  };
  complete_from_string_list(str, lines, (sizeof(lines) / sizeof((lines)[0])));
}


x86 assembly (clang, -O0):
<complete_history>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0x2f09(%rip),%rsi
mov    $0xd,%edx
call   1030 <complete_from_string_list@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<complete_history>:
lea    0x2f19(%rip),%rsi
mov    $0xd,%edx
jmp    1030 <complete_from_string_list@plt>

LLVM IR (-O0):
@complete_history.lines = internal global [13 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 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 ([2 x i8], [2 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i32 0, i32 0)]
@.str = [2 x i8] c".\00"
@.str.1 = [4 x i8] c"dir\00"
@.str.2 = [2 x i8] c"@\00"
@.str.3 = [6 x i8] c"input\00"
@.str.4 = [2 x i8] c"/\00"
@.str.5 = [7 x i8] c"search\00"
@.str.6 = [8 x i8] c"fsearch\00"
@.str.7 = [2 x i8] c"?\00"
@.str.8 = [8 x i8] c"bsearch\00"
@.str.9 = [2 x i8] c":\00"
@.str.10 = [4 x i8] c"cmd\00"
@.str.11 = [2 x i8] c"=\00"
@.str.12 = [7 x i8] c"filter\00"
define void @complete_history(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @complete_from_string_list(i8* %3, i8** getelementptr inbounds ([13 x i8*], [13 x i8*]* @complete_history.lines, i64 0, i64 0), i32 13)
ret void
}

LLVM IR (-O2):
@complete_history.lines = internal global [13 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 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 ([2 x i8], [2 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i32 0, i32 0)]
@.str = [2 x i8] c".\00"
@.str.1 = [4 x i8] c"dir\00"
@.str.2 = [2 x i8] c"@\00"
@.str.3 = [6 x i8] c"input\00"
@.str.4 = [2 x i8] c"/\00"
@.str.5 = [7 x i8] c"search\00"
@.str.6 = [8 x i8] c"fsearch\00"
@.str.7 = [2 x i8] c"?\00"
@.str.8 = [8 x i8] c"bsearch\00"
@.str.9 = [2 x i8] c":\00"
@.str.10 = [4 x i8] c"cmd\00"
@.str.11 = [2 x i8] c"=\00"
@.str.12 = [7 x i8] c"filter\00"
define void @complete_history(i8* %0) {
%2 = tail call i32 @complete_from_string_list(i8* %0, i8** getelementptr inbounds ([13 x i8*], [13 x i8*]* @complete_history.lines, i64 0, i64 0), i32 13)
ret void
}