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

v9[0] = a4;
v8 = a5;
v7 = a6;
RowMajorStrg = 0;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v11[0] = 85;
}
else
{
if ( a2 != 122 )
{
result = cblas_xerbla(2LL, "cblas_dsyr2k", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v11[0] = 76;
}
switch ( a3 )
{
case 'p':
v10 = 84;
goto LABEL_20;
case 'q':
v10 = 67;
goto LABEL_20;
case 'o':
v10 = 78;
goto LABEL_20;
}
LABEL_22:
result = cblas_xerbla(3LL, "cblas_dsyr2k", "Illegal Trans setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_dsyr2k", "Illegal Order setting, %d\n", a1);
goto LABEL_29;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v11[0] = 76;
}
else
{
if ( a2 != 122 )
{
result = cblas_xerbla(3LL, "cblas_dsyr2k", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v11[0] = 85;
}
if ( a3 == 112 )
{
v10 = 78;
goto LABEL_20;
}
if ( a3 == 113 )
{
v10 = 78;
goto LABEL_20;
}
if ( a3 != 111 )
goto LABEL_22;
v10 = 84;
LABEL_20:
result = dsyr2k_(v11, &v10, v9, &v8, &v7);
LABEL_29:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(unsigned int a1, unsigned int a2, unsigned int a3, int a4, int a5, double a6)
{
__int64 result; // rax
double v7; // [rsp+10h] [rbp-28h] BYREF
int v8; // [rsp+18h] [rbp-20h] BYREF
int v9[4]; // [rsp+1Ch] [rbp-1Ch] BYREF
char v10; // [rsp+2Eh] [rbp-Ah] BYREF
char v11[9]; // [rsp+2Fh] [rbp-9h] BYREF

v9[0] = a4;
v8 = a5;
v7 = a6;
RowMajorStrg = 0;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v11[0] = 85;
}
else
{
if ( a2 != 122 )
{
result = cblas_xerbla(2LL, "cblas_dsyr2k", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v11[0] = 76;
}
switch ( a3 )
{
case 'p':
v10 = 84;
goto LABEL_20;
case 'q':
v10 = 67;
goto LABEL_20;
case 'o':
v10 = 78;
goto LABEL_20;
}
LABEL_22:
result = cblas_xerbla(3LL, "cblas_dsyr2k", "Illegal Trans setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_dsyr2k", "Illegal Order setting, %d\n", a1);
goto LABEL_29;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v11[0] = 76;
}
else
{
if ( a2 != 122 )
{
result = cblas_xerbla(3LL, "cblas_dsyr2k", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v11[0] = 85;
}
if ( a3 == 112 )
{
v10 = 78;
goto LABEL_20;
}
if ( a3 == 113 )
{
v10 = 78;
goto LABEL_20;
}
if ( a3 != 111 )
goto LABEL_22;
v10 = 84;
LABEL_20:
result = dsyr2k_(v11, &v10, v9, &v8, &v7);
LABEL_29:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_dsyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
                  const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
                  const double alpha, const double *A, const int lda,
                  const double *B, const int ldb, const double beta,
                  double *C, const int ldc)
{
   char UL, TR;
   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_dsyr2k","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Trans == CblasTrans) TR ='T';
      else if ( Trans == CblasConjTrans ) TR='C';
      else if ( Trans == CblasNoTrans ) TR='N';
      else
      {
         cblas_xerbla(3, "cblas_dsyr2k","Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dsyr2k_(&UL, &TR, &N, &K, &alpha, A, &lda,
                      B, &ldb, &beta, C, &ldc);
   } else if (Order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if( Uplo == CblasUpper) UL='L';
      else if ( Uplo == CblasLower ) UL='U';
      else
      {
         cblas_xerbla(3, "cblas_dsyr2k","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Trans == CblasTrans) TR ='N';
      else if ( Trans == CblasConjTrans ) TR='N';
      else if ( Trans == CblasNoTrans ) TR='T';
      else
      {
         cblas_xerbla(3, "cblas_dsyr2k","Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dsyr2k_(&UL, &TR, &N, &K, &alpha, A, &lda, B,
                &ldb, &beta, C, &ldc);
   }
   else cblas_xerbla(1, "cblas_dsyr2k","Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_dsyr2k(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, int N, int K, double alpha, double *A, int lda, double *B, int ldb, double beta, double *C, int ldc)
{
   char UL; char TR;
   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_dsyr2k","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Trans == CblasTrans) TR ='T';
      else if ( Trans == CblasConjTrans ) TR='C';
      else if ( Trans == CblasNoTrans ) TR='N';
      else
      {
         cblas_xerbla(3, "cblas_dsyr2k","Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dsyr2k_(&UL, &TR, &N, &K, &alpha, A, &lda,
                      B, &ldb, &beta, C, &ldc);
   } else if (Order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if( Uplo == CblasUpper) UL='L';
      else if ( Uplo == CblasLower ) UL='U';
      else
      {
         cblas_xerbla(3, "cblas_dsyr2k","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Trans == CblasTrans) TR ='N';
      else if ( Trans == CblasConjTrans ) TR='N';
      else if ( Trans == CblasNoTrans ) TR='T';
      else
      {
         cblas_xerbla(3, "cblas_dsyr2k","Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dsyr2k_(&UL, &TR, &N, &K, &alpha, A, &lda, B,
                &ldb, &beta, C, &ldc);
   }
   else cblas_xerbla(1, "cblas_dsyr2k","Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

variable_types: K int

variable_types: alpha double

variable_types:
A
double *

variable_types:
B
double *

variable_types: ldb int

variable_types: beta double

variable_types:
C
double *

variable_types: ldc int

variable_types: UL char

variable_types: TR char

variable_types: RowMajorStrg int


repo: ivanjimenez/ipaap

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

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

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

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

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

canonical_original_code:
void cblas_ctrsm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, int M, int N, void *alpha, void *A, int lda, void *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_ctrsm", "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_ctrsm", "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_ctrsm", "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_ctrsm", "Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ctrsm_(&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_ctrsm", "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_ctrsm", "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_ctrsm", "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_ctrsm", "Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ctrsm_(&SD, &UL, &TA, &DI, &N, &M, alpha, A,
                &lda, B, &ldb);
   }
   else cblas_xerbla(1, "cblas_ctrsm", "Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

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

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

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

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

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

variable_types: M int

variable_types: N int

variable_types:
alpha
void *

variable_types:
A
void *

variable_types: lda int

variable_types:
B
void *

variable_types: TA char

variable_types: SD char

variable_types: DI char

return_type: void


decompiled_code:
__int64 __fastcall cblas_dspmv(unsigned int a1, unsigned int a2, int a3, __int64 a4, __int64 a5, int a6, double a7, double a8, __int64 a9, char a10)
{
__int64 result; // rax
double v11; // [rsp+8h] [rbp-30h] BYREF
double v12; // [rsp+10h] [rbp-28h] BYREF
int v13; // [rsp+18h] [rbp-20h] BYREF
int v14[4]; // [rsp+1Ch] [rbp-1Ch] BYREF
char v15[9]; // [rsp+2Fh] [rbp-9h] BYREF

v14[0] = a3;
v12 = a7;
v13 = a6;
v11 = a8;
RowMajorStrg = 0;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v15[0] = 85;
goto LABEL_6;
}
if ( a2 == 122 )
{
v15[0] = 76;
goto LABEL_6;
}
LABEL_11:
result = cblas_xerbla(2LL, "cblas_dspmv", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_dspmv", "Illegal Order setting, %d\n", a1);
goto LABEL_15;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v15[0] = 76;
goto LABEL_6;
}
if ( a2 != 122 )
goto LABEL_11;
v15[0] = 85;
LABEL_6:
result = dspmv_(v15, v14, &v12, a4, a5, &v13, &v11, a9, &a10);
LABEL_15:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(unsigned int a1, unsigned int a2, int a3, __int64 a4, __int64 a5, int a6, double a7, double a8, __int64 a9, char a10)
{
__int64 result; // rax
double v11; // [rsp+8h] [rbp-30h] BYREF
double v12; // [rsp+10h] [rbp-28h] BYREF
int v13; // [rsp+18h] [rbp-20h] BYREF
int v14[4]; // [rsp+1Ch] [rbp-1Ch] BYREF
char v15[9]; // [rsp+2Fh] [rbp-9h] BYREF

v14[0] = a3;
v12 = a7;
v13 = a6;
v11 = a8;
RowMajorStrg = 0;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v15[0] = 85;
goto LABEL_6;
}
if ( a2 == 122 )
{
v15[0] = 76;
goto LABEL_6;
}
LABEL_11:
result = cblas_xerbla(2LL, "cblas_dspmv", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_dspmv", "Illegal Order setting, %d\n", a1);
goto LABEL_15;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v15[0] = 76;
goto LABEL_6;
}
if ( a2 != 122 )
goto LABEL_11;
v15[0] = 85;
LABEL_6:
result = dspmv_(v15, v14, &v12, a4, a5, &v13, &v11, a9, &a10);
LABEL_15:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

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

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

variable_types: alpha double

variable_types:
AP
double *

variable_types:
X
double *

variable_types: incX int

variable_types: beta double

variable_types:
Y
double *

variable_types: incY int

variable_types: UL char

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

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


original_code:
void cblas_ztbsv(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 void *A, const int lda,
                 void *X, const int incX)
{
   char TA;
   char UL;
   char DI;
   int n, i=0, tincX;
   double *st=0,*x=(double *)X;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if (order == CblasColMajor)
   {
      if (Uplo == CblasUpper) UL = 'U';
      else if (Uplo == CblasLower) UL = 'L';
      else
      {
         cblas_xerbla(2, "cblas_ztbsv","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_ztbsv","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_ztbsv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ztbsv_( &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_ztbsv","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (TransA == CblasNoTrans) TA = 'T';
      else if (TransA == CblasTrans) TA = 'N';
      else if (TransA == CblasConjTrans)
      {
         TA = 'N';
         if ( N > 0)
         {
            if ( incX > 0 )
               tincX = incX;
            else
               tincX = -incX;
            n = N*2*(tincX);
            x++;
            st=x+n;
            i = tincX << 1;
            do
            {
               *x = -(*x);
               x+=i;
            }
            while (x != st);
            x -= n;
         }
      }
      else
      {
         cblas_xerbla(3, "cblas_ztbsv","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_ztbsv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ztbsv_( &UL, &TA, &DI, &N, &K, A, &lda, X,
                      &incX);
      if (TransA == CblasConjTrans)
      {
         if (N > 0)
         {
            do
            {
               *x = -(*x);
               x+= i;
            }
            while (x != st);
         }
      }
   }
   else cblas_xerbla(1, "cblas_ztbsv", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

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

variable_types:
X
void *

variable_types: n int

variable_types: i int

variable_types: tincX int

variable_types:
st
double *

variable_types:
x
double *

variable_types: RowMajorStrg int


decompiled_code:
__int64 __fastcall cblas_zdscal(int a1, __int64 a2, int a3, double a4)
{
double v5; // [rsp+0h] [rbp-18h] BYREF
int v6; // [rsp+8h] [rbp-10h] BYREF
int v7[3]; // [rsp+Ch] [rbp-Ch] BYREF

v7[0] = a1;
v5 = a4;
v6 = a3;
return zdscal_(v7, &v5, a2, &v6);
}

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

v7[0] = a1;
v5 = a4;
v6 = a3;
return zdscal_(v7, &v5, a2, &v6);
}

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

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

variable_types: N int

variable_types: alpha double

variable_types: incX int


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

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

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

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

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

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

variable_types: alpha float

variable_types:
X
float *

variable_types:
Y
float *

variable_types: incY int

variable_types:
A
float *


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

v12[0] = a5;
v11 = a6;
RowMajorStrg = 0;
CBLAS_CallFromC = 1;
if ( a1 != 102 )
{
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_stbsv", "Illegal Order setting, %d\n", a1);
goto LABEL_39;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v14 = 76;
LABEL_6:
switch ( a3 )
{
case 'o':
v15[0] = 84;
break;
case 'p':
v15[0] = 78;
break;
case 'q':
v15[0] = 78;
break;
default:
LABEL_25:
result = cblas_xerbla(3LL, "cblas_stbsv", "Illegal TransA setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( (_DWORD)a4 == 132 )
{
v13 = 85;
goto LABEL_23;
}
if ( (_DWORD)a4 == 131 )
{
v13 = 78;
goto LABEL_23;
}
LABEL_27:
result = cblas_xerbla(4LL, "cblas_stbsv", "Illegal Diag setting, %d\n", a4);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a2 == 122 )
{
v14 = 85;
goto LABEL_6;
}
LABEL_18:
result = cblas_xerbla(2LL, "cblas_stbsv", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a2 == 121 )
{
v14 = 85;
}
else
{
if ( a2 != 122 )
goto LABEL_18;
v14 = 76;
}
switch ( a3 )
{
case 'o':
v15[0] = 78;
break;
case 'p':
v15[0] = 84;
break;
case 'q':
v15[0] = 67;
break;
default:
goto LABEL_25;
}
if ( (_DWORD)a4 == 132 )
{
v13 = 85;
}
else
{
if ( (_DWORD)a4 != 131 )
goto LABEL_27;
v13 = 78;
}
LABEL_23:
result = stbsv_(&v14, v15, &v13, v12, &v11, a7, &a8, a9, &a10);
LABEL_39:
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

v12[0] = a5;
v11 = a6;
RowMajorStrg = 0;
CBLAS_CallFromC = 1;
if ( a1 != 102 )
{
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_stbsv", "Illegal Order setting, %d\n", a1);
goto LABEL_39;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v14 = 76;
LABEL_6:
switch ( a3 )
{
case 'o':
v15[0] = 84;
break;
case 'p':
v15[0] = 78;
break;
case 'q':
v15[0] = 78;
break;
default:
LABEL_25:
result = cblas_xerbla(3LL, "cblas_stbsv", "Illegal TransA setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( (_DWORD)a4 == 132 )
{
v13 = 85;
goto LABEL_23;
}
if ( (_DWORD)a4 == 131 )
{
v13 = 78;
goto LABEL_23;
}
LABEL_27:
result = cblas_xerbla(4LL, "cblas_stbsv", "Illegal Diag setting, %d\n", a4);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a2 == 122 )
{
v14 = 85;
goto LABEL_6;
}
LABEL_18:
result = cblas_xerbla(2LL, "cblas_stbsv", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a2 == 121 )
{
v14 = 85;
}
else
{
if ( a2 != 122 )
goto LABEL_18;
v14 = 76;
}
switch ( a3 )
{
case 'o':
v15[0] = 78;
break;
case 'p':
v15[0] = 84;
break;
case 'q':
v15[0] = 67;
break;
default:
goto LABEL_25;
}
if ( (_DWORD)a4 == 132 )
{
v13 = 85;
}
else
{
if ( (_DWORD)a4 != 131 )
goto LABEL_27;
v13 = 78;
}
LABEL_23:
result = stbsv_(&v14, v15, &v13, v12, &v11, a7, &a8, a9, &a10);
LABEL_39:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_stbsv(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 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_stbsv","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_stbsv","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_stbsv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      stbsv_( &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_stbsv","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_stbsv","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_stbsv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      stbsv_( &UL, &TA, &DI, &N, &K, A, &lda, X,
                      &incX);
   }
   else cblas_xerbla(1, "cblas_stbsv", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

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

variable_types: TA char

variable_types: UL char

variable_types: DI char


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

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

canonical_decompiled_code:
__int64 __fastcall func0(unsigned int a1, unsigned int a2, int a3, __int64 a4, int a5, 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

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

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

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

variable_types:
X
double *

variable_types:
A
double *

variable_types: RowMajorStrg int


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

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

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

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

original_code:
void cblas_sspr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
                const int N, const float alpha, const float *X,
                const int incX, float *Ap)
{
   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_sspr","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      sspr_(&UL, &N, &alpha, X, &incX, Ap);
   } else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasLower) UL = 'U';
      else if (Uplo == CblasUpper) UL = 'L';
      else
      {
         cblas_xerbla(2, "cblas_sspr","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      sspr_(&UL, &N, &alpha, X, &incX, Ap);
   } else cblas_xerbla(1, "cblas_sspr", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_sspr(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int N, float alpha, float *X, int incX, float *Ap)
{
   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_sspr","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      sspr_(&UL, &N, &alpha, X, &incX, Ap);
   } else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasLower) UL = 'U';
      else if (Uplo == CblasUpper) UL = 'L';
      else
      {
         cblas_xerbla(2, "cblas_sspr","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      sspr_(&UL, &N, &alpha, X, &incX, Ap);
   } else cblas_xerbla(1, "cblas_sspr", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

variable_types: N int

variable_types: incX int

variable_types:
Ap
float *


decompiled_code:
__int64 __fastcall cblas_icamax(int a1, __int64 a2, int a3)
{
__int64 result; // rax
int v4; // [rsp+8h] [rbp-20h] BYREF
int v5[4]; // [rsp+Ch] [rbp-1Ch] BYREF
int v6[3]; // [rsp+1Ch] [rbp-Ch] BYREF

v5[0] = a1;
v4 = a3;
icamaxsub_(v5, a2, &v4, v6);
result = v6[0] - 1;
if ( !v6[0] )
result = 0LL;
return result;
}

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

v5[0] = a1;
v4 = a3;
icamaxsub_(v5, a2, &v4, v6);
result = v6[0] - 1;
if ( !v6[0] )
result = 0LL;
return result;
}

original_code:
size_t cblas_icamax( const int N, const void *X, const int incX)
{
   int iamax;
   icamaxsub_( &N, X, &incX, &iamax);
   return iamax ? iamax-1 : 0;
}

canonical_original_code:
unsigned long cblas_icamax(int N, void *X, int incX)
{
   int iamax;
   icamaxsub_( &N, X, &incX, &iamax);
   return iamax ? iamax-1 : 0;
}

variable_types:
X
void *

variable_types: iamax int

return_type: unsigned long


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

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

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

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

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

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

variable_types:
Y
double *

variable_types: incY int

variable_types: dot double

return_type: double


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

v13[0] = a4;
v12 = a5;
RowMajorStrg = 0;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v15[0] = 85;
}
else
{
if ( a2 != 122 )
{
result = cblas_xerbla(2LL, "cblas_csyrk", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v15[0] = 76;
}
switch ( a3 )
{
case 'p':
v14 = 84;
goto LABEL_20;
case 'q':
v14 = 67;
goto LABEL_20;
case 'o':
v14 = 78;
goto LABEL_20;
}
LABEL_22:
result = cblas_xerbla(3LL, "cblas_csyrk", "Illegal Trans setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_csyrk", "Illegal Order setting, %d\n", a1);
goto LABEL_29;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v15[0] = 76;
}
else
{
if ( a2 != 122 )
{
result = cblas_xerbla(3LL, "cblas_csyrk", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v15[0] = 85;
}
if ( a3 == 112 )
{
v14 = 78;
goto LABEL_20;
}
if ( a3 == 113 )
{
v14 = 78;
goto LABEL_20;
}
if ( a3 != 111 )
goto LABEL_22;
v14 = 84;
LABEL_20:
result = csyrk_(v15, &v14, v13, &v12, a6, a7, &a8, a9, a10, &a11);
LABEL_29:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

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

v13[0] = a4;
v12 = a5;
RowMajorStrg = 0;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v15[0] = 85;
}
else
{
if ( a2 != 122 )
{
result = cblas_xerbla(2LL, "cblas_csyrk", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v15[0] = 76;
}
switch ( a3 )
{
case 'p':
v14 = 84;
goto LABEL_20;
case 'q':
v14 = 67;
goto LABEL_20;
case 'o':
v14 = 78;
goto LABEL_20;
}
LABEL_22:
result = cblas_xerbla(3LL, "cblas_csyrk", "Illegal Trans setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_csyrk", "Illegal Order setting, %d\n", a1);
goto LABEL_29;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v15[0] = 76;
}
else
{
if ( a2 != 122 )
{
result = cblas_xerbla(3LL, "cblas_csyrk", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v15[0] = 85;
}
if ( a3 == 112 )
{
v14 = 78;
goto LABEL_20;
}
if ( a3 == 113 )
{
v14 = 78;
goto LABEL_20;
}
if ( a3 != 111 )
goto LABEL_22;
v14 = 84;
LABEL_20:
result = csyrk_(v15, &v14, v13, &v12, a6, a7, &a8, a9, a10, &a11);
LABEL_29:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_csyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
                 const void *alpha, const void *A, const int lda,
                 const void *beta, void *C, const int ldc)
{
   char UL, TR;
   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_csyrk", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Trans == CblasTrans) TR ='T';
      else if ( Trans == CblasConjTrans ) TR='C';
      else if ( Trans == CblasNoTrans ) TR='N';
      else
      {
         cblas_xerbla(3, "cblas_csyrk", "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      csyrk_(&UL, &TR, &N, &K, alpha, A, &lda,
                beta, C, &ldc);
   } else if (Order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if( Uplo == CblasUpper) UL='L';
      else if ( Uplo == CblasLower ) UL='U';
      else
      {
         cblas_xerbla(3, "cblas_csyrk", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Trans == CblasTrans) TR ='N';
      else if ( Trans == CblasConjTrans ) TR='N';
      else if ( Trans == CblasNoTrans ) TR='T';
      else
      {
         cblas_xerbla(3, "cblas_csyrk", "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      csyrk_(&UL, &TR, &N, &K, alpha, A, &lda,
                     beta, C, &ldc);
   }
   else cblas_xerbla(1, "cblas_csyrk", "Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_csyrk(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, int N, int K, void *alpha, void *A, int lda, void *beta, void *C, int ldc)
{
   char UL; char TR;
   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_csyrk", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Trans == CblasTrans) TR ='T';
      else if ( Trans == CblasConjTrans ) TR='C';
      else if ( Trans == CblasNoTrans ) TR='N';
      else
      {
         cblas_xerbla(3, "cblas_csyrk", "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      csyrk_(&UL, &TR, &N, &K, alpha, A, &lda,
                beta, C, &ldc);
   } else if (Order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if( Uplo == CblasUpper) UL='L';
      else if ( Uplo == CblasLower ) UL='U';
      else
      {
         cblas_xerbla(3, "cblas_csyrk", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Trans == CblasTrans) TR ='N';
      else if ( Trans == CblasConjTrans ) TR='N';
      else if ( Trans == CblasNoTrans ) TR='T';
      else
      {
         cblas_xerbla(3, "cblas_csyrk", "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      csyrk_(&UL, &TR, &N, &K, alpha, A, &lda,
                     beta, C, &ldc);
   }
   else cblas_xerbla(1, "cblas_csyrk", "Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

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

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

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

variable_types: K int

variable_types:
alpha
void *

variable_types:
A
void *

variable_types:
beta
void *

variable_types:
C
void *

variable_types: ldc int

variable_types: TR char


decompiled_code:
__int64 __fastcall cblas_saxpy(int a1, __int64 a2, int a3, __int64 a4, int a5, float a6)
{
int v7; // [rsp+0h] [rbp-18h] BYREF
int v8; // [rsp+4h] [rbp-14h] BYREF
float v9; // [rsp+8h] [rbp-10h] BYREF
int v10[3]; // [rsp+Ch] [rbp-Ch] BYREF

v10[0] = a1;
v9 = a6;
v8 = a3;
v7 = a5;
return ((__int64 (__fastcall *)(int *, float *, __int64, int *, __int64, int *))saxpy_)(v10, &v9, a2, &v8, a4, &v7);
}

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

v10[0] = a1;
v9 = a6;
v8 = a3;
v7 = a5;
return ((__int64 (__fastcall *)(int *, float *, __int64, int *, __int64, int *))saxpy_)(v10, &v9, a2, &v8, a4, &v7);
}

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

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

variable_types: N int

variable_types: alpha float

variable_types:
X
float *

variable_types: incX int

variable_types:
Y
float *


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

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

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

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

original_code:
void cblas_ctpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
                 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
                 const int N, const void *Ap, void *X, const int incX)
{
   char TA;
   char UL;
   char DI;
   int n, i=0, tincX;
   float *st=0,*x=(float *)X;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if (order == CblasColMajor)
   {
      if (Uplo == CblasUpper) UL = 'U';
      else if (Uplo == CblasLower) UL = 'L';
      else
      {
         cblas_xerbla(2, "cblas_ctpmv","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_ctpmv","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_ctpmv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ctpmv_( &UL, &TA, &DI, &N, Ap, X, &incX);
   }
   else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_ctpmv","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (TransA == CblasNoTrans) TA = 'T';
      else if (TransA == CblasTrans) TA = 'N';
      else if (TransA == CblasConjTrans)
      {
         TA = 'N';
         if ( N > 0)
         {
            if(incX > 0)
               tincX = incX;
            else
               tincX = -incX;
            i = tincX << 1;
            n = i * N;
            x++;
            st = x + n;
            do
            {
               *x = -(*x);
               x += i;
            }
            while (x != st);
            x -= n;
         }
      }
      else
      {
         cblas_xerbla(3, "cblas_ctpmv","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_ctpmv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ctpmv_( &UL, &TA, &DI, &N, Ap, X,&incX);
      if (TransA == CblasConjTrans)
      {
         if (N > 0)
         {
            do
            {
               *x = -(*x);
               x += i;
            }
            while (x != st);
         }
      }
   }
   else cblas_xerbla(1, "cblas_ctpmv", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_ctpmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, int N, void *Ap, void *X, int incX)
{
   char TA;
   char UL;
   char DI;
   int n; int i = 0; int tincX;
   float *st = 0; float *x = (float *)X;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if (order == CblasColMajor)
   {
      if (Uplo == CblasUpper) UL = 'U';
      else if (Uplo == CblasLower) UL = 'L';
      else
      {
         cblas_xerbla(2, "cblas_ctpmv","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_ctpmv","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_ctpmv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ctpmv_( &UL, &TA, &DI, &N, Ap, X, &incX);
   }
   else if (order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if (Uplo == CblasUpper) UL = 'L';
      else if (Uplo == CblasLower) UL = 'U';
      else
      {
         cblas_xerbla(2, "cblas_ctpmv","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if (TransA == CblasNoTrans) TA = 'T';
      else if (TransA == CblasTrans) TA = 'N';
      else if (TransA == CblasConjTrans)
      {
         TA = 'N';
         if ( N > 0)
         {
            if(incX > 0)
               tincX = incX;
            else
               tincX = -incX;
            i = tincX << 1;
            n = i * N;
            x++;
            st = x + n;
            do
            {
               *x = -(*x);
               x += i;
            }
            while (x != st);
            x -= n;
         }
      }
      else
      {
         cblas_xerbla(3, "cblas_ctpmv","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_ctpmv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ctpmv_( &UL, &TA, &DI, &N, Ap, X,&incX);
      if (TransA == CblasConjTrans)
      {
         if (N > 0)
         {
            do
            {
               *x = -(*x);
               x += i;
            }
            while (x != st);
         }
      }
   }
   else cblas_xerbla(1, "cblas_ctpmv", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

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

variable_types:
Ap
void *

variable_types:
X
void *

variable_types: TA char

variable_types: UL char

variable_types: DI char

variable_types: n int

variable_types: i int

variable_types: tincX int

variable_types:
st
float *

variable_types:
x
float *

variable_types: RowMajorStrg int

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


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

v9[0] = a4;
v8 = a5;
v7 = a6;
RowMajorStrg = 0;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v11[0] = 85;
}
else
{
if ( a2 != 122 )
{
result = cblas_xerbla(2LL, "cblas_zherk", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v11[0] = 76;
}
switch ( a3 )
{
case 'p':
v10 = 84;
goto LABEL_20;
case 'q':
v10 = 67;
goto LABEL_20;
case 'o':
v10 = 78;
goto LABEL_20;
}
LABEL_22:
result = cblas_xerbla(3LL, "cblas_zherk", "Illegal Trans setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_zherk", "Illegal Order setting, %d\n", a1);
goto LABEL_29;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v11[0] = 76;
}
else
{
if ( a2 != 122 )
{
result = cblas_xerbla(3LL, "cblas_zherk", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v11[0] = 85;
}
if ( a3 == 112 )
{
v10 = 78;
goto LABEL_20;
}
if ( a3 == 113 )
{
v10 = 78;
goto LABEL_20;
}
if ( a3 != 111 )
goto LABEL_22;
v10 = 67;
LABEL_20:
result = zherk_(v11, &v10, v9, &v8, &v7);
LABEL_29:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(unsigned int a1, unsigned int a2, unsigned int a3, int a4, int a5, double a6)
{
__int64 result; // rax
double v7; // [rsp+10h] [rbp-28h] BYREF
int v8; // [rsp+18h] [rbp-20h] BYREF
int v9[4]; // [rsp+1Ch] [rbp-1Ch] BYREF
char v10; // [rsp+2Eh] [rbp-Ah] BYREF
char v11[9]; // [rsp+2Fh] [rbp-9h] BYREF

v9[0] = a4;
v8 = a5;
v7 = a6;
RowMajorStrg = 0;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v11[0] = 85;
}
else
{
if ( a2 != 122 )
{
result = cblas_xerbla(2LL, "cblas_zherk", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v11[0] = 76;
}
switch ( a3 )
{
case 'p':
v10 = 84;
goto LABEL_20;
case 'q':
v10 = 67;
goto LABEL_20;
case 'o':
v10 = 78;
goto LABEL_20;
}
LABEL_22:
result = cblas_xerbla(3LL, "cblas_zherk", "Illegal Trans setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_zherk", "Illegal Order setting, %d\n", a1);
goto LABEL_29;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v11[0] = 76;
}
else
{
if ( a2 != 122 )
{
result = cblas_xerbla(3LL, "cblas_zherk", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v11[0] = 85;
}
if ( a3 == 112 )
{
v10 = 78;
goto LABEL_20;
}
if ( a3 == 113 )
{
v10 = 78;
goto LABEL_20;
}
if ( a3 != 111 )
goto LABEL_22;
v10 = 67;
LABEL_20:
result = zherk_(v11, &v10, v9, &v8, &v7);
LABEL_29:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_zherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
                 const double alpha, const void *A, const int lda,
                 const double beta, void *C, const int ldc)
{
   char UL, TR;
   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_zherk", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Trans == CblasTrans) TR ='T';
      else if ( Trans == CblasConjTrans ) TR='C';
      else if ( Trans == CblasNoTrans ) TR='N';
      else
      {
         cblas_xerbla(3, "cblas_zherk", "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zherk_(&UL, &TR, &N, &K, &alpha, A, &lda,
                     &beta, C, &ldc);
   } else if (Order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if( Uplo == CblasUpper) UL='L';
      else if ( Uplo == CblasLower ) UL='U';
      else
      {
         cblas_xerbla(3, "cblas_zherk", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Trans == CblasTrans) TR ='N';
      else if ( Trans == CblasConjTrans ) TR='N';
      else if ( Trans == CblasNoTrans ) TR='C';
      else
      {
         cblas_xerbla(3, "cblas_zherk", "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zherk_(&UL, &TR, &N, &K, &alpha, A, &lda,
                &beta, C, &ldc);
   }
   else cblas_xerbla(1, "cblas_zherk", "Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_zherk(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, int N, int K, double alpha, void *A, int lda, double beta, void *C, int ldc)
{
   char UL; char TR;
   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_zherk", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Trans == CblasTrans) TR ='T';
      else if ( Trans == CblasConjTrans ) TR='C';
      else if ( Trans == CblasNoTrans ) TR='N';
      else
      {
         cblas_xerbla(3, "cblas_zherk", "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zherk_(&UL, &TR, &N, &K, &alpha, A, &lda,
                     &beta, C, &ldc);
   } else if (Order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if( Uplo == CblasUpper) UL='L';
      else if ( Uplo == CblasLower ) UL='U';
      else
      {
         cblas_xerbla(3, "cblas_zherk", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if( Trans == CblasTrans) TR ='N';
      else if ( Trans == CblasConjTrans ) TR='N';
      else if ( Trans == CblasNoTrans ) TR='C';
      else
      {
         cblas_xerbla(3, "cblas_zherk", "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zherk_(&UL, &TR, &N, &K, &alpha, A, &lda,
                &beta, C, &ldc);
   }
   else cblas_xerbla(1, "cblas_zherk", "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: N int

variable_types: K int

variable_types: alpha double

variable_types:
A
void *

variable_types: lda int

variable_types: beta double

variable_types:
C
void *

variable_types: ldc int

variable_types: TR char


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

v15[0] = a4;
v14 = a5;
RowMajorStrg = 0;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 142 )
{
v17[0] = 82;
}
else
{
if ( a2 != 141 )
goto LABEL_18;
v17[0] = 76;
}
if ( a3 == 121 )
{
v16 = 85;
}
else
{
if ( a3 != 122 )
goto LABEL_20;
v16 = 76;
}
result = csymm_(v17, &v16, v15, &v14, a6, a7, &a8, a9, &a10, a11, a12, &a13);
goto LABEL_26;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_csymm", "Illegal Order setting, %d\n", a1);
goto LABEL_26;
}
RowMajorStrg = 1;
if ( a2 != 142 )
{
if ( a2 == 141 )
{
v17[0] = 82;
goto LABEL_6;
}
LABEL_18:
result = cblas_xerbla(2LL, "cblas_csymm", "Illegal Side setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v17[0] = 76;
LABEL_6:
if ( a3 == 121 )
{
v16 = 76;
goto LABEL_9;
}
if ( a3 != 122 )
{
LABEL_20:
result = cblas_xerbla(3LL, "cblas_csymm", "Illegal Uplo setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v16 = 85;
LABEL_9:
result = csymm_(v17, &v16, &v14, v15, a6, a7, &a8, a9, &a10, a11, a12, &a13);
LABEL_26:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

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

v15[0] = a4;
v14 = a5;
RowMajorStrg = 0;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 142 )
{
v17[0] = 82;
}
else
{
if ( a2 != 141 )
goto LABEL_18;
v17[0] = 76;
}
if ( a3 == 121 )
{
v16 = 85;
}
else
{
if ( a3 != 122 )
goto LABEL_20;
v16 = 76;
}
result = csymm_(v17, &v16, v15, &v14, a6, a7, &a8, a9, &a10, a11, a12, &a13);
goto LABEL_26;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_csymm", "Illegal Order setting, %d\n", a1);
goto LABEL_26;
}
RowMajorStrg = 1;
if ( a2 != 142 )
{
if ( a2 == 141 )
{
v17[0] = 82;
goto LABEL_6;
}
LABEL_18:
result = cblas_xerbla(2LL, "cblas_csymm", "Illegal Side setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v17[0] = 76;
LABEL_6:
if ( a3 == 121 )
{
v16 = 76;
goto LABEL_9;
}
if ( a3 != 122 )
{
LABEL_20:
result = cblas_xerbla(3LL, "cblas_csymm", "Illegal Uplo setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v16 = 85;
LABEL_9:
result = csymm_(v17, &v16, &v14, v15, a6, a7, &a8, a9, &a10, a11, a12, &a13);
LABEL_26:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_csymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
                 const enum CBLAS_UPLO Uplo, const int M, const int N,
                 const void *alpha, const void *A, const int lda,
                 const void *B, const int ldb, const void *beta,
                 void *C, const int ldc)
{
   char SD, UL;
   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_csymm", "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_csymm", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      csymm_(&SD, &UL, &M, &N, alpha, A, &lda,
                      B, &ldb, beta, C, &ldc);
   } else if (Order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if( Side == CblasRight) SD='L';
      else if ( Side == CblasLeft ) SD='R';
      else
      {
         cblas_xerbla(2, "cblas_csymm", "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_csymm", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      csymm_(&SD, &UL, &N, &M, alpha, A, &lda,
                     B, &ldb, beta, C, &ldc);
   }
   else cblas_xerbla(1, "cblas_csymm", "Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_csymm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, int M, int N, void *alpha, void *A, int lda, void *B, int ldb, void *beta, void *C, int ldc)
{
   char SD; char UL;
   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_csymm", "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_csymm", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      csymm_(&SD, &UL, &M, &N, alpha, A, &lda,
                      B, &ldb, beta, C, &ldc);
   } else if (Order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if( Side == CblasRight) SD='L';
      else if ( Side == CblasLeft ) SD='R';
      else
      {
         cblas_xerbla(2, "cblas_csymm", "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_csymm", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      csymm_(&SD, &UL, &N, &M, alpha, A, &lda,
                     B, &ldb, beta, C, &ldc);
   }
   else cblas_xerbla(1, "cblas_csymm", "Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

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

variable_types: M int

variable_types:
alpha
void *

variable_types:
B
void *

variable_types: ldb int

variable_types:
beta
void *

variable_types: SD char

variable_types: UL char


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

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

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

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

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

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

variable_types: beta float

variable_types: RowMajorStrg int

variable_types:
ALPHA
float [2]

variable_types:
alp
float *