#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*/ BLTR(int **);
int /*<<< orphan*/ Print(int **);
int /*<<< orphan*/ TLBR(int **);
void main() {
  int array[5][5], i, j, n = 1;
  for (i = 0; i < 5; i++)
    for (j = 0; j < 5; j++)
      array[i][j] = j + i * 5 + 1;
  Print(array);
  TLBR(array);
  BLTR(array);
  TLBR(array);
  BLTR(array);
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x1,-0x7c(%rbp)
movl   $0x0,-0x74(%rbp)
cmpl   $0x5,-0x74(%rbp)
jge    11a7 <main+0x77>
movl   $0x0,-0x78(%rbp)
cmpl   $0x5,-0x78(%rbp)
jge    1194 <main+0x64>
mov    -0x78(%rbp),%edx
imul   $0x5,-0x74(%rbp),%eax
add    %eax,%edx
add    $0x1,%edx
movslq -0x74(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x14,%rcx,%rcx
add    %rcx,%rax
movslq -0x78(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    115a <main+0x2a>
jmp    1199 <main+0x69>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1149 <main+0x19>
lea    -0x70(%rbp),%rdi
call   1050 <Print@plt>
lea    -0x70(%rbp),%rdi
call   1030 <TLBR@plt>
lea    -0x70(%rbp),%rdi
call   1040 <BLTR@plt>
lea    -0x70(%rbp),%rdi
call   1030 <TLBR@plt>
lea    -0x70(%rbp),%rdi
call   1040 <BLTR@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
movaps 0xec4(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed5(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movl   $0x19,0x60(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <Print@plt>
mov    %rbx,%rdi
call   1030 <TLBR@plt>
mov    %rbx,%rdi
call   1040 <BLTR@plt>
mov    %rbx,%rdi
call   1030 <TLBR@plt>
mov    %rbx,%rdi
call   1040 <BLTR@plt>
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @main() {
%1 = alloca [5 x [5 x i32]]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 1, i32* %4
store i32 0, i32* %2
br label %5
5: ; preds = %28, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 5
br i1 %7, label %8, label %31
8: ; preds = %5
store i32 0, i32* %3
br label %9
9: ; preds = %24, %8
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 5
br i1 %11, label %12, label %27
12: ; preds = %9
%13 = load i32, i32* %3
%14 = load i32, i32* %2
%15 = mul nsw i32 %14, 5
%16 = add nsw i32 %13, %15
%17 = add nsw i32 %16, 1
%18 = load i32, i32* %2
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 %19
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [5 x i32], [5 x i32]* %20, i64 0, i64 %22
store i32 %17, i32* %23
br label %24
24: ; preds = %12
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %9
27: ; preds = %9
br label %28
28: ; preds = %27
%29 = load i32, i32* %2
%30 = add nsw i32 %29, 1
store i32 %30, i32* %2
br label %5
31: ; preds = %5
%32 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 0
%33 = bitcast [5 x i32]* %32 to i32**
%34 = call i32 @Print(i32** %33)
%35 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 0
%36 = bitcast [5 x i32]* %35 to i32**
%37 = call i32 @TLBR(i32** %36)
%38 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 0
%39 = bitcast [5 x i32]* %38 to i32**
%40 = call i32 @BLTR(i32** %39)
%41 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 0
%42 = bitcast [5 x i32]* %41 to i32**
%43 = call i32 @TLBR(i32** %42)
%44 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 0
%45 = bitcast [5 x i32]* %44 to i32**
%46 = call i32 @BLTR(i32** %45)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = alloca [5 x [5 x i32]]
%2 = bitcast [5 x [5 x i32]]* %1 to i8*
%3 = bitcast [5 x [5 x i32]]* %1 to <4 x i32>*
store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, <4 x i32>* %3
%4 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 0, i64 4
%5 = bitcast i32* %4 to <4 x i32>*
store <4 x i32> <i32 5, i32 6, i32 7, i32 8>, <4 x i32>* %5
%6 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 1, i64 3
%7 = bitcast i32* %6 to <4 x i32>*
store <4 x i32> <i32 9, i32 10, i32 11, i32 12>, <4 x i32>* %7
%8 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 2, i64 2
%9 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> <i32 13, i32 14, i32 15, i32 16>, <4 x i32>* %9
%10 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 3, i64 1
%11 = bitcast i32* %10 to <4 x i32>*
store <4 x i32> <i32 17, i32 18, i32 19, i32 20>, <4 x i32>* %11
%12 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 4, i64 0
%13 = bitcast i32* %12 to <4 x i32>*
store <4 x i32> <i32 21, i32 22, i32 23, i32 24>, <4 x i32>* %13
%14 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 4, i64 4
store i32 25, i32* %14
%15 = bitcast [5 x [5 x i32]]* %1 to i32**
%16 = call i32 @Print(i32** %15)
%17 = call i32 @TLBR(i32** %15)
%18 = call i32 @BLTR(i32** %15)
%19 = call i32 @TLBR(i32** %15)
%20 = call i32 @BLTR(i32** %15)
ret void
}