Keep in mind that this doesn't use the fact that we know that the input is between 0 to 63.
You can use __builtin_assume for this: https://godbolt.org/z/K4jKhxnTq
edit uh but when asserts are disabled it won't work: https://godbolt.org/z/4TMs1Wc5z
unless you roll your own assert: https://godbolt.org/z/4v35rrTvn
https://godbolt.org/z/6WsWqh4ah
Keep in mind that this doesn't use the fact that we know that the input is between 0 to 63.