Convert QUICKFLI ASM to C

Converted the useful ASM routines to C for portability.