//
// sub_8CA58 from 0x8ca58 to 0x8cb1c (196 bytes)
//
// 3 xrefs:
// > sub_8D2F8 @ 0x8d554
// > sub_8D6F8 @ 0x8e49c
// > sub_8D6F8 @ 0x8e754
//
// 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 sub_8CA58()
{
__int64 v0; // x19
__int64 v1; // x20
char v2; // w8
char v4; // cf
char v5; // zf
__int64 result; // x0
char v7; // w8
char v8; // w11
sub_918A0();
if ( !(!v5 & v4) )
__asm { BR X11 }
result = 0;
v7 = v2 + *(_BYTE *)(v0 + 263);
if ( v7 > 31 )
v7 -= 64;
*(_BYTE *)(v0 + 262) = v7;
v8 = *(_BYTE *)(v1 + 60);
*(_DWORD *)(v1 + 80) = *(_DWORD *)(v1 + 80);
*(_BYTE *)(v1 + 60) = v8 | 1;
return result;
}