#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 *, double, double, double);
int main(void) {
  double area(double r);
  double circumference(double r);
  double volume(double r);
  printf("radius = 1: %.4f    %.4f    %.4f\n", area(1.0), circumference(1.0),
         volume(1.0));
  printf("radius = 4.98: %.4f    %.4f    %.4f\n", area(4.98),
         circumference(4.98), volume(4.98));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xeb1(%rip),%xmm0
call   1050 <area@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  0xe9f(%rip),%xmm0
call   1060 <circumference@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  0xe8d(%rip),%xmm0
call   1030 <volume@plt>
movsd  -0x28(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x20(%rbp),%xmm0
lea    0xe7c(%rip),%rdi
call   1040 <printf@plt>
movsd  0xe5f(%rip),%xmm0
call   1050 <area@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xe4d(%rip),%xmm0
call   1060 <circumference@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  0xe3b(%rip),%xmm0
call   1030 <volume@plt>
movsd  -0x18(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x10(%rbp),%xmm0
lea    0xe54(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movsd  0xeb4(%rip),%xmm0
call   1050 <area@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0xea1(%rip),%xmm0
call   1060 <circumference@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0xe8e(%rip),%xmm0
call   1030 <volume@plt>
movaps %xmm0,%xmm2
lea    0xe8f(%rip),%rdi
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1040 <printf@plt>
movsd  0xe6e(%rip),%xmm0
call   1050 <area@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0xe5b(%rip),%xmm0
call   1060 <circumference@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0xe48(%rip),%xmm0
call   1030 <volume@plt>
movaps %xmm0,%xmm2
lea    0xe63(%rip),%rdi
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [34 x i8] c"radius = 1: %.4f %.4f %.4f\0A\00"
@.str.1 = [37 x i8] c"radius = 4.98: %.4f %.4f %.4f\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call double @area(double 1.000000e+00)
%3 = call double @circumference(double 1.000000e+00)
%4 = call double @volume(double 1.000000e+00)
%5 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), double %2, double %3, double %4)
%6 = call double @area(double 4.980000e+00)
%7 = call double @circumference(double 4.980000e+00)
%8 = call double @volume(double 4.980000e+00)
%9 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), double %6, double %7, double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"radius = 1: %.4f %.4f %.4f\0A\00"
@.str.1 = [37 x i8] c"radius = 4.98: %.4f %.4f %.4f\0A\00"
define i32 @main() {
%1 = tail call double @area(double 1.000000e+00)
%2 = tail call double @circumference(double 1.000000e+00)
%3 = tail call double @volume(double 1.000000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), double %1, double %2, double %3)
%5 = tail call double @area(double 4.980000e+00)
%6 = tail call double @circumference(double 4.980000e+00)
%7 = tail call double @volume(double 4.980000e+00)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), double %5, double %6, double %7)
ret i32 0
}