#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 */
double RAND_MAX;
int /*<<< orphan*/ od_add_od_d(double *, double const, double *);
scalar_t__ rand();
void od_random(double *x) {
  const double eps = 2.220446049250313e-16;
  const double eps2 = eps * eps;
  const double eps3 = eps * eps2;
  const double eps4 = eps * eps3;
  const double eps5 = eps * eps4;
  const double eps6 = eps * eps5;
  const double eps7 = eps * eps6;
  const double r0 = ((double)rand()) / RAND_MAX;
  const double r1 = ((double)rand()) / RAND_MAX;
  const double r2 = ((double)rand()) / RAND_MAX;
  const double r3 = ((double)rand()) / RAND_MAX;
  const double r4 = ((double)rand()) / RAND_MAX;
  const double r5 = ((double)rand()) / RAND_MAX;
  const double r6 = ((double)rand()) / RAND_MAX;
  const double r7 = ((double)rand()) / RAND_MAX;
  x[0] = r0;
  x[1] = 0.0;
  x[2] = 0.0;
  x[3] = 0.0;
  x[4] = 0.0;
  x[5] = 0.0;
  x[6] = 0.0;
  x[7] = 0.0;
  od_add_od_d(x, r1 * eps, x);
  od_add_od_d(x, r2 * eps2, x);
  od_add_od_d(x, r3 * eps3, x);
  od_add_od_d(x, r4 * eps4, x);
  od_add_od_d(x, r5 * eps5, x);
  od_add_od_d(x, r6 * eps6, x);
  od_add_od_d(x, r7 * eps7, x);
}


x86 assembly (clang, -O0):
<od_random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
movsd  0xef9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xee4(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xecf(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xeba(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xea5(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe90(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe7b(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2e4b(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2e2f(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2e13(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2df7(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ddb(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2dbf(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2da3(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2d87(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x48(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x20(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x28(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x30(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x38(%rax)
mov    -0x8(%rbp),%rdi
movsd  0xd59(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
mov    -0x8(%rbp),%rsi
call   1030 <od_add_od_d@plt>
mov    -0x8(%rbp),%rdi
movsd  0xd37(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
mov    -0x8(%rbp),%rsi
call   1030 <od_add_od_d@plt>
mov    -0x8(%rbp),%rdi
movsd  0xd15(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
mov    -0x8(%rbp),%rsi
call   1030 <od_add_od_d@plt>
mov    -0x8(%rbp),%rdi
movsd  0xcf3(%rip),%xmm0
mulsd  -0x68(%rbp),%xmm0
mov    -0x8(%rbp),%rsi
call   1030 <od_add_od_d@plt>
mov    -0x8(%rbp),%rdi
movsd  0xcd1(%rip),%xmm0
mulsd  -0x70(%rbp),%xmm0
mov    -0x8(%rbp),%rsi
call   1030 <od_add_od_d@plt>
mov    -0x8(%rbp),%rdi
movsd  0xcaf(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
mov    -0x8(%rbp),%rsi
call   1030 <od_add_od_d@plt>
mov    -0x8(%rbp),%rdi
movsd  0xc8d(%rip),%xmm0
mulsd  -0x80(%rbp),%xmm0
mov    -0x8(%rbp),%rsi
call   1030 <od_add_od_d@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<od_random>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2eab(%rip),%r14
divsd  (%r14),%xmm0
movsd  %xmm0,0x40(%rsp)
xor    %eax,%eax
call   1040 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
divsd  (%r14),%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1040 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
divsd  (%r14),%xmm0
movsd  %xmm0,0x38(%rsp)
xor    %eax,%eax
call   1040 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
divsd  (%r14),%xmm0
movsd  %xmm0,0x30(%rsp)
xor    %eax,%eax
call   1040 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
divsd  (%r14),%xmm0
movsd  %xmm0,0x28(%rsp)
xor    %eax,%eax
call   1040 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
divsd  (%r14),%xmm0
movsd  %xmm0,0x20(%rsp)
xor    %eax,%eax
call   1040 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
divsd  (%r14),%xmm0
movsd  %xmm0,0x18(%rsp)
xor    %eax,%eax
call   1040 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
divsd  (%r14),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x40(%rsp),%xmm0
movsd  %xmm0,(%rbx)
movsd  0x8(%rsp),%xmm0
mulsd  0xdea(%rip),%xmm0
xorps  %xmm1,%xmm1
movups %xmm1,0x28(%rbx)
movups %xmm1,0x18(%rbx)
movups %xmm1,0x8(%rbx)
movq   $0x0,0x38(%rbx)
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1030 <od_add_od_d@plt>
movsd  0x38(%rsp),%xmm0
mulsd  0xdc2(%rip),%xmm0
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1030 <od_add_od_d@plt>
movsd  0x30(%rsp),%xmm0
mulsd  0xdb1(%rip),%xmm0
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1030 <od_add_od_d@plt>
movsd  0x28(%rsp),%xmm0
mulsd  0xda0(%rip),%xmm0
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1030 <od_add_od_d@plt>
movsd  0x20(%rsp),%xmm0
mulsd  0xd8f(%rip),%xmm0
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1030 <od_add_od_d@plt>
movsd  0x18(%rsp),%xmm0
mulsd  0xd7e(%rip),%xmm0
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1030 <od_add_od_d@plt>
movsd  0x10(%rsp),%xmm0
mulsd  0xd6d(%rip),%xmm0
mov    %rbx,%rdi
mov    %rbx,%rsi
add    $0x48,%rsp
pop    %rbx
pop    %r14
jmp    1030 <od_add_od_d@plt>

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define void @od_random(double* %0) {
%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
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
store double* %0, double** %2
store double 0x3CB0000000000000, double* %3
store double 0x3970000000000000, double* %4
store double 0x3630000000000000, double* %5
store double 0x32F0000000000000, double* %6
store double 0x2FB0000000000000, double* %7
store double 0x2C70000000000000, double* %8
store double 0x2930000000000000, double* %9
%18 = call i64 (...) @rand()
%19 = sitofp i64 %18 to double
%20 = load double, double* @RAND_MAX
%21 = fdiv double %19, %20
store double %21, double* %10
%22 = call i64 (...) @rand()
%23 = sitofp i64 %22 to double
%24 = load double, double* @RAND_MAX
%25 = fdiv double %23, %24
store double %25, double* %11
%26 = call i64 (...) @rand()
%27 = sitofp i64 %26 to double
%28 = load double, double* @RAND_MAX
%29 = fdiv double %27, %28
store double %29, double* %12
%30 = call i64 (...) @rand()
%31 = sitofp i64 %30 to double
%32 = load double, double* @RAND_MAX
%33 = fdiv double %31, %32
store double %33, double* %13
%34 = call i64 (...) @rand()
%35 = sitofp i64 %34 to double
%36 = load double, double* @RAND_MAX
%37 = fdiv double %35, %36
store double %37, double* %14
%38 = call i64 (...) @rand()
%39 = sitofp i64 %38 to double
%40 = load double, double* @RAND_MAX
%41 = fdiv double %39, %40
store double %41, double* %15
%42 = call i64 (...) @rand()
%43 = sitofp i64 %42 to double
%44 = load double, double* @RAND_MAX
%45 = fdiv double %43, %44
store double %45, double* %16
%46 = call i64 (...) @rand()
%47 = sitofp i64 %46 to double
%48 = load double, double* @RAND_MAX
%49 = fdiv double %47, %48
store double %49, double* %17
%50 = load double, double* %10
%51 = load double*, double** %2
%52 = getelementptr inbounds double, double* %51, i64 0
store double %50, double* %52
%53 = load double*, double** %2
%54 = getelementptr inbounds double, double* %53, i64 1
store double 0.000000e+00, double* %54
%55 = load double*, double** %2
%56 = getelementptr inbounds double, double* %55, i64 2
store double 0.000000e+00, double* %56
%57 = load double*, double** %2
%58 = getelementptr inbounds double, double* %57, i64 3
store double 0.000000e+00, double* %58
%59 = load double*, double** %2
%60 = getelementptr inbounds double, double* %59, i64 4
store double 0.000000e+00, double* %60
%61 = load double*, double** %2
%62 = getelementptr inbounds double, double* %61, i64 5
store double 0.000000e+00, double* %62
%63 = load double*, double** %2
%64 = getelementptr inbounds double, double* %63, i64 6
store double 0.000000e+00, double* %64
%65 = load double*, double** %2
%66 = getelementptr inbounds double, double* %65, i64 7
store double 0.000000e+00, double* %66
%67 = load double*, double** %2
%68 = load double, double* %11
%69 = fmul double %68, 0x3CB0000000000000
%70 = load double*, double** %2
%71 = call i32 @od_add_od_d(double* %67, double %69, double* %70)
%72 = load double*, double** %2
%73 = load double, double* %12
%74 = fmul double %73, 0x3970000000000000
%75 = load double*, double** %2
%76 = call i32 @od_add_od_d(double* %72, double %74, double* %75)
%77 = load double*, double** %2
%78 = load double, double* %13
%79 = fmul double %78, 0x3630000000000000
%80 = load double*, double** %2
%81 = call i32 @od_add_od_d(double* %77, double %79, double* %80)
%82 = load double*, double** %2
%83 = load double, double* %14
%84 = fmul double %83, 0x32F0000000000000
%85 = load double*, double** %2
%86 = call i32 @od_add_od_d(double* %82, double %84, double* %85)
%87 = load double*, double** %2
%88 = load double, double* %15
%89 = fmul double %88, 0x2FB0000000000000
%90 = load double*, double** %2
%91 = call i32 @od_add_od_d(double* %87, double %89, double* %90)
%92 = load double*, double** %2
%93 = load double, double* %16
%94 = fmul double %93, 0x2C70000000000000
%95 = load double*, double** %2
%96 = call i32 @od_add_od_d(double* %92, double %94, double* %95)
%97 = load double*, double** %2
%98 = load double, double* %17
%99 = fmul double %98, 0x2930000000000000
%100 = load double*, double** %2
%101 = call i32 @od_add_od_d(double* %97, double %99, double* %100)
ret void
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define void @od_random(double* %0) {
%2 = tail call i64 (...) @rand()
%3 = sitofp i64 %2 to double
%4 = load double, double* @RAND_MAX
%5 = fdiv double %3, %4
%6 = tail call i64 (...) @rand()
%7 = sitofp i64 %6 to double
%8 = load double, double* @RAND_MAX
%9 = fdiv double %7, %8
%10 = tail call i64 (...) @rand()
%11 = sitofp i64 %10 to double
%12 = load double, double* @RAND_MAX
%13 = fdiv double %11, %12
%14 = tail call i64 (...) @rand()
%15 = sitofp i64 %14 to double
%16 = load double, double* @RAND_MAX
%17 = fdiv double %15, %16
%18 = tail call i64 (...) @rand()
%19 = sitofp i64 %18 to double
%20 = load double, double* @RAND_MAX
%21 = fdiv double %19, %20
%22 = tail call i64 (...) @rand()
%23 = sitofp i64 %22 to double
%24 = load double, double* @RAND_MAX
%25 = fdiv double %23, %24
%26 = tail call i64 (...) @rand()
%27 = sitofp i64 %26 to double
%28 = load double, double* @RAND_MAX
%29 = fdiv double %27, %28
%30 = tail call i64 (...) @rand()
%31 = sitofp i64 %30 to double
%32 = load double, double* @RAND_MAX
%33 = fdiv double %31, %32
store double %5, double* %0
%34 = getelementptr inbounds double, double* %0, i64 1
%35 = fmul double %9, 0x3CB0000000000000
%36 = bitcast double* %34 to i8*
%37 = tail call i32 @od_add_od_d(double* %0, double %35, double* %0)
%38 = fmul double %13, 0x3970000000000000
%39 = tail call i32 @od_add_od_d(double* %0, double %38, double* %0)
%40 = fmul double %17, 0x3630000000000000
%41 = tail call i32 @od_add_od_d(double* %0, double %40, double* %0)
%42 = fmul double %21, 0x32F0000000000000
%43 = tail call i32 @od_add_od_d(double* %0, double %42, double* %0)
%44 = fmul double %25, 0x2FB0000000000000
%45 = tail call i32 @od_add_od_d(double* %0, double %44, double* %0)
%46 = fmul double %29, 0x2C70000000000000
%47 = tail call i32 @od_add_od_d(double* %0, double %46, double* %0)
%48 = fmul double %33, 0x2930000000000000
%49 = tail call i32 @od_add_od_d(double* %0, double %48, double* %0)
ret void
}