#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*/ add(char **, char *, int);
int /*<<< orphan*/ drucke(char **);
int /*<<< orphan*/ freigabe(char **);
int main(void) {
  char *helden[10 + 1];
  helden[0] = NULL;
  add(helden, "Frodo Beutlin", 10 + 1);
  add(helden, "Luke Skywalker", 10 + 1);
  add(helden, "Harry Potter", 10 + 1);
  add(helden, "Eragon", 10 + 1);
  drucke(helden);
  freigabe(helden);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x60(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xeae(%rip),%rsi
mov    $0xb,%edx
call   1030 <add@plt>
lea    -0x60(%rbp),%rdi
lea    0xea7(%rip),%rsi
mov    $0xb,%edx
call   1030 <add@plt>
lea    -0x60(%rbp),%rdi
lea    0xea1(%rip),%rsi
mov    $0xb,%edx
call   1030 <add@plt>
lea    -0x60(%rbp),%rdi
lea    0xe99(%rip),%rsi
mov    $0xb,%edx
call   1030 <add@plt>
lea    -0x60(%rbp),%rdi
call   1050 <drucke@plt>
lea    -0x60(%rbp),%rdi
call   1040 <freigabe@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
movq   $0x0,(%rsp)
lea    0xebc(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xb,%edx
call   1030 <add@plt>
lea    0xeb3(%rip),%rsi
mov    %rbx,%rdi
mov    $0xb,%edx
call   1030 <add@plt>
lea    0xeae(%rip),%rsi
mov    %rbx,%rdi
mov    $0xb,%edx
call   1030 <add@plt>
lea    0xea7(%rip),%rsi
mov    %rbx,%rdi
mov    $0xb,%edx
call   1030 <add@plt>
mov    %rbx,%rdi
call   1050 <drucke@plt>
mov    %rbx,%rdi
call   1040 <freigabe@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Frodo Beutlin\00"
@.str.1 = [15 x i8] c"Luke Skywalker\00"
@.str.2 = [13 x i8] c"Harry Potter\00"
@.str.3 = [7 x i8] c"Eragon\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [11 x i8*]
store i32 0, i32* %1
%3 = getelementptr inbounds [11 x i8*], [11 x i8*]* %2, i64 0, i64 0
store i8* null, i8** %3
%4 = getelementptr inbounds [11 x i8*], [11 x i8*]* %2, i64 0, i64 0
%5 = call i32 @add(i8** %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 11)
%6 = getelementptr inbounds [11 x i8*], [11 x i8*]* %2, i64 0, i64 0
%7 = call i32 @add(i8** %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 11)
%8 = getelementptr inbounds [11 x i8*], [11 x i8*]* %2, i64 0, i64 0
%9 = call i32 @add(i8** %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 11)
%10 = getelementptr inbounds [11 x i8*], [11 x i8*]* %2, i64 0, i64 0
%11 = call i32 @add(i8** %10, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 11)
%12 = getelementptr inbounds [11 x i8*], [11 x i8*]* %2, i64 0, i64 0
%13 = call i32 @drucke(i8** %12)
%14 = getelementptr inbounds [11 x i8*], [11 x i8*]* %2, i64 0, i64 0
%15 = call i32 @freigabe(i8** %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Frodo Beutlin\00"
@.str.1 = [15 x i8] c"Luke Skywalker\00"
@.str.2 = [13 x i8] c"Harry Potter\00"
@.str.3 = [7 x i8] c"Eragon\00"
define i32 @main() {
%1 = alloca [11 x i8*]
%2 = bitcast [11 x i8*]* %1 to i8*
%3 = getelementptr inbounds [11 x i8*], [11 x i8*]* %1, i64 0, i64 0
store i8* null, i8** %3
%4 = call i32 @add(i8** %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 11)
%5 = call i32 @add(i8** %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 11)
%6 = call i32 @add(i8** %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 11)
%7 = call i32 @add(i8** %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 11)
%8 = call i32 @drucke(i8** %3)
%9 = call i32 @freigabe(i8** %3)
ret i32 0
}