As was already stated, your outer loop is looking for a specific value of x (64) as the terminating condition, however you are sometimes incrementing x by 2 or more (depending on the number of iterations of the inner loop).

I would suggest using two loop counters, perhaps x and y (I would use i,j for this). Test for x = 64, but in your inner loop increment y instead and use y instead of x to do whatever the hell that does (index an array?)

Simply changing the terminating condition from x > 64 to x >= 64 will likely not give the desired result, if of course you actually intend the outer loop to iterate 64 times.