https://bugs.winehq.org/show_bug.cgi?id=38780
--- Comment #25 from Martin Storsjö martin@martin.st --- FWIW, the patches in wine-staging for this issue aren't really needed any longer. There's been lots of work ongoing in wine (both the PE transition, but also by switching to the kernel stack for syscalls) that has made the issue go away more or less; with Wine 6.14 at least, the issue isn't present for me any longer, and both PE builds and full-ELF builds run fine for my set of test programs at least. Additionally, Clang (since 11.0) has got some support for automatically backing up and restoring x18 in the ELF functions that implement a windows calling convention (i.e. the ones in the boundary interface).
Therefore, I'd suggest to remove the patches from wine-staging/patches/ntdll-aarch-TEB; things work without them, and they're probably not helping anything any longer.