GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
/****************************************************************************1**2*A down_class.c ANUPQ source Eamonn O'Brien3**4*Y Copyright 1995-2001, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany5*Y Copyright 1995-2001, School of Mathematical Sciences, ANU, Australia6**7*/89#include "pq_defs.h"10#include "pcp_vars.h"1112/* remove any class pcp->cc + 1 part on the value represented by y[ptr] */1314void down_class(int ptr, struct pcp_vars *pcp)15{16register int *y = y_address;1718register int p1;19register int p2;20register int count;21register int count1;22register int lastg = pcp->lastg;23#include "access.h"2425p1 = ptr;26if (y[p1] >= 0) {27if (y[p1] > lastg)28y[p1] = 0;29return;30}3132p2 = -y[p1];33count = y[p2 + 1];34count1 = count;35while (FIELD2(y[p2 + count1 + 1]) > lastg) {36if (--count1 <= 0) {37y[p2] = y[p1] = 0;38return;39}40}4142if (count1 >= count)43return;4445if (count == count1 + 1)46/* only 1 generator of class pcp->cc + 1 found; mark47it with a -1 header block */48y[p2 + count1 + 2] = -1;49else {50y[p2 + count1 + 2] = 0;51y[p2 + count1 + 3] = count - count1 - 2;52}53y[p2 + 1] = count1;54}555657