//
// sub_E53EF4 from 0xe53ef4 to 0xe53f88 (148 bytes)
//
// 1 xrefs:
// > png_read_filter_row @ 0xe58c14
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:10:17 +0000
//
__int64 __fastcall sub_E53EF4(__int64 a1, _BYTE *a2, unsigned __int8 *a3)
{
int v3; // w5
unsigned __int8 *v4; // x7
unsigned __int64 v5; // x9
unsigned __int8 *v6; // x4
__int64 result; // x0
int v8; // w6
int v9; // t1
signed int v10; // w3
signed int v11; // w2
signed int v12; // w1
v3 = *a3;
v4 = a3 + 1;
v5 = (unsigned __int64)&a2[*(_QWORD *)(a1 + 8)];
v6 = a2 + 1;
result = (unsigned int)(unsigned __int8)*a2 + v3;
*a2 += v3;
if ( v5 > (unsigned __int64)(a2 + 1) )
{
do
{
v9 = *v4++;
v8 = v9;
LODWORD(result) = (unsigned __int8)result;
v10 = abs32((unsigned __int8)result - v3);
v11 = abs32(v9 - v3);
v12 = abs32(v9 - v3 + (unsigned __int8)result - v3);
if ( v11 > v10 )
LODWORD(result) = v8;
if ( v10 > v11 )
v10 = v11;
if ( v10 > v12 )
LODWORD(result) = v3;
v3 = v8;
result = *v6 + (unsigned int)result;
*v6++ = result;
}
while ( v6 != (unsigned __int8 *)v5 );
}
return result;
}