Performance is a function of design in an optimizing compiler.
A number of years ago I reviewed a book manuscript for a publisher in which the author showed all kinds of programming tricks (like side effect assignments) that he claimed produced faster code.
I compiled his versions on several compilers and showed that none of his tricks produced faster code and most resulted in slower code.
You should always write the clearest code and let the compiler do the optimizing for you.
Assignments within if statements are a bad programming practice. Using = instead of == is a common error. Consistently avoiding side effect assignments makes these errors easier to spot.
Your mistake in translation shows how unclear the original code is.This kind of bad code often springs from assembly language programmers.
Your revised version translates literally into something like this (my pseudo assembly code)
MOV freeblocks, next(R0)
TEST next(R0) ; Test for zero
JUMPNE TEST
While the literal translation of the original is more like:
MOV freeblocks, next(R0)
JUMPNE TEST
Most systems test for zero as part of the move instruction. In theory, the original version is one instruction shorter.
However, any optimizing compiler will be smart enough to remove the redundant TEST.
Coding to outguess the compiler is a waste of time, effort, and clarity.