//
// sub_56AE98 from 0x56ae98 to 0x56af1e (134 bytes)
//
// 1 xrefs:
// > MusicDownloadManager::onDownloadNewsFeedCompleted @ 0x57a6f6
//
// 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:52:32 +0000
//
unsigned int __fastcall sub_56AE98(unsigned __int8 *a1)
{
unsigned int v1; // r2
unsigned int v2; // r2
unsigned __int8 *v3; // r6
unsigned int v4; // r3
unsigned int i; // r5
unsigned __int8 *v6; // r1
unsigned int v7; // r1
int v8; // r2
unsigned __int8 *v9; // r1
v1 = *a1;
if ( (v1 & 1) != 0 )
{
v2 = *((_DWORD *)a1 + 1);
v3 = *((unsigned __int8 **)a1 + 2);
}
else
{
v2 = v1 >> 1;
v3 = a1 + 1;
}
v4 = v2;
for ( i = v2; ; i -= 4 )
{
v6 = &v3[v2 - i];
if ( i <= 3 )
break;
v4 = (1540483477 * v4)
^ (1540483477 * ((1540483477 * *(_DWORD *)v6) ^ ((unsigned int)(1540483477 * *(_DWORD *)v6) >> 24)));
}
v7 = v2 & 0xFFFFFFFC;
v8 = v2 & 3;
v9 = &v3[v7];
switch ( v8 )
{
case 2:
goto LABEL_12;
case 3:
v4 ^= v9[2] << 16;
LABEL_12:
v4 ^= v9[1] << 8;
LABEL_13:
v4 = 1540483477 * (v4 ^ *v9);
return (1540483477 * (v4 ^ (v4 >> 13))) ^ ((1540483477 * (v4 ^ (v4 >> 13))) >> 15);
case 1:
goto LABEL_13;
}
return (1540483477 * (v4 ^ (v4 >> 13))) ^ ((1540483477 * (v4 ^ (v4 >> 13))) >> 15);
}