//
// cocos2d::ZipUtils::ccChecksumPvr from 0x1800a6c90 to 0x1800a6d2d (157 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c1d10
//
// 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 11:22:16 +0000
//
__int64 __fastcall cocos2d::ZipUtils::ccChecksumPvr(const unsigned int *a1, int a2)
{
__int64 result; // rax
int v3; // r8d
int v5; // r10d
__m128 v6; // xmm2
__m128 v7; // xmm1
__m128 v8; // xmm0
__m128 v9; // xmm1
__m128 v10; // xmm1
__int64 v11; // rcx
result = 0;
v3 = 128;
v5 = 0;
if ( a2 < 128 )
v3 = a2;
if ( v3 >= 8 )
{
v6 = 0;
v7 = 0;
do
{
v5 += 8;
v6 = _mm_xor_ps(v6, (__m128)_mm_loadu_si128((const __m128i *)&a1[result]));
v8 = (__m128)_mm_loadu_si128((const __m128i *)&a1[result + 4]);
result += 8;
v7 = _mm_xor_ps(v7, v8);
}
while ( result < (int)(v3 - (v3 & 0x80000007)) );
v9 = _mm_xor_ps(v7, v6);
v10 = _mm_xor_ps(v9, (__m128)_mm_srli_si128((__m128i)v9, 8));
result = (unsigned int)_mm_cvtsi128_si32((__m128i)_mm_xor_ps(v10, (__m128)_mm_srli_si128((__m128i)v10, 4)));
}
v11 = v5;
if ( v5 < (__int64)v3 )
{
do
result = a1[v11++] ^ (unsigned int)result;
while ( v11 < v3 );
}
return result;
}