//
// sub_1005C6E80 from 0x1005c6e80 to 0x1005c6f34 (180 bytes)
//
// 1 xrefs:
// > sub_1005C7A38 @ 0x1005c7d8c
//
// 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:09:25 +0000
//
__int64 __fastcall sub_1005C6E80(__int64 *a1, __int64 *a2)
{
__int64 v4; // x8
int v5; // w9
__int64 v6; // x1
__int64 v7; // x9
__int64 v8; // x9
v4 = *a2;
if ( *a2 )
{
v5 = *(_DWORD *)(v4 + 8);
if ( v5 >= 1 )
*(_DWORD *)(v4 + 8) = --v5;
if ( !v5 )
{
v6 = *(_QWORD *)(v4 + 24);
v7 = a2[1];
if ( v6 )
{
sub_1005D7AD8(v7 + 67784, v6, "", 0, 1);
}
else
{
*(_QWORD *)v4 = *(_QWORD *)(v7 + 67496);
*(_QWORD *)(v7 + 67496) = v4;
}
}
*a2 = 0;
*((_OWORD *)a2 + 1) = xmmword_1007718C0;
}
v8 = a1[1];
*a2 = *a1;
a2[1] = v8;
*((_OWORD *)a2 + 1) = *((_OWORD *)a1 + 1);
++*(_DWORD *)(*a1 + 8);
return 0;
}