improve 2bf.c: min_index