#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 EXIT_SUCCESS;
int /*<<< orphan*/ matmul(float *, float *, float *, int, int, int);
int main(int argc, char *argv[]) {
#pragma starpu initialize
  float A[123][42][7], B[123][42][7], C[123][42][7];
#pragma starpu register A
#pragma starpu register B
#pragma starpu register C
  matmul((float *)A, (float *)B, (float *)C, 123, 42, 7);
#pragma starpu wait
#pragma starpu shutdown
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x69f40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x23520(%rbp),%rdi
lea    -0x46a30(%rbp),%rsi
lea    -0x69f40(%rbp),%rdx
mov    $0x7b,%ecx
mov    $0x2a,%r8d
mov    $0x7,%r9d
call   1030 <matmul@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%eax
add    $0x69f40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x69f28,%rsp
lea    0x46a20(%rsp),%rdi
lea    0x23510(%rsp),%rsi
mov    %rsp,%rdx
mov    $0x7b,%ecx
mov    $0x2a,%r8d
mov    $0x7,%r9d
call   1030 <matmul@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
add    $0x69f28,%rsp
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [123 x [42 x [7 x float]]]
%7 = alloca [123 x [42 x [7 x float]]]
%8 = alloca [123 x [42 x [7 x float]]]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = getelementptr inbounds [123 x [42 x [7 x float]]], [123 x [42 x [7 x float]]]* %6, i64 0, i64 0
%10 = bitcast [42 x [7 x float]]* %9 to float*
%11 = getelementptr inbounds [123 x [42 x [7 x float]]], [123 x [42 x [7 x float]]]* %7, i64 0, i64 0
%12 = bitcast [42 x [7 x float]]* %11 to float*
%13 = getelementptr inbounds [123 x [42 x [7 x float]]], [123 x [42 x [7 x float]]]* %8, i64 0, i64 0
%14 = bitcast [42 x [7 x float]]* %13 to float*
%15 = call i32 @matmul(float* %10, float* %12, float* %14, i32 123, i32 42, i32 7)
%16 = load i32, i32* @EXIT_SUCCESS
ret i32 %16
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [123 x [42 x [7 x float]]]
%4 = alloca [123 x [42 x [7 x float]]]
%5 = alloca [123 x [42 x [7 x float]]]
%6 = bitcast [123 x [42 x [7 x float]]]* %3 to i8*
%7 = bitcast [123 x [42 x [7 x float]]]* %4 to i8*
%8 = bitcast [123 x [42 x [7 x float]]]* %5 to i8*
%9 = getelementptr inbounds [123 x [42 x [7 x float]]], [123 x [42 x [7 x float]]]* %3, i64 0, i64 0, i64 0, i64 0
%10 = getelementptr inbounds [123 x [42 x [7 x float]]], [123 x [42 x [7 x float]]]* %4, i64 0, i64 0, i64 0, i64 0
%11 = getelementptr inbounds [123 x [42 x [7 x float]]], [123 x [42 x [7 x float]]]* %5, i64 0, i64 0, i64 0, i64 0
%12 = call i32 @matmul(float* %9, float* %10, float* %11, i32 123, i32 42, i32 7)
%13 = load i32, i32* @EXIT_SUCCESS
ret i32 %13
}