decompiled_code:
__int64 __fastcall umfpack_di_report_triplet(int a1, int a2, int a3, __int64 a4, __int64 a5, __int64 a6, double *a7)
{
__int64 (*v8)(const char *, ...); // r9
bool v9; // bl
int v10; // er15
__int64 v11; // r12
int v12; // ebx
int v13; // er13
int v14; // er14
double v15; // xmm0_8
int v20; // [rsp+2Ch] [rbp-3Ch]

if ( !a7 )
return 0LL;
v20 = (int)*a7;
if ( v20 <= 2 )
return 0LL;
v8 = amd_printf;
v9 = a5 == 0 || a4 == 0;
if ( amd_printf )
{
amd_printf(
"triplet-form matrix, n_row = %d, n_col = %d nz = %d. ",
(unsigned int)a1,
(unsigned int)a2,
(unsigned int)a3);
if ( !v9 )
{
v8 = amd_printf;
if ( a1 > 0 && a2 > 0 )
{
if ( a3 >= 0 )
goto LABEL_8;
if ( amd_printf )
{
amd_printf("ERROR: nz is < 0\n\n");
return 4294967288LL;
}
return 4294967288LL;
}
if ( amd_printf )
{
amd_printf("ERROR: n_row or n_col is <= 0\n\n");
return 4294967290LL;
}
return 4294967290LL;
}
if ( amd_printf )
amd_printf("ERROR: indices not present\n\n");
return 4294967291LL;
}
if ( v9 )
return 4294967291LL;
if ( a2 > 0 && a1 > 0 )
{
if ( a3 >= 0 )
{
LABEL_8:
if ( v20 == 3 )
{
if ( !a3 )
{
LABEL_30:
if ( v8 )
v8("OK\n\n");
return 0LL;
}
}
else if ( v8 )
{
v8("\n");
v8 = amd_printf;
if ( !a3 )
goto LABEL_28;
}
else if ( !a3 )
{
return 0LL;
}
v10 = v20;
v11 = 0LL;
while ( 2 )
{
v12 = v11;
v13 = *(_DWORD *)(a4 + 4 * v11);
v14 = *(_DWORD *)(a5 + 4 * v11);
if ( v10 != 3 )
{
if ( v8 )
{
v8(" %d : %d %d ", (unsigned int)v11, (unsigned int)v13, (unsigned int)v14);
v8 = amd_printf;
if ( a6 )
{
v15 = *(double *)(a6 + 8 * v11);
if ( v15 == 0.0 )
{
if ( !amd_printf )
goto LABEL_20;
amd_printf(" (0)");
}
else
{
if ( !amd_printf )
goto LABEL_20;
amd_printf(" (%g)", v15);
}
}
}
else if ( a6 )
{
goto LABEL_20;
}
v8 = amd_printf;
if ( amd_printf )
{
amd_printf("\n");
v8 = amd_printf;
}
}
while ( 1 )
{
LABEL_20:
if ( v13 < 0 || v13 >= a1 || v14 < 0 || v14 >= a2 )
{
if ( v8 )
v8("ERROR: invalid triplet\n\n");
return 4294967288LL;
}
if ( v10 != 4 || (_DWORD)v11 != 9 )
break;
if ( a3 <= 10 )
goto LABEL_27;
if ( v8 )
{
v8(" ...\n");
v8 = amd_printf;
}
++v11;
v10 = 3;
v12 = v11;
v13 = *(_DWORD *)(a4 + 4 * v11);
v14 = *(_DWORD *)(a5 + 4 * v11);
}
if ( a3 > v12 + 1 )
{
++v11;
continue;
}
break;
}
LABEL_27:
if ( v20 == 3 )
goto LABEL_30;
LABEL_28:
if ( v8 )
{
v8(" triplet-form matrix ");
v8 = amd_printf;
goto LABEL_30;
}
return 0LL;
}
return 4294967288LL;
}
return 4294967290LL;
}

canonical_decompiled_code:
__int64 __fastcall func0(int a1, int a2, int a3, __int64 a4, __int64 a5, __int64 a6, double *a7)
{
__int64 (*v8)(const char *, ...); // r9
bool v9; // bl
int v10; // er15
__int64 v11; // r12
int v12; // ebx
int v13; // er13
int v14; // er14
double v15; // xmm0_8
int v20; // [rsp+2Ch] [rbp-3Ch]

if ( !a7 )
return 0LL;
v20 = (int)*a7;
if ( v20 <= 2 )
return 0LL;
v8 = amd_printf;
v9 = a5 == 0 || a4 == 0;
if ( amd_printf )
{
amd_printf(
"triplet-form matrix, n_row = %d, n_col = %d nz = %d. ",
(unsigned int)a1,
(unsigned int)a2,
(unsigned int)a3);
if ( !v9 )
{
v8 = amd_printf;
if ( a1 > 0 && a2 > 0 )
{
if ( a3 >= 0 )
goto LABEL_8;
if ( amd_printf )
{
amd_printf("ERROR: nz is < 0\n\n");
return 4294967288LL;
}
return 4294967288LL;
}
if ( amd_printf )
{
amd_printf("ERROR: n_row or n_col is <= 0\n\n");
return 4294967290LL;
}
return 4294967290LL;
}
if ( amd_printf )
amd_printf("ERROR: indices not present\n\n");
return 4294967291LL;
}
if ( v9 )
return 4294967291LL;
if ( a2 > 0 && a1 > 0 )
{
if ( a3 >= 0 )
{
LABEL_8:
if ( v20 == 3 )
{
if ( !a3 )
{
LABEL_30:
if ( v8 )
v8("OK\n\n");
return 0LL;
}
}
else if ( v8 )
{
v8("\n");
v8 = amd_printf;
if ( !a3 )
goto LABEL_28;
}
else if ( !a3 )
{
return 0LL;
}
v10 = v20;
v11 = 0LL;
while ( 2 )
{
v12 = v11;
v13 = *(_DWORD *)(a4 + 4 * v11);
v14 = *(_DWORD *)(a5 + 4 * v11);
if ( v10 != 3 )
{
if ( v8 )
{
v8(" %d : %d %d ", (unsigned int)v11, (unsigned int)v13, (unsigned int)v14);
v8 = amd_printf;
if ( a6 )
{
v15 = *(double *)(a6 + 8 * v11);
if ( v15 == 0.0 )
{
if ( !amd_printf )
goto LABEL_20;
amd_printf(" (0)");
}
else
{
if ( !amd_printf )
goto LABEL_20;
amd_printf(" (%g)", v15);
}
}
}
else if ( a6 )
{
goto LABEL_20;
}
v8 = amd_printf;
if ( amd_printf )
{
amd_printf("\n");
v8 = amd_printf;
}
}
while ( 1 )
{
LABEL_20:
if ( v13 < 0 || v13 >= a1 || v14 < 0 || v14 >= a2 )
{
if ( v8 )
v8("ERROR: invalid triplet\n\n");
return 4294967288LL;
}
if ( v10 != 4 || (_DWORD)v11 != 9 )
break;
if ( a3 <= 10 )
goto LABEL_27;
if ( v8 )
{
v8(" ...\n");
v8 = amd_printf;
}
++v11;
v10 = 3;
v12 = v11;
v13 = *(_DWORD *)(a4 + 4 * v11);
v14 = *(_DWORD *)(a5 + 4 * v11);
}
if ( a3 > v12 + 1 )
{
++v11;
continue;
}
break;
}
LABEL_27:
if ( v20 == 3 )
goto LABEL_30;
LABEL_28:
if ( v8 )
{
v8(" triplet-form matrix ");
v8 = amd_printf;
goto LABEL_30;
}
return 0LL;
}
return 4294967288LL;
}
return 4294967290LL;
}

original_code:
int umfpack_di_report_triplet
(
    int n_row,
    int n_col,
    int nz,
    const int Ti [ ],
    const int Tj [ ],
    const double Tx [ ],
    const double Control [20]
)
{
    double t ;
    int prl, prl1, k, i, j, do_values ;
    prl = ((Control != (double *) ((void *)0)) ? (((Control [0]) != (Control [0])) ? 1 : Control [0]) : 1) ;
    if (prl <= 2)
    {
 return ((0)) ;
    }
    { if (amd_printf != ((void *)0)) (void) amd_printf ("triplet-form matrix, n_row = ""%d"", n_col = ""%d"" nz = ""%d"". ", n_row, n_col, nz) ; } ;
    if (!Ti || !Tj)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: indices not present\n\n") ; } ;
 return ((-5)) ;
    }
    if (n_row <= 0 || n_col <= 0)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: n_row or n_col is <= 0\n\n") ; } ;
 return ((-6)) ;
    }
    if (nz < 0)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: nz is < 0\n\n") ; } ;
 return ((-8)) ;
    }
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ; } } ;
    do_values = Tx != (double *) ((void *)0) ;
    prl1 = prl ;
    for (k = 0 ; k < nz ; k++)
    {
 i = Ti [k] ;
 j = Tj [k] ;
 { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("    ""%d"" : ""%d"" ""%d"" ", (k), (i), (j)) ; } ; } } ;
 if (do_values && prl >= 4)
 {
     { (t) = (Tx)[k] ; } ;
     { if (((t) != 0.)) { { if (amd_printf != ((void *)0)) (void) amd_printf (" (%g)", (t)) ; } ; } else { { if (amd_printf != ((void *)0)) (void) amd_printf (" (0)") ; } ; } } ;
 }
 { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ; } } ;
 if (i < 0 || i >= n_row || j < 0 || j >= n_col)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: invalid triplet\n\n") ; } ;
     return ((-8)) ;
 }
 if (prl == 4 && k == 9 && nz > 10)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("    ...\n") ; } ;
     prl-- ;
 }
    }
    prl = prl1 ;
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("    triplet-form matrix ") ; } ; } } ;
    { if (amd_printf != ((void *)0)) (void) amd_printf ("OK\n\n") ; } ;
    return ((0)) ;
}

canonical_original_code:
int umfpack_di_report_triplet(int n_row, int n_col, int nz, int Ti[], int Tj[], double Tx[], double Control[20])
{
    double t;
    int prl; int prl1; int k; int i; int j; int do_values;
    prl = ((Control != (double *) ((void *)0)) ? (((Control [0]) != (Control [0])) ? 1 : Control [0]) : 1) ;
    if (prl <= 2)
    {
 return ((0)) ;
    }
    { if (amd_printf != ((void *)0)) (void) amd_printf ("triplet-form matrix, n_row = ""%d"", n_col = ""%d"" nz = ""%d"". ", n_row, n_col, nz) ; } ;
    if (!Ti || !Tj)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: indices not present\n\n") ; } ;
 return ((-5)) ;
    }
    if (n_row <= 0 || n_col <= 0)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: n_row or n_col is <= 0\n\n") ; } ;
 return ((-6)) ;
    }
    if (nz < 0)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: nz is < 0\n\n") ; } ;
 return ((-8)) ;
    }
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ; } } ;
    do_values = Tx != (double *) ((void *)0) ;
    prl1 = prl ;
    for (k = 0 ; k < nz ; k++)
    {
 i = Ti [k] ;
 j = Tj [k] ;
 { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("    ""%d"" : ""%d"" ""%d"" ", (k), (i), (j)) ; } ; } } ;
 if (do_values && prl >= 4)
 {
     { (t) = (Tx)[k] ; } ;
     { if (((t) != 0.)) { { if (amd_printf != ((void *)0)) (void) amd_printf (" (%g)", (t)) ; } ; } else { { if (amd_printf != ((void *)0)) (void) amd_printf (" (0)") ; } ; } } ;
 }
 { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ; } } ;
 if (i < 0 || i >= n_row || j < 0 || j >= n_col)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: invalid triplet\n\n") ; } ;
     return ((-8)) ;
 }
 if (prl == 4 && k == 9 && nz > 10)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("    ...\n") ; } ;
     prl-- ;
 }
    }
    prl = prl1 ;
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("    triplet-form matrix ") ; } ; } } ;
    { if (amd_printf != ((void *)0)) (void) amd_printf ("OK\n\n") ; } ;
    return ((0)) ;
}

variable_types: nz int

variable_types:
Ti
int []

variable_types:
Tj
int []

variable_types:
Tx
double []

variable_types:
Control
double [20]

variable_types: t double

variable_types: prl int

variable_types: k int

variable_types: j int


original_code:
long umfpack_dl_get_determinant
(
    double *Mx,
    double *Ex,
    void *NumericHandle,
    double User_Info [90]
)
{
    double d_mantissa, d_tmp ;
    double d_exponent, Info2 [90], one [2] = {1.0, 0.0}, d_sign ;
    double *D ;
    double *Info, *Rs ;
    NumericType *Numeric ;
    long i, n, itmp, npiv, *Wi, *Rperm, *Cperm, do_scale ;
    long do_recip ;
    if (User_Info != (double *) ((void *)0))
    {
 Info = User_Info ;
    }
    else
    {
 Info = Info2 ;
 for (i = 0 ; i < 90 ; i++)
 {
     Info [i] = (-1) ;
 }
    }
    Info [0] = (0) ;
    Numeric = (NumericType *) NumericHandle ;
    if (!umfdl_valid_numeric (Numeric))
    {
 Info [0] = (-3) ;
 return ((-3)) ;
    }
    if (Numeric->n_row != Numeric->n_col)
    {
 Info [0] = (-13) ;
 return ((-13)) ;
    }
    if (Mx == (double *) ((void *)0))
    {
 Info [0] = (-5) ;
 return ((-5)) ;
    }
    n = Numeric->n_row ;
    Wi = (long *) umf_l_malloc (n, sizeof (long)) ;
    if (!Wi)
    {
 ;
 Info [0] = (-1) ;
 return ((-1)) ;
    }
    Rs = Numeric->Rs ;
    do_scale = (Rs != (double *) ((void *)0)) ;
    do_recip = Numeric->do_recip ;
    d_mantissa = ((double *) one) [0] ;
    d_exponent = 0.0 ;
    D = Numeric->D ;
    for (i = 0 ; i < n ; i++)
    {
 { (d_tmp) = (d_mantissa) * (D [i]) ; } ;
 d_mantissa = d_tmp ;
 if (!rescale_determinant (&d_mantissa, &d_exponent))
 {
     Info [0] = (1) ;
     do_scale = (0) ;
     break ;
 }
    }
    if (do_scale)
    {
 for (i = 0 ; i < n ; i++)
 {
     if (do_recip)
     {
  { (d_mantissa) /= (Rs [i]) ; } ;
     }
     else
     {
  { (d_mantissa) *= (Rs [i]) ; } ;
     }
     if (!rescale_determinant (&d_mantissa, &d_exponent))
     {
  Info [0] = (1) ;
  break ;
     }
 }
    }
    npiv = 0 ;
    Rperm = Numeric->Rperm ;
    for (i = 0 ; i < n ; i++)
    {
 Wi [i] = Rperm [i] ;
    }
    for (i = 0 ; i < n ; i++)
    {
 while (Wi [i] != i)
 {
     itmp = Wi [Wi [i]] ;
     Wi [Wi [i]] = Wi [i] ;
     Wi [i] = itmp ;
     npiv++ ;
 }
    }
    Cperm = Numeric->Cperm ;
    for (i = 0 ; i < n ; i++)
    {
 Wi [i] = Cperm [i] ;
    }
    for (i = 0 ; i < n ; i++)
    {
 while (Wi [i] != i)
 {
     itmp = Wi [Wi [i]] ;
     Wi [Wi [i]] = Wi [i] ;
     Wi [i] = itmp ;
     npiv++ ;
 }
    }
    d_sign = (npiv % 2) ? -1. : 1. ;
    (void) umf_l_free ((void *) Wi) ;
    if (Ex == (double *) ((void *)0))
    {
 { (d_mantissa) *= (pow (10.0, d_exponent)) ; } ;
    }
    else
    {
 Ex [0] = d_exponent ;
    }
    Mx [0] = d_sign * (d_mantissa) ;
    if (d_exponent + 1.0 > log10 (((double)1.79769313486231570814527423731704357e+308L)))
    {
 Info [0] = (3) ;
    }
    else if (d_exponent - 1.0 < log10 (((double)2.22507385850720138309023271733240406e-308L)))
    {
 Info [0] = (2) ;
    }
    return ((0)) ;
}

canonical_original_code:
long umfpack_dl_get_determinant(double *Mx, double *Ex, void *NumericHandle, double User_Info[90])
{
    double d_mantissa; double d_tmp;
    double d_exponent; double Info2[90]; double one[2] = {1.0, 0.0}; double d_sign;
    double *D;
    double *Info; double *Rs;
    struct NumericType *Numeric;
    long i; long n; long itmp; long npiv; long *Wi; long *Rperm; long *Cperm; long do_scale;
    long do_recip;
    if (User_Info != (double *) ((void *)0))
    {
 Info = User_Info ;
    }
    else
    {
 Info = Info2 ;
 for (i = 0 ; i < 90 ; i++)
 {
     Info [i] = (-1) ;
 }
    }
    Info [0] = (0) ;
    Numeric = (struct NumericType *) NumericHandle ;
    if (!umfdl_valid_numeric (Numeric))
    {
 Info [0] = (-3) ;
 return ((-3)) ;
    }
    if (Numeric->n_row != Numeric->n_col)
    {
 Info [0] = (-13) ;
 return ((-13)) ;
    }
    if (Mx == (double *) ((void *)0))
    {
 Info [0] = (-5) ;
 return ((-5)) ;
    }
    n = Numeric->n_row ;
    Wi = (long *) umf_l_malloc (n, sizeof (long)) ;
    if (!Wi)
    {
 ;
 Info [0] = (-1) ;
 return ((-1)) ;
    }
    Rs = Numeric->Rs ;
    do_scale = (Rs != (double *) ((void *)0)) ;
    do_recip = Numeric->do_recip ;
    d_mantissa = ((double *) one) [0] ;
    d_exponent = 0.0 ;
    D = Numeric->D ;
    for (i = 0 ; i < n ; i++)
    {
 { (d_tmp) = (d_mantissa) * (D [i]) ; } ;
 d_mantissa = d_tmp ;
 if (!rescale_determinant (&d_mantissa, &d_exponent))
 {
     Info [0] = (1) ;
     do_scale = (0) ;
     break ;
 }
    }
    if (do_scale)
    {
 for (i = 0 ; i < n ; i++)
 {
     if (do_recip)
     {
  { (d_mantissa) /= (Rs [i]) ; } ;
     }
     else
     {
  { (d_mantissa) *= (Rs [i]) ; } ;
     }
     if (!rescale_determinant (&d_mantissa, &d_exponent))
     {
  Info [0] = (1) ;
  break ;
     }
 }
    }
    npiv = 0 ;
    Rperm = Numeric->Rperm ;
    for (i = 0 ; i < n ; i++)
    {
 Wi [i] = Rperm [i] ;
    }
    for (i = 0 ; i < n ; i++)
    {
 while (Wi [i] != i)
 {
     itmp = Wi [Wi [i]] ;
     Wi [Wi [i]] = Wi [i] ;
     Wi [i] = itmp ;
     npiv++ ;
 }
    }
    Cperm = Numeric->Cperm ;
    for (i = 0 ; i < n ; i++)
    {
 Wi [i] = Cperm [i] ;
    }
    for (i = 0 ; i < n ; i++)
    {
 while (Wi [i] != i)
 {
     itmp = Wi [Wi [i]] ;
     Wi [Wi [i]] = Wi [i] ;
     Wi [i] = itmp ;
     npiv++ ;
 }
    }
    d_sign = (npiv % 2) ? -1. : 1. ;
    (void) umf_l_free ((void *) Wi) ;
    if (Ex == (double *) ((void *)0))
    {
 { (d_mantissa) *= (pow (10.0, d_exponent)) ; } ;
    }
    else
    {
 Ex [0] = d_exponent ;
    }
    Mx [0] = d_sign * (d_mantissa) ;
    if (d_exponent + 1.0 > log10 (((double)1.79769313486231570814527423731704357e+308L)))
    {
 Info [0] = (3) ;
    }
    else if (d_exponent - 1.0 < log10 (((double)2.22507385850720138309023271733240406e-308L)))
    {
 Info [0] = (2) ;
    }
    return ((0)) ;
}

variable_types:
Mx
double *

variable_types:
Ex
double *

variable_types:
NumericHandle
void *

variable_types:
one
double [2]

variable_types:
D
double *

variable_types:
Info
double *

variable_types:
Rs
double *

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: i long

variable_types: n long

variable_types: itmp long

variable_types: npiv long

variable_types:
Wi
long *

variable_types:
Rperm
long *

variable_types:
Cperm
long *

return_type: long

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


original_code:
static long rescale_determinant
(
    double *d_mantissa,
    double *d_exponent
)
{
    double d_abs ;
    { (d_abs) = ((((*d_mantissa) < 0.)) ? -(*d_mantissa) : (*d_mantissa)) ; } ;
    if (((d_abs) == 0.))
    {
 *d_exponent = 0 ;
 return ((0)) ;
    }
    if (((d_abs) != (d_abs)))
    {
 return ((0)) ;
    }
    while (d_abs < 1.)
    {
 { (*d_mantissa) *= (10.0) ; } ;
 *d_exponent = *d_exponent - 1.0 ;
 { (d_abs) = ((((*d_mantissa) < 0.)) ? -(*d_mantissa) : (*d_mantissa)) ; } ;
    }
    while (d_abs >= 10.)
    {
 { (*d_mantissa) *= (0.1) ; } ;
 *d_exponent = *d_exponent + 1.0 ;
 { (d_abs) = ((((*d_mantissa) < 0.)) ? -(*d_mantissa) : (*d_mantissa)) ; } ;
    }
    return ((1)) ;
}

canonical_original_code:
static long rescale_determinant(double *d_mantissa, double *d_exponent)
{
    double d_abs;
    { (d_abs) = ((((*d_mantissa) < 0.)) ? -(*d_mantissa) : (*d_mantissa)) ; } ;
    if (((d_abs) == 0.))
    {
 *d_exponent = 0 ;
 return ((0)) ;
    }
    if (((d_abs) != (d_abs)))
    {
 return ((0)) ;
    }
    while (d_abs < 1.)
    {
 { (*d_mantissa) *= (10.0) ; } ;
 *d_exponent = *d_exponent - 1.0 ;
 { (d_abs) = ((((*d_mantissa) < 0.)) ? -(*d_mantissa) : (*d_mantissa)) ; } ;
    }
    while (d_abs >= 10.)
    {
 { (*d_mantissa) *= (0.1) ; } ;
 *d_exponent = *d_exponent + 1.0 ;
 { (d_abs) = ((((*d_mantissa) < 0.)) ? -(*d_mantissa) : (*d_mantissa)) ; } ;
    }
    return ((1)) ;
}


original_code:
long umfdl_valid_numeric
(
    NumericType *Numeric
)
{
    if (!Numeric)
    {
 return ((0)) ;
    }
    if (Numeric->valid != 399789720)
    {
 return ((0)) ;
    }
    if (Numeric->n_row <= 0 || Numeric->n_col <= 0 || !Numeric->D ||
 !Numeric->Rperm || !Numeric->Cperm ||
 !Numeric->Lpos || !Numeric->Upos ||
 !Numeric->Lilen || !Numeric->Uilen || !Numeric->Lip || !Numeric->Uip ||
 !Numeric->Memory || (Numeric->ulen > 0 && !Numeric->Upattern))
    {
 return ((0)) ;
    }
    return ((1)) ;
}

canonical_original_code:
long umfdl_valid_numeric(struct NumericType *Numeric)
{
    if (!Numeric)
    {
 return ((0)) ;
    }
    if (Numeric->valid != 399789720)
    {
 return ((0)) ;
    }
    if (Numeric->n_row <= 0 || Numeric->n_col <= 0 || !Numeric->D ||
 !Numeric->Rperm || !Numeric->Cperm ||
 !Numeric->Lpos || !Numeric->Upos ||
 !Numeric->Lilen || !Numeric->Uilen || !Numeric->Lip || !Numeric->Uip ||
 !Numeric->Memory || (Numeric->ulen > 0 && !Numeric->Upattern))
    {
 return ((0)) ;
    }
    return ((1)) ;
}

user_defined_types: union Unit_union { struct { long size; } header; double xxxxxx; }


original_code:
int umfdi_row_search
(
    NumericType *Numeric,
    WorkType *Work,
    SymbolicType *Symbolic,
    int cdeg0,
    int cdeg1,
    const int Pattern [ ],
    const int Pos [ ],
    int pivrow [2],
    int rdeg [2],
    int W_i [ ],
    int W_o [ ],
    int prior_pivrow [2],
    const double Wxy [ ],
    int pivcol,
    int freebie [ ]
)
{
    double maxval, toler, toler2, value, pivot [2] ;
    int 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 ;
    int *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
 {
     int *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 = (int *) 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 = (int *) 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:
int umfdi_row_search(struct NumericType *Numeric, struct WorkType *Work, struct SymbolicType *Symbolic, int cdeg0, int cdeg1, int Pattern[], int Pos[], int pivrow[2], int rdeg[2], int W_i[], int W_o[], int prior_pivrow[2], double Wxy[], int pivcol, int freebie[])
{
    double maxval; double toler; double toler2; double value; double pivot[2];
    int i; int row; int deg; int col; int *Frpos; int fnrows; int *E; int j; int ncols; int *Cols; int *Rows; int e; int f; int Wrpflag; int *Fcpos; int fncols; int tpi; int max_rdeg; int nans_in_col; int was_offdiag; int diag_row; int prefer_diagonal; int *Wrp; int found; int *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;
    int *Row_tuples; int *Row_degree; int *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
 {
     int *Front_leftmostdesc; int *Front_1strow; int *Front_new1strow; int row1; int row2; int fleftmost; int nfr; int n_row; int 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 = (int *) 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 = (int *) 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; int scale; int valid; union Unit_union { struct { int size; } header; double xxxxxx; } *Memory; int ihead; int *Rperm; int ulen; double *D; int do_recip; double *Rs; int n_row; int tail_usage; int maxnrows; } *

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

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

variable_types:
Pattern
int []

variable_types:
Pos
int []

variable_types:
pivrow
int [2]

variable_types:
rdeg
int [2]

variable_types:
Wxy
double []

variable_types: pivcol int

variable_types:
freebie
int []

variable_types: maxval double

variable_types: toler double

variable_types: value double

variable_types:
pivot
double [2]

variable_types: i int

variable_types: row int

variable_types: deg int

variable_types: col int

variable_types:
Frpos
int *

variable_types: fnrows int

variable_types:
E
int *

variable_types: ncols int

variable_types:
Cols
int *

variable_types:
Rows
int *

variable_types: e int

variable_types: f int

variable_types: Wrpflag int

variable_types:
Fcpos
int *

variable_types: fncols int

variable_types: tpi int

variable_types:
Wrp
int *

variable_types: found int

variable_types:
tp
struct Tuple { int e; } *

variable_types:
tpend
struct Tuple { int e; } *

variable_types:
ep
struct Element { int cdeg; } *

variable_types: a double

variable_types: fleftmost int

variable_types: nfr int

variable_types: frontid int

return_type: int

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


original_code:
int umfdi_valid_numeric
(
    NumericType *Numeric
)
{
    if (!Numeric)
    {
 return ((0)) ;
    }
    if (Numeric->valid != 15977)
    {
 return ((0)) ;
    }
    if (Numeric->n_row <= 0 || Numeric->n_col <= 0 || !Numeric->D ||
 !Numeric->Rperm || !Numeric->Cperm ||
 !Numeric->Lpos || !Numeric->Upos ||
 !Numeric->Lilen || !Numeric->Uilen || !Numeric->Lip || !Numeric->Uip ||
 !Numeric->Memory || (Numeric->ulen > 0 && !Numeric->Upattern))
    {
 return ((0)) ;
    }
    return ((1)) ;
}

canonical_original_code:
int umfdi_valid_numeric(struct NumericType *Numeric)
{
    if (!Numeric)
    {
 return ((0)) ;
    }
    if (Numeric->valid != 15977)
    {
 return ((0)) ;
    }
    if (Numeric->n_row <= 0 || Numeric->n_col <= 0 || !Numeric->D ||
 !Numeric->Rperm || !Numeric->Cperm ||
 !Numeric->Lpos || !Numeric->Upos ||
 !Numeric->Lilen || !Numeric->Uilen || !Numeric->Lip || !Numeric->Uip ||
 !Numeric->Memory || (Numeric->ulen > 0 && !Numeric->Upattern))
    {
 return ((0)) ;
    }
    return ((1)) ;
}

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


original_code:
long umfzl_valid_numeric
(
    NumericType *Numeric
)
{
    if (!Numeric)
    {
 return ((0)) ;
    }
    if (Numeric->valid != 129987754)
    {
 return ((0)) ;
    }
    if (Numeric->n_row <= 0 || Numeric->n_col <= 0 || !Numeric->D ||
 !Numeric->Rperm || !Numeric->Cperm ||
 !Numeric->Lpos || !Numeric->Upos ||
 !Numeric->Lilen || !Numeric->Uilen || !Numeric->Lip || !Numeric->Uip ||
 !Numeric->Memory || (Numeric->ulen > 0 && !Numeric->Upattern))
    {
 return ((0)) ;
    }
    return ((1)) ;
}

canonical_original_code:
long umfzl_valid_numeric(struct NumericType *Numeric)
{
    if (!Numeric)
    {
 return ((0)) ;
    }
    if (Numeric->valid != 129987754)
    {
 return ((0)) ;
    }
    if (Numeric->n_row <= 0 || Numeric->n_col <= 0 || !Numeric->D ||
 !Numeric->Rperm || !Numeric->Cperm ||
 !Numeric->Lpos || !Numeric->Upos ||
 !Numeric->Lilen || !Numeric->Uilen || !Numeric->Lip || !Numeric->Uip ||
 !Numeric->Memory || (Numeric->ulen > 0 && !Numeric->Upattern))
    {
 return ((0)) ;
    }
    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; } *

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


original_code:
int umfpack_zi_get_symbolic
(
    int *p_n_row,
    int *p_n_col,
    int *p_n1,
    int *p_nz,
    int *p_nfr,
    int *p_nchains,
    int P [ ],
    int Q [ ],
    int Front_npivcol [ ],
    int Front_parent [ ],
    int Front_1strow [ ],
    int Front_leftmostdesc [ ],
    int Chain_start [ ],
    int Chain_maxrows [ ],
    int Chain_maxcols [ ],
    void *SymbolicHandle
)
{
    SymbolicType *Symbolic ;
    int k, n_row, n_col, n1, nfr, nchains, *p ;
    Symbolic = (SymbolicType *) SymbolicHandle ;
    if (!umfzi_valid_symbolic (Symbolic))
    {
 return ((-4)) ;
    }
    n_row = Symbolic->n_row ;
    n_col = Symbolic->n_col ;
    n1 = Symbolic->n1 ;
    nfr = Symbolic->nfr ;
    nchains = Symbolic->nchains ;
    if (p_n_row)
    {
 *p_n_row = n_row ;
    }
    if (p_n_col)
    {
 *p_n_col = n_col ;
    }
    if (p_n1)
    {
 *p_n1 = n1 ;
    }
    if (p_nz)
    {
 *p_nz = Symbolic->nz ;
    }
    if (p_nfr)
    {
 *p_nfr = nfr ;
    }
    if (p_nchains)
    {
 *p_nchains = nchains ;
    }
    if (P != (int *) ((void *)0))
    {
 int *Rperm_init, *Diagonal_map ;
 Rperm_init = Symbolic->Rperm_init ;
 Diagonal_map = Symbolic->Diagonal_map ;
 if (Diagonal_map != (int *) ((void *)0))
 {
     ;
     for (k = 0 ; k < n_row ; k++)
     {
  P [k] = Rperm_init [Diagonal_map [k]] ;
     }
 }
 else
 {
     for (k = 0 ; k < n_row ; k++)
     {
  P [k] = Rperm_init [k] ;
     }
 }
    }
    if (Q != (int *) ((void *)0))
    {
 p = Symbolic->Cperm_init ;
 for (k = 0 ; k < n_col ; k++)
 {
     Q [k] = p [k] ;
 }
    }
    if (Front_npivcol != (int *) ((void *)0))
    {
 p = Symbolic->Front_npivcol ;
 for (k = 0 ; k <= nfr ; k++)
 {
     Front_npivcol [k] = p [k] ;
 }
    }
    if (Front_parent != (int *) ((void *)0))
    {
 p = Symbolic->Front_parent ;
 for (k = 0 ; k <= nfr ; k++)
 {
     Front_parent [k] = p [k] ;
 }
    }
    if (Front_1strow != (int *) ((void *)0))
    {
 p = Symbolic->Front_1strow ;
 for (k = 0 ; k <= nfr ; k++)
 {
     Front_1strow [k] = p [k] ;
 }
    }
    if (Front_leftmostdesc != (int *) ((void *)0))
    {
 p = Symbolic->Front_leftmostdesc ;
 for (k = 0 ; k <= nfr ; k++)
 {
     Front_leftmostdesc [k] = p [k] ;
 }
    }
    if (Chain_start != (int *) ((void *)0))
    {
 p = Symbolic->Chain_start ;
 for (k = 0 ; k <= nchains ; k++)
 {
     Chain_start [k] = p [k] ;
 }
    }
    if (Chain_maxrows != (int *) ((void *)0))
    {
 p = Symbolic->Chain_maxrows ;
 for (k = 0 ; k < nchains ; k++)
 {
     Chain_maxrows [k] = p [k] ;
 }
 Chain_maxrows [nchains] = 0 ;
    }
    if (Chain_maxcols != (int *) ((void *)0))
    {
 p = Symbolic->Chain_maxcols ;
 for (k = 0 ; k < nchains ; k++)
 {
     Chain_maxcols [k] = p [k] ;
 }
 Chain_maxcols [nchains] = 0 ;
    }
    return ((0)) ;
}

canonical_original_code:
int umfpack_zi_get_symbolic(int *p_n_row, int *p_n_col, int *p_n1, int *p_nz, int *p_nfr, int *p_nchains, int P[], int Q[], int Front_npivcol[], int Front_parent[], int Front_1strow[], int Front_leftmostdesc[], int Chain_start[], int Chain_maxrows[], int Chain_maxcols[], void *SymbolicHandle)
{
    struct SymbolicType *Symbolic;
    int k; int n_row; int n_col; int n1; int nfr; int nchains; int *p;
    Symbolic = (struct SymbolicType *) SymbolicHandle ;
    if (!umfzi_valid_symbolic (Symbolic))
    {
 return ((-4)) ;
    }
    n_row = Symbolic->n_row ;
    n_col = Symbolic->n_col ;
    n1 = Symbolic->n1 ;
    nfr = Symbolic->nfr ;
    nchains = Symbolic->nchains ;
    if (p_n_row)
    {
 *p_n_row = n_row ;
    }
    if (p_n_col)
    {
 *p_n_col = n_col ;
    }
    if (p_n1)
    {
 *p_n1 = n1 ;
    }
    if (p_nz)
    {
 *p_nz = Symbolic->nz ;
    }
    if (p_nfr)
    {
 *p_nfr = nfr ;
    }
    if (p_nchains)
    {
 *p_nchains = nchains ;
    }
    if (P != (int *) ((void *)0))
    {
 int *Rperm_init; int *Diagonal_map;
 Rperm_init = Symbolic->Rperm_init ;
 Diagonal_map = Symbolic->Diagonal_map ;
 if (Diagonal_map != (int *) ((void *)0))
 {
     ;
     for (k = 0 ; k < n_row ; k++)
     {
  P [k] = Rperm_init [Diagonal_map [k]] ;
     }
 }
 else
 {
     for (k = 0 ; k < n_row ; k++)
     {
  P [k] = Rperm_init [k] ;
     }
 }
    }
    if (Q != (int *) ((void *)0))
    {
 p = Symbolic->Cperm_init ;
 for (k = 0 ; k < n_col ; k++)
 {
     Q [k] = p [k] ;
 }
    }
    if (Front_npivcol != (int *) ((void *)0))
    {
 p = Symbolic->Front_npivcol ;
 for (k = 0 ; k <= nfr ; k++)
 {
     Front_npivcol [k] = p [k] ;
 }
    }
    if (Front_parent != (int *) ((void *)0))
    {
 p = Symbolic->Front_parent ;
 for (k = 0 ; k <= nfr ; k++)
 {
     Front_parent [k] = p [k] ;
 }
    }
    if (Front_1strow != (int *) ((void *)0))
    {
 p = Symbolic->Front_1strow ;
 for (k = 0 ; k <= nfr ; k++)
 {
     Front_1strow [k] = p [k] ;
 }
    }
    if (Front_leftmostdesc != (int *) ((void *)0))
    {
 p = Symbolic->Front_leftmostdesc ;
 for (k = 0 ; k <= nfr ; k++)
 {
     Front_leftmostdesc [k] = p [k] ;
 }
    }
    if (Chain_start != (int *) ((void *)0))
    {
 p = Symbolic->Chain_start ;
 for (k = 0 ; k <= nchains ; k++)
 {
     Chain_start [k] = p [k] ;
 }
    }
    if (Chain_maxrows != (int *) ((void *)0))
    {
 p = Symbolic->Chain_maxrows ;
 for (k = 0 ; k < nchains ; k++)
 {
     Chain_maxrows [k] = p [k] ;
 }
 Chain_maxrows [nchains] = 0 ;
    }
    if (Chain_maxcols != (int *) ((void *)0))
    {
 p = Symbolic->Chain_maxcols ;
 for (k = 0 ; k < nchains ; k++)
 {
     Chain_maxcols [k] = p [k] ;
 }
 Chain_maxcols [nchains] = 0 ;
    }
    return ((0)) ;
}

variable_types:
P
int []

variable_types:
Q
int []

variable_types:
SymbolicHandle
void *

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

variable_types: k int

variable_types: nchains int

variable_types:
p
int *


original_code:
double umfzi_symbolic_usage
(
    int n_row,
    int n_col,
    int nchains,
    int nfr,
    int esize,
    int prefer_diagonal
)
{
    double units ;
    units =
 (ceil ((sizeof (SymbolicType) * ((double) 1)) / sizeof (Unit)))
 + 2 * (ceil ((sizeof (int) * ((double) n_col+1)) / sizeof (Unit)))
 + 2 * (ceil ((sizeof (int) * ((double) n_row+1)) / sizeof (Unit)))
 + 3 * (ceil ((sizeof (int) * ((double) nchains+1)) / sizeof (Unit)))
 + 4 * (ceil ((sizeof (int) * ((double) nfr+1)) / sizeof (Unit))) ;
    units += (ceil ((sizeof (int) * ((double) esize)) / sizeof (Unit))) ;
    if (prefer_diagonal)
    {
 units += (ceil ((sizeof (int) * ((double) n_col+1)) / sizeof (Unit))) ;
    }
    return (units) ;
}

canonical_original_code:
double umfzi_symbolic_usage(int n_row, int n_col, int nchains, int nfr, int esize, int prefer_diagonal)
{
    double units;
    units =
 (ceil ((sizeof (SymbolicType) * ((double) 1)) / sizeof (Unit)))
 + 2 * (ceil ((sizeof (int) * ((double) n_col+1)) / sizeof (Unit)))
 + 2 * (ceil ((sizeof (int) * ((double) n_row+1)) / sizeof (Unit)))
 + 3 * (ceil ((sizeof (int) * ((double) nchains+1)) / sizeof (Unit)))
 + 4 * (ceil ((sizeof (int) * ((double) nfr+1)) / sizeof (Unit))) ;
    units += (ceil ((sizeof (int) * ((double) esize)) / sizeof (Unit))) ;
    if (prefer_diagonal)
    {
 units += (ceil ((sizeof (int) * ((double) n_col+1)) / sizeof (Unit))) ;
    }
    return (units) ;
}

variable_types: esize int

variable_types: units double

return_type: double


original_code:
long umfzl_valid_symbolic
(
    SymbolicType *Symbolic
)
{
    if (!Symbolic)
    {
 return ((0)) ;
    }
    if (Symbolic->valid != 110291734)
    {
 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:
long umfzl_valid_symbolic(struct SymbolicType *Symbolic)
{
    if (!Symbolic)
    {
 return ((0)) ;
    }
    if (Symbolic->valid != 110291734)
    {
 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; long valid; } *


decompiled_code:
__int64 __fastcall umfzi_report_vector(int a1, __int64 a2, __int64 a3, int a4, int a5, int a6)
{
int v11; // er15
int v12; // ebx
unsigned int v13; // edi
unsigned int v14; // er12
unsigned int i; // ebx

if ( a4 <= 3 && a5 == 0 )
return 0;
if ( amd_printf )
{
amd_printf("dense vector, n = %d. ", (unsigned int)a1);
if ( !a5 )
{
LABEL_7:
if ( amd_printf )
amd_printf("\n");
goto LABEL_9;
}
}
else if ( !a5 )
{
LABEL_9:
if ( a4 == 4 )
{
v11 = 10;
if ( a1 <= 10 )
v11 = a1;
v12 = 0;
if ( a1 > 0 )
{
do
{
v13 = v12++;
print_value(v13, a2, a3, a6);
}
while ( v11 > v12 );
}
if ( a1 > v11 )
{
if ( amd_printf )
amd_printf(" ...\n");
print_value(a1 - 1, a2, a3, a6);
}
}
else if ( a4 > 4 && a1 > 0 )
{
for ( i = 0; i != a1; ++i )
print_value(i, a2, a3, a6);
}
if ( !amd_printf )
return 0;
amd_printf(" dense vector ");
goto LABEL_17;
}
if ( a2 )
{
if ( a1 >= 0 )
{
if ( a4 <= 3 )
{
LABEL_17:
if ( amd_printf )
amd_printf("OK\n\n");
return 0;
}
goto LABEL_7;
}
v14 = -6;
if ( amd_printf )
amd_printf("ERROR: length of vector is < 0\n\n");
}
else
{
v14 = -5;
if ( amd_printf )
amd_printf("ERROR: vector not present\n\n");
}
return v14;
}

canonical_decompiled_code:
__int64 __fastcall func1(int a1, __int64 a2, __int64 a3, int a4, int a5, int a6)
{
int v11; // er15
int v12; // ebx
unsigned int v13; // edi
unsigned int v14; // er12
unsigned int i; // ebx

if ( a4 <= 3 && a5 == 0 )
return 0;
if ( amd_printf )
{
amd_printf("dense vector, n = %d. ", (unsigned int)a1);
if ( !a5 )
{
LABEL_7:
if ( amd_printf )
amd_printf("\n");
goto LABEL_9;
}
}
else if ( !a5 )
{
LABEL_9:
if ( a4 == 4 )
{
v11 = 10;
if ( a1 <= 10 )
v11 = a1;
v12 = 0;
if ( a1 > 0 )
{
do
{
v13 = v12++;
func0(v13, a2, a3, a6);
}
while ( v11 > v12 );
}
if ( a1 > v11 )
{
if ( amd_printf )
amd_printf(" ...\n");
func0(a1 - 1, a2, a3, a6);
}
}
else if ( a4 > 4 && a1 > 0 )
{
for ( i = 0; i != a1; ++i )
func0(i, a2, a3, a6);
}
if ( !amd_printf )
return 0;
amd_printf(" dense vector ");
goto LABEL_17;
}
if ( a2 )
{
if ( a1 >= 0 )
{
if ( a4 <= 3 )
{
LABEL_17:
if ( amd_printf )
amd_printf("OK\n\n");
return 0;
}
goto LABEL_7;
}
v14 = -6;
if ( amd_printf )
amd_printf("ERROR: length of vector is < 0\n\n");
}
else
{
v14 = -5;
if ( amd_printf )
amd_printf("ERROR: vector not present\n\n");
}
return v14;
}

original_code:
int umfzi_report_vector
(
    int n,
    const double Xx [ ],
    const double Xz [ ],
    int prl,
    int user,
    int scalar
)
{
    int n2, i ;
    if (user || prl >= 4)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("dense vector, n = ""%d"". ", n) ; } ;
    }
    if (user)
    {
 if (!Xx)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: vector not present\n\n") ; } ;
     return ((-5)) ;
 }
 if (n < 0)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: length of vector is < 0\n\n") ; } ;
     return ((-6)) ;
 }
    }
    if (user || prl >= 4)
    {
 { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ; } } ;
    }
    if (prl == 4)
    {
 n2 = (((10) < (n)) ? (10) : (n)) ;
 for (i = 0 ; i < n2 ; i++)
 {
     print_value (i, Xx, Xz, scalar) ;
 }
 if (n2 < n)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("    ...\n") ; } ;
     print_value (n-1, Xx, Xz, scalar) ;
 }
    }
    else if (prl > 4)
    {
 for (i = 0 ; i < n ; i++)
 {
     print_value (i, Xx, Xz, scalar) ;
 }
    }
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("    dense vector ") ; } ; } } ;
    if (user || prl >= 4)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("OK\n\n") ; } ;
    }
    return ((0)) ;
}

canonical_original_code:
int umfzi_report_vector(int n, double Xx[], double Xz[], int prl, int user, int scalar)
{
    int n2; int i;
    if (user || prl >= 4)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("dense vector, n = ""%d"". ", n) ; } ;
    }
    if (user)
    {
 if (!Xx)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: vector not present\n\n") ; } ;
     return ((-5)) ;
 }
 if (n < 0)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: length of vector is < 0\n\n") ; } ;
     return ((-6)) ;
 }
    }
    if (user || prl >= 4)
    {
 { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ; } } ;
    }
    if (prl == 4)
    {
 n2 = (((10) < (n)) ? (10) : (n)) ;
 for (i = 0 ; i < n2 ; i++)
 {
     print_value (i, Xx, Xz, scalar) ;
 }
 if (n2 < n)
 {
     { if (amd_printf != ((void *)0)) (void) amd_printf ("    ...\n") ; } ;
     print_value (n-1, Xx, Xz, scalar) ;
 }
    }
    else if (prl > 4)
    {
 for (i = 0 ; i < n ; i++)
 {
     print_value (i, Xx, Xz, scalar) ;
 }
    }
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("    dense vector ") ; } ; } } ;
    if (user || prl >= 4)
    {
 { if (amd_printf != ((void *)0)) (void) amd_printf ("OK\n\n") ; } ;
    }
    return ((0)) ;
}

variable_types: n int

variable_types:
Xx
double []

variable_types:
Xz
double []

variable_types: prl int

variable_types: user int

variable_types: scalar int

variable_types: i int


original_code:
int cholmod_etree
(
    cholmod_sparse *A,
    int *Parent,
    cholmod_common *Common
)
{
    int *Ap, *Ai, *Anz, *Ancestor, *Prev, *Iwork ;
    int i, j, jprev, p, pend, nrow, ncol, packed, stype ;
    size_t s ;
    int ok = 1 ;
    { if (Common == ((void *)0)) { return (0) ; } if (Common->itype != 0 || Common->dtype != 0) { Common->status = (-4) ; return (0) ; } } ;
    { if ((A) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_etree.c", 104, "argument missing", Common) ; } return (0) ; } } ;
    { if ((Parent) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_etree.c", 105, "argument missing", Common) ; } return (0) ; } } ;
    { if ((A)->xtype < (0) || (A)->xtype > (3) || ((A)->xtype != 0 && ((A)->x) == ((void *)0)) || ((A)->xtype == 3 && ((A)->z) == ((void *)0))) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_etree.c", 106, "invalid xtype", Common) ; } return (0) ; } } ;
    Common->status = 0 ;
    stype = A->stype ;
    s = cholmod_add_size_t (A->nrow, (stype ? 0 : A->ncol), &ok) ;
    if (!ok)
    {
 cholmod_error ((-3), "../Cholesky/cholmod_etree.c", 119, "problem too large", Common) ;
 return (0) ;
    }
    cholmod_allocate_work (0, s, 0, Common) ;
    if (Common->status < 0)
    {
 return (0) ;
    }
    ;
    Iwork = Common->Iwork ;
    ncol = A->ncol ;
    nrow = A->nrow ;
    Ap = A->p ;
    Ai = A->i ;
    Anz = A->nz ;
    packed = A->packed ;
    Ancestor = Iwork ;
    for (j = 0 ; j < ncol ; j++)
    {
 Parent [j] = (-1) ;
 Ancestor [j] = (-1) ;
    }
    if (stype > 0)
    {
 for (j = 0 ; j < ncol ; j++)
 {
     p = Ap [j] ;
     pend = (packed) ? (Ap [j+1]) : (p + Anz [j]) ;
     for ( ; p < pend ; p++)
     {
  i = Ai [p] ;
  if (i < j)
  {
      update_etree (i, j, Parent, Ancestor) ;
  }
     }
 }
    }
    else if (stype == 0)
    {
 Prev = Iwork + ncol ;
 for (i = 0 ; i < nrow ; i++)
 {
     Prev [i] = (-1) ;
 }
 for (j = 0 ; j < ncol ; j++)
 {
     p = Ap [j] ;
     pend = (packed) ? (Ap [j+1]) : (p + Anz [j]) ;
     for ( ; p < pend ; p++)
     {
  i = Ai [p] ;
  jprev = Prev [i] ;
  if (jprev != (-1))
  {
      update_etree (jprev, j, Parent, Ancestor) ;
  }
  Prev [i] = j ;
     }
 }
    }
    else
    {
 cholmod_error ((-4), "../Cholesky/cholmod_etree.c", 219, "symmetric lower not supported", Common) ;
 return (0) ;
    }
    ;
    return (1) ;
}

canonical_original_code:
int cholmod_etree(struct cholmod_sparse_struct *A, int *Parent, struct cholmod_common_struct *Common)
{
    int *Ap; int *Ai; int *Anz; int *Ancestor; int *Prev; int *Iwork;
    int i; int j; int jprev; int p; int pend; int nrow; int ncol; int packed; int stype;
    unsigned long s;
    int ok = 1;
    { if (Common == ((void *)0)) { return (0) ; } if (Common->itype != 0 || Common->dtype != 0) { Common->status = (-4) ; return (0) ; } } ;
    { if ((A) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_etree.c", 104, "argument missing", Common) ; } return (0) ; } } ;
    { if ((Parent) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_etree.c", 105, "argument missing", Common) ; } return (0) ; } } ;
    { if ((A)->xtype < (0) || (A)->xtype > (3) || ((A)->xtype != 0 && ((A)->x) == ((void *)0)) || ((A)->xtype == 3 && ((A)->z) == ((void *)0))) { if (Common->status != (-2)) { cholmod_error ((-4), "../Cholesky/cholmod_etree.c", 106, "invalid xtype", Common) ; } return (0) ; } } ;
    Common->status = 0 ;
    stype = A->stype ;
    s = cholmod_add_size_t (A->nrow, (stype ? 0 : A->ncol), &ok) ;
    if (!ok)
    {
 cholmod_error ((-3), "../Cholesky/cholmod_etree.c", 119, "problem too large", Common) ;
 return (0) ;
    }
    cholmod_allocate_work (0, s, 0, Common) ;
    if (Common->status < 0)
    {
 return (0) ;
    }
    ;
    Iwork = Common->Iwork ;
    ncol = A->ncol ;
    nrow = A->nrow ;
    Ap = A->p ;
    Ai = A->i ;
    Anz = A->nz ;
    packed = A->packed ;
    Ancestor = Iwork ;
    for (j = 0 ; j < ncol ; j++)
    {
 Parent [j] = (-1) ;
 Ancestor [j] = (-1) ;
    }
    if (stype > 0)
    {
 for (j = 0 ; j < ncol ; j++)
 {
     p = Ap [j] ;
     pend = (packed) ? (Ap [j+1]) : (p + Anz [j]) ;
     for ( ; p < pend ; p++)
     {
  i = Ai [p] ;
  if (i < j)
  {
      update_etree (i, j, Parent, Ancestor) ;
  }
     }
 }
    }
    else if (stype == 0)
    {
 Prev = Iwork + ncol ;
 for (i = 0 ; i < nrow ; i++)
 {
     Prev [i] = (-1) ;
 }
 for (j = 0 ; j < ncol ; j++)
 {
     p = Ap [j] ;
     pend = (packed) ? (Ap [j+1]) : (p + Anz [j]) ;
     for ( ; p < pend ; p++)
     {
  i = Ai [p] ;
  jprev = Prev [i] ;
  if (jprev != (-1))
  {
      update_etree (jprev, j, Parent, Ancestor) ;
  }
  Prev [i] = j ;
     }
 }
    }
    else
    {
 cholmod_error ((-4), "../Cholesky/cholmod_etree.c", 219, "symmetric lower not supported", Common) ;
 return (0) ;
    }
    ;
    return (1) ;
}

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

variable_types:
Parent
int *

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

variable_types:
Ap
int *

variable_types:
Ai
int *

variable_types:
Anz
int *

variable_types:
Ancestor
int *

variable_types:
Prev
int *

variable_types:
Iwork
int *

variable_types: j int

variable_types: jprev int

variable_types: p int

variable_types: pend int

variable_types: nrow int

variable_types: ncol int

variable_types: packed int

variable_types: stype int

variable_types:
s
unsigned long

variable_types: ok int

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


original_code:
int
umfpack_di_solve
(
    int sys,
    const int Ap [ ],
    const int Ai [ ],
    const double Ax [ ],
    double Xx [ ],
    const double Bx [ ],
    void *NumericHandle,
    const double Control [20],
    double User_Info [90]
)
{
    double Info2 [90], stats [2] ;
    double *Info ;
    NumericType *Numeric ;
    int n, i, irstep, status ;
    int *Pattern, wsize ;
    double *W ;
    umfpack_tic (stats) ;
    irstep = ((Control != (double *) ((void *)0)) ? (((Control [7]) != (Control [7])) ? 2 : Control [7]) : 2) ;
    if (User_Info != (double *) ((void *)0))
    {
 Info = User_Info ;
 for (i = 80 ; i <= 85 ; i++)
 {
     Info [i] = (-1) ;
 }
    }
    else
    {
 Info = Info2 ;
 for (i = 0 ; i < 90 ; i++)
 {
     Info [i] = (-1) ;
 }
    }
    Info [0] = (0) ;
    Info [84] = 0 ;
    Numeric = (NumericType *) NumericHandle ;
    if (!umfdi_valid_numeric (Numeric))
    {
 Info [0] = (-3) ;
 return ((-3)) ;
    }
    Info [1] = Numeric->n_row ;
    Info [16] = Numeric->n_col ;
    if (Numeric->n_row != Numeric->n_col)
    {
 Info [0] = (-13) ;
 return ((-13)) ;
    }
    n = Numeric->n_row ;
    if (Numeric->nnzpiv < n
 || ((Numeric->rcond) == 0.) || ((Numeric->rcond) != (Numeric->rcond)))
    {
 irstep = 0 ;
    }
    if (!Xx || !Bx)
    {
 Info [0] = (-5) ;
 return ((-5)) ;
    }
    if (sys >= (3))
    {
 irstep = 0 ;
    }
    if (irstep > 0)
    {
 wsize = 5*n ;
    }
    else
    {
 wsize = n ;
    }
    Pattern = (int *) umf_i_malloc (n, sizeof (int)) ;
    W = (double *) umf_i_malloc (wsize, sizeof (double)) ;
    if (!W || !Pattern)
    {
 ;
 Info [0] = (-1) ;
 (void) umf_i_free ((void *) W) ;
 (void) umf_i_free ((void *) Pattern) ;
 return ((-1)) ;
    }
    status = umfdi_solve (sys, Ap, Ai, Ax, Xx, Bx,
 Numeric, irstep, Info, Pattern, W) ;
    (void) umf_i_free ((void *) W) ;
    (void) umf_i_free ((void *) Pattern) ;
    ;
    Info [0] = status ;
    if (status >= 0)
    {
 umfpack_toc (stats) ;
 Info [86] = stats [0] ;
 Info [85] = stats [1] ;
    }
    return (status) ;
}

canonical_original_code:
int umfpack_di_solve(int sys, int Ap[], int Ai[], double Ax[], double Xx[], double Bx[], void *NumericHandle, double Control[20], double User_Info[90])
{
    double Info2[90]; double stats[2];
    double *Info;
    struct NumericType *Numeric;
    int n; int i; int irstep; int status;
    int *Pattern; int wsize;
    double *W;
    umfpack_tic (stats) ;
    irstep = ((Control != (double *) ((void *)0)) ? (((Control [7]) != (Control [7])) ? 2 : Control [7]) : 2) ;
    if (User_Info != (double *) ((void *)0))
    {
 Info = User_Info ;
 for (i = 80 ; i <= 85 ; i++)
 {
     Info [i] = (-1) ;
 }
    }
    else
    {
 Info = Info2 ;
 for (i = 0 ; i < 90 ; i++)
 {
     Info [i] = (-1) ;
 }
    }
    Info [0] = (0) ;
    Info [84] = 0 ;
    Numeric = (struct NumericType *) NumericHandle ;
    if (!umfdi_valid_numeric (Numeric))
    {
 Info [0] = (-3) ;
 return ((-3)) ;
    }
    Info [1] = Numeric->n_row ;
    Info [16] = Numeric->n_col ;
    if (Numeric->n_row != Numeric->n_col)
    {
 Info [0] = (-13) ;
 return ((-13)) ;
    }
    n = Numeric->n_row ;
    if (Numeric->nnzpiv < n
 || ((Numeric->rcond) == 0.) || ((Numeric->rcond) != (Numeric->rcond)))
    {
 irstep = 0 ;
    }
    if (!Xx || !Bx)
    {
 Info [0] = (-5) ;
 return ((-5)) ;
    }
    if (sys >= (3))
    {
 irstep = 0 ;
    }
    if (irstep > 0)
    {
 wsize = 5*n ;
    }
    else
    {
 wsize = n ;
    }
    Pattern = (int *) umf_i_malloc (n, sizeof (int)) ;
    W = (double *) umf_i_malloc (wsize, sizeof (double)) ;
    if (!W || !Pattern)
    {
 ;
 Info [0] = (-1) ;
 (void) umf_i_free ((void *) W) ;
 (void) umf_i_free ((void *) Pattern) ;
 return ((-1)) ;
    }
    status = umfdi_solve (sys, Ap, Ai, Ax, Xx, Bx,
 Numeric, irstep, Info, Pattern, W) ;
    (void) umf_i_free ((void *) W) ;
    (void) umf_i_free ((void *) Pattern) ;
    ;
    Info [0] = status ;
    if (status >= 0)
    {
 umfpack_toc (stats) ;
 Info [86] = stats [0] ;
 Info [85] = stats [1] ;
    }
    return (status) ;
}

variable_types: sys int

variable_types:
Ap
int []

variable_types:
Ai
int []

variable_types:
Ax
double []

variable_types:
Xx
double []

variable_types:
Bx
double []

variable_types:
NumericHandle
void *

variable_types:
Control
double [20]

variable_types:
stats
double [2]

variable_types:
Info
double *

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

variable_types: n int

variable_types: i int

variable_types: irstep int

variable_types: status int

variable_types:
Pattern
int *

variable_types: wsize int

variable_types:
W
double *


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

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

variable_types: nz int

variable_types:
Ti
int []

variable_types:
Tj
int []

variable_types:
Ap
int []

variable_types:
Rp
int []

variable_types:
Rj
int []

variable_types:
W
int []

variable_types:
RowCount
int []

variable_types:
Tx
double []

variable_types:
Rx
double []

variable_types: j int

variable_types: k int

variable_types: p int

variable_types: cp int

variable_types: pdest int

variable_types: pj int


original_code:
long umfdl_valid_symbolic
(
    SymbolicType *Symbolic
)
{
    if (!Symbolic)
    {
 return ((0)) ;
    }
    if (Symbolic->valid != 399192713)
    {
 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:
long umfdl_valid_symbolic(struct SymbolicType *Symbolic)
{
    if (!Symbolic)
    {
 return ((0)) ;
    }
    if (Symbolic->valid != 399192713)
    {
 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; long valid; } *


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

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

variable_types: chain long

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

variable_types: fsize long

variable_types: maxfrsize long

variable_types: overflow long

variable_types: nb long

variable_types: f long

variable_types: cdeg long

variable_types: col long

variable_types: tpi long

variable_types: e long

variable_types:
E
long *

variable_types:
Cols
long *

variable_types:
tp
struct Tuple { long e; } *

variable_types:
tpend
struct Tuple { long e; } *

variable_types:
ep
struct Element { long cdeg; } *

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


original_code:
size_t amd_aat
(
    int n,
    const int Ap [ ],
    const int Ai [ ],
    int Len [ ],
    int Tp [ ],
    double Info [ ]
)
{
    int p1, p2, p, i, j, pj, pj2, k, nzdiag, nzboth, nz ;
    double sym ;
    size_t nzaat ;
    if (Info != (double *) ((void *)0))
    {
 for (i = 0 ; i < 20 ; i++)
 {
     Info [i] = (-1) ;
 }
 Info [0] = 0 ;
    }
    for (k = 0 ; k < n ; k++)
    {
 Len [k] = 0 ;
    }
    nzdiag = 0 ;
    nzboth = 0 ;
    nz = Ap [n] ;
    for (k = 0 ; k < n ; k++)
    {
 p1 = Ap [k] ;
 p2 = Ap [k+1] ;
 ;
 for (p = p1 ; p < p2 ; )
 {
     j = Ai [p] ;
     if (j < k)
     {
  Len [j]++ ;
  Len [k]++ ;
  ;
  p++ ;
     }
     else if (j == k)
     {
  p++ ;
  nzdiag++ ;
  break ;
     }
     else
     {
  break ;
     }
     ;
     ;
     pj2 = Ap [j+1] ;
     for (pj = Tp [j] ; pj < pj2 ; )
     {
  i = Ai [pj] ;
  if (i < k)
  {
      Len [i]++ ;
      Len [j]++ ;
      ;
      pj++ ;
  }
  else if (i == k)
  {
      pj++ ;
      nzboth++ ;
      break ;
  }
  else
  {
      break ;
  }
     }
     Tp [j] = pj ;
 }
 Tp [k] = p ;
    }
    for (j = 0 ; j < n ; j++)
    {
 for (pj = Tp [j] ; pj < Ap [j+1] ; pj++)
 {
     i = Ai [pj] ;
     Len [i]++ ;
     Len [j]++ ;
     ;
 }
    }
    if (nz == nzdiag)
    {
 sym = 1 ;
    }
    else
    {
 sym = (2 * (double) nzboth) / ((double) (nz - nzdiag)) ;
    }
    nzaat = 0 ;
    for (k = 0 ; k < n ; k++)
    {
 nzaat += Len [k] ;
    }
    ;
    ;
    if (Info != (double *) ((void *)0))
    {
 Info [0] = 0 ;
 Info [1] = n ;
 Info [2] = nz ;
 Info [3] = sym ;
 Info [4] = nzdiag ;
 Info [5] = nzaat ;
    }
    return (nzaat) ;
}

canonical_original_code:
unsigned long amd_aat(int n, int Ap[], int Ai[], int Len[], int Tp[], double Info[])
{
    int p1; int p2; int p; int i; int j; int pj; int pj2; int k; int nzdiag; int nzboth; int nz;
    double sym;
    unsigned long nzaat;
    if (Info != (double *) ((void *)0))
    {
 for (i = 0 ; i < 20 ; i++)
 {
     Info [i] = (-1) ;
 }
 Info [0] = 0 ;
    }
    for (k = 0 ; k < n ; k++)
    {
 Len [k] = 0 ;
    }
    nzdiag = 0 ;
    nzboth = 0 ;
    nz = Ap [n] ;
    for (k = 0 ; k < n ; k++)
    {
 p1 = Ap [k] ;
 p2 = Ap [k+1] ;
 ;
 for (p = p1 ; p < p2 ; )
 {
     j = Ai [p] ;
     if (j < k)
     {
  Len [j]++ ;
  Len [k]++ ;
  ;
  p++ ;
     }
     else if (j == k)
     {
  p++ ;
  nzdiag++ ;
  break ;
     }
     else
     {
  break ;
     }
     ;
     ;
     pj2 = Ap [j+1] ;
     for (pj = Tp [j] ; pj < pj2 ; )
     {
  i = Ai [pj] ;
  if (i < k)
  {
      Len [i]++ ;
      Len [j]++ ;
      ;
      pj++ ;
  }
  else if (i == k)
  {
      pj++ ;
      nzboth++ ;
      break ;
  }
  else
  {
      break ;
  }
     }
     Tp [j] = pj ;
 }
 Tp [k] = p ;
    }
    for (j = 0 ; j < n ; j++)
    {
 for (pj = Tp [j] ; pj < Ap [j+1] ; pj++)
 {
     i = Ai [pj] ;
     Len [i]++ ;
     Len [j]++ ;
     ;
 }
    }
    if (nz == nzdiag)
    {
 sym = 1 ;
    }
    else
    {
 sym = (2 * (double) nzboth) / ((double) (nz - nzdiag)) ;
    }
    nzaat = 0 ;
    for (k = 0 ; k < n ; k++)
    {
 nzaat += Len [k] ;
    }
    ;
    ;
    if (Info != (double *) ((void *)0))
    {
 Info [0] = 0 ;
 Info [1] = n ;
 Info [2] = nz ;
 Info [3] = sym ;
 Info [4] = nzdiag ;
 Info [5] = nzaat ;
    }
    return (nzaat) ;
}

variable_types: n int

variable_types:
Ap
int []

variable_types:
Ai
int []

variable_types:
Len
int []

variable_types:
Tp
int []

variable_types:
Info
double []

variable_types: p int

variable_types: i int

variable_types: j int

variable_types: pj int

variable_types: k int

variable_types: nzdiag int

variable_types: nzboth int

variable_types: nz int

variable_types: sym double

variable_types:
nzaat
unsigned long

return_type: unsigned long


original_code:
double umfzi_usolve
(
    NumericType *Numeric,
    DoubleComplex X [ ],
    int Pattern [ ]
)
{
    DoubleComplex xk ;
    DoubleComplex *xp, *D, *Uval ;
    int k, deg, j, *ip, col, *Upos, *Uilen, pos,
 *Uip, n, ulen, up, newUchain, npiv, n1, *Ui ;
    if (Numeric->n_row != Numeric->n_col) return (0.) ;
    n = Numeric->n_row ;
    npiv = Numeric->npiv ;
    Upos = Numeric->Upos ;
    Uilen = Numeric->Uilen ;
    Uip = Numeric->Uip ;
    D = Numeric->D ;
    n1 = Numeric->n1 ;
    for (k = n-1 ; k >= npiv ; k--)
    {
 ;
 xk = X [k] ;
 { (void) umfpack_divcomplex ((xk).component [0], (xk).component [1], (D [k]).component [0], (D [k]).component [1], &((X [k]).component [0]), &((X [k]).component [1])) ; } ;
    }
    deg = Numeric->ulen ;
    if (deg > 0)
    {
 for (j = 0 ; j < deg ; j++)
 {
     ;
     ;
     Pattern [j] = Numeric->Upattern [j] ;
 }
    }
    for (k = npiv-1 ; k >= n1 ; k--)
    {
 up = Uip [k] ;
 ulen = Uilen [k] ;
 newUchain = (up < 0) ;
 if (newUchain)
 {
     up = -up ;
     xp = (DoubleComplex *) (Numeric->Memory + up + (((((sizeof (int) * (ulen))) + (sizeof (Unit)) - 1) / (sizeof (Unit))))) ;
 }
 else
 {
     xp = (DoubleComplex *) (Numeric->Memory + up) ;
 }
 xk = X [k] ;
 for (j = 0 ; j < deg ; j++)
 {
     ;
     ;
     ;
     { ; (xk).component [0] -= (X [Pattern [j]]).component [0] * (*xp).component [0] - (X [Pattern [j]]).component [1] * (*xp).component [1] ; (xk).component [1] -= (X [Pattern [j]]).component [1] * (*xp).component [0] + (X [Pattern [j]]).component [0] * (*xp).component [1] ; } ;
     xp++ ;
 }
 { (void) umfpack_divcomplex ((xk).component [0], (xk).component [1], (D [k]).component [0], (D [k]).component [1], &((X [k]).component [0]), &((X [k]).component [1])) ; } ;
 if (k == n1) break ;
 if (newUchain)
 {
     deg = ulen ;
     ;
     ;
     ip = (int *) (Numeric->Memory + up) ;
     for (j = 0 ; j < deg ; j++)
     {
  col = *ip++ ;
  ;
  ;
  Pattern [j] = col ;
     }
 }
 else
 {
     deg -= ulen ;
     ;
     ;
     pos = Upos [k] ;
     if (pos != (-1))
     {
  ;
  ;
  Pattern [deg++] = Pattern [pos] ;
  Pattern [pos] = k ;
     }
 }
    }
    for (k = n1 - 1 ; k >= 0 ; k--)
    {
 deg = Uilen [k] ;
 xk = X [k] ;
 ;
 if (deg > 0)
 {
     up = Uip [k] ;
     Ui = (int *) (Numeric->Memory + up) ;
     up += (((((sizeof (int) * (deg))) + (sizeof (Unit)) - 1) / (sizeof (Unit)))) ;
     Uval = (DoubleComplex *) (Numeric->Memory + up) ;
     for (j = 0 ; j < deg ; j++)
     {
  ;
  ;
  ;
  ;
  { ; (xk).component [0] -= (X [Ui [j]]).component [0] * (Uval [j]).component [0] - (X [Ui [j]]).component [1] * (Uval [j]).component [1] ; (xk).component [1] -= (X [Ui [j]]).component [1] * (Uval [j]).component [0] + (X [Ui [j]]).component [0] * (Uval [j]).component [1] ; } ;
     }
 }
 { (void) umfpack_divcomplex ((xk).component [0], (xk).component [1], (D [k]).component [0], (D [k]).component [1], &((X [k]).component [0]), &((X [k]).component [1])) ; } ;
    }
    return (9. * ((double) n) + 8. * ((double) Numeric->unz));
}

canonical_original_code:
double umfzi_usolve(struct NumericType *Numeric, struct DoubleComplex X[], int Pattern[])
{
    struct DoubleComplex xk;
    struct DoubleComplex *xp; struct DoubleComplex *D; struct DoubleComplex *Uval;
    int k; int deg; int j; int *ip; int col; int *Upos; int *Uilen; int pos; int *Uip; int n; int ulen; int up; int newUchain; int npiv; int n1; int *Ui;
    if (Numeric->n_row != Numeric->n_col) return (0.) ;
    n = Numeric->n_row ;
    npiv = Numeric->npiv ;
    Upos = Numeric->Upos ;
    Uilen = Numeric->Uilen ;
    Uip = Numeric->Uip ;
    D = Numeric->D ;
    n1 = Numeric->n1 ;
    for (k = n-1 ; k >= npiv ; k--)
    {
 ;
 xk = X [k] ;
 { (void) umfpack_divcomplex ((xk).component [0], (xk).component [1], (D [k]).component [0], (D [k]).component [1], &((X [k]).component [0]), &((X [k]).component [1])) ; } ;
    }
    deg = Numeric->ulen ;
    if (deg > 0)
    {
 for (j = 0 ; j < deg ; j++)
 {
     ;
     ;
     Pattern [j] = Numeric->Upattern [j] ;
 }
    }
    for (k = npiv-1 ; k >= n1 ; k--)
    {
 up = Uip [k] ;
 ulen = Uilen [k] ;
 newUchain = (up < 0) ;
 if (newUchain)
 {
     up = -up ;
     xp = (struct DoubleComplex *) (Numeric->Memory + up + (((((sizeof (int) * (ulen))) + (sizeof (Unit)) - 1) / (sizeof (Unit))))) ;
 }
 else
 {
     xp = (struct DoubleComplex *) (Numeric->Memory + up) ;
 }
 xk = X [k] ;
 for (j = 0 ; j < deg ; j++)
 {
     ;
     ;
     ;
     { ; (xk).component [0] -= (X [Pattern [j]]).component [0] * (*xp).component [0] - (X [Pattern [j]]).component [1] * (*xp).component [1] ; (xk).component [1] -= (X [Pattern [j]]).component [1] * (*xp).component [0] + (X [Pattern [j]]).component [0] * (*xp).component [1] ; } ;
     xp++ ;
 }
 { (void) umfpack_divcomplex ((xk).component [0], (xk).component [1], (D [k]).component [0], (D [k]).component [1], &((X [k]).component [0]), &((X [k]).component [1])) ; } ;
 if (k == n1) break ;
 if (newUchain)
 {
     deg = ulen ;
     ;
     ;
     ip = (int *) (Numeric->Memory + up) ;
     for (j = 0 ; j < deg ; j++)
     {
  col = *ip++ ;
  ;
  ;
  Pattern [j] = col ;
     }
 }
 else
 {
     deg -= ulen ;
     ;
     ;
     pos = Upos [k] ;
     if (pos != (-1))
     {
  ;
  ;
  Pattern [deg++] = Pattern [pos] ;
  Pattern [pos] = k ;
     }
 }
    }
    for (k = n1 - 1 ; k >= 0 ; k--)
    {
 deg = Uilen [k] ;
 xk = X [k] ;
 ;
 if (deg > 0)
 {
     up = Uip [k] ;
     Ui = (int *) (Numeric->Memory + up) ;
     up += (((((sizeof (int) * (deg))) + (sizeof (Unit)) - 1) / (sizeof (Unit)))) ;
     Uval = (struct DoubleComplex *) (Numeric->Memory + up) ;
     for (j = 0 ; j < deg ; j++)
     {
  ;
  ;
  ;
  ;
  { ; (xk).component [0] -= (X [Ui [j]]).component [0] * (Uval [j]).component [0] - (X [Ui [j]]).component [1] * (Uval [j]).component [1] ; (xk).component [1] -= (X [Ui [j]]).component [1] * (Uval [j]).component [0] + (X [Ui [j]]).component [0] * (Uval [j]).component [1] ; } ;
     }
 }
 { (void) umfpack_divcomplex ((xk).component [0], (xk).component [1], (D [k]).component [0], (D [k]).component [1], &((X [k]).component [0]), &((X [k]).component [1])) ; } ;
    }
    return (9. * ((double) n) + 8. * ((double) Numeric->unz));
}

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

variable_types:
X
struct DoubleComplex []

variable_types:
Pattern
int []

variable_types: deg int

variable_types:
ip
int *

variable_types: col int

variable_types:
Upos
int *

variable_types:
Uilen
int *

variable_types: pos int

variable_types:
Uip
int *

variable_types: ulen int

variable_types: up int

variable_types: newUchain int

variable_types: npiv int

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