#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*/ cylinder(double, double, double);
int /*<<< orphan*/ diff();
int /*<<< orphan*/ enddiff();
int /*<<< orphan*/ endrotate();
int /*<<< orphan*/ endxlate();
int /*<<< orphan*/ rotate(double, int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ xlate(double, int /*<<< orphan*/, double);
void pentacolumn(double r, double h) {
  int i;
  double zt;
  diff();
  cylinder(h, r, r);
  cylinder(h, r, r * 0.8);
  enddiff();
  if (r * 0.4 > 3.825) {
    zt = h / r * 40;
    for (i = 0; i < 5; i++) {
      rotate((360.0 / 5) * i, 0, 0, 1);
      xlate(r, 0, zt);
      pentacolumn(r * 0.4, h * 1.3 - zt);
      endxlate();
      endrotate();
    }
  }
}


x86 assembly (clang, -O0):
<pentacolumn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    $0x0,%al
call   10a0 <diff@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
call   1030 <cylinder@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xe51(%rip),%xmm2
mulsd  -0x8(%rbp),%xmm2
call   1030 <cylinder@plt>
mov    $0x0,%al
call   1060 <enddiff@plt>
movsd  0xe30(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xe1b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12af <pentacolumn+0x12f>
movsd  -0x10(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
movsd  0xe17(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jge    12aa <pentacolumn+0x12a>
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  0xe00(%rip),%xmm0
mulsd  %xmm1,%xmm0
xor    %esi,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   1070 <rotate@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
xor    %edi,%edi
call   1040 <xlate@plt>
movsd  0xdb5(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
movsd  0xd9f(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
call   1050 <pentacolumn@plt>
mov    $0x0,%al
call   1090 <endxlate@plt>
mov    $0x0,%al
call   1080 <endrotate@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1211 <pentacolumn+0x91>
jmp    12af <pentacolumn+0x12f>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pentacolumn>:
sub    $0x28,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
xor    %eax,%eax
call   10a0 <diff@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movaps %xmm1,%xmm2
call   1030 <cylinder@plt>
movsd  0xe4d(%rip),%xmm2
movsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm2
movsd  0x8(%rsp),%xmm0
call   1030 <cylinder@plt>
xor    %eax,%eax
call   1060 <enddiff@plt>
movsd  0xe31(%rip),%xmm1
movsd  0x10(%rsp),%xmm2
mulsd  %xmm2,%xmm1
ucomisd 0xe27(%rip),%xmm1
jbe    138f <pentacolumn+0x20f>
movapd %xmm2,%xmm0
movsd  0x8(%rsp),%xmm2
movapd %xmm2,%xmm3
divsd  %xmm0,%xmm3
mulsd  0xe0f(%rip),%xmm3
movsd  %xmm3,0x20(%rsp)
mulsd  0xe09(%rip),%xmm2
subsd  %xmm3,%xmm2
movsd  %xmm2,0x8(%rsp)
xorpd  %xmm0,%xmm0
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
movsd  %xmm1,0x18(%rsp)
call   1070 <rotate@plt>
movsd  0x10(%rsp),%xmm0
xor    %edi,%edi
movsd  0x20(%rsp),%xmm1
call   1040 <xlate@plt>
movsd  0x18(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1050 <pentacolumn@plt>
xor    %eax,%eax
call   1090 <endxlate@plt>
xor    %eax,%eax
call   1080 <endrotate@plt>
movsd  0xdb5(%rip),%xmm0
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1070 <rotate@plt>
movsd  0x10(%rsp),%xmm0
xor    %edi,%edi
movsd  0x20(%rsp),%xmm1
call   1040 <xlate@plt>
movsd  0x18(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1050 <pentacolumn@plt>
xor    %eax,%eax
call   1090 <endxlate@plt>
xor    %eax,%eax
call   1080 <endrotate@plt>
movsd  0xd75(%rip),%xmm0
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1070 <rotate@plt>
movsd  0x10(%rsp),%xmm0
xor    %edi,%edi
movsd  0x20(%rsp),%xmm1
call   1040 <xlate@plt>
movsd  0x18(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1050 <pentacolumn@plt>
xor    %eax,%eax
call   1090 <endxlate@plt>
xor    %eax,%eax
call   1080 <endrotate@plt>
movsd  0xd35(%rip),%xmm0
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1070 <rotate@plt>
movsd  0x10(%rsp),%xmm0
xor    %edi,%edi
movsd  0x20(%rsp),%xmm1
call   1040 <xlate@plt>
movsd  0x18(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1050 <pentacolumn@plt>
xor    %eax,%eax
call   1090 <endxlate@plt>
xor    %eax,%eax
call   1080 <endrotate@plt>
movsd  0xcf5(%rip),%xmm0
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1070 <rotate@plt>
movsd  0x10(%rsp),%xmm0
xor    %edi,%edi
movsd  0x20(%rsp),%xmm1
call   1040 <xlate@plt>
movsd  0x18(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1050 <pentacolumn@plt>
xor    %eax,%eax
call   1090 <endxlate@plt>
xor    %eax,%eax
add    $0x28,%rsp
jmp    1080 <endrotate@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define void @pentacolumn(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
%7 = call i32 (...) @diff()
%8 = load double, double* %4
%9 = load double, double* %3
%10 = load double, double* %3
%11 = call i32 @cylinder(double %8, double %9, double %10)
%12 = load double, double* %4
%13 = load double, double* %3
%14 = load double, double* %3
%15 = fmul double %14, 8.000000e-01
%16 = call i32 @cylinder(double %12, double %13, double %15)
%17 = call i32 (...) @enddiff()
%18 = load double, double* %3
%19 = fmul double %18, 4.000000e-01
%20 = fcmp ogt double %19, 3.825000e+00
br i1 %20, label %21, label %49
21: ; preds = %2
%22 = load double, double* %4
%23 = load double, double* %3
%24 = fdiv double %22, %23
%25 = fmul double %24, 4.000000e+01
store double %25, double* %6
store i32 0, i32* %5
br label %26
26: ; preds = %45, %21
%27 = load i32, i32* %5
%28 = icmp slt i32 %27, 5
br i1 %28, label %29, label %48
29: ; preds = %26
%30 = load i32, i32* %5
%31 = sitofp i32 %30 to double
%32 = fmul double 7.200000e+01, %31
%33 = call i32 @rotate(double %32, i32 0, i32 0, i32 1)
%34 = load double, double* %3
%35 = load double, double* %6
%36 = call i32 @xlate(double %34, i32 0, double %35)
%37 = load double, double* %3
%38 = fmul double %37, 4.000000e-01
%39 = load double, double* %4
%40 = load double, double* %6
%41 = fneg double %40
%42 = call double @llvm.fmuladd.f64(double %39, double 1.300000e+00, double %41)
%43 = call i32 (...) @endxlate()
%44 = call i32 (...) @endrotate()
br label %45
45: ; preds = %29
%46 = load i32, i32* %5
%47 = add nsw i32 %46, 1
store i32 %47, i32* %5
br label %26
48: ; preds = %26
br label %49
49: ; preds = %48, %2
ret void
}

LLVM IR (-O2):
define void @pentacolumn(double %0, double %1) {
%3 = tail call i32 (...) @diff()
%4 = tail call i32 @cylinder(double %1, double %0, double %0)
%5 = fmul double %0, 8.000000e-01
%6 = tail call i32 @cylinder(double %1, double %0, double %5)
%7 = tail call i32 (...) @enddiff()
%8 = fmul double %0, 4.000000e-01
%9 = fcmp ogt double %8, 3.825000e+00
br i1 %9, label %10, label %35
10: ; preds = %2
%11 = fdiv double %1, %0
%12 = fmul double %11, 4.000000e+01
%13 = fneg double %12
%14 = tail call double @llvm.fmuladd.f64(double %1, double 1.300000e+00, double %13)
%15 = tail call i32 @rotate(double 0.000000e+00, i32 0, i32 0, i32 1)
%16 = tail call i32 @xlate(double %0, i32 0, double %12)
tail call void @pentacolumn(double %8, double %14)
%17 = tail call i32 (...) @endxlate()
%18 = tail call i32 (...) @endrotate()
%19 = tail call i32 @rotate(double 7.200000e+01, i32 0, i32 0, i32 1)
%20 = tail call i32 @xlate(double %0, i32 0, double %12)
tail call void @pentacolumn(double %8, double %14)
%21 = tail call i32 (...) @endxlate()
%22 = tail call i32 (...) @endrotate()
%23 = tail call i32 @rotate(double 1.440000e+02, i32 0, i32 0, i32 1)
%24 = tail call i32 @xlate(double %0, i32 0, double %12)
tail call void @pentacolumn(double %8, double %14)
%25 = tail call i32 (...) @endxlate()
%26 = tail call i32 (...) @endrotate()
%27 = tail call i32 @rotate(double 2.160000e+02, i32 0, i32 0, i32 1)
%28 = tail call i32 @xlate(double %0, i32 0, double %12)
tail call void @pentacolumn(double %8, double %14)
%29 = tail call i32 (...) @endxlate()
%30 = tail call i32 (...) @endrotate()
%31 = tail call i32 @rotate(double 2.880000e+02, i32 0, i32 0, i32 1)
%32 = tail call i32 @xlate(double %0, i32 0, double %12)
tail call void @pentacolumn(double %8, double %14)
%33 = tail call i32 (...) @endxlate()
%34 = tail call i32 (...) @endrotate()
br label %35
35: ; preds = %10, %2
ret void
}