//
// sub_100446CF4 from 0x100446cf4 to 0x100446e18 (292 bytes)
//
// 1 xrefs:
// > sub_1004473D4 @ 0x1004473d8
//
// 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_100446CF4(__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_100647E20, 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_1004A7A60(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_1004A79E0(a1, i, v11[14]);
if ( (_DWORD)result )
return result;
v9 = *(_QWORD *)(a1 + 232);
}
}
}
sub_1004F0690(a1 + 544, *(_QWORD *)(a1 + 168), 1.0);
*(_DWORD *)(a1 + 668) |= 0x10u;
*(_QWORD *)(a1 + 184) = sub_1004F1CF0;
return 0;
}