decompiled_code:
__int64 __fastcall cblas_ztrmv(unsigned int a1, unsigned int a2, unsigned int a3, __int64 a4, int a5, __int64 a6, char a7, _QWORD *a8, int a9)
{
signed int v10; // er13
_QWORD *v11; // rax
__int64 v12; // rsi
_QWORD *v13; // r12
_QWORD *v14; // rbp
__int64 result; // rax
__int64 v16; // r13
int v17[4]; // [rsp+Ch] [rbp-3Ch] BYREF
char v18; // [rsp+1Dh] [rbp-2Bh] BYREF
char v19; // [rsp+1Eh] [rbp-2Ah] BYREF
char v20[41]; // [rsp+1Fh] [rbp-29h] BYREF

v17[0] = a5;
RowMajorStrg = 0;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v19 = 85;
}
else
{
if ( a2 != 122 )
goto LABEL_21;
v19 = 76;
}
switch ( a3 )
{
case 'o':
v20[0] = 78;
break;
case 'p':
v20[0] = 84;
break;
case 'q':
v20[0] = 67;
break;
default:
goto LABEL_28;
}
if ( (_DWORD)a4 == 132 )
{
v18 = 85;
}
else
{
if ( (_DWORD)a4 != 131 )
goto LABEL_30;
v18 = 78;
}
result = ztrmv_(&v19, v20, &v18, v17, a6, &a7, a8, &a9);
}
else
{
if ( a1 == 101 )
{
RowMajorStrg = 1;
if ( a2 == 121 )
{
v19 = 76;
LABEL_6:
switch ( a3 )
{
case 'o':
v20[0] = 84;
v14 = a8;
v13 = 0LL;
v10 = 0;
break;
case 'p':
v20[0] = 78;
v14 = a8;
v13 = 0LL;
v10 = 0;
break;
case 'q':
v20[0] = 78;
if ( v17[0] <= 0 )
{
v14 = a8;
v13 = 0LL;
v10 = 0;
}
else
{
v10 = 2 * abs32(a9);
v11 = a8 + 1;
v12 = 8LL * v10 * v17[0];
v13 = &a8[(unsigned __int64)v12 / 8 + 1];
do
{
*v11 ^= LC4;
v11 += v10;
}
while ( v13 != v11 );
v14 = &v11[v12 / 0xFFFFFFFFFFFFFFF8LL];
}
break;
default:
LABEL_28:
result = cblas_xerbla(3LL, "cblas_ztrmv", "Illegal TransA setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( (_DWORD)a4 == 132 )
{
v18 = 85;
goto LABEL_37;
}
if ( (_DWORD)a4 == 131 )
{
v18 = 78;
LABEL_37:
result = ztrmv_(&v19, v20, &v18, v17, a6, &a7, a8, &a9);
if ( a3 == 113 && v17[0] > 0 )
{
v16 = 8LL * v10;
do
{
*v14 ^= LC4;
v14 = (_QWORD *)((char *)v14 + v16);
}
while ( v13 != v14 );
}
goto LABEL_48;
}
LABEL_30:
result = cblas_xerbla(4LL, "cblas_ztrmv", "Illegal Diag setting, %d\n", a4);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a2 == 122 )
{
v19 = 85;
goto LABEL_6;
}
LABEL_21:
result = cblas_xerbla(2LL, "cblas_ztrmv", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
result = cblas_xerbla(1LL, "cblas_ztrmv", "Illegal Order setting, %d\n", a1);
}
LABEL_48:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(unsigned int a1, unsigned int a2, unsigned int a3, __int64 a4, int a5, __int64 a6, char a7, _QWORD *a8, int a9)
{
signed int v10; // er13
_QWORD *v11; // rax
__int64 v12; // rsi
_QWORD *v13; // r12
_QWORD *v14; // rbp
__int64 result; // rax
__int64 v16; // r13
int v17[4]; // [rsp+Ch] [rbp-3Ch] BYREF
char v18; // [rsp+1Dh] [rbp-2Bh] BYREF
char v19; // [rsp+1Eh] [rbp-2Ah] BYREF
char v20[41]; // [rsp+1Fh] [rbp-29h] BYREF

v17[0] = a5;
RowMajorStrg = 0;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v19 = 85;
}
else
{
if ( a2 != 122 )
goto LABEL_21;
v19 = 76;
}
switch ( a3 )
{
case 'o':
v20[0] = 78;
break;
case 'p':
v20[0] = 84;
break;
case 'q':
v20[0] = 67;
break;
default:
goto LABEL_28;
}
if ( (_DWORD)a4 == 132 )
{
v18 = 85;
}
else
{
if ( (_DWORD)a4 != 131 )
goto LABEL_30;
v18 = 78;
}
result = ztrmv_(&v19, v20, &v18, v17, a6, &a7, a8, &a9);
}
else
{
if ( a1 == 101 )
{
RowMajorStrg = 1;
if ( a2 == 121 )
{
v19 = 76;
LABEL_6:
switch ( a3 )
{
case 'o':
v20[0] = 84;
v14 = a8;
v13 = 0LL;
v10 = 0;
break;
case 'p':
v20[0] = 78;
v14 = a8;
v13 = 0LL;
v10 = 0;
break;
case 'q':
v20[0] = 78;
if ( v17[0] <= 0 )
{
v14 = a8;
v13 = 0LL;
v10 = 0;
}
else
{
v10 = 2 * abs32(a9);
v11 = a8 + 1;
v12 = 8LL * v10 * v17[0];
v13 = &a8[(unsigned __int64)v12 / 8 + 1];
do
{
*v11 ^= LC4;
v11 += v10;
}
while ( v13 != v11 );
v14 = &v11[v12 / 0xFFFFFFFFFFFFFFF8LL];
}
break;
default:
LABEL_28:
result = cblas_xerbla(3LL, "cblas_ztrmv", "Illegal TransA setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( (_DWORD)a4 == 132 )
{
v18 = 85;
goto LABEL_37;
}
if ( (_DWORD)a4 == 131 )
{
v18 = 78;
LABEL_37:
result = ztrmv_(&v19, v20, &v18, v17, a6, &a7, a8, &a9);
if ( a3 == 113 && v17[0] > 0 )
{
v16 = 8LL * v10;
do
{
*v14 ^= LC4;
v14 = (_QWORD *)((char *)v14 + v16);
}
while ( v13 != v14 );
}
goto LABEL_48;
}
LABEL_30:
result = cblas_xerbla(4LL, "cblas_ztrmv", "Illegal Diag setting, %d\n", a4);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a2 == 122 )
{
v19 = 85;
goto LABEL_6;
}
LABEL_21:
result = cblas_xerbla(2LL, "cblas_ztrmv", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
result = cblas_xerbla(1LL, "cblas_ztrmv", "Illegal Order setting, %d\n", a1);
}
LABEL_48:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_ztrmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
                 const int N, const void *A, const int lda,
                 void *X, const int incX)
{
   char TA;
   char UL;
   char DI;
   int n, i=0, tincX;
   double *st=0,*x=(double *)X;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if (order == CblasColMajor)
   {
      if (Uplo == CblasUpper) UL = 'U';
      else if (Uplo == CblasLower) UL = 'L';
      else
      {
         cblas_xerbla(2, "cblas_ztrmv","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (TransA == CblasNoTrans) TA = 'N';
      else if (TransA == CblasTrans) TA = 'T';
      else if (TransA == CblasConjTrans) TA = 'C';
      else
      {
         cblas_xerbla(3, "cblas_ztrmv","Illegal TransA setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (Diag == CblasUnit) DI = 'U';
      else if (Diag == CblasNonUnit) DI = 'N';
      else
      {
         cblas_xerbla(4, "cblas_ztrmv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ztrmv_( &UL, &TA, &DI, &N, A, &lda, X,
                      &incX);
   }
   else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_ztrmv","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (TransA == CblasNoTrans) TA = 'T';
      else if (TransA == CblasTrans) TA = 'N';
      else if (TransA == CblasConjTrans)
      {
         TA = 'N';
         if ( N > 0)
         {
            if(incX > 0)
               tincX = incX;
            else
               tincX = -incX;
            i = tincX << 1;
            n = i * N;
            x++;
            st = x + n;
            do
            {
               *x = -(*x);
               x += i;
            }
            while (x != st);
            x -= n;
         }
      }
      else
      {
         cblas_xerbla(3, "cblas_ztrmv","Illegal TransA setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (Diag == CblasUnit) DI = 'U';
      else if (Diag == CblasNonUnit) DI = 'N';
      else
      {
         cblas_xerbla(4, "cblas_ztrmv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
         ztrmv_( &UL, &TA, &DI, &N, A, &lda, X,
                      &incX);
      if (TransA == CblasConjTrans)
      {
         if (N > 0)
         {
            do
            {
               *x = -(*x);
               x += i;
            }
            while (x != st);
         }
      }
   }
   else cblas_xerbla(1, "cblas_ztrmv", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_ztrmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, int N, void *A, int lda, void *X, int incX)
{
   char TA;
   char UL;
   char DI;
   int n; int i = 0; int tincX;
   double *st = 0; double *x = (double *)X;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if (order == CblasColMajor)
   {
      if (Uplo == CblasUpper) UL = 'U';
      else if (Uplo == CblasLower) UL = 'L';
      else
      {
         cblas_xerbla(2, "cblas_ztrmv","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (TransA == CblasNoTrans) TA = 'N';
      else if (TransA == CblasTrans) TA = 'T';
      else if (TransA == CblasConjTrans) TA = 'C';
      else
      {
         cblas_xerbla(3, "cblas_ztrmv","Illegal TransA setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (Diag == CblasUnit) DI = 'U';
      else if (Diag == CblasNonUnit) DI = 'N';
      else
      {
         cblas_xerbla(4, "cblas_ztrmv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ztrmv_( &UL, &TA, &DI, &N, A, &lda, X,
                      &incX);
   }
   else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_ztrmv","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (TransA == CblasNoTrans) TA = 'T';
      else if (TransA == CblasTrans) TA = 'N';
      else if (TransA == CblasConjTrans)
      {
         TA = 'N';
         if ( N > 0)
         {
            if(incX > 0)
               tincX = incX;
            else
               tincX = -incX;
            i = tincX << 1;
            n = i * N;
            x++;
            st = x + n;
            do
            {
               *x = -(*x);
               x += i;
            }
            while (x != st);
            x -= n;
         }
      }
      else
      {
         cblas_xerbla(3, "cblas_ztrmv","Illegal TransA setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (Diag == CblasUnit) DI = 'U';
      else if (Diag == CblasNonUnit) DI = 'N';
      else
      {
         cblas_xerbla(4, "cblas_ztrmv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
         ztrmv_( &UL, &TA, &DI, &N, A, &lda, X,
                      &incX);
      if (TransA == CblasConjTrans)
      {
         if (N > 0)
         {
            do
            {
               *x = -(*x);
               x += i;
            }
            while (x != st);
         }
      }
   }
   else cblas_xerbla(1, "cblas_ztrmv", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

variable_types: enum CBLAS_DIAG { CblasNonUnit=131, CblasUnit=132 }

variable_types: N int

variable_types:
X
void *

variable_types: incX int

variable_types: TA char

variable_types: DI char

variable_types: n int

variable_types: i int

variable_types: tincX int

variable_types:
st
double *

variable_types:
x
double *

user_defined_types: enum CBLAS_ORDER { CblasRowMajor=101, CblasColMajor=102 }

user_defined_types: enum CBLAS_UPLO { CblasUpper=121, CblasLower=122 }

user_defined_types: enum CBLAS_TRANSPOSE { CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113 }


repo: ivanjimenez/ipaap

decompiled_code:
__int64 __fastcall sasumtest_(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_sasum(*a1, a2, *a3);
}

canonical_decompiled_code:
__int64 __fastcall func0(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_sasum(*a1, a2, *a3);
}

original_code:
float sasumtest_(const int *N, float *X, const int *incX)
{
   return cblas_sasum(*N, X, *incX);
}

canonical_original_code:
float sasumtest_(int *N, float *X, int *incX)
{
   return cblas_sasum(*N, X, *incX);
}

variable_types:
N
int *

variable_types:
X
float *

variable_types:
incX
int *

return_type: float


decompiled_code:
__int64 __fastcall saxpytest_(unsigned int *a1, float *a2, __int64 a3, unsigned int *a4, __int64 a5, unsigned int *a6)
{
return cblas_saxpy(*a1, a3, *a4, a5, *a6, *a2);
}

canonical_decompiled_code:
__int64 __fastcall func1(unsigned int *a1, float *a2, __int64 a3, unsigned int *a4, __int64 a5, unsigned int *a6)
{
return cblas_saxpy(*a1, a3, *a4, a5, *a6, *a2);
}

original_code:
void saxpytest_(const int *N, const float *alpha, const float *X,
                    const int *incX, float *Y, const int *incY)
{
   cblas_saxpy(*N, *alpha, X, *incX, Y, *incY);
   return;
}

canonical_original_code:
void saxpytest_(int *N, float *alpha, float *X, int *incX, float *Y, int *incY)
{
   cblas_saxpy(*N, *alpha, X, *incX, Y, *incY);
   return;
}

variable_types:
alpha
float *

variable_types:
Y
float *

variable_types:
incY
int *

return_type: void


decompiled_code:
__int64 __fastcall scasumtest_(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_scasum(*a1, a2, *a3);
}

canonical_decompiled_code:
__int64 __fastcall func2(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_scasum(*a1, a2, *a3);
}

original_code:
float scasumtest_(const int *N, void *X, const int *incX)
{
   return cblas_scasum(*N, X, *incX);
}

canonical_original_code:
float scasumtest_(int *N, void *X, int *incX)
{
   return cblas_scasum(*N, X, *incX);
}


decompiled_code:
__int64 __fastcall scnrm2test_(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_scnrm2(*a1, a2, *a3);
}

canonical_decompiled_code:
__int64 __fastcall func3(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_scnrm2(*a1, a2, *a3);
}

original_code:
float scnrm2test_(const int *N, const void *X, const int *incX)
{
   return cblas_scnrm2(*N, X, *incX);
}

canonical_original_code:
float scnrm2test_(int *N, void *X, int *incX)
{
   return cblas_scnrm2(*N, X, *incX);
}


decompiled_code:
__int64 __fastcall scopytest_(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_scopy(*a1, a2, *a3, a4, *a5);
}

canonical_decompiled_code:
__int64 __fastcall func4(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_scopy(*a1, a2, *a3, a4, *a5);
}

original_code:
void scopytest_(const int *N, const float *X, const int *incX,
                    float *Y, const int *incY)
{
   cblas_scopy(*N, X, *incX, Y, *incY);
   return;
}

canonical_original_code:
void scopytest_(int *N, float *X, int *incX, float *Y, int *incY)
{
   cblas_scopy(*N, X, *incX, Y, *incY);
   return;
}


decompiled_code:
__int64 __fastcall sdottest_(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_sdot(*a1, a2, *a3, a4, *a5);
}

canonical_decompiled_code:
__int64 __fastcall func5(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_sdot(*a1, a2, *a3, a4, *a5);
}

original_code:
float sdottest_(const int *N, const float *X, const int *incX,
                        const float *Y, const int *incY)
{
   return cblas_sdot(*N, X, *incX, Y, *incY);
}

canonical_original_code:
float sdottest_(int *N, float *X, int *incX, float *Y, int *incY)
{
   return cblas_sdot(*N, X, *incX, Y, *incY);
}


decompiled_code:
__int64 __fastcall snrm2test_(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_snrm2(*a1, a2, *a3);
}

canonical_decompiled_code:
__int64 __fastcall func6(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_snrm2(*a1, a2, *a3);
}

original_code:
float snrm2test_(const int *N, const float *X, const int *incX)
{
   return cblas_snrm2(*N, X, *incX);
}

canonical_original_code:
float snrm2test_(int *N, float *X, int *incX)
{
   return cblas_snrm2(*N, X, *incX);
}


decompiled_code:
__int64 srotgtest_()
{
return cblas_srotg();
}

canonical_decompiled_code:
__int64 func7()
{
return cblas_srotg();
}

original_code:
void srotgtest_( float *a, float *b, float *c, float *s)
{
   cblas_srotg(a,b,c,s);
   return;
}

canonical_original_code:
void srotgtest_(float *a, float *b, float *c, float *s)
{
   cblas_srotg(a,b,c,s);
   return;
}

variable_types:
a
float *

variable_types:
b
float *

variable_types:
c
float *

variable_types:
s
float *


decompiled_code:
__int64 __fastcall srottest_(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5, float *a6, float *a7)
{
return cblas_srot(*a1, a2, *a3, a4, *a5, *a6, *a7);
}

canonical_decompiled_code:
__int64 __fastcall func8(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5, float *a6, float *a7)
{
return cblas_srot(*a1, a2, *a3, a4, *a5, *a6, *a7);
}

original_code:
void srottest_( const int *N, float *X, const int *incX, float *Y,
              const int *incY, const float *c, const float *s)
{
   cblas_srot(*N,X,*incX,Y,*incY,*c,*s);
   return;
}

canonical_original_code:
void srottest_(int *N, float *X, int *incX, float *Y, int *incY, float *c, float *s)
{
   cblas_srot(*N,X,*incX,Y,*incY,*c,*s);
   return;
}


decompiled_code:
__int64 __fastcall sscaltest_(unsigned int *a1, float *a2, __int64 a3, unsigned int *a4)
{
return cblas_sscal(*a1, a3, *a4, *a2);
}

canonical_decompiled_code:
__int64 __fastcall func9(unsigned int *a1, float *a2, __int64 a3, unsigned int *a4)
{
return cblas_sscal(*a1, a3, *a4, *a2);
}

original_code:
void sscaltest_(const int *N, const float *alpha, float *X,
                         const int *incX)
{
   cblas_sscal(*N, *alpha, X, *incX);
   return;
}

canonical_original_code:
void sscaltest_(int *N, float *alpha, float *X, int *incX)
{
   cblas_sscal(*N, *alpha, X, *incX);
   return;
}


decompiled_code:
__int64 __fastcall sswaptest_(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_sswap(*a1, a2, *a3, a4, *a5);
}

canonical_decompiled_code:
__int64 __fastcall func10(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_sswap(*a1, a2, *a3, a4, *a5);
}

original_code:
void sswaptest_( const int *N, float *X, const int *incX,
                          float *Y, const int *incY)
{
   cblas_sswap(*N,X,*incX,Y,*incY);
   return;
}

canonical_original_code:
void sswaptest_(int *N, float *X, int *incX, float *Y, int *incY)
{
   cblas_sswap(*N,X,*incX,Y,*incY);
   return;
}


decompiled_code:
__int64 __fastcall isamaxtest_(int *a1, __int64 a2, int *a3)
{
__int64 result; // rax

result = 0LL;
if ( *a1 > 0 && *a3 > 0 )
result = (unsigned int)cblas_isamax() + 1;
return result;
}

canonical_decompiled_code:
__int64 __fastcall func11(int *a1, __int64 a2, int *a3)
{
__int64 result; // rax

result = 0LL;
if ( *a1 > 0 && *a3 > 0 )
result = (unsigned int)cblas_isamax() + 1;
return result;
}

original_code:
int isamaxtest_(const int *N, const float *X, const int *incX)
{
   if (*N < 1 || *incX < 1) return(0);
   return (cblas_isamax(*N, X, *incX)+1);
}

canonical_original_code:
int isamaxtest_(int *N, float *X, int *incX)
{
   if (*N < 1 || *incX < 1) return(0);
   return (cblas_isamax(*N, X, *incX)+1);
}

return_type: int


decompiled_code:
__int64 cblas_srotg()
{
return srotg_();
}

canonical_decompiled_code:
__int64 func0()
{
return srotg_();
}

original_code:
void cblas_srotg( float *a, float *b, float *c, float *s)
{
   srotg_(a,b,c,s);
}

canonical_original_code:
void cblas_srotg(float *a, float *b, float *c, float *s)
{
   srotg_(a,b,c,s);
}


decompiled_code:
__int64 __fastcall zaxpytest_(unsigned int *a1, __int64 a2, __int64 a3, unsigned int *a4, __int64 a5, unsigned int *a6)
{
return cblas_zaxpy(*a1, a2, a3, *a4, a5, *a6);
}

canonical_decompiled_code:
__int64 __fastcall func0(unsigned int *a1, __int64 a2, __int64 a3, unsigned int *a4, __int64 a5, unsigned int *a6)
{
return cblas_zaxpy(*a1, a2, a3, *a4, a5, *a6);
}

original_code:
void zaxpytest_(const int *N, const void *alpha, void *X,
                    const int *incX, void *Y, const int *incY)
{
   cblas_zaxpy(*N, alpha, X, *incX, Y, *incY);
   return;
}

canonical_original_code:
void zaxpytest_(int *N, void *alpha, void *X, int *incX, void *Y, int *incY)
{
   cblas_zaxpy(*N, alpha, X, *incX, Y, *incY);
   return;
}

variable_types:
alpha
void *

variable_types:
X
void *

variable_types:
Y
void *


decompiled_code:
__int64 __fastcall zcopytest_(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_zcopy(*a1, a2, *a3, a4, *a5);
}

canonical_decompiled_code:
__int64 __fastcall func1(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_zcopy(*a1, a2, *a3, a4, *a5);
}

original_code:
void zcopytest_(const int *N, void *X, const int *incX,
                    void *Y, const int *incY)
{
   cblas_zcopy(*N, X, *incX, Y, *incY);
   return;
}

canonical_original_code:
void zcopytest_(int *N, void *X, int *incX, void *Y, int *incY)
{
   cblas_zcopy(*N, X, *incX, Y, *incY);
   return;
}


decompiled_code:
__int64 __fastcall zdotctest_(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_zdotc_sub(*a1, a2, *a3, a4, *a5);
}

canonical_decompiled_code:
__int64 __fastcall func2(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_zdotc_sub(*a1, a2, *a3, a4, *a5);
}

original_code:
void zdotctest_(const int *N, const void *X, const int *incX,
                     const void *Y, const int *incY,void *dotc)
{
   cblas_zdotc_sub(*N, X, *incX, Y, *incY, dotc);
   return;
}

canonical_original_code:
void zdotctest_(int *N, void *X, int *incX, void *Y, int *incY, void *dotc)
{
   cblas_zdotc_sub(*N, X, *incX, Y, *incY, dotc);
   return;
}

variable_types:
dotc
void *


decompiled_code:
__int64 __fastcall zdotutest_(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_zdotu_sub(*a1, a2, *a3, a4, *a5);
}

canonical_decompiled_code:
__int64 __fastcall func3(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_zdotu_sub(*a1, a2, *a3, a4, *a5);
}

original_code:
void zdotutest_(const int *N, void *X, const int *incX,
                        void *Y, const int *incY,void *dotu)
{
   cblas_zdotu_sub(*N, X, *incX, Y, *incY, dotu);
   return;
}

canonical_original_code:
void zdotutest_(int *N, void *X, int *incX, void *Y, int *incY, void *dotu)
{
   cblas_zdotu_sub(*N, X, *incX, Y, *incY, dotu);
   return;
}

variable_types:
dotu
void *


decompiled_code:
__int64 __fastcall zdscaltest_(unsigned int *a1, double *a2, __int64 a3, unsigned int *a4)
{
return cblas_zdscal(*a1, a3, *a4, *a2);
}

canonical_decompiled_code:
__int64 __fastcall func4(unsigned int *a1, double *a2, __int64 a3, unsigned int *a4)
{
return cblas_zdscal(*a1, a3, *a4, *a2);
}

original_code:
void zdscaltest_(const int *N, const double *alpha, void *X,
                         const int *incX)
{
   cblas_zdscal(*N, *alpha, X, *incX);
   return;
}

canonical_original_code:
void zdscaltest_(int *N, double *alpha, void *X, int *incX)
{
   cblas_zdscal(*N, *alpha, X, *incX);
   return;
}

variable_types:
alpha
double *


decompiled_code:
__int64 __fastcall zscaltest_(unsigned int *a1, __int64 a2, __int64 a3, unsigned int *a4)
{
return cblas_zscal(*a1, a2, a3, *a4);
}

canonical_decompiled_code:
__int64 __fastcall func5(unsigned int *a1, __int64 a2, __int64 a3, unsigned int *a4)
{
return cblas_zscal(*a1, a2, a3, *a4);
}

original_code:
void zscaltest_(const int *N, const void * *alpha, void *X,
                         const int *incX)
{
   cblas_zscal(*N, alpha, X, *incX);
   return;
}

canonical_original_code:
void zscaltest_(int *N, void **alpha, void *X, int *incX)
{
   cblas_zscal(*N, alpha, X, *incX);
   return;
}

variable_types:
alpha
void **


decompiled_code:
__int64 __fastcall zswaptest_(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_zswap(*a1, a2, *a3, a4, *a5);
}

canonical_decompiled_code:
__int64 __fastcall func6(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_zswap(*a1, a2, *a3, a4, *a5);
}

original_code:
void zswaptest_( const int *N, void *X, const int *incX,
                          void *Y, const int *incY)
{
   cblas_zswap(*N,X,*incX,Y,*incY);
   return;
}

canonical_original_code:
void zswaptest_(int *N, void *X, int *incX, void *Y, int *incY)
{
   cblas_zswap(*N,X,*incX,Y,*incY);
   return;
}

variable_types:
N
int *


decompiled_code:
__int64 __fastcall izamaxtest_(int *a1, __int64 a2, int *a3)
{
__int64 result; // rax

result = 0LL;
if ( *a1 > 0 && *a3 > 0 )
result = (unsigned int)cblas_izamax() + 1;
return result;
}

canonical_decompiled_code:
__int64 __fastcall func7(int *a1, __int64 a2, int *a3)
{
__int64 result; // rax

result = 0LL;
if ( *a1 > 0 && *a3 > 0 )
result = (unsigned int)cblas_izamax() + 1;
return result;
}

original_code:
int izamaxtest_(const int *N, const void *X, const int *incX)
{
   if (*N < 1 || *incX < 1) return(0);
   return(cblas_izamax(*N, X, *incX)+1);
}

canonical_original_code:
int izamaxtest_(int *N, void *X, int *incX)
{
   if (*N < 1 || *incX < 1) return(0);
   return(cblas_izamax(*N, X, *incX)+1);
}


decompiled_code:
__int64 __fastcall dznrm2test_(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_dznrm2(*a1, a2, *a3);
}

canonical_decompiled_code:
__int64 __fastcall func8(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_dznrm2(*a1, a2, *a3);
}

original_code:
double dznrm2test_(const int *N, const void *X, const int *incX)
{
   return cblas_dznrm2(*N, X, *incX);
}

canonical_original_code:
double dznrm2test_(int *N, void *X, int *incX)
{
   return cblas_dznrm2(*N, X, *incX);
}

return_type: double


decompiled_code:
__int64 __fastcall dzasumtest_(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_dzasum(*a1, a2, *a3);
}

canonical_decompiled_code:
__int64 __fastcall func9(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_dzasum(*a1, a2, *a3);
}

original_code:
double dzasumtest_(const int *N, void *X, const int *incX)
{
   return cblas_dzasum(*N, X, *incX);
}

canonical_original_code:
double dzasumtest_(int *N, void *X, int *incX)
{
   return cblas_dzasum(*N, X, *incX);
}


decompiled_code:
double __fastcall cblas_dsdot(int a1, __int64 a2, int a3, __int64 a4, int a5)
{
int v6; // [rsp+4h] [rbp-24h] BYREF
int v7; // [rsp+8h] [rbp-20h] BYREF
int v8[3]; // [rsp+Ch] [rbp-1Ch] BYREF
double v9[2]; // [rsp+18h] [rbp-10h] BYREF

v8[0] = a1;
v7 = a3;
v6 = a5;
dsdotsub_(v8, a2, &v7, a4, &v6, v9);
return v9[0];
}

canonical_decompiled_code:
double __fastcall func0(int a1, __int64 a2, int a3, __int64 a4, int a5)
{
int v6; // [rsp+4h] [rbp-24h] BYREF
int v7; // [rsp+8h] [rbp-20h] BYREF
int v8[3]; // [rsp+Ch] [rbp-1Ch] BYREF
double v9[2]; // [rsp+18h] [rbp-10h] BYREF

v8[0] = a1;
v7 = a3;
v6 = a5;
dsdotsub_(v8, a2, &v7, a4, &v6, v9);
return v9[0];
}

original_code:
double cblas_dsdot( const int N, const float *X,
                      const int incX, const float *Y, const int incY)
{
   double dot;
   dsdotsub_( &N, X, &incX, Y, &incY, &dot);
   return dot;
}

canonical_original_code:
double cblas_dsdot(int N, float *X, int incX, float *Y, int incY)
{
   double dot;
   dsdotsub_( &N, X, &incX, Y, &incY, &dot);
   return dot;
}

variable_types: N int

variable_types:
X
float *

variable_types: incX int

variable_types: incY int

variable_types: dot double


decompiled_code:
__int64 __fastcall caxpytest_(unsigned int *a1, __int64 a2, __int64 a3, unsigned int *a4, __int64 a5, unsigned int *a6)
{
return cblas_caxpy(*a1, a2, a3, *a4, a5, *a6);
}

canonical_decompiled_code:
__int64 __fastcall func0(unsigned int *a1, __int64 a2, __int64 a3, unsigned int *a4, __int64 a5, unsigned int *a6)
{
return cblas_caxpy(*a1, a2, a3, *a4, a5, *a6);
}

original_code:
void caxpytest_(const int *N, const void *alpha, void *X,
                    const int *incX, void *Y, const int *incY)
{
   cblas_caxpy(*N, alpha, X, *incX, Y, *incY);
   return;
}

canonical_original_code:
void caxpytest_(int *N, void *alpha, void *X, int *incX, void *Y, int *incY)
{
   cblas_caxpy(*N, alpha, X, *incX, Y, *incY);
   return;
}

variable_types:
incX
int *

variable_types:
incY
int *


decompiled_code:
__int64 __fastcall ccopytest_(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_ccopy(*a1, a2, *a3, a4, *a5);
}

canonical_decompiled_code:
__int64 __fastcall func1(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_ccopy(*a1, a2, *a3, a4, *a5);
}

original_code:
void ccopytest_(const int *N, void *X, const int *incX,
                    void *Y, const int *incY)
{
   cblas_ccopy(*N, X, *incX, Y, *incY);
   return;
}

canonical_original_code:
void ccopytest_(int *N, void *X, int *incX, void *Y, int *incY)
{
   cblas_ccopy(*N, X, *incX, Y, *incY);
   return;
}


decompiled_code:
__int64 __fastcall cdotctest_(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_cdotc_sub(*a1, a2, *a3, a4, *a5);
}

canonical_decompiled_code:
__int64 __fastcall func2(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_cdotc_sub(*a1, a2, *a3, a4, *a5);
}

original_code:
void cdotctest_(const int *N, void *X, const int *incX,
                        void *Y, const int *incY, void *dotc)
{
   cblas_cdotc_sub(*N, X, *incX, Y, *incY, dotc);
   return;
}

canonical_original_code:
void cdotctest_(int *N, void *X, int *incX, void *Y, int *incY, void *dotc)
{
   cblas_cdotc_sub(*N, X, *incX, Y, *incY, dotc);
   return;
}


decompiled_code:
__int64 __fastcall cdotutest_(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_cdotu_sub(*a1, a2, *a3, a4, *a5);
}

canonical_decompiled_code:
__int64 __fastcall func3(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_cdotu_sub(*a1, a2, *a3, a4, *a5);
}

original_code:
void cdotutest_(const int *N, void *X, const int *incX,
                        void *Y, const int *incY,void *dotu)
{
   cblas_cdotu_sub(*N, X, *incX, Y, *incY, dotu);
   return;
}

canonical_original_code:
void cdotutest_(int *N, void *X, int *incX, void *Y, int *incY, void *dotu)
{
   cblas_cdotu_sub(*N, X, *incX, Y, *incY, dotu);
   return;
}


decompiled_code:
__int64 __fastcall cscaltest_(unsigned int *a1, __int64 a2, __int64 a3, unsigned int *a4)
{
return cblas_cscal(*a1, a2, a3, *a4);
}

canonical_decompiled_code:
__int64 __fastcall func4(unsigned int *a1, __int64 a2, __int64 a3, unsigned int *a4)
{
return cblas_cscal(*a1, a2, a3, *a4);
}

original_code:
void cscaltest_(const int *N, const void * *alpha, void *X,
                         const int *incX)
{
   cblas_cscal(*N, alpha, X, *incX);
   return;
}

canonical_original_code:
void cscaltest_(int *N, void **alpha, void *X, int *incX)
{
   cblas_cscal(*N, alpha, X, *incX);
   return;
}


decompiled_code:
__int64 __fastcall csscaltest_(unsigned int *a1, float *a2, __int64 a3, unsigned int *a4)
{
return cblas_csscal(*a1, a3, *a4, *a2);
}

canonical_decompiled_code:
__int64 __fastcall func5(unsigned int *a1, float *a2, __int64 a3, unsigned int *a4)
{
return cblas_csscal(*a1, a3, *a4, *a2);
}

original_code:
void csscaltest_(const int *N, const float *alpha, void *X,
                         const int *incX)
{
   cblas_csscal(*N, *alpha, X, *incX);
   return;
}

canonical_original_code:
void csscaltest_(int *N, float *alpha, void *X, int *incX)
{
   cblas_csscal(*N, *alpha, X, *incX);
   return;
}

variable_types:
alpha
float *


decompiled_code:
__int64 __fastcall cswaptest_(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_cswap(*a1, a2, *a3, a4, *a5);
}

canonical_decompiled_code:
__int64 __fastcall func6(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_cswap(*a1, a2, *a3, a4, *a5);
}

original_code:
void cswaptest_( const int *N, void *X, const int *incX,
                          void *Y, const int *incY)
{
   cblas_cswap(*N,X,*incX,Y,*incY);
   return;
}

canonical_original_code:
void cswaptest_(int *N, void *X, int *incX, void *Y, int *incY)
{
   cblas_cswap(*N,X,*incX,Y,*incY);
   return;
}


decompiled_code:
__int64 __fastcall icamaxtest_(int *a1, __int64 a2, int *a3)
{
__int64 result; // rax

result = 0LL;
if ( *a1 > 0 && *a3 > 0 )
result = (unsigned int)cblas_icamax() + 1;
return result;
}

canonical_decompiled_code:
__int64 __fastcall func7(int *a1, __int64 a2, int *a3)
{
__int64 result; // rax

result = 0LL;
if ( *a1 > 0 && *a3 > 0 )
result = (unsigned int)cblas_icamax() + 1;
return result;
}

original_code:
int icamaxtest_(const int *N, const void *X, const int *incX)
{
   if (*N < 1 || *incX < 1) return(0);
   return (cblas_icamax(*N, X, *incX)+1);
}

canonical_original_code:
int icamaxtest_(int *N, void *X, int *incX)
{
   if (*N < 1 || *incX < 1) return(0);
   return (cblas_icamax(*N, X, *incX)+1);
}


decompiled_code:
__int64 __fastcall scnrm2test_(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_scnrm2(*a1, a2, *a3);
}

canonical_decompiled_code:
__int64 __fastcall func8(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_scnrm2(*a1, a2, *a3);
}

original_code:
float scnrm2test_(const int *N, const void *X, const int *incX)
{
   return cblas_scnrm2(*N, X, *incX);
}

canonical_original_code:
float scnrm2test_(int *N, void *X, int *incX)
{
   return cblas_scnrm2(*N, X, *incX);
}


decompiled_code:
__int64 __fastcall scasumtest_(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_scasum(*a1, a2, *a3);
}

canonical_decompiled_code:
__int64 __fastcall func9(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_scasum(*a1, a2, *a3);
}

original_code:
float scasumtest_(const int *N, void *X, const int *incX)
{
   return cblas_scasum(*N, X, *incX);
}

canonical_original_code:
float scasumtest_(int *N, void *X, int *incX)
{
   return cblas_scasum(*N, X, *incX);
}


decompiled_code:
__int64 __fastcall dasumtest_(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_dasum(*a1, a2, *a3);
}

canonical_decompiled_code:
__int64 __fastcall func0(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_dasum(*a1, a2, *a3);
}

original_code:
double dasumtest_(const int *N, double *X, const int *incX)
{
   return cblas_dasum(*N, X, *incX);
}

canonical_original_code:
double dasumtest_(int *N, double *X, int *incX)
{
   return cblas_dasum(*N, X, *incX);
}

variable_types:
X
double *


decompiled_code:
__int64 __fastcall daxpytest_(unsigned int *a1, double *a2, __int64 a3, unsigned int *a4, __int64 a5, unsigned int *a6)
{
return cblas_daxpy(*a1, a3, *a4, a5, *a6, *a2);
}

canonical_decompiled_code:
__int64 __fastcall func1(unsigned int *a1, double *a2, __int64 a3, unsigned int *a4, __int64 a5, unsigned int *a6)
{
return cblas_daxpy(*a1, a3, *a4, a5, *a6, *a2);
}

original_code:
void daxpytest_(const int *N, const double *alpha, const double *X,
                    const int *incX, double *Y, const int *incY)
{
   cblas_daxpy(*N, *alpha, X, *incX, Y, *incY);
   return;
}

canonical_original_code:
void daxpytest_(int *N, double *alpha, double *X, int *incX, double *Y, int *incY)
{
   cblas_daxpy(*N, *alpha, X, *incX, Y, *incY);
   return;
}

variable_types:
Y
double *


decompiled_code:
__int64 __fastcall dcopytest_(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_dcopy(*a1, a2, *a3, a4, *a5);
}

canonical_decompiled_code:
__int64 __fastcall func2(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_dcopy(*a1, a2, *a3, a4, *a5);
}

original_code:
void dcopytest_(const int *N, double *X, const int *incX,
                    double *Y, const int *incY)
{
   cblas_dcopy(*N, X, *incX, Y, *incY);
   return;
}

canonical_original_code:
void dcopytest_(int *N, double *X, int *incX, double *Y, int *incY)
{
   cblas_dcopy(*N, X, *incX, Y, *incY);
   return;
}


decompiled_code:
__int64 __fastcall ddottest_(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_ddot(*a1, a2, *a3, a4, *a5);
}

canonical_decompiled_code:
__int64 __fastcall func3(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_ddot(*a1, a2, *a3, a4, *a5);
}

original_code:
double ddottest_(const int *N, const double *X, const int *incX,
                const double *Y, const int *incY)
{
   return cblas_ddot(*N, X, *incX, Y, *incY);
}

canonical_original_code:
double ddottest_(int *N, double *X, int *incX, double *Y, int *incY)
{
   return cblas_ddot(*N, X, *incX, Y, *incY);
}


decompiled_code:
__int64 __fastcall dnrm2test_(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_dnrm2(*a1, a2, *a3);
}

canonical_decompiled_code:
__int64 __fastcall func4(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_dnrm2(*a1, a2, *a3);
}

original_code:
double dnrm2test_(const int *N, const double *X, const int *incX)
{
   return cblas_dnrm2(*N, X, *incX);
}

canonical_original_code:
double dnrm2test_(int *N, double *X, int *incX)
{
   return cblas_dnrm2(*N, X, *incX);
}


decompiled_code:
__int64 drotgtest_()
{
return cblas_drotg();
}

canonical_decompiled_code:
__int64 func5()
{
return cblas_drotg();
}

original_code:
void drotgtest_( double *a, double *b, double *c, double *s)
{
   cblas_drotg(a,b,c,s);
   return;
}

canonical_original_code:
void drotgtest_(double *a, double *b, double *c, double *s)
{
   cblas_drotg(a,b,c,s);
   return;
}

variable_types:
a
double *

variable_types:
b
double *

variable_types:
c
double *

variable_types:
s
double *


decompiled_code:
__int64 __fastcall drottest_(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5, double *a6, double *a7)
{
return cblas_drot(*a1, a2, *a3, a4, *a5, *a6, *a7);
}

canonical_decompiled_code:
__int64 __fastcall func6(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5, double *a6, double *a7)
{
return cblas_drot(*a1, a2, *a3, a4, *a5, *a6, *a7);
}

original_code:
void drottest_( const int *N, double *X, const int *incX, double *Y,
       const int *incY, const double *c, const double *s)
{
   cblas_drot(*N,X,*incX,Y,*incY,*c,*s);
   return;
}

canonical_original_code:
void drottest_(int *N, double *X, int *incX, double *Y, int *incY, double *c, double *s)
{
   cblas_drot(*N,X,*incX,Y,*incY,*c,*s);
   return;
}


decompiled_code:
__int64 __fastcall dscaltest_(unsigned int *a1, double *a2, __int64 a3, unsigned int *a4)
{
return cblas_dscal(*a1, a3, *a4, *a2);
}

canonical_decompiled_code:
__int64 __fastcall func7(unsigned int *a1, double *a2, __int64 a3, unsigned int *a4)
{
return cblas_dscal(*a1, a3, *a4, *a2);
}

original_code:
void dscaltest_(const int *N, const double *alpha, double *X,
                         const int *incX)
{
   cblas_dscal(*N, *alpha, X, *incX);
   return;
}

canonical_original_code:
void dscaltest_(int *N, double *alpha, double *X, int *incX)
{
   cblas_dscal(*N, *alpha, X, *incX);
   return;
}

variable_types:
alpha
double *


decompiled_code:
__int64 __fastcall dswaptest_(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_dswap(*a1, a2, *a3, a4, *a5);
}

canonical_decompiled_code:
__int64 __fastcall func8(unsigned int *a1, __int64 a2, unsigned int *a3, __int64 a4, unsigned int *a5)
{
return cblas_dswap(*a1, a2, *a3, a4, *a5);
}

original_code:
void dswaptest_( const int *N, double *X, const int *incX,
                          double *Y, const int *incY)
{
   cblas_dswap(*N,X,*incX,Y,*incY);
   return;
}

canonical_original_code:
void dswaptest_(int *N, double *X, int *incX, double *Y, int *incY)
{
   cblas_dswap(*N,X,*incX,Y,*incY);
   return;
}


decompiled_code:
__int64 __fastcall dzasumtest_(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_dzasum(*a1, a2, *a3);
}

canonical_decompiled_code:
__int64 __fastcall func9(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_dzasum(*a1, a2, *a3);
}

original_code:
double dzasumtest_(const int *N, void *X, const int *incX)
{
   return cblas_dzasum(*N, X, *incX);
}

canonical_original_code:
double dzasumtest_(int *N, void *X, int *incX)
{
   return cblas_dzasum(*N, X, *incX);
}

variable_types:
X
void *


decompiled_code:
__int64 __fastcall dznrm2test_(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_dznrm2(*a1, a2, *a3);
}

canonical_decompiled_code:
__int64 __fastcall func10(unsigned int *a1, __int64 a2, unsigned int *a3)
{
return cblas_dznrm2(*a1, a2, *a3);
}

original_code:
double dznrm2test_(const int *N, const void *X, const int *incX)
{
   return cblas_dznrm2(*N, X, *incX);
}

canonical_original_code:
double dznrm2test_(int *N, void *X, int *incX)
{
   return cblas_dznrm2(*N, X, *incX);
}

variable_types:
N
int *


decompiled_code:
__int64 __fastcall idamaxtest_(int *a1, __int64 a2, int *a3)
{
__int64 result; // rax

result = 0LL;
if ( *a1 > 0 && *a3 > 0 )
result = (unsigned int)cblas_idamax() + 1;
return result;
}

canonical_decompiled_code:
__int64 __fastcall func11(int *a1, __int64 a2, int *a3)
{
__int64 result; // rax

result = 0LL;
if ( *a1 > 0 && *a3 > 0 )
result = (unsigned int)cblas_idamax() + 1;
return result;
}

original_code:
int idamaxtest_(const int *N, const double *X, const int *incX)
{
   if (*N < 1 || *incX < 1) return(0);
   return (cblas_idamax(*N, X, *incX)+1);
}

canonical_original_code:
int idamaxtest_(int *N, double *X, int *incX)
{
   if (*N < 1 || *incX < 1) return(0);
   return (cblas_idamax(*N, X, *incX)+1);
}


decompiled_code:
__int64 __fastcall cblas_sswap(int a1, __int64 a2, int a3, __int64 a4, int a5)
{
int v6; // [rsp+4h] [rbp-14h] BYREF
int v7; // [rsp+8h] [rbp-10h] BYREF
int v8[3]; // [rsp+Ch] [rbp-Ch] BYREF

v8[0] = a1;
v7 = a3;
v6 = a5;
return sswap_(v8, a2, &v7, a4, &v6);
}

canonical_decompiled_code:
__int64 __fastcall func0(int a1, __int64 a2, int a3, __int64 a4, int a5)
{
int v6; // [rsp+4h] [rbp-14h] BYREF
int v7; // [rsp+8h] [rbp-10h] BYREF
int v8[3]; // [rsp+Ch] [rbp-Ch] BYREF

v8[0] = a1;
v7 = a3;
v6 = a5;
return sswap_(v8, a2, &v7, a4, &v6);
}

original_code:
void cblas_sswap( const int N, float *X, const int incX, float *Y,
                       const int incY)
{
   sswap_( &N, X, &incX, Y, &incY);
}

canonical_original_code:
void cblas_sswap(int N, float *X, int incX, float *Y, int incY)
{
   sswap_( &N, X, &incX, Y, &incY);
}

variable_types: N int

variable_types:
Y
float *


decompiled_code:
double __fastcall cblas_dasum(int a1, __int64 a2, int a3)
{
int v4; // [rsp+8h] [rbp-20h] BYREF
int v5[3]; // [rsp+Ch] [rbp-1Ch] BYREF
double v6[2]; // [rsp+18h] [rbp-10h] BYREF

v5[0] = a1;
v4 = a3;
dasumsub_(v5, a2, &v4, v6);
return v6[0];
}

canonical_decompiled_code:
double __fastcall func0(int a1, __int64 a2, int a3)
{
int v4; // [rsp+8h] [rbp-20h] BYREF
int v5[3]; // [rsp+Ch] [rbp-1Ch] BYREF
double v6[2]; // [rsp+18h] [rbp-10h] BYREF

v5[0] = a1;
v4 = a3;
dasumsub_(v5, a2, &v4, v6);
return v6[0];
}

original_code:
double cblas_dasum( const int N, const double *X, const int incX)
{
   double asum;
   dasumsub_( &N, X, &incX, &asum);
   return asum;
}

canonical_original_code:
double cblas_dasum(int N, double *X, int incX)
{
   double asum;
   dasumsub_( &N, X, &incX, &asum);
   return asum;
}

variable_types: incX int

variable_types: asum double


decompiled_code:
float __fastcall cblas_sdot(int a1, __int64 a2, int a3, __int64 a4, int a5)
{
int v6; // [rsp+4h] [rbp-24h] BYREF
int v7; // [rsp+8h] [rbp-20h] BYREF
int v8[4]; // [rsp+Ch] [rbp-1Ch] BYREF
float v9[3]; // [rsp+1Ch] [rbp-Ch] BYREF

v8[0] = a1;
v7 = a3;
v6 = a5;
sdotsub_(v8, a2, &v7, a4, &v6, v9);
return v9[0];
}

canonical_decompiled_code:
float __fastcall func0(int a1, __int64 a2, int a3, __int64 a4, int a5)
{
int v6; // [rsp+4h] [rbp-24h] BYREF
int v7; // [rsp+8h] [rbp-20h] BYREF
int v8[4]; // [rsp+Ch] [rbp-1Ch] BYREF
float v9[3]; // [rsp+1Ch] [rbp-Ch] BYREF

v8[0] = a1;
v7 = a3;
v6 = a5;
sdotsub_(v8, a2, &v7, a4, &v6, v9);
return v9[0];
}

original_code:
float cblas_sdot( const int N, const float *X,
                      const int incX, const float *Y, const int incY)
{
   float dot;
   sdotsub_( &N, X, &incX, Y, &incY, &dot);
   return dot;
}

canonical_original_code:
float cblas_sdot(int N, float *X, int incX, float *Y, int incY)
{
   float dot;
   sdotsub_( &N, X, &incX, Y, &incY, &dot);
   return dot;
}

variable_types:
X
float *

variable_types: incY int

variable_types: dot float


original_code:
void cblas_chbmv(const enum CBLAS_ORDER order,
                 const enum CBLAS_UPLO Uplo,const int N,const int K,
                 const void *alpha, const void *A, const int lda,
                 const void *X, const int incX, const void *beta,
                 void *Y, const int incY)
{
   char UL;
   int n, i=0, incx=incX;
   const float *xx= (float *)X, *alp= (float *)alpha, *bet = (float *)beta;
   float ALPHA[2],BETA[2];
   int tincY, tincx;
   float *x=(float *)X, *y=(float *)Y, *st=0, *tx;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if (order == CblasColMajor)
   {
      if (Uplo == CblasLower) UL = 'L';
      else if (Uplo == CblasUpper) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_chbmv","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      chbmv_(&UL, &N, &K, alpha, A, &lda, X,
                     &incx, beta, Y, &incY);
   }
   else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      ALPHA[0]= *alp;
      ALPHA[1]= -alp[1];
      BETA[0]= *bet;
      BETA[1]= -bet[1];
      if (N > 0)
      {
         n = N << 1;
         x = malloc(n*sizeof(float));
         tx = x;
         if( incX > 0 ) {
           i = incX << 1 ;
           tincx = 2;
           st= x+n;
         } else {
           i = incX *(-2);
           tincx = -2;
           st = x-2;
           x +=(n-2);
         }
         do
         {
           *x = *xx;
           x[1] = -xx[1];
           x += tincx ;
           xx += i;
         }
         while (x != st);
         x=tx;
            incx = 1;
         if(incY > 0)
           tincY = incY;
         else
           tincY = -incY;
         y++;
         i = tincY << 1;
         n = i * N ;
         st = y + n;
         do {
            *y = -(*y);
            y += i;
         } while(y != st);
         y -= n;
      } else
         x = (float *) X;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_chbmv","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      chbmv_(&UL, &N, &K, ALPHA,
                     A ,&lda, x,&incx, BETA, Y, &incY);
   }
   else
   {
      cblas_xerbla(1, "cblas_chbmv","Illegal Order setting, %d\n", order);
      CBLAS_CallFromC = 0;
      RowMajorStrg = 0;
      return;
   }
   if ( order == CblasRowMajor )
   {
      RowMajorStrg = 1;
      if(X!=x)
         free(x);
      if (N > 0)
      {
         do
         {
            *y = -(*y);
            y += i;
         }
         while (y != st);
      }
   }
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_chbmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int N, int K, void *alpha, void *A, int lda, void *X, int incX, void *beta, void *Y, int incY)
{
   char UL;
   int n; int i = 0; int incx = incX;
   float *xx = (float *)X; float *alp = (float *)alpha; float *bet = (float *)beta;
   float ALPHA[2]; float BETA[2];
   int tincY; int tincx;
   float *x = (float *)X; float *y = (float *)Y; float *st = 0; float *tx;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if (order == CblasColMajor)
   {
      if (Uplo == CblasLower) UL = 'L';
      else if (Uplo == CblasUpper) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_chbmv","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      chbmv_(&UL, &N, &K, alpha, A, &lda, X,
                     &incx, beta, Y, &incY);
   }
   else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      ALPHA[0]= *alp;
      ALPHA[1]= -alp[1];
      BETA[0]= *bet;
      BETA[1]= -bet[1];
      if (N > 0)
      {
         n = N << 1;
         x = malloc(n*sizeof(float));
         tx = x;
         if( incX > 0 ) {
           i = incX << 1 ;
           tincx = 2;
           st= x+n;
         } else {
           i = incX *(-2);
           tincx = -2;
           st = x-2;
           x +=(n-2);
         }
         do
         {
           *x = *xx;
           x[1] = -xx[1];
           x += tincx ;
           xx += i;
         }
         while (x != st);
         x=tx;
            incx = 1;
         if(incY > 0)
           tincY = incY;
         else
           tincY = -incY;
         y++;
         i = tincY << 1;
         n = i * N ;
         st = y + n;
         do {
            *y = -(*y);
            y += i;
         } while(y != st);
         y -= n;
      } else
         x = (float *) X;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_chbmv","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      chbmv_(&UL, &N, &K, ALPHA,
                     A ,&lda, x,&incx, BETA, Y, &incY);
   }
   else
   {
      cblas_xerbla(1, "cblas_chbmv","Illegal Order setting, %d\n", order);
      CBLAS_CallFromC = 0;
      RowMajorStrg = 0;
      return;
   }
   if ( order == CblasRowMajor )
   {
      RowMajorStrg = 1;
      if(X!=x)
         free(x);
      if (N > 0)
      {
         do
         {
            *y = -(*y);
            y += i;
         }
         while (y != st);
      }
   }
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

variable_types: enum CBLAS_ORDER { CblasRowMajor=101, CblasColMajor=102 }

variable_types: enum CBLAS_UPLO { CblasUpper=121, CblasLower=122 }

variable_types: K int

variable_types:
alpha
void *

variable_types:
A
void *

variable_types: lda int

variable_types:
beta
void *

variable_types:
Y
void *

variable_types: UL char

variable_types: n int

variable_types: i int

variable_types: incx int

variable_types:
xx
float *

variable_types:
alp
float *

variable_types:
bet
float *

variable_types:
ALPHA
float [2]

variable_types:
BETA
float [2]

variable_types: tincY int

variable_types: tincx int

variable_types:
x
float *

variable_types:
y
float *

variable_types:
st
float *

variable_types:
tx
float *

variable_types: RowMajorStrg int


decompiled_code:
__int64 __fastcall cblas_zdotu_sub(int a1, __int64 a2, int a3, __int64 a4, int a5)
{
int v6; // [rsp+4h] [rbp-14h] BYREF
int v7; // [rsp+8h] [rbp-10h] BYREF
int v8[3]; // [rsp+Ch] [rbp-Ch] BYREF

v8[0] = a1;
v7 = a3;
v6 = a5;
return zdotusub_(v8, a2, &v7, a4, &v6);
}

canonical_decompiled_code:
__int64 __fastcall func0(int a1, __int64 a2, int a3, __int64 a4, int a5)
{
int v6; // [rsp+4h] [rbp-14h] BYREF
int v7; // [rsp+8h] [rbp-10h] BYREF
int v8[3]; // [rsp+Ch] [rbp-Ch] BYREF

v8[0] = a1;
v7 = a3;
v6 = a5;
return zdotusub_(v8, a2, &v7, a4, &v6);
}

original_code:
void cblas_zdotu_sub( const int N, const void *X, const int incX,
                      const void *Y, const int incY, void *dotu)
{
   zdotusub_( &N, X, &incX, Y, &incY, dotu);
   return;
}

canonical_original_code:
void cblas_zdotu_sub(int N, void *X, int incX, void *Y, int incY, void *dotu)
{
   zdotusub_( &N, X, &incX, Y, &incY, dotu);
   return;
}

variable_types: N int

variable_types:
X
void *

variable_types: incX int

variable_types:
Y
void *

variable_types: incY int

variable_types:
dotu
void *


decompiled_code:
__int64 __fastcall cblas_zher2k(unsigned int a1, unsigned int a2, unsigned int a3, int a4, int a5, __int64 *a6, double a7, __int64 a8, char a9, __int64 a10, char a11, __int64 a12, char a13)
{
__int64 result; // rax
double v14; // [rsp+0h] [rbp-38h] BYREF
int v15; // [rsp+8h] [rbp-30h] BYREF
int v16; // [rsp+Ch] [rbp-2Ch] BYREF
__int64 v17[3]; // [rsp+10h] [rbp-28h] BYREF
char v18; // [rsp+2Eh] [rbp-Ah] BYREF
char v19[9]; // [rsp+2Fh] [rbp-9h] BYREF

v16 = a4;
v15 = a5;
v14 = a7;
CBLAS_CallFromC = 1;
RowMajorStrg = 0;
if ( a1 != 102 )
{
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_zher2k", "Illegal Order setting, %d\n", a1);
goto LABEL_30;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v19[0] = 76;
goto LABEL_6;
}
if ( a2 == 122 )
{
v19[0] = 85;
LABEL_6:
switch ( a3 )
{
case 'p':
v18 = 78;
goto LABEL_26;
case 'q':
v18 = 78;
goto LABEL_26;
case 'o':
v18 = 67;
LABEL_26:
v17[0] = *a6;
v17[1] = a6[1] ^ LC3;
result = zher2k_(v19, &v18, &v16, &v15, v17, a8, &a9, a10, &a11, &v14, a12, &a13);
goto LABEL_30;
}
LABEL_22:
result = cblas_xerbla(3LL, "cblas_zher2k", "Illegal Trans setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
LABEL_18:
result = cblas_xerbla(2LL, "cblas_zher2k", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a2 == 121 )
{
v19[0] = 85;
}
else
{
if ( a2 != 122 )
goto LABEL_18;
v19[0] = 76;
}
switch ( a3 )
{
case 'p':
v18 = 84;
break;
case 'q':
v18 = 67;
break;
case 'o':
v18 = 78;
break;
default:
goto LABEL_22;
}
result = zher2k_(v19, &v18, &v16, &v15, a6, a8, &a9, a10, &a11, &v14, a12, &a13);
LABEL_30:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(unsigned int a1, unsigned int a2, unsigned int a3, int a4, int a5, __int64 *a6, double a7, __int64 a8, char a9, __int64 a10, char a11, __int64 a12, char a13)
{
__int64 result; // rax
double v14; // [rsp+0h] [rbp-38h] BYREF
int v15; // [rsp+8h] [rbp-30h] BYREF
int v16; // [rsp+Ch] [rbp-2Ch] BYREF
__int64 v17[3]; // [rsp+10h] [rbp-28h] BYREF
char v18; // [rsp+2Eh] [rbp-Ah] BYREF
char v19[9]; // [rsp+2Fh] [rbp-9h] BYREF

v16 = a4;
v15 = a5;
v14 = a7;
CBLAS_CallFromC = 1;
RowMajorStrg = 0;
if ( a1 != 102 )
{
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_zher2k", "Illegal Order setting, %d\n", a1);
goto LABEL_30;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v19[0] = 76;
goto LABEL_6;
}
if ( a2 == 122 )
{
v19[0] = 85;
LABEL_6:
switch ( a3 )
{
case 'p':
v18 = 78;
goto LABEL_26;
case 'q':
v18 = 78;
goto LABEL_26;
case 'o':
v18 = 67;
LABEL_26:
v17[0] = *a6;
v17[1] = a6[1] ^ LC3;
result = zher2k_(v19, &v18, &v16, &v15, v17, a8, &a9, a10, &a11, &v14, a12, &a13);
goto LABEL_30;
}
LABEL_22:
result = cblas_xerbla(3LL, "cblas_zher2k", "Illegal Trans setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
LABEL_18:
result = cblas_xerbla(2LL, "cblas_zher2k", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a2 == 121 )
{
v19[0] = 85;
}
else
{
if ( a2 != 122 )
goto LABEL_18;
v19[0] = 76;
}
switch ( a3 )
{
case 'p':
v18 = 84;
break;
case 'q':
v18 = 67;
break;
case 'o':
v18 = 78;
break;
default:
goto LABEL_22;
}
result = zher2k_(v19, &v18, &v16, &v15, a6, a8, &a9, a10, &a11, &v14, a12, &a13);
LABEL_30:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_zher2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
                  const void *alpha, const void *A, const int lda,
                  const void *B, const int ldb, const double beta,
                  void *C, const int ldc)
{
   char UL, TR;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   double ALPHA[2];
   const double *alp=(double *)alpha;
   CBLAS_CallFromC = 1;
   RowMajorStrg = 0;
   if( Order == CblasColMajor )
   {
      if( Uplo == CblasUpper) UL='U';
      else if ( Uplo == CblasLower ) UL='L';
      else
      {
         cblas_xerbla(2, "cblas_zher2k", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Trans == CblasTrans) TR ='T';
      else if ( Trans == CblasConjTrans ) TR='C';
      else if ( Trans == CblasNoTrans ) TR='N';
      else
      {
         cblas_xerbla(3, "cblas_zher2k", "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zher2k_(&UL, &TR, &N, &K, alpha, A, &lda, B, &ldb, &beta, C, &ldc);
   } else if (Order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if( Uplo == CblasUpper) UL='L';
      else if ( Uplo == CblasLower ) UL='U';
      else
      {
         cblas_xerbla(2, "cblas_zher2k", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Trans == CblasTrans) TR ='N';
      else if ( Trans == CblasConjTrans ) TR='N';
      else if ( Trans == CblasNoTrans ) TR='C';
      else
      {
         cblas_xerbla(3, "cblas_zher2k", "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ALPHA[0]= *alp;
      ALPHA[1]= -alp[1];
      zher2k_(&UL,&TR, &N, &K, ALPHA, A, &lda, B, &ldb, &beta, C, &ldc);
   } else cblas_xerbla(1, "cblas_zher2k", "Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_zher2k(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, int N, int K, void *alpha, void *A, int lda, void *B, int ldb, double beta, void *C, int ldc)
{
   char UL; char TR;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   double ALPHA[2];
   double *alp = (double *)alpha;
   CBLAS_CallFromC = 1;
   RowMajorStrg = 0;
   if( Order == CblasColMajor )
   {
      if( Uplo == CblasUpper) UL='U';
      else if ( Uplo == CblasLower ) UL='L';
      else
      {
         cblas_xerbla(2, "cblas_zher2k", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Trans == CblasTrans) TR ='T';
      else if ( Trans == CblasConjTrans ) TR='C';
      else if ( Trans == CblasNoTrans ) TR='N';
      else
      {
         cblas_xerbla(3, "cblas_zher2k", "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zher2k_(&UL, &TR, &N, &K, alpha, A, &lda, B, &ldb, &beta, C, &ldc);
   } else if (Order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if( Uplo == CblasUpper) UL='L';
      else if ( Uplo == CblasLower ) UL='U';
      else
      {
         cblas_xerbla(2, "cblas_zher2k", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Trans == CblasTrans) TR ='N';
      else if ( Trans == CblasConjTrans ) TR='N';
      else if ( Trans == CblasNoTrans ) TR='C';
      else
      {
         cblas_xerbla(3, "cblas_zher2k", "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ALPHA[0]= *alp;
      ALPHA[1]= -alp[1];
      zher2k_(&UL,&TR, &N, &K, ALPHA, A, &lda, B, &ldb, &beta, C, &ldc);
   } else cblas_xerbla(1, "cblas_zher2k", "Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

variable_types: enum CBLAS_ORDER { CblasRowMajor=101, CblasColMajor=102 }

variable_types: enum CBLAS_UPLO { CblasUpper=121, CblasLower=122 }

variable_types: enum CBLAS_TRANSPOSE { CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113 }

variable_types: K int

variable_types:
alpha
void *

variable_types:
A
void *

variable_types: lda int

variable_types:
B
void *

variable_types: ldb int

variable_types: beta double

variable_types:
C
void *

variable_types: ldc int

variable_types: UL char

variable_types: TR char

variable_types:
ALPHA
double [2]

variable_types:
alp
double *


original_code:
void cblas_cgbmv(const enum CBLAS_ORDER order,
                 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
                 const int KL, const int KU,
                 const void *alpha, const void *A, const int lda,
                 const void *X, const int incX, const void *beta,
                 void *Y, const int incY)
{
   char TA;
   int n=0, i=0, incx=incX;
   const float *xx= (float *)X, *alp= (float *)alpha, *bet = (float *)beta;
   float ALPHA[2],BETA[2];
   int tincY, tincx;
   float *x=(float *)X, *y=(float *)Y, *st=0, *tx=0;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if (order == CblasColMajor)
   {
      if (TransA == CblasNoTrans) TA = 'N';
      else if (TransA == CblasTrans) TA = 'T';
      else if (TransA == CblasConjTrans) TA = 'C';
      else
      {
         cblas_xerbla(2, "cblas_cgbmv","Illegal TransA setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      cgbmv_(&TA, &M, &N, &KL, &KU, alpha,
                     A, &lda, X, &incx, beta, Y, &incY);
   }
   else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (TransA == CblasNoTrans) TA = 'T';
      else if (TransA == CblasTrans) TA = 'N';
      else if (TransA == CblasConjTrans)
      {
         ALPHA[0]= *alp;
         ALPHA[1]= -alp[1];
         BETA[0]= *bet;
         BETA[1]= -bet[1];
         TA = 'N';
         if (M > 0)
         {
            n = M << 1;
            x = malloc(n*sizeof(float));
            tx = x;
            if( incX > 0 ) {
               i = incX << 1 ;
               tincx = 2;
               st= x+n;
            } else {
               i = incX *(-2);
               tincx = -2;
               st = x-2;
               x +=(n-2);
            }
            do
            {
               *x = *xx;
               x[1] = -xx[1];
               x += tincx ;
               xx += i;
            }
            while (x != st);
            x=tx;
               incx = 1;
            if( incY > 0 )
              tincY = incY;
            else
              tincY = -incY;
            y++;
            if (N > 0)
            {
               i = tincY << 1;
               n = i * N ;
               st = y + n;
               do {
                  *y = -(*y);
                  y += i;
               } while(y != st);
               y -= n;
            }
         }
         else x = (float *) X;
      }
      else
      {
         cblas_xerbla(2, "cblas_cgbmv","Illegal TransA setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (TransA == CblasConjTrans)
         cgbmv_(&TA, &N, &M, &KU, &KL, ALPHA,
                        A ,&lda, x,&incx, BETA, Y, &incY);
      else
         cgbmv_(&TA, &N, &M, &KU, &KL, alpha,
                        A ,&lda, x,&incx, beta, Y, &incY);
      if (TransA == CblasConjTrans)
      {
         if (x != X) free(x);
         if (N > 0)
         {
            do
            {
               *y = -(*y);
               y += i;
            }
            while (y != st);
         }
      }
   }
   else cblas_xerbla(1, "cblas_cgbmv", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
}

canonical_original_code:
void cblas_cgbmv(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, int M, int N, int KL, int KU, void *alpha, void *A, int lda, void *X, int incX, void *beta, void *Y, int incY)
{
   char TA;
   int n = 0; int i = 0; int incx = incX;
   float *xx = (float *)X; float *alp = (float *)alpha; float *bet = (float *)beta;
   float ALPHA[2]; float BETA[2];
   int tincY; int tincx;
   float *x = (float *)X; float *y = (float *)Y; float *st = 0; float *tx = 0;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if (order == CblasColMajor)
   {
      if (TransA == CblasNoTrans) TA = 'N';
      else if (TransA == CblasTrans) TA = 'T';
      else if (TransA == CblasConjTrans) TA = 'C';
      else
      {
         cblas_xerbla(2, "cblas_cgbmv","Illegal TransA setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      cgbmv_(&TA, &M, &N, &KL, &KU, alpha,
                     A, &lda, X, &incx, beta, Y, &incY);
   }
   else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (TransA == CblasNoTrans) TA = 'T';
      else if (TransA == CblasTrans) TA = 'N';
      else if (TransA == CblasConjTrans)
      {
         ALPHA[0]= *alp;
         ALPHA[1]= -alp[1];
         BETA[0]= *bet;
         BETA[1]= -bet[1];
         TA = 'N';
         if (M > 0)
         {
            n = M << 1;
            x = malloc(n*sizeof(float));
            tx = x;
            if( incX > 0 ) {
               i = incX << 1 ;
               tincx = 2;
               st= x+n;
            } else {
               i = incX *(-2);
               tincx = -2;
               st = x-2;
               x +=(n-2);
            }
            do
            {
               *x = *xx;
               x[1] = -xx[1];
               x += tincx ;
               xx += i;
            }
            while (x != st);
            x=tx;
               incx = 1;
            if( incY > 0 )
              tincY = incY;
            else
              tincY = -incY;
            y++;
            if (N > 0)
            {
               i = tincY << 1;
               n = i * N ;
               st = y + n;
               do {
                  *y = -(*y);
                  y += i;
               } while(y != st);
               y -= n;
            }
         }
         else x = (float *) X;
      }
      else
      {
         cblas_xerbla(2, "cblas_cgbmv","Illegal TransA setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (TransA == CblasConjTrans)
         cgbmv_(&TA, &N, &M, &KU, &KL, ALPHA,
                        A ,&lda, x,&incx, BETA, Y, &incY);
      else
         cgbmv_(&TA, &N, &M, &KU, &KL, alpha,
                        A ,&lda, x,&incx, beta, Y, &incY);
      if (TransA == CblasConjTrans)
      {
         if (x != X) free(x);
         if (N > 0)
         {
            do
            {
               *y = -(*y);
               y += i;
            }
            while (y != st);
         }
      }
   }
   else cblas_xerbla(1, "cblas_cgbmv", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
}

variable_types: M int

variable_types: N int

variable_types: KL int

variable_types: KU int

variable_types:
X
void *

variable_types: incX int

variable_types:
beta
void *

variable_types:
Y
void *

variable_types: incY int

variable_types: TA char

variable_types: n int

variable_types: i int

variable_types: incx int

variable_types:
xx
float *

variable_types:
alp
float *

variable_types:
bet
float *

variable_types:
ALPHA
float [2]

variable_types:
BETA
float [2]

variable_types: tincY int

variable_types: tincx int

variable_types:
x
float *

variable_types:
y
float *

variable_types:
st
float *

variable_types:
tx
float *

variable_types: RowMajorStrg int


decompiled_code:
__int64 __fastcall cblas_ssymv(unsigned int a1, unsigned int a2, int a3, __int64 a4, int a5, float a6)
{
__int64 result; // rax
int v7; // [rsp+4h] [rbp-24h] BYREF
float v8; // [rsp+8h] [rbp-20h] BYREF
int v9[4]; // [rsp+Ch] [rbp-1Ch] BYREF
char v10[9]; // [rsp+1Fh] [rbp-9h] BYREF

v9[0] = a3;
v8 = a6;
v7 = a5;
RowMajorStrg = 0;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v10[0] = 85;
goto LABEL_6;
}
if ( a2 == 122 )
{
v10[0] = 76;
goto LABEL_6;
}
LABEL_11:
result = cblas_xerbla(2LL, "cblas_ssymv", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_ssymv", "Illegal Order setting, %d\n", a1);
goto LABEL_15;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v10[0] = 76;
goto LABEL_6;
}
if ( a2 != 122 )
goto LABEL_11;
v10[0] = 85;
LABEL_6:
result = ssymv_(v10, v9, &v8, a4, &v7);
LABEL_15:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(unsigned int a1, unsigned int a2, int a3, __int64 a4, int a5, float a6)
{
__int64 result; // rax
int v7; // [rsp+4h] [rbp-24h] BYREF
float v8; // [rsp+8h] [rbp-20h] BYREF
int v9[4]; // [rsp+Ch] [rbp-1Ch] BYREF
char v10[9]; // [rsp+1Fh] [rbp-9h] BYREF

v9[0] = a3;
v8 = a6;
v7 = a5;
RowMajorStrg = 0;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v10[0] = 85;
goto LABEL_6;
}
if ( a2 == 122 )
{
v10[0] = 76;
goto LABEL_6;
}
LABEL_11:
result = cblas_xerbla(2LL, "cblas_ssymv", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_ssymv", "Illegal Order setting, %d\n", a1);
goto LABEL_15;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v10[0] = 76;
goto LABEL_6;
}
if ( a2 != 122 )
goto LABEL_11;
v10[0] = 85;
LABEL_6:
result = ssymv_(v10, v9, &v8, a4, &v7);
LABEL_15:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_ssymv(const enum CBLAS_ORDER order,
                 const enum CBLAS_UPLO Uplo, const int N,
                 const float alpha, const float *A, const int lda,
                 const float *X, const int incX, const float beta,
                 float *Y, const int incY)
{
   char UL;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if (order == CblasColMajor)
   {
      if (Uplo == CblasUpper) UL = 'U';
      else if (Uplo == CblasLower) UL = 'L';
      else
      {
         cblas_xerbla(2, "cblas_ssymv","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ssymv_(&UL, &N, &alpha, A, &lda, X,
                     &incX, &beta, Y, &incY);
   }
   else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_ssymv","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ssymv_(&UL, &N, &alpha,
                     A ,&lda, X,&incX, &beta, Y, &incY);
   }
   else cblas_xerbla(1, "cblas_ssymv", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_ssymv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int N, float alpha, float *A, int lda, float *X, int incX, float beta, float *Y, int incY)
{
   char UL;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if (order == CblasColMajor)
   {
      if (Uplo == CblasUpper) UL = 'U';
      else if (Uplo == CblasLower) UL = 'L';
      else
      {
         cblas_xerbla(2, "cblas_ssymv","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ssymv_(&UL, &N, &alpha, A, &lda, X,
                     &incX, &beta, Y, &incY);
   }
   else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_ssymv","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ssymv_(&UL, &N, &alpha,
                     A ,&lda, X,&incX, &beta, Y, &incY);
   }
   else cblas_xerbla(1, "cblas_ssymv", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

variable_types: enum CBLAS_ORDER { CblasRowMajor=101, CblasColMajor=102 }

variable_types: enum CBLAS_UPLO { CblasUpper=121, CblasLower=122 }

variable_types: N int

variable_types: alpha float

variable_types:
A
float *

variable_types: lda int

variable_types:
X
float *

variable_types: incX int

variable_types: beta float

variable_types:
Y
float *

variable_types: incY int

variable_types: UL char


original_code:
void cblas_zher(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
                const int N, const double alpha, const void *X, const int incX
                ,void *A, const int lda)
{
   char UL;
   int n, i, tincx, incx=incX;
   double *x=(double *)X, *xx=(double *)X, *tx, *st;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if (order == CblasColMajor)
   {
      if (Uplo == CblasLower) UL = 'L';
      else if (Uplo == CblasUpper) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_zher","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zher_(&UL, &N, &alpha, X, &incx, A, &lda);
   } else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_zher","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (N > 0)
      {
         n = N << 1;
         x = malloc(n*sizeof(double));
         tx = x;
         if( incX > 0 ) {
            i = incX << 1 ;
            tincx = 2;
            st= x+n;
         } else {
            i = incX *(-2);
            tincx = -2;
            st = x-2;
            x +=(n-2);
         }
         do
         {
            *x = *xx;
            x[1] = -xx[1];
            x += tincx ;
            xx += i;
         }
         while (x != st);
         x=tx;
           incx = 1;
      }
      else x = (double *) X;
      zher_(&UL, &N, &alpha, x, &incx, A, &lda);
   } else cblas_xerbla(1, "cblas_zher", "Illegal Order setting, %d\n", order);
   if(X!=x)
      free(x);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_zher(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int N, double alpha, void *X, int incX, void *A, int lda)
{
   char UL;
   int n; int i; int tincx; int incx = incX;
   double *x = (double *)X; double *xx = (double *)X; double *tx; double *st;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if (order == CblasColMajor)
   {
      if (Uplo == CblasLower) UL = 'L';
      else if (Uplo == CblasUpper) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_zher","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zher_(&UL, &N, &alpha, X, &incx, A, &lda);
   } else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_zher","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (N > 0)
      {
         n = N << 1;
         x = malloc(n*sizeof(double));
         tx = x;
         if( incX > 0 ) {
            i = incX << 1 ;
            tincx = 2;
            st= x+n;
         } else {
            i = incX *(-2);
            tincx = -2;
            st = x-2;
            x +=(n-2);
         }
         do
         {
            *x = *xx;
            x[1] = -xx[1];
            x += tincx ;
            xx += i;
         }
         while (x != st);
         x=tx;
           incx = 1;
      }
      else x = (double *) X;
      zher_(&UL, &N, &alpha, x, &incx, A, &lda);
   } else cblas_xerbla(1, "cblas_zher", "Illegal Order setting, %d\n", order);
   if(X!=x)
      free(x);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

variable_types: alpha double

variable_types:
X
void *

variable_types:
A
void *

variable_types: n int

variable_types: i int

variable_types: tincx int

variable_types: incx int

variable_types:
x
double *

variable_types:
xx
double *

variable_types:
tx
double *

variable_types:
st
double *


decompiled_code:
__int64 __fastcall cblas_cdotc_sub(int a1, __int64 a2, int a3, __int64 a4, int a5)
{
int v6; // [rsp+4h] [rbp-14h] BYREF
int v7; // [rsp+8h] [rbp-10h] BYREF
int v8[3]; // [rsp+Ch] [rbp-Ch] BYREF

v8[0] = a1;
v7 = a3;
v6 = a5;
return cdotcsub_(v8, a2, &v7, a4, &v6);
}

canonical_decompiled_code:
__int64 __fastcall func0(int a1, __int64 a2, int a3, __int64 a4, int a5)
{
int v6; // [rsp+4h] [rbp-14h] BYREF
int v7; // [rsp+8h] [rbp-10h] BYREF
int v8[3]; // [rsp+Ch] [rbp-Ch] BYREF

v8[0] = a1;
v7 = a3;
v6 = a5;
return cdotcsub_(v8, a2, &v7, a4, &v6);
}

original_code:
void cblas_cdotc_sub( const int N, const void *X, const int incX,
                    const void *Y, const int incY,void *dotc)
{
   cdotcsub_( &N, X, &incX, Y, &incY, dotc);
}

canonical_original_code:
void cblas_cdotc_sub(int N, void *X, int incX, void *Y, int incY, void *dotc)
{
   cdotcsub_( &N, X, &incX, Y, &incY, dotc);
}

variable_types: N int

variable_types:
Y
void *

variable_types:
dotc
void *


decompiled_code:
__int64 __fastcall cblas_strmm(unsigned int a1, unsigned int a2, unsigned int a3, __int64 a4, unsigned int a5, int a6, float a7, char a8, __int64 a9, char a10, __int64 a11, char a12)
{
__int64 result; // rax
float v13; // [rsp+8h] [rbp-20h] BYREF
int v14[4]; // [rsp+Ch] [rbp-1Ch] BYREF
char v15; // [rsp+1Ch] [rbp-Ch] BYREF
char v16; // [rsp+1Dh] [rbp-Bh] BYREF
char v17; // [rsp+1Eh] [rbp-Ah] BYREF
char v18[9]; // [rsp+1Fh] [rbp-9h] BYREF

v14[0] = a6;
v13 = a7;
RowMajorStrg = 0;
CBLAS_CallFromC = 1;
if ( a1 != 102 )
{
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_strmm", "Illegal Order setting, %d\n", a1);
goto LABEL_50;
}
RowMajorStrg = 1;
if ( a2 == 142 )
{
v16 = 76;
goto LABEL_6;
}
if ( a2 == 141 )
{
v16 = 82;
LABEL_6:
if ( a3 == 121 )
{
v18[0] = 76;
goto LABEL_9;
}
if ( a3 == 122 )
{
v18[0] = 85;
LABEL_9:
switch ( (_DWORD)a4 )
{
case 'p':
v17 = 84;
goto LABEL_41;
case 'q':
v17 = 67;
goto LABEL_41;
case 'o':
v17 = 78;
LABEL_41:
if ( a5 == 132 )
{
v15 = 85;
goto LABEL_44;
}
if ( a5 == 131 )
{
v15 = 78;
LABEL_44:
result = strmm_(&v16, v18, &v17, &v15, &a8, v14, &v13, a9, &a10, a11, &a12);
goto LABEL_50;
}
LABEL_35:
result = cblas_xerbla(5LL, "cblas_strmm", "Illegal Diag setting, %d\n", a5);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
LABEL_33:
result = cblas_xerbla(4LL, "cblas_strmm", "Illegal Trans setting, %d\n", a4);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
LABEL_26:
result = cblas_xerbla(3LL, "cblas_strmm", "Illegal Uplo setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
LABEL_24:
result = cblas_xerbla(2LL, "cblas_strmm", "Illegal Side setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a2 == 142 )
{
v16 = 82;
}
else
{
if ( a2 != 141 )
goto LABEL_24;
v16 = 76;
}
if ( a3 == 121 )
{
v18[0] = 85;
}
else
{
if ( a3 != 122 )
goto LABEL_26;
v18[0] = 76;
}
switch ( (_DWORD)a4 )
{
case 'p':
v17 = 84;
break;
case 'q':
v17 = 67;
break;
case 'o':
v17 = 78;
break;
default:
goto LABEL_33;
}
if ( a5 == 132 )
{
v15 = 85;
}
else
{
if ( a5 != 131 )
goto LABEL_35;
v15 = 78;
}
result = strmm_(&v16, v18, &v17, &v15, v14, &a8, &v13, a9, &a10, a11, &a12);
LABEL_50:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(unsigned int a1, unsigned int a2, unsigned int a3, __int64 a4, unsigned int a5, int a6, float a7, char a8, __int64 a9, char a10, __int64 a11, char a12)
{
__int64 result; // rax
float v13; // [rsp+8h] [rbp-20h] BYREF
int v14[4]; // [rsp+Ch] [rbp-1Ch] BYREF
char v15; // [rsp+1Ch] [rbp-Ch] BYREF
char v16; // [rsp+1Dh] [rbp-Bh] BYREF
char v17; // [rsp+1Eh] [rbp-Ah] BYREF
char v18[9]; // [rsp+1Fh] [rbp-9h] BYREF

v14[0] = a6;
v13 = a7;
RowMajorStrg = 0;
CBLAS_CallFromC = 1;
if ( a1 != 102 )
{
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_strmm", "Illegal Order setting, %d\n", a1);
goto LABEL_50;
}
RowMajorStrg = 1;
if ( a2 == 142 )
{
v16 = 76;
goto LABEL_6;
}
if ( a2 == 141 )
{
v16 = 82;
LABEL_6:
if ( a3 == 121 )
{
v18[0] = 76;
goto LABEL_9;
}
if ( a3 == 122 )
{
v18[0] = 85;
LABEL_9:
switch ( (_DWORD)a4 )
{
case 'p':
v17 = 84;
goto LABEL_41;
case 'q':
v17 = 67;
goto LABEL_41;
case 'o':
v17 = 78;
LABEL_41:
if ( a5 == 132 )
{
v15 = 85;
goto LABEL_44;
}
if ( a5 == 131 )
{
v15 = 78;
LABEL_44:
result = strmm_(&v16, v18, &v17, &v15, &a8, v14, &v13, a9, &a10, a11, &a12);
goto LABEL_50;
}
LABEL_35:
result = cblas_xerbla(5LL, "cblas_strmm", "Illegal Diag setting, %d\n", a5);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
LABEL_33:
result = cblas_xerbla(4LL, "cblas_strmm", "Illegal Trans setting, %d\n", a4);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
LABEL_26:
result = cblas_xerbla(3LL, "cblas_strmm", "Illegal Uplo setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
LABEL_24:
result = cblas_xerbla(2LL, "cblas_strmm", "Illegal Side setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a2 == 142 )
{
v16 = 82;
}
else
{
if ( a2 != 141 )
goto LABEL_24;
v16 = 76;
}
if ( a3 == 121 )
{
v18[0] = 85;
}
else
{
if ( a3 != 122 )
goto LABEL_26;
v18[0] = 76;
}
switch ( (_DWORD)a4 )
{
case 'p':
v17 = 84;
break;
case 'q':
v17 = 67;
break;
case 'o':
v17 = 78;
break;
default:
goto LABEL_33;
}
if ( a5 == 132 )
{
v15 = 85;
}
else
{
if ( a5 != 131 )
goto LABEL_35;
v15 = 78;
}
result = strmm_(&v16, v18, &v17, &v15, v14, &a8, &v13, a9, &a10, a11, &a12);
LABEL_50:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_strmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
                 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
                 const enum CBLAS_DIAG Diag, const int M, const int N,
                 const float alpha, const float *A, const int lda,
                 float *B, const int ldb)
{
   char UL, TA, SD, DI;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if( Order == CblasColMajor )
   {
      if( Side == CblasRight) SD='R';
      else if ( Side == CblasLeft ) SD='L';
      else
      {
         cblas_xerbla(2, "cblas_strmm","Illegal Side setting, %d\n", Side);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Uplo == CblasUpper) UL='U';
      else if ( Uplo == CblasLower ) UL='L';
      else
      {
         cblas_xerbla(3, "cblas_strmm","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( TransA == CblasTrans) TA ='T';
      else if ( TransA == CblasConjTrans ) TA='C';
      else if ( TransA == CblasNoTrans ) TA='N';
      else
      {
         cblas_xerbla(4, "cblas_strmm","Illegal Trans setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Diag == CblasUnit ) DI='U';
      else if ( Diag == CblasNonUnit ) DI='N';
      else
      {
         cblas_xerbla(5, "cblas_strmm", "Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      strmm_(&SD, &UL, &TA, &DI, &M, &N, &alpha, A, &lda, B, &ldb);
   } else if (Order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if( Side == CblasRight) SD='L';
      else if ( Side == CblasLeft ) SD='R';
      else
      {
         cblas_xerbla(2, "cblas_strmm","Illegal Side setting, %d\n", Side);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Uplo == CblasUpper) UL='L';
      else if ( Uplo == CblasLower ) UL='U';
      else
      {
         cblas_xerbla(3, "cblas_strmm", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( TransA == CblasTrans) TA ='T';
      else if ( TransA == CblasConjTrans ) TA='C';
      else if ( TransA == CblasNoTrans ) TA='N';
      else
      {
         cblas_xerbla(4, "cblas_strmm", "Illegal Trans setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Diag == CblasUnit ) DI='U';
      else if ( Diag == CblasNonUnit ) DI='N';
      else
      {
         cblas_xerbla(5, "cblas_strmm","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      strmm_(&SD, &UL, &TA, &DI, &N, &M, &alpha, A,
      &lda, B, &ldb);
   }
   else cblas_xerbla(1, "cblas_strmm", "Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_strmm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, int M, int N, float alpha, float *A, int lda, float *B, int ldb)
{
   char UL; char TA; char SD; char DI;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if( Order == CblasColMajor )
   {
      if( Side == CblasRight) SD='R';
      else if ( Side == CblasLeft ) SD='L';
      else
      {
         cblas_xerbla(2, "cblas_strmm","Illegal Side setting, %d\n", Side);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Uplo == CblasUpper) UL='U';
      else if ( Uplo == CblasLower ) UL='L';
      else
      {
         cblas_xerbla(3, "cblas_strmm","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( TransA == CblasTrans) TA ='T';
      else if ( TransA == CblasConjTrans ) TA='C';
      else if ( TransA == CblasNoTrans ) TA='N';
      else
      {
         cblas_xerbla(4, "cblas_strmm","Illegal Trans setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Diag == CblasUnit ) DI='U';
      else if ( Diag == CblasNonUnit ) DI='N';
      else
      {
         cblas_xerbla(5, "cblas_strmm", "Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      strmm_(&SD, &UL, &TA, &DI, &M, &N, &alpha, A, &lda, B, &ldb);
   } else if (Order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if( Side == CblasRight) SD='L';
      else if ( Side == CblasLeft ) SD='R';
      else
      {
         cblas_xerbla(2, "cblas_strmm","Illegal Side setting, %d\n", Side);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Uplo == CblasUpper) UL='L';
      else if ( Uplo == CblasLower ) UL='U';
      else
      {
         cblas_xerbla(3, "cblas_strmm", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( TransA == CblasTrans) TA ='T';
      else if ( TransA == CblasConjTrans ) TA='C';
      else if ( TransA == CblasNoTrans ) TA='N';
      else
      {
         cblas_xerbla(4, "cblas_strmm", "Illegal Trans setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Diag == CblasUnit ) DI='U';
      else if ( Diag == CblasNonUnit ) DI='N';
      else
      {
         cblas_xerbla(5, "cblas_strmm","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      strmm_(&SD, &UL, &TA, &DI, &N, &M, &alpha, A,
      &lda, B, &ldb);
   }
   else cblas_xerbla(1, "cblas_strmm", "Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

variable_types: enum CBLAS_ORDER { CblasRowMajor=101, CblasColMajor=102 }

variable_types: enum CBLAS_SIDE { CblasLeft=141, CblasRight=142 }

variable_types: enum CBLAS_UPLO { CblasUpper=121, CblasLower=122 }

variable_types: enum CBLAS_TRANSPOSE { CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113 }

variable_types: enum CBLAS_DIAG { CblasNonUnit=131, CblasUnit=132 }

variable_types: M int

variable_types: alpha float

variable_types:
A
float *

variable_types: lda int

variable_types:
B
float *

variable_types: ldb int

variable_types: TA char

variable_types: SD char

variable_types: DI char

variable_types: RowMajorStrg int


decompiled_code:
__int64 __fastcall cblas_ccopy(int a1, __int64 a2, int a3, __int64 a4, int a5)
{
int v6; // [rsp+4h] [rbp-14h] BYREF
int v7; // [rsp+8h] [rbp-10h] BYREF
int v8[3]; // [rsp+Ch] [rbp-Ch] BYREF

v8[0] = a1;
v7 = a3;
v6 = a5;
return ccopy_(v8, a2, &v7, a4, &v6);
}

canonical_decompiled_code:
__int64 __fastcall func0(int a1, __int64 a2, int a3, __int64 a4, int a5)
{
int v6; // [rsp+4h] [rbp-14h] BYREF
int v7; // [rsp+8h] [rbp-10h] BYREF
int v8[3]; // [rsp+Ch] [rbp-Ch] BYREF

v8[0] = a1;
v7 = a3;
v6 = a5;
return ccopy_(v8, a2, &v7, a4, &v6);
}

original_code:
void cblas_ccopy( const int N, const void *X,
                      const int incX, void *Y, const int incY)
{
   ccopy_( &N, X, &incX, Y, &incY);
}

canonical_original_code:
void cblas_ccopy(int N, void *X, int incX, void *Y, int incY)
{
   ccopy_( &N, X, &incX, Y, &incY);
}

variable_types: N int

variable_types:
X
void *

variable_types: incX int

variable_types:
Y
void *

variable_types: incY int


original_code:
void cblas_zhpmv(const enum CBLAS_ORDER order,
                 const enum CBLAS_UPLO Uplo,const int N,
                 const void *alpha, const void *AP,
                 const void *X, const int incX, const void *beta,
                 void *Y, const int incY)
{
   char UL;
   int n, i=0, incx=incX;
   const double *xx= (double *)X, *alp= (double *)alpha, *bet = (double *)beta;
   double ALPHA[2],BETA[2];
   int tincY, tincx;
   double *x=(double *)X, *y=(double *)Y, *st=0, *tx;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if (order == CblasColMajor)
   {
      if (Uplo == CblasLower) UL = 'L';
      else if (Uplo == CblasUpper) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_zhpmv","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zhpmv_(&UL, &N, alpha, AP, X,
                     &incx, beta, Y, &incY);
   }
   else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      ALPHA[0]= *alp;
      ALPHA[1]= -alp[1];
      BETA[0]= *bet;
      BETA[1]= -bet[1];
      if (N > 0)
      {
         n = N << 1;
         x = malloc(n*sizeof(double));
         tx = x;
         if( incX > 0 ) {
           i = incX << 1;
           tincx = 2;
           st= x+n;
         } else {
           i = incX *(-2);
           tincx = -2;
           st = x-2;
           x +=(n-2);
         }
         do
         {
           *x = *xx;
           x[1] = -xx[1];
           x += tincx ;
           xx += i;
         }
         while (x != st);
         x=tx;
            incx = 1;
         if(incY > 0)
           tincY = incY;
         else
           tincY = -incY;
         y++;
         i = tincY << 1;
         n = i * N ;
         st = y + n;
         do {
            *y = -(*y);
            y += i;
         } while(y != st);
         y -= n;
      } else
         x = (double *) X;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_zhpmv","Illegal Uplo setting, %d\n", Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zhpmv_(&UL, &N, ALPHA,
                     AP, x, &incx, BETA, Y, &incY);
   }
   else
   {
      cblas_xerbla(1, "cblas_zhpmv","Illegal Order setting, %d\n", order);
      CBLAS_CallFromC = 0;
      RowMajorStrg = 0;
      return;
   }
   if ( order == CblasRowMajor )
   {
      RowMajorStrg = 1;
      if(X!=x)
         free(x);
      if (N > 0)
      {
         do
         {
            *y = -(*y);
            y += i;
         }
         while (y != st);
     }
  }
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_zhpmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int N, void *alpha, void *AP, void *X, int incX, void *beta, void *Y, int incY)
{
   char UL;
   int n; int i = 0; int incx = incX;
   double *xx = (double *)X; double *alp = (double *)alpha; double *bet = (double *)beta;
   double ALPHA[2]; double BETA[2];
   int tincY; int tincx;
   double *x = (double *)X; double *y = (double *)Y; double *st = 0; double *tx;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if (order == CblasColMajor)
   {
      if (Uplo == CblasLower) UL = 'L';
      else if (Uplo == CblasUpper) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_zhpmv","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zhpmv_(&UL, &N, alpha, AP, X,
                     &incx, beta, Y, &incY);
   }
   else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      ALPHA[0]= *alp;
      ALPHA[1]= -alp[1];
      BETA[0]= *bet;
      BETA[1]= -bet[1];
      if (N > 0)
      {
         n = N << 1;
         x = malloc(n*sizeof(double));
         tx = x;
         if( incX > 0 ) {
           i = incX << 1;
           tincx = 2;
           st= x+n;
         } else {
           i = incX *(-2);
           tincx = -2;
           st = x-2;
           x +=(n-2);
         }
         do
         {
           *x = *xx;
           x[1] = -xx[1];
           x += tincx ;
           xx += i;
         }
         while (x != st);
         x=tx;
            incx = 1;
         if(incY > 0)
           tincY = incY;
         else
           tincY = -incY;
         y++;
         i = tincY << 1;
         n = i * N ;
         st = y + n;
         do {
            *y = -(*y);
            y += i;
         } while(y != st);
         y -= n;
      } else
         x = (double *) X;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_zhpmv","Illegal Uplo setting, %d\n", Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zhpmv_(&UL, &N, ALPHA,
                     AP, x, &incx, BETA, Y, &incY);
   }
   else
   {
      cblas_xerbla(1, "cblas_zhpmv","Illegal Order setting, %d\n", order);
      CBLAS_CallFromC = 0;
      RowMajorStrg = 0;
      return;
   }
   if ( order == CblasRowMajor )
   {
      RowMajorStrg = 1;
      if(X!=x)
         free(x);
      if (N > 0)
      {
         do
         {
            *y = -(*y);
            y += i;
         }
         while (y != st);
     }
  }
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

variable_types: enum CBLAS_ORDER { CblasRowMajor=101, CblasColMajor=102 }

variable_types: enum CBLAS_UPLO { CblasUpper=121, CblasLower=122 }

variable_types:
alpha
void *

variable_types:
AP
void *

variable_types:
beta
void *

variable_types: UL char

variable_types: n int

variable_types: i int

variable_types: incx int

variable_types:
xx
double *

variable_types:
alp
double *

variable_types:
bet
double *

variable_types:
ALPHA
double [2]

variable_types:
BETA
double [2]

variable_types: tincY int

variable_types: tincx int

variable_types:
x
double *

variable_types:
y
double *

variable_types:
st
double *

variable_types:
tx
double *