#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*/ cube(double, double, double, int);
int /*<<< orphan*/ endonion();
int /*<<< orphan*/ endrotate();
int /*<<< orphan*/ endxlate();
int /*<<< orphan*/ gabled_roof(double, double, double);
int /*<<< orphan*/ onion();
int /*<<< orphan*/ rotate(int, int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ xlate(int /*<<< orphan*/, int /*<<< orphan*/, double);
void english_house_end(double width, double wall_height, double wall_thickness,
                       double peak_height, double chimney_height) {
  rotate(90, 0, 0, 1);
  onion();
  xlate(0, 0, wall_height / 2.0);
  cube(width, wall_thickness, wall_height, 1);
  endxlate();
  xlate(0, 0, wall_height * 0.999);
  gabled_roof(wall_thickness, width, peak_height);
  endxlate();
  xlate(0, 0, (wall_height + chimney_height) / 2.0);
  cube(width * 0.20, wall_thickness, wall_height + chimney_height, 1);
  endxlate();
  endonion();
  endrotate();
}


x86 assembly (clang, -O0):
<english_house_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
mov    $0x5a,%edi
xor    %edx,%edx
mov    $0x1,%ecx
mov    %edx,%esi
call   1060 <rotate@plt>
mov    $0x0,%al
call   1050 <onion@plt>
movsd  -0x10(%rbp),%xmm0
movsd  0xe40(%rip),%xmm1
divsd  %xmm1,%xmm0
xor    %esi,%esi
mov    %esi,%edi
call   1030 <xlate@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
mov    $0x1,%edi
call   10a0 <cube@plt>
mov    $0x0,%al
call   1080 <endxlate@plt>
movsd  0xe13(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
xor    %esi,%esi
mov    %esi,%edi
call   1030 <xlate@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1040 <gabled_roof@plt>
mov    $0x0,%al
call   1080 <endxlate@plt>
movsd  -0x10(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  0xdd0(%rip),%xmm1
divsd  %xmm1,%xmm0
xor    %esi,%esi
mov    %esi,%edi
call   1030 <xlate@plt>
movsd  0xdb3(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
addsd  -0x28(%rbp),%xmm2
mov    $0x1,%edi
call   10a0 <cube@plt>
mov    $0x0,%al
call   1080 <endxlate@plt>
mov    $0x0,%al
call   1090 <endonion@plt>
mov    $0x0,%al
call   1070 <endrotate@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<english_house_end>:
sub    $0x28,%rsp
movsd  %xmm4,0x8(%rsp)
movsd  %xmm3,0x20(%rsp)
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,(%rsp)
movsd  %xmm0,0x10(%rsp)
mov    $0x5a,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1,%ecx
call   1060 <rotate@plt>
xor    %eax,%eax
call   1050 <onion@plt>
movsd  (%rsp),%xmm0
mulsd  0xe38(%rip),%xmm0
xor    %edi,%edi
xor    %esi,%esi
call   1030 <xlate@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  (%rsp),%xmm2
mov    $0x1,%edi
call   10a0 <cube@plt>
xor    %eax,%eax
call   1080 <endxlate@plt>
movsd  0xe0d(%rip),%xmm0
mulsd  (%rsp),%xmm0
xor    %edi,%edi
xor    %esi,%esi
call   1030 <xlate@plt>
movsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
call   1040 <gabled_roof@plt>
xor    %eax,%eax
call   1080 <endxlate@plt>
movsd  0x8(%rsp),%xmm1
addsd  (%rsp),%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0xdc0(%rip),%xmm0
mulsd  %xmm1,%xmm0
xor    %edi,%edi
xor    %esi,%esi
call   1030 <xlate@plt>
movsd  0x10(%rsp),%xmm0
mulsd  0xdb5(%rip),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
mov    $0x1,%edi
call   10a0 <cube@plt>
xor    %eax,%eax
call   1080 <endxlate@plt>
xor    %eax,%eax
call   1090 <endonion@plt>
xor    %eax,%eax
add    $0x28,%rsp
jmp    1070 <endrotate@plt>

LLVM IR (-O0):
define void @english_house_end(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%11 = call i32 @rotate(i32 90, i32 0, i32 0, i32 1)
%12 = call i32 (...) @onion()
%13 = load double, double* %7
%14 = fdiv double %13, 2.000000e+00
%15 = call i32 @xlate(i32 0, i32 0, double %14)
%16 = load double, double* %6
%17 = load double, double* %8
%18 = load double, double* %7
%19 = call i32 @cube(double %16, double %17, double %18, i32 1)
%20 = call i32 (...) @endxlate()
%21 = load double, double* %7
%22 = fmul double %21, 0x3FEFF7CED916872B
%23 = call i32 @xlate(i32 0, i32 0, double %22)
%24 = load double, double* %8
%25 = load double, double* %6
%26 = load double, double* %9
%27 = call i32 @gabled_roof(double %24, double %25, double %26)
%28 = call i32 (...) @endxlate()
%29 = load double, double* %7
%30 = load double, double* %10
%31 = fadd double %29, %30
%32 = fdiv double %31, 2.000000e+00
%33 = call i32 @xlate(i32 0, i32 0, double %32)
%34 = load double, double* %6
%35 = fmul double %34, 2.000000e-01
%36 = load double, double* %8
%37 = load double, double* %7
%38 = load double, double* %10
%39 = fadd double %37, %38
%40 = call i32 @cube(double %35, double %36, double %39, i32 1)
%41 = call i32 (...) @endxlate()
%42 = call i32 (...) @endonion()
%43 = call i32 (...) @endrotate()
ret void
}

LLVM IR (-O2):
define void @english_house_end(double %0, double %1, double %2, double %3, double %4) {
%6 = tail call i32 @rotate(i32 90, i32 0, i32 0, i32 1)
%7 = tail call i32 (...) @onion()
%8 = fmul double %1, 5.000000e-01
%9 = tail call i32 @xlate(i32 0, i32 0, double %8)
%10 = tail call i32 @cube(double %0, double %2, double %1, i32 1)
%11 = tail call i32 (...) @endxlate()
%12 = fmul double %1, 0x3FEFF7CED916872B
%13 = tail call i32 @xlate(i32 0, i32 0, double %12)
%14 = tail call i32 @gabled_roof(double %2, double %0, double %3)
%15 = tail call i32 (...) @endxlate()
%16 = fadd double %1, %4
%17 = fmul double %16, 5.000000e-01
%18 = tail call i32 @xlate(i32 0, i32 0, double %17)
%19 = fmul double %0, 2.000000e-01
%20 = tail call i32 @cube(double %19, double %2, double %16, i32 1)
%21 = tail call i32 (...) @endxlate()
%22 = tail call i32 (...) @endonion()
%23 = tail call i32 (...) @endrotate()
ret void
}