#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 /*<<< orphan*/ scanf(char *, double *, double *);
main() {
  double hght, mass, w;
  printf("Please enter the height and mass");
  scanf("%lf %lf", &hght, &mass);
  w = (((9.8 * hght * mass) * 0.9) * 0.000001);
  printf("Mega watts is %f", w);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xee9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <scanf@plt>
movsd  0xebe(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xea4(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe90(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xebc(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xeed(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf00(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm0
mulsd  0xeaa(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
mulsd  0xea4(%rip),%xmm0
mulsd  0xea4(%rip),%xmm0
lea    0xece(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Please enter the height and mass\00"
@.str.1 = [8 x i8] c"%lf %lf\00"
@.str.2 = [17 x i8] c"Mega watts is %f\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %1, double* %2)
%6 = load double, double* %1
%7 = fmul double 9.800000e+00, %6
%8 = load double, double* %2
%9 = fmul double %7, %8
%10 = fmul double %9, 9.000000e-01
%11 = fmul double %10, 0x3EB0C6F7A0B5ED8D
store double %11, double* %3
%12 = load double, double* %3
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), double %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"Please enter the height and mass\00"
@.str.1 = [8 x i8] c"%lf %lf\00"
@.str.2 = [17 x i8] c"Mega watts is %f\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %1, double* %2)
%7 = load double, double* %1
%8 = fmul double %7, 9.800000e+00
%9 = load double, double* %2
%10 = fmul double %8, %9
%11 = fmul double %10, 9.000000e-01
%12 = fmul double %11, 0x3EB0C6F7A0B5ED8D
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), double %12)
ret i32 0
}