//
// sub_10046B5E0 from 0x10046b5e0 to 0x10046b690 (176 bytes)
//
// 1 xrefs:
// > OptionsScrollLayer::init @ 0x10046b2bc
//
// 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:05:34 +0000
//
__int64 __fastcall sub_10046B5E0(__int64 a1)
{
__int64 result; // x0
unsigned int *v3; // x9
__int64 v4; // x10
char v5; // w8
__int64 *v6; // x9
unsigned __int64 v7; // x10
__int64 v8; // x11
__int64 v9; // x1
void (__fastcall ***v10)(_QWORD, __int64); // x0
result = *(_QWORD *)(a1 + 672);
if ( result )
{
result = sub_1002E757C(result);
if ( (_DWORD)result )
{
result = *(_QWORD *)(a1 + 672);
if ( result )
{
v3 = *(unsigned int **)(result + 56);
v4 = *v3;
if ( (_DWORD)v4 )
{
v5 = 0;
v6 = *((__int64 **)v3 + 2);
v7 = (unsigned __int64)&v6[v4 - 1];
do
{
v8 = *v6;
if ( !*v6 )
break;
if ( *(_BYTE *)(v8 + 60) == 1 )
{
*(_BYTE *)(v8 + 60) = 0;
v5 = 1;
}
++v6;
}
while ( (unsigned __int64)v6 <= v7 );
if ( (v5 & 1) != 0 )
{
v9 = sub_1002E75A0(result, 0);
v10 = *(void (__fastcall ****)(_QWORD, __int64))(v9 + 88);
if ( v10 )
(**v10)(v10, v9);
return OptionsScrollLayer::setupList(a1, *(_QWORD *)(a1 + 672));
}
}
}
}
}
return result;
}