//
// LevelSelectLayer::scrollLayerMoved from 0x8c41b0 to 0x8c4348 (408 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'LevelSelectLayer::scrollLayerMoved @ 0x8c4354
// > ??> @ 0x101a88
// > ??> @ 0x145cd18
//
// 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 12:56:32 +0000
//
__int64 __fastcall LevelSelectLayer::scrollLayerMoved(__int64 a1, float *a2)
{
float v3; // s8
int PageCount; // w0
int i; // w22
int v6; // w21
float v7; // s0
int v8; // w21
int v9; // w2
unsigned __int64 ColorValue; // x0
__int64 v11; // x2
__int64 v12; // x0
__int64 v13; // x0
float v15; // [xsp+40h] [xbp+40h]
__int16 v16; // [xsp+50h] [xbp+50h] BYREF
unsigned __int8 v17; // [xsp+52h] [xbp+52h]
__int64 v18; // [xsp+58h] [xbp+58h]
__int64 v19; // [xsp+60h] [xbp+60h]
v3 = (float)-*a2 / *(float *)(a1 + 424);
PageCount = getPageCount();
for ( i = PageCount; v3 < 0.0; v3 = v3 + (float)PageCount )
;
v6 = vcvtms_s32_f32(v3);
*(_DWORD *)(a1 + 460) = v6;
v7 = v3 - (float)v6;
v8 = v6 % PageCount;
v15 = v7;
LevelSelectLayer::updateDeathButton(a1, vcvtms_s32_f32(v3 + 0.5));
v9 = v8 + 1;
if ( i == v8 + 1 )
v9 = 0;
ColorValue = LevelSelectLayer::getColorValue((LevelSelectLayer *)a1, v8, v9, v15);
v11 = *(_QWORD *)(a1 + 432);
v16 = ColorValue;
v17 = BYTE2(ColorValue);
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v11 + 960LL))(v11, &v16);
v12 = *(_QWORD *)(a1 + 440);
BYTE1(v18) = (unsigned int)(float)((float)HIBYTE(v16) * 0.8);
BYTE2(v18) = (unsigned int)(float)((float)v17 * 0.8);
LOBYTE(v18) = (unsigned int)(float)((float)(unsigned __int8)v16 * 0.8);
GJGroundLayer::updateGround01Color(v12, v18);
v13 = *(_QWORD *)(a1 + 440);
BYTE1(v19) = (unsigned int)(float)((float)HIBYTE(v16) * 0.9);
BYTE2(v19) = (unsigned int)(float)((float)v17 * 0.9);
LOBYTE(v19) = (unsigned int)(float)((float)(unsigned __int8)v16 * 0.9);
GJGroundLayer::updateGround02Color(v13, v19);
return _stack_chk_guard;
}