int dormqr(char *SIDE, char *TRANS, int M, int N, int K, double *A, int LDA,
           double *TAU, double *C, int LDC, double *WORK, int LWORK) {
  extern void dormqr_(char *SIDE, char *TRANS, int *Mp, int *Np, int *Kp,
                      double *A, int *LDAp, double *TAU, double *C, int *LDCp,
                      double *WORK, int *LWORKp, int *INFOp);
  int INFO;
  dormqr_(SIDE, TRANS, &M, &N, &K, A, &LDA, TAU, C, &LDC, WORK, &LWORK, &INFO);
  return INFO;
}


x86 assembly (clang, -O0):
<dormqr>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x70,%rsp
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x28(%rbp)
mov    %rsi,-0x30(%rbp)
mov    %edx,-0x34(%rbp)
mov    %ecx,-0x38(%rbp)
mov    %r8d,-0x3c(%rbp)
mov    %r9,-0x48(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x48(%rbp),%r9
mov    0x18(%rbp),%r15
mov    0x20(%rbp),%r14
mov    0x30(%rbp),%r11
lea    -0x34(%rbp),%rdx
lea    -0x38(%rbp),%rcx
lea    -0x3c(%rbp),%r8
lea    0x10(%rbp),%r12
lea    0x28(%rbp),%rbx
lea    0x38(%rbp),%r10
lea    -0x4c(%rbp),%rax
mov    %r12,(%rsp)
mov    %r15,0x8(%rsp)
mov    %r14,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r11,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %rax,0x30(%rsp)
call   1030 <dormqr_@plt>
mov    -0x4c(%rbp),%eax
add    $0x70,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<dormqr>:
sub    $0x48,%rsp
movups 0x58(%rsp),%xmm0
mov    0x70(%rsp),%rax
mov    %edx,0x44(%rsp)
mov    %ecx,0x40(%rsp)
mov    %r8d,0x3c(%rsp)
lea    0x38(%rsp),%rcx
mov    %rcx,0x30(%rsp)
lea    0x78(%rsp),%rcx
mov    %rcx,0x28(%rsp)
mov    %rax,0x20(%rsp)
lea    0x68(%rsp),%rax
mov    %rax,0x18(%rsp)
movups %xmm0,0x8(%rsp)
lea    0x50(%rsp),%rax
mov    %rax,(%rsp)
lea    0x44(%rsp),%rdx
lea    0x40(%rsp),%rcx
lea    0x3c(%rsp),%r8
call   1030 <dormqr_@plt>
mov    0x38(%rsp),%eax
add    $0x48,%rsp
ret

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

LLVM IR (-O2):
define i32 @dormqr(i8* %0, i8* %1, i32 %2, i32 %3, i32 %4, double* %5, i32 %6, double* %7, double* %8, i32 %9, double* %10, i32 %11) {
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
store i32 %2, i32* %13
store i32 %3, i32* %14
store i32 %4, i32* %15
store i32 %6, i32* %16
store i32 %9, i32* %17
store i32 %11, i32* %18
%20 = bitcast i32* %19 to i8*
%21 = load i32, i32* %19
ret i32 %21
}