#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, float);
int /*<<< orphan*/ scanf(char *, float *, float *);
int /*<<< orphan*/ system(char *);
void main() {
  float r1, r2;
  float s1, s2;
  scanf("%f%f", &r1, &r2);
  s1 = 3.14159 * r1 * r1;
  s2 = 3.14159 * r2 * r2;
  printf("s1=%f,s2=%f", s1, s2);
  system("pause");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec9(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1050 <scanf@plt>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xea3(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe78(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
lea    0xe5a(%rip),%rdi
call   1040 <printf@plt>
lea    0xe5a(%rip),%rdi
call   1030 <system@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed0(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea9(%rip),%xmm1
movaps %xmm0,%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
movss  (%rsp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm1
lea    0xe88(%rip),%rdi
call   1040 <printf@plt>
lea    0xe88(%rip),%rdi
call   1030 <system@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%f%f\00"
@.str.1 = [12 x i8] c"s1=%f,s2=%f\00"
@.str.2 = [6 x i8] c"pause\00"
define void @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float* %1, float* %2)
%6 = load float, float* %1
%7 = fpext float %6 to double
%8 = fmul double 3.141590e+00, %7
%9 = load float, float* %1
%10 = fpext float %9 to double
%11 = fmul double %8, %10
%12 = fptrunc double %11 to float
store float %12, float* %3
%13 = load float, float* %2
%14 = fpext float %13 to double
%15 = fmul double 3.141590e+00, %14
%16 = load float, float* %2
%17 = fpext float %16 to double
%18 = fmul double %15, %17
%19 = fptrunc double %18 to float
store float %19, float* %4
%20 = load float, float* %3
%21 = load float, float* %4
%22 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), float %20, float %21)
%23 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%f%f\00"
@.str.1 = [12 x i8] c"s1=%f,s2=%f\00"
@.str.2 = [6 x i8] c"pause\00"
define void @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float* %1, float* %2)
%6 = load float, float* %1
%7 = fpext float %6 to double
%8 = fmul double %7, 3.141590e+00
%9 = fmul double %8, %7
%10 = fptrunc double %9 to float
%11 = load float, float* %2
%12 = fpext float %11 to double
%13 = fmul double %12, 3.141590e+00
%14 = fmul double %13, %12
%15 = fptrunc double %14 to float
%16 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), float %10, float %15)
%17 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}