//
// sub_1007193A0 from 0x1007193a0 to 0x100719458 (184 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009ea350
//
// 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 11:13:01 +0000
//
__int64 __fastcall sub_1007193A0(__int64 *a1, _BYTE *a2, __int64 a3, __int64 a4)
{
__int64 v5; // x21
unsigned __int64 v7; // x20
int v8; // w0
int v9; // w9
__int64 v10; // x10
bool v11; // cc
v5 = *a1;
if ( *a1 == *(_QWORD *)(a4 + 40) )
return 0xFFFFFFFFLL;
v7 = v5 ^ (v5 >> 63);
v8 = sub_1006D0CA0(v7);
v9 = (v8 + 7) >> 3;
if ( a2 )
{
if ( (v8 & 7) == 0 )
*a2++ = v5 >> 63;
LODWORD(v10) = v9 - 1;
if ( v9 >= 1 )
{
v10 = (int)v10;
if ( v5 < 0 )
{
do
{
a2[v10] = ~(_BYTE)v7;
v7 >>= 8;
v11 = v10-- <= 0;
}
while ( !v11 );
}
else
{
do
{
a2[v10] = v7;
v7 >>= 8;
v11 = v10-- <= 0;
}
while ( !v11 );
}
}
}
return (unsigned int)((v8 & 7) == 0) + v9;
}