#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_(char *, char *, int *, int *, int *, double *,
                          double *, int *, double *, int *, double *, double *,
                          int *);
void matprod(int n, double *a, double *b, double *c) {
  char trans = 'N';
  double one = 1.0, zero = 0.0;
  dgemm_(&trans, &trans, &n, &n, &n, &one, a, &n, b, &n, &zero, c, &n);
}


x86 assembly (clang, -O0):
<matprod>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x70,%rsp
mov    %edi,-0x14(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
movb   $0x4e,-0x31(%rbp)
movsd  0xeca(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%r14
mov    -0x28(%rbp),%rbx
mov    -0x30(%rbp),%r10
lea    -0x31(%rbp),%rsi
lea    -0x14(%rbp),%rax
lea    -0x40(%rbp),%r9
lea    -0x48(%rbp),%r11
mov    %rsi,%rdi
mov    %rax,%rdx
mov    %rax,%rcx
mov    %rax,%r8
mov    %r14,(%rsp)
mov    %rax,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    %r11,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %rax,0x30(%rsp)
call   1030 <dgemm_@plt>
add    $0x70,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<matprod>:
push   %rbx
sub    $0x20,%rsp
mov    %rcx,%rax
mov    %rdx,%r10
mov    %rsi,%r11
mov    %edi,0xc(%rsp)
movb   $0x4e,0xb(%rsp)
movabs $0x3ff0000000000000,%rcx
mov    %rcx,0x18(%rsp)
movq   $0x0,0x10(%rsp)
sub    $0x8,%rsp
lea    0x14(%rsp),%rcx
lea    0x18(%rsp),%rbx
lea    0x13(%rsp),%rdi
lea    0x20(%rsp),%r9
mov    %rdi,%rsi
mov    %rcx,%rdx
mov    %rcx,%r8
push   %rcx
push   %rax
push   %rbx
push   %rcx
push   %r10
push   %rcx
push   %r11
call   1030 <dgemm_@plt>
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @matprod(i32 %0, double* %1, double* %2, double* %3) {
%5 = alloca i32
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca i8
%10 = alloca double
%11 = alloca double
store i32 %0, i32* %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
store i8 78, i8* %9
store double 1.000000e+00, double* %10
store double 0.000000e+00, double* %11
%12 = load double*, double** %6
%13 = load double*, double** %7
%14 = load double*, double** %8
%15 = call i32 @dgemm_(i8* %9, i8* %9, i32* %5, i32* %5, i32* %5, double* %10, double* %12, i32* %5, double* %13, i32* %5, double* %11, double* %14, i32* %5)
ret void
}

LLVM IR (-O2):
define void @matprod(i32 %0, double* %1, double* %2, double* %3) {
%5 = alloca i32
%6 = alloca i8
%7 = alloca double
%8 = alloca double
store i32 %0, i32* %5
store i8 78, i8* %6
%9 = bitcast double* %7 to i8*
store double 1.000000e+00, double* %7
%10 = bitcast double* %8 to i8*
store double 0.000000e+00, double* %8
%11 = call i32 @dgemm_(i8* %6, i8* %6, i32* %5, i32* %5, i32* %5, double* %7, double* %1, i32* %5, double* %2, i32* %5, double* %8, double* %3, i32* %5)
ret void
}