#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 = 2.345f;
  double super_power = 56789.4532;
  char initial = 'A';
  char first_name[] = "Zed";
  char last_name[] = "Shaw";
  printf("You are %d miles away.\n", distance);
  printf("You have %f levels of power.\n", power);
  printf("You have %f awesome super powers.\n", super_power);
  printf("I have an initial %c.\n", initial);
  printf("I have a first name %s.\n", first_name);
  printf("I have a last name %s.\n", last_name);
  printf("My whole name is %s %c. %s.\n", first_name, initial, last_name);
  int x1 = 12;
  float x2 = 1.5343f;
  float x3 = 483.333;
  int x4 = 016;
  int x5 = 0x23;
  printf("\nx1=%d", x1);
  printf("\nx2=%f", x2);
  printf("\nx3=%f", x3);
  printf("\nx4=%d", x4);
  printf("\nx5=%d", x5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%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  0xece(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movb   $0x41,-0x21(%rbp)
mov    0xec7(%rip),%eax
mov    %eax,-0x25(%rbp)
mov    0xec2(%rip),%eax
mov    %eax,-0x2a(%rbp)
mov    0xebd(%rip),%al
mov    %al,-0x26(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb2(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x20(%rbp),%xmm0
lea    0xebd(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsbl -0x21(%rbp),%esi
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x25(%rbp),%rsi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x2a(%rbp),%rsi
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x25(%rbp),%rsi
movsbl -0x21(%rbp),%edx
lea    -0x2a(%rbp),%rcx
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xc,-0x30(%rbp)
movss  0xe04(%rip),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  0xdf3(%rip),%xmm0
movss  %xmm0,-0x38(%rbp)
movl   $0xe,-0x3c(%rbp)
movl   $0x23,-0x40(%rbp)
mov    -0x30(%rbp),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x34(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea5(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x38(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe95(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x3c(%rbp),%esi
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x40(%rbp),%esi
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movl   $0x64655a,0x14(%rsp)
movb   $0x0,0x10(%rsp)
movl   $0x77616853,0xc(%rsp)
77
lea    0xef2(%rip),%rdi
mov    $0x64,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
movsd  0xeb2(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
movsd  0xea4(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf0c(%rip),%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf10(%rip),%rdi
lea    0x14(%rsp),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf13(%rip),%rdi
lea    0xc(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf15(%rip),%rdi
mov    %r14,%rsi
mov    $0x41,%edx
mov    %rbx,%rcx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf19(%rip),%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf0d(%rip),%rdi
movsd  0xe2b(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xefe(%rip),%rdi
movsd  0xe1d(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0x23,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.first_name = [4 x i8] c"Zed\00"
@__const.main.last_name = [5 x i8] c"Shaw\00"
@.str = [24 x i8] c"You are %d miles away.\0A\00"
@.str.1 = [30 x i8] c"You have %f levels of power.\0A\00"
@.str.2 = [35 x i8] c"You have %f awesome super powers.\0A\00"
@.str.3 = [23 x i8] c"I have an initial %c.\0A\00"
@.str.4 = [25 x i8] c"I have a first name %s.\0A\00"
@.str.5 = [24 x i8] c"I have a last name %s.\0A\00"
@.str.6 = [29 x i8] c"My whole name is %s %c. %s.\0A\00"
@.str.7 = [7 x i8] c"\0Ax1=%d\00"
@.str.8 = [7 x i8] c"\0Ax2=%f\00"
@.str.9 = [7 x i8] c"\0Ax3=%f\00"
@.str.10 = [7 x i8] c"\0Ax4=%d\00"
@.str.11 = [7 x i8] c"\0Ax5=%d\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 [4 x i8]
%11 = alloca [5 x i8]
%12 = alloca i32
%13 = alloca float
%14 = alloca float
%15 = alloca i32
%16 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 100, i32* %6
store float 0x4002C28F60000000, float* %7
store double 0x40EBBAAE809D4952, double* %8
store i8 65, i8* %9
%17 = bitcast [4 x i8]* %10 to i8*
%18 = bitcast [5 x i8]* %11 to i8*
%19 = load i32, i32* %6
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %19)
%21 = load float, float* %7
%22 = fpext float %21 to double
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), double %22)
%24 = load double, double* %8
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double %24)
%26 = load i8, i8* %9
%27 = sext i8 %26 to i32
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 %27)
%29 = getelementptr inbounds [4 x i8], [4 x i8]* %10, i64 0, i64 0
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %29)
%31 = getelementptr inbounds [5 x i8], [5 x i8]* %11, i64 0, i64 0
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %31)
%33 = getelementptr inbounds [4 x i8], [4 x i8]* %10, i64 0, i64 0
%34 = load i8, i8* %9
%35 = sext i8 %34 to i32
%36 = getelementptr inbounds [5 x i8], [5 x i8]* %11, i64 0, i64 0
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* %33, i32 %35, i8* %36)
store i32 12, i32* %12
store float 0x3FF88C7E20000000, float* %13
store float 0x407E355400000000, float* %14
store i32 14, i32* %15
store i32 35, i32* %16
%38 = load i32, i32* %12
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i32 %38)
%40 = load float, float* %13
%41 = fpext float %40 to double
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), double %41)
%43 = load float, float* %14
%44 = fpext float %43 to double
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), double %44)
%46 = load i32, i32* %15
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i32 %46)
%48 = load i32, i32* %16
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i32 %48)
ret i32 0
}

LLVM IR (-O2):
@__const.main.last_name = [5 x i8] c"Shaw\00"
@.str = [24 x i8] c"You are %d miles away.\0A\00"
@.str.1 = [30 x i8] c"You have %f levels of power.\0A\00"
@.str.2 = [35 x i8] c"You have %f awesome super powers.\0A\00"
@.str.3 = [23 x i8] c"I have an initial %c.\0A\00"
@.str.4 = [25 x i8] c"I have a first name %s.\0A\00"
@.str.5 = [24 x i8] c"I have a last name %s.\0A\00"
@.str.6 = [29 x i8] c"My whole name is %s %c. %s.\0A\00"
@.str.7 = [7 x i8] c"\0Ax1=%d\00"
@.str.8 = [7 x i8] c"\0Ax2=%f\00"
@.str.9 = [7 x i8] c"\0Ax3=%f\00"
@.str.10 = [7 x i8] c"\0Ax4=%d\00"
@.str.11 = [7 x i8] c"\0Ax5=%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca [5 x i8]
%5 = bitcast i32* %3 to i8*
store i32 6579546, i32* %3
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 100)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), double 0x4002C28F60000000)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double 0x40EBBAAE809D4952)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 65)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32* %3)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %6)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i32* %3, i32 65, i8* %6)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i32 12)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), double 0x3FF88C7E20000000)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), double 0x407E355400000000)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i32 14)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i32 35)
ret i32 0
}