#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*/ edisrnd(double *);
int /*<<< orphan*/ getch();
int /*<<< orphan*/ printf(char *, int, int /*<<< orphan*/);
main() {
  int i;
  double r;
  for (r = 3.2, i = 1; i < 5; i++)
    printf("\nThe %d random number is :%5.2lf", i, edisrnd(&r));
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xeb9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    118b <main+0x5b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    -0x10(%rbp),%rdi
call   1040 <edisrnd@plt>
mov    -0x14(%rbp),%esi
mov    %eax,%edx
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1153 <main+0x23>
mov    $0x0,%al
call   1050 <getch@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%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,%rbx
mov    %rbx,%rdi
call   1040 <edisrnd@plt>
lea    0xeac(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <edisrnd@plt>
mov    %r14,%rdi
mov    $0x2,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <edisrnd@plt>
mov    %r14,%rdi
mov    $0x3,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <edisrnd@plt>
mov    %r14,%rdi
mov    $0x4,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <getch@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [33 x i8] c"\0AThe %d random number is :%5.2lf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
store i32 0, i32* %1
store double 3.200000e+00, double* %3
store i32 1, i32* %2
br label %4
4: ; preds = %11, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 5
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %2
%9 = call i32 @edisrnd(double* %3)
%10 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
br label %11
11: ; preds = %7
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %4
14: ; preds = %4
%15 = call i32 (...) @getch()
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
@.str = [33 x i8] c"\0AThe %d random number is :%5.2lf\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
store double 3.200000e+00, double* %1
%3 = call i32 @edisrnd(double* %1)
%4 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 1, i32 %3)
%5 = call i32 @edisrnd(double* %1)
%6 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 2, i32 %5)
%7 = call i32 @edisrnd(double* %1)
%8 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 3, i32 %7)
%9 = call i32 @edisrnd(double* %1)
%10 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 4, i32 %9)
%11 = call i32 (...) @getch()
ret i32 0
}