private void genReadEnumValueRaw(
            FieldReader fieldReader,
            String classNameType,
            MethodWriterContext mwc,
            int fieldIndex,
            Type fieldType,
            Class fieldClass,
            long fieldFeatures,
            String FIELD_OBJECT_READER
    ) {
        MethodWriter mw = mwc.mw;
        boolean jsonb = mwc.jsonb;
        Object[] enums = fieldClass.getEnumConstants();

        Map<Integer, List<Enum>> name0Map = new TreeMap<>();
        int nameLengthMin = 0, nameLengthMax = 0;
        if (enums != null) {
            for (int i = 0; i < enums.length; i++) {
                Enum e = (Enum) enums[i];
                byte[] enumName = e.name().getBytes(StandardCharsets.UTF_8);
                int nameLength = enumName.length;
                if (i == 0) {
                    nameLengthMin = nameLength;
                    nameLengthMax = nameLength;
                } else {
                    nameLengthMin = Math.min(nameLength, nameLengthMin);
                    nameLengthMax = Math.max(nameLength, nameLengthMax);
                }

                byte[] name0Bytes = new byte[4];
                name0Bytes[0] = '"';
                if (enumName.length == 2) {
                    System.arraycopy(enumName, 0, name0Bytes, 1, 2);
                    name0Bytes[3] = '"';
                } else if (enumName.length >= 3) {
                    System.arraycopy(enumName, 0, name0Bytes, 1, 3);
                }
                int name0 = UNSAFE.getInt(name0Bytes, ARRAY_BYTE_BASE_OFFSET);

                List<Enum> enumList = name0Map.get(name0);
                if (enumList == null) {
                    enumList = new ArrayList<>();
                    name0Map.put(name0, enumList);
                }
                enumList.add(e);
            }
        }

        Label dflt = new Label(), enumEnd = new Label();

        Label notNull_ = new Label();

        mw.aload(THIS);
        mw.getfield(classNameType, FIELD_OBJECT_READER, DESC_OBJECT_READER);
        mw.ifnonnull(notNull_);

        mw.aload(THIS);
        mw.aload(THIS);
        mw.getfield(classNameType, fieldReader(fieldIndex), DESC_FIELD_READER);
        mw.aload(JSON_READER);
        mw.invokevirtual(TYPE_FIELD_READE, "getObjectReader", METHOD_DESC_GET_OBJECT_READER_1);
        mw.putfield(classNameType, FIELD_OBJECT_READER, DESC_OBJECT_READER);

        mw.visitLabel(notNull_);
        mw.aload(THIS);
        mw.getfield(classNameType, FIELD_OBJECT_READER, DESC_OBJECT_READER);
        mw.instanceOf(type(ObjectReaderImplEnum.class));
        mw.ifeq(dflt);

        if (nameLengthMin >= 2 && nameLengthMax <= 11) {
            int[] switchKeys = new int[name0Map.size()];
            Label[] labels = new Label[name0Map.size()];
            {
                Iterator it = name0Map.keySet().iterator();
                for (int j = 0; j < labels.length; j++) {
                    labels[j] = new Label();
                    switchKeys[j] = (Integer) it.next();
                }
            }

            mw.aload(JSON_READER);
            mw.invokevirtual(TYPE_JSON_READER, "getRawInt", "()I");
            mw.visitLookupSwitchInsn(dflt, switchKeys, labels);

            for (int i = 0; i < labels.length; i++) {
                mw.visitLabel(labels[i]);

                int name0 = switchKeys[i];
                List<Enum> enumList = name0Map.get(name0);
                for (int j = 0; j < enumList.size(); j++) {
                    Label nextJ = null;
                    if (j > 0) {
                        nextJ = new Label();
                    }

                    Enum e = enumList.get(j);
                    byte[] enumName = e.name().getBytes(StandardCharsets.UTF_8);
                    int fieldNameLength = enumName.length;
                    switch (fieldNameLength) {
                        case 2:
                            mw.aload(JSON_READER);
                            mw.invokevirtual(TYPE_JSON_READER, "nextIfValue4Match2", "()Z");
                            break;
                        case 3:
                            mw.aload(JSON_READER);
                            mw.invokevirtual(TYPE_JSON_READER, "nextIfValue4Match3", "()Z");
                            break;
                        case 4: {
                            mw.aload(JSON_READER);
                            mw.visitLdcInsn(enumName[3]);
                            mw.invokevirtual(TYPE_JSON_READER, "nextIfValue4Match4", "(B)Z");
                            break;
                        }
                        case 5: {
                            mw.aload(JSON_READER);
                            mw.visitLdcInsn(enumName[3]);
                            mw.visitLdcInsn(enumName[4]);
                            mw.invokevirtual(TYPE_JSON_READER, "nextIfValue4Match5", "(BB)Z");
                            break;
                        }
                        case 6: {
                            byte[] bytes4 = new byte[4];
                            bytes4[0] = enumName[3];
                            bytes4[1] = enumName[4];
                            bytes4[2] = enumName[5];
                            bytes4[3] = '"';
                            int name1 = UNSAFE.getInt(bytes4, ARRAY_BYTE_BASE_OFFSET);
                            mw.aload(JSON_READER);
                            mw.visitLdcInsn(name1);
                            mw.invokevirtual(TYPE_JSON_READER, "nextIfValue4Match6", "(I)Z");
                            break;
                        }
                        case 7: {
                            int name1 = UNSAFE.getInt(enumName, ARRAY_BYTE_BASE_OFFSET + 3);
                            mw.aload(JSON_READER);
                            mw.visitLdcInsn(name1);
                            mw.invokevirtual(TYPE_JSON_READER, "nextIfValue4Match7", "(I)Z");
                            break;
                        }
                        case 8: {
                            int name1 = UNSAFE.getInt(enumName, ARRAY_BYTE_BASE_OFFSET + 3);
                            mw.aload(JSON_READER);
                            mw.visitLdcInsn(name1);
                            mw.visitLdcInsn(enumName[7]);
                            mw.invokevirtual(TYPE_JSON_READER, "nextIfValue4Match8", "(IB)Z");
                            break;
                        }
                        case 9: {
                            int name1 = UNSAFE.getInt(enumName, ARRAY_BYTE_BASE_OFFSET + 3);
                            mw.aload(JSON_READER);
                            mw.visitLdcInsn(name1);
                            mw.visitLdcInsn(enumName[7]);
                            mw.visitLdcInsn(enumName[8]);
                            mw.invokevirtual(TYPE_JSON_READER, "nextIfValue4Match9", "(IBB)Z");
                            break;
                        }
                        case 10: {
                            byte[] bytes8 = new byte[8];
                            System.arraycopy(enumName, 3, bytes8, 0, 7);
                            bytes8[7] = '"';
                            long name1 = UNSAFE.getLong(bytes8, ARRAY_BYTE_BASE_OFFSET);
                            mw.aload(JSON_READER);
                            mw.visitLdcInsn(name1);
                            mw.invokevirtual(TYPE_JSON_READER, "nextIfValue4Match10", "(J)Z");
                            break;
                        }
                        case 11: {
                            byte[] bytes8 = new byte[8];
                            System.arraycopy(enumName, 3, bytes8, 0, 8);
                            long name1 = UNSAFE.getLong(bytes8, ARRAY_BYTE_BASE_OFFSET);
                            mw.aload(JSON_READER);
                            mw.visitLdcInsn(name1);
                            mw.invokevirtual(TYPE_JSON_READER, "nextIfValue4Match11", "(J)Z");
                            break;
                        }
                        default:
                            throw new IllegalStateException("fieldNameLength " + fieldNameLength);
                    }

                    mw.ifeq(nextJ != null ? nextJ : dflt);

                    mw.aload(THIS);
                    mw.getfield(classNameType, FIELD_OBJECT_READER, DESC_OBJECT_READER);
                    mw.checkcast(type(ObjectReaderImplEnum.class));
                    mw.visitLdcInsn(e.ordinal());
                    mw.invokevirtual(type(ObjectReaderImplEnum.class), "getEnumByOrdinal", "(I)Ljava/lang/Enum;");
                    mw.goto_(enumEnd);

                    if (nextJ != null) {
                        mw.visitLabel(nextJ);
                    }
                }

                mw.goto_(dflt);
            }
        }

        mw.visitLabel(dflt);

        mw.aload(THIS);
        mw.getfield(classNameType, FIELD_OBJECT_READER, DESC_OBJECT_READER);
        mw.aload(JSON_READER);
        gwGetFieldType(classNameType, mw, fieldIndex, fieldType);
        mw.visitLdcInsn(fieldReader.fieldName);
        mw.visitLdcInsn(fieldFeatures);
        mw.invokeinterface(
                TYPE_OBJECT_READER,
                jsonb ? "readJSONBObject" : "readObject",
                METHOD_DESC_READ_OBJECT);

        mw.visitLabel(enumEnd);
    }
<blockquote><pre>
     class Bean {
         private String field1;
         private int field2;
     }

     public void readJSONBObject(JSONReader jsonReader, Type fieldType, Object fieldName, long features) {
         features = jsonReader.features(features);
         if (nextIfNull()) {
             return null;
         }

         jsonReader.errorOnNoneSerializable(this.objectClass);

         if (jsonReader.isArray() && jsonReader.isSupportBeanArray()) {
             return readArrayMappingObject(jsonReader, fieldType, fieldName, features);
         }

         Bean object = new Bean();

         jsonReader.nextIfObjectStart();

         for (;;) {
             if (jsonReader.nextIfObjectEnd()) {
                 break;
             }
             switch(jsonReader.getRawInt()) {
                 case field1NameHash32:
                     if(jsonReader.nextIfName4Match2()) {
                         object.field1 = jsonReader.readString();
                         break;
                     }
                     goto hashCode64Start;
                 case field2NameHash32:
                     if(jsonReader.nextIfName4Match2()) {
                         object.field2 = jsonReader.readInt();
                         break;
                     }
                     goto hashCode64Start;
                 default:
                     goto hashCode64Start;
             }

             hashCode64Start:
             long hashCode64 = readFieldNameHashCode();

             if (this.typeKeyHashCode == hashCode64) {
                 object = this.autoType(jsonReader);
             }

             switch(jsonReader.getFieldOrdinal(hashCode64)) {
                 case 0:
                     object.field1 = jsonReader.readString();
             }
         }


     }
 </pre></blockquote>
core/src/main/java/com/alibaba/fastjson2/reader/ObjectReaderCreatorASM.java