If assert function has @psalm-assert-if-false and @psalm-assert-if-true at the same time then it works incorrectly:
https://psalm.dev/r/91745556ee
Quick workaround is drop @psalm-assert-if-false or @psalm-assert-if-true from assert function:
https://psalm.dev/r/a5500b4ed2
But above workaround doesn't work in more difficult cases:
https://psalm.dev/r/408248f46f