#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 */
double **dmatrix(int, long, int, long);
int /*<<< orphan*/ free_dmatrix(double **, int, long, int, long);
int /*<<< orphan*/ multi_vec_matrix(double *, long, double **, long, long,
                                    double *);
int /*<<< orphan*/ transpose_matrix(double **, long, long, double **);
void multi_vec_Tmatrix(double *a, long n, double **b, long nr, long nc,
                       double *o) {
  double **tb;
  tb = dmatrix(1, nc, 1, nr);
  transpose_matrix(b, nr, nc, tb);
  multi_vec_matrix(a, n, tb, nc, nr, o);
  free_dmatrix(tb, 1, nc, 1, nr);
}


x86 assembly (clang, -O0):
<multi_vec_Tmatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rcx
mov    $0x1,%edx
mov    %edx,%edi
call   1040 <dmatrix@plt>
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x38(%rbp),%rcx
call   1050 <transpose_matrix@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <multi_vec_matrix@plt>
mov    -0x38(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%r8
mov    $0x1,%ecx
mov    %ecx,%esi
call   1060 <free_dmatrix@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multi_vec_Tmatrix>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,(%rsp)
mov    %r8,%rbx
mov    %rcx,%r14
mov    %rdx,%r12
mov    %rsi,%r13
mov    %rdi,%rbp
mov    $0x1,%edi
mov    %r8,%rsi
mov    $0x1,%edx
call   1040 <dmatrix@plt>
mov    %rax,%r15
mov    %r12,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1050 <transpose_matrix@plt>
mov    %rbp,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
mov    %rbx,%rcx
mov    %r14,%r8
mov    (%rsp),%r9
call   1030 <multi_vec_matrix@plt>
mov    %r15,%rdi
mov    $0x1,%esi
mov    %rbx,%rdx
mov    $0x1,%ecx
mov    %r14,%r8
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <free_dmatrix@plt>

LLVM IR (-O0):
define void @multi_vec_Tmatrix(double* %0, i64 %1, double** %2, i64 %3, i64 %4, double* %5) {
%7 = alloca double*
%8 = alloca i64
%9 = alloca double**
%10 = alloca i64
%11 = alloca i64
%12 = alloca double*
%13 = alloca double**
store double* %0, double** %7
store i64 %1, i64* %8
store double** %2, double*** %9
store i64 %3, i64* %10
store i64 %4, i64* %11
store double* %5, double** %12
%14 = load i64, i64* %11
%15 = load i64, i64* %10
%16 = call double** @dmatrix(i32 1, i64 %14, i32 1, i64 %15)
store double** %16, double*** %13
%17 = load double**, double*** %9
%18 = load i64, i64* %10
%19 = load i64, i64* %11
%20 = load double**, double*** %13
%21 = call i32 @transpose_matrix(double** %17, i64 %18, i64 %19, double** %20)
%22 = load double*, double** %7
%23 = load i64, i64* %8
%24 = load double**, double*** %13
%25 = load i64, i64* %11
%26 = load i64, i64* %10
%27 = load double*, double** %12
%28 = call i32 @multi_vec_matrix(double* %22, i64 %23, double** %24, i64 %25, i64 %26, double* %27)
%29 = load double**, double*** %13
%30 = load i64, i64* %11
%31 = load i64, i64* %10
%32 = call i32 @free_dmatrix(double** %29, i32 1, i64 %30, i32 1, i64 %31)
ret void
}

LLVM IR (-O2):
define void @multi_vec_Tmatrix(double* %0, i64 %1, double** %2, i64 %3, i64 %4, double* %5) {
%7 = tail call double** @dmatrix(i32 1, i64 %4, i32 1, i64 %3)
%8 = tail call i32 @transpose_matrix(double** %2, i64 %3, i64 %4, double** %7)
%9 = tail call i32 @multi_vec_matrix(double* %0, i64 %1, double** %7, i64 %4, i64 %3, double* %5)
%10 = tail call i32 @free_dmatrix(double** %7, i32 1, i64 %4, i32 1, i64 %3)
ret void
}