#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*/ indirect(char *);
int /*<<< orphan*/ print_string(char *);
void main(void) {
  char c[3];
  c[0] = 'h';
  c[1] = 'i';
  c[2] = '\0';
  print_string(c);
  print_string("\n");
  indirect(c);
  print_string("\n");
  print_string(c);
  print_string("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x68,-0x3(%rbp)
movb   $0x69,-0x2(%rbp)
movb   $0x0,-0x1(%rbp)
lea    -0x3(%rbp),%rdi
call   1030 <print_string@plt>
lea    0xebc(%rip),%rdi
call   1030 <print_string@plt>
lea    -0x3(%rbp),%rdi
call   1040 <indirect@plt>
lea    0xea7(%rip),%rdi
call   1030 <print_string@plt>
lea    -0x3(%rbp),%rdi
call   1030 <print_string@plt>
lea    0xe92(%rip),%rdi
call   1030 <print_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movw   $0x6968,0x5(%rsp)
movb   $0x0,0x7(%rsp)
lea    0x5(%rsp),%r14
mov    %r14,%rdi
call   1030 <print_string@plt>
lea    0xebc(%rip),%rbx
mov    %rbx,%rdi
call   1030 <print_string@plt>
mov    %r14,%rdi
call   1040 <indirect@plt>
mov    %rbx,%rdi
call   1030 <print_string@plt>
mov    %r14,%rdi
call   1030 <print_string@plt>
mov    %rbx,%rdi
call   1030 <print_string@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @main() {
%1 = alloca [3 x i8]
%2 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
store i8 104, i8* %2
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 1
store i8 105, i8* %3
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 2
store i8 0, i8* %4
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%6 = call i32 @print_string(i8* %5)
%7 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%9 = call i32 @indirect(i8* %8)
%10 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%12 = call i32 @print_string(i8* %11)
%13 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @main() {
%1 = alloca [3 x i8]
%2 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
store i8 104, i8* %2
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 1
store i8 105, i8* %3
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 2
store i8 0, i8* %4
%5 = call i32 @print_string(i8* %2)
%6 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @indirect(i8* %2)
%8 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @print_string(i8* %2)
%10 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}