// Path: dex-reader-api/src/main/java/com/googlecode/d2j/DexConstants.java
// public abstract interface DexConstants {
// 
//     int ACC_PUBLIC = 0x0001; // class, field, method
//     int ACC_PRIVATE = 0x0002; // class, field, method
//     int ACC_PROTECTED = 0x0004; // class, field, method
//     int ACC_STATIC = 0x0008; // field, method
//     int ACC_FINAL = 0x0010; // class, field, method
//     // int ACC_SUPER = 0x0020; // class
//     int ACC_SYNCHRONIZED = 0x0020; // method
//     int ACC_VOLATILE = 0x0040; // field
//     int ACC_BRIDGE = 0x0040; // method
//     int ACC_VARARGS = 0x0080; // method
//     int ACC_TRANSIENT = 0x0080; // field
//     int ACC_NATIVE = 0x0100; // method
//     int ACC_INTERFACE = 0x0200; // class
//     int ACC_ABSTRACT = 0x0400; // class, method
//     int ACC_STRICT = 0x0800; // method
//     int ACC_SYNTHETIC = 0x1000; // class, field, method
//     int ACC_ANNOTATION = 0x2000; // class
//     int ACC_ENUM = 0x4000; // class(?) field inner
//     int ACC_CONSTRUCTOR = 0x10000;// constructor method (class or instance initializer)
//     int ACC_DECLARED_SYNCHRONIZED = 0x20000;
// 
//     String ANNOTATION_DEFAULT_TYPE = "Ldalvik/annotation/AnnotationDefault;";
//     String ANNOTATION_SIGNATURE_TYPE = "Ldalvik/annotation/Signature;";
//     String ANNOTATION_THROWS_TYPE = "Ldalvik/annotation/Throws;";
//     String ANNOTATION_ENCLOSING_CLASS_TYPE = "Ldalvik/annotation/EnclosingClass;";
//     String ANNOTATION_ENCLOSING_METHOD_TYPE = "Ldalvik/annotation/EnclosingMethod;";
//     String ANNOTATION_INNER_CLASS_TYPE = "Ldalvik/annotation/InnerClass;";
//     String ANNOTATION_MEMBER_CLASSES_TYPE = "Ldalvik/annotation/MemberClasses;";
// 
//     int DEX_035 = 0x00303335;
//     int DEX_036 = 0x00303336;
//     int DEX_037 = 0x00303337;
//     int DEX_038 = 0x00303338;
// }


import java.io.*;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.*;
import com.googlecode.d2j.*;
import com.googlecode.d2j.node.DexAnnotationNode;
import com.googlecode.d2j.util.Mutf8;
import com.googlecode.d2j.visitors.*;
import static com.googlecode.d2j.DexConstants.*;

                        keep = 0 != (KEEP_CLINIT & config) && method.getName().equals("<clinit>");
                    }
                    if(keep) {
                        DexCodeVisitor dcv = dmv.visitCode();
                        if (dcv != null) {
                            try {
                                acceptCode(code_off, dcv, config, (method_access_flags & DexConstants.ACC_STATIC) != 0,
                                        method);
                            } catch (Exception e) {
                                throw new DexException(e, "while accept code in method:[%s] @%08x", method.toString(),
                                        code_off);
                            }
                        }
                    }
                }
                dmv.visitEnd();
            }
        } catch (Exception e) {
            throw new DexException(e, "while accept method:[%s]", method.toString());
        }

        return method_id;
    }

    private void read_annotation_set_ref_list(int parameter_annotation_offset, DexMethodVisitor dmv) {
        ByteBuffer in = annotationSetRefListIn;
        in.position(parameter_annotation_offset);

        int size = in.getInt();
        for (int j = 0; j < size; j++) {

// Path: dex-reader-api/src/main/java/com/googlecode/d2j/DexConstants.java
// public abstract interface DexConstants {
// 
//     int ACC_PUBLIC = 0x0001; // class, field, method
//     int ACC_PRIVATE = 0x0002; // class, field, method
//     int ACC_PROTECTED = 0x0004; // class, field, method
//     int ACC_STATIC = 0x0008; // field, method
//     int ACC_FINAL = 0x0010; // class, field, method
//     // int ACC_SUPER = 0x0020; // class
//     int ACC_SYNCHRONIZED = 0x0020; // method
//     int ACC_VOLATILE = 0x0040; // field
//     int ACC_BRIDGE = 0x0040; // method
//     int ACC_VARARGS = 0x0080; // method
//     int ACC_TRANSIENT = 0x0080; // field
//     int ACC_NATIVE = 0x0100; // method
//     int ACC_INTERFACE = 0x0200; // class
//     int ACC_ABSTRACT = 0x0400; // class, method
//     int ACC_STRICT = 0x0800; // method
//     int ACC_SYNTHETIC = 0x1000; // class, field, method
//     int ACC_ANNOTATION = 0x2000; // class
//     int ACC_ENUM = 0x4000; // class(?) field inner
//     int ACC_CONSTRUCTOR = 0x10000;// constructor method (class or instance initializer)
//     int ACC_DECLARED_SYNCHRONIZED = 0x20000;
// 
//     String ANNOTATION_DEFAULT_TYPE = "Ldalvik/annotation/AnnotationDefault;";
//     String ANNOTATION_SIGNATURE_TYPE = "Ldalvik/annotation/Signature;";
//     String ANNOTATION_THROWS_TYPE = "Ldalvik/annotation/Throws;";
//     String ANNOTATION_ENCLOSING_CLASS_TYPE = "Ldalvik/annotation/EnclosingClass;";
//     String ANNOTATION_ENCLOSING_METHOD_TYPE = "Ldalvik/annotation/EnclosingMethod;";
//     String ANNOTATION_INNER_CLASS_TYPE = "Ldalvik/annotation/InnerClass;";
//     String ANNOTATION_MEMBER_CLASSES_TYPE = "Ldalvik/annotation/MemberClasses;";
// 
//     int DEX_035 = 0x00303335;
//     int DEX_036 = 0x00303336;
//     int DEX_037 = 0x00303337;
//     int DEX_038 = 0x00303338;
// }


// Path: dex-reader/src/main/java/com/googlecode/d2j/reader/DexFileReader.java
import java.io.*;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.*;
import com.googlecode.d2j.*;
import com.googlecode.d2j.node.DexAnnotationNode;
import com.googlecode.d2j.util.Mutf8;
import com.googlecode.d2j.visitors.*;
import static com.googlecode.d2j.DexConstants.*;

                        keep = 0 != (KEEP_CLINIT & config) && method.getName().equals("<clinit>");
                    }
                    if(keep) {
                        DexCodeVisitor dcv = dmv.visitCode();
                        if (dcv != null) {
                            try {
                                acceptCode(code_off, dcv, config, (method_access_flags & DexConstants.ACC_STATIC) != 0,
                                        method);
                            } catch (Exception e) {
                                throw new DexException(e, "while accept code in method:[%s] @%08x", method.toString(),
                                        code_off);
                            }
                        }
                    }
                }
                dmv.visitEnd();
            }
        } catch (Exception e) {
            throw new DexException(e, "while accept method:[%s]", method.toString());
        }

        return method_id;
    }

    private void read_annotation_set_ref_list(int parameter_annotation_offset, DexMethodVisitor dmv) {
        ByteBuffer in = annotationSetRefListIn;
        in.position(parameter_annotation_offset);

        int size = in.getInt();
        for (int j = 0; j < size; j++) {

            int param_annotation_offset = in.getInt();
