clp = *prev;
compresslist(){    cltype	*clp;    cltype	**prev;    arctype	**arcpp;    arctype	**endlist;    arctype	*arcp;    arctype	*maxarcp;    arctype	*maxexitarcp;    arctype	*maxwithparentarcp;    arctype	*maxnoparentarcp;    int		maxexitcnt;    int		maxwithparentcnt;    int		maxnoparentcnt;#   ifdef DEBUG        char	*type;#   endif    maxexitcnt = 0;    maxwithparentcnt = 0;    maxnoparentcnt = 0;    for ( endlist = &archead , arcp = archead ; arcp ; ) {	if ( arcp -> arc_cyclecnt == 0 ) {	    arcp -> arc_flags &= ~ONLIST;	    *endlist = arcp -> arc_next;	    arcp -> arc_next = 0;	    arcp = *endlist;	    continue;	}	if ( arcp -> arc_childp -> flags & HASCYCLEXIT ) {	    if ( arcp -> arc_cyclecnt > maxexitcnt ||		( arcp -> arc_cyclecnt == maxexitcnt &&		arcp -> arc_cyclecnt < maxexitarcp -> arc_count ) ) {		maxexitcnt = arcp -> arc_cyclecnt;		maxexitarcp = arcp;	    }	} else if ( arcp -> arc_childp -> parentcnt > 1 ) {	    if ( arcp -> arc_cyclecnt > maxwithparentcnt ||		( arcp -> arc_cyclecnt == maxwithparentcnt &&		arcp -> arc_cyclecnt < maxwithparentarcp -> arc_count ) ) {		maxwithparentcnt = arcp -> arc_cyclecnt;		maxwithparentarcp = arcp;	    }	} else {	    if ( arcp -> arc_cyclecnt > maxnoparentcnt ||		( arcp -> arc_cyclecnt == maxnoparentcnt &&		arcp -> arc_cyclecnt < maxnoparentarcp -> arc_count ) ) {		maxnoparentcnt = arcp -> arc_cyclecnt;		maxnoparentarcp = arcp;	    }	}	endlist = &arcp -> arc_next;	arcp = arcp -> arc_next;    }    if ( maxexitcnt > 0 ) {	/*	 *	first choice is edge leading to node with out-of-cycle parent	 */	maxarcp = maxexitarcp;#	ifdef DEBUG	    type = "exit";#	endif /* DEBUG */    } else if ( maxwithparentcnt > 0 ) {	/*	 *	second choice is edge leading to node with at least one	 *	other in-cycle parent	 */	maxarcp = maxwithparentarcp;#	ifdef DEBUG	    type = "internal";#	endif /* DEBUG */    } else {	/*	 *	last choice is edge leading to node with only this arc as	 *	a parent (as it will now be orphaned)	 */	maxarcp = maxnoparentarcp;#	ifdef DEBUG	    type = "orphan";#	endif /* DEBUG */    }    maxarcp -> arc_flags |= DEADARC;    maxarcp -> arc_childp -> parentcnt -= 1;    maxarcp -> arc_childp -> npropcall -= maxarcp -> arc_count;#   ifdef DEBUG	if ( debug & BREAKCYCLE ) {	    printf("[compresslist] delete %s arc: "		"%s (%ld) -> %s from %d cycle(s)\n", type,		maxarcp -> arc_parentp -> name, maxarcp -> arc_count,		maxarcp -> arc_childp -> name, maxarcp -> arc_cyclecnt);	}#   endif /* DEBUG */    printf("\t%s to %s with %ld calls\n", maxarcp->arc_parentp -> name,	maxarcp->arc_childp->name, maxarcp->arc_count);    prev = &cyclehead;    for ( clp = cyclehead ; clp ; ) {	endlist = &clp -> list[ clp -> size ];	for ( arcpp = clp -> list ; arcpp < endlist ; arcpp++ )	    if ( (*arcpp) -> arc_flags & DEADARC )		break;	if ( arcpp == endlist ) {	    prev = &clp -> next;	    clp = clp -> next;	    continue;	}	for ( arcpp = clp -> list ; arcpp < endlist ; arcpp++ )	    (*arcpp) -> arc_cyclecnt--;	cyclecnt--;	*prev = clp -> next;	clp = clp -> next;	free( clp );    }}