Construct a loop program for equality I want to construct a loop-computable program for this construction:

IF x1 = c THEN P ELSE P'

I know how to transform if else construction in loop , but I can't understand how to check the equality.I have idea for x1 >= c , but how can I check if the both numbers are equal ?
Do you have idea how to check $x_1 \leq c$ as well? Then just check $(x_1 \leq c) \wedge (x_1 \geq c)$ which implies $x_1 = c$.