static UDis86 loadUDis86() {
List<String> libraryPaths = Arrays.asList("/usr/local/lib", "/opt/local/lib", "/usr/lib");
String path = Platform.getNativePlatform().locateLibrary("udis86", libraryPaths);
NativeLibrary library = new NativeLibrary(path != null ? path : "udis86");
Map<LibraryOption, Object> options = new HashMap<LibraryOption, Object>();
DefaultTypeMapper typeMapper = new DefaultTypeMapper();
typeMapper.put(X86Disassembler.class, new X86DisassemblerConverter());
options.put(LibraryOption.TypeMapper, typeMapper);
return new AsmLibraryLoader().loadLibrary(library, UDis86.class, options);
}