//
// sub_10056CE5C from 0x10056ce5c to 0x10056cf80 (292 bytes)
//
// 1 xrefs:
// > sub_10056D53C @ 0x10056d540
//
// 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:08:16 +0000
//
__int64 __fastcall sub_10056CE5C(__int64 a1)
{
unsigned int *v2; // x8
unsigned int v3; // w9
__int64 v9; // x8
__int64 i; // x20
float *v11; // x9
float v12; // w10
__int64 result; // x0
v2 = (unsigned int *)(a1 + 100);
do
v3 = __ldaxr(v2);
while ( __stlxr(v3 | 0x10, v2) );
*(_BYTE *)(a1 + 9160) = 0;
*(_DWORD *)(a1 + 9164) = 0;
memset_pattern16((void *)(a1 + 840), &unk_100770E30, 0x80u);
__asm { FMOV V0.4S, #1.0 }
*(_OWORD *)(a1 + 9168) = _Q0;
*(_OWORD *)(a1 + 9184) = _Q0;
*(_OWORD *)(a1 + 9200) = _Q0;
*(_OWORD *)(a1 + 9216) = _Q0;
*(_OWORD *)(a1 + 9232) = _Q0;
*(_OWORD *)(a1 + 9248) = _Q0;
*(_OWORD *)(a1 + 9264) = _Q0;
*(_OWORD *)(a1 + 9280) = _Q0;
v9 = *(_QWORD *)(a1 + 232);
if ( *(int *)(v9 + 96) >= 1 )
{
for ( i = 0; i < *(int *)(v9 + 96); ++i )
{
v11 = *(float **)(*(_QWORD *)(v9 + 104) + 8 * i);
v12 = *v11;
if ( *(_DWORD *)v11 == 1 )
{
result = sub_1005CDBC8(a1, i, *((unsigned int *)v11 + 14));
if ( (_DWORD)result )
return result;
v9 = *(_QWORD *)(a1 + 232);
v11 = *(float **)(*(_QWORD *)(v9 + 104) + 8 * i);
v12 = *v11;
}
if ( v12 == 0.0 )
{
result = sub_1005CDB48(a1, i, v11[14]);
if ( (_DWORD)result )
return result;
v9 = *(_QWORD *)(a1 + 232);
}
}
}
sub_1006167F8(a1 + 544, *(_QWORD *)(a1 + 168), 1.0);
*(_DWORD *)(a1 + 668) |= 0x10u;
*(_QWORD *)(a1 + 184) = sub_100617E58;
return 0;
}