static RzBinSymbol *dex_method_to_symbol(RzBinDex *dex, DexEncodedMethod *encoded_method, DexMethodId *method_id, bool is_imported) {
	RzBinSymbol *symbol = RZ_NEW0(RzBinSymbol);
	if (!symbol) {
		return NULL;
	}

	bool varargs = dex_is_varargs(encoded_method->access_flags);
	symbol->name = dex_resolve_string_id(dex, method_id->name_idx);
	symbol->classname = dex_resolve_type_id(dex, method_id->class_idx);
	symbol->libname = dex_resolve_library(symbol->classname);
	symbol->dname = dex_resolve_proto_id(dex, symbol->name, method_id->proto_idx, varargs);
	symbol->bind = dex_is_static(encoded_method->access_flags) ? RZ_BIN_BIND_GLOBAL_STR : RZ_BIN_BIND_LOCAL_STR;
	symbol->is_imported = is_imported;
	symbol->visibility = encoded_method->access_flags & UT32_MAX;
	symbol->visibility_str = rz_bin_dex_access_flags_readable(symbol->visibility);
	symbol->size = encoded_method->code_size;
	if (encoded_method->code_offset < RZ_DEX_RELOC_ADDRESS) {
		symbol->vaddr = RZ_DEX_VIRT_ADDRESS + encoded_method->code_offset;
		symbol->paddr = encoded_method->code_offset;
	} else {
		symbol->vaddr = encoded_method->code_offset;
		symbol->paddr = 0;
	}
	symbol->ordinal = encoded_method->method_idx;
	symbol->method_flags = dex_access_flags_to_bin_flags(encoded_method->access_flags);
	symbol->type = RZ_BIN_TYPE_METH_STR;

	return symbol;
}
static RzBinSymbol *dex_method_to_symbol(RzBinDex *dex, DexEncodedMethod *encoded_method, DexMethodId *method_id, bool is_imported) {
	RzBinSymbol *symbol = RZ_NEW0(RzBinSymbol);
	if (!symbol) {
		return NULL;
	}

	bool varargs = dex_is_varargs(encoded_method->access_flags);
	symbol->name = dex_resolve_string_id(dex, method_id->name_idx);
	symbol->classname = dex_resolve_type_id(dex, method_id->class_idx);
	symbol->libname = dex_resolve_library(symbol->classname);
	symbol->dname = dex_resolve_proto_id(dex, symbol->name, method_id->proto_idx, varargs);
	symbol->bind = dex_is_static(encoded_method->access_flags) ? RZ_BIN_BIND_GLOBAL_STR : RZ_BIN_BIND_LOCAL_STR;
	symbol->is_imported = is_imported;
	symbol->visibility = encoded_method->access_flags & UT32_MAX;
	symbol->visibility_str = rz_bin_dex_access_flags_readable(symbol->visibility);
	symbol->size = encoded_method->code_size;
	if (encoded_method->code_offset < RZ_DEX_RELOC_ADDRESS) {
		symbol->vaddr = RZ_DEX_VIRT_ADDRESS + encoded_method->code_offset;
		symbol->paddr = encoded_method->code_offset;
	} else {
		symbol->vaddr = encoded_method->code_offset;
		symbol->paddr = 0;
	}
	symbol->ordinal = encoded_method->method_idx;
	symbol->method_flags = dex_access_flags_to_bin_flags(encoded_method->access_flags);
	symbol->type = RZ_BIN_TYPE_METH_STR;

	return symbol;
}