#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 *, ...);
void print_net(double *layer) {
  for (int h = 0; h < 10; h++) {
    for (int i = 0; i < 5; i++) {
      for (int j = 0; j <= 5; j++) {
        printf("%f, ", layer[(h * 10 + i) * (5 + 1) + j]);
      }
      printf("\n");
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<print_net>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    11bc <print_net+0xac>
movl   $0x0,-0x10(%rbp)
cmpl   $0x5,-0x10(%rbp)
jge    11a0 <print_net+0x90>
movl   $0x0,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jg     1184 <print_net+0x74>
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  (%rax,%rcx,8),%xmm0
lea    0xe91(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1145 <print_net+0x35>
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <print_net+0x24>
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <print_net+0x13>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_net>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
mov    $0xe8,%ebx
lea    0xecc(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  -0xe8(%r15,%rbx,1),%xmm0
ff ff ff
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0xe0(%r15,%rbx,1),%xmm0
ff ff ff
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0xd8(%r15,%rbx,1),%xmm0
ff ff ff
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0xd0(%r15,%rbx,1),%xmm0
ff ff ff
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0xc8(%r15,%rbx,1),%xmm0
ff ff ff
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0xc0(%r15,%rbx,1),%xmm0
ff ff ff
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsd  -0xb8(%r15,%rbx,1),%xmm0
ff ff ff
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0xb0(%r15,%rbx,1),%xmm0
ff ff ff
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0xa8(%r15,%rbx,1),%xmm0
ff ff ff
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0xa0(%r15,%rbx,1),%xmm0
ff ff ff
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x98(%r15,%rbx,1),%xmm0
ff ff ff
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x90(%r15,%rbx,1),%xmm0
ff ff ff
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsd  -0x88(%r15,%rbx,1),%xmm0
ff ff ff
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x80(%r15,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x78(%r15,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x70(%r15,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x68(%r15,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x60(%r15,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsd  -0x58(%r15,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x50(%r15,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x48(%r15,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x40(%r15,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x38(%r15,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x30(%r15,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsd  -0x28(%r15,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x20(%r15,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x18(%r15,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x10(%r15,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x8(%r15,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  (%r15,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1e0,%rbx
cmp    $0x13a8,%rbx
jne    1140 <print_net+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%f, \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_net(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 = %40, %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 10
br i1 %8, label %9, label %43
9: ; preds = %6
store i32 0, i32* %4
br label %10
10: ; preds = %35, %9
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 5
br i1 %12, label %13, label %38
13: ; preds = %10
store i32 0, i32* %5
br label %14
14: ; preds = %30, %13
%15 = load i32, i32* %5
%16 = icmp sle i32 %15, 5
br i1 %16, label %17, label %33
17: ; preds = %14
%18 = load double*, double** %2
%19 = load i32, i32* %3
%20 = mul nsw i32 %19, 10
%21 = load i32, i32* %4
%22 = add nsw i32 %20, %21
%23 = mul nsw i32 %22, 6
%24 = load i32, i32* %5
%25 = add nsw i32 %23, %24
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds double, double* %18, i64 %26
%28 = load double, double* %27
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %28)
br label %30
30: ; preds = %17
%31 = load i32, i32* %5
%32 = add nsw i32 %31, 1
store i32 %32, i32* %5
br label %14
33: ; preds = %14
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %35
35: ; preds = %33
%36 = load i32, i32* %4
%37 = add nsw i32 %36, 1
store i32 %37, i32* %4
br label %10
38: ; preds = %10
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %40
40: ; preds = %38
%41 = load i32, i32* %3
%42 = add nsw i32 %41, 1
store i32 %42, i32* %3
br label %6
43: ; preds = %6
ret void
}

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