#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 *, float *);
int main(void) {
  float object_weight = 0.0;
  float object_mass = 0.0;
  printf("\nenter your weight in Kilogram: ");
  scanf("%f", &object_weight);
  object_mass = (float)object_weight / 9.81;
  printf("\nYour Weight on Different Planets in Kilogram are:");
  printf(
      "\n\n\nplanets: Mercury | Venus   | Mars    | Jupiter | Saturn  | Uranus "
      " | Neptune | Ceres   | Pluto   | Haumea  | Makemake| Eris    \n");
  printf("\nWeight : %03.2f   | %3.2f   | %3.2f   | %3.2f  | %3.2f   | %3.2f   "
         "| %3.2f   | %3.2f    | %3.2f    | %3.2f    | %3.2f    | %3.2f  \n",
         (object_mass * 3.70), (object_mass * 8.87), (object_mass * 3.71),
         (object_mass * 23.12), (object_mass * 10.44), (object_mass * 8.69),
         (object_mass * 11.00), (object_mass * 0.27), (object_mass * 0.60),
         (object_mass * 0.44), (object_mass * 0.5), (object_mass * 0.8));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
lea    0xf22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf35(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xef2(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
lea    0xf0a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xe93(%rip),%xmm2
mulsd  %xmm2,%xmm1
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movsd  0xe76(%rip),%xmm3
mulsd  %xmm3,%xmm2
movss  -0xc(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movsd  0xe59(%rip),%xmm4
mulsd  %xmm4,%xmm3
movss  -0xc(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
movsd  0xe3c(%rip),%xmm5
mulsd  %xmm5,%xmm4
movss  -0xc(%rbp),%xmm5
cvtss2sd %xmm5,%xmm5
movsd  0xe1f(%rip),%xmm6
mulsd  %xmm6,%xmm5
movss  -0xc(%rbp),%xmm6
cvtss2sd %xmm6,%xmm6
movsd  0xe02(%rip),%xmm7
mulsd  %xmm7,%xmm6
movss  -0xc(%rbp),%xmm7
cvtss2sd %xmm7,%xmm7
movsd  0xde4(%rip),%xmm8
mulsd  %xmm8,%xmm7
movss  -0xc(%rbp),%xmm8
cvtss2sd %xmm8,%xmm11
movsd  0xdc3(%rip),%xmm8
mulsd  %xmm8,%xmm11
movss  -0xc(%rbp),%xmm8
cvtss2sd %xmm8,%xmm10
movsd  0xda2(%rip),%xmm8
mulsd  %xmm8,%xmm10
movss  -0xc(%rbp),%xmm8
cvtss2sd %xmm8,%xmm9
movsd  0xd81(%rip),%xmm8
mulsd  %xmm8,%xmm9
movss  -0xc(%rbp),%xmm8
cvtss2sd %xmm8,%xmm8
movsd  0xd60(%rip),%xmm12
mulsd  %xmm12,%xmm8
lea    0xe97(%rip),%rdi
movsd  %xmm11,(%rsp)
movsd  %xmm10,0x8(%rsp)
movsd  %xmm9,0x10(%rsp)
movsd  %xmm8,0x18(%rsp)
mov    $0x8,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movl   $0x0,0x20(%rsp)
lea    0xf25(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf38(%rip),%rdi
lea    0x20(%rsp),%rsi
call   1050 <scanf@plt>
movss  0x20(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  0xe93(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x24(%rsp)
lea    0xf0e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfb8(%rip),%rdi
call   1030 <puts@plt>
movss  0x24(%rsp),%xmm0
cvtss2sd %xmm0,%xmm8
movsd  0xe64(%rip),%xmm0
mulsd  %xmm8,%xmm0
movsd  0xe5f(%rip),%xmm1
mulsd  %xmm8,%xmm1
movsd  0xe5a(%rip),%xmm2
mulsd  %xmm8,%xmm2
movsd  0xe55(%rip),%xmm3
mulsd  %xmm8,%xmm3
movsd  0xe50(%rip),%xmm4
mulsd  %xmm8,%xmm4
movsd  0xe4b(%rip),%xmm5
mulsd  %xmm8,%xmm5
movsd  0xe46(%rip),%xmm6
mulsd  %xmm8,%xmm6
movsd  0xe41(%rip),%xmm7
mulsd  %xmm8,%xmm7
movsd  0xe3b(%rip),%xmm9
mulsd  %xmm8,%xmm9
movsd  0xe35(%rip),%xmm10
mulsd  %xmm8,%xmm10
movsd  0xe2f(%rip),%xmm11
mulsd  %xmm8,%xmm11
mulsd  0xe29(%rip),%xmm8
movsd  %xmm8,0x18(%rsp)
movsd  %xmm11,0x10(%rsp)
movsd  %xmm10,0x8(%rsp)
movsd  %xmm9,(%rsp)
lea    0xe66(%rip),%rdi
mov    $0x8,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"\0Aenter your weight in Kilogram: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [51 x i8] c"\0AYour Weight on Different Planets in Kilogram are:\00"
@.str.3 = [132 x i8] c"\0A\0A\0Aplanets: Mercury | Venus | Mars | Jupiter | Saturn | Uranus | Neptune | Ceres | Pluto | Haumea | Makemake| Eris \0A\00"
@.str.4 = [133 x i8] c"\0AWeight : %03.2f | %3.2f | %3.2f | %3.2f | %3.2f | %3.2f | %3.2f | %3.2f | %3.2f | %3.2f | %3.2f | %3.2f \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 0.000000e+00, float* %2
store float 0.000000e+00, float* %3
%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 ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%6 = load float, float* %2
%7 = fpext float %6 to double
%8 = fdiv double %7, 9.810000e+00
%9 = fptrunc double %8 to float
store float %9, float* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([132 x i8], [132 x i8]* @.str.3, i64 0, i64 0))
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = fmul double %13, 3.700000e+00
%15 = load float, float* %3
%16 = fpext float %15 to double
%17 = fmul double %16, 8.870000e+00
%18 = load float, float* %3
%19 = fpext float %18 to double
%20 = fmul double %19, 3.710000e+00
%21 = load float, float* %3
%22 = fpext float %21 to double
%23 = fmul double %22, 2.312000e+01
%24 = load float, float* %3
%25 = fpext float %24 to double
%26 = fmul double %25, 1.044000e+01
%27 = load float, float* %3
%28 = fpext float %27 to double
%29 = fmul double %28, 8.690000e+00
%30 = load float, float* %3
%31 = fpext float %30 to double
%32 = fmul double %31, 1.100000e+01
%33 = load float, float* %3
%34 = fpext float %33 to double
%35 = fmul double %34, 2.700000e-01
%36 = load float, float* %3
%37 = fpext float %36 to double
%38 = fmul double %37, 6.000000e-01
%39 = load float, float* %3
%40 = fpext float %39 to double
%41 = fmul double %40, 4.400000e-01
%42 = load float, float* %3
%43 = fpext float %42 to double
%44 = fmul double %43, 5.000000e-01
%45 = load float, float* %3
%46 = fpext float %45 to double
%47 = fmul double %46, 8.000000e-01
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.4, i64 0, i64 0), double %14, double %17, double %20, double %23, double %26, double %29, double %32, double %35, double %38, double %41, double %44, double %47)
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"\0Aenter your weight in Kilogram: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [51 x i8] c"\0AYour Weight on Different Planets in Kilogram are:\00"
@.str.4 = [133 x i8] c"\0AWeight : %03.2f | %3.2f | %3.2f | %3.2f | %3.2f | %3.2f | %3.2f | %3.2f | %3.2f | %3.2f | %3.2f | %3.2f \0A\00"
@str = [131 x i8] c"\0A\0A\0Aplanets: Mercury | Venus | Mars | Jupiter | Saturn | Uranus | Neptune | Ceres | Pluto | Haumea | Makemake| Eris \00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
store float 0.000000e+00, float* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fpext float %5 to double
%7 = fdiv double %6, 9.810000e+00
%8 = fptrunc double %7 to float
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([131 x i8], [131 x i8]* @str, i64 0, i64 0))
%11 = fpext float %8 to double
%12 = fmul double %11, 3.700000e+00
%13 = fmul double %11, 8.870000e+00
%14 = fmul double %11, 3.710000e+00
%15 = fmul double %11, 2.312000e+01
%16 = fmul double %11, 1.044000e+01
%17 = fmul double %11, 8.690000e+00
%18 = fmul double %11, 1.100000e+01
%19 = fmul double %11, 2.700000e-01
%20 = fmul double %11, 6.000000e-01
%21 = fmul double %11, 4.400000e-01
%22 = fmul double %11, 5.000000e-01
%23 = fmul double %11, 8.000000e-01
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([133 x i8], [133 x i8]* @.str.4, i64 0, i64 0), double %12, double %13, double %14, double %15, double %16, double %17, double %18, double %19, double %20, double %21, double %22, double %23)
ret i32 0
}