#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);
scalar_t__ scanf(char *, int *, int *, int *, int *);
int tan(double);
int main(void) {
  int w, l, h, theta, isMoreHalfFull;
  double temp, volume, radianTheta;
  while (scanf("%d %d %d %d", &l, &w, &h, &theta) > 0) {
    radianTheta = theta * 3.141592654 / 180;
    if (h - l * tan(radianTheta) > 0)
      isMoreHalfFull = 1;
    else
      isMoreHalfFull = 0;
    if (isMoreHalfFull)
      volume = w * l * (h - l * tan(radianTheta) / 2);
    else
      volume = w * h * h * tan(3.141592654 / 2 - radianTheta) / 2;
    printf("%.3lf mL\n", volume);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1050 <scanf@plt>
cmp    $0x0,%rax
jle    126a <main+0x13a>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xe96(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe82(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1040 <tan@plt>
mov    -0x38(%rbp),%ecx
mov    %eax,%edx
mov    -0x34(%rbp),%eax
imul   %edx,%ecx
sub    %ecx,%eax
cmp    $0x0,%eax
jle    11bf <main+0x8f>
movl   $0x1,-0x18(%rbp)
jmp    11c6 <main+0x96>
movl   $0x0,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     121b <main+0xeb>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x40(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1040 <tan@plt>
mov    -0x44(%rbp),%ecx
mov    %eax,%edx
mov    -0x40(%rbp),%eax
imul   %edx,%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    %eax,%edx
mov    -0x3c(%rbp),%eax
sub    %edx,%ecx
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1254 <main+0x124>
mov    -0x8(%rbp),%eax
imul   -0x10(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x48(%rbp)
movsd  0xddf(%rip),%xmm0
subsd  -0x30(%rbp),%xmm0
call   1040 <tan@plt>
mov    %eax,%ecx
mov    -0x48(%rbp),%eax
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    0xdc4(%rip),%rdi
call   1030 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xed3(%rip),%rdi
lea    0x4(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    %rsp,%rcx
lea    0x8(%rsp),%r8
call   1050 <scanf@plt>
test   %rax,%rax
jle    123e <main+0x10e>
mov    %rsp,%r12
lea    0x8(%rsp),%r13
jmp    11d4 <main+0xa4>
nop
mov    (%rsp),%eax
imul   %eax,%r14d
imul   %eax,%r14d
movsd  0xe8d(%rip),%xmm0
subsd  0x10(%rsp),%xmm0
call   1040 <tan@plt>
imul   %r14d,%eax
mov    %eax,%r15d
shr    $0x1f,%r15d
add    %eax,%r15d
sar    %r15d
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
lea    0xe5e(%rip),%rdi
lea    0x4(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    %r12,%rcx
mov    %r13,%r8
call   1050 <scanf@plt>
test   %rax,%rax
jle    123e <main+0x10e>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x8(%rsp),%xmm0
mulsd  0xe1b(%rip),%xmm0
divsd  0xe1b(%rip),%xmm0
mov    (%rsp),%ebx
mov    0x4(%rsp),%ebp
movsd  %xmm0,0x10(%rsp)
call   1040 <tan@plt>
imul   %ebp,%eax
mov    0xc(%rsp),%r14d
cmp    %eax,%ebx
jle    1170 <main+0x40>
mov    0x4(%rsp),%ebx
imul   %ebx,%r14d
mov    (%rsp),%r15d
movsd  0x10(%rsp),%xmm0
call   1040 <tan@plt>
imul   %ebx,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
sub    %ecx,%r15d
imul   %r14d,%r15d
jmp    119f <main+0x6f>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%d %d %d %d\00"
@.str.1 = [10 x i8] c"%.3lf mL\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
store i32 0, i32* %1
br label %10
10: ; preds = %55, %0
%11 = call i64 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %2, i32* %4, i32* %5)
%12 = icmp sgt i64 %11, 0
br i1 %12, label %13, label %58
13: ; preds = %10
%14 = load i32, i32* %5
%15 = sitofp i32 %14 to double
%16 = fmul double %15, 0x400921FB54524550
%17 = fdiv double %16, 1.800000e+02
store double %17, double* %9
%18 = load i32, i32* %4
%19 = load i32, i32* %3
%20 = load double, double* %9
%21 = call i32 @tan(double %20)
%22 = mul nsw i32 %19, %21
%23 = sub nsw i32 %18, %22
%24 = icmp sgt i32 %23, 0
br i1 %24, label %25, label %26
25: ; preds = %13
store i32 1, i32* %6
br label %27
26: ; preds = %13
store i32 0, i32* %6
br label %27
27: ; preds = %26, %25
%28 = load i32, i32* %6
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %43
30: ; preds = %27
%31 = load i32, i32* %2
%32 = load i32, i32* %3
%33 = mul nsw i32 %31, %32
%34 = load i32, i32* %4
%35 = load i32, i32* %3
%36 = load double, double* %9
%37 = call i32 @tan(double %36)
%38 = mul nsw i32 %35, %37
%39 = sdiv i32 %38, 2
%40 = sub nsw i32 %34, %39
%41 = mul nsw i32 %33, %40
%42 = sitofp i32 %41 to double
store double %42, double* %8
br label %55
43: ; preds = %27
%44 = load i32, i32* %2
%45 = load i32, i32* %4
%46 = mul nsw i32 %44, %45
%47 = load i32, i32* %4
%48 = mul nsw i32 %46, %47
%49 = load double, double* %9
%50 = fsub double 0x3FF921FB54524550, %49
%51 = call i32 @tan(double %50)
%52 = mul nsw i32 %48, %51
%53 = sdiv i32 %52, 2
%54 = sitofp i32 %53 to double
store double %54, double* %8
br label %55
55: ; preds = %43, %30
%56 = load double, double* %8
%57 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %56)
br label %10
58: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d %d %d %d\00"
@.str.1 = [10 x i8] c"%.3lf mL\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i64 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %1, i32* %3, i32* %4)
%10 = icmp sgt i64 %9, 0
br i1 %10, label %11, label %45
11: ; preds = %0, %39
%12 = load i32, i32* %4
%13 = sitofp i32 %12 to double
%14 = fmul double %13, 0x400921FB54524550
%15 = fdiv double %14, 1.800000e+02
%16 = load i32, i32* %3
%17 = load i32, i32* %2
%18 = call i32 @tan(double %15)
%19 = mul nsw i32 %18, %17
%20 = icmp sgt i32 %16, %19
%21 = load i32, i32* %1
br i1 %20, label %22, label %31
22: ; preds = %11
%23 = load i32, i32* %2
%24 = mul nsw i32 %23, %21
%25 = load i32, i32* %3
%26 = call i32 @tan(double %15)
%27 = mul nsw i32 %26, %23
%28 = sdiv i32 %27, -2
%29 = add i32 %28, %25
%30 = mul nsw i32 %24, %29
br label %39
31: ; preds = %11
%32 = load i32, i32* %3
%33 = mul nsw i32 %32, %21
%34 = mul nsw i32 %33, %32
%35 = fsub double 0x3FF921FB54524550, %15
%36 = call i32 @tan(double %35)
%37 = mul nsw i32 %34, %36
%38 = sdiv i32 %37, 2
br label %39
39: ; preds = %31, %22
%40 = phi i32 [ %30, %22 ], [ %38, %31 ]
%41 = sitofp i32 %40 to double
%42 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %41)
%43 = call i64 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %1, i32* %3, i32* %4)
%44 = icmp sgt i64 %43, 0
br i1 %44, label %11, label %45
45: ; preds = %39, %0
ret i32 0
}