private Dop findOpcodeForInsn(DalvInsn insn, Dop guess) {
    /*
     * Note: The initial guess might be null, meaning that an
     * earlier call to this method already determined that there
     * was no possible simple opcode fit.
     */

    while (guess != null) {
      if (guess.getFormat().isCompatible(insn)) {
        /*
         * Don't break out for const_string to generate jumbo version
         * when option is enabled.
         */
        if (!dexOptions.forceJumbo || guess.getOpcode() != Opcodes.CONST_STRING) {
          break;
        }
      }

      guess = Dops.getNextOrNull(guess, dexOptions);
    }

    return guess;
  }
Attempts to fit the given instruction into a specific opcode, returning the opcode whose format
that the instruction fits into or {@code null} to indicate that the instruction will need to be
expanded. This fitting process starts with the given opcode as a first "best guess" and then
pessimizes from there if necessary.

@param insn {@code non-null;} the instruction in question
@param guess {@code null-ok;} the current guess as to the best opcode; {@code null} means that
    no simple opcode fits
@return {@code null-ok;} a possibly-different opcode; either a {@code non-null} good fit or
    {@code null} to indicate that no simple opcode fits
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/code/OutputFinisher.java