#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;
  const float PI = 3.14;
  scanf("%f%f", &r1, &r2);
  s1 = PI * r1 * r1;
  s2 = PI * r2 * r2;
  printf("s1=%f,s2=%f\n", s1, s2);
  system("pause");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  0xec0(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
lea    0xeb8(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1050 <scanf@plt>
movss  0xe9f(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xe88(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
lea    0xe71(%rip),%rdi
call   1040 <printf@plt>
lea    0xe72(%rip),%rdi
call   1030 <system@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xecc(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm2
movss  0xead(%rip),%xmm1
movaps %xmm2,%xmm0
mulss  %xmm1,%xmm0
mulss  %xmm2,%xmm0
movss  (%rsp),%xmm2
mulss  %xmm2,%xmm1
mulss  %xmm2,%xmm1
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
lea    0xe98(%rip),%rdi
call   1030 <system@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%f%f\00"
@.str.1 = [13 x i8] c"s1=%f,s2=%f\0A\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 = alloca float
store float 0x40091EB860000000, float* %5
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float* %1, float* %2)
%7 = load float, float* %1
%8 = fmul float 0x40091EB860000000, %7
%9 = load float, float* %1
%10 = fmul float %8, %9
store float %10, float* %3
%11 = load float, float* %2
%12 = fmul float 0x40091EB860000000, %11
%13 = load float, float* %2
%14 = fmul float %12, %13
store float %14, float* %4
%15 = load float, float* %3
%16 = load float, float* %4
%17 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), float %15, float %16)
%18 = 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 = [13 x i8] c"s1=%f,s2=%f\0A\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 = fmul float %6, 0x40091EB860000000
%8 = fmul float %6, %7
%9 = load float, float* %2
%10 = fmul float %9, 0x40091EB860000000
%11 = fmul float %9, %10
%12 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), float %8, float %11)
%13 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}