#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 EXIT_SUCCESS;
int /*<<< orphan*/ test_append_dynamic(char **);
int /*<<< orphan*/ test_append_static(char **);
int /*<<< orphan*/ test_find_custom(char **);
int /*<<< orphan*/ test_find_static(char **);
int /*<<< orphan*/ test_nolist();
int /*<<< orphan*/ test_prepend_dynamic(char **);
int /*<<< orphan*/ test_prepend_static(char **);
int /*<<< orphan*/ test_remove_static(char **);
int main(void) {
  char *strings[] = {"Hello", "World", "One", "Two", "Three", NULL};
  test_prepend_static(strings);
  test_prepend_dynamic(strings);
  test_append_static(strings);
  test_append_dynamic(strings);
  test_remove_static(strings);
  test_find_static(strings);
  test_find_custom(strings);
  test_nolist();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1040 <memset@plt>
lea    0xe4a(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    0xe45(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xe40(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xe39(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xe32(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    -0x40(%rbp),%rdi
call   1030 <test_prepend_static@plt>
lea    -0x40(%rbp),%rdi
call   10a0 <test_prepend_dynamic@plt>
lea    -0x40(%rbp),%rdi
call   1050 <test_append_static@plt>
lea    -0x40(%rbp),%rdi
call   1070 <test_append_dynamic@plt>
lea    -0x40(%rbp),%rdi
call   1090 <test_remove_static@plt>
lea    -0x40(%rbp),%rdi
call   10b0 <test_find_static@plt>
lea    -0x40(%rbp),%rdi
call   1060 <test_find_custom@plt>
mov    $0x0,%al
call   1080 <test_nolist@plt>
mov    0x2dad(%rip),%rax
mov    (%rax),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
lea    0xe6c(%rip),%rax
mov    %rax,(%rsp)
lea    0xe67(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0xe61(%rip),%rax
mov    %rax,0x10(%rsp)
lea    0xe59(%rip),%rax
mov    %rax,0x18(%rsp)
lea    0xe51(%rip),%rax
mov    %rax,0x20(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <test_prepend_static@plt>
mov    %rbx,%rdi
call   1090 <test_prepend_dynamic@plt>
mov    %rbx,%rdi
call   1040 <test_append_static@plt>
mov    %rbx,%rdi
call   1060 <test_append_dynamic@plt>
mov    %rbx,%rdi
call   1080 <test_remove_static@plt>
mov    %rbx,%rdi
call   10a0 <test_find_static@plt>
mov    %rbx,%rdi
call   1050 <test_find_custom@plt>
xor    %eax,%eax
call   1070 <test_nolist@plt>
mov    0x2dcf(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Hello\00"
@.str.1 = [6 x i8] c"World\00"
@.str.2 = [4 x i8] c"One\00"
@.str.3 = [4 x i8] c"Two\00"
@.str.4 = [6 x i8] c"Three\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i8*]
store i32 0, i32* %1
%3 = bitcast [6 x i8*]* %2 to i8*
%4 = bitcast i8* %3 to [6 x i8*]*
%5 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i32 0, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), i8** %5
%6 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i32 0, i32 1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i8** %6
%7 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i32 0, i32 2
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8** %7
%8 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i32 0, i32 3
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8** %8
%9 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i32 0, i32 4
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i32 0, i32 0), i8** %9
%10 = getelementptr inbounds [6 x i8*], [6 x i8*]* %2, i64 0, i64 0
%11 = call i32 @test_prepend_static(i8** %10)
%12 = getelementptr inbounds [6 x i8*], [6 x i8*]* %2, i64 0, i64 0
%13 = call i32 @test_prepend_dynamic(i8** %12)
%14 = getelementptr inbounds [6 x i8*], [6 x i8*]* %2, i64 0, i64 0
%15 = call i32 @test_append_static(i8** %14)
%16 = getelementptr inbounds [6 x i8*], [6 x i8*]* %2, i64 0, i64 0
%17 = call i32 @test_append_dynamic(i8** %16)
%18 = getelementptr inbounds [6 x i8*], [6 x i8*]* %2, i64 0, i64 0
%19 = call i32 @test_remove_static(i8** %18)
%20 = getelementptr inbounds [6 x i8*], [6 x i8*]* %2, i64 0, i64 0
%21 = call i32 @test_find_static(i8** %20)
%22 = getelementptr inbounds [6 x i8*], [6 x i8*]* %2, i64 0, i64 0
%23 = call i32 @test_find_custom(i8** %22)
%24 = call i32 (...) @test_nolist()
%25 = load i32, i32* @EXIT_SUCCESS
ret i32 %25
}

LLVM IR (-O2):
@.str = [6 x i8] c"Hello\00"
@.str.1 = [6 x i8] c"World\00"
@.str.2 = [4 x i8] c"One\00"
@.str.3 = [4 x i8] c"Two\00"
@.str.4 = [6 x i8] c"Three\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca [6 x i8*]
%2 = bitcast [6 x i8*]* %1 to i8*
%3 = getelementptr inbounds [6 x i8*], [6 x i8*]* %1, i64 0, i64 4
%4 = bitcast i8** %3 to i8*
%5 = getelementptr inbounds [6 x i8*], [6 x i8*]* %1, i64 0, i64 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [6 x i8*], [6 x i8*]* %1, i64 0, i64 1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [6 x i8*], [6 x i8*]* %1, i64 0, i64 2
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds [6 x i8*], [6 x i8*]* %1, i64 0, i64 3
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8** %8
%9 = getelementptr inbounds [6 x i8*], [6 x i8*]* %1, i64 0, i64 4
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8** %9
%10 = call i32 @test_prepend_static(i8** %5)
%11 = call i32 @test_prepend_dynamic(i8** %5)
%12 = call i32 @test_append_static(i8** %5)
%13 = call i32 @test_append_dynamic(i8** %5)
%14 = call i32 @test_remove_static(i8** %5)
%15 = call i32 @test_find_static(i8** %5)
%16 = call i32 @test_find_custom(i8** %5)
%17 = call i32 (...) @test_nolist()
%18 = load i32, i32* @EXIT_SUCCESS
ret i32 %18
}