#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 */
scalar_t__ RAND_MAX;
float rand();
unsigned int strtol(char *, int /*<<< orphan*/ *, int);
int main(int argc, char **argv) {
  float __attribute__((aligned(64))) A[4][4];
  float __attribute__((aligned(64))) A_dilated[4][4][4];
  float __attribute__((aligned(64))) B[4][4];
  float __attribute__((aligned(64))) B_transpose[4][4];
  float __attribute__((aligned(64))) C[4][4];
  short i, j;
  unsigned int max_N = 1;
  if (argc == 2) {
    max_N = strtol(argv[1], NULL, 10);
  }
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 4; j++) {
      A[i][j] = rand() / (float)RAND_MAX;
      B[i][j] = rand() / (float)RAND_MAX;
      C[i][j] = rand() / (float)RAND_MAX;
      B_transpose[j][i] = B[i][j];
      A_dilated[i][j][0] = A[i][j];
      A_dilated[i][j][1] = A[i][j];
      A_dilated[i][j][2] = A[i][j];
      A_dilated[i][j][3] = A[i][j];
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
and    $0xffffffffffffffc0,%rsp
sub    $0x280,%rsp
movl   $0x0,0x26c(%rsp)
mov    %edi,0x268(%rsp)
mov    %rsi,0x260(%rsp)
movl   $0x1,0x38(%rsp)
cmpl   $0x2,0x268(%rsp)
02
jne    117d <main+0x5d>
mov    0x260(%rsp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %eax,0x38(%rsp)
movw   $0x0,0x3e(%rsp)
movswl 0x3e(%rsp),%eax
cmp    $0x4,%eax
jge    13cf <main+0x2af>
movw   $0x0,0x3c(%rsp)
movswl 0x3c(%rsp),%eax
cmp    $0x4,%eax
jge    13b7 <main+0x297>
mov    $0x0,%al
call   1040 <rand@plt>
mov    0x2e33(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
movswq 0x3e(%rsp),%rcx
lea    0x200(%rsp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movswq 0x3c(%rsp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    $0x0,%al
call   1040 <rand@plt>
mov    0x2dfc(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
movswq 0x3e(%rsp),%rcx
lea    0xc0(%rsp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movswq 0x3c(%rsp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    $0x0,%al
call   1040 <rand@plt>
mov    0x2dc5(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
movswq 0x3e(%rsp),%rcx
lea    0x40(%rsp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movswq 0x3c(%rsp),%rcx
movss  %xmm0,(%rax,%rcx,4)
movswq 0x3e(%rsp),%rcx
lea    0xc0(%rsp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movswq 0x3c(%rsp),%rcx
movss  (%rax,%rcx,4),%xmm0
movswq 0x3c(%rsp),%rcx
lea    0x80(%rsp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movswq 0x3e(%rsp),%rcx
movss  %xmm0,(%rax,%rcx,4)
movswq 0x3e(%rsp),%rcx
lea    0x200(%rsp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movswq 0x3c(%rsp),%rcx
movss  (%rax,%rcx,4),%xmm0
movswq 0x3e(%rsp),%rcx
lea    0x100(%rsp),%rax
shl    $0x6,%rcx
add    %rcx,%rax
movswq 0x3c(%rsp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movss  %xmm0,(%rax)
movswq 0x3e(%rsp),%rcx
lea    0x200(%rsp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movswq 0x3c(%rsp),%rcx
movss  (%rax,%rcx,4),%xmm0
movswq 0x3e(%rsp),%rcx
lea    0x100(%rsp),%rax
shl    $0x6,%rcx
add    %rcx,%rax
movswq 0x3c(%rsp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movss  %xmm0,0x4(%rax)
movswq 0x3e(%rsp),%rcx
lea    0x200(%rsp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movswq 0x3c(%rsp),%rcx
movss  (%rax,%rcx,4),%xmm0
movswq 0x3e(%rsp),%rcx
lea    0x100(%rsp),%rax
shl    $0x6,%rcx
add    %rcx,%rax
movswq 0x3c(%rsp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movss  %xmm0,0x8(%rax)
movswq 0x3e(%rsp),%rcx
lea    0x200(%rsp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movswq 0x3c(%rsp),%rcx
movss  (%rax,%rcx,4),%xmm0
movswq 0x3e(%rsp),%rcx
lea    0x100(%rsp),%rax
shl    $0x6,%rcx
add    %rcx,%rax
movswq 0x3c(%rsp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movss  %xmm0,0xc(%rax)
mov    0x3c(%rsp),%ax
add    $0x1,%ax
mov    %ax,0x3c(%rsp)
jmp    1199 <main+0x79>
jmp    13bc <main+0x29c>
mov    0x3e(%rsp),%ax
add    $0x1,%ax
mov    %ax,0x3e(%rsp)
jmp    1184 <main+0x64>
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1136 <main+0x16>
mov    0x8(%rsi),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1030 <strtol@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@RAND_MAX = global i64 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @strtol(i8* nocapture %6, i32* null, i32 10)
br label %8
8: ; preds = %4, %2
%9 = tail call float (...) @rand()
%10 = tail call float (...) @rand()
%11 = tail call float (...) @rand()
%12 = tail call float (...) @rand()
%13 = tail call float (...) @rand()
%14 = tail call float (...) @rand()
%15 = tail call float (...) @rand()
%16 = tail call float (...) @rand()
%17 = tail call float (...) @rand()
%18 = tail call float (...) @rand()
%19 = tail call float (...) @rand()
%20 = tail call float (...) @rand()
%21 = tail call float (...) @rand()
%22 = tail call float (...) @rand()
%23 = tail call float (...) @rand()
%24 = tail call float (...) @rand()
%25 = tail call float (...) @rand()
%26 = tail call float (...) @rand()
%27 = tail call float (...) @rand()
%28 = tail call float (...) @rand()
%29 = tail call float (...) @rand()
%30 = tail call float (...) @rand()
%31 = tail call float (...) @rand()
%32 = tail call float (...) @rand()
%33 = tail call float (...) @rand()
%34 = tail call float (...) @rand()
%35 = tail call float (...) @rand()
%36 = tail call float (...) @rand()
%37 = tail call float (...) @rand()
%38 = tail call float (...) @rand()
%39 = tail call float (...) @rand()
%40 = tail call float (...) @rand()
%41 = tail call float (...) @rand()
%42 = tail call float (...) @rand()
%43 = tail call float (...) @rand()
%44 = tail call float (...) @rand()
%45 = tail call float (...) @rand()
%46 = tail call float (...) @rand()
%47 = tail call float (...) @rand()
%48 = tail call float (...) @rand()
%49 = tail call float (...) @rand()
%50 = tail call float (...) @rand()
%51 = tail call float (...) @rand()
%52 = tail call float (...) @rand()
%53 = tail call float (...) @rand()
%54 = tail call float (...) @rand()
%55 = tail call float (...) @rand()
%56 = tail call float (...) @rand()
ret i32 0
}