private Subroutine subroutineFromRetBlock(int label) {
    for (int i = subroutines.length - 1; i >= 0; i--) {
      if (subroutines[i] != null) {
        Subroutine subroutine = subroutines[i];

        if (subroutine.retBlocks.get(label)) {
          return subroutine;
        }
      }
    }

    return null;
  }
Finds a {@code Subroutine} that is returned from by a {@code ret} in a given block.

@param label A block that originally contained a {@code ret} instruction
@return {@code null-ok;} found subroutine or {@code null} if none was found
android/android_framework/dex-maker/src/main/java/com/android/dx/cf/code/Ropper.java