#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*/ cyl(float, float, float, int /*<<< orphan*/);
int /*<<< orphan*/ end();
int /*<<< orphan*/ end_module();
int /*<<< orphan*/ module(char *);
float randf(double);
int /*<<< orphan*/ rotate(float, int /*<<< orphan*/, int, int /*<<< orphan*/);
int /*<<< orphan*/ scale(double, float, double);
void spar_module(char *modulename, float length, float angle) {
  float r, squash;
  squash = 0.3 + randf(0.7);
  r = length / (10.0 + randf(10.0));
  module(modulename);
  rotate(angle, 0, 1, 0);
  scale(1.0, squash, 1.0);
  cyl(length, r, r * randf(0.4) + 0.4, 0);
  end();
  end();
  end_module();
}


x86 assembly (clang, -O0):
<spar_module>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movsd  0xe92(%rip),%xmm0
call   1080 <randf@plt>
cvtss2sd %xmm0,%xmm1
movsd  0xe79(%rip),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe4e(%rip),%xmm0
call   1080 <randf@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtss2sd %xmm1,%xmm2
movsd  0xe35(%rip),%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <module@plt>
movss  -0x10(%rbp),%xmm0
xor    %edx,%edx
mov    $0x1,%esi
mov    %edx,%edi
call   1040 <rotate@plt>
movss  -0x18(%rbp),%xmm1
movsd  0xdf3(%rip),%xmm2
movaps %xmm2,%xmm0
call   1060 <scale@plt>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
movsd  0xdbd(%rip),%xmm0
call   1080 <randf@plt>
movss  -0x24(%rbp),%xmm2
movss  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm3
movss  -0x1c(%rbp),%xmm0
mulss  %xmm3,%xmm2
cvtss2sd %xmm2,%xmm2
movsd  0xd96(%rip),%xmm3
addsd  %xmm3,%xmm2
cvtsd2ss %xmm2,%xmm2
xor    %edi,%edi
call   1090 <cyl@plt>
mov    $0x0,%al
call   1030 <end@plt>
mov    $0x0,%al
call   1030 <end@plt>
mov    $0x0,%al
call   1050 <end_module@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spar_module>:
push   %rbx
sub    $0x20,%rsp
movss  %xmm1,0x1c(%rsp)
movss  %xmm0,0xc(%rsp)
mov    %rdi,%rbx
movsd  0xe74(%rip),%xmm0
call   1080 <randf@plt>
cvtss2sd %xmm0,%xmm0
addsd  0xe6b(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x18(%rsp)
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xe51(%rip),%xmm0
call   1080 <randf@plt>
cvtss2sd %xmm0,%xmm0
addsd  0xe40(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,0x10(%rsp)
mov    %rbx,%rdi
call   1070 <module@plt>
movss  0x1c(%rsp),%xmm0
xor    %edi,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1040 <rotate@plt>
movsd  0xe0d(%rip),%xmm0
movss  0x18(%rsp),%xmm1
movaps %xmm0,%xmm2
call   1060 <scale@plt>
movsd  0xdff(%rip),%xmm0
call   1080 <randf@plt>
movss  0x10(%rsp),%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0xde4(%rip),%xmm0
xorps  %xmm2,%xmm2
cvtsd2ss %xmm0,%xmm2
movss  0xc(%rsp),%xmm0
xor    %edi,%edi
call   1090 <cyl@plt>
xor    %eax,%eax
call   1030 <end@plt>
xor    %eax,%eax
call   1030 <end@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
jmp    1050 <end_module@plt>

LLVM IR (-O0):
define void @spar_module(i8* %0, float %1, float %2) {
%4 = alloca i8*
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store i8* %0, i8** %4
store float %1, float* %5
store float %2, float* %6
%9 = call float @randf(double 0x3FE6666666666666)
%10 = fpext float %9 to double
%11 = fadd double 3.000000e-01, %10
%12 = fptrunc double %11 to float
store float %12, float* %8
%13 = load float, float* %5
%14 = fpext float %13 to double
%15 = call float @randf(double 1.000000e+01)
%16 = fpext float %15 to double
%17 = fadd double 1.000000e+01, %16
%18 = fdiv double %14, %17
%19 = fptrunc double %18 to float
store float %19, float* %7
%20 = load i8*, i8** %4
%21 = call i32 @module(i8* %20)
%22 = load float, float* %6
%23 = call i32 @rotate(float %22, i32 0, i32 1, i32 0)
%24 = load float, float* %8
%25 = call i32 @scale(double 1.000000e+00, float %24, double 1.000000e+00)
%26 = load float, float* %5
%27 = load float, float* %7
%28 = load float, float* %7
%29 = call float @randf(double 4.000000e-01)
%30 = fmul float %28, %29
%31 = fpext float %30 to double
%32 = fadd double %31, 4.000000e-01
%33 = fptrunc double %32 to float
%34 = call i32 @cyl(float %26, float %27, float %33, i32 0)
%35 = call i32 (...) @end()
%36 = call i32 (...) @end()
%37 = call i32 (...) @end_module()
ret void
}

LLVM IR (-O2):
define void @spar_module(i8* %0, float %1, float %2) {
%4 = tail call float @randf(double 0x3FE6666666666666)
%5 = fpext float %4 to double
%6 = fadd double %5, 3.000000e-01
%7 = fptrunc double %6 to float
%8 = fpext float %1 to double
%9 = tail call float @randf(double 1.000000e+01)
%10 = fpext float %9 to double
%11 = fadd double %10, 1.000000e+01
%12 = fdiv double %8, %11
%13 = fptrunc double %12 to float
%14 = tail call i32 @module(i8* %0)
%15 = tail call i32 @rotate(float %2, i32 0, i32 1, i32 0)
%16 = tail call i32 @scale(double 1.000000e+00, float %7, double 1.000000e+00)
%17 = tail call float @randf(double 4.000000e-01)
%18 = fmul float %17, %13
%19 = fpext float %18 to double
%20 = fadd double %19, 4.000000e-01
%21 = fptrunc double %20 to float
%22 = tail call i32 @cyl(float %1, float %13, float %21, i32 0)
%23 = tail call i32 (...) @end()
%24 = tail call i32 (...) @end()
%25 = tail call i32 (...) @end_module()
ret void
}