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

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

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

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

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

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

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

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

variable_types: M int

variable_types: N int

variable_types: alpha double

variable_types:
A
double *

variable_types:
B
double *

variable_types: TA char

variable_types: SD char

variable_types: DI char


repo: ivanjimenez/ipaap

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

RowMajorStrg = 0;
v9[0] = a4;
v8 = a5;
CBLAS_CallFromC = 1;
v7 = a6;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v10 = 85;
}
else
{
if ( a2 != 122 )
{
result = cblas_xerbla(2LL, "cblas_dsyrk", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v10 = 76;
}
if ( a3 == 112 )
goto LABEL_8;
if ( a3 == 113 )
{
v11[0] = 67;
goto LABEL_18;
}
if ( a3 != 111 )
goto LABEL_24;
goto LABEL_17;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_dsyrk", "Illegal Order setting, %d\n", a1);
LABEL_10:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v10 = 76;
LABEL_6:
if ( a3 - 112 > 1 )
{
if ( a3 == 111 )
{
LABEL_8:
v11[0] = 84;
LABEL_18:
result = dsyrk_(&v10, v11, v9, &v8, &v7);
goto LABEL_10;
}
LABEL_24:
result = cblas_xerbla(3LL, "cblas_dsyrk", "Illegal Trans setting, %d\n", a3);
goto LABEL_21;
}
LABEL_17:
v11[0] = 78;
goto LABEL_18;
}
if ( a2 == 122 )
{
v10 = 85;
goto LABEL_6;
}
result = cblas_xerbla(3LL, "cblas_dsyrk", "Illegal Uplo setting, %d\n", a2);
LABEL_21:
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

RowMajorStrg = 0;
v9[0] = a4;
v8 = a5;
CBLAS_CallFromC = 1;
v7 = a6;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v10 = 85;
}
else
{
if ( a2 != 122 )
{
result = cblas_xerbla(2LL, "cblas_dsyrk", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v10 = 76;
}
if ( a3 == 112 )
goto LABEL_8;
if ( a3 == 113 )
{
v11[0] = 67;
goto LABEL_18;
}
if ( a3 != 111 )
goto LABEL_24;
goto LABEL_17;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_dsyrk", "Illegal Order setting, %d\n", a1);
LABEL_10:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v10 = 76;
LABEL_6:
if ( a3 - 112 > 1 )
{
if ( a3 == 111 )
{
LABEL_8:
v11[0] = 84;
LABEL_18:
result = dsyrk_(&v10, v11, v9, &v8, &v7);
goto LABEL_10;
}
LABEL_24:
result = cblas_xerbla(3LL, "cblas_dsyrk", "Illegal Trans setting, %d\n", a3);
goto LABEL_21;
}
LABEL_17:
v11[0] = 78;
goto LABEL_18;
}
if ( a2 == 122 )
{
v10 = 85;
goto LABEL_6;
}
result = cblas_xerbla(3LL, "cblas_dsyrk", "Illegal Uplo setting, %d\n", a2);
LABEL_21:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_dsyrk(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 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_dsyrk","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_dsyrk","Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dsyrk_(&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_dsyrk","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_dsyrk","Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dsyrk_(&UL, &TR, &N, &K, &alpha, A, &lda,
                     &beta, C, &ldc);
   }
   else cblas_xerbla(1, "cblas_dsyrk","Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_dsyrk(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, int N, int K, double alpha, double *A, int lda, 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_dsyrk","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_dsyrk","Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dsyrk_(&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_dsyrk","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_dsyrk","Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dsyrk_(&UL, &TR, &N, &K, &alpha, A, &lda,
                     &beta, C, &ldc);
   }
   else cblas_xerbla(1, "cblas_dsyrk","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: lda 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

return_type: void


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

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

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

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

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

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

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

variable_types: M int

variable_types: N int

variable_types:
alpha
void *

variable_types:
A
void *

variable_types:
B
void *

variable_types: ldb int

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

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

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


decompiled_code:
__int64 __fastcall cblas_ztbmv(unsigned int a1, unsigned int a2, unsigned int a3, int a4, int a5, int a6, __int64 a7, char a8, _QWORD *a9, int a10)
{
signed int v11; // ebp
_QWORD *v12; // rax
__int64 v13; // rdi
_QWORD *v14; // r13
_QWORD *v15; // rbx
__int64 result; // rax
__int64 v17; // rbp
int v18; // [rsp+8h] [rbp-40h] BYREF
int v19[4]; // [rsp+Ch] [rbp-3Ch] BYREF
char v20; // [rsp+1Dh] [rbp-2Bh] BYREF
char v21; // [rsp+1Eh] [rbp-2Ah] BYREF
char v22[41]; // [rsp+1Fh] [rbp-29h] BYREF

RowMajorStrg = 0;
v19[0] = a5;
v18 = a6;
CBLAS_CallFromC = 1;
if ( a1 != 102 )
{
if ( a1 == 101 )
{
RowMajorStrg = 1;
if ( a2 == 121 )
{
v21 = 76;
LABEL_6:
switch ( a3 )
{
case 'o':
v20 = 84;
v15 = a9;
v14 = 0LL;
v11 = 0;
break;
case 'p':
v20 = 78;
v15 = a9;
v14 = 0LL;
v11 = 0;
break;
case 'q':
v20 = 78;
if ( v19[0] <= 0 )
{
v15 = a9;
v14 = 0LL;
v11 = 0;
}
else
{
v11 = 2 * abs32(a10);
v12 = a9 + 1;
v13 = 8LL * v11 * v19[0];
v14 = &a9[(unsigned __int64)v13 / 8 + 1];
do
{
*v12 ^= LC4;
v12 += v11;
}
while ( v14 != v12 );
v15 = &v14[v13 / 0xFFFFFFFFFFFFFFF8LL];
}
break;
default:
LABEL_41:
result = cblas_xerbla(3LL, "cblas_ztbmv", "Illegal TransA setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a4 == 132 )
{
v22[0] = 85;
goto LABEL_34;
}
if ( a4 == 131 )
{
v22[0] = 78;
LABEL_34:
result = ztbmv_(&v21, &v20, v22, v19, &v18, a7, &a8, a9, &a10);
if ( a3 == 113 )
{
result = (unsigned int)v19[0];
if ( v19[0] > 0 )
{
v17 = 8LL * v11;
do
{
*v15 ^= LC4;
v15 = (_QWORD *)((char *)v15 + v17);
}
while ( v14 != v15 );
}
}
goto LABEL_14;
}
result = cblas_xerbla(4LL, "cblas_ztbmv", "Illegal Uplo setting, %d\n");
goto LABEL_46;
}
if ( a2 == 122 )
{
v21 = 85;
goto LABEL_6;
}
LABEL_26:
result = cblas_xerbla(2LL, "cblas_ztbmv", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
result = cblas_xerbla(1LL, "cblas_ztbmv", "Illegal Order setting, %d\n", a1);
LABEL_14:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a2 == 121 )
{
v21 = 85;
}
else
{
if ( a2 != 122 )
goto LABEL_26;
v21 = 76;
}
switch ( a3 )
{
case 'o':
v20 = 78;
break;
case 'p':
v20 = 84;
break;
case 'q':
v20 = 67;
break;
default:
goto LABEL_41;
}
if ( a4 == 132 )
{
v22[0] = 85;
goto LABEL_25;
}
if ( a4 == 131 )
{
v22[0] = 78;
LABEL_25:
result = ztbmv_(&v21, &v20, v22, v19, &v18, a7, &a8, a9, &a10);
goto LABEL_14;
}
result = cblas_xerbla(4LL, "cblas_ztbmv", "Illegal Diag setting, %d\n");
LABEL_46:
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, __int64 a7, char a8, _QWORD *a9, int a10)
{
signed int v11; // ebp
_QWORD *v12; // rax
__int64 v13; // rdi
_QWORD *v14; // r13
_QWORD *v15; // rbx
__int64 result; // rax
__int64 v17; // rbp
int v18; // [rsp+8h] [rbp-40h] BYREF
int v19[4]; // [rsp+Ch] [rbp-3Ch] BYREF
char v20; // [rsp+1Dh] [rbp-2Bh] BYREF
char v21; // [rsp+1Eh] [rbp-2Ah] BYREF
char v22[41]; // [rsp+1Fh] [rbp-29h] BYREF

RowMajorStrg = 0;
v19[0] = a5;
v18 = a6;
CBLAS_CallFromC = 1;
if ( a1 != 102 )
{
if ( a1 == 101 )
{
RowMajorStrg = 1;
if ( a2 == 121 )
{
v21 = 76;
LABEL_6:
switch ( a3 )
{
case 'o':
v20 = 84;
v15 = a9;
v14 = 0LL;
v11 = 0;
break;
case 'p':
v20 = 78;
v15 = a9;
v14 = 0LL;
v11 = 0;
break;
case 'q':
v20 = 78;
if ( v19[0] <= 0 )
{
v15 = a9;
v14 = 0LL;
v11 = 0;
}
else
{
v11 = 2 * abs32(a10);
v12 = a9 + 1;
v13 = 8LL * v11 * v19[0];
v14 = &a9[(unsigned __int64)v13 / 8 + 1];
do
{
*v12 ^= LC4;
v12 += v11;
}
while ( v14 != v12 );
v15 = &v14[v13 / 0xFFFFFFFFFFFFFFF8LL];
}
break;
default:
LABEL_41:
result = cblas_xerbla(3LL, "cblas_ztbmv", "Illegal TransA setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a4 == 132 )
{
v22[0] = 85;
goto LABEL_34;
}
if ( a4 == 131 )
{
v22[0] = 78;
LABEL_34:
result = ztbmv_(&v21, &v20, v22, v19, &v18, a7, &a8, a9, &a10);
if ( a3 == 113 )
{
result = (unsigned int)v19[0];
if ( v19[0] > 0 )
{
v17 = 8LL * v11;
do
{
*v15 ^= LC4;
v15 = (_QWORD *)((char *)v15 + v17);
}
while ( v14 != v15 );
}
}
goto LABEL_14;
}
result = cblas_xerbla(4LL, "cblas_ztbmv", "Illegal Uplo setting, %d\n");
goto LABEL_46;
}
if ( a2 == 122 )
{
v21 = 85;
goto LABEL_6;
}
LABEL_26:
result = cblas_xerbla(2LL, "cblas_ztbmv", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
result = cblas_xerbla(1LL, "cblas_ztbmv", "Illegal Order setting, %d\n", a1);
LABEL_14:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a2 == 121 )
{
v21 = 85;
}
else
{
if ( a2 != 122 )
goto LABEL_26;
v21 = 76;
}
switch ( a3 )
{
case 'o':
v20 = 78;
break;
case 'p':
v20 = 84;
break;
case 'q':
v20 = 67;
break;
default:
goto LABEL_41;
}
if ( a4 == 132 )
{
v22[0] = 85;
goto LABEL_25;
}
if ( a4 == 131 )
{
v22[0] = 78;
LABEL_25:
result = ztbmv_(&v21, &v20, v22, v19, &v18, a7, &a8, a9, &a10);
goto LABEL_14;
}
result = cblas_xerbla(4LL, "cblas_ztbmv", "Illegal Diag setting, %d\n");
LABEL_46:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_ztbmv(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_ztbmv","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_ztbmv","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_ztbmv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ztbmv_( &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_ztbmv","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_ztbmv","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_ztbmv","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ztbmv_( &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_ztbmv", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_ztbmv(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_ztbmv","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_ztbmv","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_ztbmv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ztbmv_( &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_ztbmv","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_ztbmv","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_ztbmv","Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ztbmv_( &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_ztbmv", "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:
X
void *

variable_types: incX int

variable_types: TA char

variable_types: DI char

variable_types: n int

variable_types: i int

variable_types: tincX int

variable_types:
st
double *

variable_types:
x
double *

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


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

RowMajorStrg = 0;
v14 = a5;
v15[0] = a4;
CBLAS_CallFromC = 1;
if ( a1 != 102 )
{
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_zsymm", "Illegal Order setting, %d\n", a1);
goto LABEL_11;
}
RowMajorStrg = 1;
if ( a2 == 142 )
{
v16 = 76;
goto LABEL_6;
}
if ( a2 == 141 )
{
v16 = 82;
LABEL_6:
if ( a3 == 121 )
{
v17[0] = 76;
goto LABEL_9;
}
if ( a3 == 122 )
{
v17[0] = 85;
LABEL_9:
result = zsymm_(&v16, v17, &v14, v15, a6, a7, &a8, a9, &a10, a11, a12, &a13);
LABEL_11:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
goto LABEL_21;
}
LABEL_19:
result = cblas_xerbla(2LL, "cblas_zsymm", "Illegal Side setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a2 == 142 )
{
v16 = 82;
}
else
{
if ( a2 != 141 )
goto LABEL_19;
v16 = 76;
}
if ( a3 == 121 )
{
v17[0] = 85;
goto LABEL_18;
}
if ( a3 == 122 )
{
v17[0] = 76;
LABEL_18:
result = zsymm_(&v16, v17, v15, &v14, a6, a7, &a8, a9, &a10, a11, a12, &a13);
goto LABEL_11;
}
LABEL_21:
result = cblas_xerbla(3LL, "cblas_zsymm", "Illegal Uplo setting, %d\n", a3);
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

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

original_code:
void cblas_zsymm(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_zsymm", "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_zsymm", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zsymm_(&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_zsymm", "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_zsymm", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zsymm_(&SD, &UL, &N, &M, alpha, A, &lda,
                     B, &ldb, beta, C, &ldc);
   }
   else cblas_xerbla(1, "cblas_zsymm", "Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_zsymm(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_zsymm", "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_zsymm", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zsymm_(&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_zsymm", "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_zsymm", "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      zsymm_(&SD, &UL, &N, &M, alpha, A, &lda,
                     B, &ldb, beta, C, &ldc);
   }
   else cblas_xerbla(1, "cblas_zsymm", "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: N int

variable_types: lda int

variable_types:
beta
void *

variable_types:
C
void *

variable_types: ldc int

variable_types: SD char

variable_types: UL char

variable_types: RowMajorStrg int


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

RowMajorStrg = 0;
v17[0] = a4;
v16 = a5;
v15 = a6;
CBLAS_CallFromC = 1;
if ( a1 != 102 )
{
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_cgemm", "Illegal Order setting, %d\n", a1);
goto LABEL_13;
}
RowMajorStrg = 1;
switch ( a2 )
{
case 'p':
v19[0] = 84;
goto LABEL_7;
case 'q':
v19[0] = 67;
goto LABEL_7;
case 'o':
v19[0] = 78;
LABEL_7:
switch ( a3 )
{
case 'p':
v18 = 84;
goto LABEL_11;
case 'q':
v18 = 67;
goto LABEL_11;
case 'o':
v18 = 78;
LABEL_11:
result = cgemm_(&v18, v19, &v16, v17, &v15, a7, a10, &a11, a8, &a9, a12, a13, &a14);
LABEL_13:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
result = cblas_xerbla(2LL, "cblas_cgemm", "Illegal TransB setting, %d\n", a3);
goto LABEL_30;
}
LABEL_29:
result = cblas_xerbla(2LL, "cblas_cgemm", "Illegal TransA setting, %d\n", a2);
LABEL_30:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
switch ( a2 )
{
case 'p':
v18 = 84;
break;
case 'q':
v18 = 67;
break;
case 'o':
v18 = 78;
break;
default:
goto LABEL_29;
}
switch ( a3 )
{
case 'p':
v19[0] = 84;
goto LABEL_22;
case 'q':
v19[0] = 67;
goto LABEL_22;
case 'o':
v19[0] = 78;
LABEL_22:
result = cgemm_(&v18, v19, v17, &v16, &v15, a7, a8, &a9, a10, &a11, a12, a13, &a14);
goto LABEL_13;
}
result = cblas_xerbla(3LL, "cblas_cgemm", "Illegal TransB setting, %d\n", a3);
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, __int64 a7, __int64 a8, char a9, __int64 a10, char a11, __int64 a12, __int64 a13, char a14)
{
__int64 result; // rax
int v15; // [rsp+4h] [rbp-24h] BYREF
int v16; // [rsp+8h] [rbp-20h] BYREF
int v17[4]; // [rsp+Ch] [rbp-1Ch] BYREF
char v18; // [rsp+1Eh] [rbp-Ah] BYREF
char v19[9]; // [rsp+1Fh] [rbp-9h] BYREF

RowMajorStrg = 0;
v17[0] = a4;
v16 = a5;
v15 = a6;
CBLAS_CallFromC = 1;
if ( a1 != 102 )
{
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_cgemm", "Illegal Order setting, %d\n", a1);
goto LABEL_13;
}
RowMajorStrg = 1;
switch ( a2 )
{
case 'p':
v19[0] = 84;
goto LABEL_7;
case 'q':
v19[0] = 67;
goto LABEL_7;
case 'o':
v19[0] = 78;
LABEL_7:
switch ( a3 )
{
case 'p':
v18 = 84;
goto LABEL_11;
case 'q':
v18 = 67;
goto LABEL_11;
case 'o':
v18 = 78;
LABEL_11:
result = cgemm_(&v18, v19, &v16, v17, &v15, a7, a10, &a11, a8, &a9, a12, a13, &a14);
LABEL_13:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
result = cblas_xerbla(2LL, "cblas_cgemm", "Illegal TransB setting, %d\n", a3);
goto LABEL_30;
}
LABEL_29:
result = cblas_xerbla(2LL, "cblas_cgemm", "Illegal TransA setting, %d\n", a2);
LABEL_30:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
switch ( a2 )
{
case 'p':
v18 = 84;
break;
case 'q':
v18 = 67;
break;
case 'o':
v18 = 78;
break;
default:
goto LABEL_29;
}
switch ( a3 )
{
case 'p':
v19[0] = 84;
goto LABEL_22;
case 'q':
v19[0] = 67;
goto LABEL_22;
case 'o':
v19[0] = 78;
LABEL_22:
result = cgemm_(&v18, v19, v17, &v16, &v15, a7, a8, &a9, a10, &a11, a12, a13, &a14);
goto LABEL_13;
}
result = cblas_xerbla(3LL, "cblas_cgemm", "Illegal TransB setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_cgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
                 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
                 const int K, const void *alpha, const void *A,
                 const int lda, const void *B, const int ldb,
                 const void *beta, void *C, const int ldc)
{
   char TA, TB;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if( Order == CblasColMajor )
   {
      if(TransA == CblasTrans) TA='T';
      else if ( TransA == CblasConjTrans ) TA='C';
      else if ( TransA == CblasNoTrans ) TA='N';
      else
      {
         cblas_xerbla(2, "cblas_cgemm", "Illegal TransA setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if(TransB == CblasTrans) TB='T';
      else if ( TransB == CblasConjTrans ) TB='C';
      else if ( TransB == CblasNoTrans ) TB='N';
      else
      {
         cblas_xerbla(3, "cblas_cgemm", "Illegal TransB setting, %d\n", TransB);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      cgemm_(&TA, &TB, &M, &N, &K, alpha, A,
                     &lda, B, &ldb, beta, C, &ldc);
   } else if (Order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if(TransA == CblasTrans) TB='T';
      else if ( TransA == CblasConjTrans ) TB='C';
      else if ( TransA == CblasNoTrans ) TB='N';
      else
      {
         cblas_xerbla(2, "cblas_cgemm", "Illegal TransA setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if(TransB == CblasTrans) TA='T';
      else if ( TransB == CblasConjTrans ) TA='C';
      else if ( TransB == CblasNoTrans ) TA='N';
      else
      {
         cblas_xerbla(2, "cblas_cgemm", "Illegal TransB setting, %d\n", TransB);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      cgemm_(&TA, &TB, &N, &M, &K, alpha, B,
                  &ldb, A, &lda, beta, C, &ldc);
   }
   else cblas_xerbla(1, "cblas_cgemm", "Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_cgemm(enum CBLAS_ORDER Order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANSPOSE TransB, int M, int N, int K, void *alpha, void *A, int lda, void *B, int ldb, void *beta, void *C, int ldc)
{
   char TA; char TB;
   extern int CBLAS_CallFromC;
   extern int RowMajorStrg;
   RowMajorStrg = 0;
   CBLAS_CallFromC = 1;
   if( Order == CblasColMajor )
   {
      if(TransA == CblasTrans) TA='T';
      else if ( TransA == CblasConjTrans ) TA='C';
      else if ( TransA == CblasNoTrans ) TA='N';
      else
      {
         cblas_xerbla(2, "cblas_cgemm", "Illegal TransA setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if(TransB == CblasTrans) TB='T';
      else if ( TransB == CblasConjTrans ) TB='C';
      else if ( TransB == CblasNoTrans ) TB='N';
      else
      {
         cblas_xerbla(3, "cblas_cgemm", "Illegal TransB setting, %d\n", TransB);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      cgemm_(&TA, &TB, &M, &N, &K, alpha, A,
                     &lda, B, &ldb, beta, C, &ldc);
   } else if (Order == CblasRowMajor)
   {
      RowMajorStrg = 1;
      if(TransA == CblasTrans) TB='T';
      else if ( TransA == CblasConjTrans ) TB='C';
      else if ( TransA == CblasNoTrans ) TB='N';
      else
      {
         cblas_xerbla(2, "cblas_cgemm", "Illegal TransA setting, %d\n", TransA);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      if(TransB == CblasTrans) TA='T';
      else if ( TransB == CblasConjTrans ) TA='C';
      else if ( TransB == CblasNoTrans ) TA='N';
      else
      {
         cblas_xerbla(2, "cblas_cgemm", "Illegal TransB setting, %d\n", TransB);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      cgemm_(&TA, &TB, &N, &M, &K, alpha, B,
                  &ldb, A, &lda, beta, C, &ldc);
   }
   else cblas_xerbla(1, "cblas_cgemm", "Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

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

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

variable_types: K int

variable_types:
alpha
void *

variable_types:
A
void *

variable_types:
B
void *

variable_types: ldb int

variable_types: TA char

variable_types: TB char


decompiled_code:
__int64 __fastcall cblas_srotmg(__int64 a1, __int64 a2, __int64 a3, __int64 a4, float a5)
{
float v6[3]; // [rsp+Ch] [rbp-Ch] BYREF

v6[0] = a5;
return srotmg_(a1, a2, a3, v6, a4);
}

canonical_decompiled_code:
__int64 __fastcall func0(__int64 a1, __int64 a2, __int64 a3, __int64 a4, float a5)
{
float v6[3]; // [rsp+Ch] [rbp-Ch] BYREF

v6[0] = a5;
return srotmg_(a1, a2, a3, v6, a4);
}

original_code:
void cblas_srotmg( float *d1, float *d2, float *b1,
                        const float b2, float *p)
{
   srotmg_(d1,d2,b1,&b2,p);
}

canonical_original_code:
void cblas_srotmg(float *d1, float *d2, float *b1, float b2, float *p)
{
   srotmg_(d1,d2,b1,&b2,p);
}

variable_types:
p
float *


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

RowMajorStrg = 0;
v17[0] = a5;
CBLAS_CallFromC = 1;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v19 = 85;
}
else
{
if ( a2 != 122 )
goto LABEL_26;
v19 = 76;
}
switch ( a3 )
{
case 'o':
v18 = 78;
break;
case 'p':
v18 = 84;
break;
case 'q':
v18 = 67;
break;
default:
goto LABEL_42;
}
if ( (_DWORD)a4 == 132 )
{
v20[0] = 85;
}
else
{
if ( (_DWORD)a4 != 131 )
{
LABEL_29:
result = cblas_xerbla(4LL, "cblas_ctpsv", "Illegal Diag setting, %d\n", a4);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v20[0] = 78;
}
result = ctpsv_(&v19, &v18, v20, v17, a6, a7, &a8);
LABEL_14:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_ctpsv", "Illegal Order setting, %d\n", a1);
goto LABEL_14;
}
RowMajorStrg = 1;
if ( a2 != 121 )
{
if ( a2 == 122 )
{
v19 = 85;
goto LABEL_6;
}
LABEL_26:
result = cblas_xerbla(2LL, "cblas_ctpsv", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v19 = 76;
LABEL_6:
switch ( a3 )
{
case 'o':
v18 = 84;
v14 = a7;
v13 = 0LL;
v11 = 0;
LABEL_32:
if ( (_DWORD)a4 == 132 )
{
v20[0] = 85;
goto LABEL_35;
}
if ( (_DWORD)a4 == 131 )
{
v20[0] = 78;
LABEL_35:
result = ctpsv_(&v19, &v18, v20, v17, a6, a7, &a8);
if ( a3 == 113 )
{
result = (unsigned int)v17[0];
if ( v17[0] > 0 )
{
v16 = 4LL * v11;
do
{
*v14 ^= LC4;
v14 = (_DWORD *)((char *)v14 + v16);
}
while ( (_DWORD *)v13 != v14 );
}
}
goto LABEL_14;
}
goto LABEL_29;
case 'p':
v18 = 78;
v14 = a7;
v13 = 0LL;
v11 = 0;
goto LABEL_32;
case 'q':
v18 = 78;
if ( v17[0] <= 0 )
{
v14 = a7;
v13 = 0LL;
v11 = 0;
}
else
{
v9 = abs32(a8);
v10 = v9 * v17[0];
v11 = 2 * v9;
v12 = a7 + 1;
v13 = (__int64)&a7[2 * v10 + 1];
do
{
*v12 ^= LC4;
v12 += v11;
}
while ( (_DWORD *)v13 != v12 );
v14 = a7 + 1;
}
goto LABEL_32;
}
LABEL_42:
result = cblas_xerbla(3LL, "cblas_ctpsv", "Illegal TransA setting, %d\n", a3);
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)
{
unsigned int v9; // ebp
int v10; // edx
int v11; // ebp
_DWORD *v12; // rax
__int64 v13; // r13
_DWORD *v14; // rbx
__int64 result; // rax
__int64 v16; // rbp
int v17[4]; // [rsp+Ch] [rbp-3Ch] BYREF
char v18; // [rsp+1Dh] [rbp-2Bh] BYREF
char v19; // [rsp+1Eh] [rbp-2Ah] BYREF
char v20[41]; // [rsp+1Fh] [rbp-29h] BYREF

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

original_code:
void cblas_ctpsv(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_ctpsv","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_ctpsv","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_ctpsv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ctpsv_( &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_ctpsv","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_ctpsv","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_ctpsv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ctpsv_( &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_ctpsv", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_ctpsv(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_ctpsv","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_ctpsv","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_ctpsv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ctpsv_( &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_ctpsv","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_ctpsv","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_ctpsv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ctpsv_( &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_ctpsv", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

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

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

variable_types: N int

variable_types:
Ap
void *

variable_types:
X
void *

variable_types: incX int

variable_types: DI char

variable_types: n int

variable_types: i int

variable_types: tincX int

variable_types:
st
float *

variable_types:
x
float *


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

RowMajorStrg = 0;
v9[0] = a4;
v8 = a5;
CBLAS_CallFromC = 1;
v7 = a6;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v10 = 85;
}
else
{
if ( a2 != 122 )
{
result = cblas_xerbla(2LL, "cblas_ssyrk", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v10 = 76;
}
if ( a3 == 112 )
goto LABEL_8;
if ( a3 == 113 )
{
v11[0] = 67;
goto LABEL_18;
}
if ( a3 != 111 )
goto LABEL_24;
goto LABEL_17;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_ssyrk", "Illegal Order setting, %d\n", a1);
LABEL_10:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v10 = 76;
LABEL_6:
if ( a3 - 112 > 1 )
{
if ( a3 == 111 )
{
LABEL_8:
v11[0] = 84;
LABEL_18:
result = ssyrk_(&v10, v11, v9, &v8, &v7);
goto LABEL_10;
}
LABEL_24:
result = cblas_xerbla(3LL, "cblas_ssyrk", "Illegal Trans setting, %d\n", a3);
goto LABEL_21;
}
LABEL_17:
v11[0] = 78;
goto LABEL_18;
}
if ( a2 == 122 )
{
v10 = 85;
goto LABEL_6;
}
result = cblas_xerbla(3LL, "cblas_ssyrk", "Illegal Uplo setting, %d\n", a2);
LABEL_21:
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, float a6)
{
__int64 result; // rax
float v7; // [rsp+4h] [rbp-24h] BYREF
int v8; // [rsp+8h] [rbp-20h] BYREF
int v9[4]; // [rsp+Ch] [rbp-1Ch] BYREF
char v10; // [rsp+1Eh] [rbp-Ah] BYREF
char v11[9]; // [rsp+1Fh] [rbp-9h] BYREF

RowMajorStrg = 0;
v9[0] = a4;
v8 = a5;
CBLAS_CallFromC = 1;
v7 = a6;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v10 = 85;
}
else
{
if ( a2 != 122 )
{
result = cblas_xerbla(2LL, "cblas_ssyrk", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v10 = 76;
}
if ( a3 == 112 )
goto LABEL_8;
if ( a3 == 113 )
{
v11[0] = 67;
goto LABEL_18;
}
if ( a3 != 111 )
goto LABEL_24;
goto LABEL_17;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_ssyrk", "Illegal Order setting, %d\n", a1);
LABEL_10:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v10 = 76;
LABEL_6:
if ( a3 - 112 > 1 )
{
if ( a3 == 111 )
{
LABEL_8:
v11[0] = 84;
LABEL_18:
result = ssyrk_(&v10, v11, v9, &v8, &v7);
goto LABEL_10;
}
LABEL_24:
result = cblas_xerbla(3LL, "cblas_ssyrk", "Illegal Trans setting, %d\n", a3);
goto LABEL_21;
}
LABEL_17:
v11[0] = 78;
goto LABEL_18;
}
if ( a2 == 122 )
{
v10 = 85;
goto LABEL_6;
}
result = cblas_xerbla(3LL, "cblas_ssyrk", "Illegal Uplo setting, %d\n", a2);
LABEL_21:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_ssyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
                 const float alpha, const float *A, const int lda,
                 const float beta, float *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_ssyrk",
                       "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_ssyrk",
                       "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ssyrk_(&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_ssyrk",
                       "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_ssyrk",
                       "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ssyrk_(&UL, &TR, &N, &K, &alpha, A, &lda, &beta, C, &ldc);
   } else cblas_xerbla(1, "cblas_ssyrk",
                     "Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_ssyrk(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, int N, int K, float alpha, float *A, int lda, float beta, float *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_ssyrk",
                       "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_ssyrk",
                       "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ssyrk_(&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_ssyrk",
                       "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_ssyrk",
                       "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ssyrk_(&UL, &TR, &N, &K, &alpha, A, &lda, &beta, C, &ldc);
   } else cblas_xerbla(1, "cblas_ssyrk",
                     "Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

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

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

variable_types: K int

variable_types: alpha float

variable_types:
A
float *

variable_types: lda int

variable_types: beta float

variable_types:
C
float *

variable_types: ldc int

variable_types: UL char

variable_types: TR char

variable_types: RowMajorStrg int


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

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

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

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

original_code:
void cblas_srotm( const int N, float *X, const int incX, float *Y,
                       const int incY, const float *P)
{
   srotm_( &N, X, &incX, Y, &incY, P);
}

canonical_original_code:
void cblas_srotm(int N, float *X, int incX, float *Y, int incY, float *P)
{
   srotm_( &N, X, &incX, Y, &incY, P);
}

variable_types: N int

variable_types:
X
float *

variable_types: incX int

variable_types:
Y
float *

variable_types: incY int

variable_types:
P
float *


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

RowMajorStrg = 0;
v9[0] = a4;
v8 = a5;
CBLAS_CallFromC = 1;
v7 = a6;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v10 = 85;
}
else
{
if ( a2 != 122 )
{
result = cblas_xerbla(2LL, "cblas_cherk", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v10 = 76;
}
if ( a3 == 112 )
{
v11[0] = 84;
goto LABEL_18;
}
if ( a3 == 113 )
goto LABEL_8;
if ( a3 != 111 )
goto LABEL_25;
goto LABEL_17;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_cherk", "Illegal Order setting, %d\n", a1);
LABEL_10:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v10 = 76;
LABEL_6:
if ( a3 - 112 > 1 )
{
if ( a3 == 111 )
{
LABEL_8:
v11[0] = 67;
LABEL_18:
result = cherk_(&v10, v11, v9, &v8, &v7);
goto LABEL_10;
}
LABEL_25:
result = cblas_xerbla(3LL, "cblas_cherk", "Illegal Trans setting, %d\n", a3);
goto LABEL_21;
}
LABEL_17:
v11[0] = 78;
goto LABEL_18;
}
if ( a2 == 122 )
{
v10 = 85;
goto LABEL_6;
}
result = cblas_xerbla(3LL, "cblas_cherk", "Illegal Uplo setting, %d\n", a2);
LABEL_21:
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, float a6)
{
__int64 result; // rax
float v7; // [rsp+4h] [rbp-24h] BYREF
int v8; // [rsp+8h] [rbp-20h] BYREF
int v9[4]; // [rsp+Ch] [rbp-1Ch] BYREF
char v10; // [rsp+1Eh] [rbp-Ah] BYREF
char v11[9]; // [rsp+1Fh] [rbp-9h] BYREF

RowMajorStrg = 0;
v9[0] = a4;
v8 = a5;
CBLAS_CallFromC = 1;
v7 = a6;
if ( a1 == 102 )
{
if ( a2 == 121 )
{
v10 = 85;
}
else
{
if ( a2 != 122 )
{
result = cblas_xerbla(2LL, "cblas_cherk", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v10 = 76;
}
if ( a3 == 112 )
{
v11[0] = 84;
goto LABEL_18;
}
if ( a3 == 113 )
goto LABEL_8;
if ( a3 != 111 )
goto LABEL_25;
goto LABEL_17;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_cherk", "Illegal Order setting, %d\n", a1);
LABEL_10:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v10 = 76;
LABEL_6:
if ( a3 - 112 > 1 )
{
if ( a3 == 111 )
{
LABEL_8:
v11[0] = 67;
LABEL_18:
result = cherk_(&v10, v11, v9, &v8, &v7);
goto LABEL_10;
}
LABEL_25:
result = cblas_xerbla(3LL, "cblas_cherk", "Illegal Trans setting, %d\n", a3);
goto LABEL_21;
}
LABEL_17:
v11[0] = 78;
goto LABEL_18;
}
if ( a2 == 122 )
{
v10 = 85;
goto LABEL_6;
}
result = cblas_xerbla(3LL, "cblas_cherk", "Illegal Uplo setting, %d\n", a2);
LABEL_21:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_cherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
                 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
                 const float alpha, const void *A, const int lda,
                 const float 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_cherk", "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_cherk", "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      cherk_(&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_cherk", "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_cherk", "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      cherk_(&UL, &TR, &N, &K, &alpha, A, &lda,
                &beta, C, &ldc);
   }
   else cblas_xerbla(1, "cblas_cherk", "Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_cherk(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, int N, int K, float alpha, void *A, int lda, float 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_cherk", "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_cherk", "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      cherk_(&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_cherk", "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_cherk", "Illegal Trans setting, %d\n", Trans);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      cherk_(&UL, &TR, &N, &K, &alpha, A, &lda,
                &beta, C, &ldc);
   }
   else cblas_xerbla(1, "cblas_cherk", "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:
A
void *

variable_types:
C
void *


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

RowMajorStrg = 0;
v17[0] = a3;
v16 = a4;
v14 = a6;
CBLAS_CallFromC = 1;
v15 = a7;
v13 = a8;
if ( a1 != 102 )
{
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_dsbmv", "Illegal Order setting, %d\n", a1);
goto LABEL_8;
}
RowMajorStrg = 1;
if ( a2 != 121 )
{
if ( a2 == 122 )
{
LABEL_5:
v18[0] = 85;
LABEL_6:
result = dsbmv_(v18, v17, &v16, &v15, a5, &v14, a9, &a10, &v13, a11, &a12);
LABEL_8:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
goto LABEL_12;
}
LABEL_11:
v18[0] = 76;
goto LABEL_6;
}
if ( a2 == 121 )
goto LABEL_5;
if ( a2 == 122 )
goto LABEL_11;
LABEL_12:
result = cblas_xerbla(2LL, "cblas_dsbmv", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

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

RowMajorStrg = 0;
v17[0] = a3;
v16 = a4;
v14 = a6;
CBLAS_CallFromC = 1;
v15 = a7;
v13 = a8;
if ( a1 != 102 )
{
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_dsbmv", "Illegal Order setting, %d\n", a1);
goto LABEL_8;
}
RowMajorStrg = 1;
if ( a2 != 121 )
{
if ( a2 == 122 )
{
LABEL_5:
v18[0] = 85;
LABEL_6:
result = dsbmv_(v18, v17, &v16, &v15, a5, &v14, a9, &a10, &v13, a11, &a12);
LABEL_8:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
goto LABEL_12;
}
LABEL_11:
v18[0] = 76;
goto LABEL_6;
}
if ( a2 == 121 )
goto LABEL_5;
if ( a2 == 122 )
goto LABEL_11;
LABEL_12:
result = cblas_xerbla(2LL, "cblas_dsbmv", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

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

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

variable_types:
X
double *

variable_types: beta double

variable_types:
Y
double *