//
// PlayLayer::getCurrentPercentInt from 0x100087760 to 0x1000877ec (140 bytes)
//
// 1 xrefs:
// > PauseLayer::setupSessionProgressBar @ 0x1003c28e2
//
// This function is hookable on this platform (idp: pc, 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 12:20:05 +0000
//
__int64 __fastcall PlayLayer::getCurrentPercentInt(__int64 a1, __m128 a2)
{
unsigned int *v2; // rax
int v3; // ecx
float v4; // xmm1_4
if ( *(_BYTE *)(a1 + 12238) == 1 )
{
a2.f32[0] = (float)*(int *)(*(_QWORD *)(a1 + 2152) + 832LL);
}
else
{
v2 = (unsigned int *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 3256) + 192LL))(*(_QWORD *)(a1 + 3256));
v3 = *(_DWORD *)(*(_QWORD *)(a1 + 1936) + 1232LL);
if ( v3 <= 0 )
{
a2 = (__m128)*v2;
v4 = *(float *)(a1 + 12600);
}
else
{
a2.f32[0] = (float)*(int *)(a1 + 952);
v4 = (float)(2 * v3);
}
a2.f32[0] = fminf(fmaxf((float)(a2.f32[0] / v4) * 100.0, 0.0), 100.0);
}
return (unsigned int)(int)_mm_round_ss(a2, a2, 9).f32[0];
}