#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 distance = 100;
  float power = 2.435f;
  double super_power = 56789.4532;
  char initial = 'H';
  char first_name[] = "Corentin";
  char last_name[] = "Smith";
  printf("You are %d miles away.\n", distance);
  printf("You have %.2f 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);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
movss  0xeda(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movsd  0xec5(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movb   $0x48,-0x19(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0x22(%rbp)
mov    0xebf(%rip),%al
mov    %al,-0x1a(%rbp)
mov    0xeb7(%rip),%eax
mov    %eax,-0x28(%rbp)
mov    0xeb1(%rip),%ax
mov    %ax,-0x24(%rbp)
mov    -0x8(%rbp),%esi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xeb3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsbl -0x19(%rbp),%esi
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x22(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x28(%rbp),%rsi
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x22(%rbp),%rsi
movsbl -0x19(%rbp),%edx
lea    -0x28(%rbp),%rcx
lea    0xece(%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
movabs $0x6e69746e65726f43,%rax
74 69 6e
mov    %rax,0x8(%rsp)
movb   $0x0,0x10(%rsp)
movw   $0x68,0x4(%rsp)
movl   $0x74696d53,(%rsp)
lea    0xedf(%rip),%rdi
mov    $0x64,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
movsd  0xea5(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
movsd  0xe97(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
mov    $0x48,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
lea    0x8(%rsp),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
mov    %r14,%rsi
mov    $0x48,%edx
mov    %rbx,%rcx
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 = [9 x i8] c"Corentin\00"
@__const.main.last_name = [6 x i8] c"Smith\00"
@.str = [24 x i8] c"You are %d miles away.\0A\00"
@.str.1 = [32 x i8] c"You have %.2f 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"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca double
%5 = alloca i8
%6 = alloca [9 x i8]
%7 = alloca [6 x i8]
store i32 0, i32* %1
store i32 100, i32* %2
store float 0x40037AE140000000, float* %3
store double 0x40EBBAAE809D4952, double* %4
store i8 72, i8* %5
%8 = bitcast [9 x i8]* %6 to i8*
%9 = bitcast [6 x i8]* %7 to i8*
%10 = load i32, i32* %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), double %13)
%15 = load double, double* %4
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double %15)
%17 = load i8, i8* %5
%18 = sext i8 %17 to i32
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 %18)
%20 = getelementptr inbounds [9 x i8], [9 x i8]* %6, i64 0, i64 0
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %20)
%22 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %22)
%24 = getelementptr inbounds [9 x i8], [9 x i8]* %6, i64 0, i64 0
%25 = load i8, i8* %5
%26 = sext i8 %25 to i32
%27 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* %24, i32 %26, i8* %27)
ret i32 0
}

LLVM IR (-O2):
@__const.main.first_name = [9 x i8] c"Corentin\00"
@__const.main.last_name = [6 x i8] c"Smith\00"
@.str = [24 x i8] c"You are %d miles away.\0A\00"
@.str.1 = [32 x i8] c"You have %.2f 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"
define i32 @main() {
%1 = alloca [9 x i8]
%2 = alloca [6 x i8]
%3 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 100)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), double 0x40037AE140000000)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double 0x40EBBAAE809D4952)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 72)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %3)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %4)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* %3, i32 72, i8* %4)
ret i32 0
}