//
// SecretGame01Layer::update from 0x6e3188 to 0x6e3242 (186 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:57:22 +0000
//
int __fastcall SecretGame01Layer::update(int this, float a2)
{
int v2; // r4
int v3; // r5
int (__fastcall *v4)(int, _DWORD); // r6
float v5; // s15
v2 = this;
if ( *(_BYTE *)(this + 336) )
{
v3 = *(_DWORD *)(this + 348);
*(float *)(this + 340) = *(float *)(this + 340) + a2;
v4 = *(int (__fastcall **)(int, _DWORD))(*(_DWORD *)v3 + 64);
v5 = 0.01;
if ( (float)((float)(100.0 / *(float *)(*(int (__fastcall **)(int, _DWORD))(*(_DWORD *)v3 + 164))(v3, LODWORD(a2)))
* (float)(1.0 - (float)(*(float *)(this + 340) / *(float *)(this + 344)))) > 0.01 )
{
v3 = *(_DWORD *)(v2 + 348);
v5 = (float)(100.0 / *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v3 + 164))(v3))
* (float)(1.0 - (float)(*(float *)(v2 + 340) / *(float *)(v2 + 344)));
}
this = v4(v3, LODWORD(v5));
if ( *(float *)(v2 + 340) >= *(float *)(v2 + 344) )
return SecretGame01Layer::showGameOver((SecretGame01Layer *)v2);
}
return this;
}