#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 *, float);
int main() {
  float distance = 378921.46;
  float speed = 140;
  float duration = distance / speed;
  float days;
  printf("The moon is %f kilometers away. \n", distance);
  printf("At %d kilometers per hour,", speed);
  printf("It would take us %f hours to get there. \n", duration);
  printf("That would mean %f days. Hella lot! \n", days = duration / 24);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xee1(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xed0(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
divss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
movss  0xe78(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
movss  0xee0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
movss  0xed0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf0d(%rip),%rdi
movss  0xec0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf23(%rip),%rdi
movss  0xeb0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"The moon is %f kilometers away. \0A\00"
@.str.1 = [27 x i8] c"At %d kilometers per hour,\00"
@.str.2 = [42 x i8] c"It would take us %f hours to get there. \0A\00"
@.str.3 = [38 x i8] c"That would mean %f days. Hella lot! \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
store float 0x411720A5E0000000, float* %2
store float 1.400000e+02, float* %3
%6 = load float, float* %2
%7 = load float, float* %3
%8 = fdiv float %6, %7
store float %8, float* %4
%9 = load float, float* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), float %9)
%11 = load float, float* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), float %11)
%13 = load float, float* %4
%14 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), float %13)
%15 = load float, float* %4
%16 = fdiv float %15, 2.400000e+01
store float %16, float* %5
%17 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), float %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"The moon is %f kilometers away. \0A\00"
@.str.1 = [27 x i8] c"At %d kilometers per hour,\00"
@.str.2 = [42 x i8] c"It would take us %f hours to get there. \0A\00"
@.str.3 = [38 x i8] c"That would mean %f days. Hella lot! \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), float 0x411720A5E0000000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), float 1.400000e+02)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), float 0x40A5252A00000000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), float 0x405C318D60000000)
ret i32 0
}