#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_s(char *, float *);
int /*<<< orphan*/ system(char *);
main() {
  float radius, circumference, area, height, volume;
  printf("Enter the radius: \t");
  scanf_s("%f", &radius);
  printf("\n");
  area = 3.14 * radius * radius;
  printf("Area's value is: %.2f", area);
  printf("\n");
  circumference = 2 * 3.14 * radius;
  printf("Circumference's value is: %.2f\n", circumference);
  printf("\n");
  printf("Enter the height: \t");
  scanf_s("%f", &height);
  printf("\n");
  volume = area * height;
  printf("Volume's value is: %.2f\n", volume);
  system("pause");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed7(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf_s@plt>
lea    0xefe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe93(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe88(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe3b(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe5b(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe18(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf_s@plt>
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe2f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe3a(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeca(%rip),%rbx
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf_s@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe7d(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,0x8(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xe84(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xe42(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe68(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe70(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf_s@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movss  0x8(%rsp),%xmm0
mulss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe4f(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xe5a(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Enter the radius: \09\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [22 x i8] c"Area's value is: %.2f\00"
@.str.4 = [32 x i8] c"Circumference's value is: %.2f\0A\00"
@.str.5 = [20 x i8] c"Enter the height: \09\00"
@.str.6 = [25 x i8] c"Volume's value is: %.2f\0A\00"
@.str.7 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%9 = load float, float* %1
%10 = fpext float %9 to double
%11 = fmul double 3.140000e+00, %10
%12 = load float, float* %1
%13 = fpext float %12 to double
%14 = fmul double %11, %13
%15 = fptrunc double %14 to float
store float %15, float* %3
%16 = load float, float* %3
%17 = fpext float %16 to double
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), double %17)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%20 = load float, float* %1
%21 = fpext float %20 to double
%22 = fmul double 6.280000e+00, %21
%23 = fptrunc double %22 to float
store float %23, float* %2
%24 = load float, float* %2
%25 = fpext float %24 to double
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), double %25)
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%29 = call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%31 = load float, float* %3
%32 = load float, float* %4
%33 = fmul float %31, %32
store float %33, float* %5
%34 = load float, float* %5
%35 = fpext float %34 to double
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), double %35)
%37 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Enter the radius: \09\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.3 = [22 x i8] c"Area's value is: %.2f\00"
@.str.4 = [32 x i8] c"Circumference's value is: %.2f\0A\00"
@.str.5 = [20 x i8] c"Enter the height: \09\00"
@.str.6 = [25 x i8] c"Volume's value is: %.2f\0A\00"
@.str.7 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%7 = call i32 @putchar(i32 10)
%8 = load float, float* %1
%9 = fpext float %8 to double
%10 = fmul double %9, 3.140000e+00
%11 = fmul double %10, %9
%12 = fptrunc double %11 to float
%13 = fpext float %12 to double
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), double %13)
%15 = call i32 @putchar(i32 10)
%16 = load float, float* %1
%17 = fpext float %16 to double
%18 = fmul double %17, 6.280000e+00
%19 = fptrunc double %18 to float
%20 = fpext float %19 to double
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), double %20)
%22 = call i32 @putchar(i32 10)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%24 = call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%25 = call i32 @putchar(i32 10)
%26 = load float, float* %2
%27 = fmul float %26, %12
%28 = fpext float %27 to double
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), double %28)
%30 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}