//
// sub_100016D74 from 0x100016d74 to 0x100016e60 (236 bytes)
//
// 5 xrefs:
// > PlayLayer::updateVisibility @ 0x100145514
// > sub_1003F823C @ 0x1003f86ac
// > LevelEditorLayer::updateVisibility @ 0x1003ffe88
// > sub_100402060 @ 0x100402228
// > LevelEditorLayer::postUpdate @ 0x100405744
//
// 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:19 +0000
//
char *__fastcall sub_100016D74(_QWORD *a1, int a2)
{
char *ColorSprite; // x0
int v5; // w8
int v6; // w21
unsigned int v7; // w8
char *v8; // x0
char *result; // x0
__int16 v10; // [xsp+Ch] [xbp-24h] BYREF
unsigned __int8 v11; // [xsp+Eh] [xbp-22h]
ColorSprite = GJEffectManager::getColorSprite(a1, 1000);
if ( ColorSprite )
v5 = *(unsigned __int16 *)(ColorSprite + 323) | ((unsigned __int8)ColorSprite[325] << 16);
else
v5 = 0xFFFFFF;
v10 = v5;
v11 = BYTE2(v5);
v6 = sub_10004A1DC(&v10, 0.0, -0.2, 0.2);
v7 = HIBYTE(v10) + (unsigned __int8)v10 + v11;
if ( v7 <= 0x95 )
v6 = sub_100016E60(*(_QWORD *)&v6 & 0xFFFFFFLL, *(_QWORD *)&a2 & 0xFFFFFFLL, (float)v7 / 150.0);
v8 = GJEffectManager::getColorSprite(a1, 1007);
v8[322] = BYTE2(v6);
*((_WORD *)v8 + 160) = v6;
result = GJEffectManager::getColorSprite(a1, 1007);
result[325] = BYTE2(v6);
*(_WORD *)(result + 323) = v6;
return result;
}