//
// sub_E25EA0 from 0xe25ea0 to 0xe25f90 (240 bytes)
//
// 1 xrefs:
// > sub_6320DC @ 0x632840
//
// 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:09:48 +0000
//
__int64 __fastcall sub_E25EA0(__int64 result, _QWORD *a2)
{
__int64 v2; // x19
__int64 v3; // x20
__int64 v4; // x0
__int64 *v5; // x1
__int64 v6; // x1
__int64 v7; // x4
__int64 v8; // x5
__int64 v9; // x2
unsigned int v10; // w20
const char *v11; // x6
v2 = result;
if ( result )
{
v3 = sub_E12198(*(_QWORD *)(result + 96));
v4 = sub_E121A4(*(_QWORD *)(v2 + 96));
v5 = (__int64 *)a2[144];
if ( v5 && (v6 = *v5) != 0 )
{
v7 = *(_QWORD *)(*(_QWORD *)v6 + 120LL);
if ( v7 > v3 && v3 > 0 )
{
if ( v4 <= 0 )
{
v9 = a2[10];
v8 = a2[5];
goto LABEL_9;
}
v8 = a2[5];
LABEL_8:
v9 = a2[10];
LABEL_9:
v10 = 1;
v11 = "TRUE";
LABEL_10:
sub_DF16E0(v2, "Conn: %ld (%p) Receive pipe weight: (%ld/%zu), penalized: %s\n", v9, a2, v7, v8, v11);
return v10;
}
}
else
{
v7 = -2;
}
if ( v4 <= 0 )
{
v9 = a2[10];
v8 = a2[5];
v10 = 0;
v11 = "FALSE";
goto LABEL_10;
}
v8 = a2[5];
if ( v4 >= v8 )
{
v9 = a2[10];
v10 = 0;
v11 = "FALSE";
goto LABEL_10;
}
goto LABEL_8;
}
return result;
}