#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*/ call_module(char *);
int /*<<< orphan*/ cyl(float, float, float, int);
int /*<<< orphan*/ end();
int /*<<< orphan*/ end_radial_dist();
int /*<<< orphan*/ onion();
int /*<<< orphan*/ radial_dist(int, float);
double randf(double);
int randn(int);
int /*<<< orphan*/ sprintf(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ thruster(float, float, float);
int /*<<< orphan*/ thruster_module(char *, float, float, float);
int /*<<< orphan*/ xlate(int /*<<< orphan*/, int /*<<< orphan*/, float);
void thruster_cluster(float r) {
  static int modnum = 0;
  int ttype = randn(3);
  float v1, v2, v3;
  float r1, r2, r3;
  int n;
  char modname[100];
  onion();
  cyl(r * 0.2, r1 = r, r2 = r, 1);
  xlate(0, 0, r * 0.19);
  v1 = randf(0.3) - 0.15 + 1.0;
  v2 = randf(0.3) - 0.15 + 1.0;
  v3 = randf(0.3) - 0.15 + 1.0;
  switch (ttype) {
  case 0:
    thruster(r * v1 * 1.5, r * v2 * 0.4, r * v3);
    break;
  default:
    n = randn(7) + 2;
    r1 = r * 0.5 * v1;
    r2 = r * 0.2 * v2;
    r3 = r * 0.7;
    sprintf(modname, "thruster_r_%d", modnum++);
    thruster(r1 * v3 * 1.5, r1 * v2 * 0.4, r1 * v3);
    thruster_module(modname, r2 * v3 * 1.5, r2 * v2 * 0.4, r2 * v3);
    radial_dist(n, r3);
    call_module(modname);
    end_radial_dist();
    break;
  }
  end();
  end();
}


x86 assembly (clang, -O0):
<thruster_cluster>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x3,%edi
call   10b0 <randn@plt>
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,-0xac(%rbp)
call   1050 <onion@plt>
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm0
movsd  0xe05(%rip),%xmm2
mulsd  %xmm2,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x18(%rbp)
movss  -0x4(%rbp),%xmm2
movss  %xmm2,-0x1c(%rbp)
mov    $0x1,%edi
call   10d0 <cyl@plt>
mov    -0xac(%rbp),%esi
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdd5(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    %esi,%edi
call   1030 <xlate@plt>
movsd  0xdc6(%rip),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
call   10a0 <randf@plt>
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
movsd  0xdae(%rip),%xmm2
movsd  %xmm2,-0xa0(%rbp)
ff
subsd  %xmm2,%xmm1
movsd  0xda2(%rip),%xmm2
movsd  %xmm2,-0x98(%rbp)
ff
addsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,-0xc(%rbp)
call   10a0 <randf@plt>
movsd  -0xa0(%rbp),%xmm3
ff
movsd  -0x98(%rbp),%xmm2
ff
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
subsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,-0x10(%rbp)
call   10a0 <randf@plt>
movsd  -0xa0(%rbp),%xmm2
ff
movsd  -0x98(%rbp),%xmm1
ff
subsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%eax
test   %eax,%eax
jne    134a <thruster_cluster+0x18a>
jmp    12fa <thruster_cluster+0x13a>
movss  -0x4(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd20(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  -0x4(%rbp),%xmm1
mulss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xcfa(%rip),%xmm2
mulsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  -0x4(%rbp),%xmm2
mulss  -0x14(%rbp),%xmm2
call   1090 <thruster@plt>
jmp    14af <thruster_cluster+0x2ef>
mov    $0x7,%edi
call   10b0 <randn@plt>
add    $0x2,%eax
mov    %eax,-0x24(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xcd5(%rip),%xmm1
mulsd  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc6a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc77(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
lea    -0x90(%rbp),%rdi
mov    0x2ca9(%rip),%edx
mov    %edx,%eax
add    $0x1,%eax
mov    %eax,0x2c9e(%rip)
lea    0xc5b(%rip),%rsi
call   10c0 <sprintf@plt>
movss  -0x18(%rbp),%xmm0
mulss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc28(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
mulss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xc02(%rip),%xmm2
mulsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  -0x18(%rbp),%xmm2
mulss  -0x14(%rbp),%xmm2
call   1090 <thruster@plt>
lea    -0x90(%rbp),%rdi
movss  -0x1c(%rbp),%xmm0
mulss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xbd6(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  -0x1c(%rbp),%xmm1
mulss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xbb0(%rip),%xmm2
mulsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  -0x1c(%rbp),%xmm2
mulss  -0x14(%rbp),%xmm2
call   1060 <thruster_module@plt>
mov    -0x24(%rbp),%edi
movss  -0x20(%rbp),%xmm0
call   10e0 <radial_dist@plt>
lea    -0x90(%rbp),%rdi
call   1040 <call_module@plt>
mov    $0x0,%al
call   1080 <end_radial_dist@plt>
mov    $0x0,%al
call   1070 <end@plt>
mov    $0x0,%al
call   1070 <end@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thruster_cluster>:
push   %rbp
push   %rbx
sub    $0x98,%rsp
movss  %xmm0,0xc(%rsp)
mov    $0x3,%edi
call   10b0 <randn@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <onion@plt>
movss  0xc(%rsp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  %xmm2,0x18(%rsp)
movsd  0xe06(%rip),%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x28(%rsp)
cvtsd2ss %xmm0,%xmm0
movaps %xmm1,%xmm2
mov    $0x1,%edi
call   10d0 <cyl@plt>
movsd  0xdeb(%rip),%xmm0
mulsd  0x18(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
xor    %edi,%edi
xor    %esi,%esi
call   1030 <xlate@plt>
movsd  0xdd8(%rip),%xmm0
call   10a0 <randf@plt>
addsd  0xdd3(%rip),%xmm0
addsd  0xdd3(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x10(%rsp)
movsd  0xdb1(%rip),%xmm0
call   10a0 <randf@plt>
addsd  0xdac(%rip),%xmm0
addsd  0xdac(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x14(%rsp)
movsd  0xd8a(%rip),%xmm0
call   10a0 <randf@plt>
addsd  0xd85(%rip),%xmm0
addsd  0xd85(%rip),%xmm0
xorps  %xmm2,%xmm2
cvtsd2ss %xmm0,%xmm2
test   %ebx,%ebx
je     13db <thruster_cluster+0x21b>
mov    $0x7,%edi
movss  %xmm2,0xc(%rsp)
call   10b0 <randn@plt>
movsd  0xd66(%rip),%xmm0
movsd  0x18(%rsp),%xmm2
mulsd  %xmm2,%xmm0
movss  0x10(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,0x24(%rsp)
movss  0x14(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0x28(%rsp),%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,0x10(%rsp)
mulsd  0xd20(%rip),%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
movss  %xmm0,0x18(%rsp)
lea    0x2(%rax),%ebp
mov    0x2d5e(%rip),%edx
lea    0x1(%rdx),%eax
mov    %eax,0x2d55(%rip)
lea    0xd0e(%rip),%rsi
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
call   10c0 <sprintf@plt>
movss  0xc(%rsp),%xmm2
movss  0x24(%rsp),%xmm3
mulss  %xmm3,%xmm2
movaps %xmm2,%xmm0
mulss  0xce2(%rip),%xmm0
mulss  0x14(%rsp),%xmm3
xorps  %xmm1,%xmm1
cvtss2sd %xmm3,%xmm1
mulsd  0xcc5(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
call   1090 <thruster@plt>
movss  0xc(%rsp),%xmm2
movss  0x10(%rsp),%xmm1
mulss  %xmm1,%xmm2
movss  0xcac(%rip),%xmm0
mulss  %xmm2,%xmm0
movss  0x14(%rsp),%xmm3
mulss  %xmm1,%xmm3
xorps  %xmm1,%xmm1
cvtss2sd %xmm3,%xmm1
mulsd  0xc87(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
mov    %rbx,%rdi
call   1060 <thruster_module@plt>
mov    %ebp,%edi
movss  0x18(%rsp),%xmm0
call   10e0 <radial_dist@plt>
mov    %rbx,%rdi
call   1040 <call_module@plt>
xor    %eax,%eax
call   1080 <end_radial_dist@plt>
jmp    1416 <thruster_cluster+0x256>
movss  0xc(%rsp),%xmm3
movss  0x10(%rsp),%xmm0
mulss  %xmm3,%xmm0
mulss  0xc4d(%rip),%xmm0
movss  0x14(%rsp),%xmm1
mulss  %xmm3,%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  0xc2f(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
mulss  %xmm3,%xmm2
call   1090 <thruster@plt>
xor    %eax,%eax
call   1070 <end@plt>
xor    %eax,%eax
call   1070 <end@plt>
add    $0x98,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@thruster_cluster.modnum = internal global i32 0
@.str = [14 x i8] c"thruster_r_%d\00"
define void @thruster_cluster(float %0) {
%2 = alloca float
%3 = alloca i32
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca i32
%11 = alloca [100 x i8]
store float %0, float* %2
%12 = call i32 @randn(i32 3)
store i32 %12, i32* %3
%13 = call i32 (...) @onion()
%14 = load float, float* %2
%15 = fpext float %14 to double
%16 = fmul double %15, 2.000000e-01
%17 = fptrunc double %16 to float
%18 = load float, float* %2
store float %18, float* %7
%19 = load float, float* %2
store float %19, float* %8
%20 = call i32 @cyl(float %17, float %18, float %19, i32 1)
%21 = load float, float* %2
%22 = fpext float %21 to double
%23 = fmul double %22, 1.900000e-01
%24 = fptrunc double %23 to float
%25 = call i32 @xlate(i32 0, i32 0, float %24)
%26 = call double @randf(double 3.000000e-01)
%27 = fsub double %26, 1.500000e-01
%28 = fadd double %27, 1.000000e+00
%29 = fptrunc double %28 to float
store float %29, float* %4
%30 = call double @randf(double 3.000000e-01)
%31 = fsub double %30, 1.500000e-01
%32 = fadd double %31, 1.000000e+00
%33 = fptrunc double %32 to float
store float %33, float* %5
%34 = call double @randf(double 3.000000e-01)
%35 = fsub double %34, 1.500000e-01
%36 = fadd double %35, 1.000000e+00
%37 = fptrunc double %36 to float
store float %37, float* %6
%38 = load i32, i32* %3
switch i32 %38, label %56 [
i32 0, label %39
]
39: ; preds = %1
%40 = load float, float* %2
%41 = load float, float* %4
%42 = fmul float %40, %41
%43 = fpext float %42 to double
%44 = fmul double %43, 1.500000e+00
%45 = fptrunc double %44 to float
%46 = load float, float* %2
%47 = load float, float* %5
%48 = fmul float %46, %47
%49 = fpext float %48 to double
%50 = fmul double %49, 4.000000e-01
%51 = fptrunc double %50 to float
%52 = load float, float* %2
%53 = load float, float* %6
%54 = fmul float %52, %53
%55 = call i32 @thruster(float %45, float %51, float %54)
br label %120
56: ; preds = %1
%57 = call i32 @randn(i32 7)
%58 = add nsw i32 %57, 2
store i32 %58, i32* %10
%59 = load float, float* %2
%60 = fpext float %59 to double
%61 = fmul double %60, 5.000000e-01
%62 = load float, float* %4
%63 = fpext float %62 to double
%64 = fmul double %61, %63
%65 = fptrunc double %64 to float
store float %65, float* %7
%66 = load float, float* %2
%67 = fpext float %66 to double
%68 = fmul double %67, 2.000000e-01
%69 = load float, float* %5
%70 = fpext float %69 to double
%71 = fmul double %68, %70
%72 = fptrunc double %71 to float
store float %72, float* %8
%73 = load float, float* %2
%74 = fpext float %73 to double
%75 = fmul double %74, 0x3FE6666666666666
%76 = fptrunc double %75 to float
store float %76, float* %9
%77 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%78 = load i32, i32* @thruster_cluster.modnum
%79 = add nsw i32 %78, 1
store i32 %79, i32* @thruster_cluster.modnum
%80 = call i32 @sprintf(i8* %77, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %78)
%81 = load float, float* %7
%82 = load float, float* %6
%83 = fmul float %81, %82
%84 = fpext float %83 to double
%85 = fmul double %84, 1.500000e+00
%86 = fptrunc double %85 to float
%87 = load float, float* %7
%88 = load float, float* %5
%89 = fmul float %87, %88
%90 = fpext float %89 to double
%91 = fmul double %90, 4.000000e-01
%92 = fptrunc double %91 to float
%93 = load float, float* %7
%94 = load float, float* %6
%95 = fmul float %93, %94
%96 = call i32 @thruster(float %86, float %92, float %95)
%97 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%98 = load float, float* %8
%99 = load float, float* %6
%100 = fmul float %98, %99
%101 = fpext float %100 to double
%102 = fmul double %101, 1.500000e+00
%103 = fptrunc double %102 to float
%104 = load float, float* %8
%105 = load float, float* %5
%106 = fmul float %104, %105
%107 = fpext float %106 to double
%108 = fmul double %107, 4.000000e-01
%109 = fptrunc double %108 to float
%110 = load float, float* %8
%111 = load float, float* %6
%112 = fmul float %110, %111
%113 = call i32 @thruster_module(i8* %97, float %103, float %109, float %112)
%114 = load i32, i32* %10
%115 = load float, float* %9
%116 = call i32 @radial_dist(i32 %114, float %115)
%117 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%118 = call i32 @call_module(i8* %117)
%119 = call i32 (...) @end_radial_dist()
br label %120
120: ; preds = %56, %39
%121 = call i32 (...) @end()
%122 = call i32 (...) @end()
ret void
}

LLVM IR (-O2):
@thruster_cluster.modnum = internal unnamed_addr global i32 0
@.str = [14 x i8] c"thruster_r_%d\00"
define void @thruster_cluster(float %0) {
%2 = alloca [100 x i8]
%3 = tail call i32 @randn(i32 3)
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = tail call i32 (...) @onion()
%6 = fpext float %0 to double
%7 = fmul double %6, 2.000000e-01
%8 = fptrunc double %7 to float
%9 = tail call i32 @cyl(float %8, float %0, float %0, i32 1)
%10 = fmul double %6, 1.900000e-01
%11 = fptrunc double %10 to float
%12 = tail call i32 @xlate(i32 0, i32 0, float %11)
%13 = tail call double @randf(double 3.000000e-01)
%14 = fadd double %13, -1.500000e-01
%15 = fadd double %14, 1.000000e+00
%16 = fptrunc double %15 to float
%17 = tail call double @randf(double 3.000000e-01)
%18 = fadd double %17, -1.500000e-01
%19 = fadd double %18, 1.000000e+00
%20 = fptrunc double %19 to float
%21 = tail call double @randf(double 3.000000e-01)
%22 = fadd double %21, -1.500000e-01
%23 = fadd double %22, 1.000000e+00
%24 = fptrunc double %23 to float
%25 = icmp eq i32 %3, 0
br i1 %25, label %26, label %35
26: ; preds = %1
%27 = fmul float %16, %0
%28 = fmul float %27, 1.500000e+00
%29 = fmul float %20, %0
%30 = fpext float %29 to double
%31 = fmul double %30, 4.000000e-01
%32 = fptrunc double %31 to float
%33 = fmul float %24, %0
%34 = tail call i32 @thruster(float %28, float %32, float %33)
br label %67
35: ; preds = %1
%36 = tail call i32 @randn(i32 7)
%37 = add nsw i32 %36, 2
%38 = fmul double %6, 5.000000e-01
%39 = fpext float %16 to double
%40 = fmul double %38, %39
%41 = fptrunc double %40 to float
%42 = fpext float %20 to double
%43 = fmul double %7, %42
%44 = fptrunc double %43 to float
%45 = fmul double %6, 0x3FE6666666666666
%46 = fptrunc double %45 to float
%47 = load i32, i32* @thruster_cluster.modnum
%48 = add nsw i32 %47, 1
store i32 %48, i32* @thruster_cluster.modnum
%49 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %47)
%50 = fmul float %24, %41
%51 = fmul float %50, 1.500000e+00
%52 = fmul float %20, %41
%53 = fpext float %52 to double
%54 = fmul double %53, 4.000000e-01
%55 = fptrunc double %54 to float
%56 = tail call i32 @thruster(float %51, float %55, float %50)
%57 = fmul float %24, %44
%58 = fmul float %57, 1.500000e+00
%59 = fmul float %20, %44
%60 = fpext float %59 to double
%61 = fmul double %60, 4.000000e-01
%62 = fptrunc double %61 to float
%63 = call i32 @thruster_module(i8* %4, float %58, float %62, float %57)
%64 = call i32 @radial_dist(i32 %37, float %46)
%65 = call i32 @call_module(i8* %4)
%66 = call i32 (...) @end_radial_dist()
br label %67
67: ; preds = %35, %26
%68 = call i32 (...) @end()
%69 = call i32 (...) @end()
ret void
}