#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 *, ...);
int main() {
  char input[20];
  int age;
  float height;
  ;
  printf("Enter your age in years please :");
  scanf("%i", &age);
  int months = age * 12;
  printf("Enter your height in cm please :");
  scanf("%f", &height);
  float inches = height * 0.3937;
  printf(
      "\n\nWith the great power invested in me I can tell you"
      "\n (show it on the screen)"
      "\n... that you are %i years (which would mean %i months)"
      "\n                 and %.f cm in height (which would mean %.3f inches)!",
      age, months, height, inches);
  printf("\n\nAge\tHeight(cm)");
  printf("\n%i\t%.f", age, height);
  printf("\nMonths\tInches");
  printf("\n%i\t%.3f", months, inches);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
lea    -0x24(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
imul   $0xc,-0x24(%rbp),%eax
mov    %eax,-0x2c(%rbp)
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe79(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x30(%rbp)
mov    -0x24(%rbp),%esi
mov    -0x2c(%rbp),%edx
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x30(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe9d(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xf5a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xf51(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%esi
movss  -0x30(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xf40(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xedc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    (%rsp),%eax
shl    $0x2,%eax
lea    (%rax,%rax,2),%ebx
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe80(%rip),%xmm1
mulsd  %xmm0,%xmm1
cvtsd2ss %xmm1,%xmm1
mov    (%rsp),%esi
cvtss2sd %xmm1,%xmm1
movsd  %xmm1,0x8(%rsp)
lea    0xeb4(%rip),%rdi
mov    %ebx,%edx
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xf6f(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rsp),%esi
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xf65(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf5f(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf60(%rip),%rdi
mov    %ebx,%esi
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Enter your age in years please :\00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [33 x i8] c"Enter your height in cm please :\00"
@.str.3 = [3 x i8] c"%f\00"
@.str.4 = [203 x i8] c"\0A\0AWith the great power invested in me I can tell you\0A (show it on the screen)\0A... that you are %i years (which would mean %i months)\0A and %.f cm in height (which would mean %.3f inches)!\00"
@.str.5 = [17 x i8] c"\0A\0AAge\09Height(cm)\00"
@.str.6 = [8 x i8] c"\0A%i\09%.f\00"
@.str.7 = [15 x i8] c"\0AMonths\09Inches\00"
@.str.8 = [9 x i8] c"\0A%i\09%.3f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = alloca i32
%4 = alloca float
%5 = alloca i32
%6 = alloca float
store i32 0, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%9 = load i32, i32* %3
%10 = mul nsw i32 %9, 12
store i32 %10, i32* %5
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %4)
%13 = load float, float* %4
%14 = fpext float %13 to double
%15 = fmul double %14, 3.937000e-01
%16 = fptrunc double %15 to float
store float %16, float* %6
%17 = load i32, i32* %3
%18 = load i32, i32* %5
%19 = load float, float* %4
%20 = fpext float %19 to double
%21 = load float, float* %6
%22 = fpext float %21 to double
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([203 x i8], [203 x i8]* @.str.4, i64 0, i64 0), i32 %17, i32 %18, double %20, double %22)
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%25 = load i32, i32* %3
%26 = load float, float* %4
%27 = fpext float %26 to double
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 %25, double %27)
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
%30 = load i32, i32* %5
%31 = load float, float* %6
%32 = fpext float %31 to double
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %30, double %32)
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"Enter your age in years please :\00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [33 x i8] c"Enter your height in cm please :\00"
@.str.3 = [3 x i8] c"%f\00"
@.str.4 = [203 x i8] c"\0A\0AWith the great power invested in me I can tell you\0A (show it on the screen)\0A... that you are %i years (which would mean %i months)\0A and %.f cm in height (which would mean %.3f inches)!\00"
@.str.5 = [17 x i8] c"\0A\0AAge\09Height(cm)\00"
@.str.6 = [8 x i8] c"\0A%i\09%.f\00"
@.str.7 = [15 x i8] c"\0AMonths\09Inches\00"
@.str.8 = [9 x i8] c"\0A%i\09%.3f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = bitcast i32* %1 to i8*
%4 = bitcast float* %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 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
%8 = mul nsw i32 %7, 12
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %2)
%11 = load float, float* %2
%12 = fpext float %11 to double
%13 = fmul double %12, 3.937000e-01
%14 = fptrunc double %13 to float
%15 = load i32, i32* %1
%16 = fpext float %14 to double
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([203 x i8], [203 x i8]* @.str.4, i64 0, i64 0), i32 %15, i32 %8, double %12, double %16)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%19 = load i32, i32* %1
%20 = load float, float* %2
%21 = fpext float %20 to double
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 %19, double %21)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %8, double %16)
ret i32 0
}