Translate some loops out of FORTRAN.