#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*/ angular_cylinder(double, double, double, double);
int /*<<< orphan*/ diff();
int /*<<< orphan*/ enddiff();
int /*<<< orphan*/ endxlate();
int /*<<< orphan*/ xlate(int /*<<< orphan*/, int /*<<< orphan*/, double);
void hollow_angular_cylinder(double h, double r1, double r2, double fa) {
  if (r1 >= 5 && r2 >= 5) {
    diff();
    angular_cylinder(h, r1, r2, fa);
    xlate(0, 0, -h * 0.30);
    angular_cylinder(h * 0.8, r1 * 0.7, r2 * 0.7, fa);
    endxlate();
    xlate(0, 0, h * 0.45);
    angular_cylinder(h * 0.35, r2 * 0.75, r2 * 0.1, fa);
    endxlate();
    enddiff();
  } else {
    angular_cylinder(h, r1, r2, fa);
  }
}


x86 assembly (clang, -O0):
<hollow_angular_cylinder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe87(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     127d <hollow_angular_cylinder+0x12d>
movsd  -0x18(%rbp),%xmm0
movsd  0xe70(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     127d <hollow_angular_cylinder+0x12d>
mov    $0x0,%al
call   1070 <diff@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1040 <angular_cylinder@plt>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe5a(%rip),%xmm1
mulsd  %xmm1,%xmm0
xor    %esi,%esi
mov    %esi,%edi
call   1030 <xlate@plt>
movsd  0xe3d(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xe28(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xe1b(%rip),%xmm2
mulsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1040 <angular_cylinder@plt>
mov    $0x0,%al
call   1060 <endxlate@plt>
movsd  0xdf5(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
xor    %esi,%esi
mov    %esi,%edi
call   1030 <xlate@plt>
movsd  0xdd7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xdc2(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  0xdad(%rip),%xmm2
mulsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1040 <angular_cylinder@plt>
mov    $0x0,%al
call   1060 <endxlate@plt>
mov    $0x0,%al
call   1050 <enddiff@plt>
jmp    1296 <hollow_angular_cylinder+0x146>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1040 <angular_cylinder@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hollow_angular_cylinder>:
sub    $0x28,%rsp
ucomisd 0xea4(%rip),%xmm1
jb     1257 <hollow_angular_cylinder+0x107>
ucomisd 0xe96(%rip),%xmm2
jb     1257 <hollow_angular_cylinder+0x107>
xor    %eax,%eax
movsd  %xmm3,0x18(%rsp)
movsd  %xmm2,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
movsd  %xmm1,0x20(%rsp)
call   1070 <diff@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x18(%rsp),%xmm3
call   1040 <angular_cylinder@plt>
movsd  0xe54(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
xor    %edi,%edi
xor    %esi,%esi
call   1030 <xlate@plt>
movsd  0xe45(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  0xe3f(%rip),%xmm2
movsd  0x20(%rsp),%xmm1
mulsd  %xmm2,%xmm1
mulsd  0x10(%rsp),%xmm2
movsd  0x18(%rsp),%xmm3
call   1040 <angular_cylinder@plt>
xor    %eax,%eax
call   1060 <endxlate@plt>
movsd  0xe1d(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
xor    %edi,%edi
xor    %esi,%esi
call   1030 <xlate@plt>
movsd  0x8(%rsp),%xmm0
mulsd  0xe08(%rip),%xmm0
movsd  0xe08(%rip),%xmm1
movsd  0x10(%rsp),%xmm2
mulsd  %xmm2,%xmm1
mulsd  0xdfe(%rip),%xmm2
movsd  0x18(%rsp),%xmm3
call   1040 <angular_cylinder@plt>
xor    %eax,%eax
call   1060 <endxlate@plt>
xor    %eax,%eax
add    $0x28,%rsp
jmp    1050 <enddiff@plt>
add    $0x28,%rsp
jmp    1040 <angular_cylinder@plt>

LLVM IR (-O0):
define void @hollow_angular_cylinder(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %6
%10 = fcmp oge double %9, 5.000000e+00
br i1 %10, label %11, label %47
11: ; preds = %4
%12 = load double, double* %7
%13 = fcmp oge double %12, 5.000000e+00
br i1 %13, label %14, label %47
14: ; preds = %11
%15 = call i32 (...) @diff()
%16 = load double, double* %5
%17 = load double, double* %6
%18 = load double, double* %7
%19 = load double, double* %8
%20 = call i32 @angular_cylinder(double %16, double %17, double %18, double %19)
%21 = load double, double* %5
%22 = fneg double %21
%23 = fmul double %22, 3.000000e-01
%24 = call i32 @xlate(i32 0, i32 0, double %23)
%25 = load double, double* %5
%26 = fmul double %25, 8.000000e-01
%27 = load double, double* %6
%28 = fmul double %27, 0x3FE6666666666666
%29 = load double, double* %7
%30 = fmul double %29, 0x3FE6666666666666
%31 = load double, double* %8
%32 = call i32 @angular_cylinder(double %26, double %28, double %30, double %31)
%33 = call i32 (...) @endxlate()
%34 = load double, double* %5
%35 = fmul double %34, 4.500000e-01
%36 = call i32 @xlate(i32 0, i32 0, double %35)
%37 = load double, double* %5
%38 = fmul double %37, 3.500000e-01
%39 = load double, double* %7
%40 = fmul double %39, 7.500000e-01
%41 = load double, double* %7
%42 = fmul double %41, 1.000000e-01
%43 = load double, double* %8
%44 = call i32 @angular_cylinder(double %38, double %40, double %42, double %43)
%45 = call i32 (...) @endxlate()
%46 = call i32 (...) @enddiff()
br label %53
47: ; preds = %11, %4
%48 = load double, double* %5
%49 = load double, double* %6
%50 = load double, double* %7
%51 = load double, double* %8
%52 = call i32 @angular_cylinder(double %48, double %49, double %50, double %51)
br label %53
53: ; preds = %47, %14
ret void
}

LLVM IR (-O2):
define void @hollow_angular_cylinder(double %0, double %1, double %2, double %3) {
%5 = fcmp oge double %1, 5.000000e+00
%6 = fcmp oge double %2, 5.000000e+00
%7 = and i1 %5, %6
br i1 %7, label %8, label %26
8: ; preds = %4
%9 = tail call i32 (...) @diff()
%10 = tail call i32 @angular_cylinder(double %0, double %1, double %2, double %3)
%11 = fmul double %0, -3.000000e-01
%12 = tail call i32 @xlate(i32 0, i32 0, double %11)
%13 = fmul double %0, 8.000000e-01
%14 = fmul double %1, 0x3FE6666666666666
%15 = fmul double %2, 0x3FE6666666666666
%16 = tail call i32 @angular_cylinder(double %13, double %14, double %15, double %3)
%17 = tail call i32 (...) @endxlate()
%18 = fmul double %0, 4.500000e-01
%19 = tail call i32 @xlate(i32 0, i32 0, double %18)
%20 = fmul double %0, 3.500000e-01
%21 = fmul double %2, 7.500000e-01
%22 = fmul double %2, 1.000000e-01
%23 = tail call i32 @angular_cylinder(double %20, double %21, double %22, double %3)
%24 = tail call i32 (...) @endxlate()
%25 = tail call i32 (...) @enddiff()
br label %28
26: ; preds = %4
%27 = tail call i32 @angular_cylinder(double %0, double %1, double %2, double %3)
br label %28
28: ; preds = %26, %8
ret void
}