a port of supergenpass.com in plain c