RZ_API ut64 rz_analysis_var_addr(RzAnalysisVar *var) {
	rz_return_val_if_fail(var, UT64_MAX);
	RzAnalysis *analysis = var->fcn->analysis;
	const char *regname = NULL;
	if (var->kind == RZ_ANALYSIS_VAR_KIND_BPV) {
		regname = rz_reg_get_name(analysis->reg, RZ_REG_NAME_BP);
		return rz_reg_getv(analysis->reg, regname) + var->delta + var->fcn->bp_off;
	} else if (var->kind == RZ_ANALYSIS_VAR_KIND_SPV) {
		regname = rz_reg_get_name(analysis->reg, RZ_REG_NAME_SP);
		return rz_reg_getv(analysis->reg, regname) + var->delta;
	}
	return 0;
}
RZ_API ut64 rz_analysis_var_addr(RzAnalysisVar *var) {
	rz_return_val_if_fail(var, UT64_MAX);
	RzAnalysis *analysis = var->fcn->analysis;
	const char *regname = NULL;
	if (var->kind == RZ_ANALYSIS_VAR_KIND_BPV) {
		regname = rz_reg_get_name(analysis->reg, RZ_REG_NAME_BP);
		return rz_reg_getv(analysis->reg, regname) + var->delta + var->fcn->bp_off;
	} else if (var->kind == RZ_ANALYSIS_VAR_KIND_SPV) {
		regname = rz_reg_get_name(analysis->reg, RZ_REG_NAME_SP);
		return rz_reg_getv(analysis->reg, regname) + var->delta;
	}
	return 0;
}