https://github.com/mstorsjo approved this pull request. LGTM - this is kinda complicated, but your explanation sounds reasonable, and I think I've managed to follow it, so this sounds ok to me. https://github.com/llvm/llvm-project/pull/120144