I am trying to implement a datapath using sequential logic . Trying to implement this C program
There is a simple combinatorial solution (no registers), but you may need to work through a few examples to see it.

Here's a hint: The final value of y = z &amp; ~1

The final value of x is more complicated, but similar.

Here's a simpler example that demonstrates the general principle. What is the final value of b?

a = 5;
b = 0;
while (a) {
  ++b;
  --a;
}