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


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

LLVM IR (-O2):
define i32 @aa_cla_sgesdd(i8 signext %0, i32 %1, i32 %2, float* %3, i32 %4, float* %5, float* %6, i32 %7, float* %8, i32 %9, float* %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 @sgesdd_(i8* %14, i32* %15, i32* %16, float* %3, i32* %17, float* %5, float* %6, i32* %18, float* %8, i32* %19, float* %10, i32* %20, i32* %12, i32* %21)
%24 = load i32, i32* %21
ret i32 %24
}