#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*/ f(char *);
int /*<<< orphan*/ g(char *);
int /*<<< orphan*/ h(char *);
int /*<<< orphan*/ k(char *);
int /*<<< orphan*/ m(char *);
int main() {
  f("hello 1");
  k("hello 1");
  char hello2[16] = "hello 2";
  g(hello2);
  char hello3[16] = "hello 3";
  h(hello3);
  m("hello 4");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
call   1040 <f@plt>
lea    0xe8e(%rip),%rdi
call   1070 <k@plt>
mov    0xe92(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe8f(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
call   1050 <g@plt>
mov    0xe83(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe80(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    -0x30(%rbp),%rdi
call   1030 <h@plt>
lea    0xe4c(%rip),%rdi
call   1060 <m@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xea4(%rip),%rbx
mov    %rbx,%rdi
call   1040 <f@plt>
mov    %rbx,%rdi
call   1070 <k@plt>
movaps 0xe9d(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x10(%rsp),%rdi
call   1050 <g@plt>
movaps 0xe97(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <h@plt>
lea    0xe6c(%rip),%rdi
call   1060 <m@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"hello 1\00"
@__const.main.hello2 = [16 x i8] c"hello 2\00\00\00\00\00\00\00\00\00"
@__const.main.hello3 = [16 x i8] c"hello 3\00\00\00\00\00\00\00\00\00"
@.str.1 = [8 x i8] c"hello 4\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x i8]
%3 = alloca [16 x i8]
store i32 0, i32* %1
%4 = call i32 @f(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @k(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = bitcast [16 x i8]* %2 to i8*
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%8 = call i32 @g(i8* %7)
%9 = bitcast [16 x i8]* %3 to i8*
%10 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%11 = call i32 @h(i8* %10)
%12 = call i32 @m(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"hello 1\00"
@__const.main.hello2 = [16 x i8] c"hello 2\00\00\00\00\00\00\00\00\00"
@__const.main.hello3 = [16 x i8] c"hello 3\00\00\00\00\00\00\00\00\00"
@.str.1 = [8 x i8] c"hello 4\00"
define i32 @main() {
%1 = alloca [16 x i8]
%2 = alloca [16 x i8]
%3 = tail call i32 @f(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @k(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%6 = call i32 @g(i8* %5)
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%8 = call i32 @h(i8* %7)
%9 = call i32 @m(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}