ams-enc.c