LEVEL_ENTRIES
int left_levels[LEVEL_ENTRIES];
int right_levels[LEVEL_ENTRIES];
if (d >= LEVEL_ENTRIES)