#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*/ dgelsd_(int *, int *, int *, double *, int *, double *,
                           int *, double *, double *, int *, double *, int *,
                           int *, int *);
int aa_cla_dgelsd(int m, int n, int nrhs, double *A, int lda, double *B,
                  int ldb, double *S, double *rcond, int *rank, double *work,
                  int lwork, int *iwork) {
  int info = 0;
  dgelsd_(&m, &n, &nrhs, A, &lda, B, &ldb, S, rcond, rank, work, &lwork, iwork,
          &info);
  return info;
}


x86 assembly (clang, -O0):
<aa_cla_dgelsd>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %edi,-0x2c(%rbp)
mov    %esi,-0x30(%rbp)
mov    %edx,-0x34(%rbp)
mov    %rcx,-0x40(%rbp)
mov    %r8d,-0x44(%rbp)
mov    %r9,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
mov    -0x40(%rbp),%rcx
mov    -0x50(%rbp),%r9
mov    0x18(%rbp),%r12
mov    0x20(%rbp),%r15
mov    0x28(%rbp),%r14
mov    0x30(%rbp),%rbx
mov    0x40(%rbp),%r10
lea    -0x2c(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x34(%rbp),%rdx
lea    -0x44(%rbp),%r8
lea    0x10(%rbp),%r13
lea    0x38(%rbp),%r11
lea    -0x54(%rbp),%rax
mov    %r13,(%rsp)
mov    %r12,0x8(%rsp)
mov    %r15,0x10(%rsp)
mov    %r14,0x18(%rsp)
mov    %rbx,0x20(%rsp)
mov    %r11,0x28(%rsp)
mov    %r10,0x30(%rsp)
mov    %rax,0x38(%rsp)
call   1030 <dgelsd_@plt>
mov    -0x54(%rbp),%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_cla_dgelsd>:
sub    $0x58,%rsp
movups 0x68(%rsp),%xmm0
movups 0x78(%rsp),%xmm1
mov    0x90(%rsp),%rax
mov    %edi,0x54(%rsp)
mov    %esi,0x50(%rsp)
mov    %edx,0x4c(%rsp)
mov    %r8d,0x48(%rsp)
movl   $0x0,0x44(%rsp)
lea    0x44(%rsp),%rdx
mov    %rdx,0x38(%rsp)
mov    %rax,0x30(%rsp)
lea    0x88(%rsp),%rax
mov    %rax,0x28(%rsp)
movups %xmm1,0x18(%rsp)
movups %xmm0,0x8(%rsp)
lea    0x60(%rsp),%rax
mov    %rax,(%rsp)
lea    0x54(%rsp),%rdi
lea    0x50(%rsp),%rsi
lea    0x4c(%rsp),%rdx
lea    0x48(%rsp),%r8
call   1030 <dgelsd_@plt>
mov    0x44(%rsp),%eax
add    $0x58,%rsp
ret

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

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