I wonder how much of the original source was assembler and this is trying to turn it into the C code that it never was.