if i were to do it i'll probably add an extra field inside a phantom register called
lastBoolTransformation: string
which is set (with the code snippet before it was converted into a bool) whenever a number is cast into a bool via an operation
and then i'd add an extra parameter to getPop called shouldReturnBool and inside the function, if:
1) a phantom register is on the stack AND
2) lastBoolTransformation is set, return lastBoolTransformation
3) otherwrise, return (${phantomReg.value}) as normal
and in br_if, use that added parameter in getPop
lastBoolTransformation is guaranteed to be only written once because phantom registers should only ever be assigned to once
(copied from discord)