This is a question from my regular column. It is necessary to subtract 2 uint32_t so that the bytes are subtracted separately, and at the same time a - b = 0 if a < b . For example, 0x02.00.00 - 0x01.00.10 = 0x01.00.00
As always without if-s (ternary operators), simd instructions and other benefits of civilization.
-(res <= x), and from the point of view of the assembler, the operator<=is 100% IF. And with such hidden if, you can calmly check and subtract when necessary - Mike<=for the assembler did not know. Chose the most concise answer. - neko69