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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xee5(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
lea    0xedd(%rip),%rdi
movss  0xecd(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
movss  0xeb5(%rip),%xmm0
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
lea    0xeef(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xe8e(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
lea    0xef9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [36 x i8] c"The moon is %.2f kilometers away. \0A\00"
@.str.1 = [27 x i8] c"At %d kilometers per hour,\00"
@.str.2 = [44 x i8] c"It would take us %.3f hours to get there. \0A\00"
@.str.3 = [47 x i8] c"That would mean roughly %.f days. Hella lot! \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 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 ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), float 0x40A52529E0000000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), float 0x405C318D20000000)
ret i32 0
}