#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*/ dgesdd_(char *, int *, int *, double *, int *, double *,
                           double *, int *, double *, int *, double *, int *,
                           int *, int *);
int aa_cla_dgesdd(char jobz, int m, int n, double *A, int lda, double *S,
                  double *U, int ldu, double *VT, int ldvt, double *work,
                  int lwork, int *iwork) {
  int info = 0;
  dgesdd_(&jobz, &m, &n, A, &lda, S, U, &ldu, VT, &ldvt, work, &lwork, iwork,
          &info);
  return info;
}


x86 assembly (clang, -O0):
<aa_cla_dgesdd>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %dil,%al
mov    0x40(%rbp),%rdi
mov    0x38(%rbp),%edi
mov    0x30(%rbp),%rdi
mov    0x28(%rbp),%edi
mov    0x20(%rbp),%rdi
mov    0x18(%rbp),%edi
mov    0x10(%rbp),%rdi
mov    %al,-0x29(%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    0x10(%rbp),%r13
mov    0x20(%rbp),%r15
mov    0x30(%rbp),%rbx
mov    0x40(%rbp),%r10
lea    -0x29(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x34(%rbp),%rdx
lea    -0x44(%rbp),%r8
lea    0x18(%rbp),%r12
lea    0x28(%rbp),%r14
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 <dgesdd_@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_dgesdd>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20,%rsp
mov    0x50(%rsp),%r10
mov    0x60(%rsp),%r11
mov    0x70(%rsp),%r14
mov    0x80(%rsp),%r15
mov    %dil,0xf(%rsp)
mov    %esi,0x1c(%rsp)
mov    %edx,0x18(%rsp)
mov    %r8d,0x14(%rsp)
movl   $0x0,0x10(%rsp)
lea    0x10(%rsp),%rax
lea    0x78(%rsp),%rbx
lea    0x68(%rsp),%r12
lea    0x58(%rsp),%r13
lea    0xf(%rsp),%rdi
lea    0x1c(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x14(%rsp),%r8
push   %rax
push   %r15
push   %rbx
push   %r14
push   %r12
push   %r11
push   %r13
push   %r10
call   1030 <dgesdd_@plt>
add    $0x40,%rsp
mov    0x10(%rsp),%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

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