#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() {
  int factor = 10000;
  double m = rand() % factor;
  double r = m / factor * 100;
  double xpos = (rand() % factor) - factor / 2;
  double ypos = (rand() % factor) - factor / 2;
  double zpos = (rand() % factor) - factor / 2;
  double i = (rand() % 100) - 50;
  double j = (rand() % 100) - 50;
  double k = (rand() % 100) - 50;
  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    $0x90,%rsp
movl   $0x2710,-0x4(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
cltd
idivl  -0x4(%rbp)
cvtsi2sd %edx,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsi2sdl -0x4(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  0xeac(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,-0x6c(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0x6c(%rbp),%edx
sub    %eax,%edx
cvtsi2sd %edx,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,-0x68(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0x68(%rbp),%edx
sub    %eax,%edx
cvtsi2sd %edx,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,-0x64(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0x64(%rbp),%edx
sub    %eax,%edx
cvtsi2sd %edx,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
sub    $0x32,%edx
cvtsi2sd %edx,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
sub    $0x32,%edx
cvtsi2sd %edx,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
sub    $0x32,%edx
cvtsi2sd %edx,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x100,%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm0
movsd  0xdba(%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  0xd96(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x100,%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm0
movsd  0xd72(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
movsd  -0x38(%rbp),%xmm5
movsd  -0x40(%rbp),%xmm6
movsd  -0x48(%rbp),%xmm7
movsd  -0x50(%rbp),%xmm10
movsd  -0x58(%rbp),%xmm9
movsd  -0x60(%rbp),%xmm8
movsd  %xmm10,(%rsp)
movsd  %xmm9,0x8(%rsp)
movsd  %xmm8,0x10(%rsp)
call   1030 <makeBody@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<singlebody>:
sub    $0x68,%rsp
xor    %eax,%eax
call   1040 <rand@plt>
cltq
imul   $0x68db8bad,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x2c,%rcx
add    %edx,%ecx
imul   $0x2710,%ecx,%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x60(%rsp)
divsd  0xea5(%rip),%xmm0
mulsd  0xea5(%rip),%xmm0
movsd  %xmm0,0x58(%rsp)
xor    %eax,%eax
call   1040 <rand@plt>
cltq
imul   $0x68db8bad,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x2c,%rcx
add    %edx,%ecx
imul   $0x2710,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0xffffec78,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x50(%rsp)
xor    %eax,%eax
call   1040 <rand@plt>
cltq
imul   $0x68db8bad,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x2c,%rcx
add    %edx,%ecx
imul   $0x2710,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0xffffec78,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x48(%rsp)
xor    %eax,%eax
call   1040 <rand@plt>
cltq
imul   $0x68db8bad,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x2c,%rcx
add    %edx,%ecx
imul   $0x2710,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0xffffec78,%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    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0xffffffce,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x38(%rsp)
xor    %eax,%eax
call   1040 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0xffffffce,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x30(%rsp)
xor    %eax,%eax
call   1040 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0xffffffce,%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  0xd37(%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  0xd08(%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  0xcd9(%rip),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  %xmm1,(%rsp)
movsd  0x18(%rsp),%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
movsd  0x60(%rsp),%xmm0
movsd  0x58(%rsp),%xmm1
movsd  0x50(%rsp),%xmm2
movsd  0x48(%rsp),%xmm3
movsd  0x40(%rsp),%xmm4
movsd  0x38(%rsp),%xmm5
movsd  0x30(%rsp),%xmm6
movsd  0x28(%rsp),%xmm7
call   1030 <makeBody@plt>
add    $0x68,%rsp
ret

LLVM IR (-O0):
define void @singlebody() {
%1 = alloca i32
%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 = alloca double
store i32 10000, i32* %1
%13 = call i32 (...) @rand()
%14 = load i32, i32* %1
%15 = srem i32 %13, %14
%16 = sitofp i32 %15 to double
store double %16, double* %2
%17 = load double, double* %2
%18 = load i32, i32* %1
%19 = sitofp i32 %18 to double
%20 = fdiv double %17, %19
%21 = fmul double %20, 1.000000e+02
store double %21, double* %3
%22 = call i32 (...) @rand()
%23 = load i32, i32* %1
%24 = srem i32 %22, %23
%25 = load i32, i32* %1
%26 = sdiv i32 %25, 2
%27 = sub nsw i32 %24, %26
%28 = sitofp i32 %27 to double
store double %28, double* %4
%29 = call i32 (...) @rand()
%30 = load i32, i32* %1
%31 = srem i32 %29, %30
%32 = load i32, i32* %1
%33 = sdiv i32 %32, 2
%34 = sub nsw i32 %31, %33
%35 = sitofp i32 %34 to double
store double %35, double* %5
%36 = call i32 (...) @rand()
%37 = load i32, i32* %1
%38 = srem i32 %36, %37
%39 = load i32, i32* %1
%40 = sdiv i32 %39, 2
%41 = sub nsw i32 %38, %40
%42 = sitofp i32 %41 to double
store double %42, double* %6
%43 = call i32 (...) @rand()
%44 = srem i32 %43, 100
%45 = sub nsw i32 %44, 50
%46 = sitofp i32 %45 to double
store double %46, double* %7
%47 = call i32 (...) @rand()
%48 = srem i32 %47, 100
%49 = sub nsw i32 %48, 50
%50 = sitofp i32 %49 to double
store double %50, double* %8
%51 = call i32 (...) @rand()
%52 = srem i32 %51, 100
%53 = sub nsw i32 %52, 50
%54 = sitofp i32 %53 to double
store double %54, double* %9
%55 = call i32 (...) @rand()
%56 = srem i32 %55, 256
%57 = sitofp i32 %56 to double
%58 = fdiv double %57, 2.560000e+02
store double %58, double* %10
%59 = call i32 (...) @rand()
%60 = srem i32 %59, 256
%61 = sitofp i32 %60 to double
%62 = fdiv double %61, 2.560000e+02
store double %62, double* %11
%63 = call i32 (...) @rand()
%64 = srem i32 %63, 256
%65 = sitofp i32 %64 to double
%66 = fdiv double %65, 2.560000e+02
store double %66, double* %12
%67 = load double, double* %2
%68 = load double, double* %3
%69 = load double, double* %4
%70 = load double, double* %5
%71 = load double, double* %6
%72 = load double, double* %7
%73 = load double, double* %8
%74 = load double, double* %9
%75 = load double, double* %10
%76 = load double, double* %11
%77 = load double, double* %12
%78 = call i32 @makeBody(double %67, double %68, double %69, double %70, double %71, double %72, double %73, double %74, double %75, double %76, double %77)
ret void
}

LLVM IR (-O2):
define void @singlebody() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 10000
%3 = sitofp i32 %2 to double
%4 = fdiv double %3, 1.000000e+04
%5 = fmul double %4, 1.000000e+02
%6 = tail call i32 (...) @rand()
%7 = srem i32 %6, 10000
%8 = add nsw i32 %7, -5000
%9 = sitofp i32 %8 to double
%10 = tail call i32 (...) @rand()
%11 = srem i32 %10, 10000
%12 = add nsw i32 %11, -5000
%13 = sitofp i32 %12 to double
%14 = tail call i32 (...) @rand()
%15 = srem i32 %14, 10000
%16 = add nsw i32 %15, -5000
%17 = sitofp i32 %16 to double
%18 = tail call i32 (...) @rand()
%19 = srem i32 %18, 100
%20 = add nsw i32 %19, -50
%21 = sitofp i32 %20 to double
%22 = tail call i32 (...) @rand()
%23 = srem i32 %22, 100
%24 = add nsw i32 %23, -50
%25 = sitofp i32 %24 to double
%26 = tail call i32 (...) @rand()
%27 = srem i32 %26, 100
%28 = add nsw i32 %27, -50
%29 = sitofp i32 %28 to double
%30 = tail call i32 (...) @rand()
%31 = srem i32 %30, 256
%32 = sitofp i32 %31 to double
%33 = fmul double %32, 3.906250e-03
%34 = tail call i32 (...) @rand()
%35 = srem i32 %34, 256
%36 = sitofp i32 %35 to double
%37 = fmul double %36, 3.906250e-03
%38 = tail call i32 (...) @rand()
%39 = srem i32 %38, 256
%40 = sitofp i32 %39 to double
%41 = fmul double %40, 3.906250e-03
%42 = tail call i32 @makeBody(double %3, double %5, double %9, double %13, double %17, double %21, double %25, double %29, double %33, double %37, double %41)
ret void
}