decompiled_code:
__int64 __fastcall umfpack_di_report_matrix(int a1, int a2, _DWORD *a3, __int64 a4, __int64 a5, int a6, double *a7)
{
int v8; // er12
__int64 result; // rax
int v10; // ebx
__int64 v11; // rdx
char v12; // al
__int64 v13; // rbx
int v14; // er14
int v15; // er13
double v16; // xmm0_8
int v17; // ebp
__int64 i; // rax
__int64 v19; // rsi
int v20; // edx
__int64 v21; // rax
__int64 v22; // rdx
unsigned int v23; // ebx
int v24; // er12
__int64 v25; // r15
int v28; // [rsp+14h] [rbp-84h]
__int64 v29; // [rsp+18h] [rbp-80h]
const char *v30; // [rsp+20h] [rbp-78h]
const char *v31; // [rsp+28h] [rbp-70h]
__int64 v32; // [rsp+30h] [rbp-68h]
int v33; // [rsp+38h] [rbp-60h]
int v34; // [rsp+3Ch] [rbp-5Ch]
__int64 v35; // [rsp+40h] [rbp-58h]
_DWORD *v36; // [rsp+48h] [rbp-50h]
int v37; // [rsp+50h] [rbp-48h]

if ( !a7 )
return 0LL;
v8 = (int)*a7;
result = 0LL;
if ( v8 > 2 )
{
if ( a6 )
{
v33 = a1;
v28 = a2;
v31 = (const char *)&LC0;
v30 = "column";
}
else
{
v33 = a2;
v28 = a1;
v31 = "column";
v30 = (const char *)&LC0;
}
if ( amd_printf )
{
amd_printf("%s-form matrix, n_row %d n_col %d, ", v30, (unsigned int)a1, (unsigned int)a2);
if ( a1 <= 0 || a2 <= 0 )
{
if ( amd_printf )
amd_printf("ERROR: n_row <= 0 or n_col <= 0\n\n");
return 4294967290LL;
}
if ( !a3 )
{
if ( amd_printf )
amd_printf("ERROR: Ap missing\n\n");
return 4294967291LL;
}
}
else
{
if ( a2 <= 0 || a1 <= 0 )
return 4294967290LL;
if ( !a3 )
return 4294967291LL;
}
v10 = a3[v28];
if ( amd_printf )
{
amd_printf("nz = %d. ", (unsigned int)v10);
if ( v10 < 0 )
{
if ( amd_printf )
amd_printf("ERROR: number of entries < 0\n\n");
return 4294967288LL;
}
v11 = (unsigned int)*a3;
if ( (_DWORD)v11 )
{
if ( amd_printf )
amd_printf("ERROR: Ap [%d] = %d must be %d\n\n", 0LL, v11, 0LL);
return 4294967288LL;
}
}
else
{
if ( v10 < 0 )
return 4294967288LL;
if ( *a3 )
return 4294967288LL;
}
if ( a4 )
{
if ( v8 <= 3 )
{
if ( v28 <= 0 )
goto LABEL_19;
}
else
{
if ( amd_printf )
amd_printf("\n");
if ( v28 <= 0 )
{
LABEL_17:
result = 0LL;
if ( !amd_printf )
return result;
amd_printf(" %s-form matrix ", v30);
goto LABEL_19;
}
}
for ( i = 0LL; i != v28; ++i )
{
v19 = (unsigned int)i;
v20 = a3[i];
if ( v20 < 0 )
{
result = 4294967288LL;
if ( amd_printf )
{
amd_printf("ERROR: Ap [%d] < 0\n\n", v19);
result = 4294967288LL;
}
return result;
}
if ( v20 > v10 )
{
result = 4294967288LL;
if ( amd_printf )
{
amd_printf("ERROR: Ap [%d] > size of Ai\n\n", v19);
result = 4294967288LL;
}
return result;
}
}
v21 = 0LL;
while ( 1 )
{
v22 = (unsigned int)v21;
if ( a3[v21 + 1] - a3[v21] < 0 )
break;
if ( ++v21 == v28 )
{
v17 = v8;
v35 = 0LL;
v37 = v8;
v36 = a3;
while ( 1 )
{
if ( (int)v35 <= 9 )
v17 = v37;
v23 = v36[v35];
v24 = v36[v35 + 1];
v34 = v24 - v23;
if ( v17 > 3 && amd_printf )
amd_printf(
"\n %s %d: start: %d end: %d entries: %d\n",
v30,
(unsigned int)v35,
v23,
(unsigned int)(v24 - 1),
v36[v35 + 1] - v23);
if ( (int)v23 < v24 )
break;
LABEL_72:
if ( v28 > 10 && (_DWORD)v35 == 9 && v17 == 4 )
{
if ( amd_printf )
amd_printf("\n ...\n");
v17 = 3;
}
else if ( v28 <= (int)v35 + 1 )
{
if ( v37 > 3 )
goto LABEL_17;
LABEL_19:
if ( amd_printf )
amd_printf("OK\n\n");
return 0LL;
}
++v35;
}
v29 = v24 - 1 - v23;
v25 = a4 + 4LL * (int)v23;
v32 = a5 + 8LL * (int)v23;
v13 = 0LL;
v15 = -1;
while ( 2 )
{
v14 = v15;
v15 = *(_DWORD *)(v25 + 4 * v13);
v12 = 0;
if ( v17 > 3 )
{
if ( amd_printf )
{
amd_printf("\t%s %d ", v31, (unsigned int)v15);
if ( a5 )
{
if ( amd_printf )
amd_printf(":");
LABEL_59:
v16 = *(double *)(v32 + 8 * v13);
if ( v16 == 0.0 )
{
v12 = 1;
if ( amd_printf )
{
amd_printf(" (0)");
v12 = 1;
}
}
else
{
v12 = 1;
if ( amd_printf )
{
amd_printf(" (%g)", v16);
v12 = 1;
}
}
}
else
{
v12 = 1;
}
}
else
{
if ( a5 )
goto LABEL_59;
v12 = 1;
}
}
if ( v15 < 0 || v33 <= v15 )
{
result = 4294967288LL;
if ( amd_printf )
{
amd_printf(
" ERROR: %s index %d out of range in %s %d\n\n",
v31,
(unsigned int)v15,
v30,
(unsigned int)v35);
result = 4294967288LL;
}
return result;
}
if ( v15 <= v14 )
{
result = 4294967288LL;
if ( amd_printf )
{
amd_printf(
" ERROR: %s index %d out of order (or duplicate) in %s %d\n\n",
v31,
(unsigned int)v15,
v30,
(unsigned int)v35);
result = 4294967288LL;
}
return result;
}
if ( v12 && amd_printf )
amd_printf("\n");
if ( v17 == 4 && v34 > 10 && (_DWORD)v13 == 9 )
{
if ( amd_printf )
amd_printf("\t...\n");
v17 = 3;
}
if ( v13 == v29 )
goto LABEL_72;
++v13;
continue;
}
}
}
result = 4294967288LL;
if ( amd_printf )
{
amd_printf("ERROR: # entries in %s %d is < 0\n\n", v30, v22);
result = 4294967288LL;
}
}
else
{
result = 4294967291LL;
if ( amd_printf )
{
amd_printf("ERROR: Ai missing\n\n");
result = 4294967291LL;
}
}
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(int a1, int a2, _DWORD *a3, __int64 a4, __int64 a5, int a6, double *a7)
{
int v8; // er12
__int64 result; // rax
int v10; // ebx
__int64 v11; // rdx
char v12; // al
__int64 v13; // rbx
int v14; // er14
int v15; // er13
double v16; // xmm0_8
int v17; // ebp
__int64 i; // rax
__int64 v19; // rsi
int v20; // edx
__int64 v21; // rax
__int64 v22; // rdx
unsigned int v23; // ebx
int v24; // er12
__int64 v25; // r15
int v28; // [rsp+14h] [rbp-84h]
__int64 v29; // [rsp+18h] [rbp-80h]
const char *v30; // [rsp+20h] [rbp-78h]
const char *v31; // [rsp+28h] [rbp-70h]
__int64 v32; // [rsp+30h] [rbp-68h]
int v33; // [rsp+38h] [rbp-60h]
int v34; // [rsp+3Ch] [rbp-5Ch]
__int64 v35; // [rsp+40h] [rbp-58h]
_DWORD *v36; // [rsp+48h] [rbp-50h]
int v37; // [rsp+50h] [rbp-48h]

if ( !a7 )
return 0LL;
v8 = (int)*a7;
result = 0LL;
if ( v8 > 2 )
{
if ( a6 )
{
v33 = a1;
v28 = a2;
v31 = (const char *)&LC0;
v30 = "column";
}
else
{
v33 = a2;
v28 = a1;
v31 = "column";
v30 = (const char *)&LC0;
}
if ( amd_printf )
{
amd_printf("%s-form matrix, n_row %d n_col %d, ", v30, (unsigned int)a1, (unsigned int)a2);
if ( a1 <= 0 || a2 <= 0 )
{
if ( amd_printf )
amd_printf("ERROR: n_row <= 0 or n_col <= 0\n\n");
return 4294967290LL;
}
if ( !a3 )
{
if ( amd_printf )
amd_printf("ERROR: Ap missing\n\n");
return 4294967291LL;
}
}
else
{
if ( a2 <= 0 || a1 <= 0 )
return 4294967290LL;
if ( !a3 )
return 4294967291LL;
}
v10 = a3[v28];
if ( amd_printf )
{
amd_printf("nz = %d. ", (unsigned int)v10);
if ( v10 < 0 )
{
if ( amd_printf )
amd_printf("ERROR: number of entries < 0\n\n");
return 4294967288LL;
}
v11 = (unsigned int)*a3;
if ( (_DWORD)v11 )
{
if ( amd_printf )
amd_printf("ERROR: Ap [%d] = %d must be %d\n\n", 0LL, v11, 0LL);
return 4294967288LL;
}
}
else
{
if ( v10 < 0 )
return 4294967288LL;
if ( *a3 )
return 4294967288LL;
}
if ( a4 )
{
if ( v8 <= 3 )
{
if ( v28 <= 0 )
goto LABEL_19;
}
else
{
if ( amd_printf )
amd_printf("\n");
if ( v28 <= 0 )
{
LABEL_17:
result = 0LL;
if ( !amd_printf )
return result;
amd_printf(" %s-form matrix ", v30);
goto LABEL_19;
}
}
for ( i = 0LL; i != v28; ++i )
{
v19 = (unsigned int)i;
v20 = a3[i];
if ( v20 < 0 )
{
result = 4294967288LL;
if ( amd_printf )
{
amd_printf("ERROR: Ap [%d] < 0\n\n", v19);
result = 4294967288LL;
}
return result;
}
if ( v20 > v10 )
{
result = 4294967288LL;
if ( amd_printf )
{
amd_printf("ERROR: Ap [%d] > size of Ai\n\n", v19);
result = 4294967288LL;
}
return result;
}
}
v21 = 0LL;
while ( 1 )
{
v22 = (unsigned int)v21;
if ( a3[v21 + 1] - a3[v21] < 0 )
break;
if ( ++v21 == v28 )
{
v17 = v8;
v35 = 0LL;
v37 = v8;
v36 = a3;
while ( 1 )
{
if ( (int)v35 <= 9 )
v17 = v37;
v23 = v36[v35];
v24 = v36[v35 + 1];
v34 = v24 - v23;
if ( v17 > 3 && amd_printf )
amd_printf(
"\n %s %d: start: %d end: %d entries: %d\n",
v30,
(unsigned int)v35,
v23,
(unsigned int)(v24 - 1),
v36[v35 + 1] - v23);
if ( (int)v23 < v24 )
break;
LABEL_72:
if ( v28 > 10 && (_DWORD)v35 == 9 && v17 == 4 )
{
if ( amd_printf )
amd_printf("\n ...\n");
v17 = 3;
}
else if ( v28 <= (int)v35 + 1 )
{
if ( v37 > 3 )
goto LABEL_17;
LABEL_19:
if ( amd_printf )
amd_printf("OK\n\n");
return 0LL;
}
++v35;
}
v29 = v24 - 1 - v23;
v25 = a4 + 4LL * (int)v23;
v32 = a5 + 8LL * (int)v23;
v13 = 0LL;
v15 = -1;
while ( 2 )
{
v14 = v15;
v15 = *(_DWORD *)(v25 + 4 * v13);
v12 = 0;
if ( v17 > 3 )
{
if ( amd_printf )
{
amd_printf("\t%s %d ", v31, (unsigned int)v15);
if ( a5 )
{
if ( amd_printf )
amd_printf(":");
LABEL_59:
v16 = *(double *)(v32 + 8 * v13);
if ( v16 == 0.0 )
{
v12 = 1;
if ( amd_printf )
{
amd_printf(" (0)");
v12 = 1;
}
}
else
{
v12 = 1;
if ( amd_printf )
{
amd_printf(" (%g)", v16);
v12 = 1;
}
}
}
else
{
v12 = 1;
}
}
else
{
if ( a5 )
goto LABEL_59;
v12 = 1;
}
}
if ( v15 < 0 || v33 <= v15 )
{
result = 4294967288LL;
if ( amd_printf )
{
amd_printf(
" ERROR: %s index %d out of range in %s %d\n\n",
v31,
(unsigned int)v15,
v30,
(unsigned int)v35);
result = 4294967288LL;
}
return result;
}
if ( v15 <= v14 )
{
result = 4294967288LL;
if ( amd_printf )
{
amd_printf(
" ERROR: %s index %d out of order (or duplicate) in %s %d\n\n",
v31,
(unsigned int)v15,
v30,
(unsigned int)v35);
result = 4294967288LL;
}
return result;
}
if ( v12 && amd_printf )
amd_printf("\n");
if ( v17 == 4 && v34 > 10 && (_DWORD)v13 == 9 )
{
if ( amd_printf )
amd_printf("\t...\n");
v17 = 3;
}
if ( v13 == v29 )
goto LABEL_72;
++v13;
continue;
}
}
}
result = 4294967288LL;
if ( amd_printf )
{
amd_printf("ERROR: # entries in %s %d is < 0\n\n", v30, v22);
result = 4294967288LL;
}
}
else
{
result = 4294967291LL;
if ( amd_printf )
{
amd_printf("ERROR: Ai missing\n\n");
result = 4294967291LL;
}
}
}
return result;
}

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

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

variable_types:
Ap
int []

variable_types:
Ai
int []

variable_types:
Ax
double []

variable_types:
Control
double [20]

variable_types: a double

variable_types: prl int

variable_types: i int

variable_types: length int

variable_types: ilast int

variable_types: p int

variable_types: nz int

variable_types: n int


original_code:
double cholmod_norm_dense
(
    cholmod_dense *X,
    int norm,
    cholmod_common *Common
)
{
    double xnorm, s, x, z ;
    double *Xx, *Xz, *W ;
    int nrow, ncol, d, i, j, use_workspace, xtype ;
    { if (Common == ((void *)0)) { return ((-1)) ; } if (Common->itype != 0 || Common->dtype != 0) { Common->status = (-4) ; return ((-1)) ; } } ;
    { if ((X) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../MatrixOps/cholmod_norm.c", 86, "argument missing", Common) ; } return ((-1)) ; } } ;
    { if ((X)->xtype < (1) || (X)->xtype > (3) || ((X)->xtype != 0 && ((X)->x) == ((void *)0)) || ((X)->xtype == 3 && ((X)->z) == ((void *)0))) { if (Common->status != (-2)) { cholmod_error ((-4), "../MatrixOps/cholmod_norm.c", 87, "invalid xtype", Common) ; } return ((-1)) ; } } ;
    Common->status = 0 ;
    ncol = X->ncol ;
    if (norm < 0 || norm > 2 || (norm == 2 && ncol > 1))
    {
 cholmod_error ((-4), "../MatrixOps/cholmod_norm.c", 92, "invalid norm", Common) ;
 return ((-1)) ;
    }
    nrow = X->nrow ;
    d = X->d ;
    Xx = X->x ;
    Xz = X->z ;
    xtype = X->xtype ;
    W = ((void *)0) ;
    use_workspace = (norm == 0 && ncol > 4) ;
    if (use_workspace)
    {
 cholmod_allocate_work (0, 0, nrow, Common) ;
 W = Common->Xwork ;
 if (Common->status < 0)
 {
     use_workspace = 0 ;
 }
    }
    xnorm = 0 ;
    if (use_workspace)
    {
 ;
 for (j = 0 ; j < ncol ; j++)
 {
     for (i = 0 ; i < nrow ; i++)
     {
  W [i] += abs_value (xtype, Xx, Xz, i+j*d, Common) ;
     }
 }
 for (i = 0 ; i < nrow ; i++)
 {
     s = W [i] ;
     if ((((s) != (s)) || s > xnorm) && !((xnorm) != (xnorm)))
     {
  xnorm = s ;
     }
     W [i] = 0 ;
 }
    }
    else if (norm == 0)
    {
 for (i = 0 ; i < nrow ; i++)
 {
     s = 0 ;
     for (j = 0 ; j < ncol ; j++)
     {
  s += abs_value (xtype, Xx, Xz, i+j*d, Common) ;
     }
     if ((((s) != (s)) || s > xnorm) && !((xnorm) != (xnorm)))
     {
  xnorm = s ;
     }
 }
    }
    else if (norm == 1)
    {
 for (j = 0 ; j < ncol ; j++)
 {
     s = 0 ;
     for (i = 0 ; i < nrow ; i++)
     {
  s += abs_value (xtype, Xx, Xz, i+j*d, Common) ;
     }
     if ((((s) != (s)) || s > xnorm) && !((xnorm) != (xnorm)))
     {
  xnorm = s ;
     }
 }
    }
    else
    {
 switch (xtype)
 {
     case 1:
  for (i = 0 ; i < nrow ; i++)
  {
      x = Xx [i] ;
      xnorm += x*x ;
  }
  break ;
     case 2:
  for (i = 0 ; i < nrow ; i++)
  {
      x = Xx [2*i ] ;
      z = Xx [2*i+1] ;
      xnorm += x*x + z*z ;
  }
  break ;
     case 3:
  for (i = 0 ; i < nrow ; i++)
  {
      x = Xx [i] ;
      z = Xz [i] ;
      xnorm += x*x + z*z ;
  }
  break ;
 }
 xnorm = sqrt (xnorm) ;
    }
    return (xnorm) ;
}

canonical_original_code:
double cholmod_norm_dense(struct cholmod_dense_struct *X, int norm, struct cholmod_common_struct *Common)
{
    double xnorm; double s; double x; double z;
    double *Xx; double *Xz; double *W;
    int nrow; int ncol; int d; int i; int j; int use_workspace; int xtype;
    { if (Common == ((void *)0)) { return ((-1)) ; } if (Common->itype != 0 || Common->dtype != 0) { Common->status = (-4) ; return ((-1)) ; } } ;
    { if ((X) == ((void *)0)) { if (Common->status != (-2)) { cholmod_error ((-4), "../MatrixOps/cholmod_norm.c", 86, "argument missing", Common) ; } return ((-1)) ; } } ;
    { if ((X)->xtype < (1) || (X)->xtype > (3) || ((X)->xtype != 0 && ((X)->x) == ((void *)0)) || ((X)->xtype == 3 && ((X)->z) == ((void *)0))) { if (Common->status != (-2)) { cholmod_error ((-4), "../MatrixOps/cholmod_norm.c", 87, "invalid xtype", Common) ; } return ((-1)) ; } } ;
    Common->status = 0 ;
    ncol = X->ncol ;
    if (norm < 0 || norm > 2 || (norm == 2 && ncol > 1))
    {
 cholmod_error ((-4), "../MatrixOps/cholmod_norm.c", 92, "invalid norm", Common) ;
 return ((-1)) ;
    }
    nrow = X->nrow ;
    d = X->d ;
    Xx = X->x ;
    Xz = X->z ;
    xtype = X->xtype ;
    W = ((void *)0) ;
    use_workspace = (norm == 0 && ncol > 4) ;
    if (use_workspace)
    {
 cholmod_allocate_work (0, 0, nrow, Common) ;
 W = Common->Xwork ;
 if (Common->status < 0)
 {
     use_workspace = 0 ;
 }
    }
    xnorm = 0 ;
    if (use_workspace)
    {
 ;
 for (j = 0 ; j < ncol ; j++)
 {
     for (i = 0 ; i < nrow ; i++)
     {
  W [i] += abs_value (xtype, Xx, Xz, i+j*d, Common) ;
     }
 }
 for (i = 0 ; i < nrow ; i++)
 {
     s = W [i] ;
     if ((((s) != (s)) || s > xnorm) && !((xnorm) != (xnorm)))
     {
  xnorm = s ;
     }
     W [i] = 0 ;
 }
    }
    else if (norm == 0)
    {
 for (i = 0 ; i < nrow ; i++)
 {
     s = 0 ;
     for (j = 0 ; j < ncol ; j++)
     {
  s += abs_value (xtype, Xx, Xz, i+j*d, Common) ;
     }
     if ((((s) != (s)) || s > xnorm) && !((xnorm) != (xnorm)))
     {
  xnorm = s ;
     }
 }
    }
    else if (norm == 1)
    {
 for (j = 0 ; j < ncol ; j++)
 {
     s = 0 ;
     for (i = 0 ; i < nrow ; i++)
     {
  s += abs_value (xtype, Xx, Xz, i+j*d, Common) ;
     }
     if ((((s) != (s)) || s > xnorm) && !((xnorm) != (xnorm)))
     {
  xnorm = s ;
     }
 }
    }
    else
    {
 switch (xtype)
 {
     case 1:
  for (i = 0 ; i < nrow ; i++)
  {
      x = Xx [i] ;
      xnorm += x*x ;
  }
  break ;
     case 2:
  for (i = 0 ; i < nrow ; i++)
  {
      x = Xx [2*i ] ;
      z = Xx [2*i+1] ;
      xnorm += x*x + z*z ;
  }
  break ;
     case 3:
  for (i = 0 ; i < nrow ; i++)
  {
      x = Xx [i] ;
      z = Xz [i] ;
      xnorm += x*x + z*z ;
  }
  break ;
 }
 xnorm = sqrt (xnorm) ;
    }
    return (xnorm) ;
}

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

variable_types: norm int

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

variable_types: xnorm double

variable_types: s double

variable_types: x double

variable_types: z double

variable_types:
Xx
double *

variable_types:
Xz
double *

variable_types:
W
double *

variable_types: nrow int

variable_types: ncol int

variable_types: d int

variable_types: j int

variable_types: xtype int

return_type: double

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 abs_value(int a1, __int64 a2, __int64 a3, int a4, __int64 a5)
{
__int64 result; // rax

if ( a1 == 2 )
return (*(__int64 (__fastcall **)(double, double))(a5 + 1920))(
*(double *)(a2 + 16LL * a4),
*(double *)(a2 + 16LL * a4 + 8));
if ( a1 > 2 && a1 == 3 )
result = (*(__int64 (__fastcall **)(double, double))(a5 + 1920))(
*(double *)(a2 + 8LL * a4),
*(double *)(a3 + 8LL * a4));
return result;
}

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

if ( a1 == 2 )
return (*(__int64 (__fastcall **)(double, double))(a5 + 1920))(
*(double *)(a2 + 16LL * a4),
*(double *)(a2 + 16LL * a4 + 8));
if ( a1 > 2 && a1 == 3 )
result = (*(__int64 (__fastcall **)(double, double))(a5 + 1920))(
*(double *)(a2 + 8LL * a4),
*(double *)(a3 + 8LL * a4));
return result;
}

original_code:
static double abs_value
(
    int xtype,
    double *Ax,
    double *Az,
    int p,
    cholmod_common *Common
)
{
    double s = 0 ;
    switch (xtype)
    {
 case 0:
     s = 1 ;
     break ;
 case 1:
     s = fabs (Ax [p]) ;
     break ;
 case 2:
     s = Common->hypotenuse (Ax [2*p], Ax [2*p+1]) ;
     break ;
 case 3:
     s = Common->hypotenuse (Ax [p], Az [p]) ;
     break ;
    }
    return (s) ;
}

canonical_original_code:
static double abs_value(int xtype, double *Ax, double *Az, int p, struct cholmod_common_struct *Common)
{
    double s = 0;
    switch (xtype)
    {
 case 0:
     s = 1 ;
     break ;
 case 1:
     s = fabs (Ax [p]) ;
     break ;
 case 2:
     s = Common->hypotenuse (Ax [2*p], Ax [2*p+1]) ;
     break ;
 case 3:
     s = Common->hypotenuse (Ax [p], Az [p]) ;
     break ;
    }
    return (s) ;
}

variable_types:
Ax
double *

variable_types:
Az
double *

variable_types: p int

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


decompiled_code:
void __fastcall umfpack_di_report_status(double *a1, unsigned int a2)
{
int v2; // ebp

if ( a1 )
{
v2 = (int)*a1;
if ( v2 <= 0 )
return;
}
else
{
v2 = 1;
}
if ( a2 || v2 > 1 )
{
if ( amd_printf )
{
amd_printf("\n");
if ( v2 > 3 )
{
if ( amd_printf )
amd_printf("%s\n");
}
}
if ( v2 > 5 )
{
if ( !amd_printf )
goto LABEL_26;
amd_printf("%s");
if ( !amd_printf )
goto LABEL_26;
amd_printf("%s");
if ( !amd_printf )
goto LABEL_26;
amd_printf("%s");
}
if ( amd_printf )
{
amd_printf("UMFPACK V%d.%d.%d (%s): ", 5LL, 6LL, 1LL, "Jun 20, 2012");
if ( a2 == -911 )
{
if ( !amd_printf )
return;
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_19:
if ( amd_printf )
amd_printf("\n");
return;
}
LABEL_24:
if ( !amd_printf )
return;
amd_printf("ERROR: Unrecognized error code: %d\n", a2);
goto LABEL_19;
}
LABEL_26:
if ( a2 == -911 )
return;
goto LABEL_24;
}
}

canonical_decompiled_code:
void __fastcall func0(double *a1, unsigned int a2)
{
int v2; // ebp

if ( a1 )
{
v2 = (int)*a1;
if ( v2 <= 0 )
return;
}
else
{
v2 = 1;
}
if ( a2 || v2 > 1 )
{
if ( amd_printf )
{
amd_printf("\n");
if ( v2 > 3 )
{
if ( amd_printf )
amd_printf("%s\n");
}
}
if ( v2 > 5 )
{
if ( !amd_printf )
goto LABEL_26;
amd_printf("%s");
if ( !amd_printf )
goto LABEL_26;
amd_printf("%s");
if ( !amd_printf )
goto LABEL_26;
amd_printf("%s");
}
if ( amd_printf )
{
amd_printf("UMFPACK V%d.%d.%d (%s): ", 5LL, 6LL, 1LL, "Jun 20, 2012");
if ( a2 == -911 )
{
if ( !amd_printf )
return;
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_19:
if ( amd_printf )
amd_printf("\n");
return;
}
LABEL_24:
if ( !amd_printf )
return;
amd_printf("ERROR: Unrecognized error code: %d\n", a2);
goto LABEL_19;
}
LABEL_26:
if ( a2 == -911 )
return;
goto LABEL_24;
}
}

original_code:
void umfpack_di_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_di_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

return_type: void


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

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

variable_types: struct NumericType { double flops; 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: nrows int

variable_types: ncols int

variable_types:
Rows
int **

variable_types:
Cols
int **

variable_types:
C
struct DoubleComplex **

variable_types:
size
int *

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

variable_types:
ep
struct Element { int cdeg; } *

variable_types: i int

return_type: int

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


original_code:
int umfzi_mem_alloc_tail_block
(
    NumericType *Numeric,
    int nunits
)
{
    int bigsize, usage ;
    Unit *p, *pnext, *pbig ;
    ;
    ;
    bigsize = 0 ;
    pbig = (Unit *) ((void *)0) ;
    ;
    if (Numeric->ibig != (-1))
    {
 ;
 ;
 pbig = Numeric->Memory + Numeric->ibig ;
 bigsize = -pbig->header.size ;
 ;
 ;
    }
    if (pbig && bigsize >= nunits)
    {
 p = pbig ;
 pnext = p + 1 + bigsize ;
 ;
 ;
 ;
 bigsize -= nunits + 1 ;
 if (bigsize < 4)
 {
     p->header.size = -p->header.size ;
     ;
     Numeric->ibig = (-1) ;
 }
 else
 {
     p->header.size = nunits ;
     Numeric->ibig += nunits + 1 ;
     pbig = Numeric->Memory + Numeric->ibig ;
     pbig->header.size = -bigsize ;
     pbig->header.prevsize = nunits ;
     pnext->header.prevsize = bigsize ;
     ;
 }
    }
    else
    {
 pnext = Numeric->Memory + Numeric->itail ;
 ;
 if ((nunits + 1) > (Numeric->itail - Numeric->ihead))
 {
     ;
     return (0) ;
 }
 Numeric->itail -= (nunits + 1) ;
 p = Numeric->Memory + Numeric->itail ;
 p->header.size = nunits ;
 p->header.prevsize = 0 ;
 pnext->header.prevsize = nunits ;
 ;
    }
    Numeric->tail_usage += p->header.size + 1 ;
    usage = Numeric->ihead + Numeric->tail_usage ;
    Numeric->max_usage = (((Numeric->max_usage) > (usage)) ? (Numeric->max_usage) : (usage)) ;
    return ((p - Numeric->Memory) + 1) ;
}

canonical_original_code:
int umfzi_mem_alloc_tail_block(struct NumericType *Numeric, int nunits)
{
    int bigsize; int usage;
    union Unit_union *p; union Unit_union *pnext; union Unit_union *pbig;
    ;
    ;
    bigsize = 0 ;
    pbig = (union Unit_union *) ((void *)0) ;
    ;
    if (Numeric->ibig != (-1))
    {
 ;
 ;
 pbig = Numeric->Memory + Numeric->ibig ;
 bigsize = -pbig->header.size ;
 ;
 ;
    }
    if (pbig && bigsize >= nunits)
    {
 p = pbig ;
 pnext = p + 1 + bigsize ;
 ;
 ;
 ;
 bigsize -= nunits + 1 ;
 if (bigsize < 4)
 {
     p->header.size = -p->header.size ;
     ;
     Numeric->ibig = (-1) ;
 }
 else
 {
     p->header.size = nunits ;
     Numeric->ibig += nunits + 1 ;
     pbig = Numeric->Memory + Numeric->ibig ;
     pbig->header.size = -bigsize ;
     pbig->header.prevsize = nunits ;
     pnext->header.prevsize = bigsize ;
     ;
 }
    }
    else
    {
 pnext = Numeric->Memory + Numeric->itail ;
 ;
 if ((nunits + 1) > (Numeric->itail - Numeric->ihead))
 {
     ;
     return (0) ;
 }
 Numeric->itail -= (nunits + 1) ;
 p = Numeric->Memory + Numeric->itail ;
 p->header.size = nunits ;
 p->header.prevsize = 0 ;
 pnext->header.prevsize = nunits ;
 ;
    }
    Numeric->tail_usage += p->header.size + 1 ;
    usage = Numeric->ihead + Numeric->tail_usage ;
    Numeric->max_usage = (((Numeric->max_usage) > (usage)) ? (Numeric->max_usage) : (usage)) ;
    return ((p - Numeric->Memory) + 1) ;
}

variable_types: nunits int

variable_types: bigsize int

variable_types: usage int

variable_types: union Unit_union { struct { int size; } header; double xxxxxx; } *

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


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

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

variable_types:
Mx
double *

variable_types:
Ex
double *

variable_types:
NumericHandle
void *

variable_types:
one
double [2]

variable_types:
D
double *

variable_types:
Info
double *

variable_types:
Rs
double *

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

variable_types: n int

variable_types: itmp int

variable_types: npiv int

variable_types:
Wi
int *

variable_types:
Rperm
int *

variable_types:
Cperm
int *

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


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

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


decompiled_code:
__int64 __fastcall umfpack_zi_col_to_triplet(int a1, unsigned int *a2, __int64 a3)
{
unsigned int v5; // ebp
int v6; // er11
__int64 v7; // r9
__int64 v8; // rsi
__int64 v9; // rbx
int v10; // edi
int v11; // edx
_DWORD *v12; // rax
_DWORD *v13; // rdx

if ( !a2 || !a3 )
return (unsigned int)-5;
if ( a1 <= 0 )
return (unsigned int)-6;
v5 = *a2;
if ( *a2 )
return (unsigned int)-8;
v6 = a2[a1];
if ( v6 < 0 )
return (unsigned int)-8;
v7 = (unsigned int)a1;
v8 = 0LL;
v9 = a3 + 4;
while ( 1 )
{
v10 = a2[v8];
v11 = a2[v8 + 1];
if ( v11 - v10 < 0 || v6 < v11 )
break;
if ( v10 < v11 )
{
v12 = (_DWORD *)(a3 + 4LL * v10);
v13 = (_DWORD *)(v9 + 4 * (v10 + (unsigned __int64)(unsigned int)(v11 - 1 - v10)));
do
*v12++ = v8;
while ( v12 != v13 );
}
if ( ++v8 == v7 )
return v5;
}
return (unsigned int)-8;
}

canonical_decompiled_code:
__int64 __fastcall func0(int a1, unsigned int *a2, __int64 a3)
{
unsigned int v5; // ebp
int v6; // er11
__int64 v7; // r9
__int64 v8; // rsi
__int64 v9; // rbx
int v10; // edi
int v11; // edx
_DWORD *v12; // rax
_DWORD *v13; // rdx

if ( !a2 || !a3 )
return (unsigned int)-5;
if ( a1 <= 0 )
return (unsigned int)-6;
v5 = *a2;
if ( *a2 )
return (unsigned int)-8;
v6 = a2[a1];
if ( v6 < 0 )
return (unsigned int)-8;
v7 = (unsigned int)a1;
v8 = 0LL;
v9 = a3 + 4;
while ( 1 )
{
v10 = a2[v8];
v11 = a2[v8 + 1];
if ( v11 - v10 < 0 || v6 < v11 )
break;
if ( v10 < v11 )
{
v12 = (_DWORD *)(a3 + 4LL * v10);
v13 = (_DWORD *)(v9 + 4 * (v10 + (unsigned __int64)(unsigned int)(v11 - 1 - v10)));
do
*v12++ = v8;
while ( v12 != v13 );
}
if ( ++v8 == v7 )
return v5;
}
return (unsigned int)-8;
}

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:
void __fastcall umfpack_dl_report_status(double *a1, __int64 a2)
{
__int64 v2; // rbp

if ( a1 )
{
v2 = (unsigned int)(int)*a1;
if ( !(int)*a1 )
return;
}
else
{
v2 = 1LL;
}
if ( a2 || v2 > 1 )
{
if ( amd_printf )
{
amd_printf("\n");
if ( v2 > 3 )
{
if ( amd_printf )
amd_printf("%s\n");
}
}
if ( v2 > 5 )
{
if ( !amd_printf )
goto LABEL_26;
amd_printf("%s");
if ( !amd_printf )
goto LABEL_26;
amd_printf("%s");
if ( !amd_printf )
goto LABEL_26;
amd_printf("%s");
}
if ( amd_printf )
{
amd_printf("UMFPACK V%d.%d.%d (%s): ", 5LL, 6LL, 1LL, "Jun 20, 2012");
if ( a2 == -911 )
{
if ( !amd_printf )
return;
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_19:
if ( amd_printf )
amd_printf("\n");
return;
}
LABEL_24:
if ( !amd_printf )
return;
amd_printf("ERROR: Unrecognized error code: %ld\n", a2);
goto LABEL_19;
}
LABEL_26:
if ( a2 == -911 )
return;
goto LABEL_24;
}
}

canonical_decompiled_code:
void __fastcall func0(double *a1, __int64 a2)
{
__int64 v2; // rbp

if ( a1 )
{
v2 = (unsigned int)(int)*a1;
if ( !(int)*a1 )
return;
}
else
{
v2 = 1LL;
}
if ( a2 || v2 > 1 )
{
if ( amd_printf )
{
amd_printf("\n");
if ( v2 > 3 )
{
if ( amd_printf )
amd_printf("%s\n");
}
}
if ( v2 > 5 )
{
if ( !amd_printf )
goto LABEL_26;
amd_printf("%s");
if ( !amd_printf )
goto LABEL_26;
amd_printf("%s");
if ( !amd_printf )
goto LABEL_26;
amd_printf("%s");
}
if ( amd_printf )
{
amd_printf("UMFPACK V%d.%d.%d (%s): ", 5LL, 6LL, 1LL, "Jun 20, 2012");
if ( a2 == -911 )
{
if ( !amd_printf )
return;
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_19:
if ( amd_printf )
amd_printf("\n");
return;
}
LABEL_24:
if ( !amd_printf )
return;
amd_printf("ERROR: Unrecognized error code: %ld\n", a2);
goto LABEL_19;
}
LABEL_26:
if ( a2 == -911 )
return;
goto LABEL_24;
}
}

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


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


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]


variable_types: n int

variable_types: pivot double

variable_types:
X
double []

variable_types: x double

variable_types: s double

variable_types: i int


variable_types:
Ap
int []

variable_types:
Rp
int []

variable_types:
Ri
int []

variable_types:
W
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: k int

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 *


decompiled_code:
void __fastcall umfpack_zi_report_status(double *a1, unsigned int a2)
{
int v2; // ebp

if ( a1 )
{
v2 = (int)*a1;
if ( v2 <= 0 )
return;
}
else
{
v2 = 1;
}
if ( a2 || v2 > 1 )
{
if ( amd_printf )
{
amd_printf("\n");
if ( v2 > 3 )
{
if ( amd_printf )
amd_printf("%s\n");
}
}
if ( v2 > 5 )
{
if ( !amd_printf )
goto LABEL_26;
amd_printf("%s");
if ( !amd_printf )
goto LABEL_26;
amd_printf("%s");
if ( !amd_printf )
goto LABEL_26;
amd_printf("%s");
}
if ( amd_printf )
{
amd_printf("UMFPACK V%d.%d.%d (%s): ", 5LL, 6LL, 1LL, "Jun 20, 2012");
if ( a2 == -911 )
{
if ( !amd_printf )
return;
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_19:
if ( amd_printf )
amd_printf("\n");
return;
}
LABEL_24:
if ( !amd_printf )
return;
amd_printf("ERROR: Unrecognized error code: %d\n", a2);
goto LABEL_19;
}
LABEL_26:
if ( a2 == -911 )
return;
goto LABEL_24;
}
}

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