#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, float, float, int);
int /*<<< orphan*/ scanf(char *, float *, float *, float *);
int main() {
  float l, b, r;
  scanf("%f %f %f", &l, &b, &r);
  printf("Rectangle\nPerimeter: %f, Area: %f\nCircle\nArea: %f, Circum: %f\n",
         2 * (l + b), l * b, r * r * 3.14, 2 * 3.14 * r);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee5(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1040 <scanf@plt>
movss  -0x4(%rbp),%xmm1
addss  -0x8(%rbp),%xmm1
movss  0xebe(%rip),%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xe8e(%rip),%xmm2
mulsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm3
movsd  0xe6d(%rip),%xmm2
mulsd  %xmm3,%xmm2
cvttsd2si %xmm2,%edx
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
movss  0x14(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
movaps %xmm0,%xmm2
addss  %xmm1,%xmm2
addss  %xmm2,%xmm2
cvttss2si %xmm2,%esi
mulss  %xmm1,%xmm0
movss  0xc(%rsp),%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm1,%xmm2
mulss  %xmm1,%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  0xe85(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
mulsd  0xe81(%rip),%xmm2
cvttsd2si %xmm2,%edx
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%f %f %f\00"
@.str.1 = [63 x i8] c"Rectangle\0APerimeter: %f, Area: %f\0ACircle\0AArea: %f, Circum: %f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float* %1, float* %2, float* %3)
%5 = load float, float* %1
%6 = load float, float* %2
%7 = fadd float %5, %6
%8 = fmul float 2.000000e+00, %7
%9 = fptosi float %8 to i32
%10 = load float, float* %1
%11 = load float, float* %2
%12 = fmul float %10, %11
%13 = load float, float* %3
%14 = load float, float* %3
%15 = fmul float %13, %14
%16 = fpext float %15 to double
%17 = fmul double %16, 3.140000e+00
%18 = fptrunc double %17 to float
%19 = load float, float* %3
%20 = fpext float %19 to double
%21 = fmul double 6.280000e+00, %20
%22 = fptosi double %21 to i32
%23 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0), i32 %9, float %12, float %18, i32 %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%f %f %f\00"
@.str.1 = [63 x i8] c"Rectangle\0APerimeter: %f, Area: %f\0ACircle\0AArea: %f, Circum: %f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float* %1, float* %2, float* %3)
%8 = load float, float* %1
%9 = load float, float* %2
%10 = fadd float %8, %9
%11 = fmul float %10, 2.000000e+00
%12 = fptosi float %11 to i32
%13 = fmul float %8, %9
%14 = load float, float* %3
%15 = fmul float %14, %14
%16 = fpext float %15 to double
%17 = fmul double %16, 3.140000e+00
%18 = fptrunc double %17 to float
%19 = fpext float %14 to double
%20 = fmul double %19, 6.280000e+00
%21 = fptosi double %20 to i32
%22 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0), i32 %12, float %13, float %18, i32 %21)
ret i32 0
}