#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 *edisrndsq(double *, int);
int /*<<< orphan*/ getch();
int /*<<< orphan*/ printf(char *, ...);
main() {
  int i, n;
  double *valsq, *vp, r;
  r = 3.2;
  n = 10;
  valsq = edisrndsq(&r, n);
  printf("\nThe sequence of evenly distributed random number is:\n");
  for (i = 0, vp = valsq; i < n; i++, vp++) {
    if (i < n - 1)
      printf("%5.2lf;", *vp);
    else
      printf("%5.2lf!", *vp);
  }
  getch();
  getch();
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xeb9(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    -0x28(%rbp),%rdi
call   1050 <edisrndsq@plt>
mov    %rax,-0x18(%rbp)
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11ed <main+0xbd>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    11b8 <main+0x88>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
lea    0xe93(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    11ce <main+0x9e>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
lea    0xe80(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    11d3 <main+0xa3>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
jmp    1180 <main+0x50>
mov    $0x0,%al
call   1040 <getch@plt>
mov    $0x0,%al
call   1040 <getch@plt>
mov    $0x0,%al
call   1040 <getch@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movabs $0x400999999999999a,%rax
99 09 40
mov    %rax,(%rsp)
mov    %rsp,%rdi
mov    $0xa,%esi
call   1060 <edisrndsq@plt>
mov    %rax,%rbx
lea    0xea7(%rip),%rdi
call   1030 <puts@plt>
movsd  (%rbx),%xmm0
lea    0xe87(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x8(%rbx),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x10(%rbx),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x18(%rbx),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x20(%rbx),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x28(%rbx),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x30(%rbx),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x38(%rbx),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x40(%rbx),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x48(%rbx),%xmm0
lea    0xe01(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getch@plt>
xor    %eax,%eax
call   1050 <getch@plt>
xor    %eax,%eax
call   1050 <getch@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [55 x i8] c"\0AThe sequence of evenly distributed random number is:\0A\00"
@.str.1 = [8 x i8] c"%5.2lf;\00"
@.str.2 = [8 x i8] c"%5.2lf!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double*
%5 = alloca double*
%6 = alloca double
store i32 0, i32* %1
store double 3.200000e+00, double* %6
store i32 10, i32* %3
%7 = load i32, i32* %3
%8 = call double* @edisrndsq(double* %6, i32 %7)
store double* %8, double** %4
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
%10 = load double*, double** %4
store double* %10, double** %5
br label %11
11: ; preds = %29, %0
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %34
15: ; preds = %11
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = sub nsw i32 %17, 1
%19 = icmp slt i32 %16, %18
br i1 %19, label %20, label %24
20: ; preds = %15
%21 = load double*, double** %5
%22 = load double, double* %21
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double %22)
br label %28
24: ; preds = %15
%25 = load double*, double** %5
%26 = load double, double* %25
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double %26)
br label %28
28: ; preds = %24, %20
br label %29
29: ; preds = %28
%30 = load i32, i32* %2
%31 = add nsw i32 %30, 1
store i32 %31, i32* %2
%32 = load double*, double** %5
%33 = getelementptr inbounds double, double* %32, i32 1
store double* %33, double** %5
br label %11
34: ; preds = %11
%35 = call i32 (...) @getch()
%36 = call i32 (...) @getch()
%37 = call i32 (...) @getch()
%38 = load i32, i32* %1
ret i32 %38
}

LLVM IR (-O2):
@.str.1 = [8 x i8] c"%5.2lf;\00"
@.str.2 = [8 x i8] c"%5.2lf!\00"
@str = [54 x i8] c"\0AThe sequence of evenly distributed random number is:\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
store double 3.200000e+00, double* %1
%3 = call double* @edisrndsq(double* %1, i32 10)
%4 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str, i64 0, i64 0))
%5 = load double, double* %3
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double %5)
%7 = getelementptr inbounds double, double* %3, i64 1
%8 = load double, double* %7
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double %8)
%10 = getelementptr inbounds double, double* %3, i64 2
%11 = load double, double* %10
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double %11)
%13 = getelementptr inbounds double, double* %3, i64 3
%14 = load double, double* %13
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double %14)
%16 = getelementptr inbounds double, double* %3, i64 4
%17 = load double, double* %16
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double %17)
%19 = getelementptr inbounds double, double* %3, i64 5
%20 = load double, double* %19
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double %20)
%22 = getelementptr inbounds double, double* %3, i64 6
%23 = load double, double* %22
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double %23)
%25 = getelementptr inbounds double, double* %3, i64 7
%26 = load double, double* %25
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double %26)
%28 = getelementptr inbounds double, double* %3, i64 8
%29 = load double, double* %28
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double %29)
%31 = getelementptr inbounds double, double* %3, i64 9
%32 = load double, double* %31
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double %32)
%34 = call i32 (...) @getch()
%35 = call i32 (...) @getch()
%36 = call i32 (...) @getch()
ret i32 0
}