#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*/ pm(double *, int, int);
int /*<<< orphan*/ svdu1v(double *, double *, int, double *, int);
int main(int argc, char **argv) {
  double ma[9] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
  double ou[100];
  double d[9];
  double ov[100];
  int m, n;
  m = 3;
  n = 2;
  pm(ma, m, n);
  svdu1v(d, ma, m, ov, n);
  pm(d, 1, 5);
  pm(ov, n, n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x700,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xeac(%rip),%rsi
mov    $0x48,%edx
call   1030 <memcpy@plt>
movl   $0x3,-0x6f4(%rbp)
movl   $0x2,-0x6f8(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x6f4(%rbp),%esi
mov    -0x6f8(%rbp),%edx
call   1050 <pm@plt>
lea    -0x3d0(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    -0x6f4(%rbp),%edx
lea    -0x6f0(%rbp),%rcx
mov    -0x6f8(%rbp),%r8d
call   1040 <svdu1v@plt>
lea    -0x3d0(%rbp),%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   1050 <pm@plt>
lea    -0x6f0(%rbp),%rdi
mov    -0x6f8(%rbp),%esi
mov    -0x6f8(%rbp),%edx
call   1050 <pm@plt>
xor    %eax,%eax
add    $0x700,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x3c0,%rsp
mov    0xf0d(%rip),%rax
mov    %rax,0x40(%rsp)
movaps 0xef1(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeb9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe9d(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x2,%edx
call   1040 <pm@plt>
lea    0x50(%rsp),%r14
lea    0xa0(%rsp),%r15
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x3,%edx
mov    %r15,%rcx
mov    $0x2,%r8d
call   1030 <svdu1v@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   1040 <pm@plt>
mov    %r15,%rdi
mov    $0x2,%esi
mov    $0x2,%edx
call   1040 <pm@plt>
xor    %eax,%eax
add    $0x3c0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.ma = [9 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00, double 9.000000e+00]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [9 x double]
%7 = alloca [100 x double]
%8 = alloca [9 x double]
%9 = alloca [100 x double]
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = bitcast [9 x double]* %6 to i8*
store i32 3, i32* %10
store i32 2, i32* %11
%13 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 0
%14 = load i32, i32* %10
%15 = load i32, i32* %11
%16 = call i32 @pm(double* %13, i32 %14, i32 %15)
%17 = getelementptr inbounds [9 x double], [9 x double]* %8, i64 0, i64 0
%18 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 0
%19 = load i32, i32* %10
%20 = getelementptr inbounds [100 x double], [100 x double]* %9, i64 0, i64 0
%21 = load i32, i32* %11
%22 = call i32 @svdu1v(double* %17, double* %18, i32 %19, double* %20, i32 %21)
%23 = getelementptr inbounds [9 x double], [9 x double]* %8, i64 0, i64 0
%24 = call i32 @pm(double* %23, i32 1, i32 5)
%25 = getelementptr inbounds [100 x double], [100 x double]* %9, i64 0, i64 0
%26 = load i32, i32* %11
%27 = load i32, i32* %11
%28 = call i32 @pm(double* %25, i32 %26, i32 %27)
ret i32 0
}

LLVM IR (-O2):
@__const.main.ma = [9 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00, double 9.000000e+00]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [9 x double]
%4 = alloca [9 x double]
%5 = alloca [100 x double]
%6 = bitcast [9 x double]* %3 to i8*
%7 = bitcast [9 x double]* %4 to i8*
%8 = bitcast [100 x double]* %5 to i8*
%9 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 0
%10 = call i32 @pm(double* %9, i32 3, i32 2)
%11 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 0
%12 = getelementptr inbounds [100 x double], [100 x double]* %5, i64 0, i64 0
%13 = call i32 @svdu1v(double* %11, double* %9, i32 3, double* %12, i32 2)
%14 = call i32 @pm(double* %11, i32 1, i32 5)
%15 = call i32 @pm(double* %12, i32 2, i32 2)
ret i32 0
}