#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 */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
double RAND_MAX;
int rand();
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/);
get_data(float data[1][4], int low, int high) {
  int i, j;
  srand((unsigned int)time((time_t)NULL));
  for (i = 0; i < 1; ++i)
    for (j = 0; j < 4; ++j)
      data[i][j] = 1.0 + low + (high * rand() / (RAND_MAX + 1.0));
}


x86 assembly (clang, -O0):
<get_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jge    11fe <get_data+0xce>
movl   $0x0,-0x20(%rbp)
cmpl   $0x4,-0x20(%rbp)
jge    11eb <get_data+0xbb>
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  0xe81(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1050 <rand@plt>
movsd  -0x30(%rbp),%xmm0
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm1
movsd  0xe52(%rip),%xmm2
mov    0x2e33(%rip),%rax
addsd  (%rax),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1168 <get_data+0x38>
jmp    11f0 <get_data+0xc0>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1157 <get_data+0x27>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_data>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ebp
mov    %esi,%ebx
mov    %rdi,%r14
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
cvtsi2sd %ebx,%xmm0
addsd  0xea7(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1050 <rand@plt>
imul   %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    0x2e71(%rip),%rbx
movsd  (%rbx),%xmm1
addsd  0xe7d(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  0x8(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%r14)
xor    %eax,%eax
call   1050 <rand@plt>
imul   %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rbx),%xmm1
addsd  0xe4d(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  0x8(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x4(%r14)
xor    %eax,%eax
call   1050 <rand@plt>
imul   %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rbx),%xmm1
addsd  0xe1c(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  0x8(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x8(%r14)
xor    %eax,%eax
call   1050 <rand@plt>
imul   %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0xdef(%rip),%xmm1
addsd  (%rbx),%xmm1
divsd  %xmm1,%xmm0
addsd  0x8(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0xc(%r14)
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define i32 @get_data([4 x float]* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca [4 x float]*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store [4 x float]* %0, [4 x float]** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%10 = call i64 @time(i32 0)
%11 = trunc i64 %10 to i32
%12 = call i32 @srand(i32 %11)
store i32 0, i32* %8
br label %13
13: ; preds = %44, %3
%14 = load i32, i32* %8
%15 = icmp slt i32 %14, 1
br i1 %15, label %16, label %47
16: ; preds = %13
store i32 0, i32* %9
br label %17
17: ; preds = %40, %16
%18 = load i32, i32* %9
%19 = icmp slt i32 %18, 4
br i1 %19, label %20, label %43
20: ; preds = %17
%21 = load i32, i32* %6
%22 = sitofp i32 %21 to double
%23 = fadd double 1.000000e+00, %22
%24 = load i32, i32* %7
%25 = call i32 (...) @rand()
%26 = mul nsw i32 %24, %25
%27 = sitofp i32 %26 to double
%28 = load double, double* @RAND_MAX
%29 = fadd double %28, 1.000000e+00
%30 = fdiv double %27, %29
%31 = fadd double %23, %30
%32 = fptrunc double %31 to float
%33 = load [4 x float]*, [4 x float]** %5
%34 = load i32, i32* %8
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [4 x float], [4 x float]* %33, i64 %35
%37 = load i32, i32* %9
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [4 x float], [4 x float]* %36, i64 0, i64 %38
store float %32, float* %39
br label %40
40: ; preds = %20
%41 = load i32, i32* %9
%42 = add nsw i32 %41, 1
store i32 %42, i32* %9
br label %17
43: ; preds = %17
br label %44
44: ; preds = %43
%45 = load i32, i32* %8
%46 = add nsw i32 %45, 1
store i32 %46, i32* %8
br label %13
47: ; preds = %13
%48 = load i32, i32* %4
ret i32 %48
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define i32 @get_data([4 x float]* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = tail call i64 @time(i32 0)
%5 = trunc i64 %4 to i32
%6 = tail call i32 @srand(i32 %5)
%7 = sitofp i32 %1 to double
%8 = fadd double %7, 1.000000e+00
%9 = tail call i32 (...) @rand()
%10 = mul nsw i32 %9, %2
%11 = sitofp i32 %10 to double
%12 = load double, double* @RAND_MAX
%13 = fadd double %12, 1.000000e+00
%14 = fdiv double %11, %13
%15 = fadd double %8, %14
%16 = fptrunc double %15 to float
%17 = getelementptr inbounds [4 x float], [4 x float]* %0, i64 0, i64 0
store float %16, float* %17
%18 = tail call i32 (...) @rand()
%19 = mul nsw i32 %18, %2
%20 = sitofp i32 %19 to double
%21 = load double, double* @RAND_MAX
%22 = fadd double %21, 1.000000e+00
%23 = fdiv double %20, %22
%24 = fadd double %8, %23
%25 = fptrunc double %24 to float
%26 = getelementptr inbounds [4 x float], [4 x float]* %0, i64 0, i64 1
store float %25, float* %26
%27 = tail call i32 (...) @rand()
%28 = mul nsw i32 %27, %2
%29 = sitofp i32 %28 to double
%30 = load double, double* @RAND_MAX
%31 = fadd double %30, 1.000000e+00
%32 = fdiv double %29, %31
%33 = fadd double %8, %32
%34 = fptrunc double %33 to float
%35 = getelementptr inbounds [4 x float], [4 x float]* %0, i64 0, i64 2
store float %34, float* %35
%36 = tail call i32 (...) @rand()
%37 = mul nsw i32 %36, %2
%38 = sitofp i32 %37 to double
%39 = load double, double* @RAND_MAX
%40 = fadd double %39, 1.000000e+00
%41 = fdiv double %38, %40
%42 = fadd double %8, %41
%43 = fptrunc double %42 to float
%44 = getelementptr inbounds [4 x float], [4 x float]* %0, i64 0, i64 3
store float %43, float* %44
ret i32 undef
}