//
// sub_10000D9C4 from 0x10000d9c4 to 0x10000dab8 (244 bytes)
//
// 4 xrefs:
// > sub_1000100D4 @ 0x100010110
// > GJBaseGameLayer::updateColor @ 0x10028da88
// > sub_100402E54 @ 0x100402ef4
// > sub_1004030CC @ 0x10040316c
//
// 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:15 +0000
//
__int64 __fastcall sub_10000D9C4(__int64 result, float a2)
{
__int64 v2; // x19
float v3; // s0
float v4; // s9
float v5; // s0
float v6; // s8
int v7; // s1
if ( (*(_BYTE *)(result + 56) & 1) == 0 )
{
v2 = result;
if ( (*(_BYTE *)(result + 57) & 1) == 0 )
{
v3 = *(float *)(result + 68) + a2;
*(float *)(result + 68) = v3;
v4 = v3 + *(float *)(result + 164);
v5 = *(float *)(result + 80);
if ( v4 < v5 )
{
if ( v4 <= 0.0 )
{
LABEL_9:
*(_WORD *)(result + 58) = *(_WORD *)(result + 72);
*(_BYTE *)(result + 60) = *(_BYTE *)(result + 74);
v7 = *(_DWORD *)(result + 96);
goto LABEL_10;
}
v6 = v4 / v5;
if ( (float)(v4 / v5) < 1.0 )
{
if ( v6 > 0.0 )
{
result = GameToolbox::multipliedColorValue(
*(unsigned __int16 *)(result + 72) | ((unsigned __int64)*(unsigned __int8 *)(result + 74) << 16),
*(unsigned __int16 *)(result + 75) | ((unsigned __int64)*(unsigned __int8 *)(result + 77) << 16),
v4 / v5);
*(_WORD *)(v2 + 58) = result;
*(_BYTE *)(v2 + 60) = BYTE2(result);
*(float *)(v2 + 64) = *(float *)(v2 + 96)
+ (float)((float)(*(float *)(v2 + 100) - *(float *)(v2 + 96)) * v6);
v5 = *(float *)(v2 + 80);
LABEL_11:
*(_BYTE *)(v2 + 56) = v4 >= v5;
return result;
}
goto LABEL_9;
}
}
*(_WORD *)(result + 58) = *(_WORD *)(result + 75);
*(_BYTE *)(result + 60) = *(_BYTE *)(result + 77);
v7 = *(_DWORD *)(result + 100);
LABEL_10:
*(_DWORD *)(result + 64) = v7;
goto LABEL_11;
}
}
return result;
}