#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*/ memcpy(char *, float *, int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int distance = 100;
  float power = 26.50f;
  double super_power = 56789.4532;
  char initial = 'A';
  char first_name[] = "Zed";
  char last_name[] = "Shaw";
  char fArray[4];
  memcpy(fArray, &power, sizeof(float));
  printf("You are %d miles away.\n", distance);
  printf("You have %f levels of power.\n", power);
  printf("You have %f awesome super power\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);
  printf("0x%02x, 0x%02x, 0x%02x, 0x%02x\n", fArray[0], fArray[1], fArray[2],
         fArray[3]);
  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  0xec3(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movsd  0xeae(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movb   $0x41,-0x21(%rbp)
mov    0xeab(%rip),%eax
mov    %eax,-0x25(%rbp)
mov    0xea6(%rip),%eax
mov    %eax,-0x2a(%rbp)
mov    0xea1(%rip),%al
mov    %al,-0x26(%rbp)
lea    -0x2e(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    -0x14(%rbp),%esi
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe84(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x20(%rbp),%xmm0
lea    0xe8f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsbl -0x21(%rbp),%esi
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x25(%rbp),%rsi
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x2a(%rbp),%rsi
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x25(%rbp),%rsi
movsbl -0x21(%rbp),%edx
lea    -0x2a(%rbp),%rcx
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x2e(%rbp),%esi
movsbl -0x2d(%rbp),%edx
movsbl -0x2c(%rbp),%ecx
movsbl -0x2b(%rbp),%r8d
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movl   $0x41d40000,0x8(%rsp)
41
movl   $0x64655a,0x14(%rsp)
movb   $0x0,0x10(%rsp)
movl   $0x77616853,0xc(%rsp)
77
lea    0x4(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
lea    0xeae(%rip),%rdi
mov    $0x64,%esi
xor    %eax,%eax
call   1030 <printf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xeb9(%rip),%rdi
movsd  0xe6e(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
lea    0x14(%rsp),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
lea    0xc(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
mov    %r14,%rsi
mov    $0x41,%edx
mov    %rbx,%rcx
xor    %eax,%eax
call   1030 <printf@plt>
movsbl 0x4(%rsp),%esi
movsbl 0x5(%rsp),%edx
movsbl 0x6(%rsp),%ecx
movsbl 0x7(%rsp),%r8d
lea    0xeb8(%rip),%rdi
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 = [33 x i8] c"You have %f awesome super power\0A\00"
@.str.3 = [22 x i8] c"I have an initial %c\0A\00"
@.str.4 = [24 x i8] c"I have a first name %s\0A\00"
@.str.5 = [23 x i8] c"I have a last name %s\0A\00"
@.str.6 = [28 x i8] c"My whole name is %s %c. %s\0A\00"
@.str.7 = [32 x i8] c"0x%02x, 0x%02x, 0x%02x, 0x%02x\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 [4 x i8]
%11 = alloca [5 x i8]
%12 = alloca [4 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 100, i32* %6
store float 2.650000e+01, float* %7
store double 0x40EBBAAE809D4952, double* %8
store i8 65, i8* %9
%13 = bitcast [4 x i8]* %10 to i8*
%14 = bitcast [5 x i8]* %11 to i8*
%15 = getelementptr inbounds [4 x i8], [4 x i8]* %12, i64 0, i64 0
%16 = call i32 @memcpy(i8* %15, float* %7, i32 4)
%17 = load i32, i32* %6
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = load float, float* %7
%20 = fpext float %19 to double
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), double %20)
%22 = load double, double* %8
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), double %22)
%24 = load i8, i8* %9
%25 = sext i8 %24 to i32
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %25)
%27 = getelementptr inbounds [4 x i8], [4 x i8]* %10, i64 0, i64 0
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i8* %27)
%29 = getelementptr inbounds [5 x i8], [5 x i8]* %11, i64 0, i64 0
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* %29)
%31 = getelementptr inbounds [4 x i8], [4 x i8]* %10, i64 0, i64 0
%32 = load i8, i8* %9
%33 = sext i8 %32 to i32
%34 = getelementptr inbounds [5 x i8], [5 x i8]* %11, i64 0, i64 0
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i8* %31, i32 %33, i8* %34)
%36 = getelementptr inbounds [4 x i8], [4 x i8]* %12, i64 0, i64 0
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = getelementptr inbounds [4 x i8], [4 x i8]* %12, i64 0, i64 1
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = getelementptr inbounds [4 x i8], [4 x i8]* %12, i64 0, i64 2
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
%45 = getelementptr inbounds [4 x i8], [4 x i8]* %12, i64 0, i64 3
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0), i32 %38, i32 %41, i32 %44, i32 %47)
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 = [33 x i8] c"You have %f awesome super power\0A\00"
@.str.3 = [22 x i8] c"I have an initial %c\0A\00"
@.str.4 = [24 x i8] c"I have a first name %s\0A\00"
@.str.5 = [23 x i8] c"I have a last name %s\0A\00"
@.str.6 = [28 x i8] c"My whole name is %s %c. %s\0A\00"
@.str.7 = [32 x i8] c"0x%02x, 0x%02x, 0x%02x, 0x%02x\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = alloca i32
%5 = alloca [5 x i8]
%6 = alloca [4 x i8]
%7 = bitcast float* %3 to i8*
store float 2.650000e+01, float* %3
%8 = bitcast i32* %4 to i8*
store i32 6579546, i32* %4
%9 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%11 = call i32 @memcpy(i8* %10, float* %3, i32 4)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 100)
%13 = load float, float* %3
%14 = fpext float %13 to double
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), double %14)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), double 0x40EBBAAE809D4952)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 65)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32* %4)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* %9)
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i32* %4, i32 65, i8* %9)
%21 = load i8, i8* %10
%22 = sext i8 %21 to i32
%23 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 1
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 2
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 3
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0), i32 %22, i32 %25, i32 %28, i32 %31)
ret i32 0
}