#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*/ makeBody(double, double, double, double, double, double,
                            double, double, double, double, double);
int rand();
void singlebody() {
  double m = rand() % 250;
  double r = m / 20;
  double xpos = (rand() % 200) - 100;
  double ypos = (rand() % 200) - 100;
  double zpos = 0;
  double i = (rand() % 40) - 20;
  double j = (rand() % 40) - 20;
  double k = 0;
  double rc = (double)(rand() % 256) / 256.0;
  double g = (double)(rand() % 256) / 256.0;
  double b = (double)(rand() % 256) / 256.0;
  makeBody(m, r, xpos, ypos, zpos, i, j, k, rc, g, b);
}


x86 assembly (clang, -O0):
<singlebody>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0xfa,%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xebb(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0xc8,%ecx
cltd
idiv   %ecx
sub    $0x64,%edx
cvtsi2sd %edx,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0xc8,%ecx
cltd
idiv   %ecx
sub    $0x64,%edx
cvtsi2sd %edx,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x28,%ecx
cltd
idiv   %ecx
sub    $0x14,%edx
cvtsi2sd %edx,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x28,%ecx
cltd
idiv   %ecx
sub    $0x14,%edx
cvtsi2sd %edx,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x100,%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm0
movsd  0xe13(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x100,%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm0
movsd  0xdef(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x100,%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm0
movsd  0xdcb(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm4
movsd  -0x30(%rbp),%xmm5
movsd  -0x38(%rbp),%xmm6
movsd  -0x40(%rbp),%xmm7
movsd  -0x48(%rbp),%xmm10
movsd  -0x50(%rbp),%xmm9
movsd  -0x58(%rbp),%xmm8
movsd  %xmm10,(%rsp)
movsd  %xmm9,0x8(%rsp)
movsd  %xmm8,0x10(%rsp)
call   1030 <makeBody@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<singlebody>:
sub    $0x58,%rsp
xor    %eax,%eax
call   1040 <rand@plt>
cltq
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
imul   $0xfa,%ecx,%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x50(%rsp)
divsd  0xea5(%rip),%xmm0
movsd  %xmm0,0x48(%rsp)
xor    %eax,%eax
call   1040 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
imul   $0xc8,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0xffffff9c,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x40(%rsp)
xor    %eax,%eax
call   1040 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
imul   $0xc8,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0xffffff9c,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x38(%rsp)
xor    %eax,%eax
call   1040 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
shl    $0x3,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
add    %ecx,%eax
add    $0xffffffec,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x30(%rsp)
xor    %eax,%eax
call   1040 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
shl    $0x3,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
add    %ecx,%eax
add    $0xffffffec,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x28(%rsp)
xor    %eax,%eax
call   1040 <rand@plt>
lea    0xff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffffff00,%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xda2(%rip),%xmm0
movsd  %xmm0,0x20(%rsp)
xor    %eax,%eax
call   1040 <rand@plt>
lea    0xff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffffff00,%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xd73(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
xor    %eax,%eax
call   1040 <rand@plt>
lea    0xff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffffff00,%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xd44(%rip),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  %xmm1,(%rsp)
movsd  0x18(%rsp),%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
xorps  %xmm4,%xmm4
xorps  %xmm7,%xmm7
movsd  0x50(%rsp),%xmm0
movsd  0x48(%rsp),%xmm1
movsd  0x40(%rsp),%xmm2
movsd  0x38(%rsp),%xmm3
movsd  0x30(%rsp),%xmm5
movsd  0x28(%rsp),%xmm6
call   1030 <makeBody@plt>
add    $0x58,%rsp
ret

LLVM IR (-O0):
define void @singlebody() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = call i32 (...) @rand()
%13 = srem i32 %12, 250
%14 = sitofp i32 %13 to double
store double %14, double* %1
%15 = load double, double* %1
%16 = fdiv double %15, 2.000000e+01
store double %16, double* %2
%17 = call i32 (...) @rand()
%18 = srem i32 %17, 200
%19 = sub nsw i32 %18, 100
%20 = sitofp i32 %19 to double
store double %20, double* %3
%21 = call i32 (...) @rand()
%22 = srem i32 %21, 200
%23 = sub nsw i32 %22, 100
%24 = sitofp i32 %23 to double
store double %24, double* %4
store double 0.000000e+00, double* %5
%25 = call i32 (...) @rand()
%26 = srem i32 %25, 40
%27 = sub nsw i32 %26, 20
%28 = sitofp i32 %27 to double
store double %28, double* %6
%29 = call i32 (...) @rand()
%30 = srem i32 %29, 40
%31 = sub nsw i32 %30, 20
%32 = sitofp i32 %31 to double
store double %32, double* %7
store double 0.000000e+00, double* %8
%33 = call i32 (...) @rand()
%34 = srem i32 %33, 256
%35 = sitofp i32 %34 to double
%36 = fdiv double %35, 2.560000e+02
store double %36, double* %9
%37 = call i32 (...) @rand()
%38 = srem i32 %37, 256
%39 = sitofp i32 %38 to double
%40 = fdiv double %39, 2.560000e+02
store double %40, double* %10
%41 = call i32 (...) @rand()
%42 = srem i32 %41, 256
%43 = sitofp i32 %42 to double
%44 = fdiv double %43, 2.560000e+02
store double %44, double* %11
%45 = load double, double* %1
%46 = load double, double* %2
%47 = load double, double* %3
%48 = load double, double* %4
%49 = load double, double* %5
%50 = load double, double* %6
%51 = load double, double* %7
%52 = load double, double* %8
%53 = load double, double* %9
%54 = load double, double* %10
%55 = load double, double* %11
%56 = call i32 @makeBody(double %45, double %46, double %47, double %48, double %49, double %50, double %51, double %52, double %53, double %54, double %55)
ret void
}

LLVM IR (-O2):
define void @singlebody() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 250
%3 = sitofp i32 %2 to double
%4 = fdiv double %3, 2.000000e+01
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 200
%7 = add nsw i32 %6, -100
%8 = sitofp i32 %7 to double
%9 = tail call i32 (...) @rand()
%10 = srem i32 %9, 200
%11 = add nsw i32 %10, -100
%12 = sitofp i32 %11 to double
%13 = tail call i32 (...) @rand()
%14 = srem i32 %13, 40
%15 = add nsw i32 %14, -20
%16 = sitofp i32 %15 to double
%17 = tail call i32 (...) @rand()
%18 = srem i32 %17, 40
%19 = add nsw i32 %18, -20
%20 = sitofp i32 %19 to double
%21 = tail call i32 (...) @rand()
%22 = srem i32 %21, 256
%23 = sitofp i32 %22 to double
%24 = fmul double %23, 3.906250e-03
%25 = tail call i32 (...) @rand()
%26 = srem i32 %25, 256
%27 = sitofp i32 %26 to double
%28 = fmul double %27, 3.906250e-03
%29 = tail call i32 (...) @rand()
%30 = srem i32 %29, 256
%31 = sitofp i32 %30 to double
%32 = fmul double %31, 3.906250e-03
%33 = tail call i32 @makeBody(double %3, double %4, double %8, double %12, double 0.000000e+00, double %16, double %20, double 0.000000e+00, double %24, double %28, double %32)
ret void
}