decompiled_code:
__int64 __fastcall cblas_strsm(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

RowMajorStrg = 0;
v14[0] = a6;
CBLAS_CallFromC = 1;
v13 = a7;
if ( a1 == 102 )
{
if ( a2 == 142 )
{
v17 = 82;
}
else
{
if ( a2 != 141 )
goto LABEL_34;
v17 = 76;
}
if ( a3 == 121 )
{
v15 = 85;
}
else
{
if ( a3 != 122 )
goto LABEL_36;
v15 = 76;
}
switch ( (_DWORD)a4 )
{
case 'p':
v16 = 84;
break;
case 'q':
v16 = 67;
break;
case 'o':
v16 = 78;
break;
default:
goto LABEL_45;
}
if ( a5 == 132 )
{
v18[0] = 85;
}
else
{
if ( a5 != 131 )
{
LABEL_40:
result = cblas_xerbla(5LL, "cblas_strsm", "Illegal Diag setting, %d\n", a5);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v18[0] = 78;
}
result = strsm_(&v17, &v15, &v16, v18, v14, &a8, &v13, a9, &a10, a11, &a12);
goto LABEL_18;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_strsm", "Illegal Order setting, %d\n", a1);
goto LABEL_18;
}
RowMajorStrg = 1;
if ( a2 != 142 )
{
if ( a2 == 141 )
{
v17 = 82;
goto LABEL_6;
}
LABEL_34:
result = cblas_xerbla(2LL, "cblas_strsm", "Illegal Side setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v17 = 76;
LABEL_6:
if ( a3 == 121 )
{
v15 = 76;
goto LABEL_9;
}
if ( a3 != 122 )
{
LABEL_36:
result = cblas_xerbla(3LL, "cblas_strsm", "Illegal Uplo setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v15 = 85;
LABEL_9:
switch ( (_DWORD)a4 )
{
case 'p':
v16 = 84;
goto LABEL_13;
case 'q':
v16 = 67;
goto LABEL_13;
case 'o':
v16 = 78;
LABEL_13:
if ( a5 == 132 )
{
v18[0] = 85;
goto LABEL_16;
}
if ( a5 == 131 )
{
v18[0] = 78;
LABEL_16:
result = strsm_(&v17, &v15, &v16, v18, &a8, v14, &v13, a9, &a10, a11, &a12);
LABEL_18:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
goto LABEL_40;
}
LABEL_45:
result = cblas_xerbla(4LL, "cblas_strsm", "Illegal Trans setting, %d\n", a4);
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

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

original_code:
void cblas_strsm(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_strsm", "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_strsm", "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_strsm", "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_strsm", "Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      strsm_(&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_strsm", "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_strsm", "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_strsm", "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_strsm", "Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      strsm_(&SD, &UL, &TA, &DI, &N, &M, &alpha, A, &lda, B, &ldb);
   }
   else cblas_xerbla(1, "cblas_strsm", "Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_strsm(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_strsm", "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_strsm", "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_strsm", "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_strsm", "Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      strsm_(&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_strsm", "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_strsm", "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_strsm", "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_strsm", "Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      strsm_(&SD, &UL, &TA, &DI, &N, &M, &alpha, A, &lda, B, &ldb);
   }
   else cblas_xerbla(1, "cblas_strsm", "Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

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

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:
A
float *

variable_types: lda int

variable_types:
B
float *

variable_types: ldb int

variable_types: UL char

variable_types: TA char

variable_types: SD char

variable_types: DI char


repo: ivanjimenez/ipaap

decompiled_code:
__int64 __fastcall cblas_zcopy(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 zcopy_(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 zcopy_(v8, a2, &v7, a4, &v6);
}

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

canonical_original_code:
void cblas_zcopy(int N, void *X, int incX, void *Y, int incY)
{
   zcopy_( &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

return_type: void


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

RowMajorStrg = 0;
v12[0] = a5;
v11 = a6;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v14 = 85;
}
else
{
if ( a2 != 122 )
goto LABEL_22;
v14 = 76;
}
if ( a3 == 111 )
goto LABEL_23;
if ( a3 != 112 )
{
if ( a3 != 113 )
goto LABEL_8;
v13 = 67;
LABEL_18:
if ( (_DWORD)a4 == 132 )
{
LABEL_24:
v15[0] = 85;
goto LABEL_21;
}
goto LABEL_19;
}
LABEL_25:
v13 = 84;
goto LABEL_18;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_dtbsv", "Illegal Order setting, %d\n", a1);
LABEL_10:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
RowMajorStrg = 1;
if ( a2 != 121 )
{
if ( a2 == 122 )
{
v14 = 85;
goto LABEL_6;
}
LABEL_22:
result = cblas_xerbla(2LL, "cblas_dtbsv", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v14 = 76;
LABEL_6:
if ( a3 == 111 )
goto LABEL_25;
if ( a3 - 112 > 1 )
{
LABEL_8:
result = cblas_xerbla(3LL, "cblas_dtbsv", "Illegal TransA setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
LABEL_23:
v13 = 78;
if ( (_DWORD)a4 == 132 )
goto LABEL_24;
LABEL_19:
if ( (_DWORD)a4 == 131 )
{
v15[0] = 78;
LABEL_21:
result = dtbsv_(&v14, &v13, v15, v12, &v11, a7, &a8, a9, &a10);
goto LABEL_10;
}
result = cblas_xerbla(4LL, "cblas_dtbsv", "Illegal Diag setting, %d\n", a4);
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, int a6, __int64 a7, char a8, __int64 a9, char a10)
{
__int64 result; // rax
int v11; // [rsp+8h] [rbp-20h] BYREF
int v12[4]; // [rsp+Ch] [rbp-1Ch] BYREF
char v13; // [rsp+1Dh] [rbp-Bh] BYREF
char v14; // [rsp+1Eh] [rbp-Ah] BYREF
char v15[9]; // [rsp+1Fh] [rbp-9h] BYREF

RowMajorStrg = 0;
v12[0] = a5;
v11 = a6;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v14 = 85;
}
else
{
if ( a2 != 122 )
goto LABEL_22;
v14 = 76;
}
if ( a3 == 111 )
goto LABEL_23;
if ( a3 != 112 )
{
if ( a3 != 113 )
goto LABEL_8;
v13 = 67;
LABEL_18:
if ( (_DWORD)a4 == 132 )
{
LABEL_24:
v15[0] = 85;
goto LABEL_21;
}
goto LABEL_19;
}
LABEL_25:
v13 = 84;
goto LABEL_18;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_dtbsv", "Illegal Order setting, %d\n", a1);
LABEL_10:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
RowMajorStrg = 1;
if ( a2 != 121 )
{
if ( a2 == 122 )
{
v14 = 85;
goto LABEL_6;
}
LABEL_22:
result = cblas_xerbla(2LL, "cblas_dtbsv", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v14 = 76;
LABEL_6:
if ( a3 == 111 )
goto LABEL_25;
if ( a3 - 112 > 1 )
{
LABEL_8:
result = cblas_xerbla(3LL, "cblas_dtbsv", "Illegal TransA setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
LABEL_23:
v13 = 78;
if ( (_DWORD)a4 == 132 )
goto LABEL_24;
LABEL_19:
if ( (_DWORD)a4 == 131 )
{
v15[0] = 78;
LABEL_21:
result = dtbsv_(&v14, &v13, v15, v12, &v11, a7, &a8, a9, &a10);
goto LABEL_10;
}
result = cblas_xerbla(4LL, "cblas_dtbsv", "Illegal Diag setting, %d\n", a4);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_dtbsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
                 const int N, const int K, const double *A, const int lda,
                 double *X, const int incX)
{
   char TA;
   char UL;
   char DI;
   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_dtbsv","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_dtbsv","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_dtbsv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dtbsv_( &UL, &TA, &DI, &N, &K, 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_dtbsv","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';
      else
      {
         cblas_xerbla(3, "cblas_dtbsv","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_dtbsv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dtbsv_( &UL, &TA, &DI, &N, &K, A, &lda, X,
                      &incX);
   }
   else cblas_xerbla(1, "cblas_dtbsv", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_dtbsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, int N, int K, double *A, int lda, double *X, int incX)
{
   char TA;
   char UL;
   char DI;
   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_dtbsv","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_dtbsv","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_dtbsv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dtbsv_( &UL, &TA, &DI, &N, &K, 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_dtbsv","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';
      else
      {
         cblas_xerbla(3, "cblas_dtbsv","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_dtbsv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dtbsv_( &UL, &TA, &DI, &N, &K, A, &lda, X,
                      &incX);
   }
   else cblas_xerbla(1, "cblas_dtbsv", "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: K int

variable_types:
A
double *

variable_types:
X
double *

variable_types: RowMajorStrg int

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

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


decompiled_code:
__int64 __fastcall cblas_dger(unsigned int a1, int a2, int a3, __int64 a4, int a5, __int64 a6, double a7, char a8)
{
__int64 result; // rax
int v9; // [rsp+Ch] [rbp-1Ch] BYREF
double v10; // [rsp+10h] [rbp-18h] BYREF
int v11; // [rsp+18h] [rbp-10h] BYREF
int v12[3]; // [rsp+1Ch] [rbp-Ch] BYREF

RowMajorStrg = 0;
v12[0] = a2;
v11 = a3;
v9 = a5;
CBLAS_CallFromC = 1;
v10 = a7;
if ( a1 == 102 )
{
result = dger_(v12, &v11, &v10, a4, &v9);
}
else if ( a1 == 101 )
{
RowMajorStrg = 1;
result = dger_(&v11, v12, &v10, a6, &a8);
}
else
{
result = cblas_xerbla(1LL, "cblas_dger", "Illegal Order setting, %d\n", a1);
}
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(unsigned int a1, int a2, int a3, __int64 a4, int a5, __int64 a6, double a7, char a8)
{
__int64 result; // rax
int v9; // [rsp+Ch] [rbp-1Ch] BYREF
double v10; // [rsp+10h] [rbp-18h] BYREF
int v11; // [rsp+18h] [rbp-10h] BYREF
int v12[3]; // [rsp+1Ch] [rbp-Ch] BYREF

RowMajorStrg = 0;
v12[0] = a2;
v11 = a3;
v9 = a5;
CBLAS_CallFromC = 1;
v10 = a7;
if ( a1 == 102 )
{
result = dger_(v12, &v11, &v10, a4, &v9);
}
else if ( a1 == 101 )
{
RowMajorStrg = 1;
result = dger_(&v11, v12, &v10, a6, &a8);
}
else
{
result = cblas_xerbla(1LL, "cblas_dger", "Illegal Order setting, %d\n", a1);
}
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_dger(const enum CBLAS_ORDER order, const int M, const int N,
                const double alpha, const double *X, const int incX,
                const double *Y, const int incY, double *A, const int lda)
{
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if (order == CblasColMajor)
   {
      dger_( &M, &N, &alpha, X, &incX, Y, &incY, A,
                      &lda);
   }
   else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      dger_( &N, &M ,&alpha, Y, &incY, X, &incX, A,
                      &lda);
   }
   else cblas_xerbla(1, "cblas_dger", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_dger(enum CBLAS_ORDER order, int M, int N, double alpha, double *X, int incX, double *Y, int incY, double *A, int lda)
{
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if (order == CblasColMajor)
   {
      dger_( &M, &N, &alpha, X, &incX, Y, &incY, A,
                      &lda);
   }
   else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      dger_( &N, &M ,&alpha, Y, &incY, X, &incX, A,
                      &lda);
   }
   else cblas_xerbla(1, "cblas_dger", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

variable_types: M int

variable_types: alpha double

variable_types:
Y
double *

variable_types: lda int

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


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

RowMajorStrg = 0;
v9[0] = a3;
v8 = a5;
CBLAS_CallFromC = 1;
v7 = a6;
if ( a1 != 102 )
{
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_dsyr2", "Illegal Order setting, %d\n", a1);
goto LABEL_8;
}
RowMajorStrg = 1;
if ( a2 != 122 )
{
if ( a2 == 121 )
{
LABEL_5:
v10[0] = 76;
LABEL_6:
result = dsyr2_(v10, v9, &v7, a4, &v8);
LABEL_8:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
goto LABEL_12;
}
LABEL_11:
v10[0] = 85;
goto LABEL_6;
}
if ( a2 == 122 )
goto LABEL_5;
if ( a2 == 121 )
goto LABEL_11;
LABEL_12:
result = cblas_xerbla(2LL, "cblas_dsyr2", "Illegal Uplo setting, %d\n", a2);
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, double a6)
{
__int64 result; // rax
double v7; // [rsp+0h] [rbp-28h] BYREF
int v8; // [rsp+8h] [rbp-20h] BYREF
int v9[4]; // [rsp+Ch] [rbp-1Ch] BYREF
char v10[9]; // [rsp+1Fh] [rbp-9h] BYREF

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

original_code:
void cblas_dsyr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
                const int N, const double alpha, const double *X,
                const int incX, const double *Y, const int incY, double *A,
                const int lda)
{
   char UL;
   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_dsyr2","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dsyr2_(&UL, &N, &alpha, X, &incX, Y, &incY, A,
                    &lda);
   } else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasLower) UL = 'U';
      else if (Uplo == CblasUpper) UL = 'L';
      else
      {
         cblas_xerbla(2, "cblas_dsyr2","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dsyr2_(&UL, &N, &alpha, X, &incX, Y, &incY, A,
                    &lda);
   } else cblas_xerbla(1, "cblas_dsyr2", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_dsyr2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int N, double alpha, double *X, int incX, double *Y, int incY, double *A, int lda)
{
   char UL;
   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_dsyr2","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dsyr2_(&UL, &N, &alpha, X, &incX, Y, &incY, A,
                    &lda);
   } else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasLower) UL = 'U';
      else if (Uplo == CblasUpper) UL = 'L';
      else
      {
         cblas_xerbla(2, "cblas_dsyr2","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dsyr2_(&UL, &N, &alpha, X, &incX, Y, &incY, A,
                    &lda);
   } else cblas_xerbla(1, "cblas_dsyr2", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

variable_types: UL char

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


original_code:
void cblas_chemv(const enum CBLAS_ORDER order,
                 const enum CBLAS_UPLO Uplo, const int N,
                 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=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;
   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_chemv","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      chemv_(&UL, &N, 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_chemv","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      chemv_(&UL, &N, ALPHA, A, &lda, x, &incx,
                BETA, Y, &incY);
   }
   else
   {
      cblas_xerbla(1, "cblas_chemv","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_chemv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int N, void *alpha, void *A, int lda, void *X, int incX, void *beta, void *Y, int incY)
{
   char UL;
   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;
   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_chemv","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      chemv_(&UL, &N, 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_chemv","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      chemv_(&UL, &N, ALPHA, A, &lda, x, &incx,
                BETA, Y, &incY);
   }
   else
   {
      cblas_xerbla(1, "cblas_chemv","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:
alpha
void *

variable_types:
A
void *

variable_types:
beta
void *

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 *


original_code:
void cblas_chpr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
                      const int N,const void *alpha, const void *X,
                      const int incX,const void *Y, const int incY, void *Ap)
{
   char UL;
   int n, i, j, tincx, tincy, incx=incX, incy=incY;
   float *x=(float *)X, *xx=(float *)X, *y=(float *)Y,
         *yy=(float *)Y, *tx, *ty, *stx, *sty;
   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_chpr2","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      chpr2_(&UL, &N, alpha, X, &incx, Y, &incy, Ap);
   } else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_chpr2","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (N > 0)
      {
         n = N << 1;
         x = malloc(n*sizeof(float));
         y = malloc(n*sizeof(float));
         tx = x;
         ty = y;
         if( incX > 0 ) {
            i = incX << 1 ;
            tincx = 2;
            stx= x+n;
         } else {
            i = incX *(-2);
            tincx = -2;
            stx = x-2;
            x +=(n-2);
         }
         if( incY > 0 ) {
            j = incY << 1;
            tincy = 2;
            sty= y+n;
         } else {
            j = incY *(-2);
            tincy = -2;
            sty = y-2;
            y +=(n-2);
         }
         do
         {
            *x = *xx;
            x[1] = -xx[1];
            x += tincx ;
            xx += i;
         }
         while (x != stx);
         do
         {
            *y = *yy;
            y[1] = -yy[1];
            y += tincy ;
            yy += j;
         }
         while (y != sty);
         x=tx;
         y=ty;
            incx = 1;
            incy = 1;
      } else
      {
         x = (float *) X;
         y = (void *) Y;
      }
      chpr2_(&UL, &N, alpha, y, &incy, x, &incx, Ap);
   } else
   {
      cblas_xerbla(1, "cblas_chpr2","Illegal Order setting, %d\n", order);
      CBLAS_CallFromC = 0;
      RowMajorStrg = 0;
      return;
   }
   if(X!=x)
      free(x);
   if(Y!=y)
      free(y);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_chpr2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int N, void *alpha, void *X, int incX, void *Y, int incY, void *Ap)
{
   char UL;
   int n; int i; int j; int tincx; int tincy; int incx = incX; int incy = incY;
   float *x = (float *)X; float *xx = (float *)X; float *y = (float *)Y; float *yy = (float *)Y; float *tx; float *ty; float *stx; float *sty;
   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_chpr2","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      chpr2_(&UL, &N, alpha, X, &incx, Y, &incy, Ap);
   } else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_chpr2","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (N > 0)
      {
         n = N << 1;
         x = malloc(n*sizeof(float));
         y = malloc(n*sizeof(float));
         tx = x;
         ty = y;
         if( incX > 0 ) {
            i = incX << 1 ;
            tincx = 2;
            stx= x+n;
         } else {
            i = incX *(-2);
            tincx = -2;
            stx = x-2;
            x +=(n-2);
         }
         if( incY > 0 ) {
            j = incY << 1;
            tincy = 2;
            sty= y+n;
         } else {
            j = incY *(-2);
            tincy = -2;
            sty = y-2;
            y +=(n-2);
         }
         do
         {
            *x = *xx;
            x[1] = -xx[1];
            x += tincx ;
            xx += i;
         }
         while (x != stx);
         do
         {
            *y = *yy;
            y[1] = -yy[1];
            y += tincy ;
            yy += j;
         }
         while (y != sty);
         x=tx;
         y=ty;
            incx = 1;
            incy = 1;
      } else
      {
         x = (float *) X;
         y = (void *) Y;
      }
      chpr2_(&UL, &N, alpha, y, &incy, x, &incx, Ap);
   } else
   {
      cblas_xerbla(1, "cblas_chpr2","Illegal Order setting, %d\n", order);
      CBLAS_CallFromC = 0;
      RowMajorStrg = 0;
      return;
   }
   if(X!=x)
      free(x);
   if(Y!=y)
      free(y);
   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
void *

variable_types:
X
void *

variable_types: incX int

variable_types:
Y
void *

variable_types: incY int

variable_types:
Ap
void *

variable_types: UL char

variable_types: j int

variable_types: tincy int

variable_types: incy int

variable_types:
yy
float *

variable_types:
ty
float *

variable_types:
stx
float *

variable_types:
sty
float *

variable_types: RowMajorStrg int


decompiled_code:
__int64 __fastcall cblas_strmv(unsigned int a1, unsigned int a2, unsigned int a3, __int64 a4, int a5, __int64 a6, char a7, __int64 a8, char a9)
{
__int64 result; // rax
__int64 v10; // [rsp-10h] [rbp-38h]
int v11[4]; // [rsp+Ch] [rbp-1Ch] BYREF
char v12; // [rsp+1Dh] [rbp-Bh] BYREF
char v13; // [rsp+1Eh] [rbp-Ah] BYREF
char v14[9]; // [rsp+1Fh] [rbp-9h] BYREF

RowMajorStrg = 0;
v11[0] = a5;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v13 = 85;
}
else
{
if ( a2 != 122 )
goto LABEL_22;
v13 = 76;
}
if ( a3 == 111 )
goto LABEL_23;
if ( a3 != 112 )
{
if ( a3 != 113 )
goto LABEL_8;
v12 = 67;
LABEL_18:
if ( (_DWORD)a4 == 132 )
{
LABEL_24:
v14[0] = 85;
goto LABEL_21;
}
goto LABEL_19;
}
LABEL_25:
v12 = 84;
goto LABEL_18;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_strmv", "Illegal Order setting, %d\n", a1);
LABEL_10:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
RowMajorStrg = 1;
if ( a2 != 121 )
{
if ( a2 == 122 )
{
v13 = 85;
goto LABEL_6;
}
LABEL_22:
result = cblas_xerbla(2LL, "cblas_strmv", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v13 = 76;
LABEL_6:
if ( a3 == 111 )
goto LABEL_25;
if ( a3 - 112 > 1 )
{
LABEL_8:
result = cblas_xerbla(3LL, "cblas_strmv", "Illegal TransA setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
LABEL_23:
v12 = 78;
if ( (_DWORD)a4 == 132 )
goto LABEL_24;
LABEL_19:
if ( (_DWORD)a4 == 131 )
{
v14[0] = 78;
LABEL_21:
strmv_(&v13, &v12, v14, v11, a6, &a7, a8, &a9);
result = v10;
goto LABEL_10;
}
result = cblas_xerbla(4LL, "cblas_strmv", "Illegal Diag setting, %d\n", a4);
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, __int64 a8, char a9)
{
__int64 result; // rax
__int64 v10; // [rsp-10h] [rbp-38h]
int v11[4]; // [rsp+Ch] [rbp-1Ch] BYREF
char v12; // [rsp+1Dh] [rbp-Bh] BYREF
char v13; // [rsp+1Eh] [rbp-Ah] BYREF
char v14[9]; // [rsp+1Fh] [rbp-9h] BYREF

RowMajorStrg = 0;
v11[0] = a5;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v13 = 85;
}
else
{
if ( a2 != 122 )
goto LABEL_22;
v13 = 76;
}
if ( a3 == 111 )
goto LABEL_23;
if ( a3 != 112 )
{
if ( a3 != 113 )
goto LABEL_8;
v12 = 67;
LABEL_18:
if ( (_DWORD)a4 == 132 )
{
LABEL_24:
v14[0] = 85;
goto LABEL_21;
}
goto LABEL_19;
}
LABEL_25:
v12 = 84;
goto LABEL_18;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_strmv", "Illegal Order setting, %d\n", a1);
LABEL_10:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
RowMajorStrg = 1;
if ( a2 != 121 )
{
if ( a2 == 122 )
{
v13 = 85;
goto LABEL_6;
}
LABEL_22:
result = cblas_xerbla(2LL, "cblas_strmv", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v13 = 76;
LABEL_6:
if ( a3 == 111 )
goto LABEL_25;
if ( a3 - 112 > 1 )
{
LABEL_8:
result = cblas_xerbla(3LL, "cblas_strmv", "Illegal TransA setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
LABEL_23:
v12 = 78;
if ( (_DWORD)a4 == 132 )
goto LABEL_24;
LABEL_19:
if ( (_DWORD)a4 == 131 )
{
v14[0] = 78;
LABEL_21:
strmv_(&v13, &v12, v14, v11, a6, &a7, a8, &a9);
result = v10;
goto LABEL_10;
}
result = cblas_xerbla(4LL, "cblas_strmv", "Illegal Diag setting, %d\n", a4);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_strmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
                 const int N, const float *A, const int lda,
                 float *X, const int incX)
{
   char TA;
   char UL;
   char DI;
   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_strmv","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_strmv","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_strmv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      strmv_( &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_strmv","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';
      else
      {
         cblas_xerbla(3, "cblas_strmv","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_strmv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      strmv_( &UL, &TA, &DI, &N, A, &lda, X,
                      &incX);
   }
   else cblas_xerbla(1, "cblas_strmv", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_strmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, int N, float *A, int lda, float *X, int incX)
{
   char TA;
   char UL;
   char DI;
   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_strmv","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_strmv","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_strmv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      strmv_( &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_strmv","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';
      else
      {
         cblas_xerbla(3, "cblas_strmv","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_strmv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      strmv_( &UL, &TA, &DI, &N, A, &lda, X,
                      &incX);
   }
   else cblas_xerbla(1, "cblas_strmv", "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: enum CBLAS_DIAG { CblasNonUnit=131, CblasUnit=132 }

variable_types:
A
float *

variable_types: lda int

variable_types:
X
float *

variable_types: TA char

variable_types: DI char


original_code:
void cblas_zhpr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
                      const int N,const void *alpha, const void *X,
                      const int incX,const void *Y, const int incY, void *Ap)
{
   char UL;
   int n, i, j, incx=incX, incy=incY;
   double *x=(double *)X, *xx=(double *)X, *y=(double *)Y,
         *yy=(double *)Y, *stx, *sty;
   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_zhpr2","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zhpr2_(&UL, &N, alpha, X, &incx, Y, &incy, Ap);
   } else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_zhpr2","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (N > 0)
      {
         n = N << 1;
         x = malloc(n*sizeof(double));
         y = malloc(n*sizeof(double));
         stx = x + n;
         sty = y + n;
         if( incX > 0 )
            i = incX << 1;
         else
            i = incX *(-2);
         if( incY > 0 )
            j = incY << 1;
         else
            j = incY *(-2);
         do
         {
            *x = *xx;
            x[1] = -xx[1];
            x += 2;
            xx += i;
         } while (x != stx);
         do
         {
            *y = *yy;
            y[1] = -yy[1];
            y += 2;
            yy += j;
         }
         while (y != sty);
         x -= n;
         y -= n;
            if(incX > 0 )
               incx = 1;
            else
               incx = -1;
            if(incY > 0 )
               incy = 1;
            else
               incy = -1;
      } else
      {
         x = (double *) X;
         y = (void *) Y;
      }
      zhpr2_(&UL, &N, alpha, y, &incy, x, &incx, Ap);
   }
   else
   {
      cblas_xerbla(1, "cblas_zhpr2","Illegal Order setting, %d\n", order);
      CBLAS_CallFromC = 0;
      RowMajorStrg = 0;
      return;
   }
   if(X!=x)
      free(x);
   if(Y!=y)
      free(y);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_zhpr2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int N, void *alpha, void *X, int incX, void *Y, int incY, void *Ap)
{
   char UL;
   int n; int i; int j; int incx = incX; int incy = incY;
   double *x = (double *)X; double *xx = (double *)X; double *y = (double *)Y; double *yy = (double *)Y; double *stx; double *sty;
   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_zhpr2","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zhpr2_(&UL, &N, alpha, X, &incx, Y, &incy, Ap);
   } else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_zhpr2","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (N > 0)
      {
         n = N << 1;
         x = malloc(n*sizeof(double));
         y = malloc(n*sizeof(double));
         stx = x + n;
         sty = y + n;
         if( incX > 0 )
            i = incX << 1;
         else
            i = incX *(-2);
         if( incY > 0 )
            j = incY << 1;
         else
            j = incY *(-2);
         do
         {
            *x = *xx;
            x[1] = -xx[1];
            x += 2;
            xx += i;
         } while (x != stx);
         do
         {
            *y = *yy;
            y[1] = -yy[1];
            y += 2;
            yy += j;
         }
         while (y != sty);
         x -= n;
         y -= n;
            if(incX > 0 )
               incx = 1;
            else
               incx = -1;
            if(incY > 0 )
               incy = 1;
            else
               incy = -1;
      } else
      {
         x = (double *) X;
         y = (void *) Y;
      }
      zhpr2_(&UL, &N, alpha, y, &incy, x, &incx, Ap);
   }
   else
   {
      cblas_xerbla(1, "cblas_zhpr2","Illegal Order setting, %d\n", order);
      CBLAS_CallFromC = 0;
      RowMajorStrg = 0;
      return;
   }
   if(X!=x)
      free(x);
   if(Y!=y)
      free(y);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

variable_types: N int

variable_types:
alpha
void *

variable_types:
X
void *

variable_types: incX int

variable_types:
Y
void *

variable_types: incY int

variable_types:
Ap
void *

variable_types: UL char

variable_types: n int

variable_types: i int

variable_types: j int

variable_types: incx int

variable_types:
x
double *

variable_types:
xx
double *

variable_types:
y
double *

variable_types:
yy
double *

variable_types:
stx
double *

variable_types:
sty
double *


decompiled_code:
__int64 __fastcall cblas_dtrsv(unsigned int a1, unsigned int a2, unsigned int a3, __int64 a4, int a5, __int64 a6, char a7, __int64 a8, char a9)
{
__int64 result; // rax
__int64 v10; // [rsp-10h] [rbp-38h]
int v11[4]; // [rsp+Ch] [rbp-1Ch] BYREF
char v12; // [rsp+1Dh] [rbp-Bh] BYREF
char v13; // [rsp+1Eh] [rbp-Ah] BYREF
char v14[9]; // [rsp+1Fh] [rbp-9h] BYREF

RowMajorStrg = 0;
v11[0] = a5;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v13 = 85;
}
else
{
if ( a2 != 122 )
goto LABEL_22;
v13 = 76;
}
if ( a3 == 111 )
goto LABEL_23;
if ( a3 != 112 )
{
if ( a3 != 113 )
goto LABEL_8;
v12 = 67;
LABEL_18:
if ( (_DWORD)a4 == 132 )
{
LABEL_24:
v14[0] = 85;
goto LABEL_21;
}
goto LABEL_19;
}
LABEL_25:
v12 = 84;
goto LABEL_18;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_dtrsv", "Illegal Order setting, %d\n", a1);
LABEL_10:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
RowMajorStrg = 1;
if ( a2 != 121 )
{
if ( a2 == 122 )
{
v13 = 85;
goto LABEL_6;
}
LABEL_22:
result = cblas_xerbla(2LL, "cblas_dtrsv", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v13 = 76;
LABEL_6:
if ( a3 == 111 )
goto LABEL_25;
if ( a3 - 112 > 1 )
{
LABEL_8:
result = cblas_xerbla(3LL, "cblas_dtrsv", "Illegal TransA setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
LABEL_23:
v12 = 78;
if ( (_DWORD)a4 == 132 )
goto LABEL_24;
LABEL_19:
if ( (_DWORD)a4 == 131 )
{
v14[0] = 78;
LABEL_21:
dtrsv_(&v13, &v12, v14, v11, a6, &a7, a8, &a9);
result = v10;
goto LABEL_10;
}
result = cblas_xerbla(4LL, "cblas_dtrsv", "Illegal Diag setting, %d\n", a4);
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, __int64 a8, char a9)
{
__int64 result; // rax
__int64 v10; // [rsp-10h] [rbp-38h]
int v11[4]; // [rsp+Ch] [rbp-1Ch] BYREF
char v12; // [rsp+1Dh] [rbp-Bh] BYREF
char v13; // [rsp+1Eh] [rbp-Ah] BYREF
char v14[9]; // [rsp+1Fh] [rbp-9h] BYREF

RowMajorStrg = 0;
v11[0] = a5;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v13 = 85;
}
else
{
if ( a2 != 122 )
goto LABEL_22;
v13 = 76;
}
if ( a3 == 111 )
goto LABEL_23;
if ( a3 != 112 )
{
if ( a3 != 113 )
goto LABEL_8;
v12 = 67;
LABEL_18:
if ( (_DWORD)a4 == 132 )
{
LABEL_24:
v14[0] = 85;
goto LABEL_21;
}
goto LABEL_19;
}
LABEL_25:
v12 = 84;
goto LABEL_18;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_dtrsv", "Illegal Order setting, %d\n", a1);
LABEL_10:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
RowMajorStrg = 1;
if ( a2 != 121 )
{
if ( a2 == 122 )
{
v13 = 85;
goto LABEL_6;
}
LABEL_22:
result = cblas_xerbla(2LL, "cblas_dtrsv", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v13 = 76;
LABEL_6:
if ( a3 == 111 )
goto LABEL_25;
if ( a3 - 112 > 1 )
{
LABEL_8:
result = cblas_xerbla(3LL, "cblas_dtrsv", "Illegal TransA setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
LABEL_23:
v12 = 78;
if ( (_DWORD)a4 == 132 )
goto LABEL_24;
LABEL_19:
if ( (_DWORD)a4 == 131 )
{
v14[0] = 78;
LABEL_21:
dtrsv_(&v13, &v12, v14, v11, a6, &a7, a8, &a9);
result = v10;
goto LABEL_10;
}
result = cblas_xerbla(4LL, "cblas_dtrsv", "Illegal Diag setting, %d\n", a4);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_dtrsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
                 const int N, const double *A, const int lda, double *X,
                 const int incX)
{
   char TA;
   char UL;
   char DI;
   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_dtrsv","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_dtrsv","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_dtrsv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dtrsv_( &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_dtrsv","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';
      else
      {
         cblas_xerbla(3, "cblas_dtrsv","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_dtrsv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dtrsv_( &UL, &TA, &DI, &N, A, &lda, X,
                      &incX);
   }
   else cblas_xerbla(1, "cblas_dtrsv", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_dtrsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, int N, double *A, int lda, double *X, int incX)
{
   char TA;
   char UL;
   char DI;
   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_dtrsv","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_dtrsv","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_dtrsv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dtrsv_( &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_dtrsv","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';
      else
      {
         cblas_xerbla(3, "cblas_dtrsv","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_dtrsv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dtrsv_( &UL, &TA, &DI, &N, A, &lda, X,
                      &incX);
   }
   else cblas_xerbla(1, "cblas_dtrsv", "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: enum CBLAS_DIAG { CblasNonUnit=131, CblasUnit=132 }

variable_types: N int

variable_types:
A
double *

variable_types: lda int

variable_types:
X
double *

variable_types: TA char

variable_types: DI char

variable_types: RowMajorStrg int


original_code:
void cblas_cher2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
                 const int N, const void *alpha, const void *X, const int incX,
                 const void *Y, const int incY, void *A, const int lda)
{
   char UL;
   int n, i, j, tincx, tincy, incx=incX, incy=incY;
   float *x=(float *)X, *xx=(float *)X, *y=(float *)Y,
         *yy=(float *)Y, *tx, *ty, *stx, *sty;
   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_cher2","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      cher2_(&UL, &N, alpha, X, &incx,
                                            Y, &incy, A, &lda);
   } else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_cher2","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (N > 0)
      {
         n = N << 1;
         x = malloc(n*sizeof(float));
         y = malloc(n*sizeof(float));
         tx = x;
         ty = y;
         if( incX > 0 ) {
            i = incX << 1 ;
            tincx = 2;
            stx= x+n;
         } else {
            i = incX *(-2);
            tincx = -2;
            stx = x-2;
            x +=(n-2);
         }
         if( incY > 0 ) {
            j = incY << 1;
            tincy = 2;
            sty= y+n;
         } else {
            j = incY *(-2);
            tincy = -2;
            sty = y-2;
            y +=(n-2);
         }
         do
         {
            *x = *xx;
            x[1] = -xx[1];
            x += tincx ;
            xx += i;
         }
         while (x != stx);
         do
         {
            *y = *yy;
            y[1] = -yy[1];
            y += tincy ;
            yy += j;
         }
         while (y != sty);
         x=tx;
         y=ty;
            incx = 1;
            incy = 1;
      } else
      {
         x = (float *) X;
         y = (float *) Y;
      }
      cher2_(&UL, &N, alpha, y, &incy, x,
                                      &incx, A, &lda);
   } else
   {
      cblas_xerbla(1, "cblas_cher2","Illegal Order setting, %d\n", order);
      CBLAS_CallFromC = 0;
      RowMajorStrg = 0;
      return;
   }
   if(X!=x)
      free(x);
   if(Y!=y)
      free(y);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_cher2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int N, void *alpha, void *X, int incX, void *Y, int incY, void *A, int lda)
{
   char UL;
   int n; int i; int j; int tincx; int tincy; int incx = incX; int incy = incY;
   float *x = (float *)X; float *xx = (float *)X; float *y = (float *)Y; float *yy = (float *)Y; float *tx; float *ty; float *stx; float *sty;
   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_cher2","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      cher2_(&UL, &N, alpha, X, &incx,
                                            Y, &incy, A, &lda);
   } else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_cher2","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (N > 0)
      {
         n = N << 1;
         x = malloc(n*sizeof(float));
         y = malloc(n*sizeof(float));
         tx = x;
         ty = y;
         if( incX > 0 ) {
            i = incX << 1 ;
            tincx = 2;
            stx= x+n;
         } else {
            i = incX *(-2);
            tincx = -2;
            stx = x-2;
            x +=(n-2);
         }
         if( incY > 0 ) {
            j = incY << 1;
            tincy = 2;
            sty= y+n;
         } else {
            j = incY *(-2);
            tincy = -2;
            sty = y-2;
            y +=(n-2);
         }
         do
         {
            *x = *xx;
            x[1] = -xx[1];
            x += tincx ;
            xx += i;
         }
         while (x != stx);
         do
         {
            *y = *yy;
            y[1] = -yy[1];
            y += tincy ;
            yy += j;
         }
         while (y != sty);
         x=tx;
         y=ty;
            incx = 1;
            incy = 1;
      } else
      {
         x = (float *) X;
         y = (float *) Y;
      }
      cher2_(&UL, &N, alpha, y, &incy, x,
                                      &incx, A, &lda);
   } else
   {
      cblas_xerbla(1, "cblas_cher2","Illegal Order setting, %d\n", order);
      CBLAS_CallFromC = 0;
      RowMajorStrg = 0;
      return;
   }
   if(X!=x)
      free(x);
   if(Y!=y)
      free(y);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

variable_types:
alpha
void *

variable_types:
X
void *

variable_types: incX int

variable_types:
Y
void *

variable_types: incY int

variable_types:
A
void *

variable_types: UL char

variable_types: n int

variable_types: i int

variable_types: j int

variable_types: tincx int

variable_types: tincy int

variable_types: incx int

variable_types: incy int

variable_types:
x
float *

variable_types:
xx
float *

variable_types:
y
float *

variable_types:
yy
float *

variable_types:
tx
float *

variable_types:
ty
float *

variable_types:
stx
float *

variable_types:
sty
float *


decompiled_code:
void __fastcall cblas_zhpr(unsigned int a1, unsigned int a2, int a3, _QWORD *a4, int a5, __int64 a6, double a7)
{
int v8; // eax
size_t v9; // r13
_QWORD *v10; // rax
_QWORD *v11; // rbp
int v12; // ebx
_QWORD *v13; // rcx
__int64 v14; // rsi
_QWORD *v15; // rdx
__int64 v16; // rbx
__int64 v17; // xmm0_8
double v19; // [rsp+10h] [rbp-48h] BYREF
int v20; // [rsp+18h] [rbp-40h]
int v21[3]; // [rsp+1Ch] [rbp-3Ch] BYREF
char v22; // [rsp+2Bh] [rbp-2Dh] BYREF
int v23[11]; // [rsp+2Ch] [rbp-2Ch] BYREF

RowMajorStrg = 0;
v21[0] = a3;
v23[0] = a5;
CBLAS_CallFromC = 1;
v19 = a7;
if ( a1 == 102 )
{
if ( a2 == 122 )
{
v22 = 76;
goto LABEL_6;
}
if ( a2 == 121 )
{
v22 = 85;
goto LABEL_6;
}
}
else
{
if ( a1 != 101 )
{
cblas_xerbla(1LL, "cblas_zhpr", "Illegal Order setting, %d\n", a1);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v8 = v21[0];
v22 = 76;
v20 = a5;
if ( v21[0] <= 0 )
goto LABEL_6;
goto LABEL_14;
}
if ( a2 == 122 )
{
v8 = v21[0];
v22 = 85;
v20 = a5;
if ( v21[0] <= 0 )
{
LABEL_6:
zhpr_(&v22, v21, &v19, a4, v23, a6);
LABEL_7:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return;
}
LABEL_14:
v9 = 2LL * v8;
v10 = malloc(v9 * 8);
v11 = v10;
if ( v20 <= 0 )
{
v13 = v10 - 2;
v14 = -16LL;
v10 = &v10[v9 - 2];
v12 = -2 * v20;
}
else
{
v12 = 2 * v20;
v13 = &v10[v9];
v14 = 16LL;
}
v15 = a4;
v16 = 8LL * v12;
do
{
*v10 = *v15;
v17 = v15[1];
v15 = (_QWORD *)((char *)v15 + v16);
v10[1] = v17 ^ LC2;
v10 = (_QWORD *)((char *)v10 + v14);
}
while ( v10 != v13 );
v23[0] = 1;
zhpr_(&v22, v21, &v19, v11, v23, a6);
if ( a4 != v11 )
free(v11);
goto LABEL_7;
}
}
cblas_xerbla(2LL, "cblas_zhpr", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
}

canonical_decompiled_code:
void __fastcall func0(unsigned int a1, unsigned int a2, int a3, _QWORD *a4, int a5, __int64 a6, double a7)
{
int v8; // eax
size_t v9; // r13
_QWORD *v10; // rax
_QWORD *v11; // rbp
int v12; // ebx
_QWORD *v13; // rcx
__int64 v14; // rsi
_QWORD *v15; // rdx
__int64 v16; // rbx
__int64 v17; // xmm0_8
double v19; // [rsp+10h] [rbp-48h] BYREF
int v20; // [rsp+18h] [rbp-40h]
int v21[3]; // [rsp+1Ch] [rbp-3Ch] BYREF
char v22; // [rsp+2Bh] [rbp-2Dh] BYREF
int v23[11]; // [rsp+2Ch] [rbp-2Ch] BYREF

RowMajorStrg = 0;
v21[0] = a3;
v23[0] = a5;
CBLAS_CallFromC = 1;
v19 = a7;
if ( a1 == 102 )
{
if ( a2 == 122 )
{
v22 = 76;
goto LABEL_6;
}
if ( a2 == 121 )
{
v22 = 85;
goto LABEL_6;
}
}
else
{
if ( a1 != 101 )
{
cblas_xerbla(1LL, "cblas_zhpr", "Illegal Order setting, %d\n", a1);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v8 = v21[0];
v22 = 76;
v20 = a5;
if ( v21[0] <= 0 )
goto LABEL_6;
goto LABEL_14;
}
if ( a2 == 122 )
{
v8 = v21[0];
v22 = 85;
v20 = a5;
if ( v21[0] <= 0 )
{
LABEL_6:
zhpr_(&v22, v21, &v19, a4, v23, a6);
LABEL_7:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return;
}
LABEL_14:
v9 = 2LL * v8;
v10 = malloc(v9 * 8);
v11 = v10;
if ( v20 <= 0 )
{
v13 = v10 - 2;
v14 = -16LL;
v10 = &v10[v9 - 2];
v12 = -2 * v20;
}
else
{
v12 = 2 * v20;
v13 = &v10[v9];
v14 = 16LL;
}
v15 = a4;
v16 = 8LL * v12;
do
{
*v10 = *v15;
v17 = v15[1];
v15 = (_QWORD *)((char *)v15 + v16);
v10[1] = v17 ^ LC2;
v10 = (_QWORD *)((char *)v10 + v14);
}
while ( v10 != v13 );
v23[0] = 1;
zhpr_(&v22, v21, &v19, v11, v23, a6);
if ( a4 != v11 )
free(v11);
goto LABEL_7;
}
}
cblas_xerbla(2LL, "cblas_zhpr", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
}

original_code:
void cblas_zhpr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
                const int N, const double alpha, const void *X,
                const int incX, void *A)
{
   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_zhpr","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zhpr_(&UL, &N, &alpha, X, &incx, A);
   } else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_zhpr","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;
      zhpr_(&UL, &N, &alpha, x, &incx, A);
   } else
   {
      cblas_xerbla(1, "cblas_zhpr","Illegal Order setting, %d\n", order);
      CBLAS_CallFromC = 0;
      RowMajorStrg = 0;
      return;
   }
   if(X!=x)
     free(x);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_zhpr(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int N, double alpha, void *X, int incX, void *A)
{
   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_zhpr","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zhpr_(&UL, &N, &alpha, X, &incx, A);
   } else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_zhpr","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;
      zhpr_(&UL, &N, &alpha, x, &incx, A);
   } else
   {
      cblas_xerbla(1, "cblas_zhpr","Illegal Order setting, %d\n", order);
      CBLAS_CallFromC = 0;
      RowMajorStrg = 0;
      return;
   }
   if(X!=x)
     free(x);
   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 double

variable_types:
X
void *

variable_types: incX int

variable_types:
A
void *

variable_types:
x
double *

variable_types:
xx
double *

variable_types:
tx
double *

variable_types:
st
double *

variable_types: RowMajorStrg int


original_code:
void cblas_chpmv(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 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_chpmv","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      chpmv_(&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(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_chpmv","Illegal Uplo setting, %d\n", Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      chpmv_(&UL, &N, ALPHA,
                     AP, x, &incx, BETA, Y, &incY);
   }
   else
   {
      cblas_xerbla(1, "cblas_chpmv","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_chpmv(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;
   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_chpmv","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      chpmv_(&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(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_chpmv","Illegal Uplo setting, %d\n", Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      chpmv_(&UL, &N, ALPHA,
                     AP, x, &incx, BETA, Y, &incY);
   }
   else
   {
      cblas_xerbla(1, "cblas_chpmv","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:
alpha
void *

variable_types:
AP
void *

variable_types:
beta
void *

variable_types:
Y
void *

variable_types: incY int

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 *


decompiled_code:
__int64 __fastcall cblas_drot(int a1, __int64 a2, int a3, __int64 a4, int a5, double a6, double a7)
{
double v8; // [rsp+8h] [rbp-28h] BYREF
double v9; // [rsp+10h] [rbp-20h] BYREF
int v10; // [rsp+1Ch] [rbp-14h] BYREF
int v11; // [rsp+20h] [rbp-10h] BYREF
int v12[3]; // [rsp+24h] [rbp-Ch] BYREF

v12[0] = a1;
v11 = a3;
v10 = a5;
v9 = a6;
v8 = a7;
return drot_(v12, a2, &v11, a4, &v10, &v9, &v8);
}

canonical_decompiled_code:
__int64 __fastcall func0(int a1, __int64 a2, int a3, __int64 a4, int a5, double a6, double a7)
{
double v8; // [rsp+8h] [rbp-28h] BYREF
double v9; // [rsp+10h] [rbp-20h] BYREF
int v10; // [rsp+1Ch] [rbp-14h] BYREF
int v11; // [rsp+20h] [rbp-10h] BYREF
int v12[3]; // [rsp+24h] [rbp-Ch] BYREF

v12[0] = a1;
v11 = a3;
v10 = a5;
v9 = a6;
v8 = a7;
return drot_(v12, a2, &v11, a4, &v10, &v9, &v8);
}

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

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

variable_types: N int

variable_types:
X
double *

variable_types: incX int

variable_types:
Y
double *

variable_types: c double

variable_types: s double


original_code:
void cblas_zhemv(const enum CBLAS_ORDER order,
                 const enum CBLAS_UPLO Uplo, const int N,
                 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 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 == CblasUpper) UL = 'U';
      else if (Uplo == CblasLower) UL = 'L';
      else
      {
         cblas_xerbla(2, "cblas_zhemv","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zhemv_(&UL, &N, 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(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_zhemv","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zhemv_(&UL, &N, ALPHA, A, &lda, x, &incx,
                BETA, Y, &incY);
   }
   else
   {
      cblas_xerbla(1, "cblas_zhemv","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_zhemv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int N, 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;
   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 == CblasUpper) UL = 'U';
      else if (Uplo == CblasLower) UL = 'L';
      else
      {
         cblas_xerbla(2, "cblas_zhemv","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zhemv_(&UL, &N, 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(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_zhemv","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zhemv_(&UL, &N, ALPHA, A, &lda, x, &incx,
                BETA, Y, &incY);
   }
   else
   {
      cblas_xerbla(1, "cblas_zhemv","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:
A
void *

variable_types: lda int

variable_types:
X
void *

variable_types:
beta
void *

variable_types:
Y
void *

variable_types: incY int

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:
x
double *

variable_types:
y
double *

variable_types:
st
double *

variable_types:
tx
double *

variable_types: RowMajorStrg int


decompiled_code:
__int64 __fastcall cblas_cswap(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 cswap_(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 cswap_(v8, a2, &v7, a4, &v6);
}

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

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

variable_types: N int

variable_types:
X
void *

variable_types: incX int


decompiled_code:
__int64 __fastcall cblas_sgemv(unsigned int a1, unsigned int a2, int a3, int a4, __int64 a5, int a6, float a7, float a8, __int64 a9, char a10, __int64 a11, char a12)
{
__int64 result; // rax
__int64 v13; // [rsp+0h] [rbp-38h]
float v14; // [rsp+Ch] [rbp-2Ch] BYREF
int v15; // [rsp+10h] [rbp-28h] BYREF
float v16; // [rsp+14h] [rbp-24h] BYREF
int v17; // [rsp+18h] [rbp-20h] BYREF
int v18[4]; // [rsp+1Ch] [rbp-1Ch] BYREF
char v19[9]; // [rsp+2Fh] [rbp-9h] BYREF

RowMajorStrg = 0;
v18[0] = a3;
v17 = a4;
v15 = a6;
CBLAS_CallFromC = 1;
v16 = a7;
v14 = a8;
if ( a1 == 102 )
{
switch ( a2 )
{
case 'o':
v19[0] = 78;
break;
case 'p':
v19[0] = 84;
break;
case 'q':
v19[0] = 67;
break;
default:
v13 = a5;
cblas_xerbla(2LL, "cblas_sgemv", "Illegal TransA setting, %d\n", a2);
a5 = v13;
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
break;
}
result = sgemv_(v19, v18, &v17, &v16, a5, &v15, a9, &a10, &v14, a11, &a12);
}
else if ( a1 == 101 )
{
RowMajorStrg = 1;
if ( a2 == 111 )
{
v19[0] = 84;
}
else
{
if ( a2 - 112 > 1 )
{
result = cblas_xerbla(2LL, "cblas_sgemv", "Illegal TransA setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v19[0] = 78;
}
result = sgemv_(v19, &v17, v18, &v16, a5, &v15, a9, &a10, &v14, a11, &a12);
}
else
{
result = cblas_xerbla(1LL, "cblas_sgemv", "Illegal Order setting, %d\n", a1);
}
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(unsigned int a1, unsigned int a2, int a3, int a4, __int64 a5, int a6, float a7, float a8, __int64 a9, char a10, __int64 a11, char a12)
{
__int64 result; // rax
__int64 v13; // [rsp+0h] [rbp-38h]
float v14; // [rsp+Ch] [rbp-2Ch] BYREF
int v15; // [rsp+10h] [rbp-28h] BYREF
float v16; // [rsp+14h] [rbp-24h] BYREF
int v17; // [rsp+18h] [rbp-20h] BYREF
int v18[4]; // [rsp+1Ch] [rbp-1Ch] BYREF
char v19[9]; // [rsp+2Fh] [rbp-9h] BYREF

RowMajorStrg = 0;
v18[0] = a3;
v17 = a4;
v15 = a6;
CBLAS_CallFromC = 1;
v16 = a7;
v14 = a8;
if ( a1 == 102 )
{
switch ( a2 )
{
case 'o':
v19[0] = 78;
break;
case 'p':
v19[0] = 84;
break;
case 'q':
v19[0] = 67;
break;
default:
v13 = a5;
cblas_xerbla(2LL, "cblas_sgemv", "Illegal TransA setting, %d\n", a2);
a5 = v13;
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
break;
}
result = sgemv_(v19, v18, &v17, &v16, a5, &v15, a9, &a10, &v14, a11, &a12);
}
else if ( a1 == 101 )
{
RowMajorStrg = 1;
if ( a2 == 111 )
{
v19[0] = 84;
}
else
{
if ( a2 - 112 > 1 )
{
result = cblas_xerbla(2LL, "cblas_sgemv", "Illegal TransA setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v19[0] = 78;
}
result = sgemv_(v19, &v17, v18, &v16, a5, &v15, a9, &a10, &v14, a11, &a12);
}
else
{
result = cblas_xerbla(1LL, "cblas_sgemv", "Illegal Order setting, %d\n", a1);
}
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_sgemv(const enum CBLAS_ORDER order,
                 const enum CBLAS_TRANSPOSE TransA, const int M, 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 TA;
   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_sgemv","Illegal TransA setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
      }
      sgemv_(&TA, &M, &N, &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) TA = 'N';
      else
      {
         cblas_xerbla(2, "cblas_sgemv", "Illegal TransA setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      sgemv_(&TA, &N, &M, &alpha, A, &lda, X,
                &incX, &beta, Y, &incY);
   }
   else cblas_xerbla(1, "cblas_sgemv", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_sgemv(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, int M, int N, float alpha, float *A, int lda, float *X, int incX, float beta, float *Y, int incY)
{
   char TA;
   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_sgemv","Illegal TransA setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
      }
      sgemv_(&TA, &M, &N, &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) TA = 'N';
      else
      {
         cblas_xerbla(2, "cblas_sgemv", "Illegal TransA setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      sgemv_(&TA, &N, &M, &alpha, A, &lda, X,
                &incX, &beta, Y, &incY);
   }
   else cblas_xerbla(1, "cblas_sgemv", "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_TRANSPOSE { CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113 }

variable_types: M int

variable_types: alpha float

variable_types:
A
float *

variable_types: lda int

variable_types:
X
float *

variable_types: beta float

variable_types:
Y
float *

variable_types: incY int

variable_types: TA char