#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 */
double rng_phi();
double rng_theta();
void initialize(double ****lattice) {
  int i, j, k;
  for (i = 0; i < 10; i++) {
    for (j = 0; j < 10; j++) {
      for (k = 0; k < 10; k++) {
        lattice[i][j][k][0] = rng_theta();
        lattice[i][j][k][1] = rng_phi();
      }
    }
  }
}


x86 assembly (clang, -O0):
<initialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    11e2 <initialize+0xc2>
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    11cf <initialize+0xaf>
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    11bc <initialize+0x9c>
mov    $0x0,%al
call   1030 <rng_theta@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  %xmm0,(%rax)
mov    $0x0,%al
call   1040 <rng_phi@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1155 <initialize+0x35>
jmp    11c1 <initialize+0xa1>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1144 <initialize+0x24>
jmp    11d4 <initialize+0xb4>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <initialize+0x13>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
xor    %r15d,%r15d
nopl   0x0(%rax,%rax,1)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <rng_theta@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    (%rax),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
call   1040 <rng_phi@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    (%rax),%rax
movsd  %xmm0,0x8(%rax)
xor    %eax,%eax
call   1030 <rng_theta@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    0x8(%rax),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
call   1040 <rng_phi@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    0x8(%rax),%rax
movsd  %xmm0,0x8(%rax)
xor    %eax,%eax
call   1030 <rng_theta@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    0x10(%rax),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
call   1040 <rng_phi@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    0x10(%rax),%rax
movsd  %xmm0,0x8(%rax)
xor    %eax,%eax
call   1030 <rng_theta@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    0x18(%rax),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
call   1040 <rng_phi@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    0x18(%rax),%rax
movsd  %xmm0,0x8(%rax)
xor    %eax,%eax
call   1030 <rng_theta@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    0x20(%rax),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
call   1040 <rng_phi@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    0x20(%rax),%rax
movsd  %xmm0,0x8(%rax)
xor    %eax,%eax
call   1030 <rng_theta@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    0x28(%rax),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
call   1040 <rng_phi@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    0x28(%rax),%rax
movsd  %xmm0,0x8(%rax)
xor    %eax,%eax
call   1030 <rng_theta@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    0x30(%rax),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
call   1040 <rng_phi@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    0x30(%rax),%rax
movsd  %xmm0,0x8(%rax)
xor    %eax,%eax
call   1030 <rng_theta@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    0x38(%rax),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
call   1040 <rng_phi@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    0x38(%rax),%rax
movsd  %xmm0,0x8(%rax)
xor    %eax,%eax
call   1030 <rng_theta@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    0x40(%rax),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
call   1040 <rng_phi@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    0x40(%rax),%rax
movsd  %xmm0,0x8(%rax)
xor    %eax,%eax
call   1030 <rng_theta@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    0x48(%rax),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
call   1040 <rng_phi@plt>
mov    (%r14,%r15,8),%rax
mov    (%rax,%rbx,1),%rax
mov    0x48(%rax),%rax
movsd  %xmm0,0x8(%rax)
add    $0x8,%rbx
cmp    $0x50,%rbx
jne    1140 <initialize+0x20>
add    $0x1,%r15
cmp    $0xa,%r15
jne    1130 <initialize+0x10>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @initialize(double**** %0) {
%2 = alloca double****
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store double**** %0, double***** %2
store i32 0, i32* %3
br label %6
6: ; preds = %56, %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 10
br i1 %8, label %9, label %59
9: ; preds = %6
store i32 0, i32* %4
br label %10
10: ; preds = %52, %9
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 10
br i1 %12, label %13, label %55
13: ; preds = %10
store i32 0, i32* %5
br label %14
14: ; preds = %48, %13
%15 = load i32, i32* %5
%16 = icmp slt i32 %15, 10
br i1 %16, label %17, label %51
17: ; preds = %14
%18 = call double (...) @rng_theta()
%19 = load double****, double***** %2
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds double***, double**** %19, i64 %21
%23 = load double***, double**** %22
%24 = load i32, i32* %4
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds double**, double*** %23, i64 %25
%27 = load double**, double*** %26
%28 = load i32, i32* %5
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds double*, double** %27, i64 %29
%31 = load double*, double** %30
%32 = getelementptr inbounds double, double* %31, i64 0
store double %18, double* %32
%33 = call double (...) @rng_phi()
%34 = load double****, double***** %2
%35 = load i32, i32* %3
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds double***, double**** %34, i64 %36
%38 = load double***, double**** %37
%39 = load i32, i32* %4
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds double**, double*** %38, i64 %40
%42 = load double**, double*** %41
%43 = load i32, i32* %5
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds double*, double** %42, i64 %44
%46 = load double*, double** %45
%47 = getelementptr inbounds double, double* %46, i64 1
store double %33, double* %47
br label %48
48: ; preds = %17
%49 = load i32, i32* %5
%50 = add nsw i32 %49, 1
store i32 %50, i32* %5
br label %14
51: ; preds = %14
br label %52
52: ; preds = %51
%53 = load i32, i32* %4
%54 = add nsw i32 %53, 1
store i32 %54, i32* %4
br label %10
55: ; preds = %10
br label %56
56: ; preds = %55
%57 = load i32, i32* %3
%58 = add nsw i32 %57, 1
store i32 %58, i32* %3
br label %6
59: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @initialize(double**** nocapture %0) {
br label %2
2: ; preds = %1, %137
%3 = phi i64 [ 0, %1 ], [ %138, %137 ]
%4 = getelementptr inbounds double***, double**** %0, i64 %3
br label %5
5: ; preds = %2, %5
%6 = phi i64 [ 0, %2 ], [ %135, %5 ]
%7 = tail call double (...) @rng_theta()
%8 = load double***, double**** %4
%9 = getelementptr inbounds double**, double*** %8, i64 %6
%10 = load double**, double*** %9
%11 = load double*, double** %10
store double %7, double* %11
%12 = tail call double (...) @rng_phi()
%13 = load double***, double**** %4
%14 = getelementptr inbounds double**, double*** %13, i64 %6
%15 = load double**, double*** %14
%16 = load double*, double** %15
%17 = getelementptr inbounds double, double* %16, i64 1
store double %12, double* %17
%18 = tail call double (...) @rng_theta()
%19 = load double***, double**** %4
%20 = getelementptr inbounds double**, double*** %19, i64 %6
%21 = load double**, double*** %20
%22 = getelementptr inbounds double*, double** %21, i64 1
%23 = load double*, double** %22
store double %18, double* %23
%24 = tail call double (...) @rng_phi()
%25 = load double***, double**** %4
%26 = getelementptr inbounds double**, double*** %25, i64 %6
%27 = load double**, double*** %26
%28 = getelementptr inbounds double*, double** %27, i64 1
%29 = load double*, double** %28
%30 = getelementptr inbounds double, double* %29, i64 1
store double %24, double* %30
%31 = tail call double (...) @rng_theta()
%32 = load double***, double**** %4
%33 = getelementptr inbounds double**, double*** %32, i64 %6
%34 = load double**, double*** %33
%35 = getelementptr inbounds double*, double** %34, i64 2
%36 = load double*, double** %35
store double %31, double* %36
%37 = tail call double (...) @rng_phi()
%38 = load double***, double**** %4
%39 = getelementptr inbounds double**, double*** %38, i64 %6
%40 = load double**, double*** %39
%41 = getelementptr inbounds double*, double** %40, i64 2
%42 = load double*, double** %41
%43 = getelementptr inbounds double, double* %42, i64 1
store double %37, double* %43
%44 = tail call double (...) @rng_theta()
%45 = load double***, double**** %4
%46 = getelementptr inbounds double**, double*** %45, i64 %6
%47 = load double**, double*** %46
%48 = getelementptr inbounds double*, double** %47, i64 3
%49 = load double*, double** %48
store double %44, double* %49
%50 = tail call double (...) @rng_phi()
%51 = load double***, double**** %4
%52 = getelementptr inbounds double**, double*** %51, i64 %6
%53 = load double**, double*** %52
%54 = getelementptr inbounds double*, double** %53, i64 3
%55 = load double*, double** %54
%56 = getelementptr inbounds double, double* %55, i64 1
store double %50, double* %56
%57 = tail call double (...) @rng_theta()
%58 = load double***, double**** %4
%59 = getelementptr inbounds double**, double*** %58, i64 %6
%60 = load double**, double*** %59
%61 = getelementptr inbounds double*, double** %60, i64 4
%62 = load double*, double** %61
store double %57, double* %62
%63 = tail call double (...) @rng_phi()
%64 = load double***, double**** %4
%65 = getelementptr inbounds double**, double*** %64, i64 %6
%66 = load double**, double*** %65
%67 = getelementptr inbounds double*, double** %66, i64 4
%68 = load double*, double** %67
%69 = getelementptr inbounds double, double* %68, i64 1
store double %63, double* %69
%70 = tail call double (...) @rng_theta()
%71 = load double***, double**** %4
%72 = getelementptr inbounds double**, double*** %71, i64 %6
%73 = load double**, double*** %72
%74 = getelementptr inbounds double*, double** %73, i64 5
%75 = load double*, double** %74
store double %70, double* %75
%76 = tail call double (...) @rng_phi()
%77 = load double***, double**** %4
%78 = getelementptr inbounds double**, double*** %77, i64 %6
%79 = load double**, double*** %78
%80 = getelementptr inbounds double*, double** %79, i64 5
%81 = load double*, double** %80
%82 = getelementptr inbounds double, double* %81, i64 1
store double %76, double* %82
%83 = tail call double (...) @rng_theta()
%84 = load double***, double**** %4
%85 = getelementptr inbounds double**, double*** %84, i64 %6
%86 = load double**, double*** %85
%87 = getelementptr inbounds double*, double** %86, i64 6
%88 = load double*, double** %87
store double %83, double* %88
%89 = tail call double (...) @rng_phi()
%90 = load double***, double**** %4
%91 = getelementptr inbounds double**, double*** %90, i64 %6
%92 = load double**, double*** %91
%93 = getelementptr inbounds double*, double** %92, i64 6
%94 = load double*, double** %93
%95 = getelementptr inbounds double, double* %94, i64 1
store double %89, double* %95
%96 = tail call double (...) @rng_theta()
%97 = load double***, double**** %4
%98 = getelementptr inbounds double**, double*** %97, i64 %6
%99 = load double**, double*** %98
%100 = getelementptr inbounds double*, double** %99, i64 7
%101 = load double*, double** %100
store double %96, double* %101
%102 = tail call double (...) @rng_phi()
%103 = load double***, double**** %4
%104 = getelementptr inbounds double**, double*** %103, i64 %6
%105 = load double**, double*** %104
%106 = getelementptr inbounds double*, double** %105, i64 7
%107 = load double*, double** %106
%108 = getelementptr inbounds double, double* %107, i64 1
store double %102, double* %108
%109 = tail call double (...) @rng_theta()
%110 = load double***, double**** %4
%111 = getelementptr inbounds double**, double*** %110, i64 %6
%112 = load double**, double*** %111
%113 = getelementptr inbounds double*, double** %112, i64 8
%114 = load double*, double** %113
store double %109, double* %114
%115 = tail call double (...) @rng_phi()
%116 = load double***, double**** %4
%117 = getelementptr inbounds double**, double*** %116, i64 %6
%118 = load double**, double*** %117
%119 = getelementptr inbounds double*, double** %118, i64 8
%120 = load double*, double** %119
%121 = getelementptr inbounds double, double* %120, i64 1
store double %115, double* %121
%122 = tail call double (...) @rng_theta()
%123 = load double***, double**** %4
%124 = getelementptr inbounds double**, double*** %123, i64 %6
%125 = load double**, double*** %124
%126 = getelementptr inbounds double*, double** %125, i64 9
%127 = load double*, double** %126
store double %122, double* %127
%128 = tail call double (...) @rng_phi()
%129 = load double***, double**** %4
%130 = getelementptr inbounds double**, double*** %129, i64 %6
%131 = load double**, double*** %130
%132 = getelementptr inbounds double*, double** %131, i64 9
%133 = load double*, double** %132
%134 = getelementptr inbounds double, double* %133, i64 1
store double %128, double* %134
%135 = add nuw nsw i64 %6, 1
%136 = icmp eq i64 %135, 10
br i1 %136, label %137, label %5
137: ; preds = %5
%138 = add nuw nsw i64 %3, 1
%139 = icmp eq i64 %138, 10
br i1 %139, label %140, label %2
140: ; preds = %137
ret void
}