//
// sub_100057C10 from 0x100057c10 to 0x100057d04 (244 bytes)
//
// 1 xrefs:
// > CustomizeObjectLayer::init @ 0x100056088
//
// 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 10:57:46 +0000
//
__int64 __fastcall sub_100057C10(__int64 a1)
{
__int64 v2; // x0
__int64 result; // x0
__int64 v4; // x20
__int64 v5; // x0
__int64 v6; // x21
v2 = *(_QWORD *)(a1 + 688);
if ( v2 )
{
*(_BYTE *)(a1 + 752) = GameObject::getRelativeSpriteColor(v2, 1) != 0;
result = GameObject::getRelativeSpriteColor(*(_QWORD *)(a1 + 688), 2);
*(_BYTE *)(a1 + 753) = result != 0;
*(_BYTE *)(a1 + 754) = *(_BYTE *)(*(_QWORD *)(a1 + 688) + 1020LL);
}
else
{
*(_BYTE *)(a1 + 754) = 1;
result = sub_1002E757C(*(_QWORD *)(a1 + 696));
if ( (_DWORD)result )
{
v4 = 0;
do
{
v5 = sub_1002E75A0(*(_QWORD *)(a1 + 696), v4);
v6 = v5;
if ( *(_BYTE *)(a1 + 752) != 1 )
*(_BYTE *)(a1 + 752) = GameObject::getRelativeSpriteColor(v5, 1) != 0;
if ( (*(_BYTE *)(a1 + 753) & 1) == 0 )
*(_BYTE *)(a1 + 753) = GameObject::getRelativeSpriteColor(v6, 2) != 0;
if ( (*(_BYTE *)(v6 + 1020) & 1) == 0 )
*(_BYTE *)(a1 + 754) = 0;
v4 = (unsigned int)(v4 + 1);
result = sub_1002E757C(*(_QWORD *)(a1 + 696));
}
while ( (unsigned int)v4 < (unsigned int)result );
}
}
return result;
}