#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[] = "Johnny";
  char last_name[] = "Colon";
  char empty_string[] = "";
  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);
  printf("Did it work? %s.\n", empty_string);
  printf("The hexadecimal number of %d is %#x.\n", distance, distance);
  printf("This is what an octal number looks like!! %d = %#o.\n", distance,
         distance);
  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,-0x28(%rbp)
mov    0xea5(%rip),%ax
mov    %ax,-0x24(%rbp)
mov    0xe9d(%rip),%al
mov    %al,-0x22(%rbp)
mov    0xe95(%rip),%eax
mov    %eax,-0x2e(%rbp)
mov    0xe8f(%rip),%ax
mov    %ax,-0x2a(%rbp)
lea    -0x2f(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1040 <memset@plt>
mov    -0x14(%rbp),%esi
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe74(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x20(%rbp),%xmm0
lea    0xe7f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsbl -0x21(%rbp),%esi
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x28(%rbp),%rsi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x2e(%rbp),%rsi
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x28(%rbp),%rsi
movsbl -0x21(%rbp),%edx
lea    -0x2e(%rbp),%rcx
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x2f(%rbp),%rsi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xeb5(%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   $0x796e6e,0x13(%rsp)
movl   $0x6e686f4a,0x10(%rsp)
6e
movw   $0x6e,0xc(%rsp)
movl   $0x6f6c6f43,0x8(%rsp)
6f
movb   $0x0,0x7(%rsp)
lea    0xedb(%rip),%rdi
mov    $0x64,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
movsd  0xea3(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
movsd  0xe95(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
lea    0x10(%rsp),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xefe(%rip),%rdi
mov    %r14,%rsi
mov    $0x41,%edx
mov    %rbx,%rcx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
lea    0x7(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf01(%rip),%rdi
mov    $0x64,%esi
mov    $0x64,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf0f(%rip),%rdi
mov    $0x64,%esi
mov    $0x64,%edx
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 = [7 x i8] c"Johnny\00"
@__const.main.last_name = [6 x i8] c"Colon\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 = [18 x i8] c"Did it work? %s.\0A\00"
@.str.8 = [38 x i8] c"The hexadecimal number of %d is %#x.\0A\00"
@.str.9 = [53 x i8] c"This is what an octal number looks like!! %d = %#o.\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 [7 x i8]
%11 = alloca [6 x i8]
%12 = alloca [1 x i8]
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
%13 = bitcast [7 x i8]* %10 to i8*
%14 = bitcast [6 x i8]* %11 to i8*
%15 = bitcast [1 x i8]* %12 to i8*
%16 = load i32, i32* %6
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = load float, float* %7
%19 = fpext float %18 to double
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), double %19)
%21 = load double, double* %8
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double %21)
%23 = load i8, i8* %9
%24 = sext i8 %23 to i32
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 %24)
%26 = getelementptr inbounds [7 x i8], [7 x i8]* %10, i64 0, i64 0
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %26)
%28 = getelementptr inbounds [6 x i8], [6 x i8]* %11, i64 0, i64 0
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %28)
%30 = getelementptr inbounds [7 x i8], [7 x i8]* %10, i64 0, i64 0
%31 = load i8, i8* %9
%32 = sext i8 %31 to i32
%33 = getelementptr inbounds [6 x i8], [6 x i8]* %11, i64 0, i64 0
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* %30, i32 %32, i8* %33)
%35 = getelementptr inbounds [1 x i8], [1 x i8]* %12, i64 0, i64 0
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i8* %35)
%37 = load i32, i32* %6
%38 = load i32, i32* %6
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0), i32 %37, i32 %38)
%40 = load i32, i32* %6
%41 = load i32, i32* %6
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.9, i64 0, i64 0), i32 %40, i32 %41)
ret i32 0
}

LLVM IR (-O2):
@__const.main.first_name = [7 x i8] c"Johnny\00"
@__const.main.last_name = [6 x i8] c"Colon\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 = [18 x i8] c"Did it work? %s.\0A\00"
@.str.8 = [38 x i8] c"The hexadecimal number of %d is %#x.\0A\00"
@.str.9 = [53 x i8] c"This is what an octal number looks like!! %d = %#o.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [7 x i8]
%4 = alloca [6 x i8]
%5 = alloca [1 x i8]
%6 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
store i8 0, i8* %8
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 100)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), double 0x4002C28F60000000)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double 0x40EBBAAE809D4952)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 65)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %6)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %7)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* %6, i32 65, i8* %7)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i8* %8)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0), i32 100, i32 100)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.9, i64 0, i64 0), i32 100, i32 100)
ret i32 0
}