decompiled_code:
__int64 __fastcall cholmod_rowdel_mark(unsigned __int64 a1, __int64 a2, double *a3, __int64 a4, unsigned __int64 *a5, __int64 a6, __int64 a7, __int64 a8)
{
__int64 v8; // rbx
unsigned int v10; // eax
int v11; // ebp
__int64 v12; // r13
unsigned __int64 v15; // rax
unsigned int v16; // edx
unsigned int v17; // er9
__int64 v19; // rax
int v20; // er11
__int64 v21; // r10
unsigned __int64 v22; // r8
int v23; // eax
__int64 v24; // rdi
int v25; // er9
__int64 v26; // rbp
double *v27; // rax
__int64 v28; // rsi
int v29; // eax
int v30; // ecx
int v31; // edx
double v32; // xmm0_8
int v33; // eax
__int64 v34; // r11
int v35; // er9
int *v36; // r13
int v37; // esi
__int64 v38; // rax
double *v39; // rdx
double v40; // xmm0_8
int v41; // ecx
__int64 v42; // rax
double v43; // xmm2_8
__int64 v44; // rdx
double v45; // xmm1_8
double v46; // xmm0_8
__int64 v47; // rdx
__int64 v48; // r13
char *v49; // rbp
__int64 v50; // rdi
__int64 v51; // rdx
__int64 v52; // rax
__int64 v53; // rcx
char *v54; // rdx
double v55; // xmm1_8
__int64 v56; // rax
double v57; // xmm0_8
bool v58; // [rsp+Ch] [rbp-10Ch]
int v59; // [rsp+10h] [rbp-108h]
int v60; // [rsp+10h] [rbp-108h]
unsigned int v61; // [rsp+10h] [rbp-108h]
__int64 v62; // [rsp+18h] [rbp-100h]
unsigned __int64 v63; // [rsp+20h] [rbp-F8h]
double v64; // [rsp+20h] [rbp-F8h]
unsigned __int64 v66; // [rsp+28h] [rbp-F0h]
_BOOL4 v67; // [rsp+28h] [rbp-F0h]
__int64 v68; // [rsp+30h] [rbp-E8h]
__int64 v69; // [rsp+38h] [rbp-E0h]
__int64 v70; // [rsp+38h] [rbp-E0h]
int v71; // [rsp+38h] [rbp-E0h]
unsigned __int64 v72; // [rsp+40h] [rbp-D8h]
unsigned __int64 v73; // [rsp+40h] [rbp-D8h]
int v74; // [rsp+48h] [rbp-D0h]
__int64 v75; // [rsp+50h] [rbp-C8h]
__int64 v76; // [rsp+60h] [rbp-B8h]
__int64 v77; // [rsp+68h] [rbp-B0h]
int v78; // [rsp+74h] [rbp-A4h] BYREF
int v79[2]; // [rsp+78h] [rbp-A0h] BYREF
__int64 v80[8]; // [rsp+80h] [rbp-98h] BYREF
int v81; // [rsp+C0h] [rbp-58h]
int v82; // [rsp+C4h] [rbp-54h]
__int64 v83; // [rsp+C8h] [rbp-50h]
__int64 v84; // [rsp+D0h] [rbp-48h]

v8 = a8;
v78 = 1;
if ( !a8 )
return 0;
if ( *(_QWORD *)(a8 + 2016) )
{
*(_DWORD *)(a8 + 2028) = -4;
return 0;
}
if ( !a5 )
{
if ( *(_DWORD *)(a8 + 2028) != -2 )
{
cholmod_error(4294967292LL, "../Modify/cholmod_rowdel.c", 130LL, "argument missing", a8);
return 0;
}
return 0;
}
v10 = *((_DWORD *)a5 + 47);
if ( v10 > 1 || (v11 = a1, v12 = a2, v10) && !a5[7] )
{
if ( *(_DWORD *)(a8 + 2028) != -2 )
{
cholmod_error(4294967292LL, "../Modify/cholmod_rowdel.c", 131LL, "invalid xtype", a8);
return 0;
}
return 0;
}
v15 = *a5;
if ( *a5 <= a1 || (a1 & 0x80000000) != 0LL )
{
cholmod_error(4294967292LL, "../Modify/cholmod_rowdel.c", 136LL, "k invalid", a8);
return 0;
}
if ( a2 )
{
v16 = *(_DWORD *)(a2 + 72);
if ( v16 > 3 || v16 && (!*(_QWORD *)(a2 + 48) || v16 == 3 && !*(_QWORD *)(a2 + 56)) )
{
if ( *(_DWORD *)(a8 + 2028) != -2 )
{
cholmod_error(4294967292LL, "../Modify/cholmod_rowdel.c", 146LL, "invalid xtype", a8);
return 0;
}
return 0;
}
if ( *(_QWORD *)(a2 + 8) != 1LL || v15 != *(_QWORD *)a2 )
{
cholmod_error(4294967292LL, "../Modify/cholmod_rowdel.c", 149LL, "R invalid", a8);
return 0;
}
v12 = *(_QWORD *)(a2 + 32);
v59 = *(_DWORD *)(*(_QWORD *)(a2 + 24) + 4LL);
}
else
{
v59 = -1;
}
v58 = a7 != 0 && a6 != 0;
if ( v58 )
{
if ( *(_DWORD *)(a6 + 48) != 1 || (v62 = *(_QWORD *)(a6 + 32)) == 0 )
{
if ( *(_DWORD *)(a8 + 2028) != -2 )
{
cholmod_error(4294967292LL, "../Modify/cholmod_rowdel.c", 159LL, "invalid xtype", a8);
return 0;
}
return 0;
}
if ( *(_DWORD *)(a7 + 48) != 1 || (v69 = *(_QWORD *)(a7 + 32)) == 0 )
{
if ( *(_DWORD *)(a8 + 2028) != -2 )
{
cholmod_error(4294967292LL, "../Modify/cholmod_rowdel.c", 160LL, "invalid xtype", a8);
return 0;
}
return 0;
}
if ( v15 != *(_QWORD *)a6 || *(_QWORD *)(a6 + 8) != 1LL || v15 != *(_QWORD *)a7 || *(_QWORD *)(a7 + 8) != 1LL )
{
cholmod_error(4294967292LL, "../Modify/cholmod_rowdel.c", 166LL, "X and/or DeltaB invalid", a8);
return 0;
}
}
else
{
v69 = 0LL;
v62 = 0LL;
}
*(_DWORD *)(a8 + 2028) = 0;
v68 = (int)v15;
v19 = cholmod_mult_size_t((int)v15, 2LL, &v78);
if ( !v78 )
{
cholmod_error(4294967293LL, "../Modify/cholmod_rowdel.c", 185LL, "problem too large", a8);
return 0;
}
cholmod_allocate_work(v68, v19, v19, a8);
if ( *(int *)(a8 + 2028) < 0 )
return 0;
v20 = a1;
v21 = a4;
if ( !*((_DWORD *)a5 + 47) || *((_DWORD *)a5 + 44) || *((_DWORD *)a5 + 43) )
{
cholmod_change_factor(1LL, 0LL, 0LL, 0LL, 0LL, a5, a8);
v20 = a1;
v21 = a4;
if ( *(int *)(a8 + 2028) < 0 )
return 0;
}
v22 = a5[6];
v66 = a5[5];
v72 = a5[9];
v63 = a5[7];
v76 = *(_QWORD *)(a8 + 2000);
v77 = *(_QWORD *)(a8 + 2008);
v23 = v59;
if ( v59 < 0 )
v23 = a1;
v24 = 0LL;
if ( v23 )
{
v25 = v59;
v60 = v11;
v26 = v23;
while ( 1 )
{
v28 = (int)v24;
if ( v25 >= 0 )
v28 = *(int *)(v12 + 4 * v24);
if ( (int)v28 < 0 || (int)v28 >= v20 )
{
cholmod_error(4294967292LL, "../Modify/cholmod_rowdel.c", 251LL, "R invalid", a8);
return 0;
}
v29 = *(_DWORD *)(v72 + 4 * v28);
if ( v29 > 1 )
{
v30 = *(_DWORD *)(v66 + 4 * v28);
v31 = v30 + v29 - 1;
if ( v20 <= *(_DWORD *)(v22 + 4LL * v31) )
break;
}
LABEL_55:
if ( v26 == ++v24 )
{
v11 = v60;
v8 = a8;
goto LABEL_77;
}
}
v32 = *(double *)(v63 + 8LL * v30);
if ( v20 == *(_DWORD *)(v22 + 4LL * v31) )
{
v27 = (double *)(v63 + 8LL * v31);
if ( !v58 )
{
LABEL_54:
*v27 = 0.0;
goto LABEL_55;
}
}
else
{
while ( v30 < v31 )
{
v33 = (v30 + v31) / 2;
if ( *(_DWORD *)(v22 + 4LL * v33) < v20 )
v30 = v33 + 1;
else
v31 = (v30 + v31) / 2;
}
if ( *(_DWORD *)(v22 + 4LL * v30) != v20 )
goto LABEL_55;
v27 = (double *)(v63 + 8LL * v30);
if ( !v58 )
goto LABEL_54;
}
*(double *)(v62 + 8 * v28) = *(double *)(v62 + 8 * v28) - v32 * *a3 * *v27;
goto LABEL_54;
}
LABEL_77:
v34 = v11;
v35 = *(_DWORD *)(v72 + 4LL * v11);
v36 = (int *)(v66 + 4LL * v11);
v37 = v35 - 1;
v38 = *v36;
v39 = (double *)(v63 + 8 * v38);
v40 = *v39;
*(_QWORD *)v39 = LC8;
v78 = 1;
if ( v35 - 1 <= 0 )
{
v17 = 1;
v57 = 0.0;
}
else
{
if ( v58 )
{
v41 = v37 + v38;
v42 = (int)v38 + 1;
v43 = *(double *)(v62 + 8LL * v11) - *a3 * v40;
do
{
v44 = *(int *)(v22 + 4 * v42);
v45 = *(double *)(v63 + 8 * v42++);
*(double *)(v69 + 8 * v44) = v45 * v43 + *(double *)(v69 + 8 * v44);
}
while ( v41 >= (int)v42 );
}
v67 = v40 > 0.0;
if ( v40 <= 0.0 )
*(_QWORD *)&v40 ^= LC9;
if ( v40 < 0.0 )
{
v75 = v21;
v74 = v35 - 1;
v73 = v22;
v71 = v35;
v46 = sqrt(v40);
v21 = v75;
v37 = v74;
v22 = v73;
v35 = v71;
v34 = v11;
}
else
{
v46 = sqrt(v40);
}
v70 = v34;
v47 = *v36;
v48 = (unsigned int)(v35 - 2);
v49 = (char *)(v76 + 8 * v68);
LODWORD(v52) = v47 + 1;
v50 = v48 + v47 + 2;
v51 = -v47;
v52 = (int)v52;
v53 = v77 + 4 * v68 + 4 * v51;
v54 = &v49[8 * v51];
do
{
v55 = *(double *)(v63 + 8 * v52) * v46;
*(_DWORD *)(v53 + 4 * v52 - 4) = *(_DWORD *)(v22 + 4 * v52);
*(double *)&v54[8 * v52 - 8] = v55;
*(_QWORD *)(v63 + 8 * v52++) = 0LL;
}
while ( v50 != v52 );
v80[1] = 1LL;
v80[0] = v68;
v80[2] = v37;
v84 = 0x100000001LL;
v80[3] = (__int64)v79;
v79[1] = v37;
v80[4] = v77 + 4 * v68;
v64 = (double)v35;
v82 = *((_DWORD *)a5 + 46);
v56 = *(unsigned __int64 *)((char *)a5 + 188);
v80[6] = v76 + 8 * v68;
v80[5] = 0LL;
v83 = v56;
v80[7] = 0LL;
v81 = 0;
v79[0] = 0;
v61 = cholmod_updown_mark(v67, v80, v21, a5, a6, a7, v8);
memset(v49, 0, 8 * v48 + 8);
v34 = v70;
v57 = v64;
v17 = v61;
}
*(double *)(v8 + 2056) = v57 + *(double *)(v8 + 2056);
if ( v58 )
*(double *)(v62 + 8 * v34) = *a3;
return v17;
}

original_code:
int cholmod_rowdel_mark
(
    size_t kdel,
    cholmod_sparse *R,
    double yk [2],
    int *colmark,
    cholmod_factor *L,
    cholmod_dense *X,
    cholmod_dense *DeltaB,
    cholmod_common *Common
)
{
    double dk, sqrt_dk, xk, dj, fl ;
    double *Lx, *Cx, *W, *Xx, *Nx ;
    int *Li, *Lp, *Lnz, *Ci, *Rj, *Rp, *Iwork ;
    cholmod_sparse *C, Cmatrix ;
    int j, p, pend, kk, lnz, n, Cp [2], do_solve, do_update, left, k,
 right, middle, i, klast, given_row, rnz ;
    size_t s ;
    int ok = 1 ;
    { if (Common == ((void *)0)) { return (0) ; } if (Common->itype != 0 || Common->dtype != 0) { Common->status = (-4) ; return (0) ; } } ;
    { if ((L) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../Modify/cholmod_rowdel.c", 130, "argument missing", Common) ; } return (0) ; } } ;
    { if ((L)->xtype < (0) || (L)->xtype > (1) || ((L)->xtype != 0 && ((L)->x) == ((void *)0)) || ((L)->xtype == 3 && ((L)->z) == ((void *)0))) { if (Common->status != (-2)) { cholmod_error ((-4), "../Modify/cholmod_rowdel.c", 131, "invalid xtype", Common) ; } return (0) ; } } ;
    n = L->n ;
    k = kdel ;
    if (kdel >= L->n || k < 0)
    {
 cholmod_error ((-4), "../Modify/cholmod_rowdel.c", 136, "k invalid", Common) ;
 return (0) ;
    }
    if (R == ((void *)0))
    {
 Rj = ((void *)0) ;
 rnz = (-1) ;
    }
    else
    {
 { if ((R)->xtype < (0) || (R)->xtype > (3) || ((R)->xtype != 0 && ((R)->x) == ((void *)0)) || ((R)->xtype == 3 && ((R)->z) == ((void *)0))) { if (Common->status != (-2)) { cholmod_error ((-4), "../Modify/cholmod_rowdel.c", 146, "invalid xtype", Common) ; } return (0) ; } } ;
 if (R->ncol != 1 || R->nrow != L->n)
 {
     cholmod_error ((-4), "../Modify/cholmod_rowdel.c", 149, "R invalid", Common) ;
     return (0) ;
 }
 Rj = R->i ;
 Rp = R->p ;
 rnz = Rp [1] ;
    }
    do_solve = (X != ((void *)0)) && (DeltaB != ((void *)0)) ;
    if (do_solve)
    {
 { if ((X)->xtype < (1) || (X)->xtype > (1) || ((X)->xtype != 0 && ((X)->x) == ((void *)0)) || ((X)->xtype == 3 && ((X)->z) == ((void *)0))) { if (Common->status != (-2)) { cholmod_error ((-4), "../Modify/cholmod_rowdel.c", 159, "invalid xtype", Common) ; } return (0) ; } } ;
 { if ((DeltaB)->xtype < (1) || (DeltaB)->xtype > (1) || ((DeltaB)->xtype != 0 && ((DeltaB)->x) == ((void *)0)) || ((DeltaB)->xtype == 3 && ((DeltaB)->z) == ((void *)0))) { if (Common->status != (-2)) { cholmod_error ((-4), "../Modify/cholmod_rowdel.c", 160, "invalid xtype", Common) ; } return (0) ; } } ;
 Xx = X->x ;
 Nx = DeltaB->x ;
 if (X->nrow != L->n || X->ncol != 1 || DeltaB->nrow != L->n ||
  DeltaB->ncol != 1 || Xx == ((void *)0) || Nx == ((void *)0))
 {
     cholmod_error ((-4), "../Modify/cholmod_rowdel.c", 166, "X and/or DeltaB invalid", Common) ;
     return (0) ;
 }
    }
    else
    {
 Xx = ((void *)0) ;
 Nx = ((void *)0) ;
    }
    Common->status = 0 ;
    s = cholmod_mult_size_t (n, 2, &ok) ;
    if (!ok)
    {
 cholmod_error ((-3), "../Modify/cholmod_rowdel.c", 185, "problem too large", Common) ;
 return (0) ;
    }
    cholmod_allocate_work (n, s, s, Common) ;
    if (Common->status < 0)
    {
 return (0) ;
    }
    ;
    if (L->xtype == 0 || L->is_super || L->is_ll)
    {
 cholmod_change_factor (1, 0, 0, 0, 0, L,
  Common) ;
 if (Common->status < 0)
 {
     return (0) ;
 }
    }
    Lp = L->p ;
    Lnz = L->nz ;
    Li = L->i ;
    Lx = L->x ;
    ;
    W = Common->Xwork ;
    Cx = W + n ;
    Iwork = Common->Iwork ;
    Ci = Iwork + n ;
    given_row = (rnz >= 0) ;
    klast = given_row ? rnz : k ;
    ;
    for (kk = 0 ; kk < klast ; kk++)
    {
 j = given_row ? (Rj [kk]) : (kk) ;
 if (j < 0 || j >= k)
 {
     cholmod_error ((-4), "../Modify/cholmod_rowdel.c", 251, "R invalid", Common) ;
     return (0) ;
 }
 ;
 lnz = Lnz [j] ;
 dj = Lx [Lp [j]] ;
 ;
 if (lnz > 1)
 {
     left = Lp [j] ;
     pend = left + lnz ;
     right = pend - 1 ;
     i = Li [right] ;
     if (i < k)
     {
  continue ;
     }
     else if (i == k)
     {
  if (do_solve)
  {
      Xx [j] -= yk [0] * dj * Lx [right] ;
  }
  Lx [right] = 0 ;
     }
     else
     {
  ;
  while (left < right)
  {
      middle = (left + right) / 2 ;
      ;
      if (k > Li [middle])
      {
   left = middle + 1 ;
      }
      else
      {
   right = middle ;
      }
  }
  ;
  if (k == Li [left])
  {
      if (do_solve)
      {
   Xx [j] -= yk [0] * dj * Lx [left] ;
      }
      Lx [left] = 0 ;
  }
     }
 }
    }
    lnz = Lnz [k] - 1 ;
    ;
    ;
    p = Lp [k] ;
    pend = p + lnz + 1 ;
    dk = Lx [p] ;
    Lx [p++] = 1 ;
    ;
    ok = 1 ;
    fl = 0 ;
    if (lnz > 0)
    {
 if (do_solve)
 {
     xk = Xx [k] - yk [0] * dk ;
     for ( ; p < pend ; p++)
     {
  Nx [Li [p]] += Lx [p] * xk ;
     }
 }
 do_update = ((dk) > 0.) ;
 if (!do_update)
 {
     dk = -dk ;
 }
 sqrt_dk = sqrt (dk) ;
 p = Lp [k] + 1 ;
 for (kk = 0 ; kk < lnz ; kk++, p++)
 {
     Ci [kk] = Li [p] ;
     Cx [kk] = Lx [p] * sqrt_dk ;
     Lx [p] = 0 ;
 }
 fl = lnz + 1 ;
 C = &Cmatrix ;
 C->nrow = n ;
 C->ncol = 1 ;
 C->nzmax = lnz ;
 C->sorted = 1 ;
 C->packed = 1 ;
 C->p = Cp ;
 C->i = Ci ;
 C->x = Cx ;
 C->nz = ((void *)0) ;
 C->itype = L->itype ;
 C->xtype = L->xtype ;
 C->dtype = L->dtype ;
 C->z = ((void *)0) ;
 C->stype = 0 ;
 Cp [0] = 0 ;
 Cp [1] = lnz ;
 ok = cholmod_updown_mark (do_update ? (1) : (0), C, colmark,
  L, X, DeltaB, Common) ;
 for (kk = 0 ; kk < lnz ; kk++)
 {
     Cx [kk] = 0 ;
 }
    }
    Common->modfl += fl ;
    if (do_solve)
    {
 Xx [k] = yk [0] ;
    }
    ;
    ;
    return (ok) ;
}

canonical_original_code:
int cholmod_rowdel_mark(unsigned long kdel, struct cholmod_sparse_struct *R, double yk[2], int *colmark, struct cholmod_factor_struct *L, struct cholmod_dense_struct *X, struct cholmod_dense_struct *DeltaB, struct cholmod_common_struct *Common)
{
    double dk; double sqrt_dk; double xk; double dj; double fl;
    double *Lx; double *Cx; double *W; double *Xx; double *Nx;
    int *Li; int *Lp; int *Lnz; int *Ci; int *Rj; int *Rp; int *Iwork;
    struct cholmod_sparse_struct *C; struct cholmod_sparse_struct Cmatrix;
    int j; int p; int pend; int kk; int lnz; int n; int Cp[2]; int do_solve; int do_update; int left; int k; int right; int middle; int i; int klast; int given_row; int rnz;
    unsigned long s;
    int ok = 1;
    { if (Common == ((void *)0)) { return (0) ; } if (Common->itype != 0 || Common->dtype != 0) { Common->status = (-4) ; return (0) ; } } ;
    { if ((L) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../Modify/cholmod_rowdel.c", 130, "argument missing", Common) ; } return (0) ; } } ;
    { if ((L)->xtype < (0) || (L)->xtype > (1) || ((L)->xtype != 0 && ((L)->x) == ((void *)0)) || ((L)->xtype == 3 && ((L)->z) == ((void *)0))) { if (Common->status != (-2)) { cholmod_error ((-4), "../Modify/cholmod_rowdel.c", 131, "invalid xtype", Common) ; } return (0) ; } } ;
    n = L->n ;
    k = kdel ;
    if (kdel >= L->n || k < 0)
    {
 cholmod_error ((-4), "../Modify/cholmod_rowdel.c", 136, "k invalid", Common) ;
 return (0) ;
    }
    if (R == ((void *)0))
    {
 Rj = ((void *)0) ;
 rnz = (-1) ;
    }
    else
    {
 { if ((R)->xtype < (0) || (R)->xtype > (3) || ((R)->xtype != 0 && ((R)->x) == ((void *)0)) || ((R)->xtype == 3 && ((R)->z) == ((void *)0))) { if (Common->status != (-2)) { cholmod_error ((-4), "../Modify/cholmod_rowdel.c", 146, "invalid xtype", Common) ; } return (0) ; } } ;
 if (R->ncol != 1 || R->nrow != L->n)
 {
     cholmod_error ((-4), "../Modify/cholmod_rowdel.c", 149, "R invalid", Common) ;
     return (0) ;
 }
 Rj = R->i ;
 Rp = R->p ;
 rnz = Rp [1] ;
    }
    do_solve = (X != ((void *)0)) && (DeltaB != ((void *)0)) ;
    if (do_solve)
    {
 { if ((X)->xtype < (1) || (X)->xtype > (1) || ((X)->xtype != 0 && ((X)->x) == ((void *)0)) || ((X)->xtype == 3 && ((X)->z) == ((void *)0))) { if (Common->status != (-2)) { cholmod_error ((-4), "../Modify/cholmod_rowdel.c", 159, "invalid xtype", Common) ; } return (0) ; } } ;
 { if ((DeltaB)->xtype < (1) || (DeltaB)->xtype > (1) || ((DeltaB)->xtype != 0 && ((DeltaB)->x) == ((void *)0)) || ((DeltaB)->xtype == 3 && ((DeltaB)->z) == ((void *)0))) { if (Common->status != (-2)) { cholmod_error ((-4), "../Modify/cholmod_rowdel.c", 160, "invalid xtype", Common) ; } return (0) ; } } ;
 Xx = X->x ;
 Nx = DeltaB->x ;
 if (X->nrow != L->n || X->ncol != 1 || DeltaB->nrow != L->n ||
  DeltaB->ncol != 1 || Xx == ((void *)0) || Nx == ((void *)0))
 {
     cholmod_error ((-4), "../Modify/cholmod_rowdel.c", 166, "X and/or DeltaB invalid", Common) ;
     return (0) ;
 }
    }
    else
    {
 Xx = ((void *)0) ;
 Nx = ((void *)0) ;
    }
    Common->status = 0 ;
    s = cholmod_mult_size_t (n, 2, &ok) ;
    if (!ok)
    {
 cholmod_error ((-3), "../Modify/cholmod_rowdel.c", 185, "problem too large", Common) ;
 return (0) ;
    }
    cholmod_allocate_work (n, s, s, Common) ;
    if (Common->status < 0)
    {
 return (0) ;
    }
    ;
    if (L->xtype == 0 || L->is_super || L->is_ll)
    {
 cholmod_change_factor (1, 0, 0, 0, 0, L,
  Common) ;
 if (Common->status < 0)
 {
     return (0) ;
 }
    }
    Lp = L->p ;
    Lnz = L->nz ;
    Li = L->i ;
    Lx = L->x ;
    ;
    W = Common->Xwork ;
    Cx = W + n ;
    Iwork = Common->Iwork ;
    Ci = Iwork + n ;
    given_row = (rnz >= 0) ;
    klast = given_row ? rnz : k ;
    ;
    for (kk = 0 ; kk < klast ; kk++)
    {
 j = given_row ? (Rj [kk]) : (kk) ;
 if (j < 0 || j >= k)
 {
     cholmod_error ((-4), "../Modify/cholmod_rowdel.c", 251, "R invalid", Common) ;
     return (0) ;
 }
 ;
 lnz = Lnz [j] ;
 dj = Lx [Lp [j]] ;
 ;
 if (lnz > 1)
 {
     left = Lp [j] ;
     pend = left + lnz ;
     right = pend - 1 ;
     i = Li [right] ;
     if (i < k)
     {
  continue ;
     }
     else if (i == k)
     {
  if (do_solve)
  {
      Xx [j] -= yk [0] * dj * Lx [right] ;
  }
  Lx [right] = 0 ;
     }
     else
     {
  ;
  while (left < right)
  {
      middle = (left + right) / 2 ;
      ;
      if (k > Li [middle])
      {
   left = middle + 1 ;
      }
      else
      {
   right = middle ;
      }
  }
  ;
  if (k == Li [left])
  {
      if (do_solve)
      {
   Xx [j] -= yk [0] * dj * Lx [left] ;
      }
      Lx [left] = 0 ;
  }
     }
 }
    }
    lnz = Lnz [k] - 1 ;
    ;
    ;
    p = Lp [k] ;
    pend = p + lnz + 1 ;
    dk = Lx [p] ;
    Lx [p++] = 1 ;
    ;
    ok = 1 ;
    fl = 0 ;
    if (lnz > 0)
    {
 if (do_solve)
 {
     xk = Xx [k] - yk [0] * dk ;
     for ( ; p < pend ; p++)
     {
  Nx [Li [p]] += Lx [p] * xk ;
     }
 }
 do_update = ((dk) > 0.) ;
 if (!do_update)
 {
     dk = -dk ;
 }
 sqrt_dk = sqrt (dk) ;
 p = Lp [k] + 1 ;
 for (kk = 0 ; kk < lnz ; kk++, p++)
 {
     Ci [kk] = Li [p] ;
     Cx [kk] = Lx [p] * sqrt_dk ;
     Lx [p] = 0 ;
 }
 fl = lnz + 1 ;
 C = &Cmatrix ;
 C->nrow = n ;
 C->ncol = 1 ;
 C->nzmax = lnz ;
 C->sorted = 1 ;
 C->packed = 1 ;
 C->p = Cp ;
 C->i = Ci ;
 C->x = Cx ;
 C->nz = ((void *)0) ;
 C->itype = L->itype ;
 C->xtype = L->xtype ;
 C->dtype = L->dtype ;
 C->z = ((void *)0) ;
 C->stype = 0 ;
 Cp [0] = 0 ;
 Cp [1] = lnz ;
 ok = cholmod_updown_mark (do_update ? (1) : (0), C, colmark,
  L, X, DeltaB, Common) ;
 for (kk = 0 ; kk < lnz ; kk++)
 {
     Cx [kk] = 0 ;
 }
    }
    Common->modfl += fl ;
    if (do_solve)
    {
 Xx [k] = yk [0] ;
    }
    ;
    ;
    return (ok) ;
}

variable_types:
kdel
unsigned long

variable_types: struct cholmod_sparse_struct { unsigned long nrow; unsigned long ncol; unsigned long nzmax; void *p; void *i; void *nz; void *x; void *z; int stype; int itype; int xtype; int dtype; int sorted; int packed; } *

variable_types:
yk
double [2]

variable_types:
colmark
int *

variable_types: struct cholmod_factor_struct { unsigned long n; unsigned long minor; void *Perm; void *ColCount; unsigned long nzmax; void *p; void *i; void *x; void *z; void *nz; void *next; void *prev; unsigned long nsuper; unsigned long ssize; unsigned long xsize; unsigned long maxcsize; unsigned long maxesize; void *super; void *pi; void *px; void *s; int ordering; int is_ll; int is_super; int is_monotonic; int itype; int xtype; int dtype; } *

variable_types: struct cholmod_dense_struct { unsigned long nrow; unsigned long ncol; unsigned long nzmax; unsigned long d; void *x; void *z; int xtype; int dtype; } *

variable_types:
DeltaB
struct cholmod_dense_struct *

variable_types: struct cholmod_common_struct { double dbound; double grow0; double grow1; unsigned long grow2; unsigned long maxrank; double supernodal_switch; int supernodal; int final_asis; int final_super; int final_ll; int final_pack; int final_monotonic; int final_resymbol; double zrelax[3]; unsigned long nrelax[3]; int prefer_zomplex; int prefer_upper; int quick_return_if_not_posdef; int print; int precise; int (*print_function)(char *, ...); int try_catch; void (*error_handler)(int status, char *file, int line, char *message); int nmethods; int current; int selected; struct cholmod_method_struct { double lnz; double fl; double prune_dense; double prune_dense2; double nd_oksep; double other_1[4]; unsigned long nd_small; unsigned long other_2[4]; int aggressive; int order_for_lu; int nd_compress; int nd_camd; int nd_components; int ordering; unsigned long other_3[4]; } method[-1]; int postorder; void *(*malloc_memory)(unsigned long); void *(*realloc_memory)(void *, unsigned long); void (*free_memory)(void *); void *(*calloc_memory)(unsigned long, unsigned long); int (*complex_divide)(double ax, double az, double bx, double bz, double *cx, double *cz); double (*hypotenuse)(double x, double y); double metis_memory; double metis_dswitch; unsigned long metis_nswitch; unsigned long nrow; long mark; unsigned long iworksize; unsigned long xworksize; void *Flag; void *Head; void *Xwork; void *Iwork; int itype; int dtype; int no_workspace_reallocate; int status; double fl; double lnz; double anz; double modfl; unsigned long malloc_count; unsigned long memory_usage; unsigned long memory_inuse; double nrealloc_col; double nrealloc_factor; double ndbounds_hit; double rowfacfl; double aatfl; double other1[10]; double SPQR_xstat[4]; double SPQR_grain; double SPQR_small; long SPQR_istat[10]; long other2[6]; int other3[10]; int prefer_binary; int default_nesdis; int called_nd; int blas_ok; int SPQR_shrink; int SPQR_nthreads; unsigned long other4[16]; void *other5[16]; } *

variable_types: dk double

variable_types: xk double

variable_types: dj double

variable_types: fl double

variable_types:
Lx
double *

variable_types:
Cx
double *

variable_types:
W
double *

variable_types:
Xx
double *

variable_types:
Nx
double *

variable_types:
Li
int *

variable_types:
Lp
int *

variable_types:
Lnz
int *

variable_types:
Ci
int *

variable_types:
Rj
int *

variable_types:
Rp
int *

variable_types:
Iwork
int *

variable_types: j int

variable_types: p int

variable_types: pend int

variable_types: kk int

variable_types: lnz int

variable_types: n int

variable_types:
Cp
int [2]

variable_types: left int

variable_types: k int

variable_types: right int

variable_types: middle int

variable_types: i int

variable_types: klast int

variable_types: rnz int

variable_types:
s
unsigned long

variable_types: ok int

user_defined_types: struct cholmod_common_struct { double dbound; double grow0; double grow1; unsigned long grow2; unsigned long maxrank; double supernodal_switch; int supernodal; int final_asis; int final_super; int final_ll; int final_pack; int final_monotonic; int final_resymbol; double zrelax[3]; unsigned long nrelax[3]; int prefer_zomplex; int prefer_upper; int quick_return_if_not_posdef; int print; int precise; int (*print_function)(char *, ...); int try_catch; void (*error_handler)(int status, char *file, int line, char *message); int nmethods; int current; int selected; struct cholmod_method_struct method[-1]; int postorder; void *(*malloc_memory)(unsigned long); void *(*realloc_memory)(void *, unsigned long); void (*free_memory)(void *); void *(*calloc_memory)(unsigned long, unsigned long); int (*complex_divide)(double ax, double az, double bx, double bz, double *cx, double *cz); double (*hypotenuse)(double x, double y); double metis_memory; double metis_dswitch; unsigned long metis_nswitch; unsigned long nrow; long mark; unsigned long iworksize; unsigned long xworksize; void *Flag; void *Head; void *Xwork; void *Iwork; int itype; int dtype; int no_workspace_reallocate; int status; double fl; double lnz; double anz; double modfl; unsigned long malloc_count; unsigned long memory_usage; unsigned long memory_inuse; double nrealloc_col; double nrealloc_factor; double ndbounds_hit; double rowfacfl; double aatfl; double other1[10]; double SPQR_xstat[4]; double SPQR_grain; double SPQR_small; long SPQR_istat[10]; long other2[6]; int other3[10]; int prefer_binary; int default_nesdis; int called_nd; int blas_ok; int SPQR_shrink; int SPQR_nthreads; unsigned long other4[16]; void *other5[16]; }


decompiled_code:
__int64 __fastcall cholmod_rowdel(unsigned __int64 a1, __int64 a2, unsigned __int64 *a3, __int64 a4)
{
__int64 v5[3]; // [rsp+0h] [rbp-18h] BYREF

v5[0] = 0LL;
v5[1] = 0LL;
return cholmod_rowdel_mark(a1, a2, (double *)v5, 0LL, a3, 0LL, 0LL, a4);
}

canonical_decompiled_code:
__int64 __fastcall func1(unsigned __int64 a1, __int64 a2, unsigned __int64 *a3, __int64 a4)
{
__int64 v5[3]; // [rsp+0h] [rbp-18h] BYREF

v5[0] = 0LL;
v5[1] = 0LL;
return func0(a1, a2, (double *)v5, 0LL, a3, 0LL, 0LL, a4);
}

original_code:
int cholmod_rowdel
(
    size_t k,
    cholmod_sparse *R,
    cholmod_factor *L,
    cholmod_common *Common
)
{
    double yk [2] ;
    yk [0] = 0. ;
    yk [1] = 0. ;
    return (cholmod_rowdel_mark (k, R, yk, ((void *)0), L, ((void *)0), ((void *)0), Common)) ;
}

canonical_original_code:
int cholmod_rowdel(unsigned long k, struct cholmod_sparse_struct *R, struct cholmod_factor_struct *L, struct cholmod_common_struct *Common)
{
    double yk[2];
    yk [0] = 0. ;
    yk [1] = 0. ;
    return (cholmod_rowdel_mark (k, R, yk, ((void *)0), L, ((void *)0), ((void *)0), Common)) ;
}

variable_types:
k
unsigned long

variable_types: struct cholmod_sparse_struct { unsigned long nrow; unsigned long ncol; unsigned long nzmax; void *p; void *i; void *nz; void *x; void *z; int stype; int itype; int xtype; int dtype; int sorted; int packed; } *

variable_types: struct cholmod_factor_struct { unsigned long n; unsigned long minor; void *Perm; void *ColCount; unsigned long nzmax; void *p; void *i; void *x; void *z; void *nz; void *next; void *prev; unsigned long nsuper; unsigned long ssize; unsigned long xsize; unsigned long maxcsize; unsigned long maxesize; void *super; void *pi; void *px; void *s; int ordering; int is_ll; int is_super; int is_monotonic; int itype; int xtype; int dtype; } *

variable_types: struct cholmod_common_struct { double dbound; double grow0; double grow1; unsigned long grow2; unsigned long maxrank; double supernodal_switch; int supernodal; int final_asis; int final_super; int final_ll; int final_pack; int final_monotonic; int final_resymbol; double zrelax[3]; unsigned long nrelax[3]; int prefer_zomplex; int prefer_upper; int quick_return_if_not_posdef; int print; int precise; int (*print_function)(char *, ...); int try_catch; void (*error_handler)(int status, char *file, int line, char *message); int nmethods; int current; int selected; struct cholmod_method_struct { double lnz; double fl; double prune_dense; double prune_dense2; double nd_oksep; double other_1[4]; unsigned long nd_small; unsigned long other_2[4]; int aggressive; int order_for_lu; int nd_compress; int nd_camd; int nd_components; int ordering; unsigned long other_3[4]; } method[-1]; int postorder; void *(*malloc_memory)(unsigned long); void *(*realloc_memory)(void *, unsigned long); void (*free_memory)(void *); void *(*calloc_memory)(unsigned long, unsigned long); int (*complex_divide)(double ax, double az, double bx, double bz, double *cx, double *cz); double (*hypotenuse)(double x, double y); double metis_memory; double metis_dswitch; unsigned long metis_nswitch; unsigned long nrow; long mark; unsigned long iworksize; unsigned long xworksize; void *Flag; void *Head; void *Xwork; void *Iwork; int itype; int dtype; int no_workspace_reallocate; int status; double fl; double lnz; double anz; double modfl; unsigned long malloc_count; unsigned long memory_usage; unsigned long memory_inuse; double nrealloc_col; double nrealloc_factor; double ndbounds_hit; double rowfacfl; double aatfl; double other1[10]; double SPQR_xstat[4]; double SPQR_grain; double SPQR_small; long SPQR_istat[10]; long other2[6]; int other3[10]; int prefer_binary; int default_nesdis; int called_nd; int blas_ok; int SPQR_shrink; int SPQR_nthreads; unsigned long other4[16]; void *other5[16]; } *

variable_types:
yk
double [2]

return_type: int


decompiled_code:
__int64 __fastcall cholmod_rowdel_solve(unsigned __int64 a1, __int64 a2, double *a3, unsigned __int64 *a4, __int64 a5, __int64 a6, __int64 a7)
{
return cholmod_rowdel_mark(a1, a2, a3, 0LL, a4, a5, a6, a7);
}

canonical_decompiled_code:
__int64 __fastcall func2(unsigned __int64 a1, __int64 a2, double *a3, unsigned __int64 *a4, __int64 a5, __int64 a6, __int64 a7)
{
return func0(a1, a2, a3, 0LL, a4, a5, a6, a7);
}

original_code:
int cholmod_rowdel_solve
(
    size_t k,
    cholmod_sparse *R,
    double yk [2],
    cholmod_factor *L,
    cholmod_dense *X,
    cholmod_dense *DeltaB,
    cholmod_common *Common
)
{
    return (cholmod_rowdel_mark (k, R, yk, ((void *)0), L, X, DeltaB, Common)) ;
}

canonical_original_code:
int cholmod_rowdel_solve(unsigned long k, struct cholmod_sparse_struct *R, double yk[2], struct cholmod_factor_struct *L, struct cholmod_dense_struct *X, struct cholmod_dense_struct *DeltaB, struct cholmod_common_struct *Common)
{
    return (cholmod_rowdel_mark (k, R, yk, ((void *)0), L, X, DeltaB, Common)) ;
}

variable_types: struct cholmod_dense_struct { unsigned long nrow; unsigned long ncol; unsigned long nzmax; unsigned long d; void *x; void *z; int xtype; int dtype; } *

variable_types:
DeltaB
struct cholmod_dense_struct *

user_defined_types: struct cholmod_sparse_struct { unsigned long nrow; unsigned long ncol; unsigned long nzmax; void *p; void *i; void *nz; void *x; void *z; int stype; int itype; int xtype; int dtype; int sorted; int packed; }

user_defined_types: struct cholmod_factor_struct { unsigned long n; unsigned long minor; void *Perm; void *ColCount; unsigned long nzmax; void *p; void *i; void *x; void *z; void *nz; void *next; void *prev; unsigned long nsuper; unsigned long ssize; unsigned long xsize; unsigned long maxcsize; unsigned long maxesize; void *super; void *pi; void *px; void *s; int ordering; int is_ll; int is_super; int is_monotonic; int itype; int xtype; int dtype; }

user_defined_types: struct cholmod_method_struct { double lnz; double fl; double prune_dense; double prune_dense2; double nd_oksep; double other_1[4]; unsigned long nd_small; unsigned long other_2[4]; int aggressive; int order_for_lu; int nd_compress; int nd_camd; int nd_components; int ordering; unsigned long other_3[4]; }


original_code:
long umfpack_zl_scale
(
    double Xx [ ],
    double Xz [ ],
    const double Bx [ ],
    const double Bz [ ],
    void *NumericHandle
)
{
    NumericType *Numeric ;
    long n, i ;
    double *Rs ;
    long split = ((Xz) != (double *) ((void *)0)) && ((Bz) != (double *) ((void *)0)) ;
    Numeric = (NumericType *) NumericHandle ;
    if (!umfzl_valid_numeric (Numeric))
    {
 return ((-3)) ;
    }
    n = Numeric->n_row ;
    Rs = Numeric->Rs ;
    if (!Xx || !Bx)
    {
 return ((-5)) ;
    }
    if (Rs != (double *) ((void *)0))
    {
 if (Numeric->do_recip)
 {
     if (split)
     {
  for (i = 0 ; i < n ; i++)
  {
      Xx [i] = Bx [i] * Rs [i] ;
      Xz [i] = Bz [i] * Rs [i] ;
  }
     }
     else
     {
  for (i = 0 ; i < n ; i++)
  {
      Xx [2*i ] = Bx [2*i ] * Rs [i] ;
      Xx [2*i+1] = Bx [2*i+1] * Rs [i] ;
  }
     }
 }
 else
 {
     if (split)
     {
  for (i = 0 ; i < n ; i++)
  {
      Xx [i] = Bx [i] / Rs [i] ;
      Xz [i] = Bz [i] / Rs [i] ;
  }
     }
     else
     {
  for (i = 0 ; i < n ; i++)
  {
      Xx [2*i ] = Bx [2*i ] / Rs [i] ;
      Xx [2*i+1] = Bx [2*i+1] / Rs [i] ;
  }
     }
 }
    }
    else
    {
        if (split)
 {
     for (i = 0 ; i < n ; i++)
     {
  Xx [i] = Bx [i] ;
  Xz [i] = Bz [i] ;
     }
 }
 else
 {
     for (i = 0 ; i < n ; i++)
     {
  Xx [2*i ] = Bx [2*i ] ;
  Xx [2*i+1] = Bx [2*i+1] ;
     }
 }
    }
    return ((0)) ;
}

canonical_original_code:
long umfpack_zl_scale(double Xx[], double Xz[], double Bx[], double Bz[], void *NumericHandle)
{
    struct NumericType *Numeric;
    long n; long i;
    double *Rs;
    long split = ((Xz) != (double *) ((void *)0)) && ((Bz) != (double *) ((void *)0));
    Numeric = (struct NumericType *) NumericHandle ;
    if (!umfzl_valid_numeric (Numeric))
    {
 return ((-3)) ;
    }
    n = Numeric->n_row ;
    Rs = Numeric->Rs ;
    if (!Xx || !Bx)
    {
 return ((-5)) ;
    }
    if (Rs != (double *) ((void *)0))
    {
 if (Numeric->do_recip)
 {
     if (split)
     {
  for (i = 0 ; i < n ; i++)
  {
      Xx [i] = Bx [i] * Rs [i] ;
      Xz [i] = Bz [i] * Rs [i] ;
  }
     }
     else
     {
  for (i = 0 ; i < n ; i++)
  {
      Xx [2*i ] = Bx [2*i ] * Rs [i] ;
      Xx [2*i+1] = Bx [2*i+1] * Rs [i] ;
  }
     }
 }
 else
 {
     if (split)
     {
  for (i = 0 ; i < n ; i++)
  {
      Xx [i] = Bx [i] / Rs [i] ;
      Xz [i] = Bz [i] / Rs [i] ;
  }
     }
     else
     {
  for (i = 0 ; i < n ; i++)
  {
      Xx [2*i ] = Bx [2*i ] / Rs [i] ;
      Xx [2*i+1] = Bx [2*i+1] / Rs [i] ;
  }
     }
 }
    }
    else
    {
        if (split)
 {
     for (i = 0 ; i < n ; i++)
     {
  Xx [i] = Bx [i] ;
  Xz [i] = Bz [i] ;
     }
 }
 else
 {
     for (i = 0 ; i < n ; i++)
     {
  Xx [2*i ] = Bx [2*i ] ;
  Xx [2*i+1] = Bx [2*i+1] ;
     }
 }
    }
    return ((0)) ;
}

variable_types:
Xx
double []

variable_types:
Xz
double []

variable_types:
Bx
double []

variable_types:
Bz
double []

variable_types:
NumericHandle
void *

variable_types: struct NumericType { double flops; long scale; long valid; union Unit_union { struct { long size; } header; double xxxxxx; } *Memory; long ihead; long *Rperm; long ulen; struct DoubleComplex { double component[2]; } *D; long do_recip; double *Rs; long n_row; long tail_usage; long maxnrows; } *

variable_types: n long

variable_types: i long

variable_types:
Rs
double *

variable_types: split long

return_type: long

user_defined_types: struct NumericType { double flops; long scale; long valid; union Unit_union *Memory; long ihead; long *Rperm; long ulen; struct DoubleComplex *D; long do_recip; double *Rs; long n_row; long tail_usage; long maxnrows; }


original_code:
int cholmod_l_factorize_p
(
    cholmod_sparse *A,
    double beta [2],
    long *fset,
    size_t fsize,
    cholmod_factor *L,
    cholmod_common *Common
)
{
    cholmod_sparse *S, *F, *A1, *A2 ;
    long nrow, ncol, stype, convert, n, nsuper, grow2, status ;
    size_t s, t, uncol ;
    int ok = 1 ;
    { if (Common == ((void *)0)) { return (0) ; } if (Common->itype != 2 || Common->dtype != 0) { Common->status = (-4) ; return (0) ; } } ;
    { if ((A) == ((void *)0)) { if (Common->status != (-2)) { cholmod_l_error ((-4), "../Cholesky/cholmod_factorize.c", 123, "argument missing", Common) ; } return (0) ; } } ;
    { if ((L) == ((void *)0)) { if (Common->status != (-2)) { cholmod_l_error ((-4), "../Cholesky/cholmod_factorize.c", 124, "argument missing", Common) ; } return (0) ; } } ;
    { if ((A)->xtype < (1) || (A)->xtype > (3) || ((A)->xtype != 0 && ((A)->x) == ((void *)0)) || ((A)->xtype == 3 && ((A)->z) == ((void *)0))) { if (Common->status != (-2)) { cholmod_l_error ((-4), "../Cholesky/cholmod_factorize.c", 125, "invalid xtype", Common) ; } return (0) ; } } ;
    { if ((L)->xtype < (0) || (L)->xtype > (3) || ((L)->xtype != 0 && ((L)->x) == ((void *)0)) || ((L)->xtype == 3 && ((L)->z) == ((void *)0))) { if (Common->status != (-2)) { cholmod_l_error ((-4), "../Cholesky/cholmod_factorize.c", 126, "invalid xtype", Common) ; } return (0) ; } } ;
    nrow = A->nrow ;
    ncol = A->ncol ;
    n = L->n ;
    stype = A->stype ;
    if (L->n != A->nrow)
    {
 cholmod_l_error ((-4), "../Cholesky/cholmod_factorize.c", 133, "A and L dimensions do not match", Common) ;
 return (0) ;
    }
    if (stype != 0 && nrow != ncol)
    {
 cholmod_l_error ((-4), "../Cholesky/cholmod_factorize.c", 138, "matrix invalid", Common) ;
 return (0) ;
    }
    ;
    Common->status = 0 ;
    nsuper = (L->is_super ? L->nsuper : 0) ;
    uncol = ((stype != 0) ? 0 : ncol) ;
    s = cholmod_l_mult_size_t (nsuper, 2, &ok) ;
    s = (((uncol) > (s)) ? (uncol) : (s)) ;
    t = cholmod_l_mult_size_t (nrow, 2, &ok) ;
    s = cholmod_l_add_size_t (s, t, &ok) ;
    if (!ok)
    {
 cholmod_l_error ((-3), "../Cholesky/cholmod_factorize.c", 158, "problem too large", Common) ;
 return (0) ;
    }
    cholmod_l_allocate_work (nrow, s, 0, Common) ;
    if (Common->status < 0)
    {
 return (0) ;
    }
    S = ((void *)0) ;
    F = ((void *)0) ;
    A1 = ((void *)0) ;
    A2 = ((void *)0) ;
    convert = !(Common->final_asis) ;
    if (L->is_super)
    {
 if (L->ordering == 0)
 {
     if (stype > 0)
     {
  A1 = cholmod_l_ptranspose (A, 2, ((void *)0), ((void *)0), 0, Common) ;
  S = A1 ;
     }
     else if (stype < 0)
     {
  S = A ;
     }
     else
     {
  A1 = cholmod_l_ptranspose (A, 2, ((void *)0), fset, fsize, Common) ;
  F = A1 ;
  S = A ;
     }
 }
 else
 {
     if (stype > 0)
     {
  A1 = cholmod_l_ptranspose (A, 2, L->Perm, ((void *)0), 0, Common) ;
  S = A1 ;
     }
     else if (stype < 0)
     {
  A2 = cholmod_l_ptranspose (A, 2, L->Perm, ((void *)0), 0, Common) ;
  A1 = cholmod_l_ptranspose (A2, 2, ((void *)0), ((void *)0), 0, Common) ;
  S = A1 ;
  cholmod_l_free_sparse (&A2, Common) ;
  ;
     }
     else
     {
  A1 = cholmod_l_ptranspose (A, 2, L->Perm, fset, fsize, Common) ;
  F = A1 ;
  A2 = cholmod_l_ptranspose (F, 2, ((void *)0), ((void *)0), 0, Common) ;
  S = A2 ;
     }
 }
 if (Common->status == 0)
 {
     cholmod_l_super_numeric (S, F, beta, L, Common) ;
 }
 status = Common->status ;
 ;
 if (Common->status >= 0 && convert)
 {
     ok = cholmod_l_change_factor (L->xtype, Common->final_ll,
      Common->final_super, Common->final_pack,
      Common->final_monotonic, L, Common) ;
     if (ok && Common->final_resymbol && !(L->is_super))
     {
  cholmod_l_resymbol_noperm (S, fset, fsize, Common->final_pack,
      L, Common) ;
     }
 }
    }
    else
    {
 if (L->ordering == 0)
 {
     if (stype > 0)
     {
  S = A ;
     }
     else if (stype < 0)
     {
  A2 = cholmod_l_ptranspose (A, 2, ((void *)0), ((void *)0), 0, Common) ;
  S = A2 ;
     }
     else
     {
  A1 = cholmod_l_ptranspose (A, 2, ((void *)0), fset, fsize, Common) ;
  F = A1 ;
  S = A ;
     }
 }
 else
 {
     if (stype > 0)
     {
  A1 = cholmod_l_ptranspose (A, 2, L->Perm, ((void *)0), 0, Common) ;
  A2 = cholmod_l_ptranspose (A1, 2, ((void *)0), ((void *)0), 0, Common) ;
  cholmod_l_free_sparse (&A1, Common) ;
     }
     else if (stype < 0)
     {
  A2 = cholmod_l_ptranspose (A, 2, L->Perm, ((void *)0), 0, Common) ;
     }
     else
     {
  A1 = cholmod_l_ptranspose (A, 2, L->Perm, fset, fsize, Common) ;
  F = A1 ;
  A2 = cholmod_l_ptranspose (F, 2, ((void *)0), ((void *)0), 0, Common) ;
     }
     S = A2 ;
 }
 if (Common->status == 0)
 {
     grow2 = Common->grow2 ;
     L->is_ll = ((Common->final_ll) ? 1 : 0) ;
     if (L->xtype == 0 && Common->final_pack)
     {
  Common->grow2 = 0 ;
     }
     cholmod_l_rowfac (S, F, beta, 0, nrow, L, Common) ;
     Common->grow2 = grow2 ;
 }
 status = Common->status ;
 if (Common->status >= 0 && convert)
 {
     cholmod_l_change_factor (L->xtype, L->is_ll, 0,
      Common->final_pack, Common->final_monotonic, L, Common) ;
 }
    }
    cholmod_l_free_sparse (&A1, Common) ;
    cholmod_l_free_sparse (&A2, Common) ;
    Common->status = (((Common->status) > (status)) ? (Common->status) : (status)) ;
    return (Common->status >= 0) ;
}

canonical_original_code:
int cholmod_l_factorize_p(struct cholmod_sparse_struct *A, double beta[2], long *fset, unsigned long fsize, struct cholmod_factor_struct *L, struct cholmod_common_struct *Common)
{
    struct cholmod_sparse_struct *S; struct cholmod_sparse_struct *F; struct cholmod_sparse_struct *A1; struct cholmod_sparse_struct *A2;
    long nrow; long ncol; long stype; long convert; long n; long nsuper; long grow2; long status;
    unsigned long s; unsigned long t; unsigned long uncol;
    int ok = 1;
    { if (Common == ((void *)0)) { return (0) ; } if (Common->itype != 2 || Common->dtype != 0) { Common->status = (-4) ; return (0) ; } } ;
    { if ((A) == ((void *)0)) { if (Common->status != (-2)) { cholmod_l_error ((-4), "../Cholesky/cholmod_factorize.c", 123, "argument missing", Common) ; } return (0) ; } } ;
    { if ((L) == ((void *)0)) { if (Common->status != (-2)) { cholmod_l_error ((-4), "../Cholesky/cholmod_factorize.c", 124, "argument missing", Common) ; } return (0) ; } } ;
    { if ((A)->xtype < (1) || (A)->xtype > (3) || ((A)->xtype != 0 && ((A)->x) == ((void *)0)) || ((A)->xtype == 3 && ((A)->z) == ((void *)0))) { if (Common->status != (-2)) { cholmod_l_error ((-4), "../Cholesky/cholmod_factorize.c", 125, "invalid xtype", Common) ; } return (0) ; } } ;
    { if ((L)->xtype < (0) || (L)->xtype > (3) || ((L)->xtype != 0 && ((L)->x) == ((void *)0)) || ((L)->xtype == 3 && ((L)->z) == ((void *)0))) { if (Common->status != (-2)) { cholmod_l_error ((-4), "../Cholesky/cholmod_factorize.c", 126, "invalid xtype", Common) ; } return (0) ; } } ;
    nrow = A->nrow ;
    ncol = A->ncol ;
    n = L->n ;
    stype = A->stype ;
    if (L->n != A->nrow)
    {
 cholmod_l_error ((-4), "../Cholesky/cholmod_factorize.c", 133, "A and L dimensions do not match", Common) ;
 return (0) ;
    }
    if (stype != 0 && nrow != ncol)
    {
 cholmod_l_error ((-4), "../Cholesky/cholmod_factorize.c", 138, "matrix invalid", Common) ;
 return (0) ;
    }
    ;
    Common->status = 0 ;
    nsuper = (L->is_super ? L->nsuper : 0) ;
    uncol = ((stype != 0) ? 0 : ncol) ;
    s = cholmod_l_mult_size_t (nsuper, 2, &ok) ;
    s = (((uncol) > (s)) ? (uncol) : (s)) ;
    t = cholmod_l_mult_size_t (nrow, 2, &ok) ;
    s = cholmod_l_add_size_t (s, t, &ok) ;
    if (!ok)
    {
 cholmod_l_error ((-3), "../Cholesky/cholmod_factorize.c", 158, "problem too large", Common) ;
 return (0) ;
    }
    cholmod_l_allocate_work (nrow, s, 0, Common) ;
    if (Common->status < 0)
    {
 return (0) ;
    }
    S = ((void *)0) ;
    F = ((void *)0) ;
    A1 = ((void *)0) ;
    A2 = ((void *)0) ;
    convert = !(Common->final_asis) ;
    if (L->is_super)
    {
 if (L->ordering == 0)
 {
     if (stype > 0)
     {
  A1 = cholmod_l_ptranspose (A, 2, ((void *)0), ((void *)0), 0, Common) ;
  S = A1 ;
     }
     else if (stype < 0)
     {
  S = A ;
     }
     else
     {
  A1 = cholmod_l_ptranspose (A, 2, ((void *)0), fset, fsize, Common) ;
  F = A1 ;
  S = A ;
     }
 }
 else
 {
     if (stype > 0)
     {
  A1 = cholmod_l_ptranspose (A, 2, L->Perm, ((void *)0), 0, Common) ;
  S = A1 ;
     }
     else if (stype < 0)
     {
  A2 = cholmod_l_ptranspose (A, 2, L->Perm, ((void *)0), 0, Common) ;
  A1 = cholmod_l_ptranspose (A2, 2, ((void *)0), ((void *)0), 0, Common) ;
  S = A1 ;
  cholmod_l_free_sparse (&A2, Common) ;
  ;
     }
     else
     {
  A1 = cholmod_l_ptranspose (A, 2, L->Perm, fset, fsize, Common) ;
  F = A1 ;
  A2 = cholmod_l_ptranspose (F, 2, ((void *)0), ((void *)0), 0, Common) ;
  S = A2 ;
     }
 }
 if (Common->status == 0)
 {
     cholmod_l_super_numeric (S, F, beta, L, Common) ;
 }
 status = Common->status ;
 ;
 if (Common->status >= 0 && convert)
 {
     ok = cholmod_l_change_factor (L->xtype, Common->final_ll,
      Common->final_super, Common->final_pack,
      Common->final_monotonic, L, Common) ;
     if (ok && Common->final_resymbol && !(L->is_super))
     {
  cholmod_l_resymbol_noperm (S, fset, fsize, Common->final_pack,
      L, Common) ;
     }
 }
    }
    else
    {
 if (L->ordering == 0)
 {
     if (stype > 0)
     {
  S = A ;
     }
     else if (stype < 0)
     {
  A2 = cholmod_l_ptranspose (A, 2, ((void *)0), ((void *)0), 0, Common) ;
  S = A2 ;
     }
     else
     {
  A1 = cholmod_l_ptranspose (A, 2, ((void *)0), fset, fsize, Common) ;
  F = A1 ;
  S = A ;
     }
 }
 else
 {
     if (stype > 0)
     {
  A1 = cholmod_l_ptranspose (A, 2, L->Perm, ((void *)0), 0, Common) ;
  A2 = cholmod_l_ptranspose (A1, 2, ((void *)0), ((void *)0), 0, Common) ;
  cholmod_l_free_sparse (&A1, Common) ;
     }
     else if (stype < 0)
     {
  A2 = cholmod_l_ptranspose (A, 2, L->Perm, ((void *)0), 0, Common) ;
     }
     else
     {
  A1 = cholmod_l_ptranspose (A, 2, L->Perm, fset, fsize, Common) ;
  F = A1 ;
  A2 = cholmod_l_ptranspose (F, 2, ((void *)0), ((void *)0), 0, Common) ;
     }
     S = A2 ;
 }
 if (Common->status == 0)
 {
     grow2 = Common->grow2 ;
     L->is_ll = ((Common->final_ll) ? 1 : 0) ;
     if (L->xtype == 0 && Common->final_pack)
     {
  Common->grow2 = 0 ;
     }
     cholmod_l_rowfac (S, F, beta, 0, nrow, L, Common) ;
     Common->grow2 = grow2 ;
 }
 status = Common->status ;
 if (Common->status >= 0 && convert)
 {
     cholmod_l_change_factor (L->xtype, L->is_ll, 0,
      Common->final_pack, Common->final_monotonic, L, Common) ;
 }
    }
    cholmod_l_free_sparse (&A1, Common) ;
    cholmod_l_free_sparse (&A2, Common) ;
    Common->status = (((Common->status) > (status)) ? (Common->status) : (status)) ;
    return (Common->status >= 0) ;
}

variable_types:
beta
double [2]

variable_types:
fset
long *

variable_types:
fsize
unsigned long

variable_types: nrow long

variable_types: ncol long

variable_types: stype long

variable_types: convert long

variable_types: nsuper long

variable_types: status long

variable_types:
s
unsigned long

variable_types:
t
unsigned long

variable_types:
uncol
unsigned long

variable_types: ok int


decompiled_code:
_BOOL8 __fastcall cholmod_l_factorize(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v4[3]; // [rsp+0h] [rbp-18h] BYREF

v4[0] = 0LL;
v4[1] = 0LL;
return cholmod_l_factorize_p(a1, (__int64)v4, 0LL, 0LL, a2, a3);
}

original_code:
int cholmod_l_factorize
(
    cholmod_sparse *A,
    cholmod_factor *L,
    cholmod_common *Common
)
{
    double zero [2] ;
    zero [0] = 0 ;
    zero [1] = 0 ;
    return (cholmod_l_factorize_p (A, zero, ((void *)0), 0, L, Common)) ;
}

canonical_original_code:
int cholmod_l_factorize(struct cholmod_sparse_struct *A, struct cholmod_factor_struct *L, struct cholmod_common_struct *Common)
{
    double zero[2];
    zero [0] = 0 ;
    zero [1] = 0 ;
    return (cholmod_l_factorize_p (A, zero, ((void *)0), 0, L, Common)) ;
}

variable_types: struct cholmod_sparse_struct { unsigned long nrow; unsigned long ncol; unsigned long nzmax; void *p; void *i; void *nz; void *x; void *z; int stype; int itype; int xtype; int dtype; int sorted; int packed; } *

variable_types: struct cholmod_factor_struct { unsigned long n; unsigned long minor; void *Perm; void *ColCount; unsigned long nzmax; void *p; void *i; void *x; void *z; void *nz; void *next; void *prev; unsigned long nsuper; unsigned long ssize; unsigned long xsize; unsigned long maxcsize; unsigned long maxesize; void *super; void *pi; void *px; void *s; int ordering; int is_ll; int is_super; int is_monotonic; int itype; int xtype; int dtype; } *

variable_types: struct cholmod_common_struct { double dbound; double grow0; double grow1; unsigned long grow2; unsigned long maxrank; double supernodal_switch; int supernodal; int final_asis; int final_super; int final_ll; int final_pack; int final_monotonic; int final_resymbol; double zrelax[3]; unsigned long nrelax[3]; int prefer_zomplex; int prefer_upper; int quick_return_if_not_posdef; int print; int precise; int (*print_function)(char *, ...); int try_catch; void (*error_handler)(int status, char *file, int line, char *message); int nmethods; int current; int selected; struct cholmod_method_struct { double lnz; double fl; double prune_dense; double prune_dense2; double nd_oksep; double other_1[4]; unsigned long nd_small; unsigned long other_2[4]; int aggressive; int order_for_lu; int nd_compress; int nd_camd; int nd_components; int ordering; unsigned long other_3[4]; } method[-1]; int postorder; void *(*malloc_memory)(unsigned long); void *(*realloc_memory)(void *, unsigned long); void (*free_memory)(void *); void *(*calloc_memory)(unsigned long, unsigned long); int (*complex_divide)(double ax, double az, double bx, double bz, double *cx, double *cz); double (*hypotenuse)(double x, double y); double metis_memory; double metis_dswitch; unsigned long metis_nswitch; unsigned long nrow; long mark; unsigned long iworksize; unsigned long xworksize; void *Flag; void *Head; void *Xwork; void *Iwork; int itype; int dtype; int no_workspace_reallocate; int status; double fl; double lnz; double anz; double modfl; unsigned long malloc_count; unsigned long memory_usage; unsigned long memory_inuse; double nrealloc_col; double nrealloc_factor; double ndbounds_hit; double rowfacfl; double aatfl; double other1[10]; double SPQR_xstat[4]; double SPQR_grain; double SPQR_small; long SPQR_istat[10]; long other2[6]; int other3[10]; int prefer_binary; int default_nesdis; int called_nd; int blas_ok; int SPQR_shrink; int SPQR_nthreads; unsigned long other4[16]; void *other5[16]; } *

variable_types:
zero
double [2]


original_code:
long umfzl_triplet_nomap_nox
(
    long n_row,
    long n_col,
    long nz,
    const long Ti [ ],
    const long Tj [ ],
    long Ap [ ],
    long Ai [ ],
    long Rp [ ],
    long Rj [ ],
    long W [ ],
    long RowCount [ ]
)
{
    long i, j, k, p, cp, p1, p2, pdest, pj ;
    for (i = 0 ; i < n_row ; i++)
    {
 W [i] = 0 ;
    }
    for (k = 0 ; k < nz ; k++)
    {
 i = Ti [k] ;
 j = Tj [k] ;
 if (i < 0 || i >= n_row || j < 0 || j >= n_col)
 {
     return ((-8)) ;
 }
 W [i]++ ;
    }
    Rp [0] = 0 ;
    for (i = 0 ; i < n_row ; i++)
    {
 Rp [i+1] = Rp [i] + W [i] ;
 W [i] = Rp [i] ;
    }
    for (k = 0 ; k < nz ; k++)
    {
 p = W [Ti [k]]++ ;
 Rj [p] = Tj [k] ;
    }
    for (j = 0 ; j < n_col ; j++)
    {
 W [j] = (-1) ;
    }
    for (i = 0 ; i < n_row ; i++)
    {
 p1 = Rp [i] ;
 p2 = Rp [i+1] ;
 pdest = p1 ;
 for (p = p1 ; p < p2 ; p++)
 {
     j = Rj [p] ;
     ;
     pj = W [j] ;
     if (pj >= p1)
     {
  ;
  ;
     }
     else
     {
  W [j] = pdest ;
  if (pdest != p)
  {
      Rj [pdest] = j ;
  }
  pdest++ ;
     }
 }
 RowCount [i] = pdest - p1 ;
    }
    for (j = 0 ; j < n_col ; j++)
    {
 W [j] = 0 ;
    }
    for (i = 0 ; i < n_row ; i++)
    {
 for (p = Rp [i] ; p < Rp [i] + RowCount [i] ; p++)
 {
     j = Rj [p] ;
     ;
     W [j]++ ;
 }
    }
    Ap [0] = 0 ;
    for (j = 0 ; j < n_col ; j++)
    {
 Ap [j+1] = Ap [j] + W [j] ;
    }
    for (j = 0 ; j < n_col ; j++)
    {
 W [j] = Ap [j] ;
    }
    for (i = 0 ; i < n_row ; i++)
    {
 for (p = Rp [i] ; p < Rp [i] + RowCount [i] ; p++)
 {
     cp = W [Rj [p]]++ ;
     Ai [cp] = i ;
 }
    }
    return ((0)) ;
}

canonical_original_code:
long umfzl_triplet_nomap_nox(long n_row, long n_col, long nz, long Ti[], long Tj[], long Ap[], long Ai[], long Rp[], long Rj[], long W[], long RowCount[])
{
    long i; long j; long k; long p; long cp; long p1; long p2; long pdest; long pj;
    for (i = 0 ; i < n_row ; i++)
    {
 W [i] = 0 ;
    }
    for (k = 0 ; k < nz ; k++)
    {
 i = Ti [k] ;
 j = Tj [k] ;
 if (i < 0 || i >= n_row || j < 0 || j >= n_col)
 {
     return ((-8)) ;
 }
 W [i]++ ;
    }
    Rp [0] = 0 ;
    for (i = 0 ; i < n_row ; i++)
    {
 Rp [i+1] = Rp [i] + W [i] ;
 W [i] = Rp [i] ;
    }
    for (k = 0 ; k < nz ; k++)
    {
 p = W [Ti [k]]++ ;
 Rj [p] = Tj [k] ;
    }
    for (j = 0 ; j < n_col ; j++)
    {
 W [j] = (-1) ;
    }
    for (i = 0 ; i < n_row ; i++)
    {
 p1 = Rp [i] ;
 p2 = Rp [i+1] ;
 pdest = p1 ;
 for (p = p1 ; p < p2 ; p++)
 {
     j = Rj [p] ;
     ;
     pj = W [j] ;
     if (pj >= p1)
     {
  ;
  ;
     }
     else
     {
  W [j] = pdest ;
  if (pdest != p)
  {
      Rj [pdest] = j ;
  }
  pdest++ ;
     }
 }
 RowCount [i] = pdest - p1 ;
    }
    for (j = 0 ; j < n_col ; j++)
    {
 W [j] = 0 ;
    }
    for (i = 0 ; i < n_row ; i++)
    {
 for (p = Rp [i] ; p < Rp [i] + RowCount [i] ; p++)
 {
     j = Rj [p] ;
     ;
     W [j]++ ;
 }
    }
    Ap [0] = 0 ;
    for (j = 0 ; j < n_col ; j++)
    {
 Ap [j+1] = Ap [j] + W [j] ;
    }
    for (j = 0 ; j < n_col ; j++)
    {
 W [j] = Ap [j] ;
    }
    for (i = 0 ; i < n_row ; i++)
    {
 for (p = Rp [i] ; p < Rp [i] + RowCount [i] ; p++)
 {
     cp = W [Rj [p]]++ ;
     Ai [cp] = i ;
 }
    }
    return ((0)) ;
}

variable_types: nz long

variable_types:
Ti
long []

variable_types:
Tj
long []

variable_types:
Ap
long []

variable_types:
Ai
long []

variable_types:
Rp
long []

variable_types:
Rj
long []

variable_types:
W
long []

variable_types:
RowCount
long []

variable_types: i long

variable_types: j long

variable_types: k long

variable_types: p long

variable_types: cp long

variable_types: pdest long

variable_types: pj long


decompiled_code:
__int64 __fastcall umfpack_zi_report_matrix(int a1, int a2, _DWORD *a3, __int64 a4, __int64 a5, __int64 a6, double a7, double a8, double a9, double a10, int a11, double *a12)
{
__int64 result; // rax
bool v16; // bl
__int64 v17; // rbx
int v18; // ebp
__int64 v19; // rdx
void (*v20)(const char *, ...); // r11
__int64 v21; // rsi
int v22; // eax
__int64 v23; // rdx
int v24; // ebx
int v25; // er12
__int64 v26; // rcx
int v27; // er14
__int64 v28; // rbp
int v29; // er12
double v30; // xmm0_8
double v31; // xmm1_8
int v33; // [rsp+8h] [rbp-90h]
int v34; // [rsp+Ch] [rbp-8Ch]
__int64 v35; // [rsp+10h] [rbp-88h]
__int64 v36; // [rsp+18h] [rbp-80h]
int v37; // [rsp+18h] [rbp-80h]
const char *v38; // [rsp+20h] [rbp-78h]
const char *v39; // [rsp+28h] [rbp-70h]
int v40; // [rsp+30h] [rbp-68h]
int v41; // [rsp+34h] [rbp-64h]
unsigned __int64 v42; // [rsp+40h] [rbp-58h]
_DWORD *v43; // [rsp+48h] [rbp-50h]
int v44; // [rsp+50h] [rbp-48h]

if ( !a12 )
return 0LL;
v40 = (int)*a12;
result = 0LL;
if ( v40 <= 2 )
return result;
if ( a11 )
{
v33 = a1;
v39 = (const char *)&LC0;
v34 = a2;
v38 = "column";
}
else
{
v33 = a2;
v39 = "column";
v34 = a1;
v38 = (const char *)&LC0;
}
v16 = a1 <= 0 || a2 <= 0;
if ( !amd_printf )
{
if ( !v16 )
{
if ( !a3 )
return 4294967291LL;
v17 = v34;
v18 = a3[v34];
goto LABEL_31;
}
return 4294967290LL;
}
amd_printf("%s-form matrix, n_row %d n_col %d, ", v38, (unsigned int)a1, (unsigned int)a2);
if ( v16 )
{
if ( amd_printf )
{
amd_printf("ERROR: n_row <= 0 or n_col <= 0\n\n");
return 4294967290LL;
}
return 4294967290LL;
}
if ( !a3 )
{
if ( amd_printf )
amd_printf("ERROR: Ap missing\n\n");
return 4294967291LL;
}
v17 = v34;
v18 = a3[v34];
if ( !amd_printf )
{
LABEL_31:
if ( v18 < 0 || *a3 )
return 4294967288LL;
if ( a4 )
{
v20 = 0LL;
if ( v40 != 3 )
goto LABEL_35;
LABEL_24:
if ( v34 <= 0 )
goto LABEL_87;
goto LABEL_15;
}
return 4294967291LL;
}
amd_printf("nz = %d. ", (unsigned int)v18);
if ( v18 < 0 )
{
if ( amd_printf )
amd_printf("ERROR: number of entries < 0\n\n");
return 4294967288LL;
}
v19 = (unsigned int)*a3;
v20 = (void (*)(const char *, ...))amd_printf;
if ( (_DWORD)v19 )
{
if ( amd_printf )
{
amd_printf("ERROR: Ap [%d] = %d must be %d\n\n", 0LL, v19, 0LL);
return 4294967288LL;
}
return 4294967288LL;
}
if ( !a4 )
{
if ( amd_printf )
{
amd_printf("ERROR: Ai missing\n\n");
return 4294967291LL;
}
return 4294967291LL;
}
if ( v40 == 3 )
goto LABEL_24;
if ( !amd_printf )
{
LABEL_35:
if ( v34 <= 0 )
return 0LL;
v20 = 0LL;
goto LABEL_15;
}
amd_printf("\n");
v20 = (void (*)(const char *, ...))amd_printf;
if ( v34 <= 0 )
goto LABEL_85;
LABEL_15:
v21 = 0LL;
do
{
v22 = a3[v21];
if ( v22 < 0 )
{
if ( v20 )
{
v20("ERROR: Ap [%d] < 0\n\n", v21);
return 4294967288LL;
}
return 4294967288LL;
}
if ( v22 > v18 )
{
if ( v20 )
{
v20("ERROR: Ap [%d] > size of Ai\n\n", v21);
return 4294967288LL;
}
return 4294967288LL;
}
++v21;
}
while ( v21 != v17 );
v23 = 0LL;
do
{
if ( a3[v23 + 1] - a3[v23] < 0 )
{
if ( v20 )
{
v20("ERROR: # entries in %s %d is < 0\n\n", v38);
return 4294967288LL;
}
return 4294967288LL;
}
++v23;
}
while ( v23 != v17 );
v43 = a3;
v42 = 0LL;
v35 = a4;
v24 = v40;
while ( 2 )
{
v25 = v43[v42 + 1];
v26 = (unsigned int)v43[v42];
if ( v42 <= 9 )
v24 = v40;
v44 = v25 - v26;
if ( v24 == 3 )
{
if ( (int)v26 < v25 )
break;
LABEL_100:
if ( v34 > (int)v42 + 1 )
goto LABEL_101;
LABEL_84:
if ( v40 == 3 )
{
LABEL_87:
if ( v20 )
{
v20("OK\n\n");
return 0LL;
}
}
else
{
LABEL_85:
if ( v20 )
{
v20(" %s-form matrix ", v38);
v20 = (void (*)(const char *, ...))amd_printf;
goto LABEL_87;
}
}
return 0LL;
}
if ( v20 )
{
v37 = v43[v42];
v20(
"\n %s %d: start: %d end: %d entries: %d\n",
v38,
(unsigned int)v42,
v26,
(unsigned int)(v25 - 1),
(unsigned int)(v25 - v26));
v20 = (void (*)(const char *, ...))amd_printf;
LODWORD(v26) = v37;
}
if ( (int)v26 >= v25 )
{
LABEL_81:
if ( v24 != 4 || (_DWORD)v42 != 9 )
goto LABEL_100;
if ( v34 <= 10 )
goto LABEL_84;
if ( v20 )
{
v20("\n ...\n");
v20 = (void (*)(const char *, ...))amd_printf;
}
v24 = 3;
LABEL_101:
++v42;
continue;
}
break;
}
v27 = -1;
v28 = (int)v26 + 1;
v41 = ~(_DWORD)v26;
v36 = (unsigned int)(v25 - 1 - v26) + (__int64)(int)v26 + 2;
while ( 2 )
{
v29 = v27;
v27 = *(_DWORD *)(v35 + 4 * v28 - 4);
if ( v24 != 3 )
{
if ( v20 )
{
v20("\t%s %d ", v39, (unsigned int)v27);
v20 = (void (*)(const char *, ...))amd_printf;
if ( a5 )
{
if ( amd_printf )
{
amd_printf(":");
v20 = (void (*)(const char *, ...))amd_printf;
}
LABEL_71:
if ( a6 )
{
v30 = *(double *)(a5 + 8 * v28 - 8);
v31 = *(double *)(a6 + 8 * v28 - 8);
}
else
{
v30 = *(double *)(a5 + 16 * v28 - 16);
v31 = *(double *)(a5 + 16 * v28 - 8);
}
if ( v30 == 0.0 )
{
if ( v20 )
{
v20(" (0");
v20 = (void (*)(const char *, ...))amd_printf;
if ( v31 < 0.0 )
goto LABEL_76;
LABEL_53:
if ( v31 == 0.0 )
{
if ( v20 )
{
v20(" + 0i)", v30, v31, 0.0, a10, 0.0, 0.0);
v20 = (void (*)(const char *, ...))amd_printf;
}
}
else if ( v20 )
{
v20(" + %gi)", v31);
v20 = (void (*)(const char *, ...))amd_printf;
}
}
}
else if ( v20 )
{
v20(" (%g");
v20 = (void (*)(const char *, ...))amd_printf;
if ( v31 >= 0.0 )
goto LABEL_53;
LABEL_76:
if ( v20 )
{
v20(" - %gi)", COERCE_DOUBLE(*(_QWORD *)&v31 ^ LC19));
v20 = (void (*)(const char *, ...))amd_printf;
}
}
}
}
else if ( a5 )
{
goto LABEL_71;
}
}
if ( v27 < 0 || v33 <= v27 )
{
if ( !v20 )
return 4294967288LL;
v20(" ERROR: %s index %d out of range in %s %d\n\n", v39, (unsigned int)v27, v38, (unsigned int)v42);
return 4294967288LL;
}
if ( v27 > v29 )
{
if ( v24 != 3 )
{
if ( v20 )
{
v20("\n");
v20 = (void (*)(const char *, ...))amd_printf;
}
if ( v24 == 4 && (_DWORD)v28 + v41 == 9 && v44 > 10 )
{
v24 = 3;
if ( v20 )
{
v20("\t...\n");
v20 = (void (*)(const char *, ...))amd_printf;
}
}
}
if ( v36 == ++v28 )
goto LABEL_81;
continue;
}
break;
}
if ( !v20 )
return 4294967288LL;
v20(" ERROR: %s index %d out of order (or duplicate) in %s %d\n\n", v39, (unsigned int)v27, v38, (unsigned int)v42);
return 4294967288LL;
}

canonical_decompiled_code:
__int64 __fastcall func0(int a1, int a2, _DWORD *a3, __int64 a4, __int64 a5, __int64 a6, double a7, double a8, double a9, double a10, int a11, double *a12)
{
__int64 result; // rax
bool v16; // bl
__int64 v17; // rbx
int v18; // ebp
__int64 v19; // rdx
void (*v20)(const char *, ...); // r11
__int64 v21; // rsi
int v22; // eax
__int64 v23; // rdx
int v24; // ebx
int v25; // er12
__int64 v26; // rcx
int v27; // er14
__int64 v28; // rbp
int v29; // er12
double v30; // xmm0_8
double v31; // xmm1_8
int v33; // [rsp+8h] [rbp-90h]
int v34; // [rsp+Ch] [rbp-8Ch]
__int64 v35; // [rsp+10h] [rbp-88h]
__int64 v36; // [rsp+18h] [rbp-80h]
int v37; // [rsp+18h] [rbp-80h]
const char *v38; // [rsp+20h] [rbp-78h]
const char *v39; // [rsp+28h] [rbp-70h]
int v40; // [rsp+30h] [rbp-68h]
int v41; // [rsp+34h] [rbp-64h]
unsigned __int64 v42; // [rsp+40h] [rbp-58h]
_DWORD *v43; // [rsp+48h] [rbp-50h]
int v44; // [rsp+50h] [rbp-48h]

if ( !a12 )
return 0LL;
v40 = (int)*a12;
result = 0LL;
if ( v40 <= 2 )
return result;
if ( a11 )
{
v33 = a1;
v39 = (const char *)&LC0;
v34 = a2;
v38 = "column";
}
else
{
v33 = a2;
v39 = "column";
v34 = a1;
v38 = (const char *)&LC0;
}
v16 = a1 <= 0 || a2 <= 0;
if ( !amd_printf )
{
if ( !v16 )
{
if ( !a3 )
return 4294967291LL;
v17 = v34;
v18 = a3[v34];
goto LABEL_31;
}
return 4294967290LL;
}
amd_printf("%s-form matrix, n_row %d n_col %d, ", v38, (unsigned int)a1, (unsigned int)a2);
if ( v16 )
{
if ( amd_printf )
{
amd_printf("ERROR: n_row <= 0 or n_col <= 0\n\n");
return 4294967290LL;
}
return 4294967290LL;
}
if ( !a3 )
{
if ( amd_printf )
amd_printf("ERROR: Ap missing\n\n");
return 4294967291LL;
}
v17 = v34;
v18 = a3[v34];
if ( !amd_printf )
{
LABEL_31:
if ( v18 < 0 || *a3 )
return 4294967288LL;
if ( a4 )
{
v20 = 0LL;
if ( v40 != 3 )
goto LABEL_35;
LABEL_24:
if ( v34 <= 0 )
goto LABEL_87;
goto LABEL_15;
}
return 4294967291LL;
}
amd_printf("nz = %d. ", (unsigned int)v18);
if ( v18 < 0 )
{
if ( amd_printf )
amd_printf("ERROR: number of entries < 0\n\n");
return 4294967288LL;
}
v19 = (unsigned int)*a3;
v20 = (void (*)(const char *, ...))amd_printf;
if ( (_DWORD)v19 )
{
if ( amd_printf )
{
amd_printf("ERROR: Ap [%d] = %d must be %d\n\n", 0LL, v19, 0LL);
return 4294967288LL;
}
return 4294967288LL;
}
if ( !a4 )
{
if ( amd_printf )
{
amd_printf("ERROR: Ai missing\n\n");
return 4294967291LL;
}
return 4294967291LL;
}
if ( v40 == 3 )
goto LABEL_24;
if ( !amd_printf )
{
LABEL_35:
if ( v34 <= 0 )
return 0LL;
v20 = 0LL;
goto LABEL_15;
}
amd_printf("\n");
v20 = (void (*)(const char *, ...))amd_printf;
if ( v34 <= 0 )
goto LABEL_85;
LABEL_15:
v21 = 0LL;
do
{
v22 = a3[v21];
if ( v22 < 0 )
{
if ( v20 )
{
v20("ERROR: Ap [%d] < 0\n\n", v21);
return 4294967288LL;
}
return 4294967288LL;
}
if ( v22 > v18 )
{
if ( v20 )
{
v20("ERROR: Ap [%d] > size of Ai\n\n", v21);
return 4294967288LL;
}
return 4294967288LL;
}
++v21;
}
while ( v21 != v17 );
v23 = 0LL;
do
{
if ( a3[v23 + 1] - a3[v23] < 0 )
{
if ( v20 )
{
v20("ERROR: # entries in %s %d is < 0\n\n", v38);
return 4294967288LL;
}
return 4294967288LL;
}
++v23;
}
while ( v23 != v17 );
v43 = a3;
v42 = 0LL;
v35 = a4;
v24 = v40;
while ( 2 )
{
v25 = v43[v42 + 1];
v26 = (unsigned int)v43[v42];
if ( v42 <= 9 )
v24 = v40;
v44 = v25 - v26;
if ( v24 == 3 )
{
if ( (int)v26 < v25 )
break;
LABEL_100:
if ( v34 > (int)v42 + 1 )
goto LABEL_101;
LABEL_84:
if ( v40 == 3 )
{
LABEL_87:
if ( v20 )
{
v20("OK\n\n");
return 0LL;
}
}
else
{
LABEL_85:
if ( v20 )
{
v20(" %s-form matrix ", v38);
v20 = (void (*)(const char *, ...))amd_printf;
goto LABEL_87;
}
}
return 0LL;
}
if ( v20 )
{
v37 = v43[v42];
v20(
"\n %s %d: start: %d end: %d entries: %d\n",
v38,
(unsigned int)v42,
v26,
(unsigned int)(v25 - 1),
(unsigned int)(v25 - v26));
v20 = (void (*)(const char *, ...))amd_printf;
LODWORD(v26) = v37;
}
if ( (int)v26 >= v25 )
{
LABEL_81:
if ( v24 != 4 || (_DWORD)v42 != 9 )
goto LABEL_100;
if ( v34 <= 10 )
goto LABEL_84;
if ( v20 )
{
v20("\n ...\n");
v20 = (void (*)(const char *, ...))amd_printf;
}
v24 = 3;
LABEL_101:
++v42;
continue;
}
break;
}
v27 = -1;
v28 = (int)v26 + 1;
v41 = ~(_DWORD)v26;
v36 = (unsigned int)(v25 - 1 - v26) + (__int64)(int)v26 + 2;
while ( 2 )
{
v29 = v27;
v27 = *(_DWORD *)(v35 + 4 * v28 - 4);
if ( v24 != 3 )
{
if ( v20 )
{
v20("\t%s %d ", v39, (unsigned int)v27);
v20 = (void (*)(const char *, ...))amd_printf;
if ( a5 )
{
if ( amd_printf )
{
amd_printf(":");
v20 = (void (*)(const char *, ...))amd_printf;
}
LABEL_71:
if ( a6 )
{
v30 = *(double *)(a5 + 8 * v28 - 8);
v31 = *(double *)(a6 + 8 * v28 - 8);
}
else
{
v30 = *(double *)(a5 + 16 * v28 - 16);
v31 = *(double *)(a5 + 16 * v28 - 8);
}
if ( v30 == 0.0 )
{
if ( v20 )
{
v20(" (0");
v20 = (void (*)(const char *, ...))amd_printf;
if ( v31 < 0.0 )
goto LABEL_76;
LABEL_53:
if ( v31 == 0.0 )
{
if ( v20 )
{
v20(" + 0i)", v30, v31, 0.0, a10, 0.0, 0.0);
v20 = (void (*)(const char *, ...))amd_printf;
}
}
else if ( v20 )
{
v20(" + %gi)", v31);
v20 = (void (*)(const char *, ...))amd_printf;
}
}
}
else if ( v20 )
{
v20(" (%g");
v20 = (void (*)(const char *, ...))amd_printf;
if ( v31 >= 0.0 )
goto LABEL_53;
LABEL_76:
if ( v20 )
{
v20(" - %gi)", COERCE_DOUBLE(*(_QWORD *)&v31 ^ LC19));
v20 = (void (*)(const char *, ...))amd_printf;
}
}
}
}
else if ( a5 )
{
goto LABEL_71;
}
}
if ( v27 < 0 || v33 <= v27 )
{
if ( !v20 )
return 4294967288LL;
v20(" ERROR: %s index %d out of range in %s %d\n\n", v39, (unsigned int)v27, v38, (unsigned int)v42);
return 4294967288LL;
}
if ( v27 > v29 )
{
if ( v24 != 3 )
{
if ( v20 )
{
v20("\n");
v20 = (void (*)(const char *, ...))amd_printf;
}
if ( v24 == 4 && (_DWORD)v28 + v41 == 9 && v44 > 10 )
{
v24 = 3;
if ( v20 )
{
v20("\t...\n");
v20 = (void (*)(const char *, ...))amd_printf;
}
}
}
if ( v36 == ++v28 )
goto LABEL_81;
continue;
}
break;
}
if ( !v20 )
return 4294967288LL;
v20(" ERROR: %s index %d out of order (or duplicate) in %s %d\n\n", v39, (unsigned int)v27, v38, (unsigned int)v42);
return 4294967288LL;
}

original_code:
int umfpack_zi_report_matrix
(
    int n_row,
    int n_col,
    const int Ap [ ],
    const int Ai [ ],
    const double Ax [ ],
    const double Az [ ],
    int col_form,
    const double Control [20]
)
{
    DoubleComplex a ;
    int prl, i, k, length, ilast, p, nz, prl1, p1, p2, n, n_i, do_values ;
    char *vector_kind, *index_kind ;
    int split = ((Az) != (double *) ((void *)0)) ;
    prl = ((Control != (double *) ((void *)0)) ? (((Control [0]) != (Control [0])) ? 1 : Control [0]) : 1) ;
    if (prl <= 2)
    {
 return ((0)) ;
    }
    if (col_form)
    {
 vector_kind = "column" ;
 index_kind = "row" ;
 n = n_col ;
 n_i = n_row ;
    }
    else
    {
 vector_kind = "row" ;
 index_kind = "column" ;
 n = n_row ;
 n_i = n_col ;
    }
    { if (amd_printf != ((void *)0)) (void) amd_printf ("%s-form matrix, n_row ""%d"" n_col ""%d"", ", vector_kind, n_row, n_col) ; } ;
    if (n_row <= 0 || n_col <= 0)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: n_row <= 0 or n_col <= 0\n\n") ; } ;
 return ((-6)) ;
    }
    if (!Ap)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Ap missing\n\n") ; } ;
 return ((-5)) ;
    }
    nz = Ap [n] ;
    { if (amd_printf != ((void *)0)) (void) amd_printf ("nz = ""%d"". ", nz) ; } ;
    if (nz < 0)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: number of entries < 0\n\n") ; } ;
 return ((-8)) ;
    }
    if (Ap [0] != 0)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Ap [""%d""] = ""%d"" must be ""%d""\n\n", (int) (0), (Ap [0]), (int) (0)) ; } ;
 return ((-8)) ;
    }
    if (!Ai)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Ai missing\n\n") ; } ;
 return ((-5)) ;
    }
    do_values = Ax != (double *) ((void *)0) ;
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ; } } ;
    for (k = 0 ; k < n ; k++)
    {
 if (Ap [k] < 0)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Ap [""%d""] < 0\n\n", (k)) ; } ;
     return ((-8)) ;
 }
 if (Ap [k] > nz)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Ap [""%d""] > size of Ai\n\n", (k)) ; } ;
     return ((-8)) ;
 }
    }
    for (k = 0 ; k < n ; k++)
    {
 length = Ap [k+1] - Ap [k] ;
 if (length < 0)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: # entries in %s ""%d"" is < 0\n\n", vector_kind, (k)) ; } ;
     return ((-8)) ;
 }
    }
    prl1 = prl ;
    for (k = 0 ; k < n ; k++)
    {
 if (k < 10)
 {
     prl = prl1 ;
 }
 p1 = Ap [k] ;
 p2 = Ap [k+1] ;
 length = p2 - p1 ;
 { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n    %s ""%d"": start: ""%d"" end: ""%d"" entries: ""%d""\n", vector_kind, (k), p1, p2-1, length) ; } ; } } ;
 ilast = (-1) ;
 for (p = p1 ; p < p2 ; p++)
 {
     i = Ai [p] ;
     { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\t%s ""%d"" ", index_kind, (i)) ; } ; } } ;
     if (do_values && prl >= 4)
     {
  { if (amd_printf != ((void *)0)) (void) amd_printf (":") ; } ;
  { if (split) { (a).component [0] = (Ax)[p] ; (a).component [1] = (Az)[p] ; } else { (a) = ((DoubleComplex *)(Ax))[p] ; } } ;
  { if ((((a).component [0]) != 0.)) { { if (amd_printf != ((void *)0)) (void) amd_printf (" (%g", (a).component [0]) ; } ; } else { { if (amd_printf != ((void *)0)) (void) amd_printf (" (0") ; } ; } if ((((a).component [1]) < 0.)) { { if (amd_printf != ((void *)0)) (void) amd_printf (" - %gi)", -(a).component [1]) ; } ; } else if ((((a).component [1]) == 0.)) { { if (amd_printf != ((void *)0)) (void) amd_printf (" + 0i)") ; } ; } else { { if (amd_printf != ((void *)0)) (void) amd_printf (" + %gi)", (a).component [1]) ; } ; } } ;
     }
     if (i < 0 || i >= n_i)
     {
  { if (amd_printf != ((void *)0)) (void) amd_printf (" ERROR: %s index ""%d"" out of range in %s ""%d""\n\n", index_kind, (i), vector_kind, (k)) ; } ;
  return ((-8)) ;
     }
     if (i <= ilast)
     {
  { if (amd_printf != ((void *)0)) (void) amd_printf (" ERROR: %s index ""%d"" out of order (or duplicate) in " "%s ""%d""\n\n", index_kind, (i), vector_kind, (k)) ; } ;
  return ((-8)) ;
     }
     { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ; } } ;
     if (prl == 4 && (p - p1) == 9 && length > 10)
     {
  { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\t...\n") ; } ; } } ;
  prl-- ;
     }
     ilast = i ;
 }
 if (prl == 4 && k == 9 && n > 10)
 {
     { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n    ...\n") ; } ; } } ;
     prl-- ;
 }
    }
    prl = prl1 ;
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("    %s-form matrix ", vector_kind) ; } ; } } ;
    { if (amd_printf != ((void *)0)) (void) amd_printf ("OK\n\n") ; } ;
    return ((0)) ;
}

canonical_original_code:
int umfpack_zi_report_matrix(int n_row, int n_col, int Ap[], int Ai[], double Ax[], double Az[], int col_form, double Control[20])
{
    struct DoubleComplex a;
    int prl; int i; int k; int length; int ilast; int p; int nz; int prl1; int p1; int p2; int n; int n_i; int do_values;
    char *vector_kind; char *index_kind;
    int split = ((Az) != (double *) ((void *)0));
    prl = ((Control != (double *) ((void *)0)) ? (((Control [0]) != (Control [0])) ? 1 : Control [0]) : 1) ;
    if (prl <= 2)
    {
 return ((0)) ;
    }
    if (col_form)
    {
 vector_kind = "column" ;
 index_kind = "row" ;
 n = n_col ;
 n_i = n_row ;
    }
    else
    {
 vector_kind = "row" ;
 index_kind = "column" ;
 n = n_row ;
 n_i = n_col ;
    }
    { if (amd_printf != ((void *)0)) (void) amd_printf ("%s-form matrix, n_row ""%d"" n_col ""%d"", ", vector_kind, n_row, n_col) ; } ;
    if (n_row <= 0 || n_col <= 0)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: n_row <= 0 or n_col <= 0\n\n") ; } ;
 return ((-6)) ;
    }
    if (!Ap)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Ap missing\n\n") ; } ;
 return ((-5)) ;
    }
    nz = Ap [n] ;
    { if (amd_printf != ((void *)0)) (void) amd_printf ("nz = ""%d"". ", nz) ; } ;
    if (nz < 0)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: number of entries < 0\n\n") ; } ;
 return ((-8)) ;
    }
    if (Ap [0] != 0)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Ap [""%d""] = ""%d"" must be ""%d""\n\n", (int) (0), (Ap [0]), (int) (0)) ; } ;
 return ((-8)) ;
    }
    if (!Ai)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Ai missing\n\n") ; } ;
 return ((-5)) ;
    }
    do_values = Ax != (double *) ((void *)0) ;
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ; } } ;
    for (k = 0 ; k < n ; k++)
    {
 if (Ap [k] < 0)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Ap [""%d""] < 0\n\n", (k)) ; } ;
     return ((-8)) ;
 }
 if (Ap [k] > nz)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Ap [""%d""] > size of Ai\n\n", (k)) ; } ;
     return ((-8)) ;
 }
    }
    for (k = 0 ; k < n ; k++)
    {
 length = Ap [k+1] - Ap [k] ;
 if (length < 0)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: # entries in %s ""%d"" is < 0\n\n", vector_kind, (k)) ; } ;
     return ((-8)) ;
 }
    }
    prl1 = prl ;
    for (k = 0 ; k < n ; k++)
    {
 if (k < 10)
 {
     prl = prl1 ;
 }
 p1 = Ap [k] ;
 p2 = Ap [k+1] ;
 length = p2 - p1 ;
 { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n    %s ""%d"": start: ""%d"" end: ""%d"" entries: ""%d""\n", vector_kind, (k), p1, p2-1, length) ; } ; } } ;
 ilast = (-1) ;
 for (p = p1 ; p < p2 ; p++)
 {
     i = Ai [p] ;
     { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\t%s ""%d"" ", index_kind, (i)) ; } ; } } ;
     if (do_values && prl >= 4)
     {
  { if (amd_printf != ((void *)0)) (void) amd_printf (":") ; } ;
  { if (split) { (a).component [0] = (Ax)[p] ; (a).component [1] = (Az)[p] ; } else { (a) = ((struct DoubleComplex *)(Ax))[p] ; } } ;
  { if ((((a).component [0]) != 0.)) { { if (amd_printf != ((void *)0)) (void) amd_printf (" (%g", (a).component [0]) ; } ; } else { { if (amd_printf != ((void *)0)) (void) amd_printf (" (0") ; } ; } if ((((a).component [1]) < 0.)) { { if (amd_printf != ((void *)0)) (void) amd_printf (" - %gi)", -(a).component [1]) ; } ; } else if ((((a).component [1]) == 0.)) { { if (amd_printf != ((void *)0)) (void) amd_printf (" + 0i)") ; } ; } else { { if (amd_printf != ((void *)0)) (void) amd_printf (" + %gi)", (a).component [1]) ; } ; } } ;
     }
     if (i < 0 || i >= n_i)
     {
  { if (amd_printf != ((void *)0)) (void) amd_printf (" ERROR: %s index ""%d"" out of range in %s ""%d""\n\n", index_kind, (i), vector_kind, (k)) ; } ;
  return ((-8)) ;
     }
     if (i <= ilast)
     {
  { if (amd_printf != ((void *)0)) (void) amd_printf (" ERROR: %s index ""%d"" out of order (or duplicate) in " "%s ""%d""\n\n", index_kind, (i), vector_kind, (k)) ; } ;
  return ((-8)) ;
     }
     { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ; } } ;
     if (prl == 4 && (p - p1) == 9 && length > 10)
     {
  { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\t...\n") ; } ; } } ;
  prl-- ;
     }
     ilast = i ;
 }
 if (prl == 4 && k == 9 && n > 10)
 {
     { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n    ...\n") ; } ; } } ;
     prl-- ;
 }
    }
    prl = prl1 ;
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("    %s-form matrix ", vector_kind) ; } ; } } ;
    { if (amd_printf != ((void *)0)) (void) amd_printf ("OK\n\n") ; } ;
    return ((0)) ;
}

variable_types:
Ap
int []

variable_types:
Ai
int []

variable_types:
Ax
double []

variable_types:
Az
double []

variable_types:
Control
double [20]

variable_types: struct DoubleComplex { double component[2]; }

variable_types: prl int

variable_types: i int

variable_types: k int

variable_types: length int

variable_types: ilast int

variable_types: p int

variable_types: nz int

variable_types: n int

variable_types: split int


decompiled_code:
__int64 __fastcall umfpack_dl_report_perm(__int64 a1, __int64 a2, double *a3)
{
unsigned __int64 v3; // r14
bool v5; // cc
__int64 v7; // rdi
__int64 v8; // r15
__int64 v9; // r12

if ( !a3 )
return 0LL;
v3 = (unsigned int)(int)*a3;
if ( v3 <= 2 )
return 0LL;
v5 = a1 <= 0;
v7 = 1LL;
if ( !v5 )
v7 = a1;
v8 = umf_l_malloc(v7, 8LL);
v9 = umf_l_report_perm(a1, a2, v8, v3, 1LL);
umf_l_free(v8);
return v9;
}

canonical_decompiled_code:
__int64 __fastcall func0(__int64 a1, __int64 a2, double *a3)
{
unsigned __int64 v3; // r14
bool v5; // cc
__int64 v7; // rdi
__int64 v8; // r15
__int64 v9; // r12

if ( !a3 )
return 0LL;
v3 = (unsigned int)(int)*a3;
if ( v3 <= 2 )
return 0LL;
v5 = a1 <= 0;
v7 = 1LL;
if ( !v5 )
v7 = a1;
v8 = umf_l_malloc(v7, 8LL);
v9 = umf_l_report_perm(a1, a2, v8, v3, 1LL);
umf_l_free(v8);
return v9;
}

original_code:
long umfpack_dl_report_perm
(
    long np,
    const long Perm [ ],
    const double Control [20]
)
{
    long prl, *W, status ;
    prl = ((Control != (double *) ((void *)0)) ? (((Control [0]) != (Control [0])) ? 1 : Control [0]) : 1) ;
    if (prl <= 2)
    {
 return ((0)) ;
    }
    W = (long *) umf_l_malloc ((((np) > (1)) ? (np) : (1)), sizeof (long)) ;
    status = umf_l_report_perm (np, Perm, W, prl, 1) ;
    (void) umf_l_free ((void *) W) ;
    return (status) ;
}

canonical_original_code:
long umfpack_dl_report_perm(long np, long Perm[], double Control[20])
{
    long prl; long *W; long status;
    prl = ((Control != (double *) ((void *)0)) ? (((Control [0]) != (Control [0])) ? 1 : Control [0]) : 1) ;
    if (prl <= 2)
    {
 return ((0)) ;
    }
    W = (long *) umf_l_malloc ((((np) > (1)) ? (np) : (1)), sizeof (long)) ;
    status = umf_l_report_perm (np, Perm, W, prl, 1) ;
    (void) umf_l_free ((void *) W) ;
    return (status) ;
}

variable_types: np long

variable_types:
Perm
long []

variable_types: prl long

variable_types:
W
long *

variable_types: status long


original_code:
int umfpack_zi_scale
(
    double Xx [ ],
    double Xz [ ],
    const double Bx [ ],
    const double Bz [ ],
    void *NumericHandle
)
{
    NumericType *Numeric ;
    int n, i ;
    double *Rs ;
    int split = ((Xz) != (double *) ((void *)0)) && ((Bz) != (double *) ((void *)0)) ;
    Numeric = (NumericType *) NumericHandle ;
    if (!umfzi_valid_numeric (Numeric))
    {
 return ((-3)) ;
    }
    n = Numeric->n_row ;
    Rs = Numeric->Rs ;
    if (!Xx || !Bx)
    {
 return ((-5)) ;
    }
    if (Rs != (double *) ((void *)0))
    {
 if (Numeric->do_recip)
 {
     if (split)
     {
  for (i = 0 ; i < n ; i++)
  {
      Xx [i] = Bx [i] * Rs [i] ;
      Xz [i] = Bz [i] * Rs [i] ;
  }
     }
     else
     {
  for (i = 0 ; i < n ; i++)
  {
      Xx [2*i ] = Bx [2*i ] * Rs [i] ;
      Xx [2*i+1] = Bx [2*i+1] * Rs [i] ;
  }
     }
 }
 else
 {
     if (split)
     {
  for (i = 0 ; i < n ; i++)
  {
      Xx [i] = Bx [i] / Rs [i] ;
      Xz [i] = Bz [i] / Rs [i] ;
  }
     }
     else
     {
  for (i = 0 ; i < n ; i++)
  {
      Xx [2*i ] = Bx [2*i ] / Rs [i] ;
      Xx [2*i+1] = Bx [2*i+1] / Rs [i] ;
  }
     }
 }
    }
    else
    {
        if (split)
 {
     for (i = 0 ; i < n ; i++)
     {
  Xx [i] = Bx [i] ;
  Xz [i] = Bz [i] ;
     }
 }
 else
 {
     for (i = 0 ; i < n ; i++)
     {
  Xx [2*i ] = Bx [2*i ] ;
  Xx [2*i+1] = Bx [2*i+1] ;
     }
 }
    }
    return ((0)) ;
}

canonical_original_code:
int umfpack_zi_scale(double Xx[], double Xz[], double Bx[], double Bz[], void *NumericHandle)
{
    struct NumericType *Numeric;
    int n; int i;
    double *Rs;
    int split = ((Xz) != (double *) ((void *)0)) && ((Bz) != (double *) ((void *)0));
    Numeric = (struct NumericType *) NumericHandle ;
    if (!umfzi_valid_numeric (Numeric))
    {
 return ((-3)) ;
    }
    n = Numeric->n_row ;
    Rs = Numeric->Rs ;
    if (!Xx || !Bx)
    {
 return ((-5)) ;
    }
    if (Rs != (double *) ((void *)0))
    {
 if (Numeric->do_recip)
 {
     if (split)
     {
  for (i = 0 ; i < n ; i++)
  {
      Xx [i] = Bx [i] * Rs [i] ;
      Xz [i] = Bz [i] * Rs [i] ;
  }
     }
     else
     {
  for (i = 0 ; i < n ; i++)
  {
      Xx [2*i ] = Bx [2*i ] * Rs [i] ;
      Xx [2*i+1] = Bx [2*i+1] * Rs [i] ;
  }
     }
 }
 else
 {
     if (split)
     {
  for (i = 0 ; i < n ; i++)
  {
      Xx [i] = Bx [i] / Rs [i] ;
      Xz [i] = Bz [i] / Rs [i] ;
  }
     }
     else
     {
  for (i = 0 ; i < n ; i++)
  {
      Xx [2*i ] = Bx [2*i ] / Rs [i] ;
      Xx [2*i+1] = Bx [2*i+1] / Rs [i] ;
  }
     }
 }
    }
    else
    {
        if (split)
 {
     for (i = 0 ; i < n ; i++)
     {
  Xx [i] = Bx [i] ;
  Xz [i] = Bz [i] ;
     }
 }
 else
 {
     for (i = 0 ; i < n ; i++)
     {
  Xx [2*i ] = Bx [2*i ] ;
  Xx [2*i+1] = Bx [2*i+1] ;
     }
 }
    }
    return ((0)) ;
}

variable_types:
Xx
double []

variable_types:
Xz
double []

variable_types:
Bx
double []

variable_types:
Bz
double []

variable_types:
NumericHandle
void *

variable_types: struct NumericType { double flops; int scale; int valid; union Unit_union { struct { int size; } header; double xxxxxx; } *Memory; int ihead; int *Rperm; int ulen; struct DoubleComplex { double component[2]; } *D; int do_recip; double *Rs; int n_row; int tail_usage; int maxnrows; } *

variable_types:
Rs
double *

user_defined_types: struct NumericType { double flops; int scale; int valid; union Unit_union *Memory; int ihead; int *Rperm; int ulen; struct DoubleComplex *D; int do_recip; double *Rs; int n_row; int tail_usage; int maxnrows; }


original_code:
long umfdl_mem_alloc_element
(
    NumericType *Numeric,
    long nrows,
    long ncols,
    long **Rows,
    long **Cols,
    double **C,
    long *size,
    Element **epout
)
{
    Element *ep ;
    Unit *p ;
    long i ;
    ;
    ;
    *size = ((((((sizeof (Element) * (1))) + (sizeof (Unit)) - 1) / (sizeof (Unit)))) + (((((sizeof (long) * ((ncols) + (nrows)))) + (sizeof (Unit)) - 1) / (sizeof (Unit)))) + (((((sizeof (double) * ((ncols) * (nrows)))) + (sizeof (Unit)) - 1) / (sizeof (Unit))))) ;
    if (((!((((ceil ((sizeof (Element) * ((double) 1)) / sizeof (Unit))) + (ceil ((sizeof (long) * ((double) (ncols) + (nrows))) / sizeof (Unit))) + (ceil ((sizeof (double) * ((double) (ncols) * (nrows))) / sizeof (Unit)))) + 1) * (1.0+1e-8) <= (double) 0x7fffffffffffffffL)) || ((((ceil ((sizeof (Element) * ((double) 1)) / sizeof (Unit))) + (ceil ((sizeof (long) * ((double) (ncols) + (nrows))) / sizeof (Unit))) + (ceil ((sizeof (double) * ((double) (ncols) * (nrows))) / sizeof (Unit)))) + 1) != (((ceil ((sizeof (Element) * ((double) 1)) / sizeof (Unit))) + (ceil ((sizeof (long) * ((double) (ncols) + (nrows))) / sizeof (Unit))) + (ceil ((sizeof (double) * ((double) (ncols) * (nrows))) / sizeof (Unit)))) + 1))))
    {
 return (0) ;
    }
    i = umfdl_mem_alloc_tail_block (Numeric, *size) ;
    (*size)++ ;
    if (!i)
    {
 ;
 return (0) ;
    }
    p = Numeric->Memory + i ;
    ep = (Element *) p ;
    ;
    p += (((((sizeof (Element) * (1))) + (sizeof (Unit)) - 1) / (sizeof (Unit)))) ;
    *Cols = (long *) p ;
    *Rows = *Cols + ncols ;
    p += (((((sizeof (long) * (ncols + nrows))) + (sizeof (Unit)) - 1) / (sizeof (Unit)))) ;
    *C = (double *) p ;
    ep->nrows = nrows ;
    ep->ncols = ncols ;
    ep->nrowsleft = nrows ;
    ep->ncolsleft = ncols ;
    ep->cdeg = 0 ;
    ep->rdeg = 0 ;
    ep->next = (-1) ;
    ;
    ;
    *epout = ep ;
    return (i) ;
}

canonical_original_code:
long umfdl_mem_alloc_element(struct NumericType *Numeric, long nrows, long ncols, long **Rows, long **Cols, double **C, long *size, struct Element **epout)
{
    struct Element *ep;
    union Unit_union *p;
    long i;
    ;
    ;
    *size = ((((((sizeof (Element) * (1))) + (sizeof (Unit)) - 1) / (sizeof (Unit)))) + (((((sizeof (long) * ((ncols) + (nrows)))) + (sizeof (Unit)) - 1) / (sizeof (Unit)))) + (((((sizeof (double) * ((ncols) * (nrows)))) + (sizeof (Unit)) - 1) / (sizeof (Unit))))) ;
    if (((!((((ceil ((sizeof (Element) * ((double) 1)) / sizeof (Unit))) + (ceil ((sizeof (long) * ((double) (ncols) + (nrows))) / sizeof (Unit))) + (ceil ((sizeof (double) * ((double) (ncols) * (nrows))) / sizeof (Unit)))) + 1) * (1.0+1e-8) <= (double) 0x7fffffffffffffffL)) || ((((ceil ((sizeof (Element) * ((double) 1)) / sizeof (Unit))) + (ceil ((sizeof (long) * ((double) (ncols) + (nrows))) / sizeof (Unit))) + (ceil ((sizeof (double) * ((double) (ncols) * (nrows))) / sizeof (Unit)))) + 1) != (((ceil ((sizeof (Element) * ((double) 1)) / sizeof (Unit))) + (ceil ((sizeof (long) * ((double) (ncols) + (nrows))) / sizeof (Unit))) + (ceil ((sizeof (double) * ((double) (ncols) * (nrows))) / sizeof (Unit)))) + 1))))
    {
 return (0) ;
    }
    i = umfdl_mem_alloc_tail_block (Numeric, *size) ;
    (*size)++ ;
    if (!i)
    {
 ;
 return (0) ;
    }
    p = Numeric->Memory + i ;
    ep = (struct Element *) p ;
    ;
    p += (((((sizeof (Element) * (1))) + (sizeof (Unit)) - 1) / (sizeof (Unit)))) ;
    *Cols = (long *) p ;
    *Rows = *Cols + ncols ;
    p += (((((sizeof (long) * (ncols + nrows))) + (sizeof (Unit)) - 1) / (sizeof (Unit)))) ;
    *C = (double *) p ;
    ep->nrows = nrows ;
    ep->ncols = ncols ;
    ep->nrowsleft = nrows ;
    ep->ncolsleft = ncols ;
    ep->cdeg = 0 ;
    ep->rdeg = 0 ;
    ep->next = (-1) ;
    ;
    ;
    *epout = ep ;
    return (i) ;
}

variable_types: struct NumericType { double flops; long scale; long valid; union Unit_union { struct { long size; } header; double xxxxxx; } *Memory; long ihead; long *Rperm; long ulen; double *D; long do_recip; double *Rs; long n_row; long tail_usage; long maxnrows; } *

variable_types: nrows long

variable_types: ncols long

variable_types:
Rows
long **

variable_types:
Cols
long **

variable_types:
C
double **

variable_types:
size
long *

variable_types:
epout
struct Element { long cdeg; } **

variable_types:
ep
struct Element { long cdeg; } *

variable_types: i long

user_defined_types: struct NumericType { double flops; long scale; long valid; union Unit_union *Memory; long ihead; long *Rperm; long ulen; double *D; long do_recip; double *Rs; long n_row; long tail_usage; long maxnrows; }


original_code:
long umfzl_transpose
(
    long n_row,
    long n_col,
    const long Ap [ ],
    const long Ai [ ],
    const double Ax [ ],
    const long P [ ],
    const long Q [ ],
    long nq,
    long Rp [ ],
    long Ri [ ],
    double Rx [ ],
    long W [ ],
    long check
    , const double Az [ ]
    , double Rz [ ]
    , long do_conjugate
)
{
    long i, j, k, p, bp, newj, do_values ;
    long split ;
    if (check)
    {
 if (!Ai || !Ap || !Ri || !Rp || !W)
 {
     return ((-5)) ;
 }
 if (n_row <= 0 || n_col <= 0)
 {
     return ((-6)) ;
 }
 if (!umf_l_is_permutation (P, W, n_row, n_row) ||
     !umf_l_is_permutation (Q, W, nq, nq))
 {
     return ((-15)) ;
 }
 if (amd_l_valid (n_row, n_col, Ap, Ai) != 0)
 {
     return ((-8)) ;
 }
    }
    for (i = 0 ; i < n_row ; i++)
    {
 W [i] = 0 ;
 Rp [i] = 0 ;
    }
    if (Q != (long *) ((void *)0))
    {
 for (newj = 0 ; newj < nq ; newj++)
 {
     j = Q [newj] ;
     ;
     for (p = Ap [j] ; p < Ap [j+1] ; p++)
     {
  i = Ai [p] ;
  ;
  W [i]++ ;
     }
 }
    }
    else
    {
 for (j = 0 ; j < n_col ; j++)
 {
     for (p = Ap [j] ; p < Ap [j+1] ; p++)
     {
  i = Ai [p] ;
  ;
  W [i]++ ;
     }
 }
    }
    if (P != (long *) ((void *)0))
    {
 Rp [0] = 0 ;
 for (k = 0 ; k < n_row ; k++)
 {
     i = P [k] ;
     ;
     Rp [k+1] = Rp [k] + W [i] ;
 }
 for (k = 0 ; k < n_row ; k++)
 {
     i = P [k] ;
     ;
     W [i] = Rp [k] ;
 }
    }
    else
    {
 Rp [0] = 0 ;
 for (i = 0 ; i < n_row ; i++)
 {
     Rp [i+1] = Rp [i] + W [i] ;
 }
 for (i = 0 ; i < n_row ; i++)
 {
     W [i] = Rp [i] ;
 }
    }
    ;
    do_values = Ax && Rx ;
    split = ((Az) != (double *) ((void *)0)) && ((Rz) != (double *) ((void *)0)) ;
    if (do_conjugate && do_values)
    {
 if (Q != (long *) ((void *)0))
 {
     if (split)
     {
  for (newj = 0 ; newj < nq ; newj++)
  {
      j = Q [newj] ;
      ;
      for (p = Ap [j] ; p < Ap [j+1] ; p++)
      {
   bp = W [Ai [p]]++ ;
   Ri [bp] = newj ;
   Rx [bp] = Ax [p] ;
   Rz [bp] = -Az [p] ;
      }
  }
     }
     else
     {
  for (newj = 0 ; newj < nq ; newj++)
  {
      j = Q [newj] ;
      ;
      for (p = Ap [j] ; p < Ap [j+1] ; p++)
      {
   bp = W [Ai [p]]++ ;
   Ri [bp] = newj ;
   Rx [2*bp] = Ax [2*p] ;
   Rx [2*bp+1] = -Ax [2*p+1] ;
      }
  }
     }
 }
 else
 {
     if (split)
     {
  for (j = 0 ; j < n_col ; j++)
  {
      for (p = Ap [j] ; p < Ap [j+1] ; p++)
      {
   bp = W [Ai [p]]++ ;
   Ri [bp] = j ;
   Rx [bp] = Ax [p] ;
   Rz [bp] = -Az [p] ;
      }
  }
     }
     else
     {
  for (j = 0 ; j < n_col ; j++)
  {
      for (p = Ap [j] ; p < Ap [j+1] ; p++)
      {
   bp = W [Ai [p]]++ ;
   Ri [bp] = j ;
   Rx [2*bp] = Ax [2*p] ;
   Rx [2*bp+1] = -Ax [2*p+1] ;
      }
  }
     }
 }
    }
    else
    {
 if (Q != (long *) ((void *)0))
 {
     if (do_values)
     {
  if (split)
  {
      for (newj = 0 ; newj < nq ; newj++)
      {
   j = Q [newj] ;
   ;
   for (p = Ap [j] ; p < Ap [j+1] ; p++)
   {
       bp = W [Ai [p]]++ ;
       Ri [bp] = newj ;
       Rx [bp] = Ax [p] ;
       Rz [bp] = Az [p] ;
   }
      }
  }
  else
  {
      for (newj = 0 ; newj < nq ; newj++)
      {
   j = Q [newj] ;
   ;
   for (p = Ap [j] ; p < Ap [j+1] ; p++)
   {
       bp = W [Ai [p]]++ ;
       Ri [bp] = newj ;
       Rx [2*bp] = Ax [2*p] ;
       Rx [2*bp+1] = Ax [2*p+1] ;
   }
      }
  }
     }
     else
     {
  for (newj = 0 ; newj < nq ; newj++)
  {
      j = Q [newj] ;
      ;
      for (p = Ap [j] ; p < Ap [j+1] ; p++)
      {
   Ri [W [Ai [p]]++] = newj ;
      }
  }
     }
 }
 else
 {
     if (do_values)
     {
  if (split)
  {
      for (j = 0 ; j < n_col ; j++)
      {
   for (p = Ap [j] ; p < Ap [j+1] ; p++)
   {
       bp = W [Ai [p]]++ ;
       Ri [bp] = j ;
       Rx [bp] = Ax [p] ;
       Rz [bp] = Az [p] ;
   }
      }
  }
  else
  {
      for (j = 0 ; j < n_col ; j++)
      {
   for (p = Ap [j] ; p < Ap [j+1] ; p++)
   {
       bp = W [Ai [p]]++ ;
       Ri [bp] = j ;
       Rx [2*bp] = Ax [2*p] ;
       Rx [2*bp+1] = Ax [2*p+1] ;
   }
      }
  }
     }
     else
     {
  for (j = 0 ; j < n_col ; j++)
  {
      for (p = Ap [j] ; p < Ap [j+1] ; p++)
      {
   Ri [W [Ai [p]]++] = j ;
      }
  }
     }
 }
    }
    return ((0)) ;
}

canonical_original_code:
long umfzl_transpose(long n_row, long n_col, long Ap[], long Ai[], double Ax[], long P[], long Q[], long nq, long Rp[], long Ri[], double Rx[], long W[], long check, double Az[], double Rz[], long do_conjugate)
{
    long i; long j; long k; long p; long bp; long newj; long do_values;
    long split;
    if (check)
    {
 if (!Ai || !Ap || !Ri || !Rp || !W)
 {
     return ((-5)) ;
 }
 if (n_row <= 0 || n_col <= 0)
 {
     return ((-6)) ;
 }
 if (!umf_l_is_permutation (P, W, n_row, n_row) ||
     !umf_l_is_permutation (Q, W, nq, nq))
 {
     return ((-15)) ;
 }
 if (amd_l_valid (n_row, n_col, Ap, Ai) != 0)
 {
     return ((-8)) ;
 }
    }
    for (i = 0 ; i < n_row ; i++)
    {
 W [i] = 0 ;
 Rp [i] = 0 ;
    }
    if (Q != (long *) ((void *)0))
    {
 for (newj = 0 ; newj < nq ; newj++)
 {
     j = Q [newj] ;
     ;
     for (p = Ap [j] ; p < Ap [j+1] ; p++)
     {
  i = Ai [p] ;
  ;
  W [i]++ ;
     }
 }
    }
    else
    {
 for (j = 0 ; j < n_col ; j++)
 {
     for (p = Ap [j] ; p < Ap [j+1] ; p++)
     {
  i = Ai [p] ;
  ;
  W [i]++ ;
     }
 }
    }
    if (P != (long *) ((void *)0))
    {
 Rp [0] = 0 ;
 for (k = 0 ; k < n_row ; k++)
 {
     i = P [k] ;
     ;
     Rp [k+1] = Rp [k] + W [i] ;
 }
 for (k = 0 ; k < n_row ; k++)
 {
     i = P [k] ;
     ;
     W [i] = Rp [k] ;
 }
    }
    else
    {
 Rp [0] = 0 ;
 for (i = 0 ; i < n_row ; i++)
 {
     Rp [i+1] = Rp [i] + W [i] ;
 }
 for (i = 0 ; i < n_row ; i++)
 {
     W [i] = Rp [i] ;
 }
    }
    ;
    do_values = Ax && Rx ;
    split = ((Az) != (double *) ((void *)0)) && ((Rz) != (double *) ((void *)0)) ;
    if (do_conjugate && do_values)
    {
 if (Q != (long *) ((void *)0))
 {
     if (split)
     {
  for (newj = 0 ; newj < nq ; newj++)
  {
      j = Q [newj] ;
      ;
      for (p = Ap [j] ; p < Ap [j+1] ; p++)
      {
   bp = W [Ai [p]]++ ;
   Ri [bp] = newj ;
   Rx [bp] = Ax [p] ;
   Rz [bp] = -Az [p] ;
      }
  }
     }
     else
     {
  for (newj = 0 ; newj < nq ; newj++)
  {
      j = Q [newj] ;
      ;
      for (p = Ap [j] ; p < Ap [j+1] ; p++)
      {
   bp = W [Ai [p]]++ ;
   Ri [bp] = newj ;
   Rx [2*bp] = Ax [2*p] ;
   Rx [2*bp+1] = -Ax [2*p+1] ;
      }
  }
     }
 }
 else
 {
     if (split)
     {
  for (j = 0 ; j < n_col ; j++)
  {
      for (p = Ap [j] ; p < Ap [j+1] ; p++)
      {
   bp = W [Ai [p]]++ ;
   Ri [bp] = j ;
   Rx [bp] = Ax [p] ;
   Rz [bp] = -Az [p] ;
      }
  }
     }
     else
     {
  for (j = 0 ; j < n_col ; j++)
  {
      for (p = Ap [j] ; p < Ap [j+1] ; p++)
      {
   bp = W [Ai [p]]++ ;
   Ri [bp] = j ;
   Rx [2*bp] = Ax [2*p] ;
   Rx [2*bp+1] = -Ax [2*p+1] ;
      }
  }
     }
 }
    }
    else
    {
 if (Q != (long *) ((void *)0))
 {
     if (do_values)
     {
  if (split)
  {
      for (newj = 0 ; newj < nq ; newj++)
      {
   j = Q [newj] ;
   ;
   for (p = Ap [j] ; p < Ap [j+1] ; p++)
   {
       bp = W [Ai [p]]++ ;
       Ri [bp] = newj ;
       Rx [bp] = Ax [p] ;
       Rz [bp] = Az [p] ;
   }
      }
  }
  else
  {
      for (newj = 0 ; newj < nq ; newj++)
      {
   j = Q [newj] ;
   ;
   for (p = Ap [j] ; p < Ap [j+1] ; p++)
   {
       bp = W [Ai [p]]++ ;
       Ri [bp] = newj ;
       Rx [2*bp] = Ax [2*p] ;
       Rx [2*bp+1] = Ax [2*p+1] ;
   }
      }
  }
     }
     else
     {
  for (newj = 0 ; newj < nq ; newj++)
  {
      j = Q [newj] ;
      ;
      for (p = Ap [j] ; p < Ap [j+1] ; p++)
      {
   Ri [W [Ai [p]]++] = newj ;
      }
  }
     }
 }
 else
 {
     if (do_values)
     {
  if (split)
  {
      for (j = 0 ; j < n_col ; j++)
      {
   for (p = Ap [j] ; p < Ap [j+1] ; p++)
   {
       bp = W [Ai [p]]++ ;
       Ri [bp] = j ;
       Rx [bp] = Ax [p] ;
       Rz [bp] = Az [p] ;
   }
      }
  }
  else
  {
      for (j = 0 ; j < n_col ; j++)
      {
   for (p = Ap [j] ; p < Ap [j+1] ; p++)
   {
       bp = W [Ai [p]]++ ;
       Ri [bp] = j ;
       Rx [2*bp] = Ax [2*p] ;
       Rx [2*bp+1] = Ax [2*p+1] ;
   }
      }
  }
     }
     else
     {
  for (j = 0 ; j < n_col ; j++)
  {
      for (p = Ap [j] ; p < Ap [j+1] ; p++)
      {
   Ri [W [Ai [p]]++] = j ;
      }
  }
     }
 }
    }
    return ((0)) ;
}

variable_types:
Ap
long []

variable_types:
Ai
long []

variable_types:
Ax
double []

variable_types:
P
long []

variable_types:
Q
long []

variable_types: nq long

variable_types:
Rp
long []

variable_types:
Ri
long []

variable_types:
Rx
double []

variable_types:
W
long []

variable_types: check long

variable_types:
Az
double []

variable_types:
Rz
double []

variable_types: j long

variable_types: k long

variable_types: p long

variable_types: bp long

variable_types: newj long

variable_types: split long