#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 rand();
void init(double *layer) {
  int h, i, j;
  for (h = 0; h < 10; h++) {
    for (i = 0; i < 5; i++) {
      for (j = 0; j <= 5; j++) {
        float random = (10 + (rand() % 89));
        layer[(h * 10 + i) * (5 + 1) + j] = random / 100;
        layer[(h * 10 + 5) * (5 + 1) + j] = 0.0;
        layer[(h * 10 + 5) * (5 + 1) + j] = 0.0;
      }
    }
    layer[(h * 10 + 5) * (5 + 1) + 5 + 2] = 1;
  }
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1223 <init+0x113>
movl   $0x0,-0x10(%rbp)
cmpl   $0x5,-0x10(%rbp)
jge    11f1 <init+0xe1>
movl   $0x0,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jg     11de <init+0xce>
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x59,%ecx
cltd
idiv   %ecx
add    $0xa,%edx
cvtsi2ss %edx,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  0xe91(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x8(%rbp),%rax
imul   $0xa,-0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
imul   $0x6,%ecx,%ecx
add    -0x14(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
imul   $0xa,-0xc(%rbp),%ecx
add    $0x5,%ecx
imul   $0x6,%ecx,%ecx
add    -0x14(%rbp),%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
imul   $0xa,-0xc(%rbp),%ecx
add    $0x5,%ecx
imul   $0x6,%ecx,%ecx
add    -0x14(%rbp),%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1145 <init+0x35>
jmp    11e3 <init+0xd3>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <init+0x24>
mov    -0x8(%rbp),%rax
imul   $0xa,-0xc(%rbp),%ecx
add    $0x5,%ecx
imul   $0x6,%ecx,%ecx
add    $0x5,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  0xdf0(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <init+0x13>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0x28(%rdi),%r13
movabs $0x3ff0000000000000,%r15
xor    %r12d,%r12d
nop
imul   $0x3c,%r12,%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0xffffffffb81702e1,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x6,%ecx
add    %edx,%ecx
imul   $0x59,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0xa,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
divss  0xe87(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x28(%r13,%rbp,1)
movq   $0x0,0xf0(%r14,%rbx,8)
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0xffffffffb81702e1,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x6,%ecx
add    %edx,%ecx
imul   $0x59,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0xa,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
divss  0xe37(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x20(%r13,%rbp,1)
movq   $0x0,0xf8(%r14,%rbx,8)
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0xffffffffb81702e1,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x6,%ecx
add    %edx,%ecx
imul   $0x59,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0xa,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
divss  0xde7(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x18(%r13,%rbp,1)
movq   $0x0,0x100(%r14,%rbx,8)
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0xffffffffb81702e1,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x6,%ecx
add    %edx,%ecx
imul   $0x59,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0xa,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
divss  0xd97(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x10(%r13,%rbp,1)
movq   $0x0,0x108(%r14,%rbx,8)
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0xffffffffb81702e1,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x6,%ecx
add    %edx,%ecx
imul   $0x59,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0xa,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
divss  0xd47(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x8(%r13,%rbp,1)
movq   $0x0,0x110(%r14,%rbx,8)
xor    %eax,%eax
call   1030 <rand@plt>
movss  0xd21(%rip),%xmm1
cltq
imul   $0xffffffffb81702e1,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x6,%ecx
add    %edx,%ecx
imul   $0x59,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0xa,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x0(%r13,%rbp,1)
movq   $0x0,0x118(%r14,%rbx,8)
add    $0x30,%rbp
cmp    $0xf0,%rbp
jne    1140 <init+0x30>
mov    %r15,0x128(%r14,%rbx,8)
add    $0x1,%r12
add    $0x1e0,%r13
cmp    $0xa,%r12
jne    1130 <init+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @init(double* %0) {
%2 = alloca double*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
store double* %0, double** %2
store i32 0, i32* %3
br label %7
7: ; preds = %71, %1
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 10
br i1 %9, label %10, label %74
10: ; preds = %7
store i32 0, i32* %4
br label %11
11: ; preds = %58, %10
%12 = load i32, i32* %4
%13 = icmp slt i32 %12, 5
br i1 %13, label %14, label %61
14: ; preds = %11
store i32 0, i32* %5
br label %15
15: ; preds = %54, %14
%16 = load i32, i32* %5
%17 = icmp sle i32 %16, 5
br i1 %17, label %18, label %57
18: ; preds = %15
%19 = call i32 (...) @rand()
%20 = srem i32 %19, 89
%21 = add nsw i32 10, %20
%22 = sitofp i32 %21 to float
store float %22, float* %6
%23 = load float, float* %6
%24 = fdiv float %23, 1.000000e+02
%25 = fpext float %24 to double
%26 = load double*, double** %2
%27 = load i32, i32* %3
%28 = mul nsw i32 %27, 10
%29 = load i32, i32* %4
%30 = add nsw i32 %28, %29
%31 = mul nsw i32 %30, 6
%32 = load i32, i32* %5
%33 = add nsw i32 %31, %32
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds double, double* %26, i64 %34
store double %25, double* %35
%36 = load double*, double** %2
%37 = load i32, i32* %3
%38 = mul nsw i32 %37, 10
%39 = add nsw i32 %38, 5
%40 = mul nsw i32 %39, 6
%41 = load i32, i32* %5
%42 = add nsw i32 %40, %41
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds double, double* %36, i64 %43
store double 0.000000e+00, double* %44
%45 = load double*, double** %2
%46 = load i32, i32* %3
%47 = mul nsw i32 %46, 10
%48 = add nsw i32 %47, 5
%49 = mul nsw i32 %48, 6
%50 = load i32, i32* %5
%51 = add nsw i32 %49, %50
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds double, double* %45, i64 %52
store double 0.000000e+00, double* %53
br label %54
54: ; preds = %18
%55 = load i32, i32* %5
%56 = add nsw i32 %55, 1
store i32 %56, i32* %5
br label %15
57: ; preds = %15
br label %58
58: ; preds = %57
%59 = load i32, i32* %4
%60 = add nsw i32 %59, 1
store i32 %60, i32* %4
br label %11
61: ; preds = %11
%62 = load double*, double** %2
%63 = load i32, i32* %3
%64 = mul nsw i32 %63, 10
%65 = add nsw i32 %64, 5
%66 = mul nsw i32 %65, 6
%67 = add nsw i32 %66, 5
%68 = add nsw i32 %67, 2
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds double, double* %62, i64 %69
store double 1.000000e+00, double* %70
br label %71
71: ; preds = %61
%72 = load i32, i32* %3
%73 = add nsw i32 %72, 1
store i32 %73, i32* %3
br label %7
74: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @init(double* nocapture writeonly %0) {
br label %2
2: ; preds = %1, %71
%3 = phi i64 [ 0, %1 ], [ %74, %71 ]
%4 = mul nuw nsw i64 %3, 10
%5 = mul nuw nsw i64 %3, 60
%6 = add nuw nsw i64 %5, 30
%7 = getelementptr inbounds double, double* %0, i64 %6
%8 = add nuw nsw i64 %5, 31
%9 = getelementptr inbounds double, double* %0, i64 %8
%10 = add nuw nsw i64 %5, 32
%11 = getelementptr inbounds double, double* %0, i64 %10
%12 = add nuw nsw i64 %5, 33
%13 = getelementptr inbounds double, double* %0, i64 %12
%14 = add nuw nsw i64 %5, 34
%15 = getelementptr inbounds double, double* %0, i64 %14
%16 = add nuw nsw i64 %5, 35
%17 = getelementptr inbounds double, double* %0, i64 %16
br label %18
18: ; preds = %2, %18
%19 = phi i64 [ 0, %2 ], [ %69, %18 ]
%20 = add nuw nsw i64 %19, %4
%21 = mul nuw nsw i64 %20, 6
%22 = tail call i32 (...) @rand()
%23 = srem i32 %22, 89
%24 = add nsw i32 %23, 10
%25 = sitofp i32 %24 to float
%26 = fdiv float %25, 1.000000e+02
%27 = fpext float %26 to double
%28 = getelementptr inbounds double, double* %0, i64 %21
store double %27, double* %28
store double 0.000000e+00, double* %7
%29 = tail call i32 (...) @rand()
%30 = srem i32 %29, 89
%31 = add nsw i32 %30, 10
%32 = sitofp i32 %31 to float
%33 = fdiv float %32, 1.000000e+02
%34 = fpext float %33 to double
%35 = or i64 %21, 1
%36 = getelementptr inbounds double, double* %0, i64 %35
store double %34, double* %36
store double 0.000000e+00, double* %9
%37 = tail call i32 (...) @rand()
%38 = srem i32 %37, 89
%39 = add nsw i32 %38, 10
%40 = sitofp i32 %39 to float
%41 = fdiv float %40, 1.000000e+02
%42 = fpext float %41 to double
%43 = add nuw nsw i64 %21, 2
%44 = getelementptr inbounds double, double* %0, i64 %43
store double %42, double* %44
store double 0.000000e+00, double* %11
%45 = tail call i32 (...) @rand()
%46 = srem i32 %45, 89
%47 = add nsw i32 %46, 10
%48 = sitofp i32 %47 to float
%49 = fdiv float %48, 1.000000e+02
%50 = fpext float %49 to double
%51 = add nuw nsw i64 %21, 3
%52 = getelementptr inbounds double, double* %0, i64 %51
store double %50, double* %52
store double 0.000000e+00, double* %13
%53 = tail call i32 (...) @rand()
%54 = srem i32 %53, 89
%55 = add nsw i32 %54, 10
%56 = sitofp i32 %55 to float
%57 = fdiv float %56, 1.000000e+02
%58 = fpext float %57 to double
%59 = add nuw nsw i64 %21, 4
%60 = getelementptr inbounds double, double* %0, i64 %59
store double %58, double* %60
store double 0.000000e+00, double* %15
%61 = tail call i32 (...) @rand()
%62 = srem i32 %61, 89
%63 = add nsw i32 %62, 10
%64 = sitofp i32 %63 to float
%65 = fdiv float %64, 1.000000e+02
%66 = fpext float %65 to double
%67 = add nuw nsw i64 %21, 5
%68 = getelementptr inbounds double, double* %0, i64 %67
store double %66, double* %68
store double 0.000000e+00, double* %17
%69 = add nuw nsw i64 %19, 1
%70 = icmp eq i64 %69, 5
br i1 %70, label %71, label %18
71: ; preds = %18
%72 = add nuw nsw i64 %5, 37
%73 = getelementptr inbounds double, double* %0, i64 %72
store double 1.000000e+00, double* %73
%74 = add nuw nsw i64 %3, 1
%75 = icmp eq i64 %74, 10
br i1 %75, label %76, label %2
76: ; preds = %71
ret void
}