public final static int indexMask(int index_bits) {
		int kAllOnes = -1;
		// Handle `index_bits == 32u` explicitly; shifting uint32_t left by 32 is undefined behavior.
		return (index_bits == 32) ? kAllOnes : ~(kAllOnes << index_bits);
	}
https://android.googlesource.com/platform/art/+/master/runtime/index_bss_mapping.h
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/IndexBssUtilities.java