#include "loopCount.hpp" long run1Count(int n, int * ACt, int * BCt, int * SCt, int * MCt, int * PCt) { *ACt = *BCt = *SCt = *MCt = *PCt = 0; int i; long sum = 0; ++(*ACt); /* line 1 */ for (i=0, ++(*ACt) ; ((++(*BCt))&&(++(*MCt))&&(i < 6*n)) ; i+=2,++(*ACt),++(*SCt)) { /* line 2 */ sum++; ++(*PCt); /* line 3 */ } return sum; }