public BasicBlock preferredSuccessorOf(BasicBlock block) {
    int primarySuccessor = block.getPrimarySuccessor();
    IntList successors = block.getSuccessors();
    int succSize = successors.size();

    switch (succSize) {
      case 0:
        {
          return null;
        }
      case 1:
        {
          return labelToBlock(successors.get(0));
        }
    }

    if (primarySuccessor != -1) {
      return labelToBlock(primarySuccessor);
    } else {
      return labelToBlock(successors.get(0));
    }
  }
Gets the preferred successor for the given block. If the block only has one successor, then
that is the preferred successor. Otherwise, if the block has a primay successor, then that is
the preferred successor. If the block has no successors, then this returns {@code null}.

@param block {@code non-null;} the block in question
@return {@code null-ok;} the preferred successor, if any
android/android_framework/dex-maker/src/main/java/com/android/dx/rop/code/BasicBlockList.java