#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 *, ...);
int main(int argc, char *argv[]) {
  int distance = 100;
  float power = 4.56f;
  double super_good = 4546.34;
  char initial = 'A';
  char first_name[] = "Shark";
  char last_name[] = "Speed";
  printf("%d miles away.\n", distance);
  printf("%f levels of power.\n", power);
  printf("%f awesome super power.\n", super_good);
  printf("initial %c.\n", initial);
  printf("my first name %s.\n", first_name);
  printf("my whole name %s %c. %s.\n", first_name, initial, last_name);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x64,-0x14(%rbp)
movss  0xed3(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movsd  0xebe(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movb   $0x41,-0x21(%rbp)
mov    0xebb(%rip),%eax
mov    %eax,-0x27(%rbp)
mov    0xeb5(%rip),%ax
mov    %ax,-0x23(%rbp)
mov    0xead(%rip),%eax
mov    %eax,-0x2d(%rbp)
mov    0xea7(%rip),%ax
mov    %ax,-0x29(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe94(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x20(%rbp),%xmm0
lea    0xe96(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsbl -0x21(%rbp),%esi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x27(%rbp),%rsi
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x27(%rbp),%rsi
movsbl -0x21(%rbp),%edx
lea    -0x2d(%rbp),%rcx
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movw   $0x6b,0xc(%rsp)
movl   $0x72616853,0x8(%rsp)
72
movw   $0x64,0x4(%rsp)
movl   $0x65657053,(%rsp)
lea    0xee3(%rip),%rdi
mov    $0x64,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
movsd  0xeac(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
movsd  0xe9e(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
mov    %rsp,%rcx
mov    %rbx,%rsi
mov    $0x41,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.first_name = [6 x i8] c"Shark\00"
@__const.main.last_name = [6 x i8] c"Speed\00"
@.str = [16 x i8] c"%d miles away.\0A\00"
@.str.1 = [21 x i8] c"%f levels of power.\0A\00"
@.str.2 = [25 x i8] c"%f awesome super power.\0A\00"
@.str.3 = [13 x i8] c"initial %c.\0A\00"
@.str.4 = [19 x i8] c"my first name %s.\0A\00"
@.str.5 = [26 x i8] c"my whole name %s %c. %s.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca float
%8 = alloca double
%9 = alloca i8
%10 = alloca [6 x i8]
%11 = alloca [6 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 100, i32* %6
store float 0x40123D70A0000000, float* %7
store double 4.546340e+03, double* %8
store i8 65, i8* %9
%12 = bitcast [6 x i8]* %10 to i8*
%13 = bitcast [6 x i8]* %11 to i8*
%14 = load i32, i32* %6
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = load float, float* %7
%17 = fpext float %16 to double
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %17)
%19 = load double, double* %8
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), double %19)
%21 = load i8, i8* %9
%22 = sext i8 %21 to i32
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %22)
%24 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 0
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i8* %24)
%26 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 0
%27 = load i8, i8* %9
%28 = sext i8 %27 to i32
%29 = getelementptr inbounds [6 x i8], [6 x i8]* %11, i64 0, i64 0
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), i8* %26, i32 %28, i8* %29)
ret i32 0
}

LLVM IR (-O2):
@__const.main.first_name = [6 x i8] c"Shark\00"
@__const.main.last_name = [6 x i8] c"Speed\00"
@.str = [16 x i8] c"%d miles away.\0A\00"
@.str.1 = [21 x i8] c"%f levels of power.\0A\00"
@.str.2 = [25 x i8] c"%f awesome super power.\0A\00"
@.str.3 = [13 x i8] c"initial %c.\0A\00"
@.str.4 = [19 x i8] c"my first name %s.\0A\00"
@.str.5 = [26 x i8] c"my whole name %s %c. %s.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [6 x i8]
%4 = alloca [6 x i8]
%5 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 100)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double 0x40123D70A0000000)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), double 4.546340e+03)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 65)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i8* %5)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), i8* %5, i32 65, i8* %6)
ret i32 0
}