def pre_branch(self, node):
        v = self._get(node.test)
        v2 = v.getattr(self.em, "__nonzero__", clsonly=True).call(self.em, [])

        assert node.true_block
        assert node.false_block
        self._close_block()

        if str(v2.v) == "0" or node.true_block == node.false_block:
            assert 0, "untested"
            self.em.pl("br label %%block%d" % (node.false_block,))
        elif str(v2.v) == "1":
            assert 0, "untested"
            self.em.pl("br label %%block%d" % (node.true_block,))
        else:
            self.em.pl("br i1 %s, label %%block%d, label %%block%d" % (v2.v, node.true_block, node.false_block))

        return ()