//
// sub_761318 from 0x761318 to 0x76134e (54 bytes)
//
// 0 xrefs:
//
// 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_761318(_DWORD *a1)
{
unsigned int v1; // r3
unsigned int v2; // r2
unsigned __int8 *v4; // r3
int result; // r0
v1 = a1[2];
v2 = a1[3];
if ( v1 >= v2 )
{
result = (*(int (__fastcall **)(_DWORD *))(*a1 + 40))(a1);
if ( result == -1 )
return result;
v4 = (unsigned __int8 *)a1[2];
v2 = a1[3];
}
else
{
v4 = (unsigned __int8 *)(v1 + 1);
a1[2] = v4;
}
if ( v2 <= (unsigned int)v4 )
return (*(int (__fastcall **)(_DWORD *))(*a1 + 36))(a1);
else
return *v4;
}