#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*/ matrix_pin_down(int *, int *, int *);
int main() {
  static int A[150 * 150];
  static int B[150 * 150];
  static int C[150 * 150];
  int *p_a = &A[0];
  int *p_b = &B[0];
  int *p_c = &C[0];
  int f, i, k;
  matrix_pin_down(&A[0], &B[0], &C[0]);
  for (k = 0; k < 150; k++) {
    p_a = &A[0];
    for (i = 0; i < 150; i++) {
      p_b = &B[k * 150];
      *p_c = 0;
      for (f = 0; f < 150; f++)
        *p_c += *p_a++ * *p_b++;
      *p_c++;
    }
  }
  matrix_pin_down(&A[0], &B[0], &C[0]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0x2f1a(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0x18e9f(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0x2ee24(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0x2ef9(%rip),%rdi
lea    0x18e82(%rip),%rsi
lea    0x2ee0b(%rip),%rdx
call   1030 <matrix_pin_down@plt>
movl   $0x0,-0x2c(%rbp)
cmpl   $0x96,-0x2c(%rbp)
jge    122d <main+0x11d>
lea    0x2ecb(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x28(%rbp)
cmpl   $0x96,-0x28(%rbp)
jge    121a <main+0x10a>
imul   $0x96,-0x2c(%rbp),%eax
movslq %eax,%rcx
lea    0x18e32(%rip),%rax
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x0,-0x24(%rbp)
cmpl   $0x96,-0x24(%rbp)
jge    1200 <main+0xf0>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x18(%rbp)
imul   (%rax),%ecx
mov    -0x20(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11ba <main+0xaa>
mov    -0x20(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1180 <main+0x70>
jmp    121f <main+0x10f>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1161 <main+0x51>
lea    0x2e0c(%rip),%rdi
lea    0x18d95(%rip),%rsi
lea    0x2ed1e(%rip),%rdx
call   1030 <matrix_pin_down@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0x2f24(%rip),%r14
lea    0x18ead(%rip),%r15
lea    0x2ee36(%rip),%rbx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1030 <matrix_pin_down@plt>
xor    %r8d,%r8d
nopl   0x0(%rax,%rax,1)
xor    %r9d,%r9d
mov    %r14,%rdx
cs nopw 0x0(%rax,%rax,1)
movl   $0x0,(%rbx)
xor    %esi,%esi
xor    %edi,%edi
nopw   0x0(%rax,%rax,1)
mov    (%r15,%rsi,1),%eax
imul   (%rdx,%rsi,1),%eax
add    %edi,%eax
mov    %eax,(%rbx)
mov    0x4(%r15,%rsi,1),%ecx
imul   0x4(%rdx,%rsi,1),%ecx
add    %eax,%ecx
mov    %ecx,(%rbx)
mov    0x8(%r15,%rsi,1),%edi
imul   0x8(%rdx,%rsi,1),%edi
add    %ecx,%edi
mov    %edi,(%rbx)
add    $0xc,%rsi
cmp    $0x258,%esi
jne    1160 <main+0x50>
add    $0x4,%rbx
add    $0x1,%r9d
add    %rsi,%rdx
cmp    $0x96,%r9d
jne    1150 <main+0x40>
add    $0x1,%r8
add    $0x258,%r15
cmp    $0x96,%r8
jne    1140 <main+0x30>
lea    0x2e7d(%rip),%rdi
lea    0x18e06(%rip),%rsi
lea    0x2ed8f(%rip),%rdx
call   1030 <matrix_pin_down@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@main.A = internal global [22500 x i32] zeroinitializer
@main.B = internal global [22500 x i32] zeroinitializer
@main.C = internal global [22500 x i32] zeroinitializer
define i32 @main() {
%1 = tail call i32 @matrix_pin_down(i32* getelementptr inbounds ([22500 x i32], [22500 x i32]* @main.A, i64 0, i64 0), i32* getelementptr inbounds ([22500 x i32], [22500 x i32]* @main.B, i64 0, i64 0), i32* getelementptr inbounds ([22500 x i32], [22500 x i32]* @main.C, i64 0, i64 0))
br label %2
2: ; preds = %0, %40
%3 = phi i64 [ 0, %0 ], [ %41, %40 ]
%4 = phi i32* [ getelementptr inbounds ([22500 x i32], [22500 x i32]* @main.C, i64 0, i64 0), %0 ], [ %37, %40 ]
%5 = mul nuw nsw i64 %3, 150
%6 = getelementptr inbounds [22500 x i32], [22500 x i32]* @main.B, i64 0, i64 %5
br label %7
7: ; preds = %2, %36
%8 = phi i32 [ 0, %2 ], [ %38, %36 ]
%9 = phi i32* [ %4, %2 ], [ %37, %36 ]
%10 = phi i32* [ getelementptr inbounds ([22500 x i32], [22500 x i32]* @main.A, i64 0, i64 0), %2 ], [ %28, %36 ]
store i32 0, i32* %9
br label %11
11: ; preds = %11, %7
%12 = phi i32 [ 0, %7 ], [ %33, %11 ]
%13 = phi i32 [ 0, %7 ], [ %34, %11 ]
%14 = phi i32* [ %6, %7 ], [ %30, %11 ]
%15 = phi i32* [ %10, %7 ], [ %28, %11 ]
%16 = getelementptr inbounds i32, i32* %15, i64 1
%17 = load i32, i32* %15
%18 = getelementptr inbounds i32, i32* %14, i64 1
%19 = load i32, i32* %14
%20 = mul nsw i32 %19, %17
%21 = add nsw i32 %12, %20
store i32 %21, i32* %9
%22 = getelementptr inbounds i32, i32* %15, i64 2
%23 = load i32, i32* %16
%24 = getelementptr inbounds i32, i32* %14, i64 2
%25 = load i32, i32* %18
%26 = mul nsw i32 %25, %23
%27 = add nsw i32 %21, %26
store i32 %27, i32* %9
%28 = getelementptr inbounds i32, i32* %15, i64 3
%29 = load i32, i32* %22
%30 = getelementptr inbounds i32, i32* %14, i64 3
%31 = load i32, i32* %24
%32 = mul nsw i32 %31, %29
%33 = add nsw i32 %27, %32
store i32 %33, i32* %9
%34 = add nuw nsw i32 %13, 3
%35 = icmp eq i32 %34, 150
br i1 %35, label %36, label %11
36: ; preds = %11
%37 = getelementptr inbounds i32, i32* %9, i64 1
%38 = add nuw nsw i32 %8, 1
%39 = icmp eq i32 %38, 150
br i1 %39, label %40, label %7
40: ; preds = %36
%41 = add nuw nsw i64 %3, 1
%42 = icmp eq i64 %41, 150
br i1 %42, label %43, label %2
43: ; preds = %40
%44 = tail call i32 @matrix_pin_down(i32* getelementptr inbounds ([22500 x i32], [22500 x i32]* @main.A, i64 0, i64 0), i32* getelementptr inbounds ([22500 x i32], [22500 x i32]* @main.B, i64 0, i64 0), i32* getelementptr inbounds ([22500 x i32], [22500 x i32]* @main.C, i64 0, i64 0))
ret i32 0
}