//
// cocos2d::CCPrettyPrinter::visit_1 from 0x1004aecf0 to 0x1004af0fe (1038 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b55ba0
//
// 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 12:30:58 +0000
//
__int64 __fastcall cocos2d::CCPrettyPrinter::visit_1(__int64 a1, __int64 a2)
{
unsigned int v2; // edx
const std::string::value_type *v3; // rsi
std::string::size_type v4; // rdx
int v5; // r12d
bool v6; // zf
std::string *v7; // r14
int i; // r13d
__int64 v9; // rbx
char v10; // al
std::string::value_type *v11; // rdx
int v12; // eax
int v13; // r12d
const std::string::value_type *v14; // rsi
std::string::size_type v15; // rdx
int v16; // r12d
int v17; // r14d
unsigned int v18; // edx
std::string::value_type *v19; // rsi
std::string::size_type v20; // rdx
__int64 (__fastcall **v22)(); // [rsp+0h] [rbp-4A0h] BYREF
int v23; // [rsp+8h] [rbp-498h]
std::string v24[2]; // [rsp+10h] [rbp-490h] BYREF
std::string::value_type v25[16]; // [rsp+40h] [rbp-460h] BYREF
void *__p; // [rsp+50h] [rbp-450h]
__int64 v27; // [rsp+60h] [rbp-440h]
std::string *v28; // [rsp+68h] [rbp-438h]
std::string::value_type *v29; // [rsp+70h] [rbp-430h]
std::string *v30; // [rsp+78h] [rbp-428h]
std::string::value_type __s[1008]; // [rsp+80h] [rbp-420h] BYREF
v27 = a2;
v30 = (std::string *)(a1 + 40);
std::string::append((std::string *)(a1 + 40), "\n");
v2 = *(unsigned __int8 *)(a1 + 16);
v3 = (const std::string::value_type *)(a1 + 17);
v29 = (std::string::value_type *)(a1 + 17);
if ( (v2 & 1) != 0 )
{
v3 = *(const std::string::value_type **)(a1 + 32);
v4 = *(_QWORD *)(a1 + 24);
}
else
{
v4 = v2 >> 1;
}
std::string::append(v30, v3, v4);
std::string::append(v30, "\n");
v5 = *(_DWORD *)(a1 + 8) + 1;
*(_DWORD *)(a1 + 8) = v5;
v6 = (*(_BYTE *)(a1 + 16) & 1) == 0;
v28 = (std::string *)(a1 + 16);
if ( v6 )
{
*v29 = 0;
*(_BYTE *)(a1 + 16) = 0;
v7 = v28;
if ( v5 <= 0 )
goto LABEL_10;
}
else
{
**(_BYTE **)(a1 + 32) = 0;
*(_QWORD *)(a1 + 24) = 0;
v5 = *(_DWORD *)(a1 + 8);
v7 = v28;
if ( v5 <= 0 )
goto LABEL_10;
}
for ( i = 0; i < v5; ++i )
{
std::string::append(v7, "\t");
v5 = *(_DWORD *)(a1 + 8);
}
LABEL_10:
__bzero(__s, 1000);
if ( v27 )
{
v9 = *(_QWORD *)(v27 + 56);
if ( v9 )
{
v10 = 1;
while ( 1 )
{
v27 = *(_QWORD *)(v9 + 288);
if ( (v10 & 1) == 0 )
std::string::append(v30, "\n");
v11 = v29;
if ( (*(_BYTE *)&v28->__r_.__value_.__s.0 & 1) != 0 )
v11 = *(std::string::value_type **)(a1 + 32);
sprintf(__s, "%s%s: ", v11, (const char *)v9);
std::string::append(v30, __s);
v12 = *(_DWORD *)(a1 + 8);
v22 = &off_100B55B58;
memset(v24, 0, sizeof(v24));
v23 = v12;
if ( v12 > 0 )
{
v13 = 0;
do
{
std::string::append(v24, "\t");
++v13;
}
while ( v13 < v23 );
}
(*(void (__fastcall **)(_QWORD, __int64 (__fastcall ***)()))(**(_QWORD **)(v9 + 264) + 32LL))(
*(_QWORD *)(v9 + 264),
&v22);
if ( (*(_BYTE *)&v24[1].__r_.__value_.__s.0 & 1) != 0 )
{
sub_10001AD30(v25, v24[1].__r_.__value_.__l.__data_, v24[1].__r_.__value_.__l.__size_);
}
else
{
__p = v24[1].__r_.__value_.__l.__data_;
*(_OWORD *)v25 = *(_OWORD *)&v24[1].__r_.__value_.__l.0;
}
if ( (v25[0] & 1) != 0 )
{
v14 = (const std::string::value_type *)__p;
v15 = *(_QWORD *)&v25[8];
}
else
{
v15 = (unsigned __int8)v25[0] >> 1;
v14 = &v25[1];
}
std::string::append(v30, v14, v15);
if ( (v25[0] & 1) != 0 )
{
operator delete(__p);
v22 = &off_100B55B58;
if ( (*(_BYTE *)&v24[1].__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_29:
if ( (*(_BYTE *)&v24[0].__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_33;
goto LABEL_13;
}
}
else
{
v22 = &off_100B55B58;
if ( (*(_BYTE *)&v24[1].__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_29;
}
operator delete(v24[1].__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v24[0].__r_.__value_.__s.0 & 1) != 0 )
LABEL_33:
operator delete(v24[0].__r_.__value_.__l.__data_);
LABEL_13:
v10 = 0;
v9 = v27;
if ( !v27 )
{
v5 = *(_DWORD *)(a1 + 8);
break;
}
}
}
}
v16 = v5 - 1;
*(_DWORD *)(a1 + 8) = v16;
if ( (*(_BYTE *)(a1 + 16) & 1) != 0 )
{
**(_BYTE **)(a1 + 32) = 0;
*(_QWORD *)(a1 + 24) = 0;
if ( *(int *)(a1 + 8) <= 0 )
goto LABEL_41;
LABEL_39:
v17 = 0;
do
{
std::string::append(v28, "\t");
++v17;
}
while ( v17 < *(_DWORD *)(a1 + 8) );
goto LABEL_41;
}
*v29 = 0;
v28->__r_.__value_.__s.0 = 0;
if ( v16 > 0 )
goto LABEL_39;
LABEL_41:
std::string::append(v30, "\n");
v18 = *(unsigned __int8 *)(a1 + 16);
if ( (v18 & 1) != 0 )
{
v19 = *(std::string::value_type **)(a1 + 32);
v20 = *(_QWORD *)(a1 + 24);
}
else
{
v20 = v18 >> 1;
v19 = v29;
}
std::string::append(v30, v19, v20);
std::string::append(v30, "");
return __stack_chk_guard;
}