//
// sub_1003020A0 from 0x1003020a0 to 0x10030218c (236 bytes)
//
// 3 xrefs:
// > PlayLayer::updateVisibility @ 0x100145a40
// > LevelEditorLayer::updateVisibility @ 0x100400028
// > sub_10040614C @ 0x100406200
//
// 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:03:05 +0000
//
__int64 __fastcall sub_1003020A0(__int64 result, float a2)
{
__int64 v2; // x19
int v3; // w21
float v4; // s0
float v5; // s8
unsigned int *v6; // x9
__int64 v7; // x8
_QWORD *v8; // x22
unsigned __int64 v9; // x23
__int64 v10; // x20
int v11; // w0
if ( (*(_BYTE *)(result + 1388) & 1) == 0 )
{
v2 = result;
v3 = 0;
v4 = *(float *)(result + 1404) + a2;
*(float *)(result + 1404) = v4;
v5 = v4 * *(float *)(result + 1400);
while ( 1 )
{
result = v2;
if ( !v3 )
goto LABEL_8;
if ( v3 != 1 )
break;
if ( (*(_BYTE *)(v2 + 866) & 1) == 0 )
{
result = *(_QWORD *)(v2 + 888);
LABEL_8:
if ( result )
{
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)result + 488LL))(result);
if ( result )
{
v6 = *(unsigned int **)(result + 56);
v7 = *v6;
if ( (_DWORD)v7 )
{
v8 = *((_QWORD **)v6 + 2);
v9 = (unsigned __int64)&v8[v7 - 1];
do
{
v10 = *v8;
if ( !*v8 )
break;
v11 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v10 + 64LL))(*v8);
result = (*(__int64 (__fastcall **)(__int64, float))(*(_QWORD *)v10 + 360LL))(v10, v5 + (float)v11);
++v8;
}
while ( (unsigned __int64)v8 <= v9 );
}
}
}
}
if ( ++v3 == 3 )
return result;
}
result = *(_QWORD *)(v2 + 752);
goto LABEL_8;
}
return result;
}