private boolean checkForEmptyRange(int address, RegisterSpec endedLocal) {
      int at = result.size() - 1;
      Entry entry;

      // Look for a previous entry at the same address.
      for (
      /*at*/ ; at >= 0; at--) {
        entry = result.get(at);

        if (entry == null) {
          continue;
        }

        if (entry.getAddress() != address) {
          // We didn't find any match at the same address.
          return false;
        }

        if (entry.matches(endedLocal)) {
          break;
        }
      }

      /*
       * In fact, we found that the endedLocal had started at the
       * same address, so do all the requisite cleanup.
       */

      regs.remove(endedLocal);
      result.set(at, null);
      nullResultCount++;

      int regNum = endedLocal.getReg();
      boolean found = false;
      entry = null;

      // Now look back further to update where the register ended.
      for (at--; at >= 0; at--) {
        entry = result.get(at);

        if (entry == null) {
          continue;
        }

        if (entry.getRegisterSpec().getReg() == regNum) {
          found = true;
          break;
        }
      }

      if (found) {
        // We found an end for the same register.
        endIndices[regNum] = at;

        if (entry.getAddress() == address) {
          /*
           * It's still the same address, so update the
           * disposition.
           */
          result.set(at, entry.withDisposition(Disposition.END_SIMPLY));
        }
      }

      return true;
    }
Helper for {@link #endLocal}, which handles the cases where and end local is issued at the
same address as a start local for the same register. If this case is found, then this method
will remove the start (as the local was never actually active), update the {@link
#endIndices} to be accurate, and if needed update the newly-active end to reflect an altered
disposition.

@param address {@code >= 0;} the address
@param endedLocal {@code non-null;} spec representing the local being ended
@return {@code true} iff this method found the case in question and adjusted things
    accordingly
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/code/LocalList.java