Open plafosse opened 2 months ago
BNDB Shared internally cascade blueprint lantern mosaic
has the following conditional at: 100002f37
Added in 4.1.5232
Looks like the demorgan's variant of this case is still not handled
180022bbc
In the unicorn chess taco rainbow
binary
So to clarify: The original equation if ((((rax_69 == 0x8007007a || rax_69 == 0x80020013) && rax_55 s>= 0) || (rax_69 != 0x8007007a && rax_69 != 0x80020013)) && rdi s< 0)
A = (rax_69 == 0x8007007a || rax_69 == 0x80020013)
!A = (rax_69 != 0x8007007a && rax_69 != 0x80020013)
B = rax_55 s>= 0
C = rdi s< 0
This boils down to:
((A && B) || !A) && C
We dont' care about C so we can drop it and rewrite the equation
((A && B) || !A)
which can convert to (B || !A)
The final equation can be simplified down to:
if ((rax_55 s>= 0 || (rax_69 != 0x8007007a && rax_69 != 0x80020013)) && rdi s< 0)
I'm seeing a lot of this type of condition repeated that should be easy to simplify
(!A || (A && B))
Which simplifies down to just!A || B
Similarly(A || (!A && B)) => A || B