https://github.com/RKSimon requested changes to this pull request. Thanks for looking at this! Take a look at https://zig.godbolt.org/z/4GfbWajPT - the bit twiddling can be simplified to avoid the ANDNOT https://github.com/llvm/llvm-project/pull/141888