//
// ReadArchive::processGOArr from 0x1405288b0 to 0x140528b55 (677 bytes)
//
// 3 xrefs:
// > deserializeCheckpoint @ 0x14053183d
// > sub_140540A70 @ 0x140542b9f
// > ??> @ 0x14092b688
//
// 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:33:40 +0000
//
// Hidden C++ exception states: #wind=3
void __fastcall ReadArchive::processGOArr(__int64 *a1, cocos2d::CCArray **a2)
{
__int64 v4; // r8
__int64 v5; // rdx
size_t *v6; // r8
void *v7; // rdx
_QWORD *v8; // rax
__int64 v9; // rbx
__int64 v10; // rcx
const char *v11; // rcx
int v12; // ecx
const char *v13; // rcx
unsigned int v14; // r8d
__int64 *v15; // rcx
__int64 v16; // rax
__int64 v17; // rdx
__int64 v18; // rcx
struct cocos2d::CCObject *v19; // rdx
void *v20; // rcx
__int128 v21; // [rsp+30h] [rbp-50h] BYREF
__int64 v22; // [rsp+40h] [rbp-40h]
int v23; // [rsp+48h] [rbp-38h]
_QWORD *v24; // [rsp+50h] [rbp-30h]
void *Block[2]; // [rsp+58h] [rbp-28h] BYREF
__m128i si128; // [rsp+68h] [rbp-18h]
*(_OWORD *)Block = 0;
si128 = _mm_load_si128((const __m128i *)&Size);
LOBYTE(Block[0]) = 0;
v4 = *a1;
v5 = *((int *)a1 + 6);
if ( (int)v5 < (int)((a1[1] - *a1) >> 5) )
{
*((_DWORD *)a1 + 6) = v5 + 1;
v6 = (size_t *)(32 * v5 + v4);
if ( Block != (void **)v6 )
{
v7 = v6;
if ( v6[3] > 0xF )
v7 = (void *)*v6;
sub_1400405A0(Block, v7, v6[2]);
}
}
v8 = (_QWORD *)a1[4];
v21 = 0;
v22 = 0;
v23 = 0;
v24 = v8;
sub_1401C5360((__int64 *)Block, (unsigned __int8 *)&word_14070D07C, (__int64 *)&v21);
v9 = 0;
v10 = v23;
if ( v23 < (int)((__int64)(*((_QWORD *)&v21 + 1) - v21) >> 5) )
{
++v23;
v11 = (const char *)(32 * v10 + v21);
if ( *((_QWORD *)v11 + 3) > 0xFu )
v11 = *(const char **)v11;
v9 = (unsigned int)atoi(v11);
}
cocos2d::CCArray::removeAllObjects(*a2);
if ( (int)v9 > 0 )
{
v12 = v23;
while ( v12 >= (int)((__int64)(*((_QWORD *)&v21 + 1) - v21) >> 5) )
{
LABEL_31:
if ( !--v9 )
goto LABEL_32;
}
v23 = v12 + 1;
v13 = (const char *)(32LL * v12 + v21);
if ( *((_QWORD *)v13 + 3) > 0xFu )
v13 = *(const char **)v13;
v14 = atoi(v13);
if ( !v14 || !v24 )
{
LABEL_30:
v12 = v23;
goto LABEL_31;
}
v15 = (__int64 *)(v24[1826]
+ 16
* (v24[1829]
& (0x100000001B3LL
* (((unsigned __int64)v14 >> 24)
^ (0x100000001B3LL
* ((0x100000001B3LL
* ((0x100000001B3LL * ((unsigned __int8)v14 ^ 0xCBF29CE484222325uLL)) ^ BYTE1(v14)))
^ BYTE2(v14)))))));
v16 = v15[1];
v17 = v24[1824];
if ( v16 != v17 )
{
v18 = *v15;
if ( v14 == *(_DWORD *)(v16 + 16) )
{
LABEL_23:
if ( !v16 )
v16 = v24[1824];
if ( v16 == v17 )
v19 = nullptr;
else
v19 = *(struct cocos2d::CCObject **)(v16 + 24);
if ( v19 )
cocos2d::CCArray::addObject(*a2, v19);
goto LABEL_30;
}
while ( v16 != v18 )
{
v16 = *(_QWORD *)(v16 + 8);
if ( v14 == *(_DWORD *)(v16 + 16) )
goto LABEL_23;
}
}
v16 = 0;
goto LABEL_23;
}
LABEL_32:
sub_1400760C0((__int64 *)&v21);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v20 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v20 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v20 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v20);
}
}