#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*/ dgemm_knc(int const, int const, int const, double const,
                             double const *, int const, double const *,
                             int const, double const, double *, int const);
void dgemm(const int M, const int N, const int K, const double alpha,
           const double *A, const int lda, const double *B, const int ldb,
           const double beta, double *C, const int ldc) {
#pragma offload target(mic) in(A [0:K * lda]                                   \
                               : align(64)),                                   \
    in(B [0:N * ldb]                                                           \
       : align(64)),                                                           \
    out(C [0:N * ldc]                                                          \
        : align(64)) in(M)in(N)in(K)in(lda)in(ldb)in(ldc)in(alpha)in(beta)
  { dgemm_knc(M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); }
}


x86 assembly (clang, -O0):
<dgemm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
movsd  %xmm1,-0x38(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
movsd  -0x18(%rbp),%xmm0
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%r11d
movsd  -0x38(%rbp),%xmm1
mov    0x18(%rbp),%r10
mov    0x20(%rbp),%eax
mov    %r11d,(%rsp)
mov    %r10,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1030 <dgemm_knc@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dgemm>:
jmp    1030 <dgemm_knc@plt>

LLVM IR (-O0):
define void @dgemm(i32 %0, i32 %1, i32 %2, double %3, double* %4, i32 %5, double* %6, i32 %7, double %8, double* %9, i32 %10) {
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca double
%16 = alloca double*
%17 = alloca i32
%18 = alloca double*
%19 = alloca i32
%20 = alloca double
%21 = alloca double*
%22 = alloca i32
store i32 %0, i32* %12
store i32 %1, i32* %13
store i32 %2, i32* %14
store double %3, double* %15
store double* %4, double** %16
store i32 %5, i32* %17
store double* %6, double** %18
store i32 %7, i32* %19
store double %8, double* %20
store double* %9, double** %21
store i32 %10, i32* %22
%23 = load i32, i32* %12
%24 = load i32, i32* %13
%25 = load i32, i32* %14
%26 = load double, double* %15
%27 = load double*, double** %16
%28 = load i32, i32* %17
%29 = load double*, double** %18
%30 = load i32, i32* %19
%31 = load double, double* %20
%32 = load double*, double** %21
%33 = load i32, i32* %22
%34 = call i32 @dgemm_knc(i32 %23, i32 %24, i32 %25, double %26, double* %27, i32 %28, double* %29, i32 %30, double %31, double* %32, i32 %33)
ret void
}

LLVM IR (-O2):
define void @dgemm(i32 %0, i32 %1, i32 %2, double %3, double* %4, i32 %5, double* %6, i32 %7, double %8, double* %9, i32 %10) {
%12 = tail call i32 @dgemm_knc(i32 %0, i32 %1, i32 %2, double %3, double* %4, i32 %5, double* %6, i32 %7, double %8, double* %9, i32 %10)
ret void
}