static void cmd_anal_calls(RCore *core, const char *input, bool only_print_flag) {
	RList *ranges = NULL;
	RIOMap *r;
	RBinFile *binfile;
	ut64 addr;
	ut64 len = r_num_math (core->num, input);
	if (len > 0xffffff) {
		eprintf ("Too big\n");
		return;
	}
	binfile = r_core_bin_cur (core);
	addr = core->offset;
	if (binfile) {
		if (len) {
			RIOMap *m = R_NEW0 (RIOMap);
			m->itv.addr = addr;
			m->itv.size = len;
			r_list_append (ranges, m);
		} else {
			ranges = r_core_get_boundaries_prot (core, R_IO_EXEC, NULL, "anal");
		}
	}
	r_cons_break_push (NULL, NULL);
	if (!binfile || !r_list_length (ranges)) {
		RListIter *iter;
		RIOMap *map;
		r_list_free (ranges);
		ranges = r_core_get_boundaries_prot (core, 0, NULL, "anal");
		r_list_foreach (ranges, iter, map) {
			ut64 addr = map->itv.addr;
			if (only_print_flag) {
				r_cons_printf ("f fcn.0x%08"PFMT64x" %d 0x%08"PFMT64x"\n",
					addr, map->itv.size, addr);
			} else {
				_anal_calls (core, addr, r_itv_end (map->itv));
			}
		}
	} else {
		RListIter *iter;
		if (binfile) {
			r_list_foreach (ranges, iter, r) {
				addr = r->itv.addr;
				//this normally will happen on fuzzed binaries, dunno if with huge
				//binaries as well
				if (r_cons_is_breaked ()) {
					break;
				}
				if (only_print_flag) {
					r_cons_printf ("f fcn.0x%08"PFMT64x" %d 0x%08"PFMT64x"\n",
						addr, r->itv.size, addr);
				} else {
					_anal_calls (core, addr, r_itv_end (r->itv));
				}
			}
		}
	}
	r_cons_break_pop ();
	r_list_free (ranges);
}
static void cmd_anal_calls(RCore *core, const char *input, bool only_print_flag) {
	RList *ranges = NULL;
	RIOMap *r;
	RBinFile *binfile;
	ut64 addr;
	ut64 len = r_num_math (core->num, input);
	if (len > 0xffffff) {
		eprintf ("Too big\n");
		return;
	}
	binfile = r_core_bin_cur (core);
	addr = core->offset;
	if (binfile) {
		if (len) {
			RIOMap *m = R_NEW0 (RIOMap);
			m->itv.addr = addr;
			m->itv.size = len;
			r_list_append (ranges, m);
		} else {
			ranges = r_core_get_boundaries_prot (core, R_IO_EXEC, NULL, "anal");
		}
	}
	r_cons_break_push (NULL, NULL);
	if (!binfile || !r_list_length (ranges)) {
		RListIter *iter;
		RIOMap *map;
		r_list_free (ranges);
		ranges = r_core_get_boundaries_prot (core, 0, NULL, "anal");
		r_list_foreach (ranges, iter, map) {
			ut64 addr = map->itv.addr;
			if (only_print_flag) {
				r_cons_printf ("f fcn.0x%08"PFMT64x" %d 0x%08"PFMT64x"\n",
					addr, map->itv.size, addr);
			} else {
				_anal_calls (core, addr, r_itv_end (map->itv));
			}
		}
	} else {
		RListIter *iter;
		if (binfile) {
			r_list_foreach (ranges, iter, r) {
				addr = r->itv.addr;
				 
				 
				if (r_cons_is_breaked ()) {
					break;
				}
				if (only_print_flag) {
					r_cons_printf ("f fcn.0x%08"PFMT64x" %d 0x%08"PFMT64x"\n",
						addr, r->itv.size, addr);
				} else {
					_anal_calls (core, addr, r_itv_end (r->itv));
				}
			}
		}
	}
	r_cons_break_pop ();
	r_list_free (ranges);
}