original_code:
long umfpack_zl_report_symbolic
(
    void *SymbolicHandle,
    const double Control [20]
)
{
    long n_row, n_col, nz, nchains, nfr, maxnrows, maxncols, prl,
 k, chain, frontid, frontid1, frontid2, kk, *Chain_start, *W,
 *Chain_maxrows, *Chain_maxcols, *Front_npivcol, *Front_1strow,
 *Front_leftmostdesc, *Front_parent, done, status1, status2 ;
    SymbolicType *Symbolic ;
    prl = ((Control != (double *) ((void *)0)) ? (((Control [0]) != (Control [0])) ? 1 : Control [0]) : 1) ;
    if (prl <= 2)
    {
 return ((0)) ;
    }
    { if (amd_printf != ((void *)0)) (void) amd_printf ("Symbolic object: ") ; } ;
    Symbolic = (SymbolicType *) SymbolicHandle ;
    if (!umfzl_valid_symbolic (Symbolic))
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: invalid\n") ; } ;
 return ((-4)) ;
    }
    n_row = Symbolic->n_row ;
    n_col = Symbolic->n_col ;
    nz = Symbolic->nz ;
    nchains = Symbolic->nchains ;
    nfr = Symbolic->nfr ;
    maxnrows = Symbolic->maxnrows ;
    maxncols = Symbolic->maxncols ;
    Chain_start = Symbolic->Chain_start ;
    Chain_maxrows = Symbolic->Chain_maxrows ;
    Chain_maxcols = Symbolic->Chain_maxcols ;
    Front_npivcol = Symbolic->Front_npivcol ;
    Front_1strow = Symbolic->Front_1strow ;
    Front_leftmostdesc = Symbolic->Front_leftmostdesc ;
    Front_parent = Symbolic->Front_parent ;
    if (prl >= 4)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\n    matrix to be factorized:\n") ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\tn_row: ""%" "ld"" n_col: ""%" "ld""\n", n_row, n_col) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\tnumber of entries: ""%" "ld""\n", nz) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("    block size used for dense matrix kernels:   ""%" "ld""\n", Symbolic->nb) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("    strategy used:                              ") ; } ;
 if (Symbolic->strategy == 3)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("symmetric\n") ; } ;
            { if (amd_printf != ((void *)0)) (void) amd_printf ("    ordering used:                              ") ; } ;
            if (Symbolic->ordering == 1)
            {
                { if (amd_printf != ((void *)0)) (void) amd_printf ("amd on A\n") ; } ;
            }
            else if (Symbolic->ordering == 2)
            {
                { if (amd_printf != ((void *)0)) (void) amd_printf ("user permutation") ; } ;
            }
            else if (Symbolic->ordering == 6)
            {
                { if (amd_printf != ((void *)0)) (void) amd_printf ("user function") ; } ;
            }
            else if (Symbolic->ordering == 3)
            {
                { if (amd_printf != ((void *)0)) (void) amd_printf ("metis on A") ; } ;
            }
 }
 else
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("unsymmetric\n") ; } ;
            { if (amd_printf != ((void *)0)) (void) amd_printf ("    ordering used:                              ") ; } ;
            if (Symbolic->ordering == 1)
            {
                { if (amd_printf != ((void *)0)) (void) amd_printf ("colamd on A\n") ; } ;
            }
            else if (Symbolic->ordering == 2)
            {
                { if (amd_printf != ((void *)0)) (void) amd_printf ("user permutation") ; } ;
            }
            else if (Symbolic->ordering == 6)
            {
                { if (amd_printf != ((void *)0)) (void) amd_printf ("user function") ; } ;
            }
            else if (Symbolic->ordering == 3)
            {
                { if (amd_printf != ((void *)0)) (void) amd_printf ("metis on A'A") ; } ;
            }
 }
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("    performn column etree postorder:            ") ; } ;
 if (Symbolic->fixQ)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("no\n") ; } ;
 }
 else
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("yes\n") ; } ;
 }
 { if (amd_printf != ((void *)0)) (void) amd_printf ("    prefer diagonal pivoting (attempt P=Q):     ") ; } ;
 if (Symbolic->prefer_diagonal)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("yes\n") ; } ;
 }
 else
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("no\n") ; } ;
 }
 { if (amd_printf != ((void *)0)) (void) amd_printf ("    variable-size part of Numeric object:\n") ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\tminimum initial size (Units): %.20g  (MBytes): %.1f\n", Symbolic->dnum_mem_init_usage, (((Symbolic->dnum_mem_init_usage) * sizeof (Unit)) / 1048576.0)) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\testimated peak size (Units):  %.20g  (MBytes): %.1f\n", Symbolic->num_mem_usage_est, (((Symbolic->num_mem_usage_est) * sizeof (Unit)) / 1048576.0)) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\testimated final size (Units): %.20g  (MBytes): %.1f\n", Symbolic->num_mem_size_est, (((Symbolic->num_mem_size_est) * sizeof (Unit)) / 1048576.0)) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("    symbolic factorization memory usage (Units):" " %.20g  (MBytes): %.1f\n", Symbolic->peak_sym_usage, (((Symbolic->peak_sym_usage) * sizeof (Unit)) / 1048576.0)) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("    frontal matrices / supercolumns:\n") ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\tnumber of frontal chains: ""%" "ld""\n", nchains) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\tnumber of frontal matrices: ""%" "ld""\n", nfr) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\tlargest frontal matrix row dimension: ""%" "ld""\n", maxnrows) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\tlargest frontal matrix column dimension: ""%" "ld""\n",maxncols) ; };
    }
    k = 0 ;
    done = (0) ;
    for (chain = 0 ; chain < nchains ; chain++)
    {
 frontid1 = Chain_start [chain] ;
 frontid2 = Chain_start [chain+1] - 1 ;
 { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n    Frontal chain: ""%" "ld"".  Frontal matrices ""%" "ld"" to ""%" "ld""\n", (chain), (frontid1), (frontid2)) ; } ; } } ;
 { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\tLargest frontal matrix in Frontal chain: ""%" "ld""-by-""%" "ld""\n", Chain_maxrows [chain], Chain_maxcols [chain]) ; } ; } } ;
 for (frontid = frontid1 ; frontid <= frontid2 ; frontid++)
 {
     kk = Front_npivcol [frontid] ;
     { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\tFront: ""%" "ld""  pivot cols: ""%" "ld"" (pivot columns ""%" "ld"" to " "%" "ld"")\n", (frontid), kk, (k), (k+kk-1)) ; } ; } } ;
     { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\t    pivot row candidates: ""%" "ld"" to ""%" "ld""\n", (Front_1strow [Front_leftmostdesc [frontid]]), (Front_1strow [frontid+1]-1)) ; } ; } } ;
     { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\t    leftmost descendant: ""%" "ld""\n", (Front_leftmostdesc [frontid])) ; } ; } } ;
     { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\t    1st new candidate row : ""%" "ld""\n", (Front_1strow [frontid])) ; } ; } } ;
     { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\t    parent:") ; } ; } } ;
     if (Front_parent [frontid] == (-1))
     {
  { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf (" (none)\n") ; } ; } } ;
     }
     else
     {
  { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf (" ""%" "ld""\n", (Front_parent [frontid])) ; } ; } } ;
     }
     done = (frontid == 20 && frontid < nfr-1 && prl == 4) ;
     if (done)
     {
  { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\t...\n") ; } ; } } ;
  break ;
     }
     k += kk ;
 }
 if (Front_npivcol [nfr] != 0)
 {
     { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\tFront: ""%" "ld"" placeholder for ""%" "ld"" empty columns\n", (nfr), Front_npivcol [nfr]) ; } ; } } ;
 }
 if (done)
 {
     break ;
 }
    }
    W = (long *) umf_l_malloc ((((n_row) > (n_col)) ? (n_row) : (n_col)), sizeof (long)) ;
    if (!W)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: out of memory to check Symbolic object\n\n") ; } ;
 return ((-1)) ;
    }
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\nInitial column permutation, Q1: ") ; } ; } } ;
    status1 = umf_l_report_perm (n_col, Symbolic->Cperm_init, W, prl, 0) ;
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\nInitial row permutation, P1: ") ; } ; } } ;
    status2 = umf_l_report_perm (n_row, Symbolic->Rperm_init, W, prl, 0) ;
    (void) umf_l_free ((void *) W) ;
    if (status1 != (0) || status2 != (0))
    {
 return ((-4)) ;
    }
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("    Symbolic object:  ") ; } ; } } ;
    { if (amd_printf != ((void *)0)) (void) amd_printf ("OK\n\n") ; } ;
    return ((0)) ;
}

canonical_original_code:
long umfpack_zl_report_symbolic(void *SymbolicHandle, double Control[20])
{
    long n_row; long n_col; long nz; long nchains; long nfr; long maxnrows; long maxncols; long prl; long k; long chain; long frontid; long frontid1; long frontid2; long kk; long *Chain_start; long *W; long *Chain_maxrows; long *Chain_maxcols; long *Front_npivcol; long *Front_1strow; long *Front_leftmostdesc; long *Front_parent; long done; long status1; long status2;
    struct SymbolicType *Symbolic;
    prl = ((Control != (double *) ((void *)0)) ? (((Control [0]) != (Control [0])) ? 1 : Control [0]) : 1) ;
    if (prl <= 2)
    {
 return ((0)) ;
    }
    { if (amd_printf != ((void *)0)) (void) amd_printf ("Symbolic object: ") ; } ;
    Symbolic = (struct SymbolicType *) SymbolicHandle ;
    if (!umfzl_valid_symbolic (Symbolic))
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: invalid\n") ; } ;
 return ((-4)) ;
    }
    n_row = Symbolic->n_row ;
    n_col = Symbolic->n_col ;
    nz = Symbolic->nz ;
    nchains = Symbolic->nchains ;
    nfr = Symbolic->nfr ;
    maxnrows = Symbolic->maxnrows ;
    maxncols = Symbolic->maxncols ;
    Chain_start = Symbolic->Chain_start ;
    Chain_maxrows = Symbolic->Chain_maxrows ;
    Chain_maxcols = Symbolic->Chain_maxcols ;
    Front_npivcol = Symbolic->Front_npivcol ;
    Front_1strow = Symbolic->Front_1strow ;
    Front_leftmostdesc = Symbolic->Front_leftmostdesc ;
    Front_parent = Symbolic->Front_parent ;
    if (prl >= 4)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\n    matrix to be factorized:\n") ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\tn_row: ""%" "ld"" n_col: ""%" "ld""\n", n_row, n_col) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\tnumber of entries: ""%" "ld""\n", nz) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("    block size used for dense matrix kernels:   ""%" "ld""\n", Symbolic->nb) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("    strategy used:                              ") ; } ;
 if (Symbolic->strategy == 3)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("symmetric\n") ; } ;
            { if (amd_printf != ((void *)0)) (void) amd_printf ("    ordering used:                              ") ; } ;
            if (Symbolic->ordering == 1)
            {
                { if (amd_printf != ((void *)0)) (void) amd_printf ("amd on A\n") ; } ;
            }
            else if (Symbolic->ordering == 2)
            {
                { if (amd_printf != ((void *)0)) (void) amd_printf ("user permutation") ; } ;
            }
            else if (Symbolic->ordering == 6)
            {
                { if (amd_printf != ((void *)0)) (void) amd_printf ("user function") ; } ;
            }
            else if (Symbolic->ordering == 3)
            {
                { if (amd_printf != ((void *)0)) (void) amd_printf ("metis on A") ; } ;
            }
 }
 else
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("unsymmetric\n") ; } ;
            { if (amd_printf != ((void *)0)) (void) amd_printf ("    ordering used:                              ") ; } ;
            if (Symbolic->ordering == 1)
            {
                { if (amd_printf != ((void *)0)) (void) amd_printf ("colamd on A\n") ; } ;
            }
            else if (Symbolic->ordering == 2)
            {
                { if (amd_printf != ((void *)0)) (void) amd_printf ("user permutation") ; } ;
            }
            else if (Symbolic->ordering == 6)
            {
                { if (amd_printf != ((void *)0)) (void) amd_printf ("user function") ; } ;
            }
            else if (Symbolic->ordering == 3)
            {
                { if (amd_printf != ((void *)0)) (void) amd_printf ("metis on A'A") ; } ;
            }
 }
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("    performn column etree postorder:            ") ; } ;
 if (Symbolic->fixQ)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("no\n") ; } ;
 }
 else
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("yes\n") ; } ;
 }
 { if (amd_printf != ((void *)0)) (void) amd_printf ("    prefer diagonal pivoting (attempt P=Q):     ") ; } ;
 if (Symbolic->prefer_diagonal)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("yes\n") ; } ;
 }
 else
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("no\n") ; } ;
 }
 { if (amd_printf != ((void *)0)) (void) amd_printf ("    variable-size part of Numeric object:\n") ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\tminimum initial size (Units): %.20g  (MBytes): %.1f\n", Symbolic->dnum_mem_init_usage, (((Symbolic->dnum_mem_init_usage) * sizeof (Unit)) / 1048576.0)) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\testimated peak size (Units):  %.20g  (MBytes): %.1f\n", Symbolic->num_mem_usage_est, (((Symbolic->num_mem_usage_est) * sizeof (Unit)) / 1048576.0)) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\testimated final size (Units): %.20g  (MBytes): %.1f\n", Symbolic->num_mem_size_est, (((Symbolic->num_mem_size_est) * sizeof (Unit)) / 1048576.0)) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("    symbolic factorization memory usage (Units):" " %.20g  (MBytes): %.1f\n", Symbolic->peak_sym_usage, (((Symbolic->peak_sym_usage) * sizeof (Unit)) / 1048576.0)) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("    frontal matrices / supercolumns:\n") ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\tnumber of frontal chains: ""%" "ld""\n", nchains) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\tnumber of frontal matrices: ""%" "ld""\n", nfr) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\tlargest frontal matrix row dimension: ""%" "ld""\n", maxnrows) ; } ;
 { if (amd_printf != ((void *)0)) (void) amd_printf ("\tlargest frontal matrix column dimension: ""%" "ld""\n",maxncols) ; };
    }
    k = 0 ;
    done = (0) ;
    for (chain = 0 ; chain < nchains ; chain++)
    {
 frontid1 = Chain_start [chain] ;
 frontid2 = Chain_start [chain+1] - 1 ;
 { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n    Frontal chain: ""%" "ld"".  Frontal matrices ""%" "ld"" to ""%" "ld""\n", (chain), (frontid1), (frontid2)) ; } ; } } ;
 { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\tLargest frontal matrix in Frontal chain: ""%" "ld""-by-""%" "ld""\n", Chain_maxrows [chain], Chain_maxcols [chain]) ; } ; } } ;
 for (frontid = frontid1 ; frontid <= frontid2 ; frontid++)
 {
     kk = Front_npivcol [frontid] ;
     { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\tFront: ""%" "ld""  pivot cols: ""%" "ld"" (pivot columns ""%" "ld"" to " "%" "ld"")\n", (frontid), kk, (k), (k+kk-1)) ; } ; } } ;
     { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\t    pivot row candidates: ""%" "ld"" to ""%" "ld""\n", (Front_1strow [Front_leftmostdesc [frontid]]), (Front_1strow [frontid+1]-1)) ; } ; } } ;
     { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\t    leftmost descendant: ""%" "ld""\n", (Front_leftmostdesc [frontid])) ; } ; } } ;
     { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\t    1st new candidate row : ""%" "ld""\n", (Front_1strow [frontid])) ; } ; } } ;
     { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\t    parent:") ; } ; } } ;
     if (Front_parent [frontid] == (-1))
     {
  { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf (" (none)\n") ; } ; } } ;
     }
     else
     {
  { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf (" ""%" "ld""\n", (Front_parent [frontid])) ; } ; } } ;
     }
     done = (frontid == 20 && frontid < nfr-1 && prl == 4) ;
     if (done)
     {
  { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\t...\n") ; } ; } } ;
  break ;
     }
     k += kk ;
 }
 if (Front_npivcol [nfr] != 0)
 {
     { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\tFront: ""%" "ld"" placeholder for ""%" "ld"" empty columns\n", (nfr), Front_npivcol [nfr]) ; } ; } } ;
 }
 if (done)
 {
     break ;
 }
    }
    W = (long *) umf_l_malloc ((((n_row) > (n_col)) ? (n_row) : (n_col)), sizeof (long)) ;
    if (!W)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: out of memory to check Symbolic object\n\n") ; } ;
 return ((-1)) ;
    }
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\nInitial column permutation, Q1: ") ; } ; } } ;
    status1 = umf_l_report_perm (n_col, Symbolic->Cperm_init, W, prl, 0) ;
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\nInitial row permutation, P1: ") ; } ; } } ;
    status2 = umf_l_report_perm (n_row, Symbolic->Rperm_init, W, prl, 0) ;
    (void) umf_l_free ((void *) W) ;
    if (status1 != (0) || status2 != (0))
    {
 return ((-4)) ;
    }
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("    Symbolic object:  ") ; } ; } } ;
    { if (amd_printf != ((void *)0)) (void) amd_printf ("OK\n\n") ; } ;
    return ((0)) ;
}

variable_types:
SymbolicHandle
void *

variable_types: nz long

variable_types: nchains long

variable_types: nfr long

variable_types: maxnrows long

variable_types: maxncols long

variable_types: prl long

variable_types: k long

variable_types: chain long

variable_types: frontid long

variable_types: kk long

variable_types:
W
long *

variable_types: done long

variable_types: struct SymbolicType { double num_mem_usage_est; long valid; } *


original_code:
long umfdl_start_front
(
    long chain,
    NumericType *Numeric,
    WorkType *Work,
    SymbolicType *Symbolic
)
{
    double maxbytes ;
    long fnrows_max, fncols_max, fnr2, fnc2, fsize, fcurr_size, maxfrsize,
 overflow, nb, f, cdeg ;
    nb = Symbolic->nb ;
    fnrows_max = Symbolic->Chain_maxrows [chain] ;
    fncols_max = Symbolic->Chain_maxcols [chain] ;
    ;
    Work->fnrows_max = fnrows_max ;
    Work->fncols_max = fncols_max ;
    Work->any_skip = (0) ;
    maxbytes = sizeof (double) *
 (double) (fnrows_max + nb) * (double) (fncols_max + nb) ;
    fcurr_size = Work->fcurr_size ;
    if (Symbolic->prefer_diagonal)
    {
 long col, tpi, e, *E, *Col_tuples, *Col_tlen, *Cols ;
 Tuple *tp, *tpend ;
 Unit *Memory, *p ;
 Element *ep ;
 E = Work->E ;
 Memory = Numeric->Memory ;
 Col_tuples = Numeric->Lip ;
 Col_tlen = Numeric->Lilen ;
 col = Work->nextcand ;
 tpi = Col_tuples [col] ;
 tp = (Tuple *) Memory + tpi ;
 tpend = tp + Col_tlen [col] ;
 cdeg = 0 ;
 ;
 for ( ; tp < tpend ; tp++)
 {
     ;
     e = tp->e ;
     if (!E [e]) continue ;
     f = tp->f ;
     p = Memory + E [e] ;
     ep = (Element *) p ;
     p += (((((sizeof (Element) * (1))) + (sizeof (Unit)) - 1) / (sizeof (Unit)))) ;
     Cols = (long *) p ;
     if (Cols [f] == (-1)) continue ;
     ;
     cdeg += ep->nrowsleft ;
 }
 if (Symbolic->amd_dmax > 0)
 {
     cdeg = (((cdeg) < (Symbolic->amd_dmax)) ? (cdeg) : (Symbolic->amd_dmax)) ;
 }
 cdeg += 2 ;
 cdeg = (((cdeg) < (fnrows_max)) ? (cdeg) : (fnrows_max)) ;
    }
    else
    {
 cdeg = 0 ;
    }
    ;
    ;
    ;
    ;
    overflow = ((!((maxbytes) * (1.0+1e-8) <= (double) 0x7fffffffffffffffL)) || ((maxbytes) != (maxbytes))) ;
    if (overflow)
    {
 maxfrsize = 0x7fffffffffffffffL / sizeof (double) ;
    }
    else
    {
 maxfrsize = (fnrows_max + nb) * (fncols_max + nb) ;
    }
    ;
    if (Numeric->front_alloc_init < 0)
    {
 fsize = -Numeric->front_alloc_init ;
 fsize = (((1) > (fsize)) ? (1) : (fsize)) ;
    }
    else
    {
 if (((!((Numeric->front_alloc_init * maxbytes) * (1.0+1e-8) <= (double) 0x7fffffffffffffffL)) || ((Numeric->front_alloc_init * maxbytes) != (Numeric->front_alloc_init * maxbytes))))
 {
     fsize = 0x7fffffffffffffffL / sizeof (double) ;
 }
 else
 {
     fsize = Numeric->front_alloc_init * maxfrsize ;
 }
 if (cdeg > 0)
 {
     long fsize2 ;
     cdeg += nb ;
     if (((!((((double) cdeg * (double) cdeg) * sizeof (double)) * (1.0+1e-8) <= (double) 0x7fffffffffffffffL)) || ((((double) cdeg * (double) cdeg) * sizeof (double)) != (((double) cdeg * (double) cdeg) * sizeof (double)))))
     {
  fsize2 = 0x7fffffffffffffffL / sizeof (double) ;
     }
     else
     {
  fsize2 = (((cdeg * cdeg) > (fcurr_size)) ? (cdeg * cdeg) : (fcurr_size)) ;
     }
     fsize = (((fsize) < (fsize2)) ? (fsize) : (fsize2)) ;
 }
    }
    fsize = (((fsize) > (2*nb*nb)) ? (fsize) : (2*nb*nb)) ;
    ;
    Work->fnrows_new = 0 ;
    Work->fncols_new = 0 ;
    ;
    ;
    if (fsize >= maxfrsize && !overflow)
    {
 fnr2 = fnrows_max + nb ;
 fnc2 = fncols_max + nb ;
 fsize = maxfrsize ;
 ;
    }
    else
    {
 if (fnrows_max <= fncols_max)
 {
     fnr2 = (long) sqrt ((double) fsize) ;
     fnr2 = (((fnr2) > (1)) ? (fnr2) : (1)) ;
     if (fnr2 % 2 == 0) fnr2++ ;
     fnr2 = (((fnr2) < (fnrows_max + nb)) ? (fnr2) : (fnrows_max + nb)) ;
     fnc2 = fsize / fnr2 ;
 }
 else
 {
     fnc2 = (long) sqrt ((double) fsize) ;
     fnc2 = (((fnc2) < (fncols_max + nb)) ? (fnc2) : (fncols_max + nb)) ;
     fnr2 = fsize / fnc2 ;
     fnr2 = (((fnr2) > (1)) ? (fnr2) : (1)) ;
     if (fnr2 % 2 == 0)
     {
  fnr2++ ;
  fnc2 = fsize / fnr2 ;
     }
 }
 ;
    }
    fnr2 = (((fnr2) < (fnrows_max + nb)) ? (fnr2) : (fnrows_max + nb)) ;
    fnc2 = (((fnc2) < (fncols_max + nb)) ? (fnc2) : (fncols_max + nb)) ;
    ;
    ;
    fnr2 -= nb ;
    fnc2 -= nb ;
    ;
    ;
    if (fsize > fcurr_size)
    {
 ;
 Work->do_grow = (1) ;
 if (!umfdl_grow_front (Numeric, fnr2, fnc2, Work, -1))
 {
     ;
     return ((0)) ;
 }
    }
    else
    {
 ;
 Work->fnr_curr = fnr2 ;
 Work->fnc_curr = fnc2 ;
 Work->Flblock = Work->Flublock + nb * nb ;
 Work->Fublock = Work->Flblock + nb * fnr2 ;
 Work->Fcblock = Work->Fublock + nb * fnc2 ;
    }
    ;
    ;
    ;
    return ((1)) ;
}

canonical_original_code:
long umfdl_start_front(long chain, struct NumericType *Numeric, struct WorkType *Work, struct SymbolicType *Symbolic)
{
    double maxbytes;
    long fnrows_max; long fncols_max; long fnr2; long fnc2; long fsize; long fcurr_size; long maxfrsize; long overflow; long nb; long f; long cdeg;
    nb = Symbolic->nb ;
    fnrows_max = Symbolic->Chain_maxrows [chain] ;
    fncols_max = Symbolic->Chain_maxcols [chain] ;
    ;
    Work->fnrows_max = fnrows_max ;
    Work->fncols_max = fncols_max ;
    Work->any_skip = (0) ;
    maxbytes = sizeof (double) *
 (double) (fnrows_max + nb) * (double) (fncols_max + nb) ;
    fcurr_size = Work->fcurr_size ;
    if (Symbolic->prefer_diagonal)
    {
 long col; long tpi; long e; long *E; long *Col_tuples; long *Col_tlen; long *Cols;
 struct Tuple *tp; struct Tuple *tpend;
 union Unit_union *Memory; union Unit_union *p;
 struct Element *ep;
 E = Work->E ;
 Memory = Numeric->Memory ;
 Col_tuples = Numeric->Lip ;
 Col_tlen = Numeric->Lilen ;
 col = Work->nextcand ;
 tpi = Col_tuples [col] ;
 tp = (struct Tuple *) Memory + tpi ;
 tpend = tp + Col_tlen [col] ;
 cdeg = 0 ;
 ;
 for ( ; tp < tpend ; tp++)
 {
     ;
     e = tp->e ;
     if (!E [e]) continue ;
     f = tp->f ;
     p = Memory + E [e] ;
     ep = (struct Element *) p ;
     p += (((((sizeof (Element) * (1))) + (sizeof (Unit)) - 1) / (sizeof (Unit)))) ;
     Cols = (long *) p ;
     if (Cols [f] == (-1)) continue ;
     ;
     cdeg += ep->nrowsleft ;
 }
 if (Symbolic->amd_dmax > 0)
 {
     cdeg = (((cdeg) < (Symbolic->amd_dmax)) ? (cdeg) : (Symbolic->amd_dmax)) ;
 }
 cdeg += 2 ;
 cdeg = (((cdeg) < (fnrows_max)) ? (cdeg) : (fnrows_max)) ;
    }
    else
    {
 cdeg = 0 ;
    }
    ;
    ;
    ;
    ;
    overflow = ((!((maxbytes) * (1.0+1e-8) <= (double) 0x7fffffffffffffffL)) || ((maxbytes) != (maxbytes))) ;
    if (overflow)
    {
 maxfrsize = 0x7fffffffffffffffL / sizeof (double) ;
    }
    else
    {
 maxfrsize = (fnrows_max + nb) * (fncols_max + nb) ;
    }
    ;
    if (Numeric->front_alloc_init < 0)
    {
 fsize = -Numeric->front_alloc_init ;
 fsize = (((1) > (fsize)) ? (1) : (fsize)) ;
    }
    else
    {
 if (((!((Numeric->front_alloc_init * maxbytes) * (1.0+1e-8) <= (double) 0x7fffffffffffffffL)) || ((Numeric->front_alloc_init * maxbytes) != (Numeric->front_alloc_init * maxbytes))))
 {
     fsize = 0x7fffffffffffffffL / sizeof (double) ;
 }
 else
 {
     fsize = Numeric->front_alloc_init * maxfrsize ;
 }
 if (cdeg > 0)
 {
     long fsize2;
     cdeg += nb ;
     if (((!((((double) cdeg * (double) cdeg) * sizeof (double)) * (1.0+1e-8) <= (double) 0x7fffffffffffffffL)) || ((((double) cdeg * (double) cdeg) * sizeof (double)) != (((double) cdeg * (double) cdeg) * sizeof (double)))))
     {
  fsize2 = 0x7fffffffffffffffL / sizeof (double) ;
     }
     else
     {
  fsize2 = (((cdeg * cdeg) > (fcurr_size)) ? (cdeg * cdeg) : (fcurr_size)) ;
     }
     fsize = (((fsize) < (fsize2)) ? (fsize) : (fsize2)) ;
 }
    }
    fsize = (((fsize) > (2*nb*nb)) ? (fsize) : (2*nb*nb)) ;
    ;
    Work->fnrows_new = 0 ;
    Work->fncols_new = 0 ;
    ;
    ;
    if (fsize >= maxfrsize && !overflow)
    {
 fnr2 = fnrows_max + nb ;
 fnc2 = fncols_max + nb ;
 fsize = maxfrsize ;
 ;
    }
    else
    {
 if (fnrows_max <= fncols_max)
 {
     fnr2 = (long) sqrt ((double) fsize) ;
     fnr2 = (((fnr2) > (1)) ? (fnr2) : (1)) ;
     if (fnr2 % 2 == 0) fnr2++ ;
     fnr2 = (((fnr2) < (fnrows_max + nb)) ? (fnr2) : (fnrows_max + nb)) ;
     fnc2 = fsize / fnr2 ;
 }
 else
 {
     fnc2 = (long) sqrt ((double) fsize) ;
     fnc2 = (((fnc2) < (fncols_max + nb)) ? (fnc2) : (fncols_max + nb)) ;
     fnr2 = fsize / fnc2 ;
     fnr2 = (((fnr2) > (1)) ? (fnr2) : (1)) ;
     if (fnr2 % 2 == 0)
     {
  fnr2++ ;
  fnc2 = fsize / fnr2 ;
     }
 }
 ;
    }
    fnr2 = (((fnr2) < (fnrows_max + nb)) ? (fnr2) : (fnrows_max + nb)) ;
    fnc2 = (((fnc2) < (fncols_max + nb)) ? (fnc2) : (fncols_max + nb)) ;
    ;
    ;
    fnr2 -= nb ;
    fnc2 -= nb ;
    ;
    ;
    if (fsize > fcurr_size)
    {
 ;
 Work->do_grow = (1) ;
 if (!umfdl_grow_front (Numeric, fnr2, fnc2, Work, -1))
 {
     ;
     return ((0)) ;
 }
    }
    else
    {
 ;
 Work->fnr_curr = fnr2 ;
 Work->fnc_curr = fnc2 ;
 Work->Flblock = Work->Flublock + nb * nb ;
 Work->Fublock = Work->Flblock + nb * fnr2 ;
 Work->Fcblock = Work->Fublock + nb * fnc2 ;
    }
    ;
    ;
    ;
    return ((1)) ;
}

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: struct WorkType { long *E; double *Wx; long *Wp; long *Lpattern; long *Diagonal_map; long n_row; long *Front_new1strow; long Pivrow[64]; double *Flublock; long *Frows; } *

variable_types: maxbytes double

variable_types: fsize long

variable_types: maxfrsize long

variable_types: overflow long

variable_types: nb long

variable_types: f long

variable_types: cdeg long

variable_types: col long

variable_types: tpi long

variable_types: e long

variable_types:
E
long *

variable_types:
Cols
long *

variable_types:
tp
struct Tuple { long e; } *

variable_types:
tpend
struct Tuple { long e; } *

variable_types:
ep
struct Element { long cdeg; } *

return_type: 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; }

user_defined_types: struct SymbolicType { double num_mem_usage_est; long valid; }


decompiled_code:
__int64 __fastcall umfpack_dl_report_vector(__int64 a1, __int64 a2, double *a3)
{
unsigned __int64 v3; // rcx
__int64 result; // rax

if ( !a3 )
return 0LL;
v3 = (unsigned int)(int)*a3;
result = 0LL;
if ( v3 > 2 )
result = umfdl_report_vector(a1, a2, 0LL, v3, 1LL, 0LL);
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(__int64 a1, __int64 a2, double *a3)
{
unsigned __int64 v3; // rcx
__int64 result; // rax

if ( !a3 )
return 0LL;
v3 = (unsigned int)(int)*a3;
result = 0LL;
if ( v3 > 2 )
result = umfdl_report_vector(a1, a2, 0LL, v3, 1LL, 0LL);
return result;
}

original_code:
long umfpack_dl_report_vector
(
    long n,
    const double Xx [ ],
    const double Control [20]
)
{
    long prl ;
    double *Xz = (double *) ((void *)0) ;
    prl = ((Control != (double *) ((void *)0)) ? (((Control [0]) != (Control [0])) ? 1 : Control [0]) : 1) ;
    if (prl <= 2)
    {
 return ((0)) ;
    }
    return (umfdl_report_vector (n, Xx, Xz, prl, (1), (0))) ;
}

canonical_original_code:
long umfpack_dl_report_vector(long n, double Xx[], double Control[20])
{
    long prl;
    double *Xz = (double *) ((void *)0);
    prl = ((Control != (double *) ((void *)0)) ? (((Control [0]) != (Control [0])) ? 1 : Control [0]) : 1) ;
    if (prl <= 2)
    {
 return ((0)) ;
    }
    return (umfdl_report_vector (n, Xx, Xz, prl, (1), (0))) ;
}

variable_types: n long

variable_types:
Xx
double []

variable_types:
Control
double [20]

variable_types: prl long

variable_types:
Xz
double *


original_code:
int cholmod_rowcolcounts
(
    cholmod_sparse *A,
    int *fset,
    size_t fsize,
    int *Parent,
    int *Post,
    int *RowCount,
    int *ColCount,
    int *First,
    int *Level,
    cholmod_common *Common
)
{
    double fl, ff ;
    int *Ap, *Ai, *Anz, *PrevNbr, *SetParent, *Head, *PrevLeaf, *Anext, *Ipost,
 *Iwork ;
    int i, j, r, k, len, s, p, pend, inew, stype, nf, anz, inode, parent,
 nrow, ncol, packed, use_fset, jj ;
    size_t w ;
    int ok = 1 ;
    { if (Common == ((void *)0)) { return (0) ; } if (Common->itype != 0 || Common->dtype != 0) { Common->status = (-4) ; return (0) ; } } ;
    { if ((A) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 222, "argument missing", Common) ; } return (0) ; } } ;
    { if ((Parent) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 223, "argument missing", Common) ; } return (0) ; } } ;
    { if ((Post) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 224, "argument missing", Common) ; } return (0) ; } } ;
    { if ((ColCount) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 225, "argument missing", Common) ; } return (0) ; } } ;
    { if ((First) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 226, "argument missing", Common) ; } return (0) ; } } ;
    { if ((Level) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 227, "argument missing", Common) ; } return (0) ; } } ;
    { if ((A)->xtype < (0) || (A)->xtype > (3) || ((A)->xtype != 0 && ((A)->x) == ((void *)0)) || ((A)->xtype == 3 && ((A)->z) == ((void *)0))) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 228, "invalid xtype", Common) ; } return (0) ; } } ;
    stype = A->stype ;
    if (stype > 0)
    {
 cholmod_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 233, "symmetric upper not supported", Common) ;
 return (0) ;
    }
    Common->status = 0 ;
    nrow = A->nrow ;
    ncol = A->ncol ;
    w = cholmod_mult_size_t (nrow, 2, &ok) ;
    w = cholmod_add_size_t (w, (stype ? 0 : ncol), &ok) ;
    if (!ok)
    {
 cholmod_error ((-3), "../Cholesky/cholmod_rowcolcounts.c", 250, "problem too large", Common) ;
 return (0) ;
    }
    cholmod_allocate_work (nrow, w, 0, Common) ;
    if (Common->status < 0)
    {
 return (0) ;
    }
    ;
    ;
    Ap = A->p ;
    Ai = A->i ;
    Anz = A->nz ;
    packed = A->packed ;
    ;
    Iwork = Common->Iwork ;
    SetParent = Iwork ;
    PrevNbr = Iwork + nrow ;
    Anext = Iwork + 2*((size_t) nrow) ;
    PrevLeaf = Common->Flag ;
    Head = Common->Head ;
    for (i = 0 ; i < nrow ; i++)
    {
 First [i] = (-1) ;
    }
    for (k = 0 ; k < nrow ; k++)
    {
 i = Post [k] ;
 ColCount [i] = (First [i] == (-1)) ? 1 : 0 ;
 len = 0 ;
 for (r = i ; (r != (-1)) && (First [r] == (-1)) ; r = Parent [r])
 {
     First [r] = k ;
     len++ ;
 }
 if (r == (-1))
 {
     len-- ;
 }
 else
 {
     len += Level [r] ;
 }
 for (s = i ; s != r ; s = Parent [s])
 {
     Level [s] = len-- ;
 }
    }
    fl = 0.0 ;
    if (stype == 0)
    {
 Ipost = PrevNbr ;
 for (k = 0 ; k < nrow ; k++)
 {
     Ipost [Post [k]] = k ;
 }
 use_fset = (fset != ((void *)0)) ;
 if (use_fset)
 {
     nf = fsize ;
     for (j = 0 ; j < ncol ; j++)
     {
  Anext [j] = -2 ;
     }
     for (jj = 0 ; jj < nf ; jj++)
     {
  j = fset [jj] ;
  if (j < 0 || j > ncol || Anext [j] != -2)
  {
      cholmod_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 362, "fset invalid", Common) ;
      return (0) ;
  }
  Anext [j] = (-1) ;
     }
     ;
 }
 else
 {
     nf = ncol ;
 }
 for (jj = 0 ; jj < nf ; jj++)
 {
     j = (use_fset) ? (fset [jj]) : jj ;
     p = Ap [j] ;
     pend = (packed) ? (Ap [j+1]) : (p + Anz [j]) ;
     ff = (double) (((0) > (pend - p)) ? (0) : (pend - p)) ;
     fl += ff*ff + ff ;
     if (pend > p)
     {
  k = Ipost [Ai [p]] ;
  for ( ; p < pend ; p++)
  {
      inew = Ipost [Ai [p]] ;
      k = (((k) < (inew)) ? (k) : (inew)) ;
  }
  ;
  Anext [j] = Head [k] ;
  Head [k] = j ;
     }
 }
    }
    if (RowCount != ((void *)0))
    {
 for (i = 0 ; i < nrow ; i++)
 {
     RowCount [i] = 1 ;
 }
    }
    for (i = 0 ; i < nrow ; i++)
    {
 PrevLeaf [i] = (-1) ;
 PrevNbr [i] = (-1) ;
 SetParent [i] = i ;
    }
    if (stype != 0)
    {
 anz = nrow ;
 for (k = 0 ; k < nrow ; k++)
 {
     j = initialize_node (k, Post, Parent, ColCount, PrevNbr) ;
     p = Ap [j] ;
     pend = (packed) ? (Ap [j+1]) : (p + Anz [j]) ;
     for ( ; p < pend ; p++)
     {
  i = Ai [p] ;
  if (i > j)
  {
      anz++ ;
      process_edge (j, i, k, First, PrevNbr, ColCount,
       PrevLeaf, RowCount, SetParent, Level) ;
  }
     }
     finalize_node (j, Parent, SetParent) ;
 }
 Common->anz = anz ;
    }
    else
    {
 for (k = 0 ; k < nrow ; k++)
 {
     inode = initialize_node (k, Post, Parent, ColCount, PrevNbr) ;
     for (j = Head [k] ; j != (-1) ; j = Anext [j])
     {
  p = Ap [j] ;
  pend = (packed) ? (Ap [j+1]) : (p + Anz [j]) ;
  for ( ; p < pend ; p++)
  {
      i = Ai [p] ;
      if (PrevNbr [i] < k)
      {
   process_edge (inode, i, k, First, PrevNbr, ColCount,
    PrevLeaf, RowCount, SetParent, Level) ;
      }
  }
     }
     Head [k] = (-1) ;
     finalize_node (inode, Parent, SetParent) ;
 }
    }
    for (j = 0 ; j < nrow ; j++)
    {
 parent = Parent [j] ;
 if (parent != (-1))
 {
     ColCount [parent] += ColCount [j] ;
 }
    }
    Common->mark = (-1) ;
    { Common->mark++ ; if (Common->mark <= 0) { Common->mark = (-1) ; cholmod_clear_flag (Common) ; } } ;
    ;
    Common->aatfl = fl ;
    Common->lnz = 0. ;
    fl = 0 ;
    for (j = 0 ; j < nrow ; j++)
    {
 ff = (double) (ColCount [j]) ;
 Common->lnz += ff ;
 fl += ff*ff ;
    }
    Common->fl = fl ;
    ;
    return (1) ;
}

canonical_original_code:
int cholmod_rowcolcounts(struct cholmod_sparse_struct *A, int *fset, unsigned long fsize, int *Parent, int *Post, int *RowCount, int *ColCount, int *First, int *Level, struct cholmod_common_struct *Common)
{
    double fl; double ff;
    int *Ap; int *Ai; int *Anz; int *PrevNbr; int *SetParent; int *Head; int *PrevLeaf; int *Anext; int *Ipost; int *Iwork;
    int i; int j; int r; int k; int len; int s; int p; int pend; int inew; int stype; int nf; int anz; int inode; int parent; int nrow; int ncol; int packed; int use_fset; int jj;
    unsigned long w;
    int ok = 1;
    { if (Common == ((void *)0)) { return (0) ; } if (Common->itype != 0 || Common->dtype != 0) { Common->status = (-4) ; return (0) ; } } ;
    { if ((A) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 222, "argument missing", Common) ; } return (0) ; } } ;
    { if ((Parent) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 223, "argument missing", Common) ; } return (0) ; } } ;
    { if ((Post) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 224, "argument missing", Common) ; } return (0) ; } } ;
    { if ((ColCount) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 225, "argument missing", Common) ; } return (0) ; } } ;
    { if ((First) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 226, "argument missing", Common) ; } return (0) ; } } ;
    { if ((Level) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 227, "argument missing", Common) ; } return (0) ; } } ;
    { if ((A)->xtype < (0) || (A)->xtype > (3) || ((A)->xtype != 0 && ((A)->x) == ((void *)0)) || ((A)->xtype == 3 && ((A)->z) == ((void *)0))) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 228, "invalid xtype", Common) ; } return (0) ; } } ;
    stype = A->stype ;
    if (stype > 0)
    {
 cholmod_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 233, "symmetric upper not supported", Common) ;
 return (0) ;
    }
    Common->status = 0 ;
    nrow = A->nrow ;
    ncol = A->ncol ;
    w = cholmod_mult_size_t (nrow, 2, &ok) ;
    w = cholmod_add_size_t (w, (stype ? 0 : ncol), &ok) ;
    if (!ok)
    {
 cholmod_error ((-3), "../Cholesky/cholmod_rowcolcounts.c", 250, "problem too large", Common) ;
 return (0) ;
    }
    cholmod_allocate_work (nrow, w, 0, Common) ;
    if (Common->status < 0)
    {
 return (0) ;
    }
    ;
    ;
    Ap = A->p ;
    Ai = A->i ;
    Anz = A->nz ;
    packed = A->packed ;
    ;
    Iwork = Common->Iwork ;
    SetParent = Iwork ;
    PrevNbr = Iwork + nrow ;
    Anext = Iwork + 2*((unsigned long) nrow) ;
    PrevLeaf = Common->Flag ;
    Head = Common->Head ;
    for (i = 0 ; i < nrow ; i++)
    {
 First [i] = (-1) ;
    }
    for (k = 0 ; k < nrow ; k++)
    {
 i = Post [k] ;
 ColCount [i] = (First [i] == (-1)) ? 1 : 0 ;
 len = 0 ;
 for (r = i ; (r != (-1)) && (First [r] == (-1)) ; r = Parent [r])
 {
     First [r] = k ;
     len++ ;
 }
 if (r == (-1))
 {
     len-- ;
 }
 else
 {
     len += Level [r] ;
 }
 for (s = i ; s != r ; s = Parent [s])
 {
     Level [s] = len-- ;
 }
    }
    fl = 0.0 ;
    if (stype == 0)
    {
 Ipost = PrevNbr ;
 for (k = 0 ; k < nrow ; k++)
 {
     Ipost [Post [k]] = k ;
 }
 use_fset = (fset != ((void *)0)) ;
 if (use_fset)
 {
     nf = fsize ;
     for (j = 0 ; j < ncol ; j++)
     {
  Anext [j] = -2 ;
     }
     for (jj = 0 ; jj < nf ; jj++)
     {
  j = fset [jj] ;
  if (j < 0 || j > ncol || Anext [j] != -2)
  {
      cholmod_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 362, "fset invalid", Common) ;
      return (0) ;
  }
  Anext [j] = (-1) ;
     }
     ;
 }
 else
 {
     nf = ncol ;
 }
 for (jj = 0 ; jj < nf ; jj++)
 {
     j = (use_fset) ? (fset [jj]) : jj ;
     p = Ap [j] ;
     pend = (packed) ? (Ap [j+1]) : (p + Anz [j]) ;
     ff = (double) (((0) > (pend - p)) ? (0) : (pend - p)) ;
     fl += ff*ff + ff ;
     if (pend > p)
     {
  k = Ipost [Ai [p]] ;
  for ( ; p < pend ; p++)
  {
      inew = Ipost [Ai [p]] ;
      k = (((k) < (inew)) ? (k) : (inew)) ;
  }
  ;
  Anext [j] = Head [k] ;
  Head [k] = j ;
     }
 }
    }
    if (RowCount != ((void *)0))
    {
 for (i = 0 ; i < nrow ; i++)
 {
     RowCount [i] = 1 ;
 }
    }
    for (i = 0 ; i < nrow ; i++)
    {
 PrevLeaf [i] = (-1) ;
 PrevNbr [i] = (-1) ;
 SetParent [i] = i ;
    }
    if (stype != 0)
    {
 anz = nrow ;
 for (k = 0 ; k < nrow ; k++)
 {
     j = initialize_node (k, Post, Parent, ColCount, PrevNbr) ;
     p = Ap [j] ;
     pend = (packed) ? (Ap [j+1]) : (p + Anz [j]) ;
     for ( ; p < pend ; p++)
     {
  i = Ai [p] ;
  if (i > j)
  {
      anz++ ;
      process_edge (j, i, k, First, PrevNbr, ColCount,
       PrevLeaf, RowCount, SetParent, Level) ;
  }
     }
     finalize_node (j, Parent, SetParent) ;
 }
 Common->anz = anz ;
    }
    else
    {
 for (k = 0 ; k < nrow ; k++)
 {
     inode = initialize_node (k, Post, Parent, ColCount, PrevNbr) ;
     for (j = Head [k] ; j != (-1) ; j = Anext [j])
     {
  p = Ap [j] ;
  pend = (packed) ? (Ap [j+1]) : (p + Anz [j]) ;
  for ( ; p < pend ; p++)
  {
      i = Ai [p] ;
      if (PrevNbr [i] < k)
      {
   process_edge (inode, i, k, First, PrevNbr, ColCount,
    PrevLeaf, RowCount, SetParent, Level) ;
      }
  }
     }
     Head [k] = (-1) ;
     finalize_node (inode, Parent, SetParent) ;
 }
    }
    for (j = 0 ; j < nrow ; j++)
    {
 parent = Parent [j] ;
 if (parent != (-1))
 {
     ColCount [parent] += ColCount [j] ;
 }
    }
    Common->mark = (-1) ;
    { Common->mark++ ; if (Common->mark <= 0) { Common->mark = (-1) ; cholmod_clear_flag (Common) ; } } ;
    ;
    Common->aatfl = fl ;
    Common->lnz = 0. ;
    fl = 0 ;
    for (j = 0 ; j < nrow ; j++)
    {
 ff = (double) (ColCount [j]) ;
 Common->lnz += ff ;
 fl += ff*ff ;
    }
    Common->fl = fl ;
    ;
    return (1) ;
}

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:
fset
int *

variable_types:
fsize
unsigned long

variable_types:
Parent
int *

variable_types:
Post
int *

variable_types:
RowCount
int *

variable_types:
ColCount
int *

variable_types:
First
int *

variable_types:
Level
int *

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: fl double

variable_types: ff double

variable_types:
Ap
int *

variable_types:
Ai
int *

variable_types:
Anz
int *

variable_types:
PrevNbr
int *

variable_types:
SetParent
int *

variable_types:
Head
int *

variable_types:
PrevLeaf
int *

variable_types:
Anext
int *

variable_types:
Ipost
int *

variable_types:
Iwork
int *

variable_types: i int

variable_types: j int

variable_types: r int

variable_types: k int

variable_types: len int

variable_types: s int

variable_types: p int

variable_types: pend int

variable_types: inew int

variable_types: stype int

variable_types: nf int

variable_types: anz int

variable_types: inode int

variable_types: parent int

variable_types: nrow int

variable_types: ncol int

variable_types: packed int

variable_types: jj int

variable_types:
w
unsigned long

variable_types: ok int

return_type: 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 initialize_node(int a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5)
{
unsigned int v6; // edx
int v7; // eax

v6 = *(_DWORD *)(a2 + 4LL * a1);
v7 = *(_DWORD *)(a3 + 4LL * (int)v6);
if ( v7 != -1 )
--*(_DWORD *)(a4 + 4LL * v7);
*(_DWORD *)(a5 + 4LL * (int)v6) = a1;
return v6;
}

original_code:
static int initialize_node
(
    int k,
    int Post [ ],
    int Parent [ ],
    int ColCount [ ],
    int PrevNbr [ ]
)
{
    int p, parent ;
    p = Post [k] ;
    parent = Parent [p] ;
    if (parent != (-1))
    {
 ColCount [parent]-- ;
    }
    PrevNbr [p] = k ;
    return (p) ;
}

canonical_original_code:
static int initialize_node(int k, int Post[], int Parent[], int ColCount[], int PrevNbr[])
{
    int p; int parent;
    p = Post [k] ;
    parent = Parent [p] ;
    if (parent != (-1))
    {
 ColCount [parent]-- ;
    }
    PrevNbr [p] = k ;
    return (p) ;
}

variable_types: k int

variable_types:
Post
int []

variable_types:
Parent
int []

variable_types:
ColCount
int []

variable_types:
PrevNbr
int []


original_code:
static void process_edge
(
    int p,
    int u,
    int k,
    int First [ ],
    int PrevNbr [ ],
    int ColCount [ ],
    int PrevLeaf [ ],
    int RowCount [ ],
    int SetParent [ ],
    int Level [ ]
)
{
    int prevleaf, q, s, sparent ;
    if (First [p] > PrevNbr [u])
    {
 ColCount [p]++ ;
 prevleaf = PrevLeaf [u] ;
 if (prevleaf == (-1))
 {
     q = u ;
 }
 else
 {
     for (q = prevleaf ; q != SetParent [q] ; q = SetParent [q])
     {
  ;
     }
     s = prevleaf ;
     for (s = prevleaf ; s != q ; s = sparent)
     {
  sparent = SetParent [s] ;
  SetParent [s] = q ;
     }
     ColCount [q]-- ;
 }
 if (RowCount != ((void *)0))
 {
     RowCount [u] += (Level [p] - Level [q]) ;
 }
 PrevLeaf [u] = p ;
    }
    PrevNbr [u] = k ;
}

canonical_original_code:
static void process_edge(int p, int u, int k, int First[], int PrevNbr[], int ColCount[], int PrevLeaf[], int RowCount[], int SetParent[], int Level[])
{
    int prevleaf; int q; int s; int sparent;
    if (First [p] > PrevNbr [u])
    {
 ColCount [p]++ ;
 prevleaf = PrevLeaf [u] ;
 if (prevleaf == (-1))
 {
     q = u ;
 }
 else
 {
     for (q = prevleaf ; q != SetParent [q] ; q = SetParent [q])
     {
  ;
     }
     s = prevleaf ;
     for (s = prevleaf ; s != q ; s = sparent)
     {
  sparent = SetParent [s] ;
  SetParent [s] = q ;
     }
     ColCount [q]-- ;
 }
 if (RowCount != ((void *)0))
 {
     RowCount [u] += (Level [p] - Level [q]) ;
 }
 PrevLeaf [u] = p ;
    }
    PrevNbr [u] = k ;
}

variable_types: p int

variable_types: u int

variable_types:
First
int []

variable_types:
PrevLeaf
int []

variable_types:
RowCount
int []

variable_types:
SetParent
int []

variable_types:
Level
int []

variable_types: prevleaf int

variable_types: q int

variable_types: s int

variable_types: sparent int

return_type: void


decompiled_code:
__int64 __fastcall finalize_node(int a1, __int64 a2, __int64 a3)
{
__int64 result; // rax

result = *(unsigned int *)(a2 + 4LL * a1);
if ( (_DWORD)result != -1 )
*(_DWORD *)(a3 + 4LL * a1) = result;
return result;
}

canonical_decompiled_code:
__int64 __fastcall func2(int a1, __int64 a2, __int64 a3)
{
__int64 result; // rax

result = *(unsigned int *)(a2 + 4LL * a1);
if ( (_DWORD)result != -1 )
*(_DWORD *)(a3 + 4LL * a1) = result;
return result;
}

original_code:
static void finalize_node
(
    int p,
    int Parent [ ],
    int SetParent [ ]
)
{
    if (Parent [p] != (-1))
    {
 SetParent [p] = Parent [p] ;
    }
}

canonical_original_code:
static void finalize_node(int p, int Parent[], int SetParent[])
{
    if (Parent [p] != (-1))
    {
 SetParent [p] = Parent [p] ;
    }
}


original_code:
int cholmod_l_rowcolcounts
(
    cholmod_sparse *A,
    long *fset,
    size_t fsize,
    long *Parent,
    long *Post,
    long *RowCount,
    long *ColCount,
    long *First,
    long *Level,
    cholmod_common *Common
)
{
    double fl, ff ;
    long *Ap, *Ai, *Anz, *PrevNbr, *SetParent, *Head, *PrevLeaf, *Anext, *Ipost,
 *Iwork ;
    long i, j, r, k, len, s, p, pend, inew, stype, nf, anz, inode, parent,
 nrow, ncol, packed, use_fset, jj ;
    size_t w ;
    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_rowcolcounts.c", 222, "argument missing", Common) ; } return (0) ; } } ;
    { if ((Parent) == ((void *)0)) { if (Common->status != (-2)) { cholmod_l_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 223, "argument missing", Common) ; } return (0) ; } } ;
    { if ((Post) == ((void *)0)) { if (Common->status != (-2)) { cholmod_l_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 224, "argument missing", Common) ; } return (0) ; } } ;
    { if ((ColCount) == ((void *)0)) { if (Common->status != (-2)) { cholmod_l_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 225, "argument missing", Common) ; } return (0) ; } } ;
    { if ((First) == ((void *)0)) { if (Common->status != (-2)) { cholmod_l_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 226, "argument missing", Common) ; } return (0) ; } } ;
    { if ((Level) == ((void *)0)) { if (Common->status != (-2)) { cholmod_l_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 227, "argument missing", Common) ; } return (0) ; } } ;
    { if ((A)->xtype < (0) || (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_rowcolcounts.c", 228, "invalid xtype", Common) ; } return (0) ; } } ;
    stype = A->stype ;
    if (stype > 0)
    {
 cholmod_l_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 233, "symmetric upper not supported", Common) ;
 return (0) ;
    }
    Common->status = 0 ;
    nrow = A->nrow ;
    ncol = A->ncol ;
    w = cholmod_l_mult_size_t (nrow, 2, &ok) ;
    w = cholmod_l_add_size_t (w, (stype ? 0 : ncol), &ok) ;
    if (!ok)
    {
 cholmod_l_error ((-3), "../Cholesky/cholmod_rowcolcounts.c", 250, "problem too large", Common) ;
 return (0) ;
    }
    cholmod_l_allocate_work (nrow, w, 0, Common) ;
    if (Common->status < 0)
    {
 return (0) ;
    }
    ;
    ;
    Ap = A->p ;
    Ai = A->i ;
    Anz = A->nz ;
    packed = A->packed ;
    ;
    Iwork = Common->Iwork ;
    SetParent = Iwork ;
    PrevNbr = Iwork + nrow ;
    Anext = Iwork + 2*((size_t) nrow) ;
    PrevLeaf = Common->Flag ;
    Head = Common->Head ;
    for (i = 0 ; i < nrow ; i++)
    {
 First [i] = (-1) ;
    }
    for (k = 0 ; k < nrow ; k++)
    {
 i = Post [k] ;
 ColCount [i] = (First [i] == (-1)) ? 1 : 0 ;
 len = 0 ;
 for (r = i ; (r != (-1)) && (First [r] == (-1)) ; r = Parent [r])
 {
     First [r] = k ;
     len++ ;
 }
 if (r == (-1))
 {
     len-- ;
 }
 else
 {
     len += Level [r] ;
 }
 for (s = i ; s != r ; s = Parent [s])
 {
     Level [s] = len-- ;
 }
    }
    fl = 0.0 ;
    if (stype == 0)
    {
 Ipost = PrevNbr ;
 for (k = 0 ; k < nrow ; k++)
 {
     Ipost [Post [k]] = k ;
 }
 use_fset = (fset != ((void *)0)) ;
 if (use_fset)
 {
     nf = fsize ;
     for (j = 0 ; j < ncol ; j++)
     {
  Anext [j] = -2 ;
     }
     for (jj = 0 ; jj < nf ; jj++)
     {
  j = fset [jj] ;
  if (j < 0 || j > ncol || Anext [j] != -2)
  {
      cholmod_l_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 362, "fset invalid", Common) ;
      return (0) ;
  }
  Anext [j] = (-1) ;
     }
     ;
 }
 else
 {
     nf = ncol ;
 }
 for (jj = 0 ; jj < nf ; jj++)
 {
     j = (use_fset) ? (fset [jj]) : jj ;
     p = Ap [j] ;
     pend = (packed) ? (Ap [j+1]) : (p + Anz [j]) ;
     ff = (double) (((0) > (pend - p)) ? (0) : (pend - p)) ;
     fl += ff*ff + ff ;
     if (pend > p)
     {
  k = Ipost [Ai [p]] ;
  for ( ; p < pend ; p++)
  {
      inew = Ipost [Ai [p]] ;
      k = (((k) < (inew)) ? (k) : (inew)) ;
  }
  ;
  Anext [j] = Head [k] ;
  Head [k] = j ;
     }
 }
    }
    if (RowCount != ((void *)0))
    {
 for (i = 0 ; i < nrow ; i++)
 {
     RowCount [i] = 1 ;
 }
    }
    for (i = 0 ; i < nrow ; i++)
    {
 PrevLeaf [i] = (-1) ;
 PrevNbr [i] = (-1) ;
 SetParent [i] = i ;
    }
    if (stype != 0)
    {
 anz = nrow ;
 for (k = 0 ; k < nrow ; k++)
 {
     j = initialize_node (k, Post, Parent, ColCount, PrevNbr) ;
     p = Ap [j] ;
     pend = (packed) ? (Ap [j+1]) : (p + Anz [j]) ;
     for ( ; p < pend ; p++)
     {
  i = Ai [p] ;
  if (i > j)
  {
      anz++ ;
      process_edge (j, i, k, First, PrevNbr, ColCount,
       PrevLeaf, RowCount, SetParent, Level) ;
  }
     }
     finalize_node (j, Parent, SetParent) ;
 }
 Common->anz = anz ;
    }
    else
    {
 for (k = 0 ; k < nrow ; k++)
 {
     inode = initialize_node (k, Post, Parent, ColCount, PrevNbr) ;
     for (j = Head [k] ; j != (-1) ; j = Anext [j])
     {
  p = Ap [j] ;
  pend = (packed) ? (Ap [j+1]) : (p + Anz [j]) ;
  for ( ; p < pend ; p++)
  {
      i = Ai [p] ;
      if (PrevNbr [i] < k)
      {
   process_edge (inode, i, k, First, PrevNbr, ColCount,
    PrevLeaf, RowCount, SetParent, Level) ;
      }
  }
     }
     Head [k] = (-1) ;
     finalize_node (inode, Parent, SetParent) ;
 }
    }
    for (j = 0 ; j < nrow ; j++)
    {
 parent = Parent [j] ;
 if (parent != (-1))
 {
     ColCount [parent] += ColCount [j] ;
 }
    }
    Common->mark = (-1) ;
    { Common->mark++ ; if (Common->mark <= 0) { Common->mark = (-1) ; cholmod_l_clear_flag (Common) ; } } ;
    ;
    Common->aatfl = fl ;
    Common->lnz = 0. ;
    fl = 0 ;
    for (j = 0 ; j < nrow ; j++)
    {
 ff = (double) (ColCount [j]) ;
 Common->lnz += ff ;
 fl += ff*ff ;
    }
    Common->fl = fl ;
    ;
    return (1) ;
}

canonical_original_code:
int cholmod_l_rowcolcounts(struct cholmod_sparse_struct *A, long *fset, unsigned long fsize, long *Parent, long *Post, long *RowCount, long *ColCount, long *First, long *Level, struct cholmod_common_struct *Common)
{
    double fl; double ff;
    long *Ap; long *Ai; long *Anz; long *PrevNbr; long *SetParent; long *Head; long *PrevLeaf; long *Anext; long *Ipost; long *Iwork;
    long i; long j; long r; long k; long len; long s; long p; long pend; long inew; long stype; long nf; long anz; long inode; long parent; long nrow; long ncol; long packed; long use_fset; long jj;
    unsigned long w;
    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_rowcolcounts.c", 222, "argument missing", Common) ; } return (0) ; } } ;
    { if ((Parent) == ((void *)0)) { if (Common->status != (-2)) { cholmod_l_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 223, "argument missing", Common) ; } return (0) ; } } ;
    { if ((Post) == ((void *)0)) { if (Common->status != (-2)) { cholmod_l_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 224, "argument missing", Common) ; } return (0) ; } } ;
    { if ((ColCount) == ((void *)0)) { if (Common->status != (-2)) { cholmod_l_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 225, "argument missing", Common) ; } return (0) ; } } ;
    { if ((First) == ((void *)0)) { if (Common->status != (-2)) { cholmod_l_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 226, "argument missing", Common) ; } return (0) ; } } ;
    { if ((Level) == ((void *)0)) { if (Common->status != (-2)) { cholmod_l_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 227, "argument missing", Common) ; } return (0) ; } } ;
    { if ((A)->xtype < (0) || (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_rowcolcounts.c", 228, "invalid xtype", Common) ; } return (0) ; } } ;
    stype = A->stype ;
    if (stype > 0)
    {
 cholmod_l_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 233, "symmetric upper not supported", Common) ;
 return (0) ;
    }
    Common->status = 0 ;
    nrow = A->nrow ;
    ncol = A->ncol ;
    w = cholmod_l_mult_size_t (nrow, 2, &ok) ;
    w = cholmod_l_add_size_t (w, (stype ? 0 : ncol), &ok) ;
    if (!ok)
    {
 cholmod_l_error ((-3), "../Cholesky/cholmod_rowcolcounts.c", 250, "problem too large", Common) ;
 return (0) ;
    }
    cholmod_l_allocate_work (nrow, w, 0, Common) ;
    if (Common->status < 0)
    {
 return (0) ;
    }
    ;
    ;
    Ap = A->p ;
    Ai = A->i ;
    Anz = A->nz ;
    packed = A->packed ;
    ;
    Iwork = Common->Iwork ;
    SetParent = Iwork ;
    PrevNbr = Iwork + nrow ;
    Anext = Iwork + 2*((unsigned long) nrow) ;
    PrevLeaf = Common->Flag ;
    Head = Common->Head ;
    for (i = 0 ; i < nrow ; i++)
    {
 First [i] = (-1) ;
    }
    for (k = 0 ; k < nrow ; k++)
    {
 i = Post [k] ;
 ColCount [i] = (First [i] == (-1)) ? 1 : 0 ;
 len = 0 ;
 for (r = i ; (r != (-1)) && (First [r] == (-1)) ; r = Parent [r])
 {
     First [r] = k ;
     len++ ;
 }
 if (r == (-1))
 {
     len-- ;
 }
 else
 {
     len += Level [r] ;
 }
 for (s = i ; s != r ; s = Parent [s])
 {
     Level [s] = len-- ;
 }
    }
    fl = 0.0 ;
    if (stype == 0)
    {
 Ipost = PrevNbr ;
 for (k = 0 ; k < nrow ; k++)
 {
     Ipost [Post [k]] = k ;
 }
 use_fset = (fset != ((void *)0)) ;
 if (use_fset)
 {
     nf = fsize ;
     for (j = 0 ; j < ncol ; j++)
     {
  Anext [j] = -2 ;
     }
     for (jj = 0 ; jj < nf ; jj++)
     {
  j = fset [jj] ;
  if (j < 0 || j > ncol || Anext [j] != -2)
  {
      cholmod_l_error ((-4), "../Cholesky/cholmod_rowcolcounts.c", 362, "fset invalid", Common) ;
      return (0) ;
  }
  Anext [j] = (-1) ;
     }
     ;
 }
 else
 {
     nf = ncol ;
 }
 for (jj = 0 ; jj < nf ; jj++)
 {
     j = (use_fset) ? (fset [jj]) : jj ;
     p = Ap [j] ;
     pend = (packed) ? (Ap [j+1]) : (p + Anz [j]) ;
     ff = (double) (((0) > (pend - p)) ? (0) : (pend - p)) ;
     fl += ff*ff + ff ;
     if (pend > p)
     {
  k = Ipost [Ai [p]] ;
  for ( ; p < pend ; p++)
  {
      inew = Ipost [Ai [p]] ;
      k = (((k) < (inew)) ? (k) : (inew)) ;
  }
  ;
  Anext [j] = Head [k] ;
  Head [k] = j ;
     }
 }
    }
    if (RowCount != ((void *)0))
    {
 for (i = 0 ; i < nrow ; i++)
 {
     RowCount [i] = 1 ;
 }
    }
    for (i = 0 ; i < nrow ; i++)
    {
 PrevLeaf [i] = (-1) ;
 PrevNbr [i] = (-1) ;
 SetParent [i] = i ;
    }
    if (stype != 0)
    {
 anz = nrow ;
 for (k = 0 ; k < nrow ; k++)
 {
     j = initialize_node (k, Post, Parent, ColCount, PrevNbr) ;
     p = Ap [j] ;
     pend = (packed) ? (Ap [j+1]) : (p + Anz [j]) ;
     for ( ; p < pend ; p++)
     {
  i = Ai [p] ;
  if (i > j)
  {
      anz++ ;
      process_edge (j, i, k, First, PrevNbr, ColCount,
       PrevLeaf, RowCount, SetParent, Level) ;
  }
     }
     finalize_node (j, Parent, SetParent) ;
 }
 Common->anz = anz ;
    }
    else
    {
 for (k = 0 ; k < nrow ; k++)
 {
     inode = initialize_node (k, Post, Parent, ColCount, PrevNbr) ;
     for (j = Head [k] ; j != (-1) ; j = Anext [j])
     {
  p = Ap [j] ;
  pend = (packed) ? (Ap [j+1]) : (p + Anz [j]) ;
  for ( ; p < pend ; p++)
  {
      i = Ai [p] ;
      if (PrevNbr [i] < k)
      {
   process_edge (inode, i, k, First, PrevNbr, ColCount,
    PrevLeaf, RowCount, SetParent, Level) ;
      }
  }
     }
     Head [k] = (-1) ;
     finalize_node (inode, Parent, SetParent) ;
 }
    }
    for (j = 0 ; j < nrow ; j++)
    {
 parent = Parent [j] ;
 if (parent != (-1))
 {
     ColCount [parent] += ColCount [j] ;
 }
    }
    Common->mark = (-1) ;
    { Common->mark++ ; if (Common->mark <= 0) { Common->mark = (-1) ; cholmod_l_clear_flag (Common) ; } } ;
    ;
    Common->aatfl = fl ;
    Common->lnz = 0. ;
    fl = 0 ;
    for (j = 0 ; j < nrow ; j++)
    {
 ff = (double) (ColCount [j]) ;
 Common->lnz += ff ;
 fl += ff*ff ;
    }
    Common->fl = fl ;
    ;
    return (1) ;
}

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:
fset
long *

variable_types:
fsize
unsigned long

variable_types:
Parent
long *

variable_types:
Post
long *

variable_types:
RowCount
long *

variable_types:
ColCount
long *

variable_types:
First
long *

variable_types:
Level
long *

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: fl double

variable_types: ff double

variable_types:
Ap
long *

variable_types:
Ai
long *

variable_types:
Anz
long *

variable_types:
PrevNbr
long *

variable_types:
SetParent
long *

variable_types:
Head
long *

variable_types:
PrevLeaf
long *

variable_types:
Anext
long *

variable_types:
Ipost
long *

variable_types:
Iwork
long *

variable_types: i long

variable_types: j long

variable_types: r long

variable_types: k long

variable_types: len long

variable_types: s long

variable_types: p long

variable_types: pend long

variable_types: inew long

variable_types: stype long

variable_types: nf long

variable_types: anz long

variable_types: inode long

variable_types: parent long

variable_types: nrow long

variable_types: ncol long

variable_types: packed long

variable_types: jj long

variable_types:
w
unsigned long

variable_types: ok int


decompiled_code:
__int64 __fastcall initialize_node(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5)
{
__int64 result; // rax
__int64 v6; // rdx

result = *(_QWORD *)(a2 + 8 * a1);
v6 = *(_QWORD *)(a3 + 8 * result);
if ( v6 != -1 )
--*(_QWORD *)(a4 + 8 * v6);
*(_QWORD *)(a5 + 8 * result) = a1;
return result;
}

original_code:
static int initialize_node
(
    long k,
    long Post [ ],
    long Parent [ ],
    long ColCount [ ],
    long PrevNbr [ ]
)
{
    long p, parent ;
    p = Post [k] ;
    parent = Parent [p] ;
    if (parent != (-1))
    {
 ColCount [parent]-- ;
    }
    PrevNbr [p] = k ;
    return (p) ;
}

canonical_original_code:
static int initialize_node(long k, long Post[], long Parent[], long ColCount[], long PrevNbr[])
{
    long p; long parent;
    p = Post [k] ;
    parent = Parent [p] ;
    if (parent != (-1))
    {
 ColCount [parent]-- ;
    }
    PrevNbr [p] = k ;
    return (p) ;
}

variable_types: k long

variable_types:
Post
long []

variable_types:
Parent
long []

variable_types:
ColCount
long []

variable_types:
PrevNbr
long []


decompiled_code:
__int64 __fastcall finalize_node(__int64 a1, __int64 a2, __int64 a3)
{
__int64 result; // rax

result = *(_QWORD *)(a2 + 8 * a1);
if ( result != -1 )
*(_QWORD *)(a3 + 8 * a1) = result;
return result;
}

canonical_decompiled_code:
__int64 __fastcall func1(__int64 a1, __int64 a2, __int64 a3)
{
__int64 result; // rax

result = *(_QWORD *)(a2 + 8 * a1);
if ( result != -1 )
*(_QWORD *)(a3 + 8 * a1) = result;
return result;
}

original_code:
static void finalize_node
(
    long p,
    long Parent [ ],
    long SetParent [ ]
)
{
    if (Parent [p] != (-1))
    {
 SetParent [p] = Parent [p] ;
    }
}

canonical_original_code:
static void finalize_node(long p, long Parent[], long SetParent[])
{
    if (Parent [p] != (-1))
    {
 SetParent [p] = Parent [p] ;
    }
}

variable_types: p long

variable_types:
SetParent
long []


original_code:
void umfdi_scale_column
(
    NumericType *Numeric,
    WorkType *Work
)
{
    double pivot_value ;
    double *Fcol, *Flublock, *Flblock, *Fublock, *Fcblock ;
    int k, k1, fnr_curr, fnrows, fncols, *Frpos, *Fcpos, pivrow, pivcol,
 *Frows, *Fcols, fnc_curr, fnpiv, *Row_tuples, nb,
 *Col_tuples, *Rperm, *Cperm, fspos, col2, row2 ;
    fnrows = Work->fnrows ;
    fncols = Work->fncols ;
    fnpiv = Work->fnpiv ;
    Rperm = Numeric->Rperm ;
    Cperm = Numeric->Cperm ;
    Flublock = Work->Flublock ;
    Flblock = Work->Flblock ;
    Fublock = Work->Fublock ;
    Fcblock = Work->Fcblock ;
    fnr_curr = Work->fnr_curr ;
    fnc_curr = Work->fnc_curr ;
    Frpos = Work->Frpos ;
    Fcpos = Work->Fcpos ;
    Frows = Work->Frows ;
    Fcols = Work->Fcols ;
    pivrow = Work->pivrow ;
    pivcol = Work->pivcol ;
    ;
    ;
    Row_tuples = Numeric->Uip ;
    Col_tuples = Numeric->Lip ;
    nb = Work->nb ;
    fspos = Fcpos [pivcol] ;
    fncols = --(Work->fncols) ;
    if (fspos != fncols * fnr_curr)
    {
 int fs = fspos / fnr_curr ;
 ;
 ;
 {
     int i ;
     double *Fs, *Fe ;
     Fs = Fcblock + fspos ;
     Fe = Fcblock + fncols * fnr_curr ;
#pragma ivdep
     for (i = 0 ; i < fnrows ; i++)
     {
  Fs [i] = Fe [i] ;
     }
 }
 {
     int i ;
     double *Fs, *Fe ;
     Fs = Fublock + fs ;
     Fe = Fublock + fncols ;
#pragma ivdep
     for (i = 0 ; i < fnpiv ; i++)
     {
  Fs [i * fnc_curr] = Fe [i * fnc_curr] ;
     }
 }
 col2 = Fcols [fncols] ;
 Fcols [fs] = col2 ;
 Fcpos [col2] = fspos ;
    }
    Fcpos [pivcol] = (-1) ;
    fspos = Frpos [pivrow] ;
    fnrows = --(Work->fnrows) ;
    ;
    ;
    if (fspos == fnrows)
    {
 ;
 {
     int j ;
     double *Fd, *Fs ;
     Fd = Fublock + fnpiv * fnc_curr ;
     Fs = Fcblock + fspos ;
#pragma ivdep
     for (j = 0 ; j < fncols ; j++)
     {
  Fd [j] = Fs [j * fnr_curr] ;
     }
 }
 if (Work->pivrow_in_front)
 {
     int j ;
     double *Fd, *Fs ;
     Fd = Flublock + fnpiv ;
     Fs = Flblock + fspos ;
#pragma ivdep
     for (j = 0 ; j <= fnpiv ; j++)
     {
  Fd [j * nb] = Fs [j * fnr_curr] ;
     }
 }
 else
 {
     int j ;
     double *Fd, *Fs ;
     Fd = Flublock + fnpiv ;
     Fs = Flblock + fspos ;
#pragma ivdep
     for (j = 0 ; j < fnpiv ; j++)
     {
  ;
  { (Fd [j * nb]) = 0. ; } ;
     }
     Fd [fnpiv * nb] = Fs [fnpiv * fnr_curr] ;
 }
    }
    else
    {
 ;
 {
     double *Fd, *Fs, *Fe ;
     Fd = Fublock + fnpiv * fnc_curr ;
     Fs = Fcblock + fspos ;
     Fe = Fcblock + fnrows ;
     shift_pivot_row (Fd, Fs, Fe, fncols, fnr_curr) ;
 }
 if (Work->pivrow_in_front)
 {
     int j ;
     double *Fd, *Fs, *Fe ;
     Fd = Flublock + fnpiv ;
     Fs = Flblock + fspos ;
     Fe = Flblock + fnrows ;
#pragma ivdep
     for (j = 0 ; j <= fnpiv ; j++)
     {
  Fd [j * nb] = Fs [j * fnr_curr] ;
  Fs [j * fnr_curr] = Fe [j * fnr_curr] ;
     }
 }
 else
 {
     int j ;
     double *Fd, *Fs, *Fe ;
     Fd = Flublock + fnpiv ;
     Fs = Flblock + fspos ;
     Fe = Flblock + fnrows ;
#pragma ivdep
     for (j = 0 ; j < fnpiv ; j++)
     {
  ;
  { (Fd [j * nb]) = 0. ; } ;
  Fs [j * fnr_curr] = Fe [j * fnr_curr] ;
     }
     Fd [fnpiv * nb] = Fs [fnpiv * fnr_curr] ;
     Fs [fnpiv * fnr_curr] = Fe [fnpiv * fnr_curr] ;
 }
 row2 = Frows [fnrows] ;
 Frows [fspos] = row2 ;
 Frpos [row2] = fspos ;
    }
    Frpos [pivrow] = (-1) ;
    Fcol = Flblock + fnpiv * fnr_curr ;
    pivot_value = Flublock [fnpiv + fnpiv * nb] ;
    k = Work->npiv + fnpiv ;
    ;
    ;
    ;
    umfdi_scale (fnrows, pivot_value, Fcol) ;
    umfdi_mem_free_tail_block (Numeric, Row_tuples [pivrow]) ;
    umfdi_mem_free_tail_block (Numeric, Col_tuples [pivcol]) ;
    Row_tuples [pivrow] = 0 ;
    Col_tuples [pivcol] = 0 ;
    ;
    ;
    ;
    k1 = (-(k)-1) ;
    Rperm [pivrow] = k1 ;
    Cperm [pivcol] = k1 ;
    ;
    ;
    ;
    Work->Pivrow [fnpiv] = pivrow ;
    Work->Pivcol [fnpiv] = pivcol ;
    Work->fnpiv++ ;
}

canonical_original_code:
void umfdi_scale_column(struct NumericType *Numeric, struct WorkType *Work)
{
    double pivot_value;
    double *Fcol; double *Flublock; double *Flblock; double *Fublock; double *Fcblock;
    int k; int k1; int fnr_curr; int fnrows; int fncols; int *Frpos; int *Fcpos; int pivrow; int pivcol; int *Frows; int *Fcols; int fnc_curr; int fnpiv; int *Row_tuples; int nb; int *Col_tuples; int *Rperm; int *Cperm; int fspos; int col2; int row2;
    fnrows = Work->fnrows ;
    fncols = Work->fncols ;
    fnpiv = Work->fnpiv ;
    Rperm = Numeric->Rperm ;
    Cperm = Numeric->Cperm ;
    Flublock = Work->Flublock ;
    Flblock = Work->Flblock ;
    Fublock = Work->Fublock ;
    Fcblock = Work->Fcblock ;
    fnr_curr = Work->fnr_curr ;
    fnc_curr = Work->fnc_curr ;
    Frpos = Work->Frpos ;
    Fcpos = Work->Fcpos ;
    Frows = Work->Frows ;
    Fcols = Work->Fcols ;
    pivrow = Work->pivrow ;
    pivcol = Work->pivcol ;
    ;
    ;
    Row_tuples = Numeric->Uip ;
    Col_tuples = Numeric->Lip ;
    nb = Work->nb ;
    fspos = Fcpos [pivcol] ;
    fncols = --(Work->fncols) ;
    if (fspos != fncols * fnr_curr)
    {
 int fs = fspos / fnr_curr;
 ;
 ;
 {
     int i;
     double *Fs; double *Fe;
     Fs = Fcblock + fspos ;
     Fe = Fcblock + fncols * fnr_curr ;
#pragma ivdep
     for (i = 0 ; i < fnrows ; i++)
     {
  Fs [i] = Fe [i] ;
     }
 }
 {
     int i;
     double *Fs; double *Fe;
     Fs = Fublock + fs ;
     Fe = Fublock + fncols ;
#pragma ivdep
     for (i = 0 ; i < fnpiv ; i++)
     {
  Fs [i * fnc_curr] = Fe [i * fnc_curr] ;
     }
 }
 col2 = Fcols [fncols] ;
 Fcols [fs] = col2 ;
 Fcpos [col2] = fspos ;
    }
    Fcpos [pivcol] = (-1) ;
    fspos = Frpos [pivrow] ;
    fnrows = --(Work->fnrows) ;
    ;
    ;
    if (fspos == fnrows)
    {
 ;
 {
     int j;
     double *Fd; double *Fs;
     Fd = Fublock + fnpiv * fnc_curr ;
     Fs = Fcblock + fspos ;
#pragma ivdep
     for (j = 0 ; j < fncols ; j++)
     {
  Fd [j] = Fs [j * fnr_curr] ;
     }
 }
 if (Work->pivrow_in_front)
 {
     int j;
     double *Fd; double *Fs;
     Fd = Flublock + fnpiv ;
     Fs = Flblock + fspos ;
#pragma ivdep
     for (j = 0 ; j <= fnpiv ; j++)
     {
  Fd [j * nb] = Fs [j * fnr_curr] ;
     }
 }
 else
 {
     int j;
     double *Fd; double *Fs;
     Fd = Flublock + fnpiv ;
     Fs = Flblock + fspos ;
#pragma ivdep
     for (j = 0 ; j < fnpiv ; j++)
     {
  ;
  { (Fd [j * nb]) = 0. ; } ;
     }
     Fd [fnpiv * nb] = Fs [fnpiv * fnr_curr] ;
 }
    }
    else
    {
 ;
 {
     double *Fd; double *Fs; double *Fe;
     Fd = Fublock + fnpiv * fnc_curr ;
     Fs = Fcblock + fspos ;
     Fe = Fcblock + fnrows ;
     shift_pivot_row (Fd, Fs, Fe, fncols, fnr_curr) ;
 }
 if (Work->pivrow_in_front)
 {
     int j;
     double *Fd; double *Fs; double *Fe;
     Fd = Flublock + fnpiv ;
     Fs = Flblock + fspos ;
     Fe = Flblock + fnrows ;
#pragma ivdep
     for (j = 0 ; j <= fnpiv ; j++)
     {
  Fd [j * nb] = Fs [j * fnr_curr] ;
  Fs [j * fnr_curr] = Fe [j * fnr_curr] ;
     }
 }
 else
 {
     int j;
     double *Fd; double *Fs; double *Fe;
     Fd = Flublock + fnpiv ;
     Fs = Flblock + fspos ;
     Fe = Flblock + fnrows ;
#pragma ivdep
     for (j = 0 ; j < fnpiv ; j++)
     {
  ;
  { (Fd [j * nb]) = 0. ; } ;
  Fs [j * fnr_curr] = Fe [j * fnr_curr] ;
     }
     Fd [fnpiv * nb] = Fs [fnpiv * fnr_curr] ;
     Fs [fnpiv * fnr_curr] = Fe [fnpiv * fnr_curr] ;
 }
 row2 = Frows [fnrows] ;
 Frows [fspos] = row2 ;
 Frpos [row2] = fspos ;
    }
    Frpos [pivrow] = (-1) ;
    Fcol = Flblock + fnpiv * fnr_curr ;
    pivot_value = Flublock [fnpiv + fnpiv * nb] ;
    k = Work->npiv + fnpiv ;
    ;
    ;
    ;
    umfdi_scale (fnrows, pivot_value, Fcol) ;
    umfdi_mem_free_tail_block (Numeric, Row_tuples [pivrow]) ;
    umfdi_mem_free_tail_block (Numeric, Col_tuples [pivcol]) ;
    Row_tuples [pivrow] = 0 ;
    Col_tuples [pivcol] = 0 ;
    ;
    ;
    ;
    k1 = (-(k)-1) ;
    Rperm [pivrow] = k1 ;
    Cperm [pivcol] = k1 ;
    ;
    ;
    ;
    Work->Pivrow [fnpiv] = pivrow ;
    Work->Pivcol [fnpiv] = pivcol ;
    Work->fnpiv++ ;
}

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; double *D; int do_recip; double *Rs; int n_row; int tail_usage; int maxnrows; } *

variable_types: struct WorkType { int *E; double *Wx; int *Wp; int *Lpattern; int *Diagonal_map; int n_row; int *Front_new1strow; int Pivrow[64]; double *Flublock; int *Frows; } *

variable_types:
Fcol
double *

variable_types:
Flublock
double *

variable_types:
Flblock
double *

variable_types:
Fublock
double *

variable_types:
Fcblock
double *

variable_types: k int

variable_types: fnrows int

variable_types: fncols int

variable_types:
Frpos
int *

variable_types:
Fcpos
int *

variable_types: pivrow int

variable_types: pivcol int

variable_types:
Frows
int *

variable_types:
Fcols
int *

variable_types: fnpiv int

variable_types: nb int

variable_types:
Rperm
int *

variable_types:
Cperm
int *

variable_types: fspos int

variable_types: fs int

variable_types: i int

variable_types:
Fs
double *

variable_types:
Fe
double *

variable_types: j int

variable_types:
Fd
double *

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


decompiled_code:
__int64 __fastcall shift_pivot_row(_QWORD *a1, __int64 a2, __int64 a3, int a4, int a5)
{
__int64 result; // rax
_QWORD *v8; // rdx
__int64 v9; // rcx
__int64 v10; // r8

result = (unsigned int)a4;
if ( a4 > 0 )
{
v8 = a1;
v9 = 8LL * a5;
v10 = (__int64)&a1[(unsigned int)(result - 1) + 1];
result = 0LL;
do
{
*v8 = *(_QWORD *)(a2 + result);
*(_QWORD *)(a2 + result) = *(_QWORD *)(a3 + result);
++v8;
result += v9;
}
while ( v8 != (_QWORD *)v10 );
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(_QWORD *a1, __int64 a2, __int64 a3, int a4, int a5)
{
__int64 result; // rax
_QWORD *v8; // rdx
__int64 v9; // rcx
__int64 v10; // r8

result = (unsigned int)a4;
if ( a4 > 0 )
{
v8 = a1;
v9 = 8LL * a5;
v10 = (__int64)&a1[(unsigned int)(result - 1) + 1];
result = 0LL;
do
{
*v8 = *(_QWORD *)(a2 + result);
*(_QWORD *)(a2 + result) = *(_QWORD *)(a3 + result);
++v8;
result += v9;
}
while ( v8 != (_QWORD *)v10 );
}
return result;
}

original_code:
static void shift_pivot_row (double *Fd, double *Fs, double *Fe, int len, int d)
{
    int j ;
#pragma ivdep
    for (j = 0 ; j < len ; j++)
    {
 Fd [j] = Fs [j*d] ;
 Fs [j*d] = Fe [j*d] ;
    }
}

canonical_original_code:
static void shift_pivot_row(double *Fd, double *Fs, double *Fe, int len, int d)
{
    int j;
#pragma ivdep
    for (j = 0 ; j < len ; j++)
    {
 Fd [j] = Fs [j*d] ;
 Fs [j*d] = Fe [j*d] ;
    }
}

variable_types: len int

variable_types: d int