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

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

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

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

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

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

variable_types: N int

variable_types:
X
void *

variable_types: incX int

variable_types:
Y
void *

variable_types: incY int

variable_types:
dotu
void *


repo: ivanjimenez/ipaap

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

CBLAS_CallFromC = 1;
v15 = a5;
v16[0] = a4;
RowMajorStrg = 0;
v14 = a7;
if ( a1 != 102 )
{
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_zher2k", "Illegal Order setting, %d\n", a1);
goto LABEL_11;
}
RowMajorStrg = 1;
if ( a2 == 121 )
{
v17 = 76;
goto LABEL_6;
}
if ( a2 == 122 )
{
v17 = 85;
LABEL_6:
if ( a3 - 112 <= 1 )
{
v18 = 78;
goto LABEL_9;
}
if ( a3 == 111 )
{
v18 = 67;
LABEL_9:
v19[0] = *a6;
v19[1] = a6[1] ^ LC3;
result = zher2k_(&v17, &v18, v16, &v15, v19, a8, &a9, a10, &a11, &v14, a12, &a13);
LABEL_11:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
goto LABEL_26;
}
LABEL_21:
result = cblas_xerbla(2LL, "cblas_zher2k", "Illegal Uplo setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a2 == 121 )
{
v17 = 85;
}
else
{
if ( a2 != 122 )
goto LABEL_21;
v17 = 76;
}
switch ( a3 )
{
case 'p':
v18 = 84;
goto LABEL_19;
case 'q':
v18 = 67;
goto LABEL_19;
case 'o':
v18 = 78;
LABEL_19:
result = zher2k_(&v17, &v18, v16, &v15, a6, a8, &a9, a10, &a11, &v14, a12, &a13);
goto LABEL_11;
}
LABEL_26:
result = cblas_xerbla(3LL, "cblas_zher2k", "Illegal Trans 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, double a7, __int64 a8, char a9, __int64 a10, char a11, __int64 a12, char a13)
{
__int64 result; // rax
double v14; // [rsp+0h] [rbp-38h] BYREF
int v15; // [rsp+8h] [rbp-30h] BYREF
int v16[4]; // [rsp+Ch] [rbp-2Ch] BYREF
char v17; // [rsp+1Eh] [rbp-1Ah] BYREF
char v18; // [rsp+1Fh] [rbp-19h] BYREF
__int64 v19[3]; // [rsp+20h] [rbp-18h] BYREF

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

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

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

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

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

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

variable_types: K int

variable_types:
alpha
void *

variable_types:
A
void *

variable_types: lda int

variable_types:
B
void *

variable_types: ldb int

variable_types: beta double

variable_types:
C
void *

variable_types: ldc int

variable_types: UL char

variable_types: TR char

variable_types: RowMajorStrg int

variable_types:
ALPHA
double [2]

variable_types:
alp
double *

return_type: void


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

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

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

variable_types: M int

variable_types: N int

variable_types: KL int

variable_types: KU int

variable_types:
X
void *

variable_types: incX int

variable_types:
beta
void *

variable_types:
Y
void *

variable_types: incY int

variable_types: TA char

variable_types: n int

variable_types: i int

variable_types: incx int

variable_types:
xx
float *

variable_types:
alp
float *

variable_types:
bet
float *

variable_types:
ALPHA
float [2]

variable_types:
BETA
float [2]

variable_types: tincY int

variable_types: tincx int

variable_types:
x
float *

variable_types:
y
float *

variable_types:
st
float *

variable_types:
tx
float *

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


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

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

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

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

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

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

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

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

variable_types: N int

variable_types: alpha float

variable_types:
A
float *

variable_types: lda int

variable_types:
X
float *

variable_types: incX int

variable_types: beta float

variable_types:
Y
float *

variable_types: UL char

variable_types: RowMajorStrg int


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

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

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

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

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

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

variable_types: alpha double

variable_types:
X
void *

variable_types:
A
void *

variable_types: n int

variable_types: i int

variable_types: tincx int

variable_types: incx int

variable_types:
x
double *

variable_types:
xx
double *

variable_types:
tx
double *

variable_types:
st
double *

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

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


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

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

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

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

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

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

variable_types: N int

variable_types:
Y
void *

variable_types: incY int

variable_types:
dotc
void *


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

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_strmm", "Illegal Diag setting, %d\n", a5);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
v18[0] = 78;
}
result = strmm_(&v17, &v15, &v16, v18, v14, &a8, &v13, a9, &a10, a11, &a12);
goto LABEL_18;
}
if ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_strmm", "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_strmm", "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_strmm", "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 = strmm_(&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_strmm", "Illegal Trans setting, %d\n", a4);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

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

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

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

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

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

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

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

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

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

variable_types: M int

variable_types: alpha float

variable_types:
A
float *

variable_types: lda int

variable_types:
B
float *

variable_types: ldb int

variable_types: UL char

variable_types: TA char

variable_types: SD char

variable_types: DI char


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

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

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

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

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

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

variable_types: N int

variable_types:
X
void *

variable_types: incX int

variable_types:
Y
void *

variable_types: incY int


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

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

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

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

variable_types:
alpha
void *

variable_types:
AP
void *

variable_types:
beta
void *

variable_types: n int

variable_types: i int

variable_types: incx int

variable_types:
xx
double *

variable_types:
alp
double *

variable_types:
bet
double *

variable_types:
ALPHA
double [2]

variable_types:
BETA
double [2]

variable_types: tincY int

variable_types: tincx int

variable_types:
x
double *

variable_types:
y
double *

variable_types:
st
double *

variable_types:
tx
double *

variable_types: RowMajorStrg int


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

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

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

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

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

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

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

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

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

variable_types: N int

variable_types: K int

variable_types:
A
void *

variable_types: lda int

variable_types:
X
void *

variable_types: incX int

variable_types: TA char

variable_types: UL char

variable_types: DI char

variable_types: tincX int

variable_types:
st
float *

variable_types:
x
float *


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

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

canonical_decompiled_code:
char *__fastcall func0(unsigned int a1, unsigned int a2, int a3, __int64 a4, int a5, double a6, __int64 a7, char a8)
{
char *result; // rax
double v9; // [rsp+0h] [rbp-28h] BYREF
int v10; // [rsp+8h] [rbp-20h] BYREF
int v11[4]; // [rsp+Ch] [rbp-1Ch] BYREF
char v12[9]; // [rsp+1Fh] [rbp-9h] BYREF

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

original_code:
void cblas_dspr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
                const int N, const double alpha, const double *X,
                const int incX, const double *Y, const int incY, double *A)
{
   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_dspr2","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dspr2_(&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_dspr2","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dspr2_(&UL, &N, &alpha, X, &incX, Y, &incY, A);
   } else cblas_xerbla(1, "cblas_dspr2", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_dspr2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int N, double alpha, double *X, int incX, double *Y, int incY, double *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_dspr2","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dspr2_(&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_dspr2","Illegal Uplo setting, %d\n",Uplo );
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      dspr2_(&UL, &N, &alpha, X, &incX, Y, &incY, A);
   } else cblas_xerbla(1, "cblas_dspr2", "Illegal Order setting, %d\n", order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

variable_types: alpha double

variable_types:
X
double *

variable_types:
Y
double *

variable_types: incY int

variable_types:
A
double *

variable_types: RowMajorStrg int


decompiled_code:
__int64 __fastcall cblas_ssymm(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 ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_ssymm", "Illegal Order setting, %d\n", a1);
goto LABEL_11;
}
RowMajorStrg = 1;
if ( a2 == 142 )
{
v10 = 76;
goto LABEL_6;
}
if ( a2 == 141 )
{
v10 = 82;
LABEL_6:
if ( a3 == 121 )
{
v11[0] = 76;
goto LABEL_9;
}
if ( a3 == 122 )
{
v11[0] = 85;
LABEL_9:
result = ssymm_(&v10, v11, &v8, v9, &v7);
LABEL_11:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
goto LABEL_21;
}
LABEL_19:
result = cblas_xerbla(2LL, "cblas_ssymm", "Illegal Side setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a2 == 142 )
{
v10 = 82;
}
else
{
if ( a2 != 141 )
goto LABEL_19;
v10 = 76;
}
if ( a3 == 121 )
{
v11[0] = 85;
goto LABEL_18;
}
if ( a3 == 122 )
{
v11[0] = 76;
LABEL_18:
result = ssymm_(&v10, v11, v9, &v8, &v7);
goto LABEL_11;
}
LABEL_21:
result = cblas_xerbla(3LL, "cblas_ssymm", "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, 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 ( a1 != 101 )
{
result = cblas_xerbla(1LL, "cblas_ssymm", "Illegal Order setting, %d\n", a1);
goto LABEL_11;
}
RowMajorStrg = 1;
if ( a2 == 142 )
{
v10 = 76;
goto LABEL_6;
}
if ( a2 == 141 )
{
v10 = 82;
LABEL_6:
if ( a3 == 121 )
{
v11[0] = 76;
goto LABEL_9;
}
if ( a3 == 122 )
{
v11[0] = 85;
LABEL_9:
result = ssymm_(&v10, v11, &v8, v9, &v7);
LABEL_11:
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
goto LABEL_21;
}
LABEL_19:
result = cblas_xerbla(2LL, "cblas_ssymm", "Illegal Side setting, %d\n", a2);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}
if ( a2 == 142 )
{
v10 = 82;
}
else
{
if ( a2 != 141 )
goto LABEL_19;
v10 = 76;
}
if ( a3 == 121 )
{
v11[0] = 85;
goto LABEL_18;
}
if ( a3 == 122 )
{
v11[0] = 76;
LABEL_18:
result = ssymm_(&v10, v11, v9, &v8, &v7);
goto LABEL_11;
}
LABEL_21:
result = cblas_xerbla(3LL, "cblas_ssymm", "Illegal Uplo setting, %d\n", a3);
CBLAS_CallFromC = 0;
RowMajorStrg = 0;
return result;
}

original_code:
void cblas_ssymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
                 const enum CBLAS_UPLO Uplo, const int M, const int N,
                 const float alpha, const float *A, const int lda,
                 const float *B, const int ldb, const float beta,
                 float *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_ssymm",
                       "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_ssymm",
                       "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ssymm_(&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_ssymm",
                       "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_ssymm",
                       "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ssymm_(&SD, &UL, &N, &M, &alpha, A, &lda, B, &ldb, &beta, C, &ldc);
   } else cblas_xerbla(1, "cblas_ssymm",
                     "Illegal Order setting, %d\n", Order);
   CBLAS_CallFromC = 0;
   RowMajorStrg = 0;
   return;
}

canonical_original_code:
void cblas_ssymm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, int M, int N, float alpha, float *A, int lda, float *B, int ldb, float beta, float *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_ssymm",
                       "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_ssymm",
                       "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ssymm_(&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_ssymm",
                       "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_ssymm",
                       "Illegal Uplo setting, %d\n", Uplo);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ssymm_(&SD, &UL, &N, &M, &alpha, A, &lda, B, &ldb, &beta, C, &ldc);
   } else cblas_xerbla(1, "cblas_ssymm",
                     "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: M int

variable_types: N int

variable_types: alpha float

variable_types:
A
float *

variable_types:
B
float *

variable_types: ldb int

variable_types: beta float

variable_types:
C
float *

variable_types: ldc int

variable_types: SD char


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

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

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

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

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

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

variable_types:
X
double *

variable_types: incX int

return_type: double


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

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

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

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

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

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

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: lda int

variable_types:
X
float *

variable_types: TA char

variable_types: UL char

variable_types: DI char


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

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

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

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

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

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

variable_types: N int

variable_types: alpha float


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

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

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

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

canonical_original_code:
void cblas_ztpmv(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;
   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_ztpmv","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_ztpmv","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_ztpmv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ztpmv_( &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_ztpmv","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_ztpmv","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_ztpmv","Illegal Diag setting, %d\n", Diag);
         CBLAS_CallFromC = 0;
         RowMajorStrg = 0;
         return;
      }
      ztpmv_( &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_ztpmv", "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:
Ap
void *

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

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


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

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

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

variable_types:
X
double *

variable_types: incX int

variable_types:
Y
double *

variable_types: incY int