static int fcnlist_gather_metadata(RzAnalysis *analysis, RzList *fcns) {
	RzListIter *iter;
	RzAnalysisFunction *fcn;

	rz_list_foreach (fcns, iter, fcn) {
		// Count the number of references and number of calls
		RzListIter *callrefiter;
		RzAnalysisXRef *xref;
		RzList *xrefs = rz_analysis_function_get_xrefs_from(fcn);
		int numcallrefs = 0;
		rz_list_foreach (xrefs, callrefiter, xref) {
			if (xref->type == RZ_ANALYSIS_REF_TYPE_CALL) {
				numcallrefs++;
			}
		}
		rz_list_free(xrefs);
		fcn->meta.numcallrefs = numcallrefs;
		xrefs = rz_analysis_xrefs_get_to(analysis, fcn->addr);
		fcn->meta.numrefs = xrefs ? xrefs->length : 0;
		rz_list_free(xrefs);
	}
	// TODO: Determine sgnc, sgec
	return 0;
}
static int fcnlist_gather_metadata(RzAnalysis *analysis, RzList *fcns) {
	RzListIter *iter;
	RzAnalysisFunction *fcn;

	rz_list_foreach (fcns, iter, fcn) {
		 
		RzListIter *callrefiter;
		RzAnalysisXRef *xref;
		RzList *xrefs = rz_analysis_function_get_xrefs_from(fcn);
		int numcallrefs = 0;
		rz_list_foreach (xrefs, callrefiter, xref) {
			if (xref->type == RZ_ANALYSIS_REF_TYPE_CALL) {
				numcallrefs++;
			}
		}
		rz_list_free(xrefs);
		fcn->meta.numcallrefs = numcallrefs;
		xrefs = rz_analysis_xrefs_get_to(analysis, fcn->addr);
		fcn->meta.numrefs = xrefs ? xrefs->length : 0;
		rz_list_free(xrefs);
	}
	 
	return 0;
}