Line
|
checksum += ( unsigned long ) ( statemate_bitlist[ index ] << index ); |
should read
checksum += ( unsigned long ) ( statemate_bitlist[ index ]) << index ;
as left shifting a signed value or a char by 63 bits are ub (in clang since at least release 15), see