i tried reproducing the zipped example on macOS 14.4.1 (23E224) and Apple clang version 15.0.0 (clang-1500.3.9.4) and it looks like the issue is not present on that version.
here are the instructions marked with '<<<<' from `disassem.txt` and my version:
on my version it uses the offset for the first load #2400 = #0x960. so i guess it must have been fixed somewhere between `clang-1500.0.40.1` and `clang-1500.3.9.4`. but that is an insane bug. also, `sweep_thread` seems to have the exact same number of instructions under both versions of clang and i'm guessing the only difference is this offset which is kind of wild.
Apple clang versions don't coincide with public clang versions. Apple clang's major versions follow Xcode's. For instance, Xcode 16.1's clang is 16.0.0 (clang-1600.0.26.4).
here are the instructions marked with '<<<<' from `disassem.txt` and my version:
on my version it uses the offset for the first load #2400 = #0x960. so i guess it must have been fixed somewhere between `clang-1500.0.40.1` and `clang-1500.3.9.4`. but that is an insane bug. also, `sweep_thread` seems to have the exact same number of instructions under both versions of clang and i'm guessing the only difference is this offset which is kind of wild.