#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*/ diff();
int /*<<< orphan*/ enddiff();
int /*<<< orphan*/ endonion();
int /*<<< orphan*/ endrotate();
int /*<<< orphan*/ endxlate();
int /*<<< orphan*/ english_house_end(double, double, double, double, double);
int /*<<< orphan*/ gabled_roof(double, double, double);
int /*<<< orphan*/ gothic_arch_array(double, double, double, double, int);
int /*<<< orphan*/ gothic_hall(double, double, double, int /*<<< orphan*/, int,
                               double, int /*<<< orphan*/);
int /*<<< orphan*/ onion();
int /*<<< orphan*/ rotate(int, int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ xlate(double, int /*<<< orphan*/, double);
void english_house(double width, double length, double height, double peak) {
  double wall_thickness = width * 0.1;
  if (wall_thickness < 5.0)
    wall_thickness = 5.0;
  diff();
  onion();
  gothic_hall(length * 1.05, width, height, 0, 1, wall_thickness, 0);
  xlate(-length / 2.05, 0, 0);
  english_house_end(width, height * 1.3, wall_thickness, peak, peak * 1.2);
  endxlate();
  xlate(length / 2.05, 0, 0);
  english_house_end(width, height * 1.3, wall_thickness, peak, peak * 1.2);
  endxlate();
  xlate(0, 0, height * 1.15);
  rotate(90, 0, 0, 1);
  gabled_roof(length, width, peak);
  endrotate();
  endxlate();
  endonion();
  xlate(0, 0, height * 0.5);
  gothic_arch_array(length, width * 2, height * 0.60, length * 0.1, 4);
  endxlate();
  enddiff();
}


x86 assembly (clang, -O0):
<english_house>:
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  0xe24(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe0a(%rip),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    120e <english_house+0x4e>
movsd  0xdf7(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    $0x0,%al
call   10e0 <diff@plt>
mov    $0x0,%al
call   1060 <onion@plt>
movsd  0xe24(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
xor    %edx,%edx
mov    $0x1,%esi
mov    %edx,%edi
call   1030 <gothic_hall@plt>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xdd6(%rip),%xmm1
divsd  %xmm1,%xmm0
xor    %edi,%edi
xorps  %xmm1,%xmm1
call   1040 <xlate@plt>
movsd  -0x8(%rbp),%xmm0
movsd  0xdb3(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  0xd94(%rip),%xmm4
mulsd  -0x20(%rbp),%xmm4
call   1080 <english_house_end@plt>
mov    $0x0,%al
call   10c0 <endxlate@plt>
movsd  -0x10(%rbp),%xmm0
movsd  0xd86(%rip),%xmm1
divsd  %xmm1,%xmm0
xor    %edi,%edi
xorps  %xmm1,%xmm1
call   1040 <xlate@plt>
movsd  -0x8(%rbp),%xmm0
movsd  0xd63(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  0xd44(%rip),%xmm4
mulsd  -0x20(%rbp),%xmm4
call   1080 <english_house_end@plt>
mov    $0x0,%al
call   10c0 <endxlate@plt>
movsd  0xd23(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
xorps  %xmm0,%xmm0
xor    %edi,%edi
call   1040 <xlate@plt>
mov    $0x5a,%edi
xor    %edx,%edx
mov    $0x1,%ecx
mov    %edx,%esi
call   10a0 <rotate@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1050 <gabled_roof@plt>
mov    $0x0,%al
call   10b0 <endrotate@plt>
mov    $0x0,%al
call   10c0 <endxlate@plt>
mov    $0x0,%al
call   10d0 <endonion@plt>
movsd  0xcc8(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
xorps  %xmm0,%xmm0
xor    %edi,%edi
call   1040 <xlate@plt>
movsd  -0x10(%rbp),%xmm0
movsd  0xca4(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xc8f(%rip),%xmm2
mulsd  -0x18(%rbp),%xmm2
movsd  0xc7a(%rip),%xmm3
mulsd  -0x10(%rbp),%xmm3
mov    $0x4,%edi
call   1090 <gothic_arch_array@plt>
mov    $0x0,%al
call   10c0 <endxlate@plt>
mov    $0x0,%al
call   1070 <enddiff@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<english_house>:
sub    $0x38,%rsp
movsd  %xmm3,0x18(%rsp)
movsd  %xmm2,0x8(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,(%rsp)
movapd %xmm0,%xmm2
mulsd  0xe19(%rip),%xmm2
movsd  0xe19(%rip),%xmm0
maxsd  %xmm2,%xmm0
movsd  %xmm0,0x20(%rsp)
xor    %eax,%eax
call   10e0 <diff@plt>
xor    %eax,%eax
call   1060 <onion@plt>
movsd  0xe01(%rip),%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  (%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
xor    %edi,%edi
mov    $0x1,%esi
movsd  0x20(%rsp),%xmm3
xor    %edx,%edx
call   1030 <gothic_hall@plt>
movsd  0x10(%rsp),%xmm0
divsd  0xdd6(%rip),%xmm0
xorps  %xmm1,%xmm1
xor    %edi,%edi
call   1040 <xlate@plt>
movsd  0xdcc(%rip),%xmm1
mulsd  0x8(%rsp),%xmm1
movsd  %xmm1,0x30(%rsp)
movsd  0xdc0(%rip),%xmm4
movsd  0x18(%rsp),%xmm3
mulsd  %xmm3,%xmm4
movsd  %xmm4,0x28(%rsp)
movsd  (%rsp),%xmm0
movsd  0x20(%rsp),%xmm2
call   1080 <english_house_end@plt>
xor    %eax,%eax
call   10c0 <endxlate@plt>
movsd  0x10(%rsp),%xmm0
divsd  0xd93(%rip),%xmm0
xorpd  %xmm1,%xmm1
xor    %edi,%edi
call   1040 <xlate@plt>
movsd  (%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
movsd  0x18(%rsp),%xmm3
movsd  0x28(%rsp),%xmm4
call   1080 <english_house_end@plt>
xor    %eax,%eax
call   10c0 <endxlate@plt>
movsd  0xd5f(%rip),%xmm1
mulsd  0x8(%rsp),%xmm1
xorps  %xmm0,%xmm0
xor    %edi,%edi
call   1040 <xlate@plt>
mov    $0x5a,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1,%ecx
call   10a0 <rotate@plt>
movsd  0x10(%rsp),%xmm0
movsd  (%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
call   1050 <gabled_roof@plt>
xor    %eax,%eax
call   10b0 <endrotate@plt>
xor    %eax,%eax
call   10c0 <endxlate@plt>
xor    %eax,%eax
call   10d0 <endonion@plt>
movsd  0xd11(%rip),%xmm1
mulsd  0x8(%rsp),%xmm1
xorps  %xmm0,%xmm0
xor    %edi,%edi
call   1040 <xlate@plt>
movsd  (%rsp),%xmm1
addsd  %xmm1,%xmm1
movsd  0x8(%rsp),%xmm2
mulsd  0xcf2(%rip),%xmm2
movsd  0x10(%rsp),%xmm0
movsd  0xc9c(%rip),%xmm3
mulsd  %xmm0,%xmm3
mov    $0x4,%edi
call   1090 <gothic_arch_array@plt>
xor    %eax,%eax
call   10c0 <endxlate@plt>
xor    %eax,%eax
add    $0x38,%rsp
jmp    1070 <enddiff@plt>

LLVM IR (-O0):
define void @english_house(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%10 = load double, double* %5
%11 = fmul double %10, 1.000000e-01
store double %11, double* %9
%12 = load double, double* %9
%13 = fcmp olt double %12, 5.000000e+00
br i1 %13, label %14, label %15
14: ; preds = %4
store double 5.000000e+00, double* %9
br label %15
15: ; preds = %14, %4
%16 = call i32 (...) @diff()
%17 = call i32 (...) @onion()
%18 = load double, double* %6
%19 = fmul double %18, 1.050000e+00
%20 = load double, double* %5
%21 = load double, double* %7
%22 = load double, double* %9
%23 = call i32 @gothic_hall(double %19, double %20, double %21, i32 0, i32 1, double %22, i32 0)
%24 = load double, double* %6
%25 = fneg double %24
%26 = fdiv double %25, 2.050000e+00
%27 = call i32 @xlate(double %26, i32 0, double 0.000000e+00)
%28 = load double, double* %5
%29 = load double, double* %7
%30 = fmul double %29, 1.300000e+00
%31 = load double, double* %9
%32 = load double, double* %8
%33 = load double, double* %8
%34 = fmul double %33, 1.200000e+00
%35 = call i32 @english_house_end(double %28, double %30, double %31, double %32, double %34)
%36 = call i32 (...) @endxlate()
%37 = load double, double* %6
%38 = fdiv double %37, 2.050000e+00
%39 = call i32 @xlate(double %38, i32 0, double 0.000000e+00)
%40 = load double, double* %5
%41 = load double, double* %7
%42 = fmul double %41, 1.300000e+00
%43 = load double, double* %9
%44 = load double, double* %8
%45 = load double, double* %8
%46 = fmul double %45, 1.200000e+00
%47 = call i32 @english_house_end(double %40, double %42, double %43, double %44, double %46)
%48 = call i32 (...) @endxlate()
%49 = load double, double* %7
%50 = fmul double %49, 1.150000e+00
%51 = call i32 @xlate(double 0.000000e+00, i32 0, double %50)
%52 = call i32 @rotate(i32 90, i32 0, i32 0, i32 1)
%53 = load double, double* %6
%54 = load double, double* %5
%55 = load double, double* %8
%56 = call i32 @gabled_roof(double %53, double %54, double %55)
%57 = call i32 (...) @endrotate()
%58 = call i32 (...) @endxlate()
%59 = call i32 (...) @endonion()
%60 = load double, double* %7
%61 = fmul double %60, 5.000000e-01
%62 = call i32 @xlate(double 0.000000e+00, i32 0, double %61)
%63 = load double, double* %6
%64 = load double, double* %5
%65 = fmul double %64, 2.000000e+00
%66 = load double, double* %7
%67 = fmul double %66, 6.000000e-01
%68 = load double, double* %6
%69 = fmul double %68, 1.000000e-01
%70 = call i32 @gothic_arch_array(double %63, double %65, double %67, double %69, i32 4)
%71 = call i32 (...) @endxlate()
%72 = call i32 (...) @enddiff()
ret void
}

LLVM IR (-O2):
define void @english_house(double %0, double %1, double %2, double %3) {
%5 = fmul double %0, 1.000000e-01
%6 = fcmp olt double %5, 5.000000e+00
%7 = select i1 %6, double 5.000000e+00, double %5
%8 = tail call i32 (...) @diff()
%9 = tail call i32 (...) @onion()
%10 = fmul double %1, 1.050000e+00
%11 = tail call i32 @gothic_hall(double %10, double %0, double %2, i32 0, i32 1, double %7, i32 0)
%12 = fdiv double %1, -2.050000e+00
%13 = tail call i32 @xlate(double %12, i32 0, double 0.000000e+00)
%14 = fmul double %2, 1.300000e+00
%15 = fmul double %3, 1.200000e+00
%16 = tail call i32 @english_house_end(double %0, double %14, double %7, double %3, double %15)
%17 = tail call i32 (...) @endxlate()
%18 = fdiv double %1, 2.050000e+00
%19 = tail call i32 @xlate(double %18, i32 0, double 0.000000e+00)
%20 = tail call i32 @english_house_end(double %0, double %14, double %7, double %3, double %15)
%21 = tail call i32 (...) @endxlate()
%22 = fmul double %2, 1.150000e+00
%23 = tail call i32 @xlate(double 0.000000e+00, i32 0, double %22)
%24 = tail call i32 @rotate(i32 90, i32 0, i32 0, i32 1)
%25 = tail call i32 @gabled_roof(double %1, double %0, double %3)
%26 = tail call i32 (...) @endrotate()
%27 = tail call i32 (...) @endxlate()
%28 = tail call i32 (...) @endonion()
%29 = fmul double %2, 5.000000e-01
%30 = tail call i32 @xlate(double 0.000000e+00, i32 0, double %29)
%31 = fmul double %0, 2.000000e+00
%32 = fmul double %2, 6.000000e-01
%33 = fmul double %1, 1.000000e-01
%34 = tail call i32 @gothic_arch_array(double %1, double %31, double %32, double %33, i32 4)
%35 = tail call i32 (...) @endxlate()
%36 = tail call i32 (...) @enddiff()
ret void
}