//
// BoomScrollLayer::pageNumberForPosition from 0x10038f8c0 to 0x10038f990 (208 bytes)
//
// 0 xrefs:
//
// 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:29:13 +0000
//
__int64 __fastcall BoomScrollLayer::pageNumberForPosition(__int64 a1)
{
__m128 v1; // xmm1
__m128 v2; // xmm0
int v3; // r14d
v1 = _mm_xor_ps(
(__m128)*(unsigned int *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 504) + 192LL))(*(_QWORD *)(a1 + 504)),
(__m128)xmmword_100A035F0);
v1.f32[0] = v1.f32[0]
/ (float)(*(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 328LL))(a1) - *(float *)(a1 + 592));
v2 = _mm_round_ss((__m128)0LL, v1, 10);
v3 = ((float)(_mm_cvtepi32_ps(_mm_cvttps_epi32(v2)).f32[0] - v1.f32[0]) < 0.5) + (int)v2.f32[0] - 1;
if ( !*(_BYTE *)(a1 + 436) )
{
if ( v3 <= 0 )
v3 = 0;
if ( (int)(sub_1007FEF90(*(_QWORD *)(a1 + 32 * (*(unsigned __int8 *)(a1 + 456) ^ 1u) + 448)) - 1) <= v3 )
return (unsigned int)(sub_1007FEF90(*(_QWORD *)(a1 + 32 * (*(unsigned __int8 *)(a1 + 456) ^ 1u) + 448)) - 1);
}
return (unsigned int)v3;
}