static RzList /*<RzBinSymbol *>*/ *dex_resolve_methods_in_class(RzBinDex *dex, DexClassDef *class_def, ut8 *inserted) {
	RzList *methods = rz_list_newf((RzListFree)rz_bin_symbol_free);
	if (!methods) {
		return NULL;
	}

	DexMethodId *method_id = NULL;
	DexEncodedMethod *encoded_method = NULL;
	RzListIter *it = NULL;

	rz_list_foreach (class_def->direct_methods, it, encoded_method) {
		if (encoded_method->method_idx >= rz_pvector_len(dex->method_ids)) {
			RZ_LOG_INFO("cannot find direct method with index %" PFMT64u "\n", encoded_method->method_idx);
			continue;
		} else if (inserted[encoded_method->method_idx]) {
			continue;
		}
		method_id = (DexMethodId *)rz_pvector_at(dex->method_ids, encoded_method->method_idx);
		inserted[encoded_method->method_idx] = true;

		RzBinSymbol *symbol = dex_method_to_symbol(dex, encoded_method, method_id, false);
		if (!symbol || !rz_list_append(methods, symbol)) {
			rz_bin_symbol_free(symbol);
			break;
		}
	}

	rz_list_foreach (class_def->virtual_methods, it, encoded_method) {
		if (encoded_method->method_idx >= rz_pvector_len(dex->method_ids)) {
			RZ_LOG_INFO("cannot find virtual method with index %" PFMT64u "\n", encoded_method->method_idx);
			continue;
		} else if (inserted[encoded_method->method_idx]) {
			continue;
		}
		method_id = (DexMethodId *)rz_pvector_at(dex->method_ids, encoded_method->method_idx);
		inserted[encoded_method->method_idx] = true;

		RzBinSymbol *symbol = dex_method_to_symbol(dex, encoded_method, method_id, false);
		if (!symbol || !rz_list_append(methods, symbol)) {
			rz_bin_symbol_free(symbol);
			break;
		}
	}

	return methods;
}
static RzList   *dex_resolve_methods_in_class(RzBinDex *dex, DexClassDef *class_def, ut8 *inserted) {
	RzList *methods = rz_list_newf((RzListFree)rz_bin_symbol_free);
	if (!methods) {
		return NULL;
	}

	DexMethodId *method_id = NULL;
	DexEncodedMethod *encoded_method = NULL;
	RzListIter *it = NULL;

	rz_list_foreach (class_def->direct_methods, it, encoded_method) {
		if (encoded_method->method_idx >= rz_pvector_len(dex->method_ids)) {
			RZ_LOG_INFO("cannot find direct method with index %" PFMT64u "\n", encoded_method->method_idx);
			continue;
		} else if (inserted[encoded_method->method_idx]) {
			continue;
		}
		method_id = (DexMethodId *)rz_pvector_at(dex->method_ids, encoded_method->method_idx);
		inserted[encoded_method->method_idx] = true;

		RzBinSymbol *symbol = dex_method_to_symbol(dex, encoded_method, method_id, false);
		if (!symbol || !rz_list_append(methods, symbol)) {
			rz_bin_symbol_free(symbol);
			break;
		}
	}

	rz_list_foreach (class_def->virtual_methods, it, encoded_method) {
		if (encoded_method->method_idx >= rz_pvector_len(dex->method_ids)) {
			RZ_LOG_INFO("cannot find virtual method with index %" PFMT64u "\n", encoded_method->method_idx);
			continue;
		} else if (inserted[encoded_method->method_idx]) {
			continue;
		}
		method_id = (DexMethodId *)rz_pvector_at(dex->method_ids, encoded_method->method_idx);
		inserted[encoded_method->method_idx] = true;

		RzBinSymbol *symbol = dex_method_to_symbol(dex, encoded_method, method_id, false);
		if (!symbol || !rz_list_append(methods, symbol)) {
			rz_bin_symbol_free(symbol);
			break;
		}
	}

	return methods;
}