public static int[] cs_counts(Dcs A, int[] parent, int[] post, boolean ata) {
int i, j, k, n, m, J, s, p, q, ATp[], ATi[], maxfirst[], prevleaf[], ancestor[], colcount[], w[], first[], delta[];
int[] head = null, next = null;
int[] jleaf = new int[1];
int head_offset = 0, next_offset = 0;
Dcs AT;
if (!Dcs_util.CS_CSC(A) || parent == null || post == null)
return (null); /* check inputs */
m = A.m;
n = A.n;
s = 4 * n + (ata ? (n + m + 1) : 0);