#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*/ print_out(char *, int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("Hello World!\n");
  char *first = "Hello";
  char *last = "World!";
  printf("%s %s\n", first, last);
  print_out("May", 6);
  print_out("Chris", 39);
  print_out("C", 89);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec5(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb2(%rip),%rdi
mov    $0x6,%esi
call   1040 <print_out@plt>
lea    0xea5(%rip),%rdi
mov    $0x27,%esi
call   1040 <print_out@plt>
lea    0xe9a(%rip),%rdi
mov    $0x59,%esi
call   1040 <print_out@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee1(%rip),%rdi
call   1030 <puts@plt>
lea    0xec2(%rip),%rdi
lea    0xeb5(%rip),%rsi
lea    0xecd(%rip),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xead(%rip),%rdi
mov    $0x6,%esi
call   1050 <print_out@plt>
lea    0xea0(%rip),%rdi
mov    $0x27,%esi
call   1050 <print_out@plt>
lea    0xe95(%rip),%rdi
mov    $0x59,%esi
call   1050 <print_out@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello World!\0A\00"
@.str.1 = [6 x i8] c"Hello\00"
@.str.2 = [7 x i8] c"World!\00"
@.str.3 = [7 x i8] c"%s %s\0A\00"
@.str.4 = [4 x i8] c"May\00"
@.str.5 = [6 x i8] c"Chris\00"
@.str.6 = [2 x i8] c"C\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8** %3
%5 = load i8*, i8** %2
%6 = load i8*, i8** %3
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %5, i8* %6)
%8 = call i32 @print_out(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 6)
%9 = call i32 @print_out(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 39)
%10 = call i32 @print_out(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i32 89)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"Hello\00"
@.str.2 = [7 x i8] c"World!\00"
@.str.3 = [7 x i8] c"%s %s\0A\00"
@.str.4 = [4 x i8] c"May\00"
@.str.5 = [6 x i8] c"Chris\00"
@.str.6 = [2 x i8] c"C\00"
@str = [13 x i8] c"Hello World!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @print_out(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 6)
%4 = tail call i32 @print_out(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 39)
%5 = tail call i32 @print_out(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i32 89)
ret i32 0
}