main.c seems to work,
uncommented @uleon 's decodeVariant code from basictypes.c