#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() {
  char a[] = "hello";
  char b[6] = "hello";
  char c[5] = "hello";
  char d[] = {'b', 'e', 'l', 'l', 'o', '\0'};
  char e[] = {'h', 'e', 'l', 'l', 'o'};
  printf("a: \"%s\"\n", a);
  printf("b: \"%s\"\n", b);
  printf("c: \"%s\"\n", c);
  printf("d: \"%s\"\n", d);
  printf("e: \"%s\"\n", e);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xedb(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xed5(%rip),%ax
mov    %ax,-0x6(%rbp)
mov    0xec7(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xec1(%rip),%ax
mov    %ax,-0xc(%rbp)
mov    0xeec(%rip),%eax
mov    %eax,-0x15(%rbp)
mov    0xee7(%rip),%al
mov    %al,-0x11(%rbp)
mov    0xea7(%rip),%eax
mov    %eax,-0x1b(%rbp)
mov    0xea1(%rip),%ax
mov    %ax,-0x17(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x20(%rbp)
mov    0xec6(%rip),%al
mov    %al,-0x1c(%rbp)
lea    -0xa(%rbp),%rsi
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
lea    -0x10(%rbp),%rsi
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
lea    -0x15(%rbp),%rsi
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
lea    -0x1b(%rbp),%rsi
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xe66(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movw   $0x6f,0x24(%rsp)
movl   $0x6c6c6568,0x20(%rsp)
6c
movw   $0x6f,0x1c(%rsp)
movl   $0x6c6c6568,0x18(%rsp)
6c
movb   $0x6f,0xc(%rsp)
movl   $0x6c6c6568,0x8(%rsp)
6c
movw   $0x6f,0x14(%rsp)
movl   $0x6c6c6562,0x10(%rsp)
6c
movb   $0x6f,0x4(%rsp)
movl   $0x6c6c6568,(%rsp)
lea    0xeab(%rip),%rdi
lea    0x20(%rsp),%rsi
call   1030 <printf@plt>
lea    0xea3(%rip),%rdi
lea    0x18(%rsp),%rsi
call   1030 <printf@plt>
lea    0xe9b(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1030 <printf@plt>
lea    0xe93(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1030 <printf@plt>
lea    0xe8b(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [6 x i8] c"hello\00"
@__const.main.b = [6 x i8] c"hello\00"
@__const.main.c = [5 x i8] c"hello"
@__const.main.d = [6 x i8] c"bello\00"
@__const.main.e = [5 x i8] c"hello"
@.str = [9 x i8] c"a: \22%s\22\0A\00"
@.str.1 = [9 x i8] c"b: \22%s\22\0A\00"
@.str.2 = [9 x i8] c"c: \22%s\22\0A\00"
@.str.3 = [9 x i8] c"d: \22%s\22\0A\00"
@.str.4 = [9 x i8] c"e: \22%s\22\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i8]
%3 = alloca [6 x i8]
%4 = alloca [5 x i8]
%5 = alloca [6 x i8]
%6 = alloca [5 x i8]
store i32 0, i32* %1
%7 = bitcast [6 x i8]* %2 to i8*
%8 = bitcast [6 x i8]* %3 to i8*
%9 = bitcast [5 x i8]* %4 to i8*
%10 = bitcast [6 x i8]* %5 to i8*
%11 = bitcast [5 x i8]* %6 to i8*
%12 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%15 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %14)
%16 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%17 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %16)
%18 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 0
%19 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* %18)
%20 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%21 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* %20)
ret i32 0
}

LLVM IR (-O2):
@__const.main.b = [6 x i8] c"hello\00"
@__const.main.d = [6 x i8] c"bello\00"
@__const.main.e = [5 x i8] c"hello"
@.str = [9 x i8] c"a: \22%s\22\0A\00"
@.str.1 = [9 x i8] c"b: \22%s\22\0A\00"
@.str.2 = [9 x i8] c"c: \22%s\22\0A\00"
@.str.3 = [9 x i8] c"d: \22%s\22\0A\00"
@.str.4 = [9 x i8] c"e: \22%s\22\0A\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = alloca [6 x i8]
%3 = alloca [5 x i8]
%4 = alloca [6 x i8]
%5 = alloca [5 x i8]
%6 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %6)
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%13 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %8)
%14 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* %9)
%15 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* %10)
ret i32 0
}