//
// sub_1000F7448 from 0x1000f7448 to 0x1000f76a4 (604 bytes)
//
// 20 xrefs:
// > GameLevelManager::onGetOnlineLevelsCompleted @ 0x10008a9a4
// > GameLevelManager::onGetMapPacksCompleted @ 0x10008afa4
// > GameLevelManager::onGetGJRewardsCompleted @ 0x10008f260
// > GameLevelManager::onGetGJChallengesCompleted @ 0x10008f9e0
// > GameLevelManager::onGetGJDailyLevelStateCompleted @ 0x100090300
// > GameLevelManager::onGetGauntletsCompleted @ 0x100090d2c
// > GameLevelManager::onGetGJSecretRewardCompleted @ 0x1000919fc
// > GameLevelManager::uploadLevel @ 0x10009c818
// > GameLevelManager::uploadLevelList @ 0x10009e580
// > GameLevelManager::downloadLevel @ 0x10009fa38
// > GameLevelManager::processOnDownloadLevelCompleted @ 0x1000a02b8
// > GameLevelManager::processOnDownloadLevelCompleted @ 0x1000a03cc
// > GameLevelManager::rateStars @ 0x1000a0d68
// > GameLevelManager::updateUserScore @ 0x1000a277c
// > GameLevelManager::getLevelLeaderboard @ 0x1000a3b8c
// > GameLevelManager::uploadComment @ 0x1000a7648
// > GameLevelManager::likeItem @ 0x1000aa160
// > GJMultiplayerManager::uploadComment @ 0x1001cf8f0
// > GameManager::recountUserStats @ 0x100319d60
// > GJAccountManager::getShaPassword @ 0x1003a19c8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_1000F7448(__int64 a1, int a2, __int64 a3)
{
int v6; // w23
int v7; // w22
int v8; // w8
uint16x8_t v9; // q4
int8x16_t v10; // q5
uint16x8_t v11; // q6
int8x16_t v12; // q7
uint16x8_t v13; // q16
uint16x8_t v14; // q17
int8x16_t v15; // q6
int8x16_t v16; // q7
int8x16_t v17; // q4
int8x16_t v18; // q5
int8x16_t v21; // q18
int8x16_t v26; // q19
int8x16_t v27; // q5
uint16x8_t v28; // q16
__int64 v29; // x8
int v30; // w9
__int64 i; // x10
int v32; // w9
__int64 result; // x0
int v34; // w8
__int64 v35; // x9
unsigned __int64 v36; // x10
int8x16_t v37; // [xsp+0h] [xbp-190h] BYREF
int8x16_t v38; // [xsp+10h] [xbp-180h]
_OWORD v39[2]; // [xsp+20h] [xbp-170h] BYREF
__int128 v40; // [xsp+140h] [xbp-50h] BYREF
int v41; // [xsp+150h] [xbp-40h]
int8x16x4_t v42; // 0:q0.16,16:q1.16,32:q2.16,48:q3.16
v40 = xmmword_100636B6C;
v41 = -1009589776;
v6 = a2 - 64;
if ( a2 >= 64 )
{
v8 = 0;
do
{
v42 = vld4q_s8((const char *)(a1 + v8));
v7 = v8 + 64;
v9 = vmovl_high_u8((uint8x16_t)v42.val[3]);
v10 = (int8x16_t)vmovl_high_u16(v9);
v11 = vmovl_u8(*(uint8x8_t *)v42.val[3].i8);
v12 = (int8x16_t)vmovl_high_u16(v11);
v13 = vmovl_u8(*(uint8x8_t *)v42.val[2].i8);
v14 = vmovl_high_u8((uint8x16_t)v42.val[2]);
v15 = vorrq_s8((int8x16_t)vshll_n_u16(*(uint16x4_t *)v13.i8, 8u), (int8x16_t)vmovl_u16(*(uint16x4_t *)v11.i8));
v16 = vorrq_s8((int8x16_t)vshll_high_n_u16(v13, 8u), v12);
v17 = vorrq_s8((int8x16_t)vshll_n_u16(*(uint16x4_t *)v14.i8, 8u), (int8x16_t)vmovl_u16(*(uint16x4_t *)v9.i8));
v18 = vorrq_s8((int8x16_t)vshll_high_n_u16(v14, 8u), v10);
_Q16 = (int8x16_t)vmovl_high_u8((uint8x16_t)v42.val[1]);
_Q17 = (int8x16_t)vmovl_u8(*(uint8x8_t *)v42.val[1].i8);
v21 = (int8x16_t)vshll_n_s16(*(int16x4_t *)_Q17.i8, 0x10u);
__asm { SHLL2 V17.4S, V17.8H, #0x10 }
v26 = (int8x16_t)vshll_n_s16(*(int16x4_t *)_Q16.i8, 0x10u);
__asm { SHLL2 V16.4S, V16.8H, #0x10 }
v27 = vorrq_s8(v18, _Q16);
v28 = vmovl_u8(*(uint8x8_t *)v42.val[0].i8);
v42.val[0] = (int8x16_t)vmovl_high_u8((uint8x16_t)v42.val[0]);
v39[0] = vorrq_s8(
vorrq_s8(v17, v26),
(int8x16_t)vshlq_n_s32((int32x4_t)vmovl_u16(*(uint16x4_t *)v42.val[0].i8), 0x18u));
v39[1] = vorrq_s8(v27, (int8x16_t)vshlq_n_s32((int32x4_t)vmovl_high_u16((uint16x8_t)v42.val[0]), 0x18u));
v37 = vorrq_s8(vorrq_s8(v15, v21), (int8x16_t)vshlq_n_s32((int32x4_t)vmovl_u16(*(uint16x4_t *)v28.i8), 0x18u));
v38 = vorrq_s8(vorrq_s8(v16, _Q17), (int8x16_t)vshlq_n_s32((int32x4_t)vmovl_high_u16(v28), 0x18u));
sub_1000F76A4(&v40, &v37);
v8 = v7;
}
while ( v6 >= v7 );
}
else
{
v7 = 0;
}
v29 = (unsigned int)(a2 - v7);
memset(v39, 0, sizeof(v39));
v37 = 0u;
v38 = 0u;
if ( (int)v29 < 1 )
{
v32 = 0;
}
else
{
v30 = 0;
for ( i = 0; i != v29; ++i )
{
*(__int32 *)((char *)v37.i32 + ((unsigned int)i & 0xFFFFFFFC)) |= *(unsigned __int8 *)(a1 + v7 + i) << (~(_BYTE)v30 & 0x18);
v30 += 8;
}
v32 = a2 - v7;
}
*(__int32 *)((char *)v37.i32 + (v32 & 0xFFFFFFFC)) |= 128 << (~(8 * v32) & 0x18);
if ( (int)v29 >= 56 )
{
sub_1000F76A4(&v40, &v37);
v38 = 0u;
memset(v39, 0, 28);
v37 = 0u;
}
HIDWORD(v39[1]) = 8 * a2;
result = sub_1000F76A4(&v40, &v37);
v34 = 480;
v35 = 19;
do
{
*(_BYTE *)(a3 + v35) = *(_DWORD *)((char *)&v40 + ((unsigned int)v35 & 0xFFFFFFFC)) >> (v34 & 0x18);
v34 -= 24;
v36 = v35-- + 1;
}
while ( v36 > 1 );
return result;
}