@stefano Did booleans exist in k+r C ? I distantlyremember writing a lot of code where int was the default type for Boolean logic - because the processor was going to load 16 bits from memory anyway, so narrowing would cost time…
I also suspect the complexity may reflect the slowly changing requirements, each change adding a layer. Your dev might be prioritising not breaking stuff over performance.