#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*/ printf(char *, ...);
scalar_t__ rnd_mt19937();
int main(int argc, char *argv[]) {
  int i;
  for (i = 0; i < 10; ++i) {
    double r = ((double)rnd_mt19937() + 0.5) / 4294967296;
    printf("%f,", r);
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    1191 <main+0x71>
mov    $0x0,%al
call   1030 <rnd_mt19937@plt>
cvtsi2sd %rax,%xmm0
movsd  0xead(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xe99(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xe94(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
lea    0xe7c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <rnd_mt19937@plt>
cvtsi2sd %rax,%xmm0
addsd  0xebb(%rip),%xmm0
mulsd  0xebb(%rip),%xmm0
lea    0xebc(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <rnd_mt19937@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0xe8b(%rip),%xmm0
mulsd  0xe8b(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <rnd_mt19937@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0xe62(%rip),%xmm0
mulsd  0xe62(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <rnd_mt19937@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0xe39(%rip),%xmm0
mulsd  0xe39(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <rnd_mt19937@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0xe10(%rip),%xmm0
mulsd  0xe10(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <rnd_mt19937@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0xde7(%rip),%xmm0
mulsd  0xde7(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <rnd_mt19937@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0xdbe(%rip),%xmm0
mulsd  0xdbe(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <rnd_mt19937@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0xd95(%rip),%xmm0
mulsd  0xd95(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <rnd_mt19937@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0xd6c(%rip),%xmm0
mulsd  0xd6c(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <rnd_mt19937@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0xd43(%rip),%xmm0
mulsd  0xd43(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f,\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %8
8: ; preds = %18, %2
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 10
br i1 %10, label %11, label %21
11: ; preds = %8
%12 = call i64 (...) @rnd_mt19937()
%13 = sitofp i64 %12 to double
%14 = fadd double %13, 5.000000e-01
%15 = fdiv double %14, 0x41F0000000000000
store double %15, double* %7
%16 = load double, double* %7
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
br label %8
21: ; preds = %8
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f,\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @rnd_mt19937()
%4 = sitofp i64 %3 to double
%5 = fadd double %4, 5.000000e-01
%6 = fmul double %5, 0x3DF0000000000000
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %6)
%8 = tail call i64 (...) @rnd_mt19937()
%9 = sitofp i64 %8 to double
%10 = fadd double %9, 5.000000e-01
%11 = fmul double %10, 0x3DF0000000000000
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %11)
%13 = tail call i64 (...) @rnd_mt19937()
%14 = sitofp i64 %13 to double
%15 = fadd double %14, 5.000000e-01
%16 = fmul double %15, 0x3DF0000000000000
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %16)
%18 = tail call i64 (...) @rnd_mt19937()
%19 = sitofp i64 %18 to double
%20 = fadd double %19, 5.000000e-01
%21 = fmul double %20, 0x3DF0000000000000
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %21)
%23 = tail call i64 (...) @rnd_mt19937()
%24 = sitofp i64 %23 to double
%25 = fadd double %24, 5.000000e-01
%26 = fmul double %25, 0x3DF0000000000000
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %26)
%28 = tail call i64 (...) @rnd_mt19937()
%29 = sitofp i64 %28 to double
%30 = fadd double %29, 5.000000e-01
%31 = fmul double %30, 0x3DF0000000000000
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %31)
%33 = tail call i64 (...) @rnd_mt19937()
%34 = sitofp i64 %33 to double
%35 = fadd double %34, 5.000000e-01
%36 = fmul double %35, 0x3DF0000000000000
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %36)
%38 = tail call i64 (...) @rnd_mt19937()
%39 = sitofp i64 %38 to double
%40 = fadd double %39, 5.000000e-01
%41 = fmul double %40, 0x3DF0000000000000
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %41)
%43 = tail call i64 (...) @rnd_mt19937()
%44 = sitofp i64 %43 to double
%45 = fadd double %44, 5.000000e-01
%46 = fmul double %45, 0x3DF0000000000000
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %46)
%48 = tail call i64 (...) @rnd_mt19937()
%49 = sitofp i64 %48 to double
%50 = fadd double %49, 5.000000e-01
%51 = fmul double %50, 0x3DF0000000000000
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %51)
%53 = tail call i32 @putchar(i32 10)
ret i32 0
}