original_code:
int umfpack_zi_col_to_triplet
(
    int n_col,
    const int Ap [ ],
    int Tj [ ]
)
{
    int nz, j, p, p1, p2, length ;
    if (!Ap || !Tj)
    {
 return ((-5)) ;
    }
    if (n_col <= 0)
    {
 return ((-6)) ;
    }
    if (Ap [0] != 0)
    {
 return ((-8)) ;
    }
    nz = Ap [n_col] ;
    if (nz < 0)
    {
 return ((-8)) ;
    }
    for (j = 0 ; j < n_col ; j++)
    {
 p1 = Ap [j] ;
 p2 = Ap [j+1] ;
 length = p2 - p1 ;
 if (length < 0 || p2 > nz)
 {
     return ((-8)) ;
 }
 for (p = p1 ; p < p2 ; p++)
 {
     Tj [p] = j ;
 }
    }
    return ((0)) ;
}

canonical_original_code:
int umfpack_zi_col_to_triplet(int n_col, int Ap[], int Tj[])
{
    int nz; int j; int p; int p1; int p2; int length;
    if (!Ap || !Tj)
    {
 return ((-5)) ;
    }
    if (n_col <= 0)
    {
 return ((-6)) ;
    }
    if (Ap [0] != 0)
    {
 return ((-8)) ;
    }
    nz = Ap [n_col] ;
    if (nz < 0)
    {
 return ((-8)) ;
    }
    for (j = 0 ; j < n_col ; j++)
    {
 p1 = Ap [j] ;
 p2 = Ap [j+1] ;
 length = p2 - p1 ;
 if (length < 0 || p2 > nz)
 {
     return ((-8)) ;
 }
 for (p = p1 ; p < p2 ; p++)
 {
     Tj [p] = j ;
 }
    }
    return ((0)) ;
}

variable_types:
Ap
int []

variable_types:
Tj
int []

variable_types: nz int

variable_types: j int

variable_types: p int

variable_types: length int


decompiled_code:
char __fastcall umfpack_dl_report_status(double *a1, __int64 a2)
{
__int64 v2; // r12
char result; // al
__int64 (*v4)(const char *, ...); // rcx
__int64 v5; // rdx

if ( a1 )
{
v2 = (unsigned int)(int)*a1;
result = (unsigned __int64)v2 <= 1;
if ( !(int)*a1 )
return result;
}
else
{
result = 1;
v2 = 1LL;
}
if ( !a2 && result )
return result;
if ( amd_printf )
{
result = amd_printf("\n");
if ( v2 <= 3 )
goto LABEL_15;
if ( amd_printf )
{
result = amd_printf("%s\n");
if ( v2 <= 5 )
goto LABEL_15;
if ( amd_printf )
{
result = amd_printf("%s");
if ( amd_printf )
{
result = amd_printf("%s");
if ( amd_printf )
{
result = amd_printf("%s");
goto LABEL_15;
}
}
}
goto LABEL_21;
}
}
else if ( v2 <= 3 )
{
goto LABEL_21;
}
if ( v2 <= 5 )
{
LABEL_15:
if ( amd_printf )
{
result = amd_printf("UMFPACK V%d.%d.%d (%s): ", 5LL, 6LL, 1LL, "Jun 20, 2012");
v4 = amd_printf;
if ( a2 == -911 )
{
if ( !amd_printf )
return result;
result = amd_printf(
"INTERNAL ERROR!\n"
"Input arguments might be corrupted or aliased, or an internal\n"
"error has occurred. Check your input arguments with the\n"
"umfpack_*_report_* routines before calling the umfpack_*\n"
"computational routines. Recompile UMFPACK with debugging\n"
"enabled, and look for failed assertions. If all else fails\n"
"please report this error to Tim Davis\n"
"(DrTimothyAldenDavis@gmail.com).\n");
goto LABEL_28;
}
v5 = a2 + 18;
goto LABEL_18;
}
}
LABEL_21:
if ( a2 != -911 )
{
v5 = a2 + 18;
if ( (unsigned __int64)(a2 + 18) <= 0x13 )
{
v4 = 0LL;
if ( (unsigned __int64)(a2 + 18) > 0x13 )
{
LABEL_24:
if ( !v4 )
return result;
result = v4("ERROR: Unrecognized error code: %ld\n", a2);
goto LABEL_28;
}
LABEL_18:
switch ( v5 )
{
case 0LL:
if ( !v4 )
return result;
result = v4("ERROR: ordering failed\n");
break;
case 3LL:
if ( !v4 )
return result;
result = v4("ERROR: invalid permutation\n");
break;
case 5LL:
if ( !v4 )
return result;
result = v4("ERROR: system argument invalid\n");
break;
case 7LL:
if ( !v4 )
return result;
result = v4("ERROR: pattern of matrix (Ap and/or Ai) has changed\n");
break;
case 10LL:
if ( !v4 )
return result;
result = v4("ERROR: input matrix is invalid\n");
break;
case 12LL:
if ( !v4 )
return result;
result = v4("ERROR: dimension (n_row or n_col) must be > 0\n");
break;
case 13LL:
if ( !v4 )
return result;
result = v4("ERROR: required argument(s) missing\n");
break;
case 14LL:
if ( !v4 )
return result;
result = v4("ERROR: Symbolic object is invalid\n");
break;
case 15LL:
if ( !v4 )
return result;
result = v4("ERROR: Numeric object is invalid\n");
break;
case 17LL:
if ( !v4 )
return result;
result = v4("ERROR: out of memory\n");
break;
case 18LL:
if ( !v4 )
return result;
result = v4("OK\n");
break;
case 19LL:
if ( !v4 )
return result;
result = v4("WARNING: matrix is singular\n");
break;
default:
goto LABEL_24;
}
LABEL_28:
if ( amd_printf )
result = amd_printf("\n");
return result;
}
}
return result;
}

canonical_decompiled_code:
char __fastcall func0(double *a1, __int64 a2)
{
__int64 v2; // r12
char result; // al
__int64 (*v4)(const char *, ...); // rcx
__int64 v5; // rdx

if ( a1 )
{
v2 = (unsigned int)(int)*a1;
result = (unsigned __int64)v2 <= 1;
if ( !(int)*a1 )
return result;
}
else
{
result = 1;
v2 = 1LL;
}
if ( !a2 && result )
return result;
if ( amd_printf )
{
result = amd_printf("\n");
if ( v2 <= 3 )
goto LABEL_15;
if ( amd_printf )
{
result = amd_printf("%s\n");
if ( v2 <= 5 )
goto LABEL_15;
if ( amd_printf )
{
result = amd_printf("%s");
if ( amd_printf )
{
result = amd_printf("%s");
if ( amd_printf )
{
result = amd_printf("%s");
goto LABEL_15;
}
}
}
goto LABEL_21;
}
}
else if ( v2 <= 3 )
{
goto LABEL_21;
}
if ( v2 <= 5 )
{
LABEL_15:
if ( amd_printf )
{
result = amd_printf("UMFPACK V%d.%d.%d (%s): ", 5LL, 6LL, 1LL, "Jun 20, 2012");
v4 = amd_printf;
if ( a2 == -911 )
{
if ( !amd_printf )
return result;
result = amd_printf(
"INTERNAL ERROR!\n"
"Input arguments might be corrupted or aliased, or an internal\n"
"error has occurred. Check your input arguments with the\n"
"umfpack_*_report_* routines before calling the umfpack_*\n"
"computational routines. Recompile UMFPACK with debugging\n"
"enabled, and look for failed assertions. If all else fails\n"
"please report this error to Tim Davis\n"
"(DrTimothyAldenDavis@gmail.com).\n");
goto LABEL_28;
}
v5 = a2 + 18;
goto LABEL_18;
}
}
LABEL_21:
if ( a2 != -911 )
{
v5 = a2 + 18;
if ( (unsigned __int64)(a2 + 18) <= 0x13 )
{
v4 = 0LL;
if ( (unsigned __int64)(a2 + 18) > 0x13 )
{
LABEL_24:
if ( !v4 )
return result;
result = v4("ERROR: Unrecognized error code: %ld\n", a2);
goto LABEL_28;
}
LABEL_18:
switch ( v5 )
{
case 0LL:
if ( !v4 )
return result;
result = v4("ERROR: ordering failed\n");
break;
case 3LL:
if ( !v4 )
return result;
result = v4("ERROR: invalid permutation\n");
break;
case 5LL:
if ( !v4 )
return result;
result = v4("ERROR: system argument invalid\n");
break;
case 7LL:
if ( !v4 )
return result;
result = v4("ERROR: pattern of matrix (Ap and/or Ai) has changed\n");
break;
case 10LL:
if ( !v4 )
return result;
result = v4("ERROR: input matrix is invalid\n");
break;
case 12LL:
if ( !v4 )
return result;
result = v4("ERROR: dimension (n_row or n_col) must be > 0\n");
break;
case 13LL:
if ( !v4 )
return result;
result = v4("ERROR: required argument(s) missing\n");
break;
case 14LL:
if ( !v4 )
return result;
result = v4("ERROR: Symbolic object is invalid\n");
break;
case 15LL:
if ( !v4 )
return result;
result = v4("ERROR: Numeric object is invalid\n");
break;
case 17LL:
if ( !v4 )
return result;
result = v4("ERROR: out of memory\n");
break;
case 18LL:
if ( !v4 )
return result;
result = v4("OK\n");
break;
case 19LL:
if ( !v4 )
return result;
result = v4("WARNING: matrix is singular\n");
break;
default:
goto LABEL_24;
}
LABEL_28:
if ( amd_printf )
result = amd_printf("\n");
return result;
}
}
return result;
}

original_code:
void umfpack_dl_report_status
(
    const double Control [20],
    long status
)
{
    long prl ;
    prl = ((Control != (double *) ((void *)0)) ? (((Control [0]) != (Control [0])) ? 1 : Control [0]) : 1) ;
    if (prl < 1)
    {
 return ;
    }
    if (status == (0) && prl <= 1)
    {
 return ;
    }
    { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ;
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s\n", "UMFPACK:  Copyright (c) 2005-2012 by Timothy A. Davis.  All Rights Reserved.\n") ; } ; } } ;
    { if (prl >= (6)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s", "\nUMFPACK License:\n" "\n" "   UMFPACK is available under alternate licenses,\n" "   contact T. Davis for details.\n" "\n" "   Your use or distribution of UMFPACK or any modified version of\n" "   UMFPACK implies that you agree to this License.\n" "\n" "   This library is free software; you can redistribute it and/or\n" "   modify it under the terms of the GNU General Public\n" "   License as published by the Free Software Foundation; either\n" "   version 2 of the License, or (at your option) any later version.\n" "\n" "   This library is distributed in the hope that it will be useful,\n" "   but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n" "   General Public License for more details.\n" "\n" "   You should have received a copy of the GNU General Public\n" "   License along with this library; if not, write to the Free Software\n" "   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301\n" "   USA\n") ; } ; } } ;
    { if (prl >= (6)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s", "\n" "   Permission is hereby granted to use or copy this program under the\n" "   terms of the GNU GPL, provided that the Copyright, this License,\n" "   and the Availability of the original version is retained on all copies.\n" "   User documentation of any code that uses this code or any modified\n" "   version of this code must cite the Copyright, this License, the\n" "   Availability note, and \"Used by permission.\" Permission to modify\n" "   the code and to distribute modified code is granted, provided the\n" "   Copyright, this License, and the Availability note are retained,\n" "   and a notice that the code was modified is included.\n") ; } ; } } ;
    { if (prl >= (6)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s", "\n" "Availability: http://www.suitesparse.com" "\n") ; } ; } } ;
    { if (amd_printf != ((void *)0)) (void) amd_printf ("UMFPACK V%d.%d.%d (%s): ", 5, 6, 1, "Jun 20, 2012") ; } ;
    switch (status)
    {
 case (0):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("OK\n") ; } ;
     break ;
 case (1):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("WARNING: matrix is singular\n") ; } ;
     break ;
 case (-1):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: out of memory\n") ; } ;
     break ;
 case (-3):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Numeric object is invalid\n") ; } ;
     break ;
 case (-4):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Symbolic object is invalid\n") ; } ;
     break ;
 case (-5):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: required argument(s) missing\n") ; } ;
     break ;
 case (-6):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: dimension (n_row or n_col) must be > 0\n") ; } ;
     break ;
 case (-8):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: input matrix is invalid\n") ; } ;
     break ;
 case (-13):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: system argument invalid\n") ; } ;
     break ;
 case (-15):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: invalid permutation\n") ; } ;
     break ;
 case (-11):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: pattern of matrix (Ap and/or Ai) has changed\n") ; } ;
     break ;
        case (-18):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: ordering failed\n") ; } ;
     break ;
 case (-911):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("INTERNAL ERROR!\n" "Input arguments might be corrupted or aliased, or an internal\n" "error has occurred.  Check your input arguments with the\n" "umfpack_*_report_* routines before calling the umfpack_*\n" "computational routines.  Recompile UMFPACK with debugging\n" "enabled, and look for failed assertions.  If all else fails\n" "please report this error to Tim Davis\n" "(DrTimothyAldenDavis@gmail.com).\n" ) ; } ;
     break ;
 default:
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Unrecognized error code: ""%" "ld""\n", status) ; } ;
    }
    { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ;
}

canonical_original_code:
void umfpack_dl_report_status(double Control[20], long status)
{
    long prl;
    prl = ((Control != (double *) ((void *)0)) ? (((Control [0]) != (Control [0])) ? 1 : Control [0]) : 1) ;
    if (prl < 1)
    {
 return ;
    }
    if (status == (0) && prl <= 1)
    {
 return ;
    }
    { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ;
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s\n", "UMFPACK:  Copyright (c) 2005-2012 by Timothy A. Davis.  All Rights Reserved.\n") ; } ; } } ;
    { if (prl >= (6)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s", "\nUMFPACK License:\n" "\n" "   UMFPACK is available under alternate licenses,\n" "   contact T. Davis for details.\n" "\n" "   Your use or distribution of UMFPACK or any modified version of\n" "   UMFPACK implies that you agree to this License.\n" "\n" "   This library is free software; you can redistribute it and/or\n" "   modify it under the terms of the GNU General Public\n" "   License as published by the Free Software Foundation; either\n" "   version 2 of the License, or (at your option) any later version.\n" "\n" "   This library is distributed in the hope that it will be useful,\n" "   but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n" "   General Public License for more details.\n" "\n" "   You should have received a copy of the GNU General Public\n" "   License along with this library; if not, write to the Free Software\n" "   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301\n" "   USA\n") ; } ; } } ;
    { if (prl >= (6)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s", "\n" "   Permission is hereby granted to use or copy this program under the\n" "   terms of the GNU GPL, provided that the Copyright, this License,\n" "   and the Availability of the original version is retained on all copies.\n" "   User documentation of any code that uses this code or any modified\n" "   version of this code must cite the Copyright, this License, the\n" "   Availability note, and \"Used by permission.\" Permission to modify\n" "   the code and to distribute modified code is granted, provided the\n" "   Copyright, this License, and the Availability note are retained,\n" "   and a notice that the code was modified is included.\n") ; } ; } } ;
    { if (prl >= (6)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s", "\n" "Availability: http://www.suitesparse.com" "\n") ; } ; } } ;
    { if (amd_printf != ((void *)0)) (void) amd_printf ("UMFPACK V%d.%d.%d (%s): ", 5, 6, 1, "Jun 20, 2012") ; } ;
    switch (status)
    {
 case (0):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("OK\n") ; } ;
     break ;
 case (1):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("WARNING: matrix is singular\n") ; } ;
     break ;
 case (-1):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: out of memory\n") ; } ;
     break ;
 case (-3):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Numeric object is invalid\n") ; } ;
     break ;
 case (-4):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Symbolic object is invalid\n") ; } ;
     break ;
 case (-5):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: required argument(s) missing\n") ; } ;
     break ;
 case (-6):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: dimension (n_row or n_col) must be > 0\n") ; } ;
     break ;
 case (-8):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: input matrix is invalid\n") ; } ;
     break ;
 case (-13):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: system argument invalid\n") ; } ;
     break ;
 case (-15):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: invalid permutation\n") ; } ;
     break ;
 case (-11):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: pattern of matrix (Ap and/or Ai) has changed\n") ; } ;
     break ;
        case (-18):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: ordering failed\n") ; } ;
     break ;
 case (-911):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("INTERNAL ERROR!\n" "Input arguments might be corrupted or aliased, or an internal\n" "error has occurred.  Check your input arguments with the\n" "umfpack_*_report_* routines before calling the umfpack_*\n" "computational routines.  Recompile UMFPACK with debugging\n" "enabled, and look for failed assertions.  If all else fails\n" "please report this error to Tim Davis\n" "(DrTimothyAldenDavis@gmail.com).\n" ) ; } ;
     break ;
 default:
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Unrecognized error code: ""%" "ld""\n", status) ; } ;
    }
    { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ;
}

variable_types:
Control
double [20]

variable_types: status long

variable_types: prl long

return_type: void


decompiled_code:
_BOOL8 __fastcall cholmod_band_inplace(__int64 a1, __int64 a2, int a3, __int64 *a4, __int64 a5)
{
return band(a4, a1, a2, a3, 1, a5) != 0LL;
}

canonical_decompiled_code:
_BOOL8 __fastcall func0(__int64 a1, __int64 a2, int a3, __int64 *a4, __int64 a5)
{
return band(a4, a1, a2, a3, 1, a5) != 0LL;
}

original_code:
int cholmod_band_inplace
(
    long k1,
    long k2,
    int mode,
    cholmod_sparse *A,
    cholmod_common *Common
)
{
    return (band (A, k1, k2, mode, 1, Common) != ((void *)0)) ;
}

canonical_original_code:
int cholmod_band_inplace(long k1, long k2, int mode, struct cholmod_sparse_struct *A, struct cholmod_common_struct *Common)
{
    return (band (A, k1, k2, mode, 1, Common) != ((void *)0)) ;
}

variable_types: mode int

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

variable_types: struct cholmod_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]; } *

return_type: int

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


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

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

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

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

variable_types:
Ai
int []

variable_types:
Ax
double []

variable_types:
SymbolicHandle
void **

variable_types:
Info
double [90]


decompiled_code:
__int64 __fastcall umf_i_is_permutation(int *a1, char *a2, int a3, int a4)
{
char *v4; // r8
int *v7; // rdx
__int64 v8; // rax
char *v9; // rax

if ( !a1 )
return 1LL;
v4 = a2;
if ( a3 > 0 )
v4 = (char *)memset(a2, 0, 4LL * a3);
if ( a4 <= 0 )
return 1LL;
v7 = &a1[a4 - 1];
while ( 1 )
{
v8 = *a1;
if ( (int)v8 < 0 )
break;
if ( a3 <= (int)v8 )
break;
v9 = &v4[4 * v8];
if ( *(_DWORD *)v9 )
break;
*(_DWORD *)v9 = 1;
if ( v7 == a1 )
return 1LL;
++a1;
}
return 0LL;
}

canonical_decompiled_code:
__int64 __fastcall func0(int *a1, char *a2, int a3, int a4)
{
char *v4; // r8
int *v7; // rdx
__int64 v8; // rax
char *v9; // rax

if ( !a1 )
return 1LL;
v4 = a2;
if ( a3 > 0 )
v4 = (char *)memset(a2, 0, 4LL * a3);
if ( a4 <= 0 )
return 1LL;
v7 = &a1[a4 - 1];
while ( 1 )
{
v8 = *a1;
if ( (int)v8 < 0 )
break;
if ( a3 <= (int)v8 )
break;
v9 = &v4[4 * v8];
if ( *(_DWORD *)v9 )
break;
*(_DWORD *)v9 = 1;
if ( v7 == a1 )
return 1LL;
++a1;
}
return 0LL;
}

variable_types:
P
int []

variable_types:
W
int []

variable_types: n int

variable_types: r int

variable_types: i int

variable_types: k int


variable_types: pivot double

variable_types:
X
double []

variable_types: x double

variable_types: s double


variable_types:
Ap
int []

variable_types:
Rp
int []

variable_types:
Ri
int []

variable_types:
Flag
int []

variable_types: j int

variable_types: p int


original_code:
double
umfdi_utsolve
(
    NumericType *Numeric,
    double X [ ],
    int Pattern [ ]
)
{
    double xk ;
    double *xp, *D, *Uval ;
    int k, deg, j, *ip, col, *Upos, *Uilen, kstart, kend, up,
 *Uip, n, uhead, ulen, pos, 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 ;
    kend = 0 ;
    n1 = Numeric->n1 ;
    for (k = 0 ; k < n1 ; k++)
    {
 ;
 { (xk) = (X [k]) / (D [k]) ; } ;
 X [k] = xk ;
 deg = Uilen [k] ;
 if (deg > 0 && ((xk) != 0.))
 {
     up = Uip [k] ;
     Ui = (int *) (Numeric->Memory + up) ;
     up += (((((sizeof (int) * (deg))) + (sizeof (Unit)) - 1) / (sizeof (Unit)))) ;
     Uval = (double *) (Numeric->Memory + up) ;
     for (j = 0 ; j < deg ; j++)
     {
  ;
  ;
  ;
  { (X [Ui [j]]) -= (xk) * (Uval [j]) ; } ;
     }
 }
    }
    for (kstart = n1 ; kstart < npiv ; kstart = kend + 1)
    {
 ;
 kend = kstart ;
 while (kend < npiv && Uip [kend+1] > 0)
 {
     kend++ ;
 }
 k = kend+1 ;
 ;
 if (k == npiv)
 {
     deg = Numeric->ulen ;
     if (deg > 0)
     {
  for (j = 0 ; j < deg ; j++)
  {
      Pattern [j] = Numeric->Upattern [j] ;
  }
     }
 }
 else
 {
     ;
     up = -Uip [k] ;
     ;
     deg = Uilen [k] ;
     ;
     ip = (int *) (Numeric->Memory + up) ;
     for (j = 0 ; j < deg ; j++)
     {
  col = *ip++ ;
  ;
  ;
  Pattern [j] = col ;
     }
 }
 uhead = n ;
 for (k = kend ; k > kstart ; k--)
 {
     ;
     ulen = Uilen [k] ;
     for (j = 0 ; j < ulen ; j++)
     {
  ;
  Pattern [--uhead] = Pattern [--deg] ;
     }
     ;
     ;
     pos = Upos [k] ;
     if (pos != (-1))
     {
  ;
  ;
  Pattern [deg++] = Pattern [pos] ;
  Pattern [pos] = k ;
     }
 }
 ;
 for (k = kstart ; k <= kend ; k++)
 {
     ;
     pos = Upos [k] ;
     if (pos != (-1))
     {
  ;
  ;
  ;
  ;
  Pattern [pos] = Pattern [--deg] ;
     }
     up = Uip [k] ;
     ulen = Uilen [k] ;
     if (k > kstart)
     {
  for (j = 0 ; j < ulen ; j++)
  {
      ;
      Pattern [deg++] = Pattern [uhead++] ;
  }
  ;
  ;
     }
     { (xk) = (X [k]) / (D [k]) ; } ;
     X [k] = xk ;
     if (((xk) != 0.))
     {
  if (k == kstart)
  {
      up = -up ;
      xp = (double *) (Numeric->Memory + up + (((((sizeof (int) * (ulen))) + (sizeof (Unit)) - 1) / (sizeof (Unit))))) ;
  }
  else
  {
      xp = (double *) (Numeric->Memory + up) ;
  }
  for (j = 0 ; j < deg ; j++)
  {
      ;
      ;
      ;
      { (X [Pattern [j]]) -= (xk) * (*xp) ; } ;
      xp++ ;
  }
     }
 }
 ;
    }
    for (k = npiv ; k < n ; k++)
    {
 ;
 { (xk) = (X [k]) / (D [k]) ; } ;
 X [k] = xk ;
    }
    return (1. * ((double) n) + 2. * ((double) Numeric->unz));
}

canonical_original_code:
double umfdi_utsolve(struct NumericType *Numeric, double X[], int Pattern[])
{
    double xk;
    double *xp; double *D; double *Uval;
    int k; int deg; int j; int *ip; int col; int *Upos; int *Uilen; int kstart; int kend; int up; int *Uip; int n; int uhead; int ulen; int pos; 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 ;
    kend = 0 ;
    n1 = Numeric->n1 ;
    for (k = 0 ; k < n1 ; k++)
    {
 ;
 { (xk) = (X [k]) / (D [k]) ; } ;
 X [k] = xk ;
 deg = Uilen [k] ;
 if (deg > 0 && ((xk) != 0.))
 {
     up = Uip [k] ;
     Ui = (int *) (Numeric->Memory + up) ;
     up += (((((sizeof (int) * (deg))) + (sizeof (Unit)) - 1) / (sizeof (Unit)))) ;
     Uval = (double *) (Numeric->Memory + up) ;
     for (j = 0 ; j < deg ; j++)
     {
  ;
  ;
  ;
  { (X [Ui [j]]) -= (xk) * (Uval [j]) ; } ;
     }
 }
    }
    for (kstart = n1 ; kstart < npiv ; kstart = kend + 1)
    {
 ;
 kend = kstart ;
 while (kend < npiv && Uip [kend+1] > 0)
 {
     kend++ ;
 }
 k = kend+1 ;
 ;
 if (k == npiv)
 {
     deg = Numeric->ulen ;
     if (deg > 0)
     {
  for (j = 0 ; j < deg ; j++)
  {
      Pattern [j] = Numeric->Upattern [j] ;
  }
     }
 }
 else
 {
     ;
     up = -Uip [k] ;
     ;
     deg = Uilen [k] ;
     ;
     ip = (int *) (Numeric->Memory + up) ;
     for (j = 0 ; j < deg ; j++)
     {
  col = *ip++ ;
  ;
  ;
  Pattern [j] = col ;
     }
 }
 uhead = n ;
 for (k = kend ; k > kstart ; k--)
 {
     ;
     ulen = Uilen [k] ;
     for (j = 0 ; j < ulen ; j++)
     {
  ;
  Pattern [--uhead] = Pattern [--deg] ;
     }
     ;
     ;
     pos = Upos [k] ;
     if (pos != (-1))
     {
  ;
  ;
  Pattern [deg++] = Pattern [pos] ;
  Pattern [pos] = k ;
     }
 }
 ;
 for (k = kstart ; k <= kend ; k++)
 {
     ;
     pos = Upos [k] ;
     if (pos != (-1))
     {
  ;
  ;
  ;
  ;
  Pattern [pos] = Pattern [--deg] ;
     }
     up = Uip [k] ;
     ulen = Uilen [k] ;
     if (k > kstart)
     {
  for (j = 0 ; j < ulen ; j++)
  {
      ;
      Pattern [deg++] = Pattern [uhead++] ;
  }
  ;
  ;
     }
     { (xk) = (X [k]) / (D [k]) ; } ;
     X [k] = xk ;
     if (((xk) != 0.))
     {
  if (k == kstart)
  {
      up = -up ;
      xp = (double *) (Numeric->Memory + up + (((((sizeof (int) * (ulen))) + (sizeof (Unit)) - 1) / (sizeof (Unit))))) ;
  }
  else
  {
      xp = (double *) (Numeric->Memory + up) ;
  }
  for (j = 0 ; j < deg ; j++)
  {
      ;
      ;
      ;
      { (X [Pattern [j]]) -= (xk) * (*xp) ; } ;
      xp++ ;
  }
     }
 }
 ;
    }
    for (k = npiv ; k < n ; k++)
    {
 ;
 { (xk) = (X [k]) / (D [k]) ; } ;
 X [k] = xk ;
    }
    return (1. * ((double) n) + 2. * ((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; double *D; int do_recip; double *Rs; int n_row; int tail_usage; int maxnrows; } *

variable_types:
Pattern
int []

variable_types: xk double

variable_types:
xp
double *

variable_types:
D
double *

variable_types:
Uval
double *

variable_types: deg int

variable_types:
ip
int *

variable_types: col int

variable_types:
Upos
int *

variable_types:
Uilen
int *

variable_types: kstart int

variable_types: kend int

variable_types: up int

variable_types:
Uip
int *

variable_types: uhead int

variable_types: ulen int

variable_types: pos int

variable_types: npiv int

variable_types:
Ui
int *

return_type: double

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


decompiled_code:
char __fastcall umfpack_zi_report_status(double *a1, unsigned int a2)
{
int v2; // er12
unsigned int v3; // eax
__int64 (*v4)(const char *, ...); // rdx

if ( a1 )
{
v2 = (int)*a1;
LOBYTE(v3) = v2 <= 1;
if ( v2 <= 0 )
return v3;
}
else
{
LOBYTE(v3) = 1;
v2 = 1;
}
if ( !a2 && (_BYTE)v3 )
return v3;
if ( !amd_printf )
{
if ( v2 <= 3 )
goto LABEL_21;
goto LABEL_20;
}
LOBYTE(v3) = amd_printf("\n");
if ( v2 <= 3 )
goto LABEL_15;
if ( !amd_printf )
{
LABEL_20:
if ( v2 <= 5 )
goto LABEL_15;
LABEL_21:
if ( a2 == -911 )
return v3;
v3 = a2 + 18;
if ( a2 + 18 > 0x13 )
return v3;
v4 = 0LL;
goto LABEL_18;
}
LOBYTE(v3) = amd_printf("%s\n");
if ( v2 > 5 )
{
if ( !amd_printf )
goto LABEL_21;
LOBYTE(v3) = amd_printf("%s");
if ( !amd_printf )
goto LABEL_21;
LOBYTE(v3) = amd_printf("%s");
if ( !amd_printf )
goto LABEL_21;
LOBYTE(v3) = amd_printf("%s");
}
LABEL_15:
if ( !amd_printf )
goto LABEL_21;
LOBYTE(v3) = amd_printf("UMFPACK V%d.%d.%d (%s): ", 5LL, 6LL, 1LL, "Jun 20, 2012");
v4 = amd_printf;
if ( a2 != -911 )
{
v3 = a2 + 18;
LABEL_18:
switch ( v3 )
{
case 0u:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: ordering failed\n");
goto LABEL_28;
}
break;
case 3u:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: invalid permutation\n");
goto LABEL_28;
}
break;
case 5u:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: system argument invalid\n");
goto LABEL_28;
}
break;
case 7u:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: pattern of matrix (Ap and/or Ai) has changed\n");
goto LABEL_28;
}
break;
case 0xAu:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: input matrix is invalid\n");
goto LABEL_28;
}
break;
case 0xCu:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: dimension (n_row or n_col) must be > 0\n");
goto LABEL_28;
}
break;
case 0xDu:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: required argument(s) missing\n");
goto LABEL_28;
}
break;
case 0xEu:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: Symbolic object is invalid\n");
goto LABEL_28;
}
break;
case 0xFu:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: Numeric object is invalid\n");
goto LABEL_28;
}
break;
case 0x11u:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: out of memory\n");
goto LABEL_28;
}
break;
case 0x12u:
if ( v4 )
{
LOBYTE(v3) = v4("OK\n");
goto LABEL_28;
}
break;
case 0x13u:
if ( v4 )
{
LOBYTE(v3) = v4("WARNING: matrix is singular\n");
goto LABEL_28;
}
break;
default:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: Unrecognized error code: %d\n", a2);
goto LABEL_28;
}
break;
}
return v3;
}
if ( amd_printf )
{
LOBYTE(v3) = amd_printf(
"INTERNAL ERROR!\n"
"Input arguments might be corrupted or aliased, or an internal\n"
"error has occurred. Check your input arguments with the\n"
"umfpack_*_report_* routines before calling the umfpack_*\n"
"computational routines. Recompile UMFPACK with debugging\n"
"enabled, and look for failed assertions. If all else fails\n"
"please report this error to Tim Davis\n"
"(DrTimothyAldenDavis@gmail.com).\n");
LABEL_28:
if ( amd_printf )
LOBYTE(v3) = amd_printf("\n");
}
return v3;
}

canonical_decompiled_code:
char __fastcall func0(double *a1, unsigned int a2)
{
int v2; // er12
unsigned int v3; // eax
__int64 (*v4)(const char *, ...); // rdx

if ( a1 )
{
v2 = (int)*a1;
LOBYTE(v3) = v2 <= 1;
if ( v2 <= 0 )
return v3;
}
else
{
LOBYTE(v3) = 1;
v2 = 1;
}
if ( !a2 && (_BYTE)v3 )
return v3;
if ( !amd_printf )
{
if ( v2 <= 3 )
goto LABEL_21;
goto LABEL_20;
}
LOBYTE(v3) = amd_printf("\n");
if ( v2 <= 3 )
goto LABEL_15;
if ( !amd_printf )
{
LABEL_20:
if ( v2 <= 5 )
goto LABEL_15;
LABEL_21:
if ( a2 == -911 )
return v3;
v3 = a2 + 18;
if ( a2 + 18 > 0x13 )
return v3;
v4 = 0LL;
goto LABEL_18;
}
LOBYTE(v3) = amd_printf("%s\n");
if ( v2 > 5 )
{
if ( !amd_printf )
goto LABEL_21;
LOBYTE(v3) = amd_printf("%s");
if ( !amd_printf )
goto LABEL_21;
LOBYTE(v3) = amd_printf("%s");
if ( !amd_printf )
goto LABEL_21;
LOBYTE(v3) = amd_printf("%s");
}
LABEL_15:
if ( !amd_printf )
goto LABEL_21;
LOBYTE(v3) = amd_printf("UMFPACK V%d.%d.%d (%s): ", 5LL, 6LL, 1LL, "Jun 20, 2012");
v4 = amd_printf;
if ( a2 != -911 )
{
v3 = a2 + 18;
LABEL_18:
switch ( v3 )
{
case 0u:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: ordering failed\n");
goto LABEL_28;
}
break;
case 3u:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: invalid permutation\n");
goto LABEL_28;
}
break;
case 5u:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: system argument invalid\n");
goto LABEL_28;
}
break;
case 7u:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: pattern of matrix (Ap and/or Ai) has changed\n");
goto LABEL_28;
}
break;
case 0xAu:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: input matrix is invalid\n");
goto LABEL_28;
}
break;
case 0xCu:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: dimension (n_row or n_col) must be > 0\n");
goto LABEL_28;
}
break;
case 0xDu:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: required argument(s) missing\n");
goto LABEL_28;
}
break;
case 0xEu:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: Symbolic object is invalid\n");
goto LABEL_28;
}
break;
case 0xFu:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: Numeric object is invalid\n");
goto LABEL_28;
}
break;
case 0x11u:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: out of memory\n");
goto LABEL_28;
}
break;
case 0x12u:
if ( v4 )
{
LOBYTE(v3) = v4("OK\n");
goto LABEL_28;
}
break;
case 0x13u:
if ( v4 )
{
LOBYTE(v3) = v4("WARNING: matrix is singular\n");
goto LABEL_28;
}
break;
default:
if ( v4 )
{
LOBYTE(v3) = v4("ERROR: Unrecognized error code: %d\n", a2);
goto LABEL_28;
}
break;
}
return v3;
}
if ( amd_printf )
{
LOBYTE(v3) = amd_printf(
"INTERNAL ERROR!\n"
"Input arguments might be corrupted or aliased, or an internal\n"
"error has occurred. Check your input arguments with the\n"
"umfpack_*_report_* routines before calling the umfpack_*\n"
"computational routines. Recompile UMFPACK with debugging\n"
"enabled, and look for failed assertions. If all else fails\n"
"please report this error to Tim Davis\n"
"(DrTimothyAldenDavis@gmail.com).\n");
LABEL_28:
if ( amd_printf )
LOBYTE(v3) = amd_printf("\n");
}
return v3;
}

original_code:
void umfpack_zi_report_status
(
    const double Control [20],
    int status
)
{
    int prl ;
    prl = ((Control != (double *) ((void *)0)) ? (((Control [0]) != (Control [0])) ? 1 : Control [0]) : 1) ;
    if (prl < 1)
    {
 return ;
    }
    if (status == (0) && prl <= 1)
    {
 return ;
    }
    { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ;
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s\n", "UMFPACK:  Copyright (c) 2005-2012 by Timothy A. Davis.  All Rights Reserved.\n") ; } ; } } ;
    { if (prl >= (6)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s", "\nUMFPACK License:\n" "\n" "   UMFPACK is available under alternate licenses,\n" "   contact T. Davis for details.\n" "\n" "   Your use or distribution of UMFPACK or any modified version of\n" "   UMFPACK implies that you agree to this License.\n" "\n" "   This library is free software; you can redistribute it and/or\n" "   modify it under the terms of the GNU General Public\n" "   License as published by the Free Software Foundation; either\n" "   version 2 of the License, or (at your option) any later version.\n" "\n" "   This library is distributed in the hope that it will be useful,\n" "   but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n" "   General Public License for more details.\n" "\n" "   You should have received a copy of the GNU General Public\n" "   License along with this library; if not, write to the Free Software\n" "   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301\n" "   USA\n") ; } ; } } ;
    { if (prl >= (6)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s", "\n" "   Permission is hereby granted to use or copy this program under the\n" "   terms of the GNU GPL, provided that the Copyright, this License,\n" "   and the Availability of the original version is retained on all copies.\n" "   User documentation of any code that uses this code or any modified\n" "   version of this code must cite the Copyright, this License, the\n" "   Availability note, and \"Used by permission.\" Permission to modify\n" "   the code and to distribute modified code is granted, provided the\n" "   Copyright, this License, and the Availability note are retained,\n" "   and a notice that the code was modified is included.\n") ; } ; } } ;
    { if (prl >= (6)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s", "\n" "Availability: http://www.suitesparse.com" "\n") ; } ; } } ;
    { if (amd_printf != ((void *)0)) (void) amd_printf ("UMFPACK V%d.%d.%d (%s): ", 5, 6, 1, "Jun 20, 2012") ; } ;
    switch (status)
    {
 case (0):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("OK\n") ; } ;
     break ;
 case (1):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("WARNING: matrix is singular\n") ; } ;
     break ;
 case (-1):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: out of memory\n") ; } ;
     break ;
 case (-3):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Numeric object is invalid\n") ; } ;
     break ;
 case (-4):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Symbolic object is invalid\n") ; } ;
     break ;
 case (-5):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: required argument(s) missing\n") ; } ;
     break ;
 case (-6):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: dimension (n_row or n_col) must be > 0\n") ; } ;
     break ;
 case (-8):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: input matrix is invalid\n") ; } ;
     break ;
 case (-13):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: system argument invalid\n") ; } ;
     break ;
 case (-15):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: invalid permutation\n") ; } ;
     break ;
 case (-11):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: pattern of matrix (Ap and/or Ai) has changed\n") ; } ;
     break ;
        case (-18):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: ordering failed\n") ; } ;
     break ;
 case (-911):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("INTERNAL ERROR!\n" "Input arguments might be corrupted or aliased, or an internal\n" "error has occurred.  Check your input arguments with the\n" "umfpack_*_report_* routines before calling the umfpack_*\n" "computational routines.  Recompile UMFPACK with debugging\n" "enabled, and look for failed assertions.  If all else fails\n" "please report this error to Tim Davis\n" "(DrTimothyAldenDavis@gmail.com).\n" ) ; } ;
     break ;
 default:
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Unrecognized error code: ""%d""\n", status) ; } ;
    }
    { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ;
}

canonical_original_code:
void umfpack_zi_report_status(double Control[20], int status)
{
    int prl;
    prl = ((Control != (double *) ((void *)0)) ? (((Control [0]) != (Control [0])) ? 1 : Control [0]) : 1) ;
    if (prl < 1)
    {
 return ;
    }
    if (status == (0) && prl <= 1)
    {
 return ;
    }
    { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ;
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s\n", "UMFPACK:  Copyright (c) 2005-2012 by Timothy A. Davis.  All Rights Reserved.\n") ; } ; } } ;
    { if (prl >= (6)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s", "\nUMFPACK License:\n" "\n" "   UMFPACK is available under alternate licenses,\n" "   contact T. Davis for details.\n" "\n" "   Your use or distribution of UMFPACK or any modified version of\n" "   UMFPACK implies that you agree to this License.\n" "\n" "   This library is free software; you can redistribute it and/or\n" "   modify it under the terms of the GNU General Public\n" "   License as published by the Free Software Foundation; either\n" "   version 2 of the License, or (at your option) any later version.\n" "\n" "   This library is distributed in the hope that it will be useful,\n" "   but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n" "   General Public License for more details.\n" "\n" "   You should have received a copy of the GNU General Public\n" "   License along with this library; if not, write to the Free Software\n" "   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301\n" "   USA\n") ; } ; } } ;
    { if (prl >= (6)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s", "\n" "   Permission is hereby granted to use or copy this program under the\n" "   terms of the GNU GPL, provided that the Copyright, this License,\n" "   and the Availability of the original version is retained on all copies.\n" "   User documentation of any code that uses this code or any modified\n" "   version of this code must cite the Copyright, this License, the\n" "   Availability note, and \"Used by permission.\" Permission to modify\n" "   the code and to distribute modified code is granted, provided the\n" "   Copyright, this License, and the Availability note are retained,\n" "   and a notice that the code was modified is included.\n") ; } ; } } ;
    { if (prl >= (6)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s", "\n" "Availability: http://www.suitesparse.com" "\n") ; } ; } } ;
    { if (amd_printf != ((void *)0)) (void) amd_printf ("UMFPACK V%d.%d.%d (%s): ", 5, 6, 1, "Jun 20, 2012") ; } ;
    switch (status)
    {
 case (0):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("OK\n") ; } ;
     break ;
 case (1):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("WARNING: matrix is singular\n") ; } ;
     break ;
 case (-1):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: out of memory\n") ; } ;
     break ;
 case (-3):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Numeric object is invalid\n") ; } ;
     break ;
 case (-4):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Symbolic object is invalid\n") ; } ;
     break ;
 case (-5):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: required argument(s) missing\n") ; } ;
     break ;
 case (-6):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: dimension (n_row or n_col) must be > 0\n") ; } ;
     break ;
 case (-8):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: input matrix is invalid\n") ; } ;
     break ;
 case (-13):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: system argument invalid\n") ; } ;
     break ;
 case (-15):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: invalid permutation\n") ; } ;
     break ;
 case (-11):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: pattern of matrix (Ap and/or Ai) has changed\n") ; } ;
     break ;
        case (-18):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: ordering failed\n") ; } ;
     break ;
 case (-911):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("INTERNAL ERROR!\n" "Input arguments might be corrupted or aliased, or an internal\n" "error has occurred.  Check your input arguments with the\n" "umfpack_*_report_* routines before calling the umfpack_*\n" "computational routines.  Recompile UMFPACK with debugging\n" "enabled, and look for failed assertions.  If all else fails\n" "please report this error to Tim Davis\n" "(DrTimothyAldenDavis@gmail.com).\n" ) ; } ;
     break ;
 default:
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Unrecognized error code: ""%d""\n", status) ; } ;
    }
    { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ;
}

variable_types:
Control
double [20]

variable_types: status int

variable_types: prl int


decompiled_code:
__int64 __fastcall umfdi_report_vector(int a1, __int64 a2, __int64 a3, int a4, int a5)
{
int v9; // er15
signed int v10; // ebx
unsigned int v11; // er12
unsigned int i; // ebx
unsigned int v14; // edi

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 )
{
v9 = 10;
if ( a1 <= 10 )
v9 = a1;
v10 = 0;
if ( a1 > 0 )
{
do
print_value_constprop_0(v10++, a2);
while ( v9 > v10 );
}
if ( a1 > v9 )
{
if ( amd_printf )
amd_printf(" ...\n");
print_value_constprop_0(a1 - 1, a2);
}
}
else if ( a4 > 4 && a1 > 0 )
{
for ( i = 0; i != a1; ++i )
{
v14 = i;
print_value_constprop_0(v14, a2);
}
}
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;
}
v11 = -6;
if ( amd_printf )
amd_printf("ERROR: length of vector is < 0\n\n");
}
else
{
v11 = -5;
if ( amd_printf )
amd_printf("ERROR: vector not present\n\n");
}
return v11;
}

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

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 )
{
v9 = 10;
if ( a1 <= 10 )
v9 = a1;
v10 = 0;
if ( a1 > 0 )
{
do
func0(v10++, a2);
while ( v9 > v10 );
}
if ( a1 > v9 )
{
if ( amd_printf )
amd_printf(" ...\n");
func0(a1 - 1, a2);
}
}
else if ( a4 > 4 && a1 > 0 )
{
for ( i = 0; i != a1; ++i )
{
v14 = i;
func0(v14, a2);
}
}
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;
}
v11 = -6;
if ( amd_printf )
amd_printf("ERROR: length of vector is < 0\n\n");
}
else
{
v11 = -5;
if ( amd_printf )
amd_printf("ERROR: vector not present\n\n");
}
return v11;
}

original_code:
int umfdi_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 umfdi_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: user int

variable_types: scalar int

variable_types: i int


original_code:
long umfpack_dl_col_to_triplet
(
    long n_col,
    const long Ap [ ],
    long Tj [ ]
)
{
    long nz, j, p, p1, p2, length ;
    if (!Ap || !Tj)
    {
 return ((-5)) ;
    }
    if (n_col <= 0)
    {
 return ((-6)) ;
    }
    if (Ap [0] != 0)
    {
 return ((-8)) ;
    }
    nz = Ap [n_col] ;
    if (nz < 0)
    {
 return ((-8)) ;
    }
    for (j = 0 ; j < n_col ; j++)
    {
 p1 = Ap [j] ;
 p2 = Ap [j+1] ;
 length = p2 - p1 ;
 if (length < 0 || p2 > nz)
 {
     return ((-8)) ;
 }
 for (p = p1 ; p < p2 ; p++)
 {
     Tj [p] = j ;
 }
    }
    return ((0)) ;
}

canonical_original_code:
long umfpack_dl_col_to_triplet(long n_col, long Ap[], long Tj[])
{
    long nz; long j; long p; long p1; long p2; long length;
    if (!Ap || !Tj)
    {
 return ((-5)) ;
    }
    if (n_col <= 0)
    {
 return ((-6)) ;
    }
    if (Ap [0] != 0)
    {
 return ((-8)) ;
    }
    nz = Ap [n_col] ;
    if (nz < 0)
    {
 return ((-8)) ;
    }
    for (j = 0 ; j < n_col ; j++)
    {
 p1 = Ap [j] ;
 p2 = Ap [j+1] ;
 length = p2 - p1 ;
 if (length < 0 || p2 > nz)
 {
     return ((-8)) ;
 }
 for (p = p1 ; p < p2 ; p++)
 {
     Tj [p] = j ;
 }
    }
    return ((0)) ;
}

variable_types:
Ap
long []

variable_types:
Tj
long []

variable_types: nz long

variable_types: j long

variable_types: p long

variable_types: length long

return_type: long


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

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

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

variable_types: j int

variable_types: row int

variable_types: col int

variable_types:
Frows
int *

variable_types:
Fcols
int *

variable_types:
Fcpos
int *

variable_types:
Frpos
int *

variable_types: fncols int

variable_types: fnrows int

variable_types:
Wrow
int *

variable_types: rrdeg int

variable_types: ccdeg int

variable_types:
Wm
int *

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


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

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

variable_types: m int

variable_types: n int

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

variable_types: d int

variable_types: i int


original_code:
int umfzi_extend_front
(
    NumericType *Numeric,
    WorkType *Work
)
{
    int j, i, *Frows, row, col, *Wrow, fnr2, fnc2, *Frpos, *Fcpos, *Fcols,
 fnrows_extended, rrdeg, ccdeg, fncols_extended, fnr_curr, fnc_curr,
 fnrows, fncols, pos, fnpiv, *Wm ;
    DoubleComplex *Wx, *Wy, *Fu, *Fl ;
    fnpiv = Work->fnpiv ;
    if (Work->do_grow)
    {
 fnr2 = (1.2) * Work->fnrows_new + 2 ;
 fnc2 = (1.2) * Work->fncols_new + 2 ;
 if (!umfzi_grow_front (Numeric, fnr2, fnc2, Work, 1))
 {
     ;
     return ((0)) ;
 }
    }
    fnr_curr = Work->fnr_curr ;
    fnc_curr = Work->fnc_curr ;
    ;
    ;
    ;
    Frows = Work->Frows ;
    Frpos = Work->Frpos ;
    Fcols = Work->Fcols ;
    Fcpos = Work->Fcpos ;
    fnrows = Work->fnrows ;
    fncols = Work->fncols ;
    rrdeg = Work->rrdeg ;
    ccdeg = Work->ccdeg ;
    Work->fscan_col = fncols ;
    Work->NewCols = Fcols ;
    Work->fscan_row = fnrows ;
    Work->NewRows = Frows ;
    fnrows_extended = fnrows ;
    fncols_extended = fncols ;
    Fl = Work->Flblock + fnpiv * fnr_curr ;
    if (Work->pivcol_in_front)
    {
 fnrows_extended += ccdeg ;
 Wy = Work->Wy ;
 for (i = 0 ; i < fnrows_extended ; i++)
 {
     Fl [i] = Wy [i] ;
 }
    }
    else
    {
 DoubleComplex *F ;
 Fu = Work->Flublock + fnpiv * Work->nb ;
 Wm = Work->Wm ;
 Wx = Work->Wx ;
 F = Fu ;
 for (i = 0 ; i < fnpiv ; i++)
 {
     { F->component [0] = 0. ; F->component [1] = 0. ; F++ ; } ;
 }
 F = Fl ;
 for (i = 0 ; i < fnrows ; i++)
 {
     { F->component [0] = 0. ; F->component [1] = 0. ; F++ ; } ;
 }
 for (i = 0 ; i < ccdeg ; i++)
 {
     row = Wm [i] ;
     pos = Frpos [row] ;
     if (pos < 0)
     {
  pos = fnrows_extended++ ;
  Frows [pos] = row ;
  Frpos [row] = pos ;
     }
     Fl [pos] = Wx [i] ;
 }
    }
    ;
    if (Work->pivrow_in_front)
    {
 if (Work->pivcol_in_front)
 {
     ;
     for (j = fncols ; j < rrdeg ; j++)
     {
  Fcpos [Fcols [j]] = j * fnr_curr ;
     }
 }
 else
 {
     Wrow = Work->Wrow ;
     ;
     if (Wrow == Fcols)
     {
  for (j = fncols ; j < rrdeg ; j++)
  {
      col = Wrow [j] ;
      ;
      ;
      Fcpos [col] = j * fnr_curr ;
  }
     }
     else
     {
  for (j = fncols ; j < rrdeg ; j++)
  {
      col = Wrow [j] ;
      ;
      ;
      Fcols [j] = col ;
      Fcpos [col] = j * fnr_curr ;
  }
     }
 }
 fncols_extended = rrdeg ;
    }
    else
    {
 ;
 Wrow = Work->Wrow ;
 for (j = 0 ; j < rrdeg ; j++)
 {
     col = Wrow [j] ;
     ;
     if (Fcpos [col] < 0)
     {
  ;
  Fcols [fncols_extended] = col ;
  Fcpos [col] = fncols_extended * fnr_curr ;
  fncols_extended++ ;
     }
 }
    }
    zero_front (Work->Flblock, Work->Fublock, Work->Fcblock,
 fnrows, fncols, fnr_curr, fnc_curr,
 fnpiv, fnrows_extended, fncols_extended) ;
    Work->fnrows = fnrows_extended ;
    Work->fncols = fncols_extended ;
    ;
    ;
    return ((1)) ;
}

canonical_original_code:
int umfzi_extend_front(struct NumericType *Numeric, struct WorkType *Work)
{
    int j; int i; int *Frows; int row; int col; int *Wrow; int fnr2; int fnc2; int *Frpos; int *Fcpos; int *Fcols; int fnrows_extended; int rrdeg; int ccdeg; int fncols_extended; int fnr_curr; int fnc_curr; int fnrows; int fncols; int pos; int fnpiv; int *Wm;
    struct DoubleComplex *Wx; struct DoubleComplex *Wy; struct DoubleComplex *Fu; struct DoubleComplex *Fl;
    fnpiv = Work->fnpiv ;
    if (Work->do_grow)
    {
 fnr2 = (1.2) * Work->fnrows_new + 2 ;
 fnc2 = (1.2) * Work->fncols_new + 2 ;
 if (!umfzi_grow_front (Numeric, fnr2, fnc2, Work, 1))
 {
     ;
     return ((0)) ;
 }
    }
    fnr_curr = Work->fnr_curr ;
    fnc_curr = Work->fnc_curr ;
    ;
    ;
    ;
    Frows = Work->Frows ;
    Frpos = Work->Frpos ;
    Fcols = Work->Fcols ;
    Fcpos = Work->Fcpos ;
    fnrows = Work->fnrows ;
    fncols = Work->fncols ;
    rrdeg = Work->rrdeg ;
    ccdeg = Work->ccdeg ;
    Work->fscan_col = fncols ;
    Work->NewCols = Fcols ;
    Work->fscan_row = fnrows ;
    Work->NewRows = Frows ;
    fnrows_extended = fnrows ;
    fncols_extended = fncols ;
    Fl = Work->Flblock + fnpiv * fnr_curr ;
    if (Work->pivcol_in_front)
    {
 fnrows_extended += ccdeg ;
 Wy = Work->Wy ;
 for (i = 0 ; i < fnrows_extended ; i++)
 {
     Fl [i] = Wy [i] ;
 }
    }
    else
    {
 struct DoubleComplex *F;
 Fu = Work->Flublock + fnpiv * Work->nb ;
 Wm = Work->Wm ;
 Wx = Work->Wx ;
 F = Fu ;
 for (i = 0 ; i < fnpiv ; i++)
 {
     { F->component [0] = 0. ; F->component [1] = 0. ; F++ ; } ;
 }
 F = Fl ;
 for (i = 0 ; i < fnrows ; i++)
 {
     { F->component [0] = 0. ; F->component [1] = 0. ; F++ ; } ;
 }
 for (i = 0 ; i < ccdeg ; i++)
 {
     row = Wm [i] ;
     pos = Frpos [row] ;
     if (pos < 0)
     {
  pos = fnrows_extended++ ;
  Frows [pos] = row ;
  Frpos [row] = pos ;
     }
     Fl [pos] = Wx [i] ;
 }
    }
    ;
    if (Work->pivrow_in_front)
    {
 if (Work->pivcol_in_front)
 {
     ;
     for (j = fncols ; j < rrdeg ; j++)
     {
  Fcpos [Fcols [j]] = j * fnr_curr ;
     }
 }
 else
 {
     Wrow = Work->Wrow ;
     ;
     if (Wrow == Fcols)
     {
  for (j = fncols ; j < rrdeg ; j++)
  {
      col = Wrow [j] ;
      ;
      ;
      Fcpos [col] = j * fnr_curr ;
  }
     }
     else
     {
  for (j = fncols ; j < rrdeg ; j++)
  {
      col = Wrow [j] ;
      ;
      ;
      Fcols [j] = col ;
      Fcpos [col] = j * fnr_curr ;
  }
     }
 }
 fncols_extended = rrdeg ;
    }
    else
    {
 ;
 Wrow = Work->Wrow ;
 for (j = 0 ; j < rrdeg ; j++)
 {
     col = Wrow [j] ;
     ;
     if (Fcpos [col] < 0)
     {
  ;
  Fcols [fncols_extended] = col ;
  Fcpos [col] = fncols_extended * fnr_curr ;
  fncols_extended++ ;
     }
 }
    }
    zero_front (Work->Flblock, Work->Fublock, Work->Fcblock,
 fnrows, fncols, fnr_curr, fnc_curr,
 fnpiv, fnrows_extended, fncols_extended) ;
    Work->fnrows = fnrows_extended ;
    Work->fncols = fncols_extended ;
    ;
    ;
    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; struct DoubleComplex { double component[2]; } *D; int do_recip; double *Rs; int n_row; int tail_usage; int maxnrows; } *

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

variable_types: j int

variable_types: row int

variable_types: pos int

variable_types: fnpiv int


original_code:
static void zero_front (
    DoubleComplex *Flblock, DoubleComplex *Fublock, DoubleComplex *Fcblock,
    int fnrows, int fncols, int fnr_curr, int fnc_curr,
    int fnpiv, int fnrows_extended, int fncols_extended)
{
    int j, i ;
    DoubleComplex *F, *Fj, *Fi ;
    Fj = Fcblock + fnrows ;
    for (j = 0 ; j < fncols ; j++)
    {
 F = Fj ;
 Fj += fnr_curr ;
#pragma ivdep
 for (i = fnrows ; i < fnrows_extended ; i++)
 {
     { F->component [0] = 0. ; F->component [1] = 0. ; F++ ; } ;
 }
    }
    Fj -= fnrows ;
    for (j = fncols ; j < fncols_extended ; j++)
    {
 F = Fj ;
 Fj += fnr_curr ;
#pragma ivdep
 for (i = 0 ; i < fnrows_extended ; i++)
 {
     { F->component [0] = 0. ; F->component [1] = 0. ; F++ ; } ;
 }
    }
    Fj = Flblock + fnrows ;
    for (j = 0 ; j < fnpiv ; j++)
    {
 F = Fj ;
 Fj += fnr_curr ;
#pragma ivdep
 for (i = fnrows ; i < fnrows_extended ; i++)
 {
     { F->component [0] = 0. ; F->component [1] = 0. ; F++ ; } ;
 }
    }
    Fi = Fublock + fncols ;
    for (i = 0 ; i < fnpiv ; i++)
    {
 F = Fi ;
 Fi += fnc_curr ;
#pragma ivdep
 for (j = fncols ; j < fncols_extended ; j++)
 {
     { F->component [0] = 0. ; F->component [1] = 0. ; F++ ; } ;
 }
    }
}

canonical_original_code:
static void zero_front(struct DoubleComplex *Flblock, struct DoubleComplex *Fublock, struct DoubleComplex *Fcblock, int fnrows, int fncols, int fnr_curr, int fnc_curr, int fnpiv, int fnrows_extended, int fncols_extended)
{
    int j; int i;
    struct DoubleComplex *F; struct DoubleComplex *Fj; struct DoubleComplex *Fi;
    Fj = Fcblock + fnrows ;
    for (j = 0 ; j < fncols ; j++)
    {
 F = Fj ;
 Fj += fnr_curr ;
#pragma ivdep
 for (i = fnrows ; i < fnrows_extended ; i++)
 {
     { F->component [0] = 0. ; F->component [1] = 0. ; F++ ; } ;
 }
    }
    Fj -= fnrows ;
    for (j = fncols ; j < fncols_extended ; j++)
    {
 F = Fj ;
 Fj += fnr_curr ;
#pragma ivdep
 for (i = 0 ; i < fnrows_extended ; i++)
 {
     { F->component [0] = 0. ; F->component [1] = 0. ; F++ ; } ;
 }
    }
    Fj = Flblock + fnrows ;
    for (j = 0 ; j < fnpiv ; j++)
    {
 F = Fj ;
 Fj += fnr_curr ;
#pragma ivdep
 for (i = fnrows ; i < fnrows_extended ; i++)
 {
     { F->component [0] = 0. ; F->component [1] = 0. ; F++ ; } ;
 }
    }
    Fi = Fublock + fncols ;
    for (i = 0 ; i < fnpiv ; i++)
    {
 F = Fi ;
 Fi += fnc_curr ;
#pragma ivdep
 for (j = fncols ; j < fncols_extended ; j++)
 {
     { F->component [0] = 0. ; F->component [1] = 0. ; F++ ; } ;
 }
    }
}

variable_types:
Fublock
struct DoubleComplex *

variable_types:
Fcblock
struct DoubleComplex *

variable_types: fncols int

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


decompiled_code:
char __fastcall umfpack_zl_report_status(double *a1, __int64 a2)
{
__int64 v2; // r12
char result; // al
__int64 (*v4)(const char *, ...); // rcx
__int64 v5; // rdx

if ( a1 )
{
v2 = (unsigned int)(int)*a1;
result = (unsigned __int64)v2 <= 1;
if ( !(int)*a1 )
return result;
}
else
{
result = 1;
v2 = 1LL;
}
if ( !a2 && result )
return result;
if ( amd_printf )
{
result = amd_printf("\n");
if ( v2 <= 3 )
goto LABEL_15;
if ( amd_printf )
{
result = amd_printf("%s\n");
if ( v2 <= 5 )
goto LABEL_15;
if ( amd_printf )
{
result = amd_printf("%s");
if ( amd_printf )
{
result = amd_printf("%s");
if ( amd_printf )
{
result = amd_printf("%s");
goto LABEL_15;
}
}
}
goto LABEL_21;
}
}
else if ( v2 <= 3 )
{
goto LABEL_21;
}
if ( v2 <= 5 )
{
LABEL_15:
if ( amd_printf )
{
result = amd_printf("UMFPACK V%d.%d.%d (%s): ", 5LL, 6LL, 1LL, "Jun 20, 2012");
v4 = amd_printf;
if ( a2 == -911 )
{
if ( !amd_printf )
return result;
result = amd_printf(
"INTERNAL ERROR!\n"
"Input arguments might be corrupted or aliased, or an internal\n"
"error has occurred. Check your input arguments with the\n"
"umfpack_*_report_* routines before calling the umfpack_*\n"
"computational routines. Recompile UMFPACK with debugging\n"
"enabled, and look for failed assertions. If all else fails\n"
"please report this error to Tim Davis\n"
"(DrTimothyAldenDavis@gmail.com).\n");
goto LABEL_28;
}
v5 = a2 + 18;
goto LABEL_18;
}
}
LABEL_21:
if ( a2 != -911 )
{
v5 = a2 + 18;
if ( (unsigned __int64)(a2 + 18) <= 0x13 )
{
v4 = 0LL;
if ( (unsigned __int64)(a2 + 18) > 0x13 )
{
LABEL_24:
if ( !v4 )
return result;
result = v4("ERROR: Unrecognized error code: %ld\n", a2);
goto LABEL_28;
}
LABEL_18:
switch ( v5 )
{
case 0LL:
if ( !v4 )
return result;
result = v4("ERROR: ordering failed\n");
break;
case 3LL:
if ( !v4 )
return result;
result = v4("ERROR: invalid permutation\n");
break;
case 5LL:
if ( !v4 )
return result;
result = v4("ERROR: system argument invalid\n");
break;
case 7LL:
if ( !v4 )
return result;
result = v4("ERROR: pattern of matrix (Ap and/or Ai) has changed\n");
break;
case 10LL:
if ( !v4 )
return result;
result = v4("ERROR: input matrix is invalid\n");
break;
case 12LL:
if ( !v4 )
return result;
result = v4("ERROR: dimension (n_row or n_col) must be > 0\n");
break;
case 13LL:
if ( !v4 )
return result;
result = v4("ERROR: required argument(s) missing\n");
break;
case 14LL:
if ( !v4 )
return result;
result = v4("ERROR: Symbolic object is invalid\n");
break;
case 15LL:
if ( !v4 )
return result;
result = v4("ERROR: Numeric object is invalid\n");
break;
case 17LL:
if ( !v4 )
return result;
result = v4("ERROR: out of memory\n");
break;
case 18LL:
if ( !v4 )
return result;
result = v4("OK\n");
break;
case 19LL:
if ( !v4 )
return result;
result = v4("WARNING: matrix is singular\n");
break;
default:
goto LABEL_24;
}
LABEL_28:
if ( amd_printf )
result = amd_printf("\n");
return result;
}
}
return result;
}

original_code:
void umfpack_zl_report_status
(
    const double Control [20],
    long status
)
{
    long prl ;
    prl = ((Control != (double *) ((void *)0)) ? (((Control [0]) != (Control [0])) ? 1 : Control [0]) : 1) ;
    if (prl < 1)
    {
 return ;
    }
    if (status == (0) && prl <= 1)
    {
 return ;
    }
    { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ;
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s\n", "UMFPACK:  Copyright (c) 2005-2012 by Timothy A. Davis.  All Rights Reserved.\n") ; } ; } } ;
    { if (prl >= (6)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s", "\nUMFPACK License:\n" "\n" "   UMFPACK is available under alternate licenses,\n" "   contact T. Davis for details.\n" "\n" "   Your use or distribution of UMFPACK or any modified version of\n" "   UMFPACK implies that you agree to this License.\n" "\n" "   This library is free software; you can redistribute it and/or\n" "   modify it under the terms of the GNU General Public\n" "   License as published by the Free Software Foundation; either\n" "   version 2 of the License, or (at your option) any later version.\n" "\n" "   This library is distributed in the hope that it will be useful,\n" "   but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n" "   General Public License for more details.\n" "\n" "   You should have received a copy of the GNU General Public\n" "   License along with this library; if not, write to the Free Software\n" "   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301\n" "   USA\n") ; } ; } } ;
    { if (prl >= (6)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s", "\n" "   Permission is hereby granted to use or copy this program under the\n" "   terms of the GNU GPL, provided that the Copyright, this License,\n" "   and the Availability of the original version is retained on all copies.\n" "   User documentation of any code that uses this code or any modified\n" "   version of this code must cite the Copyright, this License, the\n" "   Availability note, and \"Used by permission.\" Permission to modify\n" "   the code and to distribute modified code is granted, provided the\n" "   Copyright, this License, and the Availability note are retained,\n" "   and a notice that the code was modified is included.\n") ; } ; } } ;
    { if (prl >= (6)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s", "\n" "Availability: http://www.suitesparse.com" "\n") ; } ; } } ;
    { if (amd_printf != ((void *)0)) (void) amd_printf ("UMFPACK V%d.%d.%d (%s): ", 5, 6, 1, "Jun 20, 2012") ; } ;
    switch (status)
    {
 case (0):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("OK\n") ; } ;
     break ;
 case (1):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("WARNING: matrix is singular\n") ; } ;
     break ;
 case (-1):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: out of memory\n") ; } ;
     break ;
 case (-3):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Numeric object is invalid\n") ; } ;
     break ;
 case (-4):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Symbolic object is invalid\n") ; } ;
     break ;
 case (-5):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: required argument(s) missing\n") ; } ;
     break ;
 case (-6):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: dimension (n_row or n_col) must be > 0\n") ; } ;
     break ;
 case (-8):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: input matrix is invalid\n") ; } ;
     break ;
 case (-13):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: system argument invalid\n") ; } ;
     break ;
 case (-15):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: invalid permutation\n") ; } ;
     break ;
 case (-11):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: pattern of matrix (Ap and/or Ai) has changed\n") ; } ;
     break ;
        case (-18):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: ordering failed\n") ; } ;
     break ;
 case (-911):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("INTERNAL ERROR!\n" "Input arguments might be corrupted or aliased, or an internal\n" "error has occurred.  Check your input arguments with the\n" "umfpack_*_report_* routines before calling the umfpack_*\n" "computational routines.  Recompile UMFPACK with debugging\n" "enabled, and look for failed assertions.  If all else fails\n" "please report this error to Tim Davis\n" "(DrTimothyAldenDavis@gmail.com).\n" ) ; } ;
     break ;
 default:
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Unrecognized error code: ""%" "ld""\n", status) ; } ;
    }
    { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ;
}

canonical_original_code:
void umfpack_zl_report_status(double Control[20], long status)
{
    long prl;
    prl = ((Control != (double *) ((void *)0)) ? (((Control [0]) != (Control [0])) ? 1 : Control [0]) : 1) ;
    if (prl < 1)
    {
 return ;
    }
    if (status == (0) && prl <= 1)
    {
 return ;
    }
    { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ;
    { if (prl >= (4)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s\n", "UMFPACK:  Copyright (c) 2005-2012 by Timothy A. Davis.  All Rights Reserved.\n") ; } ; } } ;
    { if (prl >= (6)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s", "\nUMFPACK License:\n" "\n" "   UMFPACK is available under alternate licenses,\n" "   contact T. Davis for details.\n" "\n" "   Your use or distribution of UMFPACK or any modified version of\n" "   UMFPACK implies that you agree to this License.\n" "\n" "   This library is free software; you can redistribute it and/or\n" "   modify it under the terms of the GNU General Public\n" "   License as published by the Free Software Foundation; either\n" "   version 2 of the License, or (at your option) any later version.\n" "\n" "   This library is distributed in the hope that it will be useful,\n" "   but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n" "   General Public License for more details.\n" "\n" "   You should have received a copy of the GNU General Public\n" "   License along with this library; if not, write to the Free Software\n" "   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301\n" "   USA\n") ; } ; } } ;
    { if (prl >= (6)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s", "\n" "   Permission is hereby granted to use or copy this program under the\n" "   terms of the GNU GPL, provided that the Copyright, this License,\n" "   and the Availability of the original version is retained on all copies.\n" "   User documentation of any code that uses this code or any modified\n" "   version of this code must cite the Copyright, this License, the\n" "   Availability note, and \"Used by permission.\" Permission to modify\n" "   the code and to distribute modified code is granted, provided the\n" "   Copyright, this License, and the Availability note are retained,\n" "   and a notice that the code was modified is included.\n") ; } ; } } ;
    { if (prl >= (6)) { { if (amd_printf != ((void *)0)) (void) amd_printf ("%s", "\n" "Availability: http://www.suitesparse.com" "\n") ; } ; } } ;
    { if (amd_printf != ((void *)0)) (void) amd_printf ("UMFPACK V%d.%d.%d (%s): ", 5, 6, 1, "Jun 20, 2012") ; } ;
    switch (status)
    {
 case (0):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("OK\n") ; } ;
     break ;
 case (1):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("WARNING: matrix is singular\n") ; } ;
     break ;
 case (-1):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: out of memory\n") ; } ;
     break ;
 case (-3):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Numeric object is invalid\n") ; } ;
     break ;
 case (-4):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Symbolic object is invalid\n") ; } ;
     break ;
 case (-5):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: required argument(s) missing\n") ; } ;
     break ;
 case (-6):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: dimension (n_row or n_col) must be > 0\n") ; } ;
     break ;
 case (-8):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: input matrix is invalid\n") ; } ;
     break ;
 case (-13):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: system argument invalid\n") ; } ;
     break ;
 case (-15):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: invalid permutation\n") ; } ;
     break ;
 case (-11):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: pattern of matrix (Ap and/or Ai) has changed\n") ; } ;
     break ;
        case (-18):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: ordering failed\n") ; } ;
     break ;
 case (-911):
     { if (amd_printf != ((void *)0)) (void) amd_printf ("INTERNAL ERROR!\n" "Input arguments might be corrupted or aliased, or an internal\n" "error has occurred.  Check your input arguments with the\n" "umfpack_*_report_* routines before calling the umfpack_*\n" "computational routines.  Recompile UMFPACK with debugging\n" "enabled, and look for failed assertions.  If all else fails\n" "please report this error to Tim Davis\n" "(DrTimothyAldenDavis@gmail.com).\n" ) ; } ;
     break ;
 default:
     { if (amd_printf != ((void *)0)) (void) amd_printf ("ERROR: Unrecognized error code: ""%" "ld""\n", status) ; } ;
    }
    { if (amd_printf != ((void *)0)) (void) amd_printf ("\n") ; } ;
}

variable_types:
Control
double [20]

variable_types: status long

variable_types: prl long


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

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

variable_types:
lnz
long *

variable_types:
unz
long *

variable_types:
NumericHandle
void *

variable_types: struct NumericType { double flops; long scale; long valid; union Unit_union { struct { long size; } header; double xxxxxx; } *Memory; long ihead; long *Rperm; long ulen; double *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; double *D; long do_recip; double *Rs; long n_row; long tail_usage; long maxnrows; }


original_code:
long umfzl_grow_front
(
    NumericType *Numeric,
    long fnr2,
    long fnc2,
    WorkType *Work,
    long do_what
)
{
    double s ;
    DoubleComplex *Fcold, *Fcnew ;
    long j, i, col, *Fcpos, *Fcols, fnrows_max, fncols_max, fnr_curr, nb,
 fnrows_new, fncols_new, fnr_min, fnc_min, minsize,
 newsize, fnrows, fncols, *E, eloc ;
    Fcols = Work->Fcols ;
    Fcpos = Work->Fcpos ;
    E = Work->E ;
    nb = Work->nb ;
    fnrows_max = Work->fnrows_max + nb ;
    fncols_max = Work->fncols_max + nb ;
    ;
    ;
    ;
    ;
    ;
    fnrows_new = Work->fnrows_new + 1 ;
    fncols_new = Work->fncols_new + 1 ;
    ;
    if (fnrows_new % 2 == 0) fnrows_new++ ;
    fnrows_new += nb ;
    fncols_new += nb ;
    fnr_min = (((fnrows_new) < (fnrows_max)) ? (fnrows_new) : (fnrows_max)) ;
    fnc_min = (((fncols_new) < (fncols_max)) ? (fncols_new) : (fncols_max)) ;
    minsize = fnr_min * fnc_min ;
    if (((!(((double) fnr_min * (double) fnc_min * sizeof (DoubleComplex)) * (1.0+1e-8) <= (double) 0x7fffffffffffffffL)) || (((double) fnr_min * (double) fnc_min * sizeof (DoubleComplex)) != ((double) fnr_min * (double) fnc_min * sizeof (DoubleComplex)))))
    {
 return ((0)) ;
    }
    ;
    ;
    ;
    ;
    fnr2 += nb ;
    fnc2 += nb ;
    ;
    if (fnr2 % 2 == 0) fnr2++ ;
    fnr2 = (((fnr2) > (fnr_min)) ? (fnr2) : (fnr_min)) ;
    fnc2 = (((fnc2) > (fnc_min)) ? (fnc2) : (fnc_min)) ;
    fnr2 = (((fnr2) < (fnrows_max)) ? (fnr2) : (fnrows_max)) ;
    fnc2 = (((fnc2) < (fncols_max)) ? (fnc2) : (fncols_max)) ;
    ;
    ;
    ;
    s = ((double) fnr2) * ((double) fnc2) ;
    if (((!((s * sizeof (DoubleComplex)) * (1.0+1e-8) <= (double) 0x7fffffffffffffffL)) || ((s * sizeof (DoubleComplex)) != (s * sizeof (DoubleComplex)))))
    {
 double a = 0.9 * sqrt ((0x7fffffffffffffffL / sizeof (DoubleComplex)) / s) ;
 fnr2 = (((fnr_min) > (a * fnr2)) ? (fnr_min) : (a * fnr2)) ;
 fnc2 = (((fnc_min) > (a * fnc2)) ? (fnc_min) : (a * fnc2)) ;
 newsize = fnr2 * fnc2 ;
 ;
 if (fnr2 % 2 == 0) fnr2++ ;
 fnc2 = newsize / fnr2 ;
    }
    fnr2 = (((fnr2) > (fnr_min)) ? (fnr2) : (fnr_min)) ;
    fnc2 = (((fnc2) > (fnc_min)) ? (fnc2) : (fnc_min)) ;
    newsize = fnr2 * fnc2 ;
    ;
    ;
    ;
    ;
    ;
    if (E [0] && do_what != 1)
    {
 ;
 umfzl_mem_free_tail_block (Numeric, E [0]) ;
 E [0] = 0 ;
 Work->Flublock = (DoubleComplex *) ((void *)0) ;
 Work->Flblock = (DoubleComplex *) ((void *)0) ;
 Work->Fublock = (DoubleComplex *) ((void *)0) ;
 Work->Fcblock = (DoubleComplex *) ((void *)0) ;
    }
    ;
    eloc = umfzl_mem_alloc_tail_block (Numeric, (((((sizeof (DoubleComplex) * (newsize))) + (sizeof (Unit)) - 1) / (sizeof (Unit))))) ;
    if (!eloc)
    {
 ;
 if (!umfzl_get_memory (Numeric, Work, 1 + (((((sizeof (DoubleComplex) * (newsize))) + (sizeof (Unit)) - 1) / (sizeof (Unit)))),
     Work->fnrows, Work->fncols, (0)))
 {
     return ((0)) ;
 }
 ;
 eloc = umfzl_mem_alloc_tail_block (Numeric, (((((sizeof (DoubleComplex) * (newsize))) + (sizeof (Unit)) - 1) / (sizeof (Unit))))) ;
    }
    while ((fnr2 != fnr_min || fnc2 != fnc_min) && !eloc)
    {
 fnr2 = (((fnr2 - 2) < (fnr2 * (0.95))) ? (fnr2 - 2) : (fnr2 * (0.95))) ;
 fnc2 = (((fnc2 - 2) < (fnc2 * (0.95))) ? (fnc2 - 2) : (fnc2 * (0.95))) ;
 ;
 ;
 fnr2 = (((fnr_min) > (fnr2)) ? (fnr_min) : (fnr2)) ;
 fnc2 = (((fnc_min) > (fnc2)) ? (fnc_min) : (fnc2)) ;
 ;
 if (fnr2 % 2 == 0) fnr2++ ;
 newsize = fnr2 * fnc2 ;
 ;
 eloc = umfzl_mem_alloc_tail_block (Numeric, (((((sizeof (DoubleComplex) * (newsize))) + (sizeof (Unit)) - 1) / (sizeof (Unit))))) ;
    }
    if (!eloc)
    {
 fnr2 = fnr_min ;
 fnc2 = fnc_min ;
 newsize = minsize ;
 ;
 eloc = umfzl_mem_alloc_tail_block (Numeric, (((((sizeof (DoubleComplex) * (newsize))) + (sizeof (Unit)) - 1) / (sizeof (Unit))))) ;
    }
    if (!eloc)
    {
 return ((0)) ;
    }
    ;
    ;
    ;
    fnr_curr = Work->fnr_curr ;
    ;
    ;
    fnrows = Work->fnrows ;
    fncols = Work->fncols ;
    Fcold = Work->Fcblock ;
    fnr2 -= nb ;
    fnc2 -= nb ;
    Work->Flublock = (DoubleComplex *) (Numeric->Memory + eloc) ;
    Work->Flblock = Work->Flublock + nb * nb ;
    Work->Fublock = Work->Flblock + nb * fnr2 ;
    Work->Fcblock = Work->Fublock + nb * fnc2 ;
    Fcnew = Work->Fcblock ;
    if (E [0])
    {
 for (j = 0 ; j < fncols ; j++)
 {
     col = Fcols [j] ;
     ;
     ;
     for (i = 0 ; i < fnrows ; i++)
     {
  Fcnew [i] = Fcold [i] ;
     }
     Fcnew += fnr2 ;
     Fcold += fnr_curr ;
     ;
     Fcpos [col] = j * fnr2 ;
 }
    }
    else if (do_what == 2)
    {
 for (j = 0 ; j < fncols ; j++)
 {
     col = Fcols [j] ;
     ;
     Fcpos [col] = j * fnr2 ;
 }
    }
    umfzl_mem_free_tail_block (Numeric, E [0]) ;
    E [0] = eloc ;
    Work->fnr_curr = fnr2 ;
    Work->fnc_curr = fnc2 ;
    Work->fcurr_size = newsize ;
    Work->do_grow = (0) ;
    ;
    ;
    ;
    return ((1)) ;
}

canonical_original_code:
long umfzl_grow_front(struct NumericType *Numeric, long fnr2, long fnc2, struct WorkType *Work, long do_what)
{
    double s;
    struct DoubleComplex *Fcold; struct DoubleComplex *Fcnew;
    long j; long i; long col; long *Fcpos; long *Fcols; long fnrows_max; long fncols_max; long fnr_curr; long nb; long fnrows_new; long fncols_new; long fnr_min; long fnc_min; long minsize; long newsize; long fnrows; long fncols; long *E; long eloc;
    Fcols = Work->Fcols ;
    Fcpos = Work->Fcpos ;
    E = Work->E ;
    nb = Work->nb ;
    fnrows_max = Work->fnrows_max + nb ;
    fncols_max = Work->fncols_max + nb ;
    ;
    ;
    ;
    ;
    ;
    fnrows_new = Work->fnrows_new + 1 ;
    fncols_new = Work->fncols_new + 1 ;
    ;
    if (fnrows_new % 2 == 0) fnrows_new++ ;
    fnrows_new += nb ;
    fncols_new += nb ;
    fnr_min = (((fnrows_new) < (fnrows_max)) ? (fnrows_new) : (fnrows_max)) ;
    fnc_min = (((fncols_new) < (fncols_max)) ? (fncols_new) : (fncols_max)) ;
    minsize = fnr_min * fnc_min ;
    if (((!(((double) fnr_min * (double) fnc_min * sizeof (DoubleComplex)) * (1.0+1e-8) <= (double) 0x7fffffffffffffffL)) || (((double) fnr_min * (double) fnc_min * sizeof (DoubleComplex)) != ((double) fnr_min * (double) fnc_min * sizeof (DoubleComplex)))))
    {
 return ((0)) ;
    }
    ;
    ;
    ;
    ;
    fnr2 += nb ;
    fnc2 += nb ;
    ;
    if (fnr2 % 2 == 0) fnr2++ ;
    fnr2 = (((fnr2) > (fnr_min)) ? (fnr2) : (fnr_min)) ;
    fnc2 = (((fnc2) > (fnc_min)) ? (fnc2) : (fnc_min)) ;
    fnr2 = (((fnr2) < (fnrows_max)) ? (fnr2) : (fnrows_max)) ;
    fnc2 = (((fnc2) < (fncols_max)) ? (fnc2) : (fncols_max)) ;
    ;
    ;
    ;
    s = ((double) fnr2) * ((double) fnc2) ;
    if (((!((s * sizeof (DoubleComplex)) * (1.0+1e-8) <= (double) 0x7fffffffffffffffL)) || ((s * sizeof (DoubleComplex)) != (s * sizeof (DoubleComplex)))))
    {
 double a = 0.9 * sqrt ((0x7fffffffffffffffL / sizeof (DoubleComplex)) / s);
 fnr2 = (((fnr_min) > (a * fnr2)) ? (fnr_min) : (a * fnr2)) ;
 fnc2 = (((fnc_min) > (a * fnc2)) ? (fnc_min) : (a * fnc2)) ;
 newsize = fnr2 * fnc2 ;
 ;
 if (fnr2 % 2 == 0) fnr2++ ;
 fnc2 = newsize / fnr2 ;
    }
    fnr2 = (((fnr2) > (fnr_min)) ? (fnr2) : (fnr_min)) ;
    fnc2 = (((fnc2) > (fnc_min)) ? (fnc2) : (fnc_min)) ;
    newsize = fnr2 * fnc2 ;
    ;
    ;
    ;
    ;
    ;
    if (E [0] && do_what != 1)
    {
 ;
 umfzl_mem_free_tail_block (Numeric, E [0]) ;
 E [0] = 0 ;
 Work->Flublock = (struct DoubleComplex *) ((void *)0) ;
 Work->Flblock = (struct DoubleComplex *) ((void *)0) ;
 Work->Fublock = (struct DoubleComplex *) ((void *)0) ;
 Work->Fcblock = (struct DoubleComplex *) ((void *)0) ;
    }
    ;
    eloc = umfzl_mem_alloc_tail_block (Numeric, (((((sizeof (DoubleComplex) * (newsize))) + (sizeof (Unit)) - 1) / (sizeof (Unit))))) ;
    if (!eloc)
    {
 ;
 if (!umfzl_get_memory (Numeric, Work, 1 + (((((sizeof (DoubleComplex) * (newsize))) + (sizeof (Unit)) - 1) / (sizeof (Unit)))),
     Work->fnrows, Work->fncols, (0)))
 {
     return ((0)) ;
 }
 ;
 eloc = umfzl_mem_alloc_tail_block (Numeric, (((((sizeof (DoubleComplex) * (newsize))) + (sizeof (Unit)) - 1) / (sizeof (Unit))))) ;
    }
    while ((fnr2 != fnr_min || fnc2 != fnc_min) && !eloc)
    {
 fnr2 = (((fnr2 - 2) < (fnr2 * (0.95))) ? (fnr2 - 2) : (fnr2 * (0.95))) ;
 fnc2 = (((fnc2 - 2) < (fnc2 * (0.95))) ? (fnc2 - 2) : (fnc2 * (0.95))) ;
 ;
 ;
 fnr2 = (((fnr_min) > (fnr2)) ? (fnr_min) : (fnr2)) ;
 fnc2 = (((fnc_min) > (fnc2)) ? (fnc_min) : (fnc2)) ;
 ;
 if (fnr2 % 2 == 0) fnr2++ ;
 newsize = fnr2 * fnc2 ;
 ;
 eloc = umfzl_mem_alloc_tail_block (Numeric, (((((sizeof (DoubleComplex) * (newsize))) + (sizeof (Unit)) - 1) / (sizeof (Unit))))) ;
    }
    if (!eloc)
    {
 fnr2 = fnr_min ;
 fnc2 = fnc_min ;
 newsize = minsize ;
 ;
 eloc = umfzl_mem_alloc_tail_block (Numeric, (((((sizeof (DoubleComplex) * (newsize))) + (sizeof (Unit)) - 1) / (sizeof (Unit))))) ;
    }
    if (!eloc)
    {
 return ((0)) ;
    }
    ;
    ;
    ;
    fnr_curr = Work->fnr_curr ;
    ;
    ;
    fnrows = Work->fnrows ;
    fncols = Work->fncols ;
    Fcold = Work->Fcblock ;
    fnr2 -= nb ;
    fnc2 -= nb ;
    Work->Flublock = (struct DoubleComplex *) (Numeric->Memory + eloc) ;
    Work->Flblock = Work->Flublock + nb * nb ;
    Work->Fublock = Work->Flblock + nb * fnr2 ;
    Work->Fcblock = Work->Fublock + nb * fnc2 ;
    Fcnew = Work->Fcblock ;
    if (E [0])
    {
 for (j = 0 ; j < fncols ; j++)
 {
     col = Fcols [j] ;
     ;
     ;
     for (i = 0 ; i < fnrows ; i++)
     {
  Fcnew [i] = Fcold [i] ;
     }
     Fcnew += fnr2 ;
     Fcold += fnr_curr ;
     ;
     Fcpos [col] = j * fnr2 ;
 }
    }
    else if (do_what == 2)
    {
 for (j = 0 ; j < fncols ; j++)
 {
     col = Fcols [j] ;
     ;
     Fcpos [col] = j * fnr2 ;
 }
    }
    umfzl_mem_free_tail_block (Numeric, E [0]) ;
    E [0] = eloc ;
    Work->fnr_curr = fnr2 ;
    Work->fnc_curr = fnc2 ;
    Work->fcurr_size = newsize ;
    Work->do_grow = (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; } *

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

variable_types: j long

variable_types: i long

variable_types: col long

variable_types:
Fcpos
long *

variable_types:
Fcols
long *

variable_types: nb long

variable_types: minsize long

variable_types: newsize long

variable_types: fnrows long

variable_types: fncols long

variable_types:
E
long *

variable_types: eloc long

variable_types: a double

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