#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 const rand();
int /*<<< orphan*/ srand(int);
void init_array(double point[150L + 2][150L + 2][150L + 2],
                double new_point[150L + 2][150L + 2][150L + 2]) {
  const int BASE = 1024;
  int i, j, k;
  srand(42);
  for (i = 0; i < 150L + 2; i++) {
    for (j = 0; j < 150L + 2; j++) {
      for (k = 0; k < 150L + 2; k++) {
        point[i][j][k] = 0.0;
        new_point[i][j][k] = 0.0;
      }
    }
  }
  for (i = 1; i < 150L + 1; i++) {
    for (j = 1; j < 150L + 1; j++) {
      for (k = 0; k < 150L + 2; k++) {
        point[i][j][k] = 1.0 * (rand() % BASE);
      }
    }
  }
}


x86 assembly (clang, -O0):
<init_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x400,-0x14(%rbp)
mov    $0x2a,%edi
call   1030 <srand@plt>
movl   $0x0,-0x18(%rbp)
movslq -0x18(%rbp),%rax
cmp    $0x98,%rax
jge    1212 <init_array+0xf2>
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
cmp    $0x98,%rax
jge    11ff <init_array+0xdf>
movl   $0x0,-0x20(%rbp)
movslq -0x20(%rbp),%rax
cmp    $0x98,%rax
jge    11ec <init_array+0xcc>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0x2d200,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
imul   $0x4c0,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0x2d200,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
imul   $0x4c0,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1176 <init_array+0x56>
jmp    11f1 <init_array+0xd1>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    115f <init_array+0x3f>
jmp    1204 <init_array+0xe4>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1148 <init_array+0x28>
movl   $0x1,-0x18(%rbp)
movslq -0x18(%rbp),%rax
cmp    $0x97,%rax
jge    12d3 <init_array+0x1b3>
movl   $0x1,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
cmp    $0x97,%rax
jge    12c0 <init_array+0x1a0>
movl   $0x0,-0x20(%rbp)
movslq -0x20(%rbp),%rax
cmp    $0x98,%rax
jge    12ad <init_array+0x18d>
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x400,%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm1
movsd  0xd8e(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0x2d200,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
imul   $0x4c0,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1247 <init_array+0x127>
jmp    12b2 <init_array+0x192>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1230 <init_array+0x110>
jmp    12c5 <init_array+0x1a5>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1219 <init_array+0xf9>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_array>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r15
mov    %rdi,%r14
mov    $0x2a,%edi
call   1030 <srand@plt>
lea    0x30(%r14),%rax
lea    0x30(%r15),%rcx
lea    0x8(%r14),%r10
lea    0x8(%r15),%r11
xor    %r12d,%r12d
xorpd  %xmm0,%xmm0
jmp    1196 <init_array+0x76>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r12
mov    0x10(%rsp),%rax
add    $0x2d200,%rax
mov    0x8(%rsp),%rcx
add    $0x2d200,%rcx
add    $0x2d200,%r10
add    $0x2d200,%r11
cmp    $0x98,%r12
je     12b0 <init_array+0x190>
mov    %r11,%rsi
mov    %r10,%rdx
mov    %rcx,0x8(%rsp)
mov    %rax,0x10(%rsp)
xor    %r13d,%r13d
jmp    11d8 <init_array+0xb8>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r13
add    $0x4c0,%rax
add    $0x4c0,%rcx
add    $0x4c0,%rdx
add    $0x4c0,%rsi
cmp    $0x98,%r13
je     1160 <init_array+0x40>
imul   $0x2d200,%r12,%rbx
lea    (%r15,%rbx,1),%rdi
imul   $0x4c0,%r13,%rbp
lea    (%rdi,%rbp,1),%r8
add    $0x4c0,%r8
add    %r14,%rbx
lea    (%rbx,%rbp,1),%r9
cmp    %r8,%r9
jae    1260 <init_array+0x140>
add    %rbp,%rdi
add    %rbx,%rbp
add    $0x4c0,%rbp
cmp    %rbp,%rdi
jae    1260 <init_array+0x140>
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nop
movq   $0x0,-0x8(%rdx,%rdi,8)
movq   $0x0,-0x8(%rsi,%rdi,8)
movq   $0x0,(%rdx,%rdi,8)
movq   $0x0,(%rsi,%rdi,8)
add    $0x2,%rdi
cmp    $0x98,%rdi
jne    1220 <init_array+0x100>
jmp    11b0 <init_array+0x90>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd %xmm0,-0x30(%rax,%rdi,8)
movupd %xmm0,-0x20(%rax,%rdi,8)
movupd %xmm0,-0x30(%rcx,%rdi,8)
movupd %xmm0,-0x20(%rcx,%rdi,8)
movupd %xmm0,-0x10(%rax,%rdi,8)
movupd %xmm0,(%rax,%rdi,8)
movupd %xmm0,-0x10(%rcx,%rdi,8)
movupd %xmm0,(%rcx,%rdi,8)
add    $0x8,%rdi
cmp    $0x98,%rdi
jne    1270 <init_array+0x150>
jmp    11b0 <init_array+0x90>
add    $0x2d6c0,%r14
mov    $0x1,%r15d
nopl   (%rax)
mov    %r14,%r13
mov    $0x1,%r12d
nopl   0x0(%rax)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <rand@plt>
lea    0x3ff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffffc00,%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x0(%r13,%rbx,8)
add    $0x1,%rbx
cmp    $0x98,%rbx
jne    12e0 <init_array+0x1c0>
add    $0x1,%r12
add    $0x4c0,%r13
cmp    $0x97,%r12
jne    12d0 <init_array+0x1b0>
add    $0x1,%r15
add    $0x2d200,%r14
cmp    $0x97,%r15
jne    12c0 <init_array+0x1a0>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @init_array([152 x [152 x double]]* %0, [152 x [152 x double]]* %1) {
%3 = alloca [152 x [152 x double]]*
%4 = alloca [152 x [152 x double]]*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store [152 x [152 x double]]* %0, [152 x [152 x double]]** %3
store [152 x [152 x double]]* %1, [152 x [152 x double]]** %4
store i32 1024, i32* %5
%9 = call i32 @srand(i32 42)
store i32 0, i32* %6
br label %10
10: ; preds = %53, %2
%11 = load i32, i32* %6
%12 = sext i32 %11 to i64
%13 = icmp slt i64 %12, 152
br i1 %13, label %14, label %56
14: ; preds = %10
store i32 0, i32* %7
br label %15
15: ; preds = %49, %14
%16 = load i32, i32* %7
%17 = sext i32 %16 to i64
%18 = icmp slt i64 %17, 152
br i1 %18, label %19, label %52
19: ; preds = %15
store i32 0, i32* %8
br label %20
20: ; preds = %45, %19
%21 = load i32, i32* %8
%22 = sext i32 %21 to i64
%23 = icmp slt i64 %22, 152
br i1 %23, label %24, label %48
24: ; preds = %20
%25 = load [152 x [152 x double]]*, [152 x [152 x double]]** %3
%26 = load i32, i32* %6
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [152 x [152 x double]], [152 x [152 x double]]* %25, i64 %27
%29 = load i32, i32* %7
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [152 x [152 x double]], [152 x [152 x double]]* %28, i64 0, i64 %30
%32 = load i32, i32* %8
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [152 x double], [152 x double]* %31, i64 0, i64 %33
store double 0.000000e+00, double* %34
%35 = load [152 x [152 x double]]*, [152 x [152 x double]]** %4
%36 = load i32, i32* %6
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [152 x [152 x double]], [152 x [152 x double]]* %35, i64 %37
%39 = load i32, i32* %7
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [152 x [152 x double]], [152 x [152 x double]]* %38, i64 0, i64 %40
%42 = load i32, i32* %8
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [152 x double], [152 x double]* %41, i64 0, i64 %43
store double 0.000000e+00, double* %44
br label %45
45: ; preds = %24
%46 = load i32, i32* %8
%47 = add nsw i32 %46, 1
store i32 %47, i32* %8
br label %20
48: ; preds = %20
br label %49
49: ; preds = %48
%50 = load i32, i32* %7
%51 = add nsw i32 %50, 1
store i32 %51, i32* %7
br label %15
52: ; preds = %15
br label %53
53: ; preds = %52
%54 = load i32, i32* %6
%55 = add nsw i32 %54, 1
store i32 %55, i32* %6
br label %10
56: ; preds = %10
store i32 1, i32* %6
br label %57
57: ; preds = %94, %56
%58 = load i32, i32* %6
%59 = sext i32 %58 to i64
%60 = icmp slt i64 %59, 151
br i1 %60, label %61, label %97
61: ; preds = %57
store i32 1, i32* %7
br label %62
62: ; preds = %90, %61
%63 = load i32, i32* %7
%64 = sext i32 %63 to i64
%65 = icmp slt i64 %64, 151
br i1 %65, label %66, label %93
66: ; preds = %62
store i32 0, i32* %8
br label %67
67: ; preds = %86, %66
%68 = load i32, i32* %8
%69 = sext i32 %68 to i64
%70 = icmp slt i64 %69, 152
br i1 %70, label %71, label %89
71: ; preds = %67
%72 = call i32 (...) @rand()
%73 = srem i32 %72, 1024
%74 = sitofp i32 %73 to double
%75 = fmul double 1.000000e+00, %74
%76 = load [152 x [152 x double]]*, [152 x [152 x double]]** %3
%77 = load i32, i32* %6
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [152 x [152 x double]], [152 x [152 x double]]* %76, i64 %78
%80 = load i32, i32* %7
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds [152 x [152 x double]], [152 x [152 x double]]* %79, i64 0, i64 %81
%83 = load i32, i32* %8
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [152 x double], [152 x double]* %82, i64 0, i64 %84
store double %75, double* %85
br label %86
86: ; preds = %71
%87 = load i32, i32* %8
%88 = add nsw i32 %87, 1
store i32 %88, i32* %8
br label %67
89: ; preds = %67
br label %90
90: ; preds = %89
%91 = load i32, i32* %7
%92 = add nsw i32 %91, 1
store i32 %92, i32* %7
br label %62
93: ; preds = %62
br label %94
94: ; preds = %93
%95 = load i32, i32* %6
%96 = add nsw i32 %95, 1
store i32 %96, i32* %6
br label %57
97: ; preds = %57
ret void
}

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