Most intrinsics in LibraryCallKit re-push the arguments that have been popped off before the call to just pop them again as arguments. It would be much cleaner and more correct to use argument() accessors instead.
Another problem is that it is very tricky to find the places where the stack pointer needs to be adjusted to the correct value for re-execution (uncommon traps). This adjustment is a plain SP bump and decrease after the call. In itself very error prone and it could be handled in a much more elegant way.