How remove this optimization of hexrays?

I think hexrays forgot what it is not
and it is not a compiler
and it should not optimize the code that the compiler left

so how to disable/drop/remove such optimization?

  1. hexrays looks for similar patterns in the microcode and replaces them with one,
    adding or redirecting via GOTO to them

if (a()) { return b(); return; }
if (c()) { return b(); return; }
if (d()) { return b(); return; }
if (e()) { return b(); return; }

is replaced by

if (a()) { A: return b(); return; }
if (c()) { goto A; }
if (d()) { goto A; }
if (e()) { goto A; }

or even worse
is replaced by

if (a() || c() || d() || e()) { return b(); return; }

why is it bad?

firstly, the original instructions are deleted
if the compiler left them, it means he considered it correct
or he did not optimize it and you can see the original idea of ​​the developer himself
and hexrays has no right to put itself above the compiler and optimize something

secondly, with the advent of eh34, this will interfere with creating correct places for installing try/catch blocks

  1. replaces all comparisons with zero with regular uint a; if(a>0) → if(a)
    you will say yes, this comparison does not make sense
    I will say, and what right do you have to decide for the compiler?
    again, if the compiler left it - then I want to see it

moreover, in some platforms, these can be different types, signed or unsigned
and this code was compiled in the unsigned version

that’s why I really want to see the comparison with zero

  1. replaces if (a == 0 || a == 1) → if (a < 2)
    which subsequently creates problems with using enum
    instead of enum { A = 0, B, C }; if (a == A || a == B) → if (a < C)

there are actually a lot of such optimizations
I can’t remember absolutely all of them now
but I can add them to this topic as I come across or remember them

if you don’t want to remove these optimizations, then is it possible to add something to the API so that you can remove these optimizations by writing your own plugin