found out that the compiler doesn't like large functions with loops in them.  moving the loops outside solves some problems -- as manually unrolling loops does.