//
// sub_61BE8 from 0x61be8 to 0x61c40 (88 bytes)
//
// 1 xrefs:
// > sub_63AAC @ 0x63af4
//
// 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
//
__int64 __fastcall sub_61BE8(int a1, char a2, _QWORD *a3)
{
int v5; // w0
int v6; // w20
__int64 result; // x0
__int64 v8; // x0
v5 = accept(a1, nullptr, nullptr);
if ( v5 == -1 )
{
v8 = __errno();
return sub_61D9C(v8);
}
else
{
v6 = v5;
result = sub_61878(v5, a2 & 1);
if ( !(_DWORD)result )
*a3 = v6;
}
return result;
}