#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 */
double circularArea(double);
int /*<<< orphan*/ printChars();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  double radius = 1.0, area = 0.0;
  printf(" Areas of Circles\n\n");
  printf(" Radius Area\n"
         "-------------------------\n");
  area = circularArea(radius);
  printf("%10.1f %10.2f\n", radius, area);
  radius = 5.0;
  area = circularArea(radius);
  printf("%10.1f %10.2f\n", radius, area);
  printChars();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
call   1040 <circularArea@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xebc(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe61(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <circularArea@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xe88(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <printChars@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed7(%rip),%rdi
call   1030 <puts@plt>
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
movsd  0xe9f(%rip),%xmm0
call   1050 <circularArea@plt>
movaps %xmm0,%xmm1
lea    0xea0(%rip),%rbx
mov    %rbx,%rdi
movsd  0xe85(%rip),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe7e(%rip),%xmm0
call   1050 <circularArea@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xe6b(%rip),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <printChars@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c" Areas of Circles\0A\0A\00"
@.str.1 = [40 x i8] c" Radius Area\0A-------------------------\0A\00"
@.str.2 = [15 x i8] c"%10.1f %10.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
store double 1.000000e+00, double* %2
store double 0.000000e+00, double* %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%6 = load double, double* %2
%7 = call double @circularArea(double %6)
store double %7, double* %3
%8 = load double, double* %2
%9 = load double, double* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double %8, double %9)
store double 5.000000e+00, double* %2
%11 = load double, double* %2
%12 = call double @circularArea(double %11)
store double %12, double* %3
%13 = load double, double* %2
%14 = load double, double* %3
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double %13, double %14)
%16 = call i32 (...) @printChars()
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [15 x i8] c"%10.1f %10.2f\0A\00"
@str = [19 x i8] c" Areas of Circles\0A\00"
@str.3 = [39 x i8] c" Radius Area\0A-------------------------\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.3, i64 0, i64 0))
%3 = tail call double @circularArea(double 1.000000e+00)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double 1.000000e+00, double %3)
%5 = tail call double @circularArea(double 5.000000e+00)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), double 5.000000e+00, double %5)
%7 = tail call i32 (...) @printChars()
ret i32 0
}