original_code:
long umfdl_row_search
(
    NumericType *Numeric,
    WorkType *Work,
    SymbolicType *Symbolic,
    long cdeg0,
    long cdeg1,
    const long Pattern [ ],
    const long Pos [ ],
    long pivrow [2],
    long rdeg [2],
    long W_i [ ],
    long W_o [ ],
    long prior_pivrow [2],
    const double Wxy [ ],
    long pivcol,
    long freebie [ ]
)
{
    double maxval, toler, toler2, value, pivot [2] ;
    long i, row, deg, col, *Frpos, fnrows, *E, j, ncols, *Cols, *Rows,
 e, f, Wrpflag, *Fcpos, fncols, tpi, max_rdeg, nans_in_col, was_offdiag,
 diag_row, prefer_diagonal, *Wrp, found, *Diagonal_map ;
    Tuple *tp, *tpend, *tp1, *tp2 ;
    Unit *Memory, *p ;
    Element *ep ;
    long *Row_tuples, *Row_degree, *Row_tlen ;
    pivot [0] = 0. ;
    pivot [1] = 0. ;
    Row_degree = Numeric->Rperm ;
    Row_tuples = Numeric->Uip ;
    Row_tlen = Numeric->Uilen ;
    Wrp = Work->Wrp ;
    Frpos = Work->Frpos ;
    E = Work->E ;
    Memory = Numeric->Memory ;
    fnrows = Work->fnrows ;
    prefer_diagonal = Symbolic->prefer_diagonal ;
    Diagonal_map = Work->Diagonal_map ;
    if (Diagonal_map)
    {
 diag_row = Diagonal_map [pivcol] ;
 was_offdiag = diag_row < 0 ;
 if (was_offdiag)
 {
     diag_row = (-(diag_row)-2) ;
 }
 ;
    }
    else
    {
 diag_row = (-1) ;
 was_offdiag = (-1) ;
    }
    max_rdeg = Work->fncols_max ;
    maxval = 0.0 ;
    nans_in_col = (0) ;
    for (i = 0 ; i < cdeg1 ; i++)
    {
 { (value) = ((((Wxy [i]) < 0.)) ? -(Wxy [i]) : (Wxy [i])) ; } ;
 if (((value) != (value)))
 {
     nans_in_col = (1) ;
     maxval = value ;
     break ;
 }
 maxval = (((maxval) > (value)) ? (maxval) : (value)) ;
    }
    toler = Numeric->relpt * maxval ;
    toler2 = Numeric->relpt2 * maxval ;
    toler2 = was_offdiag ? toler : toler2 ;
    ;
    if (((toler) != (toler)) || ((toler2) != (toler2)))
    {
 nans_in_col = (1) ;
    }
    if (!nans_in_col)
    {
 found = (0) ;
 ;
 if (prefer_diagonal)
 {
     ;
     i = Pos [diag_row] ;
     if (i >= 0)
     {
  double a ;
  ;
  ;
  { (a) = ((((Wxy [i]) < 0.)) ? -(Wxy [i]) : (Wxy [i])) ; } ;
  ;
  ;
  if (((a) != 0.) && a >= toler2)
  {
      ;
      found = (1) ;
      if (Frpos [diag_row] >= 0 && Frpos [diag_row] < fnrows)
      {
   pivrow [0] = diag_row ;
   pivrow [1] = (-1) ;
      }
      else
      {
   pivrow [0] = (-1) ;
   pivrow [1] = diag_row ;
      }
  }
     }
 }
 if (!found)
 {
     if (cdeg0 > 0)
     {
  for (i = 0 ; i < cdeg0 ; i++)
  {
      double a ;
      { (a) = ((((Wxy [i]) < 0.)) ? -(Wxy [i]) : (Wxy [i])) ; } ;
      ;
      ;
      if (((a) != 0.) && a >= toler)
      {
   row = Pattern [i] ;
   deg = Row_degree [row] ;
   ;
   ;
   ;
   if (deg < rdeg [0]
          || (deg == rdeg [0] && a > pivot [0])
      )
   {
       pivrow [0] = row ;
       rdeg [0] = deg ;
       pivot [0] = a ;
   }
      }
  }
  for ( ; i < cdeg1 ; i++)
  {
      double a ;
      { (a) = ((((Wxy [i]) < 0.)) ? -(Wxy [i]) : (Wxy [i])) ; } ;
      ;
      ;
      if (((a) != 0.) && a >= toler)
      {
   row = Pattern [i] ;
   deg = Row_degree [row] ;
   ;
   ;
   if (deg < rdeg [1]
          || (deg == rdeg [1] && a > pivot [1])
      )
   {
       pivrow [1] = row ;
       rdeg [1] = deg ;
       pivot [1] = a ;
   }
      }
  }
     }
     else
     {
  for (i = 0 ; i < cdeg1 ; i++)
  {
      double a ;
      { (a) = ((((Wxy [i]) < 0.)) ? -(Wxy [i]) : (Wxy [i])) ; } ;
      ;
      ;
      if (((a) != 0.) && a >= toler)
      {
   row = Pattern [i] ;
   deg = Row_degree [row] ;
   if (Frpos [row] >= 0 && Frpos [row] < fnrows)
   {
       ;
       if (deg < rdeg [0]
          || (deg == rdeg [0] && a > pivot [0])
          )
       {
    pivrow [0] = row ;
    rdeg [0] = deg ;
    pivot [0] = a ;
       }
   }
   else
   {
       ;
       if (deg < rdeg [1]
          || (deg == rdeg[1] && a > pivot [1])
          )
       {
    pivrow [1] = row ;
    rdeg [1] = deg ;
    pivot [1] = a ;
       }
   }
      }
  }
     }
 }
    }
    if (cdeg1 > 0 && pivrow [0] == (-1) && pivrow [1] == (-1))
    {
 ;
 row = Pattern [0] ;
 deg = Row_degree [row] ;
 if (Frpos [row] >= 0 && Frpos [row] < fnrows)
 {
     ;
     pivrow [0] = row ;
     rdeg [0] = deg ;
 }
 else
 {
     ;
     pivrow [1] = row ;
     rdeg [1] = deg ;
 }
 for (i = 1 ; i < cdeg1 ; i++)
 {
     row = Pattern [i] ;
     deg = Row_degree [row] ;
     if (Frpos [row] >= 0 && Frpos [row] < fnrows)
     {
  ;
  if (deg < rdeg [0] || (deg == rdeg [0] && row == diag_row))
  {
      pivrow [0] = row ;
      rdeg [0] = deg ;
  }
     }
     else
     {
  ;
  if (deg < rdeg [1] || (deg == rdeg [1] && row == diag_row))
  {
      pivrow [1] = row ;
      rdeg [1] = deg ;
  }
     }
 }
    }
    ;
    ;
    if (cdeg1 == 0)
    {
 if (fnrows > 0)
 {
     pivrow [0] = Work->Frows [0] ;
     ;
 }
 else
 {
     long *Front_leftmostdesc, *Front_1strow, *Front_new1strow, row1,
  row2, fleftmost, nfr, n_row, frontid ;
     ;
     Front_leftmostdesc = Symbolic->Front_leftmostdesc ;
     Front_1strow = Symbolic->Front_1strow ;
     Front_new1strow = Work->Front_new1strow ;
     nfr = Symbolic->nfr ;
     n_row = Numeric->n_row ;
     frontid = Work->frontid ;
     ;
     fleftmost = Front_leftmostdesc [frontid] ;
     row1 = Front_new1strow [fleftmost] ;
     row2 = Front_1strow [frontid+1] - 1 ;
     ;
     for (row = row1 ; row <= row2 ; row++)
     {
  ;
  if ((Row_degree [row] >= 0))
  {
      ;
      ;
      pivrow [1] = row ;
      ;
      break ;
  }
     }
     Front_new1strow [fleftmost] = row ;
     if (pivrow [1] == (-1))
     {
  row1 = Front_new1strow [nfr] ;
  row2 = n_row-1 ;
  ;
  for (row = row1 ; row <= row2 ; row++)
  {
      ;
      if ((Row_degree [row] >= 0))
      {
   ;
   ;
   pivrow [1] = row ;
   ;
   break ;
      }
  }
  Front_new1strow [nfr] = row ;
     }
     if (pivrow [1] == (-1))
     {
  ;
  ;
  return ((1)) ;
     }
 }
    }
    if (pivrow [0] != (-1))
    {
 freebie [0] = (pivrow [0] == prior_pivrow [0]) && (cdeg1 > 0) ;
 ;
 if (!freebie [0])
 {
     Fcpos = Work->Fcpos ;
     fncols = Work->fncols ;
     Wrpflag = Work->Wrpflag ;
     rdeg [0] = fncols ;
     ;
     ;
     ;
     if (Fcpos [pivcol] < 0)
     {
  ;
  if (rdeg [0] >= max_rdeg)
  {
      return ((-11)) ;
  }
  Wrp [pivcol] = Wrpflag ;
  W_i [rdeg [0]++] = pivcol ;
     }
     tpi = Row_tuples [pivrow [0]] ;
     if (tpi)
     {
  tp = (Tuple *) (Memory + tpi) ;
  tp1 = tp ;
  tp2 = tp ;
  tpend = tp + Row_tlen [pivrow [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 ;
      ncols = ep->ncols ;
      Rows = Cols + ncols ;
      if (Rows [f] == (-1))
      {
   continue ;
      }
      ;
      for (j = 0 ; j < ncols ; j++)
      {
   col = Cols [j] ;
   ;
   if ((col >= 0) && (Wrp [col] != Wrpflag)
       && Fcpos [col] <0)
   {
       ;
       if (rdeg [0] >= max_rdeg)
       {
    ;
    return ((-11)) ;
       }
       Wrp [col] = Wrpflag ;
       W_i [rdeg [0]++] = col ;
   }
      }
      *tp2++ = *tp ;
  }
  Row_tlen [pivrow [0]] = tp2 - tp1 ;
     }
     Work->Wrpflag++ ;
 }
    }
    if (pivrow [1] != (-1))
    {
 freebie [1] = (pivrow [1] == prior_pivrow [1]) && cdeg1 > 0 ;
 ;
 if (!freebie [1])
 {
     Wrpflag = Work->Wrpflag ;
     rdeg [1] = 0 ;
     ;
     ;
     ;
     ;
     if (rdeg [1] >= max_rdeg)
     {
  return ((-11)) ;
     }
     Wrp [pivcol] = Wrpflag ;
     W_o [rdeg [1]++] = pivcol ;
     tpi = Row_tuples [pivrow [1]] ;
     if (tpi)
     {
  tp = (Tuple *) (Memory + tpi) ;
  tp1 = tp ;
  tp2 = tp ;
  tpend = tp + Row_tlen [pivrow [1]] ;
  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 ;
      ncols = ep->ncols ;
      Rows = Cols + ncols ;
      if (Rows [f] == (-1))
      {
   continue ;
      }
      ;
      for (j = 0 ; j < ncols ; j++)
      {
   col = Cols [j] ;
   ;
   if ((col >= 0) && (Wrp [col] != Wrpflag))
   {
       ;
       if (rdeg [1] >= max_rdeg)
       {
    ;
    return ((-11)) ;
       }
       Wrp [col] = Wrpflag ;
       W_o [rdeg [1]++] = col ;
   }
      }
      *tp2++ = *tp ;
  }
  Row_tlen [pivrow [1]] = tp2 - tp1 ;
     }
     Work->Wrpflag++ ;
 }
    }
    ;
    return ((0)) ;
}

canonical_original_code:
long umfdl_row_search(struct NumericType *Numeric, struct WorkType *Work, struct SymbolicType *Symbolic, long cdeg0, long cdeg1, long Pattern[], long Pos[], long pivrow[2], long rdeg[2], long W_i[], long W_o[], long prior_pivrow[2], double Wxy[], long pivcol, long freebie[])
{
    double maxval; double toler; double toler2; double value; double pivot[2];
    long i; long row; long deg; long col; long *Frpos; long fnrows; long *E; long j; long ncols; long *Cols; long *Rows; long e; long f; long Wrpflag; long *Fcpos; long fncols; long tpi; long max_rdeg; long nans_in_col; long was_offdiag; long diag_row; long prefer_diagonal; long *Wrp; long found; long *Diagonal_map;
    struct Tuple *tp; struct Tuple *tpend; struct Tuple *tp1; struct Tuple *tp2;
    union Unit_union *Memory; union Unit_union *p;
    struct Element *ep;
    long *Row_tuples; long *Row_degree; long *Row_tlen;
    pivot [0] = 0. ;
    pivot [1] = 0. ;
    Row_degree = Numeric->Rperm ;
    Row_tuples = Numeric->Uip ;
    Row_tlen = Numeric->Uilen ;
    Wrp = Work->Wrp ;
    Frpos = Work->Frpos ;
    E = Work->E ;
    Memory = Numeric->Memory ;
    fnrows = Work->fnrows ;
    prefer_diagonal = Symbolic->prefer_diagonal ;
    Diagonal_map = Work->Diagonal_map ;
    if (Diagonal_map)
    {
 diag_row = Diagonal_map [pivcol] ;
 was_offdiag = diag_row < 0 ;
 if (was_offdiag)
 {
     diag_row = (-(diag_row)-2) ;
 }
 ;
    }
    else
    {
 diag_row = (-1) ;
 was_offdiag = (-1) ;
    }
    max_rdeg = Work->fncols_max ;
    maxval = 0.0 ;
    nans_in_col = (0) ;
    for (i = 0 ; i < cdeg1 ; i++)
    {
 { (value) = ((((Wxy [i]) < 0.)) ? -(Wxy [i]) : (Wxy [i])) ; } ;
 if (((value) != (value)))
 {
     nans_in_col = (1) ;
     maxval = value ;
     break ;
 }
 maxval = (((maxval) > (value)) ? (maxval) : (value)) ;
    }
    toler = Numeric->relpt * maxval ;
    toler2 = Numeric->relpt2 * maxval ;
    toler2 = was_offdiag ? toler : toler2 ;
    ;
    if (((toler) != (toler)) || ((toler2) != (toler2)))
    {
 nans_in_col = (1) ;
    }
    if (!nans_in_col)
    {
 found = (0) ;
 ;
 if (prefer_diagonal)
 {
     ;
     i = Pos [diag_row] ;
     if (i >= 0)
     {
  double a;
  ;
  ;
  { (a) = ((((Wxy [i]) < 0.)) ? -(Wxy [i]) : (Wxy [i])) ; } ;
  ;
  ;
  if (((a) != 0.) && a >= toler2)
  {
      ;
      found = (1) ;
      if (Frpos [diag_row] >= 0 && Frpos [diag_row] < fnrows)
      {
   pivrow [0] = diag_row ;
   pivrow [1] = (-1) ;
      }
      else
      {
   pivrow [0] = (-1) ;
   pivrow [1] = diag_row ;
      }
  }
     }
 }
 if (!found)
 {
     if (cdeg0 > 0)
     {
  for (i = 0 ; i < cdeg0 ; i++)
  {
      double a;
      { (a) = ((((Wxy [i]) < 0.)) ? -(Wxy [i]) : (Wxy [i])) ; } ;
      ;
      ;
      if (((a) != 0.) && a >= toler)
      {
   row = Pattern [i] ;
   deg = Row_degree [row] ;
   ;
   ;
   ;
   if (deg < rdeg [0]
          || (deg == rdeg [0] && a > pivot [0])
      )
   {
       pivrow [0] = row ;
       rdeg [0] = deg ;
       pivot [0] = a ;
   }
      }
  }
  for ( ; i < cdeg1 ; i++)
  {
      double a;
      { (a) = ((((Wxy [i]) < 0.)) ? -(Wxy [i]) : (Wxy [i])) ; } ;
      ;
      ;
      if (((a) != 0.) && a >= toler)
      {
   row = Pattern [i] ;
   deg = Row_degree [row] ;
   ;
   ;
   if (deg < rdeg [1]
          || (deg == rdeg [1] && a > pivot [1])
      )
   {
       pivrow [1] = row ;
       rdeg [1] = deg ;
       pivot [1] = a ;
   }
      }
  }
     }
     else
     {
  for (i = 0 ; i < cdeg1 ; i++)
  {
      double a;
      { (a) = ((((Wxy [i]) < 0.)) ? -(Wxy [i]) : (Wxy [i])) ; } ;
      ;
      ;
      if (((a) != 0.) && a >= toler)
      {
   row = Pattern [i] ;
   deg = Row_degree [row] ;
   if (Frpos [row] >= 0 && Frpos [row] < fnrows)
   {
       ;
       if (deg < rdeg [0]
          || (deg == rdeg [0] && a > pivot [0])
          )
       {
    pivrow [0] = row ;
    rdeg [0] = deg ;
    pivot [0] = a ;
       }
   }
   else
   {
       ;
       if (deg < rdeg [1]
          || (deg == rdeg[1] && a > pivot [1])
          )
       {
    pivrow [1] = row ;
    rdeg [1] = deg ;
    pivot [1] = a ;
       }
   }
      }
  }
     }
 }
    }
    if (cdeg1 > 0 && pivrow [0] == (-1) && pivrow [1] == (-1))
    {
 ;
 row = Pattern [0] ;
 deg = Row_degree [row] ;
 if (Frpos [row] >= 0 && Frpos [row] < fnrows)
 {
     ;
     pivrow [0] = row ;
     rdeg [0] = deg ;
 }
 else
 {
     ;
     pivrow [1] = row ;
     rdeg [1] = deg ;
 }
 for (i = 1 ; i < cdeg1 ; i++)
 {
     row = Pattern [i] ;
     deg = Row_degree [row] ;
     if (Frpos [row] >= 0 && Frpos [row] < fnrows)
     {
  ;
  if (deg < rdeg [0] || (deg == rdeg [0] && row == diag_row))
  {
      pivrow [0] = row ;
      rdeg [0] = deg ;
  }
     }
     else
     {
  ;
  if (deg < rdeg [1] || (deg == rdeg [1] && row == diag_row))
  {
      pivrow [1] = row ;
      rdeg [1] = deg ;
  }
     }
 }
    }
    ;
    ;
    if (cdeg1 == 0)
    {
 if (fnrows > 0)
 {
     pivrow [0] = Work->Frows [0] ;
     ;
 }
 else
 {
     long *Front_leftmostdesc; long *Front_1strow; long *Front_new1strow; long row1; long row2; long fleftmost; long nfr; long n_row; long frontid;
     ;
     Front_leftmostdesc = Symbolic->Front_leftmostdesc ;
     Front_1strow = Symbolic->Front_1strow ;
     Front_new1strow = Work->Front_new1strow ;
     nfr = Symbolic->nfr ;
     n_row = Numeric->n_row ;
     frontid = Work->frontid ;
     ;
     fleftmost = Front_leftmostdesc [frontid] ;
     row1 = Front_new1strow [fleftmost] ;
     row2 = Front_1strow [frontid+1] - 1 ;
     ;
     for (row = row1 ; row <= row2 ; row++)
     {
  ;
  if ((Row_degree [row] >= 0))
  {
      ;
      ;
      pivrow [1] = row ;
      ;
      break ;
  }
     }
     Front_new1strow [fleftmost] = row ;
     if (pivrow [1] == (-1))
     {
  row1 = Front_new1strow [nfr] ;
  row2 = n_row-1 ;
  ;
  for (row = row1 ; row <= row2 ; row++)
  {
      ;
      if ((Row_degree [row] >= 0))
      {
   ;
   ;
   pivrow [1] = row ;
   ;
   break ;
      }
  }
  Front_new1strow [nfr] = row ;
     }
     if (pivrow [1] == (-1))
     {
  ;
  ;
  return ((1)) ;
     }
 }
    }
    if (pivrow [0] != (-1))
    {
 freebie [0] = (pivrow [0] == prior_pivrow [0]) && (cdeg1 > 0) ;
 ;
 if (!freebie [0])
 {
     Fcpos = Work->Fcpos ;
     fncols = Work->fncols ;
     Wrpflag = Work->Wrpflag ;
     rdeg [0] = fncols ;
     ;
     ;
     ;
     if (Fcpos [pivcol] < 0)
     {
  ;
  if (rdeg [0] >= max_rdeg)
  {
      return ((-11)) ;
  }
  Wrp [pivcol] = Wrpflag ;
  W_i [rdeg [0]++] = pivcol ;
     }
     tpi = Row_tuples [pivrow [0]] ;
     if (tpi)
     {
  tp = (struct Tuple *) (Memory + tpi) ;
  tp1 = tp ;
  tp2 = tp ;
  tpend = tp + Row_tlen [pivrow [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 ;
      ncols = ep->ncols ;
      Rows = Cols + ncols ;
      if (Rows [f] == (-1))
      {
   continue ;
      }
      ;
      for (j = 0 ; j < ncols ; j++)
      {
   col = Cols [j] ;
   ;
   if ((col >= 0) && (Wrp [col] != Wrpflag)
       && Fcpos [col] <0)
   {
       ;
       if (rdeg [0] >= max_rdeg)
       {
    ;
    return ((-11)) ;
       }
       Wrp [col] = Wrpflag ;
       W_i [rdeg [0]++] = col ;
   }
      }
      *tp2++ = *tp ;
  }
  Row_tlen [pivrow [0]] = tp2 - tp1 ;
     }
     Work->Wrpflag++ ;
 }
    }
    if (pivrow [1] != (-1))
    {
 freebie [1] = (pivrow [1] == prior_pivrow [1]) && cdeg1 > 0 ;
 ;
 if (!freebie [1])
 {
     Wrpflag = Work->Wrpflag ;
     rdeg [1] = 0 ;
     ;
     ;
     ;
     ;
     if (rdeg [1] >= max_rdeg)
     {
  return ((-11)) ;
     }
     Wrp [pivcol] = Wrpflag ;
     W_o [rdeg [1]++] = pivcol ;
     tpi = Row_tuples [pivrow [1]] ;
     if (tpi)
     {
  tp = (struct Tuple *) (Memory + tpi) ;
  tp1 = tp ;
  tp2 = tp ;
  tpend = tp + Row_tlen [pivrow [1]] ;
  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 ;
      ncols = ep->ncols ;
      Rows = Cols + ncols ;
      if (Rows [f] == (-1))
      {
   continue ;
      }
      ;
      for (j = 0 ; j < ncols ; j++)
      {
   col = Cols [j] ;
   ;
   if ((col >= 0) && (Wrp [col] != Wrpflag))
   {
       ;
       if (rdeg [1] >= max_rdeg)
       {
    ;
    return ((-11)) ;
       }
       Wrp [col] = Wrpflag ;
       W_o [rdeg [1]++] = col ;
   }
      }
      *tp2++ = *tp ;
  }
  Row_tlen [pivrow [1]] = tp2 - tp1 ;
     }
     Work->Wrpflag++ ;
 }
    }
    ;
    return ((0)) ;
}

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: struct SymbolicType { double num_mem_usage_est; long valid; } *

variable_types:
Pattern
long []

variable_types:
Pos
long []

variable_types:
pivrow
long [2]

variable_types:
rdeg
long [2]

variable_types:
Wxy
double []

variable_types: pivcol long

variable_types:
freebie
long []

variable_types: maxval double

variable_types: toler double

variable_types: value double

variable_types:
pivot
double [2]

variable_types: i long

variable_types: row long

variable_types: deg long

variable_types: col long

variable_types:
Frpos
long *

variable_types: fnrows long

variable_types:
E
long *

variable_types: j long

variable_types: ncols long

variable_types:
Cols
long *

variable_types:
Rows
long *

variable_types: e long

variable_types: f long

variable_types: Wrpflag long

variable_types:
Fcpos
long *

variable_types: fncols long

variable_types: tpi long

variable_types:
Wrp
long *

variable_types: found long

variable_types:
tp
struct Tuple { long e; } *

variable_types:
tpend
struct Tuple { long e; } *

variable_types:
ep
struct Element { long cdeg; } *

variable_types: a double

variable_types: fleftmost long

variable_types: nfr long

variable_types: frontid 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; }


decompiled_code:
__int64 __fastcall umfpack_dl_symbolic(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, __int64 a7, __int64 a8)
{
return umfpack_dl_qsymbolic(a1, a2, a3, a4, a5, 0LL, a6, a7, a8);
}

canonical_decompiled_code:
__int64 __fastcall func0(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, __int64 a6, __int64 a7, __int64 a8)
{
return umfpack_dl_qsymbolic(a1, a2, a3, a4, a5, 0LL, a6, a7, a8);
}

original_code:
long umfpack_dl_symbolic
(
    long n_row,
    long n_col,
    const long Ap [ ],
    const long Ai [ ],
    const double Ax [ ],
    void **SymbolicHandle,
    const double Control [20],
    double Info [90]
)
{
    return (umfpack_dl_qsymbolic (n_row, n_col, Ap, Ai, Ax,
        (long *) ((void *)0), SymbolicHandle, Control, Info)) ;
}

canonical_original_code:
long umfpack_dl_symbolic(long n_row, long n_col, long Ap[], long Ai[], double Ax[], void **SymbolicHandle, double Control[20], double Info[90])
{
    return (umfpack_dl_qsymbolic (n_row, n_col, Ap, Ai, Ax,
        (long *) ((void *)0), SymbolicHandle, Control, Info)) ;
}

variable_types:
Ap
long []

variable_types:
Ai
long []

variable_types:
Ax
double []

variable_types:
SymbolicHandle
void **

variable_types:
Control
double [20]

variable_types:
Info
double [90]

return_type: long


decompiled_code:
__int64 __fastcall umf_l_report_perm(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5)
{
__int64 i; // rax
__int64 v7; // r13
__int64 j; // rbx
__int64 result; // rax
__int64 v10; // rbp
__int64 *v11; // rax
__int64 v12; // rdx
bool v14; // [rsp+1Fh] [rbp-39h]

v14 = a4 > 3 || a5 != 0;
if ( !v14 )
goto LABEL_4;
if ( amd_printf )
{
amd_printf("permutation vector, n = %ld. ", a1);
LABEL_4:
if ( a1 <= 0 )
{
if ( amd_printf )
amd_printf("ERROR: length of permutation is <= 0\n\n");
return -6LL;
}
if ( !a2 )
{
if ( amd_printf )
amd_printf("(not present)\n\n");
return 0LL;
}
goto LABEL_6;
}
if ( a1 <= 0 )
return -6LL;
if ( !a2 )
return 0LL;
LABEL_6:
if ( !a3 )
{
result = -1LL;
if ( amd_printf )
{
amd_printf("ERROR: out of memory\n\n");
result = -1LL;
}
return result;
}
if ( a4 > 3 && amd_printf )
amd_printf("\n");
for ( i = 0LL; i < a1; ++i )
*(_QWORD *)(a3 + 8 * i) = 1LL;
v7 = a4;
for ( j = 0LL; ; ++j )
{
v10 = *(_QWORD *)(a2 + 8 * j);
if ( v7 > 3 && amd_printf )
amd_printf(" %ld : %ld ", j, *(_QWORD *)(a2 + 8 * j));
if ( v10 < 0 || a1 <= v10 || (v11 = (__int64 *)(a3 + 8 * v10), v12 = *v11, *v11 = 0LL, !v12) )
{
result = -15LL;
if ( amd_printf )
{
amd_printf("ERROR: invalid\n\n");
result = -15LL;
}
return result;
}
if ( v7 <= 3 )
goto LABEL_49;
if ( !amd_printf )
break;
amd_printf("\n", j);
LABEL_49:
if ( a1 <= 10 || v7 != 4 || j != 9 )
goto LABEL_38;
if ( amd_printf )
amd_printf(" ...\n", j);
LABEL_53:
v7 = 3LL;
LABEL_39:
;
}
if ( v7 == 4 && a1 > 10 && j == 9 )
goto LABEL_53;
LABEL_38:
if ( j + 1 < a1 )
goto LABEL_39;
if ( a4 <= 3 )
{
if ( !v14 )
return 0LL;
}
else
{
result = 0LL;
if ( !amd_printf )
return result;
amd_printf(" permutation vector ");
}
if ( amd_printf )
amd_printf("OK\n\n");
return 0LL;
}

canonical_decompiled_code:
__int64 __fastcall func0(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5)
{
__int64 i; // rax
__int64 v7; // r13
__int64 j; // rbx
__int64 result; // rax
__int64 v10; // rbp
__int64 *v11; // rax
__int64 v12; // rdx
bool v14; // [rsp+1Fh] [rbp-39h]

v14 = a4 > 3 || a5 != 0;
if ( !v14 )
goto LABEL_4;
if ( amd_printf )
{
amd_printf("permutation vector, n = %ld. ", a1);
LABEL_4:
if ( a1 <= 0 )
{
if ( amd_printf )
amd_printf("ERROR: length of permutation is <= 0\n\n");
return -6LL;
}
if ( !a2 )
{
if ( amd_printf )
amd_printf("(not present)\n\n");
return 0LL;
}
goto LABEL_6;
}
if ( a1 <= 0 )
return -6LL;
if ( !a2 )
return 0LL;
LABEL_6:
if ( !a3 )
{
result = -1LL;
if ( amd_printf )
{
amd_printf("ERROR: out of memory\n\n");
result = -1LL;
}
return result;
}
if ( a4 > 3 && amd_printf )
amd_printf("\n");
for ( i = 0LL; i < a1; ++i )
*(_QWORD *)(a3 + 8 * i) = 1LL;
v7 = a4;
for ( j = 0LL; ; ++j )
{
v10 = *(_QWORD *)(a2 + 8 * j);
if ( v7 > 3 && amd_printf )
amd_printf(" %ld : %ld ", j, *(_QWORD *)(a2 + 8 * j));
if ( v10 < 0 || a1 <= v10 || (v11 = (__int64 *)(a3 + 8 * v10), v12 = *v11, *v11 = 0LL, !v12) )
{
result = -15LL;
if ( amd_printf )
{
amd_printf("ERROR: invalid\n\n");
result = -15LL;
}
return result;
}
if ( v7 <= 3 )
goto LABEL_49;
if ( !amd_printf )
break;
amd_printf("\n", j);
LABEL_49:
if ( a1 <= 10 || v7 != 4 || j != 9 )
goto LABEL_38;
if ( amd_printf )
amd_printf(" ...\n", j);
LABEL_53:
v7 = 3LL;
LABEL_39:
;
}
if ( v7 == 4 && a1 > 10 && j == 9 )
goto LABEL_53;
LABEL_38:
if ( j + 1 < a1 )
goto LABEL_39;
if ( a4 <= 3 )
{
if ( !v14 )
return 0LL;
}
else
{
result = 0LL;
if ( !amd_printf )
return result;
amd_printf(" permutation vector ");
}
if ( amd_printf )
amd_printf("OK\n\n");
return 0LL;
}

original_code:
long umf_l_report_perm
(
    long n,
    const long P [ ],
    long W [ ],
    long prl,
    long user
)
{
    long i, k, valid, prl1 ;
    ;
    { if (user || prl >= 4) { if (amd_printf != ((void *)0)) (void) amd_printf ("permutation vector, n = ""%" "ld"". ", n) ; } ; } ;
    if (n <= 0)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: length of permutation is <= 0\n\n") ; } ;
 return ((-6)) ;
    }
    if (!P)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("(not present)\n\n") ; } ;
 return ((0)) ;
    }
    if (!W)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: out of memory\n\n") ; } ;
 return ((-1)) ;
    }
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ; } } ;
    for (i = 0 ; i < n ; i++)
    {
 W [i] = (1) ;
    }
    prl1 = prl ;
    for (k = 0 ; k < n ; k++)
    {
 i = P [k] ;
 { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("    ""%" "ld"" : ""%" "ld"" ", (k), (i)) ; } ; } } ;
 valid = (i >= 0 && i < n) ;
 if (valid)
 {
     valid = W [i] ;
     W [i] = (0) ;
 }
 if (!valid)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: invalid\n\n") ; } ;
     return ((-15)) ;
 }
 { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ; } } ;
 if (prl == 4 && k == 9 && n > 10)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("    ...\n") ; } ;
     prl-- ;
 }
    }
    prl = prl1 ;
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("    permutation vector ") ; } ; } } ;
    { if (user || prl >= 4) { if (amd_printf != ((void *)0)) (void) amd_printf ("OK\n\n") ; } ; } ;
    return ((0)) ;
}

canonical_original_code:
long umf_l_report_perm(long n, long P[], long W[], long prl, long user)
{
    long i; long k; long valid; long prl1;
    ;
    { if (user || prl >= 4) { if (amd_printf != ((void *)0)) (void) amd_printf ("permutation vector, n = ""%" "ld"". ", n) ; } ; } ;
    if (n <= 0)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: length of permutation is <= 0\n\n") ; } ;
 return ((-6)) ;
    }
    if (!P)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("(not present)\n\n") ; } ;
 return ((0)) ;
    }
    if (!W)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: out of memory\n\n") ; } ;
 return ((-1)) ;
    }
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ; } } ;
    for (i = 0 ; i < n ; i++)
    {
 W [i] = (1) ;
    }
    prl1 = prl ;
    for (k = 0 ; k < n ; k++)
    {
 i = P [k] ;
 { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("    ""%" "ld"" : ""%" "ld"" ", (k), (i)) ; } ; } } ;
 valid = (i >= 0 && i < n) ;
 if (valid)
 {
     valid = W [i] ;
     W [i] = (0) ;
 }
 if (!valid)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: invalid\n\n") ; } ;
     return ((-15)) ;
 }
 { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ; } } ;
 if (prl == 4 && k == 9 && n > 10)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("    ...\n") ; } ;
     prl-- ;
 }
    }
    prl = prl1 ;
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("    permutation vector ") ; } ; } } ;
    { if (user || prl >= 4) { if (amd_printf != ((void *)0)) (void) amd_printf ("OK\n\n") ; } ; } ;
    return ((0)) ;
}

variable_types: n long

variable_types:
P
long []

variable_types:
W
long []

variable_types: prl long

variable_types: user long

variable_types: i long

variable_types: k long

variable_types: valid long


original_code:
long umfdl_init_front
(
    NumericType *Numeric,
    WorkType *Work
)
{
    long i, j, fnr_curr, row, col, *Frows, *Fcols,
 *Fcpos, *Frpos, fncols, fnrows, *Wrow, fnr2, fnc2, rrdeg, ccdeg, *Wm,
 fnrows_extended ;
    double *Fcblock, *Fl, *Wy, *Wx ;
    if (Work->do_grow)
    {
 fnr2 = (1.2) * Work->fnrows_new + 2 ;
 fnc2 = (1.2) * Work->fncols_new + 2 ;
 if (!umfdl_grow_front (Numeric, fnr2, fnc2, Work,
     Work->pivrow_in_front ? 2 : 0))
 {
     ;
     return ((0)) ;
 }
    }
    ;
    fnr_curr = Work->fnr_curr ;
    ;
    ;
    ;
    ;
    Frows = Work->Frows ;
    Fcols = Work->Fcols ;
    Frpos = Work->Frpos ;
    Fcpos = Work->Fcpos ;
    Work->fnzeros = 0 ;
    ccdeg = Work->ccdeg ;
    rrdeg = Work->rrdeg ;
    fnrows = Work->fnrows ;
    fncols = Work->fncols ;
    ;
    Fl = Work->Flblock ;
    if (Work->pivcol_in_front)
    {
 Work->fscan_row = fnrows ;
 Work->NewRows = Work->Wrp ;
 Wy = Work->Wy ;
 for (i = 0 ; i < fnrows ; i++)
 {
     Fl [i] = Wy [i] ;
 }
 fnrows_extended = fnrows + ccdeg ;
 for (i = fnrows ; i < fnrows_extended ; i++)
 {
     Fl [i] = Wy [i] ;
     row = Frows [i] ;
     Work->NewRows [i] = (-(row)-2) ;
 }
 fnrows = fnrows_extended ;
    }
    else
    {
 Work->fscan_row = 0 ;
 Work->NewRows = Frows ;
 Wm = Work->Wm ;
 Wx = Work->Wx ;
 for (i = 0 ; i < ccdeg ; i++)
 {
     Fl [i] = Wx [i] ;
     row = Wm [i] ;
     Frows [i] = row ;
     Frpos [row] = i ;
 }
 fnrows = ccdeg ;
    }
    Work->fnrows = fnrows ;
    Wrow = Work->Wrow ;
    if (Work->pivrow_in_front)
    {
 Work->fscan_col = fncols ;
 Work->NewCols = Work->Wp ;
 ;
 if (Wrow == Fcols)
 {
     for (j = fncols ; j < rrdeg ; j++)
     {
  col = Wrow [j] ;
  Work->NewCols [j] = (-(col)-2) ;
  Fcpos [col] = j * fnr_curr ;
     }
 }
 else
 {
     for (j = fncols ; j < rrdeg ; j++)
     {
  col = Wrow [j] ;
  Fcols [j] = col ;
  Work->NewCols [j] = (-(col)-2) ;
  Fcpos [col] = j * fnr_curr ;
     }
 }
    }
    else
    {
 Work->fscan_col = 0 ;
 Work->NewCols = Fcols ;
 for (j = 0 ; j < rrdeg ; j++)
 {
     col = Wrow [j] ;
     Fcols [j] = col ;
     Fcpos [col] = j * fnr_curr ;
 }
    }
    ;
    fncols = rrdeg ;
    Work->fncols = fncols ;
    ;
    ;
    Fcblock = Work->Fcblock ;
    ;
    zero_init_front (fncols, fnrows, Fcblock, fnr_curr) ;
    return ((1)) ;
}

canonical_original_code:
long umfdl_init_front(struct NumericType *Numeric, struct WorkType *Work)
{
    long i; long j; long fnr_curr; long row; long col; long *Frows; long *Fcols; long *Fcpos; long *Frpos; long fncols; long fnrows; long *Wrow; long fnr2; long fnc2; long rrdeg; long ccdeg; long *Wm; long fnrows_extended;
    double *Fcblock; double *Fl; double *Wy; double *Wx;
    if (Work->do_grow)
    {
 fnr2 = (1.2) * Work->fnrows_new + 2 ;
 fnc2 = (1.2) * Work->fncols_new + 2 ;
 if (!umfdl_grow_front (Numeric, fnr2, fnc2, Work,
     Work->pivrow_in_front ? 2 : 0))
 {
     ;
     return ((0)) ;
 }
    }
    ;
    fnr_curr = Work->fnr_curr ;
    ;
    ;
    ;
    ;
    Frows = Work->Frows ;
    Fcols = Work->Fcols ;
    Frpos = Work->Frpos ;
    Fcpos = Work->Fcpos ;
    Work->fnzeros = 0 ;
    ccdeg = Work->ccdeg ;
    rrdeg = Work->rrdeg ;
    fnrows = Work->fnrows ;
    fncols = Work->fncols ;
    ;
    Fl = Work->Flblock ;
    if (Work->pivcol_in_front)
    {
 Work->fscan_row = fnrows ;
 Work->NewRows = Work->Wrp ;
 Wy = Work->Wy ;
 for (i = 0 ; i < fnrows ; i++)
 {
     Fl [i] = Wy [i] ;
 }
 fnrows_extended = fnrows + ccdeg ;
 for (i = fnrows ; i < fnrows_extended ; i++)
 {
     Fl [i] = Wy [i] ;
     row = Frows [i] ;
     Work->NewRows [i] = (-(row)-2) ;
 }
 fnrows = fnrows_extended ;
    }
    else
    {
 Work->fscan_row = 0 ;
 Work->NewRows = Frows ;
 Wm = Work->Wm ;
 Wx = Work->Wx ;
 for (i = 0 ; i < ccdeg ; i++)
 {
     Fl [i] = Wx [i] ;
     row = Wm [i] ;
     Frows [i] = row ;
     Frpos [row] = i ;
 }
 fnrows = ccdeg ;
    }
    Work->fnrows = fnrows ;
    Wrow = Work->Wrow ;
    if (Work->pivrow_in_front)
    {
 Work->fscan_col = fncols ;
 Work->NewCols = Work->Wp ;
 ;
 if (Wrow == Fcols)
 {
     for (j = fncols ; j < rrdeg ; j++)
     {
  col = Wrow [j] ;
  Work->NewCols [j] = (-(col)-2) ;
  Fcpos [col] = j * fnr_curr ;
     }
 }
 else
 {
     for (j = fncols ; j < rrdeg ; j++)
     {
  col = Wrow [j] ;
  Fcols [j] = col ;
  Work->NewCols [j] = (-(col)-2) ;
  Fcpos [col] = j * fnr_curr ;
     }
 }
    }
    else
    {
 Work->fscan_col = 0 ;
 Work->NewCols = Fcols ;
 for (j = 0 ; j < rrdeg ; j++)
 {
     col = Wrow [j] ;
     Fcols [j] = col ;
     Fcpos [col] = j * fnr_curr ;
 }
    }
    ;
    fncols = rrdeg ;
    Work->fncols = fncols ;
    ;
    ;
    Fcblock = Work->Fcblock ;
    ;
    zero_init_front (fncols, fnrows, Fcblock, fnr_curr) ;
    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: j long

variable_types: row long

variable_types: col long

variable_types:
Frows
long *

variable_types:
Fcols
long *

variable_types:
Fcpos
long *

variable_types:
Frpos
long *

variable_types: fncols long

variable_types: fnrows long

variable_types:
Wrow
long *

variable_types: rrdeg long

variable_types: ccdeg long

variable_types:
Wm
long *

variable_types:
Fcblock
double *

variable_types:
Fl
double *

variable_types:
Wy
double *

variable_types:
Wx
double *


original_code:
static void zero_init_front (long m, long n, double *Fcblock, long d)
{
    long i, j ;
    double *F, *Fj = Fcblock ;
    for (j = 0 ; j < m ; j++)
    {
 F = Fj ;
 Fj += d ;
 for (i = 0 ; i < n ; i++)
 {
     { (*F) = 0. ; } ;
     F++ ;
 }
    }
}

canonical_original_code:
static void zero_init_front(long m, long n, double *Fcblock, long d)
{
    long i; long j;
    double *F; double *Fj = Fcblock;
    for (j = 0 ; j < m ; j++)
    {
 F = Fj ;
 Fj += d ;
 for (i = 0 ; i < n ; i++)
 {
     { (*F) = 0. ; } ;
     F++ ;
 }
    }
}

variable_types: m long

variable_types: n long

variable_types: d long

variable_types: i long

variable_types: j long

variable_types:
F
double *

variable_types:
Fj
double *

return_type: void


original_code:
int umfpack_zi_get_lunz
(
    int *lnz,
    int *unz,
    int *n_row,
    int *n_col,
    int *nz_udiag,
    void *NumericHandle
)
{
    NumericType *Numeric ;
    Numeric = (NumericType *) NumericHandle ;
    if (!umfzi_valid_numeric (Numeric))
    {
 return ((-3)) ;
    }
    if (!lnz || !unz || !n_row || !n_col || !nz_udiag)
    {
 return ((-5)) ;
    }
    *n_row = Numeric->n_row ;
    *n_col = Numeric->n_col ;
    *lnz = Numeric->lnz + (((Numeric->n_row) < (Numeric->n_col)) ? (Numeric->n_row) : (Numeric->n_col)) ;
    *unz = Numeric->unz + Numeric->nnzpiv ;
    *nz_udiag = Numeric->nnzpiv ;
    return ((0)) ;
}

canonical_original_code:
int umfpack_zi_get_lunz(int *lnz, int *unz, int *n_row, int *n_col, int *nz_udiag, void *NumericHandle)
{
    struct NumericType *Numeric;
    Numeric = (struct NumericType *) NumericHandle ;
    if (!umfzi_valid_numeric (Numeric))
    {
 return ((-3)) ;
    }
    if (!lnz || !unz || !n_row || !n_col || !nz_udiag)
    {
 return ((-5)) ;
    }
    *n_row = Numeric->n_row ;
    *n_col = Numeric->n_col ;
    *lnz = Numeric->lnz + (((Numeric->n_row) < (Numeric->n_col)) ? (Numeric->n_row) : (Numeric->n_col)) ;
    *unz = Numeric->unz + Numeric->nnzpiv ;
    *nz_udiag = Numeric->nnzpiv ;
    return ((0)) ;
}

variable_types:
lnz
int *

variable_types:
unz
int *

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; } *

return_type: int

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 umfzl_init_front
(
    NumericType *Numeric,
    WorkType *Work
)
{
    long i, j, fnr_curr, row, col, *Frows, *Fcols,
 *Fcpos, *Frpos, fncols, fnrows, *Wrow, fnr2, fnc2, rrdeg, ccdeg, *Wm,
 fnrows_extended ;
    DoubleComplex *Fcblock, *Fl, *Wy, *Wx ;
    if (Work->do_grow)
    {
 fnr2 = (1.2) * Work->fnrows_new + 2 ;
 fnc2 = (1.2) * Work->fncols_new + 2 ;
 if (!umfzl_grow_front (Numeric, fnr2, fnc2, Work,
     Work->pivrow_in_front ? 2 : 0))
 {
     ;
     return ((0)) ;
 }
    }
    ;
    fnr_curr = Work->fnr_curr ;
    ;
    ;
    ;
    ;
    Frows = Work->Frows ;
    Fcols = Work->Fcols ;
    Frpos = Work->Frpos ;
    Fcpos = Work->Fcpos ;
    Work->fnzeros = 0 ;
    ccdeg = Work->ccdeg ;
    rrdeg = Work->rrdeg ;
    fnrows = Work->fnrows ;
    fncols = Work->fncols ;
    ;
    Fl = Work->Flblock ;
    if (Work->pivcol_in_front)
    {
 Work->fscan_row = fnrows ;
 Work->NewRows = Work->Wrp ;
 Wy = Work->Wy ;
 for (i = 0 ; i < fnrows ; i++)
 {
     Fl [i] = Wy [i] ;
 }
 fnrows_extended = fnrows + ccdeg ;
 for (i = fnrows ; i < fnrows_extended ; i++)
 {
     Fl [i] = Wy [i] ;
     row = Frows [i] ;
     Work->NewRows [i] = (-(row)-2) ;
 }
 fnrows = fnrows_extended ;
    }
    else
    {
 Work->fscan_row = 0 ;
 Work->NewRows = Frows ;
 Wm = Work->Wm ;
 Wx = Work->Wx ;
 for (i = 0 ; i < ccdeg ; i++)
 {
     Fl [i] = Wx [i] ;
     row = Wm [i] ;
     Frows [i] = row ;
     Frpos [row] = i ;
 }
 fnrows = ccdeg ;
    }
    Work->fnrows = fnrows ;
    Wrow = Work->Wrow ;
    if (Work->pivrow_in_front)
    {
 Work->fscan_col = fncols ;
 Work->NewCols = Work->Wp ;
 ;
 if (Wrow == Fcols)
 {
     for (j = fncols ; j < rrdeg ; j++)
     {
  col = Wrow [j] ;
  Work->NewCols [j] = (-(col)-2) ;
  Fcpos [col] = j * fnr_curr ;
     }
 }
 else
 {
     for (j = fncols ; j < rrdeg ; j++)
     {
  col = Wrow [j] ;
  Fcols [j] = col ;
  Work->NewCols [j] = (-(col)-2) ;
  Fcpos [col] = j * fnr_curr ;
     }
 }
    }
    else
    {
 Work->fscan_col = 0 ;
 Work->NewCols = Fcols ;
 for (j = 0 ; j < rrdeg ; j++)
 {
     col = Wrow [j] ;
     Fcols [j] = col ;
     Fcpos [col] = j * fnr_curr ;
 }
    }
    ;
    fncols = rrdeg ;
    Work->fncols = fncols ;
    ;
    ;
    Fcblock = Work->Fcblock ;
    ;
    zero_init_front (fncols, fnrows, Fcblock, fnr_curr) ;
    return ((1)) ;
}

canonical_original_code:
long umfzl_init_front(struct NumericType *Numeric, struct WorkType *Work)
{
    long i; long j; long fnr_curr; long row; long col; long *Frows; long *Fcols; long *Fcpos; long *Frpos; long fncols; long fnrows; long *Wrow; long fnr2; long fnc2; long rrdeg; long ccdeg; long *Wm; long fnrows_extended;
    struct DoubleComplex *Fcblock; struct DoubleComplex *Fl; struct DoubleComplex *Wy; struct DoubleComplex *Wx;
    if (Work->do_grow)
    {
 fnr2 = (1.2) * Work->fnrows_new + 2 ;
 fnc2 = (1.2) * Work->fncols_new + 2 ;
 if (!umfzl_grow_front (Numeric, fnr2, fnc2, Work,
     Work->pivrow_in_front ? 2 : 0))
 {
     ;
     return ((0)) ;
 }
    }
    ;
    fnr_curr = Work->fnr_curr ;
    ;
    ;
    ;
    ;
    Frows = Work->Frows ;
    Fcols = Work->Fcols ;
    Frpos = Work->Frpos ;
    Fcpos = Work->Fcpos ;
    Work->fnzeros = 0 ;
    ccdeg = Work->ccdeg ;
    rrdeg = Work->rrdeg ;
    fnrows = Work->fnrows ;
    fncols = Work->fncols ;
    ;
    Fl = Work->Flblock ;
    if (Work->pivcol_in_front)
    {
 Work->fscan_row = fnrows ;
 Work->NewRows = Work->Wrp ;
 Wy = Work->Wy ;
 for (i = 0 ; i < fnrows ; i++)
 {
     Fl [i] = Wy [i] ;
 }
 fnrows_extended = fnrows + ccdeg ;
 for (i = fnrows ; i < fnrows_extended ; i++)
 {
     Fl [i] = Wy [i] ;
     row = Frows [i] ;
     Work->NewRows [i] = (-(row)-2) ;
 }
 fnrows = fnrows_extended ;
    }
    else
    {
 Work->fscan_row = 0 ;
 Work->NewRows = Frows ;
 Wm = Work->Wm ;
 Wx = Work->Wx ;
 for (i = 0 ; i < ccdeg ; i++)
 {
     Fl [i] = Wx [i] ;
     row = Wm [i] ;
     Frows [i] = row ;
     Frpos [row] = i ;
 }
 fnrows = ccdeg ;
    }
    Work->fnrows = fnrows ;
    Wrow = Work->Wrow ;
    if (Work->pivrow_in_front)
    {
 Work->fscan_col = fncols ;
 Work->NewCols = Work->Wp ;
 ;
 if (Wrow == Fcols)
 {
     for (j = fncols ; j < rrdeg ; j++)
     {
  col = Wrow [j] ;
  Work->NewCols [j] = (-(col)-2) ;
  Fcpos [col] = j * fnr_curr ;
     }
 }
 else
 {
     for (j = fncols ; j < rrdeg ; j++)
     {
  col = Wrow [j] ;
  Fcols [j] = col ;
  Work->NewCols [j] = (-(col)-2) ;
  Fcpos [col] = j * fnr_curr ;
     }
 }
    }
    else
    {
 Work->fscan_col = 0 ;
 Work->NewCols = Fcols ;
 for (j = 0 ; j < rrdeg ; j++)
 {
     col = Wrow [j] ;
     Fcols [j] = col ;
     Fcpos [col] = j * fnr_curr ;
 }
    }
    ;
    fncols = rrdeg ;
    Work->fncols = fncols ;
    ;
    ;
    Fcblock = Work->Fcblock ;
    ;
    zero_init_front (fncols, fnrows, Fcblock, fnr_curr) ;
    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; struct DoubleComplex { double component[2]; } *D; long do_recip; double *Rs; long n_row; long tail_usage; long maxnrows; } *

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

variable_types: row long

variable_types: col long

variable_types:
Frows
long *

variable_types:
Fcols
long *

variable_types:
Fcpos
long *

variable_types:
Frpos
long *

variable_types: fncols long

variable_types: fnrows long

variable_types:
Wrow
long *

variable_types: rrdeg long

variable_types: ccdeg 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:
static void zero_init_front (long m, long n, DoubleComplex *Fcblock, long d)
{
    long i, j ;
    DoubleComplex *F, *Fj = Fcblock ;
    for (j = 0 ; j < m ; j++)
    {
 F = Fj ;
 Fj += d ;
 for (i = 0 ; i < n ; i++)
 {
     { (*F).component [0] = 0. ; (*F).component [1] = 0. ; } ;
     F++ ;
 }
    }
}

canonical_original_code:
static void zero_init_front(long m, long n, struct DoubleComplex *Fcblock, long d)
{
    long i; long j;
    struct DoubleComplex *F; struct DoubleComplex *Fj = Fcblock;
    for (j = 0 ; j < m ; j++)
    {
 F = Fj ;
 Fj += d ;
 for (i = 0 ; i < n ; i++)
 {
     { (*F).component [0] = 0. ; (*F).component [1] = 0. ; } ;
     F++ ;
 }
    }
}

variable_types: m long

variable_types: n long

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

variable_types: d long

variable_types: i long

variable_types: j long


decompiled_code:
__int64 __fastcall umf_i_realloc(__int64 a1, int a2, unsigned __int64 a3)
{
unsigned __int64 v4; // rdx
__int64 result; // rax

if ( a2 <= 0 )
a2 = 1;
v4 = 0x7FFFFFFF % a3;
if ( 0x7FFFFFFF / a3 < a2 )
result = 0LL;
else
result = amd_realloc(a1, a3 * a2, v4);
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(__int64 a1, int a2, unsigned __int64 a3)
{
unsigned __int64 v4; // rdx
__int64 result; // rax

if ( a2 <= 0 )
a2 = 1;
v4 = 0x7FFFFFFF % a3;
if ( 0x7FFFFFFF / a3 < a2 )
result = 0LL;
else
result = amd_realloc(a1, a3 * a2, v4);
return result;
}

original_code:
void *umf_i_realloc
(
    void *p,
    int n_objects,
    size_t size_of_object
)
{
    size_t size ;
    void *p2 ;
    n_objects = (((1) > (n_objects)) ? (1) : (n_objects)) ;
    size = (size_t) n_objects ;
    ;
    if (size > 0x7fffffff / size_of_object)
    {
 return ((void *) ((void *)0)) ;
    }
    size *= size_of_object ;
    ;
    p2 = amd_realloc (p, size) ;
    ;
    return (p2) ;
}

canonical_original_code:
void *umf_i_realloc(void *p, int n_objects, unsigned long size_of_object)
{
    unsigned long size;
    void *p2;
    n_objects = (((1) > (n_objects)) ? (1) : (n_objects)) ;
    size = (unsigned long) n_objects ;
    ;
    if (size > 0x7fffffff / size_of_object)
    {
 return ((void *) ((void *)0)) ;
    }
    size *= size_of_object ;
    ;
    p2 = amd_realloc (p, size) ;
    ;
    return (p2) ;
}

variable_types:
p
void *

variable_types:
size
unsigned long

return_type: void *


original_code:
int cholmod_factorize_p
(
    cholmod_sparse *A,
    double beta [2],
    int *fset,
    size_t fsize,
    cholmod_factor *L,
    cholmod_common *Common
)
{
    cholmod_sparse *S, *F, *A1, *A2 ;
    int 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 != 0 || Common->dtype != 0) { Common->status = (-4) ; return (0) ; } } ;
    { if ((A) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_factorize.c", 123, "argument missing", Common) ; } return (0) ; } } ;
    { if ((L) == ((void *)0)) { if (Common->status != (-2)) { cholmod_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_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_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_error ((-4), "../Cholesky/cholmod_factorize.c", 133, "A and L dimensions do not match", Common) ;
 return (0) ;
    }
    if (stype != 0 && nrow != ncol)
    {
 cholmod_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_mult_size_t (nsuper, 2, &ok) ;
    s = (((uncol) > (s)) ? (uncol) : (s)) ;
    t = cholmod_mult_size_t (nrow, 2, &ok) ;
    s = cholmod_add_size_t (s, t, &ok) ;
    if (!ok)
    {
 cholmod_error ((-3), "../Cholesky/cholmod_factorize.c", 158, "problem too large", Common) ;
 return (0) ;
    }
    cholmod_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_ptranspose (A, 2, ((void *)0), ((void *)0), 0, Common) ;
  S = A1 ;
     }
     else if (stype < 0)
     {
  S = A ;
     }
     else
     {
  A1 = cholmod_ptranspose (A, 2, ((void *)0), fset, fsize, Common) ;
  F = A1 ;
  S = A ;
     }
 }
 else
 {
     if (stype > 0)
     {
  A1 = cholmod_ptranspose (A, 2, L->Perm, ((void *)0), 0, Common) ;
  S = A1 ;
     }
     else if (stype < 0)
     {
  A2 = cholmod_ptranspose (A, 2, L->Perm, ((void *)0), 0, Common) ;
  A1 = cholmod_ptranspose (A2, 2, ((void *)0), ((void *)0), 0, Common) ;
  S = A1 ;
  cholmod_free_sparse (&A2, Common) ;
  ;
     }
     else
     {
  A1 = cholmod_ptranspose (A, 2, L->Perm, fset, fsize, Common) ;
  F = A1 ;
  A2 = cholmod_ptranspose (F, 2, ((void *)0), ((void *)0), 0, Common) ;
  S = A2 ;
     }
 }
 if (Common->status == 0)
 {
     cholmod_super_numeric (S, F, beta, L, Common) ;
 }
 status = Common->status ;
 ;
 if (Common->status >= 0 && convert)
 {
     ok = cholmod_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_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_ptranspose (A, 2, ((void *)0), ((void *)0), 0, Common) ;
  S = A2 ;
     }
     else
     {
  A1 = cholmod_ptranspose (A, 2, ((void *)0), fset, fsize, Common) ;
  F = A1 ;
  S = A ;
     }
 }
 else
 {
     if (stype > 0)
     {
  A1 = cholmod_ptranspose (A, 2, L->Perm, ((void *)0), 0, Common) ;
  A2 = cholmod_ptranspose (A1, 2, ((void *)0), ((void *)0), 0, Common) ;
  cholmod_free_sparse (&A1, Common) ;
     }
     else if (stype < 0)
     {
  A2 = cholmod_ptranspose (A, 2, L->Perm, ((void *)0), 0, Common) ;
     }
     else
     {
  A1 = cholmod_ptranspose (A, 2, L->Perm, fset, fsize, Common) ;
  F = A1 ;
  A2 = cholmod_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_rowfac (S, F, beta, 0, nrow, L, Common) ;
     Common->grow2 = grow2 ;
 }
 status = Common->status ;
 if (Common->status >= 0 && convert)
 {
     cholmod_change_factor (L->xtype, L->is_ll, 0,
      Common->final_pack, Common->final_monotonic, L, Common) ;
 }
    }
    cholmod_free_sparse (&A1, Common) ;
    cholmod_free_sparse (&A2, Common) ;
    Common->status = (((Common->status) > (status)) ? (Common->status) : (status)) ;
    return (Common->status >= 0) ;
}

canonical_original_code:
int cholmod_factorize_p(struct cholmod_sparse_struct *A, double beta[2], int *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;
    int nrow; int ncol; int stype; int convert; int n; int nsuper; int grow2; int status;
    unsigned long s; unsigned long t; unsigned long uncol;
    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_factorize.c", 123, "argument missing", Common) ; } return (0) ; } } ;
    { if ((L) == ((void *)0)) { if (Common->status != (-2)) { cholmod_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_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_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_error ((-4), "../Cholesky/cholmod_factorize.c", 133, "A and L dimensions do not match", Common) ;
 return (0) ;
    }
    if (stype != 0 && nrow != ncol)
    {
 cholmod_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_mult_size_t (nsuper, 2, &ok) ;
    s = (((uncol) > (s)) ? (uncol) : (s)) ;
    t = cholmod_mult_size_t (nrow, 2, &ok) ;
    s = cholmod_add_size_t (s, t, &ok) ;
    if (!ok)
    {
 cholmod_error ((-3), "../Cholesky/cholmod_factorize.c", 158, "problem too large", Common) ;
 return (0) ;
    }
    cholmod_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_ptranspose (A, 2, ((void *)0), ((void *)0), 0, Common) ;
  S = A1 ;
     }
     else if (stype < 0)
     {
  S = A ;
     }
     else
     {
  A1 = cholmod_ptranspose (A, 2, ((void *)0), fset, fsize, Common) ;
  F = A1 ;
  S = A ;
     }
 }
 else
 {
     if (stype > 0)
     {
  A1 = cholmod_ptranspose (A, 2, L->Perm, ((void *)0), 0, Common) ;
  S = A1 ;
     }
     else if (stype < 0)
     {
  A2 = cholmod_ptranspose (A, 2, L->Perm, ((void *)0), 0, Common) ;
  A1 = cholmod_ptranspose (A2, 2, ((void *)0), ((void *)0), 0, Common) ;
  S = A1 ;
  cholmod_free_sparse (&A2, Common) ;
  ;
     }
     else
     {
  A1 = cholmod_ptranspose (A, 2, L->Perm, fset, fsize, Common) ;
  F = A1 ;
  A2 = cholmod_ptranspose (F, 2, ((void *)0), ((void *)0), 0, Common) ;
  S = A2 ;
     }
 }
 if (Common->status == 0)
 {
     cholmod_super_numeric (S, F, beta, L, Common) ;
 }
 status = Common->status ;
 ;
 if (Common->status >= 0 && convert)
 {
     ok = cholmod_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_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_ptranspose (A, 2, ((void *)0), ((void *)0), 0, Common) ;
  S = A2 ;
     }
     else
     {
  A1 = cholmod_ptranspose (A, 2, ((void *)0), fset, fsize, Common) ;
  F = A1 ;
  S = A ;
     }
 }
 else
 {
     if (stype > 0)
     {
  A1 = cholmod_ptranspose (A, 2, L->Perm, ((void *)0), 0, Common) ;
  A2 = cholmod_ptranspose (A1, 2, ((void *)0), ((void *)0), 0, Common) ;
  cholmod_free_sparse (&A1, Common) ;
     }
     else if (stype < 0)
     {
  A2 = cholmod_ptranspose (A, 2, L->Perm, ((void *)0), 0, Common) ;
     }
     else
     {
  A1 = cholmod_ptranspose (A, 2, L->Perm, fset, fsize, Common) ;
  F = A1 ;
  A2 = cholmod_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_rowfac (S, F, beta, 0, nrow, L, Common) ;
     Common->grow2 = grow2 ;
 }
 status = Common->status ;
 if (Common->status >= 0 && convert)
 {
     cholmod_change_factor (L->xtype, L->is_ll, 0,
      Common->final_pack, Common->final_monotonic, L, Common) ;
 }
    }
    cholmod_free_sparse (&A1, Common) ;
    cholmod_free_sparse (&A2, Common) ;
    Common->status = (((Common->status) > (status)) ? (Common->status) : (status)) ;
    return (Common->status >= 0) ;
}

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:
beta
double [2]

variable_types:
fset
int *

variable_types:
fsize
unsigned long

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

variable_types: ncol int

variable_types: stype int

variable_types: convert int

variable_types: n int

variable_types: nsuper int

variable_types: status int

variable_types:
s
unsigned long

variable_types:
t
unsigned long

variable_types:
uncol
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_factorize(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v4[3]; // [rsp+0h] [rbp-18h] BYREF

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

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

canonical_original_code:
int cholmod_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_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:
zero
double [2]

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]; }


decompiled_code:
__int64 alloc_expansion_list()
{
__int64 v0; // rbx

v0 = my_malloc(16LL);
*(_DWORD *)v0 = 0;
*(_QWORD *)(v0 + 8) = my_calloc(16LL, 16385LL);
return v0;
}

original_code:
t_expansion_list* alloc_expansion_list(void) {
    t_expansion_list* expansion_list = my_malloc(sizeof(t_expansion_list));
    expansion_list->heap_size = 0;
    expansion_list->heap = my_calloc(sizeof(t_heap_node), 16384 + 1);
    return expansion_list;
}

canonical_original_code:
struct s_expansion_list *alloc_expansion_list() {
    struct s_expansion_list *expansion_list = my_malloc(sizeof(t_expansion_list));
    expansion_list->heap_size = 0;
    expansion_list->heap = my_calloc(sizeof(t_heap_node), 16384 + 1);
    return expansion_list;
}

variable_types: struct s_expansion_list { int heap_size; struct s_heap_node { double key; struct s_wire { int channel_x_coord; int channel_y_coord; struct s_switchblock { int x_coord; int y_coord; struct s_wire ***adjacency_list; int *num_adjacencies; int *occupancy_list; } **array_of_adjacent_switchblocks; int num_switchblocks; struct s_pin { struct s_block { int x_coord; int y_coord; struct s_pin **array_of_pins; int num_pins; } *block; int pin_num; struct s_wire **array_of_adjacent_wires; int num_adjacent_wires; struct s_net { struct s_pin *source_pin; struct s_pin *sink_pin; int net_num; struct s_wire **associated_wires; int num_associated_wires; } *associated_net; } **array_of_adjacent_pins; int num_adjacent_pins; int channel_pair_num; struct s_wire *reservoir_wire; int wire_num; double occupancy; double present_cost; double history_cost; enum e_ROUTING_LABEL { NONE=-1, TARGET=0, SOURCE=1, USED=2, CURRENT_EXPANSION=3 } label_type; double label_value; int counted; } *wire; } *heap; } *

user_defined_types: struct s_expansion_list { int heap_size; struct s_heap_node *heap; }

user_defined_types: struct s_heap_node { double key; struct s_wire *wire; }

user_defined_types: struct s_wire { int channel_x_coord; int channel_y_coord; struct s_switchblock **array_of_adjacent_switchblocks; int num_switchblocks; struct s_pin **array_of_adjacent_pins; int num_adjacent_pins; int channel_pair_num; struct s_wire *reservoir_wire; int wire_num; double occupancy; double present_cost; double history_cost; enum e_ROUTING_LABEL label_type; double label_value; int counted; }

user_defined_types: struct s_pin { struct s_block *block; int pin_num; struct s_wire **array_of_adjacent_wires; int num_adjacent_wires; struct s_net *associated_net; }


decompiled_code:
_BOOL8 __fastcall is_empty_expansion_list(_DWORD *a1)
{
return *a1 == 0;
}

canonical_decompiled_code:
_BOOL8 __fastcall func1(_DWORD *a1)
{
return *a1 == 0;
}

original_code:
t_boolean is_empty_expansion_list(t_expansion_list* expansion_list) {
    return expansion_list->heap_size == 0;
}

canonical_original_code:
enum e_boolean is_empty_expansion_list(struct s_expansion_list *expansion_list) {
    return expansion_list->heap_size == 0;
}

return_type: enum e_boolean { FALSE=0, TRUE=1 }

user_defined_types: enum e_ROUTING_LABEL { NONE=-1, TARGET=0, SOURCE=1, USED=2, CURRENT_EXPANSION=3 }

user_defined_types: struct s_switchblock { int x_coord; int y_coord; struct s_wire ***adjacency_list; int *num_adjacencies; int *occupancy_list; }

user_defined_types: struct s_block { int x_coord; int y_coord; struct s_pin **array_of_pins; int num_pins; }

user_defined_types: struct s_net { struct s_pin *source_pin; struct s_pin *sink_pin; int net_num; struct s_wire **associated_wires; int num_associated_wires; }


decompiled_code:
__int64 __fastcall parent_index(int a1)
{
return (unsigned int)(a1 / 2);
}

canonical_decompiled_code:
__int64 __fastcall func2(int a1)
{
return (unsigned int)(a1 / 2);
}

original_code:
int parent_index(int current_index) {
    return current_index / 2;
}


decompiled_code:
__int64 __fastcall child_left_index(int a1)
{
return (unsigned int)(2 * a1);
}

canonical_decompiled_code:
__int64 __fastcall func3(int a1)
{
return (unsigned int)(2 * a1);
}

original_code:
int child_left_index(int current_index) {
    return 2*current_index;
}


decompiled_code:
__int64 __fastcall child_right_index(int a1)
{
return (unsigned int)(2 * a1 + 1);
}

canonical_decompiled_code:
__int64 __fastcall func4(int a1)
{
return (unsigned int)(2 * a1 + 1);
}

original_code:
int child_right_index(int current_index) {
    return 2*current_index + 1;
}


decompiled_code:
__int64 __fastcall verify_heap(__int64 a1)
{
int v1; // er12
__int64 v2; // r14
double *v3; // r13
int v4; // ebp
int v5; // ebx
int v6; // eax

v1 = *(_DWORD *)a1;
v2 = *(_QWORD *)(a1 + 8);
if ( *(int *)a1 >= 0 )
{
v3 = *(double **)(a1 + 8);
v4 = 0;
do
{
v5 = child_left_index(v4);
v6 = child_right_index(v4);
if ( v1 >= v5 && *v3 > *(double *)(v2 + 16LL * v5) )
_assert_fail("heap_ok", "SRC/base/expansion_list.c", 0x4Du, "verify_heap");
if ( v1 >= v6 && *v3 > *(double *)(v2 + 16LL * v6) )
_assert_fail("heap_ok", "SRC/base/expansion_list.c", 0x55u, "verify_heap");
++v4;
v3 += 2;
}
while ( v1 >= v4 );
}
return 1LL;
}

canonical_decompiled_code:
__int64 __fastcall func5(__int64 a1)
{
int v1; // er12
__int64 v2; // r14
double *v3; // r13
int v4; // ebp
int v5; // ebx
int v6; // eax

v1 = *(_DWORD *)a1;
v2 = *(_QWORD *)(a1 + 8);
if ( *(int *)a1 >= 0 )
{
v3 = *(double **)(a1 + 8);
v4 = 0;
do
{
v5 = func3(v4);
v6 = func4(v4);
if ( v1 >= v5 && *v3 > *(double *)(v2 + 16LL * v5) )
_assert_fail("heap_ok", "SRC/base/expansion_list.c", 0x4Du, "verify_heap");
if ( v1 >= v6 && *v3 > *(double *)(v2 + 16LL * v6) )
_assert_fail("heap_ok", "SRC/base/expansion_list.c", 0x55u, "verify_heap");
++v4;
v3 += 2;
}
while ( v1 >= v4 );
}
return 1LL;
}

original_code:
t_boolean verify_heap(t_expansion_list* expansion_list){
    t_boolean heap_ok = TRUE;
    int node_index = 1;
    int heap_size = expansion_list->heap_size;
    t_heap_node* heap = expansion_list->heap;
    for(node_index = 0; node_index <= heap_size; node_index++) {
        int left_child_index = child_left_index(node_index);
        int right_child_index = child_right_index(node_index);
        if (left_child_index <= heap_size
            && heap[node_index].key > heap[left_child_index].key) {
            heap_ok = FALSE;
            ((void) sizeof ((heap_ok) ? 1 : 0), __extension__ ({ if (heap_ok) ; else __assert_fail ("heap_ok", "SRC/base/expansion_list.c", 77, __extension__ __PRETTY_FUNCTION__); }));
        }
        if (right_child_index <= heap_size
            && heap[node_index].key > heap[right_child_index].key) {
            heap_ok = FALSE;
            ((void) sizeof ((heap_ok) ? 1 : 0), __extension__ ({ if (heap_ok) ; else __assert_fail ("heap_ok", "SRC/base/expansion_list.c", 85, __extension__ __PRETTY_FUNCTION__); }));
        }
    }
    if(heap_ok == FALSE) {
        printf("Error: invalid heap state\n");
    }
    return heap_ok;
}

canonical_original_code:
enum e_boolean verify_heap(struct s_expansion_list *expansion_list){
    enum e_boolean heap_ok = TRUE;
    int node_index = 1;
    int heap_size = expansion_list->heap_size;
    struct s_heap_node *heap = expansion_list->heap;
    for(node_index = 0; node_index <= heap_size; node_index++) {
        int left_child_index = child_left_index(node_index);
        int right_child_index = child_right_index(node_index);
        if (left_child_index <= heap_size
            && heap[node_index].key > heap[left_child_index].key) {
            heap_ok = FALSE;
            ((void) sizeof ((heap_ok) ? 1 : 0), __extension__ ({ if (heap_ok) ; else __assert_fail ("heap_ok", "SRC/base/expansion_list.c", 77, __extension__ __PRETTY_FUNCTION__); }));
        }
        if (right_child_index <= heap_size
            && heap[node_index].key > heap[right_child_index].key) {
            heap_ok = FALSE;
            ((void) sizeof ((heap_ok) ? 1 : 0), __extension__ ({ if (heap_ok) ; else __assert_fail ("heap_ok", "SRC/base/expansion_list.c", 85, __extension__ __PRETTY_FUNCTION__); }));
        }
    }
    if(heap_ok == FALSE) {
        printf("Error: invalid heap state\n");
    }
    return heap_ok;
}

variable_types: struct s_heap_node { double key; struct s_wire { int channel_x_coord; int channel_y_coord; struct s_switchblock { int x_coord; int y_coord; struct s_wire ***adjacency_list; int *num_adjacencies; int *occupancy_list; } **array_of_adjacent_switchblocks; int num_switchblocks; struct s_pin { struct s_block { int x_coord; int y_coord; struct s_pin **array_of_pins; int num_pins; } *block; int pin_num; struct s_wire **array_of_adjacent_wires; int num_adjacent_wires; struct s_net { struct s_pin *source_pin; struct s_pin *sink_pin; int net_num; struct s_wire **associated_wires; int num_associated_wires; } *associated_net; } **array_of_adjacent_pins; int num_adjacent_pins; int channel_pair_num; struct s_wire *reservoir_wire; int wire_num; double occupancy; double present_cost; double history_cost; enum e_ROUTING_LABEL { NONE=-1, TARGET=0, SOURCE=1, USED=2, CURRENT_EXPANSION=3 } label_type; double label_value; int counted; } *wire; } *


original_code:
void swap_nodes(t_heap_node* a, t_heap_node* b) {
    t_heap_node tmp = *a;
    *a = *b;
    *b = tmp;
}

canonical_original_code:
void swap_nodes(struct s_heap_node *a, struct s_heap_node *b) {
    struct s_heap_node tmp = *a;
    *a = *b;
    *b = tmp;
}

variable_types:
b
struct s_heap_node *

variable_types: struct s_heap_node { double key; struct s_wire { int channel_x_coord; int channel_y_coord; struct s_switchblock { int x_coord; int y_coord; struct s_wire ***adjacency_list; int *num_adjacencies; int *occupancy_list; } **array_of_adjacent_switchblocks; int num_switchblocks; struct s_pin { struct s_block { int x_coord; int y_coord; struct s_pin **array_of_pins; int num_pins; } *block; int pin_num; struct s_wire **array_of_adjacent_wires; int num_adjacent_wires; struct s_net { struct s_pin *source_pin; struct s_pin *sink_pin; int net_num; struct s_wire **associated_wires; int num_associated_wires; } *associated_net; } **array_of_adjacent_pins; int num_adjacent_pins; int channel_pair_num; struct s_wire *reservoir_wire; int wire_num; double occupancy; double present_cost; double history_cost; enum e_ROUTING_LABEL { NONE=-1, TARGET=0, SOURCE=1, USED=2, CURRENT_EXPANSION=3 } label_type; double label_value; int counted; } *wire; }


decompiled_code:
void __fastcall bubble_up(__int64 a1, int a2)
{
int v2; // ebx
__int64 v3; // r12
__int64 *v4; // rbp
__m128i *v5; // rsi

if ( *(_DWORD *)a1 < a2 )
_assert_fail("node_index <= expansion_list->heap_size", "SRC/base/expansion_list.c", 0x71u, "bubble_up");
v2 = a2;
while ( v2 > 1 )
{
v3 = *(_QWORD *)(a1 + 8);
v4 = (__int64 *)(v3 + 16LL * v2);
v2 = parent_index(v2);
v5 = (__m128i *)(v3 + 16LL * v2);
if ( *(double *)v5->m128i_i64 <= *(double *)v4 )
break;
swap_nodes(v4, v5);
}
}

canonical_decompiled_code:
void __fastcall func7(__int64 a1, int a2)
{
int v2; // ebx
__int64 v3; // r12
__int64 *v4; // rbp
__m128i *v5; // rsi

if ( *(_DWORD *)a1 < a2 )
_assert_fail("node_index <= expansion_list->heap_size", "SRC/base/expansion_list.c", 0x71u, "bubble_up");
v2 = a2;
while ( v2 > 1 )
{
v3 = *(_QWORD *)(a1 + 8);
v4 = (__int64 *)(v3 + 16LL * v2);
v2 = func2(v2);
v5 = (__m128i *)(v3 + 16LL * v2);
if ( *(double *)v5->m128i_i64 <= *(double *)v4 )
break;
func6(v4, v5);
}
}

original_code:
void bubble_up(t_expansion_list* expansion_list, int node_index){
    ((void) sizeof ((node_index <= expansion_list->heap_size) ? 1 : 0), __extension__ ({ if (node_index <= expansion_list->heap_size) ; else __assert_fail ("node_index <= expansion_list->heap_size", "SRC/base/expansion_list.c", 113, __extension__ __PRETTY_FUNCTION__); }));
    while( node_index > 1
          && expansion_list->heap[node_index].key < expansion_list->heap[parent_index(node_index)].key
          ) {
        swap_nodes(&expansion_list->heap[node_index], &expansion_list->heap[parent_index(node_index)]);
        node_index = parent_index(node_index);
    }
}

canonical_original_code:
void bubble_up(struct s_expansion_list *expansion_list, int node_index){
    ((void) sizeof ((node_index <= expansion_list->heap_size) ? 1 : 0), __extension__ ({ if (node_index <= expansion_list->heap_size) ; else __assert_fail ("node_index <= expansion_list->heap_size", "SRC/base/expansion_list.c", 113, __extension__ __PRETTY_FUNCTION__); }));
    while( node_index > 1
          && expansion_list->heap[node_index].key < expansion_list->heap[parent_index(node_index)].key
          ) {
        swap_nodes(&expansion_list->heap[node_index], &expansion_list->heap[parent_index(node_index)]);
        node_index = parent_index(node_index);
    }
}


decompiled_code:
void __fastcall insert_expansion_list(__int64 a1, __int64 a2, int a3)
{
int v3; // eax
__int64 v4; // rax

v3 = *(_DWORD *)a1 + 1;
*(_DWORD *)a1 = v3;
if ( v3 > 0x4000 )
_assert_fail(
"expansion_list->heap_size <= MAX_HEAP_ITEMS",
"SRC/base/expansion_list.c",
0x1Eu,
"insert_expansion_list");
v4 = *(_QWORD *)(a1 + 8) + 16LL * v3;
*(double *)v4 = (double)a3;
*(_QWORD *)(v4 + 8) = a2;
bubble_up(a1, *(_DWORD *)a1);
}

canonical_decompiled_code:
void __fastcall func8(__int64 a1, __int64 a2, int a3)
{
int v3; // eax
__int64 v4; // rax

v3 = *(_DWORD *)a1 + 1;
*(_DWORD *)a1 = v3;
if ( v3 > 0x4000 )
_assert_fail(
"expansion_list->heap_size <= MAX_HEAP_ITEMS",
"SRC/base/expansion_list.c",
0x1Eu,
"insert_expansion_list");
v4 = *(_QWORD *)(a1 + 8) + 16LL * v3;
*(double *)v4 = (double)a3;
*(_QWORD *)(v4 + 8) = a2;
func7(a1, *(_DWORD *)a1);
}

original_code:
void insert_expansion_list(t_expansion_list* expansion_list, t_wire* wire, int cost) {
    expansion_list->heap_size++;
    ((void) sizeof ((expansion_list->heap_size <= 16384) ? 1 : 0), __extension__ ({ if (expansion_list->heap_size <= 16384) ; else __assert_fail ("expansion_list->heap_size <= MAX_HEAP_ITEMS", "SRC/base/expansion_list.c", 30, __extension__ __PRETTY_FUNCTION__); }));
    t_heap_node new_node;
    new_node.key = cost;
    new_node.wire = wire;
    expansion_list->heap[expansion_list->heap_size] = new_node;
    bubble_up(expansion_list, expansion_list->heap_size);
}

canonical_original_code:
void insert_expansion_list(struct s_expansion_list *expansion_list, struct s_wire *wire, int cost) {
    expansion_list->heap_size++;
    ((void) sizeof ((expansion_list->heap_size <= 16384) ? 1 : 0), __extension__ ({ if (expansion_list->heap_size <= 16384) ; else __assert_fail ("expansion_list->heap_size <= MAX_HEAP_ITEMS", "SRC/base/expansion_list.c", 30, __extension__ __PRETTY_FUNCTION__); }));
    struct s_heap_node new_node;
    new_node.key = cost;
    new_node.wire = wire;
    expansion_list->heap[expansion_list->heap_size] = new_node;
    bubble_up(expansion_list, expansion_list->heap_size);
}

variable_types:
wire
struct s_wire *

variable_types: cost int


decompiled_code:
__int64 __fastcall bubble_down(__int64 a1, int a2)
{
__int64 *v4; // rdi
__m128i *v5; // rsi
__int64 result; // rax
int v7; // ebp
int v8; // er13

while ( 1 )
{
result = child_left_index(a2);
v7 = result;
v8 = *(_DWORD *)a1;
if ( (int)result > *(_DWORD *)a1 )
break;
result = child_right_index(a2);
if ( v8 >= (int)result
&& *(double *)(*(_QWORD *)(a1 + 8) + 16LL * v7) > *(double *)(*(_QWORD *)(a1 + 8) + 16LL * (int)result) )
{
v7 = result;
}
v4 = (__int64 *)(*(_QWORD *)(a1 + 8) + 16LL * a2);
v5 = (__m128i *)(*(_QWORD *)(a1 + 8) + 16LL * v7);
if ( *(double *)v4 <= *(double *)v5->m128i_i64 )
break;
swap_nodes(v4, v5);
a2 = v7;
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func9(__int64 a1, int a2)
{
__int64 *v4; // rdi
__m128i *v5; // rsi
__int64 result; // rax
int v7; // ebp
int v8; // er13

while ( 1 )
{
result = func3(a2);
v7 = result;
v8 = *(_DWORD *)a1;
if ( (int)result > *(_DWORD *)a1 )
break;
result = func4(a2);
if ( v8 >= (int)result
&& *(double *)(*(_QWORD *)(a1 + 8) + 16LL * v7) > *(double *)(*(_QWORD *)(a1 + 8) + 16LL * (int)result) )
{
v7 = result;
}
v4 = (__int64 *)(*(_QWORD *)(a1 + 8) + 16LL * a2);
v5 = (__m128i *)(*(_QWORD *)(a1 + 8) + 16LL * v7);
if ( *(double *)v4 <= *(double *)v5->m128i_i64 )
break;
func6(v4, v5);
a2 = v7;
}
return result;
}

original_code:
void bubble_down(t_expansion_list* expansion_list, int node_index){
    while(child_left_index(node_index) <= expansion_list->heap_size) {
        int left_child_index = child_left_index(node_index);
        int right_child_index = child_right_index(node_index);
        int child_to_swap_index = left_child_index;
        if (right_child_index <= expansion_list->heap_size) {
            if (expansion_list->heap[right_child_index].key < expansion_list->heap[left_child_index].key) {
                child_to_swap_index = right_child_index;
            }
        }
        if (expansion_list->heap[node_index].key > expansion_list->heap[child_to_swap_index].key) {
            swap_nodes(&expansion_list->heap[node_index], &expansion_list->heap[child_to_swap_index]);
            node_index = child_to_swap_index;
        } else {
            break;
        }
    }
}

canonical_original_code:
void bubble_down(struct s_expansion_list *expansion_list, int node_index){
    while(child_left_index(node_index) <= expansion_list->heap_size) {
        int left_child_index = child_left_index(node_index);
        int right_child_index = child_right_index(node_index);
        int child_to_swap_index = left_child_index;
        if (right_child_index <= expansion_list->heap_size) {
            if (expansion_list->heap[right_child_index].key < expansion_list->heap[left_child_index].key) {
                child_to_swap_index = right_child_index;
            }
        }
        if (expansion_list->heap[node_index].key > expansion_list->heap[child_to_swap_index].key) {
            swap_nodes(&expansion_list->heap[node_index], &expansion_list->heap[child_to_swap_index]);
            node_index = child_to_swap_index;
        } else {
            break;
        }
    }
}


original_code:
t_heap_node get_min_expansion_list(t_expansion_list* expansion_list) {
    swap_nodes(&expansion_list->heap[1], &expansion_list->heap[expansion_list->heap_size]);
    expansion_list->heap_size--;
    bubble_down(expansion_list, 1);
    return expansion_list->heap[expansion_list->heap_size+1];
}

canonical_original_code:
struct s_heap_node get_min_expansion_list(struct s_expansion_list *expansion_list) {
    swap_nodes(&expansion_list->heap[1], &expansion_list->heap[expansion_list->heap_size]);
    expansion_list->heap_size--;
    bubble_down(expansion_list, 1);
    return expansion_list->heap[expansion_list->heap_size+1];
}

variable_types: struct s_expansion_list { int heap_size; struct s_heap_node *heap; } *

return_type: struct s_heap_node { double key; struct s_wire { int channel_x_coord; int channel_y_coord; struct s_switchblock { int x_coord; int y_coord; struct s_wire ***adjacency_list; int *num_adjacencies; int *occupancy_list; } **array_of_adjacent_switchblocks; int num_switchblocks; struct s_pin { struct s_block { int x_coord; int y_coord; struct s_pin **array_of_pins; int num_pins; } *block; int pin_num; struct s_wire **array_of_adjacent_wires; int num_adjacent_wires; struct s_net { struct s_pin *source_pin; struct s_pin *sink_pin; int net_num; struct s_wire **associated_wires; int num_associated_wires; } *associated_net; } **array_of_adjacent_pins; int num_adjacent_pins; int channel_pair_num; struct s_wire *reservoir_wire; int wire_num; double occupancy; double present_cost; double history_cost; enum e_ROUTING_LABEL { NONE=-1, TARGET=0, SOURCE=1, USED=2, CURRENT_EXPANSION=3 } label_type; double label_value; int counted; } *wire; }


original_code:
long umfzl_mem_alloc_element
(
    NumericType *Numeric,
    long nrows,
    long ncols,
    long **Rows,
    long **Cols,
    DoubleComplex **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 (DoubleComplex) * ((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 (DoubleComplex) * ((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 (DoubleComplex) * ((double) (ncols) * (nrows))) / sizeof (Unit)))) + 1) != (((ceil ((sizeof (Element) * ((double) 1)) / sizeof (Unit))) + (ceil ((sizeof (long) * ((double) (ncols) + (nrows))) / sizeof (Unit))) + (ceil ((sizeof (DoubleComplex) * ((double) (ncols) * (nrows))) / sizeof (Unit)))) + 1))))
    {
 return (0) ;
    }
    i = umfzl_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 = (DoubleComplex *) 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 umfzl_mem_alloc_element(struct NumericType *Numeric, long nrows, long ncols, long **Rows, long **Cols, struct DoubleComplex **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 (DoubleComplex) * ((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 (DoubleComplex) * ((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 (DoubleComplex) * ((double) (ncols) * (nrows))) / sizeof (Unit)))) + 1) != (((ceil ((sizeof (Element) * ((double) 1)) / sizeof (Unit))) + (ceil ((sizeof (long) * ((double) (ncols) + (nrows))) / sizeof (Unit))) + (ceil ((sizeof (DoubleComplex) * ((double) (ncols) * (nrows))) / sizeof (Unit)))) + 1))))
    {
 return (0) ;
    }
    i = umfzl_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 = (struct DoubleComplex *) 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; struct DoubleComplex { double component[2]; } *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
struct DoubleComplex **

variable_types:
size
long *

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

variable_types:
ep
struct Element { long cdeg; } *

variable_types: i long


decompiled_code:
__int64 __fastcall umfpack_di_triplet_to_col(unsigned int a1, unsigned int a2, unsigned int a3, __int64 a4, __int64 a5, __int64 a6, __int64 a7, __int64 a8, __int64 a9, __int64 a10)
{
unsigned int v11; // er15
__int64 v12; // r14
__int64 v13; // r13
__int64 v14; // rax
__int64 v15; // r15
unsigned int v16; // ebx
__int64 v18; // [rsp+8h] [rbp-70h]
__int64 v19; // [rsp+10h] [rbp-68h]
__int64 v20; // [rsp+18h] [rbp-60h]
bool v23; // [rsp+37h] [rbp-41h]

if ( !a8 || !a7 )
return (unsigned int)-5;
if ( !a4 || !a5 )
return (unsigned int)-5;
if ( (int)a1 <= 0 || (int)a2 <= 0 )
return (unsigned int)-6;
if ( (a3 & 0x80000000) != 0 )
return (unsigned int)-8;
v11 = a2;
if ( (int)a1 >= (int)a2 )
v11 = a1;
v19 = 0LL;
v23 = a6 != 0 && a9 != 0;
if ( v23 && (v19 = umf_i_malloc(a3 + 1, 8LL)) == 0 )
return (unsigned int)-1;
if ( a10 )
{
v20 = umf_i_malloc(a3 + 1, 4LL);
if ( !v20 )
{
umf_i_free(v19);
return (unsigned int)-1;
}
}
else
{
v20 = 0LL;
}
v12 = umf_i_malloc(a3 + 1, 4LL);
v13 = umf_i_malloc(a1 + 1, 4LL);
v18 = umf_i_malloc(a1, 4LL);
v14 = umf_i_malloc(v11, 4LL);
v15 = v14;
if ( v12 && v13 && v18 && v14 )
{
if ( a10 )
{
if ( v23 )
v16 = umfdi_triplet_map_x(a1, a2, a3, a4, a5, a7, a8, v13, v12, v14, v18, a6, a9, v19, a10, v20);
else
v16 = umfdi_triplet_map_nox(a1, a2, a3, a4, a5, a7, a8, v13, v12, v14, v18, a10, v20);
}
else if ( v23 )
{
v16 = umfdi_triplet_nomap_x(a1, a2, a3, a4, a5, a7, a8, v13, v12, v14, v18, a6, a9, v19);
}
else
{
v16 = umfdi_triplet_nomap_nox(a1, a2, a3, a4, a5, a7, a8, v13, v12, v14, v18);
}
umf_i_free(v19);
umf_i_free(v20);
umf_i_free(v13);
umf_i_free(v12);
umf_i_free(v18);
umf_i_free(v15);
}
else
{
umf_i_free(v19);
umf_i_free(v20);
umf_i_free(v13);
umf_i_free(v12);
umf_i_free(v18);
umf_i_free(v15);
v16 = -1;
}
return v16;
}

original_code:
int umfpack_di_triplet_to_col
(
    int n_row,
    int n_col,
    int nz,
    const int Ti [ ],
    const int Tj [ ],
    const double Tx [ ],
    int Ap [ ],
    int Ai [ ],
    double Ax [ ]
    , int Map [ ]
)
{
    int *RowCount, *Rp, *Rj, *W, nn, do_values, do_map, *Map2, status ;
    double *Rx ;
    if (!Ai || !Ap || !Ti || !Tj)
    {
 return ((-5)) ;
    }
    if (n_row <= 0 || n_col <= 0)
    {
 return ((-6)) ;
    }
    if (nz < 0)
    {
 return ((-8)) ;
    }
    nn = (((n_row) > (n_col)) ? (n_row) : (n_col)) ;
    Rx = (double *) ((void *)0) ;
    do_values = Ax && Tx ;
    if (do_values)
    {
 Rx = (double *) umf_i_malloc (nz+1, sizeof (double)) ;
 if (!Rx)
 {
     ;
     ;
     return ((-1)) ;
 }
    }
    do_map = (Map != (int *) ((void *)0)) ;
    Map2 = (int *) ((void *)0) ;
    if (do_map)
    {
 ;
 Map2 = (int *) umf_i_malloc (nz+1, sizeof (int)) ;
 if (!Map2)
 {
     ;
     (void) umf_i_free ((void *) Rx) ;
     ;
     return ((-1)) ;
 }
    }
    Rj = (int *) umf_i_malloc (nz+1, sizeof (int)) ;
    Rp = (int *) umf_i_malloc (n_row+1, sizeof (int)) ;
    RowCount = (int *) umf_i_malloc (n_row, sizeof (int)) ;
    W = (int *) umf_i_malloc (nn, sizeof (int)) ;
    if (!Rj || !Rp || !RowCount || !W)
    {
 ;
 (void) umf_i_free ((void *) Rx) ;
 (void) umf_i_free ((void *) Map2) ;
 (void) umf_i_free ((void *) Rp) ;
 (void) umf_i_free ((void *) Rj) ;
 (void) umf_i_free ((void *) RowCount) ;
 (void) umf_i_free ((void *) W) ;
 ;
 return ((-1)) ;
    }
    ;
    if (do_map)
    {
 if (do_values)
 {
     status = umfdi_triplet_map_x (n_row, n_col, nz, Ti, Tj, Ap, Ai, Rp,
  Rj, W, RowCount, Tx, Ax, Rx
  , Map, Map2) ;
 }
 else
 {
     status = umfdi_triplet_map_nox (n_row, n_col, nz, Ti, Tj, Ap, Ai, Rp,
  Rj, W, RowCount, Map, Map2) ;
 }
    }
    else
    {
 if (do_values)
 {
     status = umfdi_triplet_nomap_x (n_row, n_col, nz, Ti, Tj, Ap, Ai, Rp,
  Rj, W, RowCount , Tx, Ax, Rx
  ) ;
 }
 else
 {
     status = umfdi_triplet_nomap_nox (n_row, n_col, nz, Ti, Tj, Ap, Ai,
  Rp, Rj, W, RowCount) ;
 }
    }
    (void) umf_i_free ((void *) Rx) ;
    (void) umf_i_free ((void *) Map2) ;
    (void) umf_i_free ((void *) Rp) ;
    (void) umf_i_free ((void *) Rj) ;
    (void) umf_i_free ((void *) RowCount) ;
    (void) umf_i_free ((void *) W) ;
    ;
    return (status) ;
}

canonical_original_code:
int umfpack_di_triplet_to_col(int n_row, int n_col, int nz, int Ti[], int Tj[], double Tx[], int Ap[], int Ai[], double Ax[], int Map[])
{
    int *RowCount; int *Rp; int *Rj; int *W; int nn; int do_values; int do_map; int *Map2; int status;
    double *Rx;
    if (!Ai || !Ap || !Ti || !Tj)
    {
 return ((-5)) ;
    }
    if (n_row <= 0 || n_col <= 0)
    {
 return ((-6)) ;
    }
    if (nz < 0)
    {
 return ((-8)) ;
    }
    nn = (((n_row) > (n_col)) ? (n_row) : (n_col)) ;
    Rx = (double *) ((void *)0) ;
    do_values = Ax && Tx ;
    if (do_values)
    {
 Rx = (double *) umf_i_malloc (nz+1, sizeof (double)) ;
 if (!Rx)
 {
     ;
     ;
     return ((-1)) ;
 }
    }
    do_map = (Map != (int *) ((void *)0)) ;
    Map2 = (int *) ((void *)0) ;
    if (do_map)
    {
 ;
 Map2 = (int *) umf_i_malloc (nz+1, sizeof (int)) ;
 if (!Map2)
 {
     ;
     (void) umf_i_free ((void *) Rx) ;
     ;
     return ((-1)) ;
 }
    }
    Rj = (int *) umf_i_malloc (nz+1, sizeof (int)) ;
    Rp = (int *) umf_i_malloc (n_row+1, sizeof (int)) ;
    RowCount = (int *) umf_i_malloc (n_row, sizeof (int)) ;
    W = (int *) umf_i_malloc (nn, sizeof (int)) ;
    if (!Rj || !Rp || !RowCount || !W)
    {
 ;
 (void) umf_i_free ((void *) Rx) ;
 (void) umf_i_free ((void *) Map2) ;
 (void) umf_i_free ((void *) Rp) ;
 (void) umf_i_free ((void *) Rj) ;
 (void) umf_i_free ((void *) RowCount) ;
 (void) umf_i_free ((void *) W) ;
 ;
 return ((-1)) ;
    }
    ;
    if (do_map)
    {
 if (do_values)
 {
     status = umfdi_triplet_map_x (n_row, n_col, nz, Ti, Tj, Ap, Ai, Rp,
  Rj, W, RowCount, Tx, Ax, Rx
  , Map, Map2) ;
 }
 else
 {
     status = umfdi_triplet_map_nox (n_row, n_col, nz, Ti, Tj, Ap, Ai, Rp,
  Rj, W, RowCount, Map, Map2) ;
 }
    }
    else
    {
 if (do_values)
 {
     status = umfdi_triplet_nomap_x (n_row, n_col, nz, Ti, Tj, Ap, Ai, Rp,
  Rj, W, RowCount , Tx, Ax, Rx
  ) ;
 }
 else
 {
     status = umfdi_triplet_nomap_nox (n_row, n_col, nz, Ti, Tj, Ap, Ai,
  Rp, Rj, W, RowCount) ;
 }
    }
    (void) umf_i_free ((void *) Rx) ;
    (void) umf_i_free ((void *) Map2) ;
    (void) umf_i_free ((void *) Rp) ;
    (void) umf_i_free ((void *) Rj) ;
    (void) umf_i_free ((void *) RowCount) ;
    (void) umf_i_free ((void *) W) ;
    ;
    return (status) ;
}

variable_types: nz int

variable_types:
Ti
int []

variable_types:
Tj
int []

variable_types:
Tx
double []

variable_types:
Ap
int []

variable_types:
Ai
int []

variable_types:
Ax
double []

variable_types:
Map
int []

variable_types:
RowCount
int *

variable_types:
Rp
int *

variable_types:
Rj
int *

variable_types:
W
int *

variable_types: nn int

variable_types: status int

variable_types:
Rx
double *


decompiled_code:
_BOOL8 __fastcall umfdi_valid_symbolic(__int64 a1)
{
_BOOL8 result; // rax

if ( !a1 )
return 0LL;
result = 0LL;
if ( *(_DWORD *)(a1 + 56) == 41937 )
{
if ( *(_QWORD *)(a1 + 136) )
{
if ( *(_QWORD *)(a1 + 144) )
{
if ( *(_QWORD *)(a1 + 104) )
{
if ( *(_QWORD *)(a1 + 112) )
{
if ( *(_QWORD *)(a1 + 120) )
{
if ( *(_QWORD *)(a1 + 128) )
{
if ( *(_QWORD *)(a1 + 72) )
{
if ( *(_QWORD *)(a1 + 80) )
{
if ( *(_QWORD *)(a1 + 88) )
{
if ( *(int *)(a1 + 208) > 0 )
result = *(_DWORD *)(a1 + 212) > 0;
}
else
{
result = 0LL;
}
}
else
{
result = 0LL;
}
}
else
{
result = 0LL;
}
}
else
{
result = 0LL;
}
}
else
{
result = 0LL;
}
}
else
{
result = 0LL;
}
}
else
{
result = 0LL;
}
}
else
{
result = 0LL;
}
}
else
{
result = 0LL;
}
}
return result;
}

canonical_decompiled_code:
_BOOL8 __fastcall func0(__int64 a1)
{
_BOOL8 result; // rax

if ( !a1 )
return 0LL;
result = 0LL;
if ( *(_DWORD *)(a1 + 56) == 41937 )
{
if ( *(_QWORD *)(a1 + 136) )
{
if ( *(_QWORD *)(a1 + 144) )
{
if ( *(_QWORD *)(a1 + 104) )
{
if ( *(_QWORD *)(a1 + 112) )
{
if ( *(_QWORD *)(a1 + 120) )
{
if ( *(_QWORD *)(a1 + 128) )
{
if ( *(_QWORD *)(a1 + 72) )
{
if ( *(_QWORD *)(a1 + 80) )
{
if ( *(_QWORD *)(a1 + 88) )
{
if ( *(int *)(a1 + 208) > 0 )
result = *(_DWORD *)(a1 + 212) > 0;
}
else
{
result = 0LL;
}
}
else
{
result = 0LL;
}
}
else
{
result = 0LL;
}
}
else
{
result = 0LL;
}
}
else
{
result = 0LL;
}
}
else
{
result = 0LL;
}
}
else
{
result = 0LL;
}
}
else
{
result = 0LL;
}
}
else
{
result = 0LL;
}
}
return result;
}

original_code:
int umfdi_valid_symbolic
(
    SymbolicType *Symbolic
)
{
    if (!Symbolic)
    {
 return ((0)) ;
    }
    if (Symbolic->valid != 41937)
    {
 return ((0)) ;
    }
    if (!Symbolic->Cperm_init || !Symbolic->Rperm_init ||
 !Symbolic->Front_npivcol || !Symbolic->Front_1strow ||
 !Symbolic->Front_leftmostdesc ||
 !Symbolic->Front_parent || !Symbolic->Chain_start ||
 !Symbolic->Chain_maxrows || !Symbolic->Chain_maxcols ||
 Symbolic->n_row <= 0 || Symbolic->n_col <= 0)
    {
 return ((0)) ;
    }
    return ((1)) ;
}

canonical_original_code:
int umfdi_valid_symbolic(struct SymbolicType *Symbolic)
{
    if (!Symbolic)
    {
 return ((0)) ;
    }
    if (Symbolic->valid != 41937)
    {
 return ((0)) ;
    }
    if (!Symbolic->Cperm_init || !Symbolic->Rperm_init ||
 !Symbolic->Front_npivcol || !Symbolic->Front_1strow ||
 !Symbolic->Front_leftmostdesc ||
 !Symbolic->Front_parent || !Symbolic->Chain_start ||
 !Symbolic->Chain_maxrows || !Symbolic->Chain_maxcols ||
 Symbolic->n_row <= 0 || Symbolic->n_col <= 0)
    {
 return ((0)) ;
    }
    return ((1)) ;
}

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