#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 *, ...);
int rand();
int /*<<< orphan*/ srand(int);
int main() {
  int row = 34;
  int col = 34;
  int rand_int;
  int i, j;
  double rand_double;
  srand(123);
  for (i = 0; i < row; i++) {
    for (j = 0; j < col; j++) {
      rand_int = rand();
      rand_double = rand_int / 31415926.53589795;
      printf("%.15f,", rand_double);
    }
    printf("\r\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x22,-0x8(%rbp)
movl   $0x22,-0xc(%rbp)
mov    $0x7b,%edi
call   1040 <srand@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11da <main+0xaa>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11be <main+0x8e>
mov    $0x0,%al
call   1050 <rand@plt>
mov    %eax,-0x10(%rbp)
cvtsi2sdl -0x10(%rbp),%xmm0
movsd  0xe6c(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xe5f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1171 <main+0x41>
lea    0xe4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115e <main+0x2e>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x7b,%edi
call   1050 <srand@plt>
lea    0xeb0(%rip),%rbx
lea    0xeb0(%rip),%r14
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x22,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1060 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  0xe6a(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    1180 <main+0x40>
mov    %r14,%rdi
call   1030 <puts@plt>
add    $0x1,%r15d
cmp    $0x22,%r15d
jne    1170 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%.15f,\00"
@.str.1 = [3 x i8] c"\0D\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
store i32 0, i32* %1
store i32 34, i32* %2
store i32 34, i32* %3
%8 = call i32 @srand(i32 123)
store i32 0, i32* %5
br label %9
9: ; preds = %30, %0
%10 = load i32, i32* %5
%11 = load i32, i32* %2
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %33
13: ; preds = %9
store i32 0, i32* %6
br label %14
14: ; preds = %25, %13
%15 = load i32, i32* %6
%16 = load i32, i32* %3
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %28
18: ; preds = %14
%19 = call i32 (...) @rand()
store i32 %19, i32* %4
%20 = load i32, i32* %4
%21 = sitofp i32 %20 to double
%22 = fdiv double %21, 0x417DF5E7689309BB
store double %22, double* %7
%23 = load double, double* %7
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %23)
br label %25
25: ; preds = %18
%26 = load i32, i32* %6
%27 = add nsw i32 %26, 1
store i32 %27, i32* %6
br label %14
28: ; preds = %14
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %30
30: ; preds = %28
%31 = load i32, i32* %5
%32 = add nsw i32 %31, 1
store i32 %32, i32* %5
br label %9
33: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%.15f,\00"
@str = [2 x i8] c"\0D\00"
define i32 @main() {
%1 = tail call i32 @srand(i32 123)
br label %2
2: ; preds = %0, %12
%3 = phi i32 [ 0, %0 ], [ %14, %12 ]
br label %4
4: ; preds = %2, %4
%5 = phi i32 [ 0, %2 ], [ %10, %4 ]
%6 = tail call i32 (...) @rand()
%7 = sitofp i32 %6 to double
%8 = fdiv double %7, 0x417DF5E7689309BB
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %8)
%10 = add nuw nsw i32 %5, 1
%11 = icmp eq i32 %10, 34
br i1 %11, label %12, label %4
12: ; preds = %4
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%14 = add nuw nsw i32 %3, 1
%15 = icmp eq i32 %14, 34
br i1 %15, label %16, label %2
16: ; preds = %12
ret i32 0
}