//
// sub_5E896 from 0x5e896 to 0x5e8ae (24 bytes)
//
// 2 xrefs:
// > sub_603D4 @ 0x604d6
// > sub_603D4 @ 0x60508
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall sub_5E896(int result, int a2, int a3)
{
int v3; // r3
v3 = a2 - a3;
do
result += a3 - a2;
while ( v3 + result < a2 );
do
result += v3;
while ( result >= a3 );
return result;
}