#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*/ dgeqrf_(int *, int *, double **, int *, double *, double *,
                           int *, int *);
int main() {
  double a[6][2] = {{0, 2}, {2, -1}, {2, -1}, {0, 1.5}, {2, -1}, {2, -1}};
  int m = 6;
  int n = 2;
  int info = 0;
  int lda = m;
  int lwork = n;
  double *work;
  double *tau;
  dgeqrf_(&m, &n, a, &lda, tau, work, &lwork, &info);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
lea    -0x60(%rbp),%rdi
lea    0xeca(%rip),%rsi
mov    $0x60,%edx
call   1040 <memcpy@plt>
movl   $0x6,-0x64(%rbp)
movl   $0x2,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,-0x70(%rbp)
mov    -0x68(%rbp),%eax
mov    %eax,-0x74(%rbp)
lea    -0x60(%rbp),%rdx
mov    -0x88(%rbp),%r8
mov    -0x80(%rbp),%r9
lea    -0x64(%rbp),%rdi
lea    -0x68(%rbp),%rsi
lea    -0x70(%rbp),%rcx
lea    -0x74(%rbp),%r10
lea    -0x6c(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <dgeqrf_@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x88,%rsp
movaps 0xf32(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xf16(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xefa(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xede(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xec2(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xea6(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movl   $0x6,0x1c(%rsp)
movl   $0x2,0x18(%rsp)
movl   $0x0,0x14(%rsp)
movl   $0x6,0x10(%rsp)
movl   $0x2,0xc(%rsp)
lea    0x14(%rsp),%rax
lea    0xc(%rsp),%r8
lea    0x1c(%rsp),%rdi
lea    0x18(%rsp),%rsi
lea    0x20(%rsp),%rdx
lea    0x10(%rsp),%rcx
push   %rax
push   %r8
call   1030 <dgeqrf_@plt>
add    $0x10,%rsp
xor    %eax,%eax
add    $0x88,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [6 x [2 x double]] [[2 x double] [double 0.000000e+00, double 2.000000e+00], [2 x double] [double 2.000000e+00, double -1.000000e+00], [2 x double] [double 2.000000e+00, double -1.000000e+00], [2 x double] [double 0.000000e+00, double 1.500000e+00], [2 x double] [double 2.000000e+00, double -1.000000e+00], [2 x double] [double 2.000000e+00, double -1.000000e+00]]
define i32 @main() {
%1 = alloca [6 x [2 x double]]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca double*
%8 = alloca double*
%9 = bitcast [6 x [2 x double]]* %1 to i8*
store i32 6, i32* %2
store i32 2, i32* %3
store i32 0, i32* %4
%10 = load i32, i32* %2
store i32 %10, i32* %5
%11 = load i32, i32* %3
store i32 %11, i32* %6
%12 = getelementptr inbounds [6 x [2 x double]], [6 x [2 x double]]* %1, i64 0, i64 0
%13 = bitcast [2 x double]* %12 to double**
%14 = load double*, double** %8
%15 = load double*, double** %7
%16 = call i32 @dgeqrf_(i32* %2, i32* %3, double** %13, i32* %5, double* %14, double* %15, i32* %6, i32* %4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [6 x [2 x double]] [[2 x double] [double 0.000000e+00, double 2.000000e+00], [2 x double] [double 2.000000e+00, double -1.000000e+00], [2 x double] [double 2.000000e+00, double -1.000000e+00], [2 x double] [double 0.000000e+00, double 1.500000e+00], [2 x double] [double 2.000000e+00, double -1.000000e+00], [2 x double] [double 2.000000e+00, double -1.000000e+00]]
define i32 @main() {
%1 = alloca [6 x [2 x double]]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = bitcast [6 x [2 x double]]* %1 to i8*
%8 = bitcast i32* %2 to i8*
store i32 6, i32* %2
%9 = bitcast i32* %3 to i8*
store i32 2, i32* %3
%10 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%11 = bitcast i32* %5 to i8*
store i32 6, i32* %5
%12 = bitcast i32* %6 to i8*
store i32 2, i32* %6
%13 = bitcast [6 x [2 x double]]* %1 to double**
%14 = call i32 @dgeqrf_(i32* %2, i32* %3, double** %13, i32* %5, double* undef, double* undef, i32* %6, i32* %4)
ret i32 0
}