//
// sub_1000771C8 from 0x1000771c8 to 0x100077274 (172 bytes)
//
// 2 xrefs:
// > SecretLayer5::init @ 0x100074134
// > SecretLayer5::incrementChatIdx @ 0x1000756ec
//
// 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_1000771C8(unsigned __int64 a1, __int64 a2, __int64 a3)
{
__int64 v4; // x8
unsigned __int64 v5; // x21
unsigned __int64 v6; // x22
__int64 v8; // x23
int *v9; // x24
__int64 v10; // x0
int v11; // w8
_QWORD v13[2]; // [xsp+0h] [xbp-50h] BYREF
__int128 v14; // [xsp+10h] [xbp-40h] BYREF
v4 = (__int64)(a2 - a1) >> 2;
if ( v4 >= 2 )
{
v5 = a1;
v14 = xmmword_1006360D0;
v6 = a2 - 4;
if ( a2 - 4 > a1 )
{
v8 = v4 - 1;
v9 = (int *)a1;
do
{
v13[0] = 0;
v13[1] = v8;
v10 = sub_100077274(&v14, a3, v13);
if ( v10 )
{
v11 = *v9;
*v9 = *(_DWORD *)(v5 + 4 * v10);
*(_DWORD *)(v5 + 4 * v10) = v11;
}
++v9;
--v8;
v5 += 4LL;
}
while ( (unsigned __int64)v9 < v6 );
}
}
return a2;
}