public void setIncomingBranch(BasicBlock b) {
        assert (currentBranch >= 1 && currentBranch <= 2);
        if(currentBranch == 1) {
            assert (incomingBranch1 == null); // only set once
            incomingBranch1 = b;
        } else if (currentBranch == 2) {
            assert (incomingBranch2 == null);
            incomingBranch2 = b;
        }
    }