#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*/ printf(char *, char *);
int main() {
  int index = -1;
  char lokalesArray[30] = "Hello World!!!!";
  char *zeigerAufZeichenkettenkonst = "Hallo Welt!";
  printf("%s\n", lokalesArray);
  for (index = 0; *zeigerAufZeichenkettenkonst != '\0'; index++)
    lokalesArray[index] = *zeigerAufZeichenkettenkonst++;
  lokalesArray[index] = '\0';
  printf("\noder...\n\n%s\n", lokalesArray);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xecd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x18(%rbp)
mov    0xec5(%rip),%ax
mov    %ax,-0x14(%rbp)
lea    0xebc(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    -0x30(%rbp),%rsi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     11b4 <main+0xa4>
mov    -0x38(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x38(%rbp)
mov    (%rax),%cl
movslq -0x8(%rbp),%rax
mov    %cl,-0x30(%rbp,%rax,1)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    117d <main+0x6d>
movslq -0x8(%rbp),%rax
movb   $0x0,-0x30(%rbp,%rax,1)
lea    -0x30(%rbp),%rsi
lea    0xe62(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movups 0xef2(%rip),%xmm0
movups %xmm0,0xe(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xef5(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <printf@plt>
movabs $0x6557206f6c6c6148,%rax
20 57 65
mov    %rax,(%rsp)
movl   $0x21746c,0x8(%rsp)
lea    0xec3(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.lokalesArray = [30 x i8] c"Hello World!!!!\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [12 x i8] c"Hallo Welt!\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [14 x i8] c"\0Aoder...\0A\0A%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [30 x i8]
%4 = alloca i8*
store i32 0, i32* %1
store i32 -1, i32* %2
%5 = bitcast [30 x i8]* %3 to i8*
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %4
%6 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %6)
store i32 0, i32* %2
br label %8
8: ; preds = %20, %0
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %23
13: ; preds = %8
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %4
%16 = load i8, i8* %14
%17 = load i32, i32* %2
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 %18
store i8 %16, i8* %19
br label %20
20: ; preds = %13
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
br label %8
23: ; preds = %8
%24 = load i32, i32* %2
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 %25
store i8 0, i8* %26
%27 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%28 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* %27)
ret i32 0
}

LLVM IR (-O2):
@__const.main.lokalesArray = [30 x i8] c"Hello World!!!!\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [14 x i8] c"\0Aoder...\0A\0A%s\0A\00"
define i32 @main() {
%1 = alloca [30 x i8]
%2 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
store i8 72, i8* %2
%4 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 1
store i8 97, i8* %4
%5 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 2
store i8 108, i8* %5
%6 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 3
store i8 108, i8* %6
%7 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 4
store i8 111, i8* %7
%8 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 5
store i8 32, i8* %8
%9 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 6
store i8 87, i8* %9
%10 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 7
store i8 101, i8* %10
%11 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 8
store i8 108, i8* %11
%12 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 9
store i8 116, i8* %12
%13 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 10
store i8 33, i8* %13
%14 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 11
store i8 0, i8* %14
%15 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* %2)
ret i32 0
}