#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*/ endonion();
int /*<<< orphan*/ endrotate();
int /*<<< orphan*/ gothic_arch_array(double, double, double, double, int);
int /*<<< orphan*/ onion();
int /*<<< orphan*/ rotate(int, int /*<<< orphan*/, int /*<<< orphan*/, int);
void gothic_matrix(double length, double width, double height, int larches,
                   int warches, double border_thickness) {
  onion();
  gothic_arch_array(length, width, height, border_thickness, larches);
  rotate(90, 0, 0, 1);
  gothic_arch_array(width, length, height, border_thickness, warches);
  endrotate();
  endonion();
}


x86 assembly (clang, -O0):
<gothic_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
mov    $0x0,%al
call   1030 <onion@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
mov    -0x1c(%rbp),%edi
call   1040 <gothic_arch_array@plt>
mov    $0x5a,%edi
xor    %edx,%edx
mov    $0x1,%ecx
mov    %edx,%esi
call   1050 <rotate@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
mov    -0x20(%rbp),%edi
call   1040 <gothic_arch_array@plt>
mov    $0x0,%al
call   1060 <endrotate@plt>
mov    $0x0,%al
call   1070 <endonion@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gothic_matrix>:
push   %rbp
push   %rbx
sub    $0x28,%rsp
movsd  %xmm3,0x20(%rsp)
mov    %esi,%ebx
mov    %edi,%ebp
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
xor    %eax,%eax
call   1030 <onion@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
mov    %ebp,%edi
call   1040 <gothic_arch_array@plt>
mov    $0x5a,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1,%ecx
call   1050 <rotate@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
mov    %ebx,%edi
call   1040 <gothic_arch_array@plt>
xor    %eax,%eax
call   1060 <endrotate@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %rbp
jmp    1070 <endonion@plt>

LLVM IR (-O0):
define void @gothic_matrix(double %0, double %1, double %2, i32 %3, i32 %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
%12 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store double %5, double* %12
%13 = call i32 (...) @onion()
%14 = load double, double* %7
%15 = load double, double* %8
%16 = load double, double* %9
%17 = load double, double* %12
%18 = load i32, i32* %10
%19 = call i32 @gothic_arch_array(double %14, double %15, double %16, double %17, i32 %18)
%20 = call i32 @rotate(i32 90, i32 0, i32 0, i32 1)
%21 = load double, double* %8
%22 = load double, double* %7
%23 = load double, double* %9
%24 = load double, double* %12
%25 = load i32, i32* %11
%26 = call i32 @gothic_arch_array(double %21, double %22, double %23, double %24, i32 %25)
%27 = call i32 (...) @endrotate()
%28 = call i32 (...) @endonion()
ret void
}

LLVM IR (-O2):
define void @gothic_matrix(double %0, double %1, double %2, i32 %3, i32 %4, double %5) {
%7 = tail call i32 (...) @onion()
%8 = tail call i32 @gothic_arch_array(double %0, double %1, double %2, double %5, i32 %3)
%9 = tail call i32 @rotate(i32 90, i32 0, i32 0, i32 1)
%10 = tail call i32 @gothic_arch_array(double %1, double %0, double %2, double %5, i32 %4)
%11 = tail call i32 (...) @endrotate()
%12 = tail call i32 (...) @endonion()
ret void
}