#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 */
float atan(double);
int /*<<< orphan*/ printf(char *, int, float);
int main(int argc, char *argv[]) {
  double r = 10;
  printf("%f\n%f\n", 4 / 3 * atan(1.0) * 4.0 * r * r * r,
         4.0f / 3.0f * atan(1.0) * 4.0 * r * r * r);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xed2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xebd(%rip),%xmm0
call   1040 <atan@plt>
movaps %xmm0,%xmm1
movss  0xec1(%rip),%xmm0
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe95(%rip),%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x1c(%rbp)
movsd  0xe7b(%rip),%xmm0
call   1040 <atan@plt>
mov    -0x1c(%rbp),%esi
movaps %xmm0,%xmm1
movss  0xe78(%rip),%xmm0
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe50(%rip),%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xe52(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
movsd  0xed7(%rip),%xmm0
call   1040 <atan@plt>
cvtss2sd %xmm0,%xmm0
mulsd  0xece(%rip),%xmm0
movsd  0xece(%rip),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ebx
movsd  0xea6(%rip),%xmm0
call   1040 <atan@plt>
mulss  0xeb1(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xe95(%rip),%xmm0
movsd  0xe95(%rip),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xe8a(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%f\0A%f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 1.000000e+01, double* %6
%7 = call float @atan(double 1.000000e+00)
%8 = fmul float 1.000000e+00, %7
%9 = fpext float %8 to double
%10 = fmul double %9, 4.000000e+00
%11 = load double, double* %6
%12 = fmul double %10, %11
%13 = load double, double* %6
%14 = fmul double %12, %13
%15 = load double, double* %6
%16 = fmul double %14, %15
%17 = fptosi double %16 to i32
%18 = call float @atan(double 1.000000e+00)
%19 = fmul float 0x3FF5555560000000, %18
%20 = fpext float %19 to double
%21 = fmul double %20, 4.000000e+00
%22 = load double, double* %6
%23 = fmul double %21, %22
%24 = load double, double* %6
%25 = fmul double %23, %24
%26 = load double, double* %6
%27 = fmul double %25, %26
%28 = fptrunc double %27 to float
%29 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %17, float %28)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%f\0A%f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call float @atan(double 1.000000e+00)
%4 = fpext float %3 to double
%5 = fmul double %4, 4.000000e+00
%6 = fmul double %5, 1.000000e+01
%7 = fmul double %6, 1.000000e+01
%8 = fmul double %7, 1.000000e+01
%9 = fptosi double %8 to i32
%10 = tail call float @atan(double 1.000000e+00)
%11 = fmul float %10, 0x3FF5555560000000
%12 = fpext float %11 to double
%13 = fmul double %12, 4.000000e+00
%14 = fmul double %13, 1.000000e+01
%15 = fmul double %14, 1.000000e+01
%16 = fmul double %15, 1.000000e+01
%17 = fptrunc double %16 to float
%18 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %9, float %17)
ret i32 0
}