@Override
    public DecodedInstruction decode(int opcodeUnit, CodeInput in) throws EOFException {
      int opcode = byte0(opcodeUnit);
      if (opcode != Opcodes.INVOKE_POLYMORPHIC) {
        // 45cc isn't currently used for anything other than invoke-polymorphic.
        // If that changes, add a more general DecodedInstruction for this format.
        throw new UnsupportedOperationException(String.valueOf(opcode));
      }
      int g = nibble2(opcodeUnit);
      int registerCount = nibble3(opcodeUnit);
      int methodIndex = in.read();
      int cdef = in.read();
      int c = nibble0(cdef);
      int d = nibble1(cdef);
      int e = nibble2(cdef);
      int f = nibble3(cdef);
      int protoIndex = in.read();
      IndexType indexType = OpcodeInfo.getIndexType(opcode);

      if (registerCount < 1 || registerCount > 5) {
        throw new DexException("bogus registerCount: " + Hex.uNibble(registerCount));
      }
      int[] registers = {c, d, e, f, g};
      registers = Arrays.copyOfRange(registers, 0, registerCount);

      return new InvokePolymorphicDecodedInstruction(
          this, opcode, methodIndex, indexType, protoIndex, registers);
    }
Representation of an instruction format, which knows how to decode into and encode from instances
of {@link DecodedInstruction}.
android/android_framework/dex-maker/src/main/java/com/android/dx/io/instructions/InstructionCodec.java