//
// cocos2d::CCPrettyPrinter::visit from 0xd47ba0 to 0xd47e0c (620 bytes)
//
// 2 xrefs:
// > ??> @ 0x75298
// > ??> @ 0x1516678
//
// This function is hookable on this platform (idp: arm, 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 13:07:36 +0000
//
__int64 __fastcall cocos2d::CCPrettyPrinter::visit(cocos2d::CCPrettyPrinter *this, const cocos2d::CCDictionary *a2)
{
char *v3; // x21
_BYTE *v5; // x26
char *v6; // x1
size_t v7; // x2
__int64 v8; // x24
__int64 v9; // x22
const char *v10; // x2
char *v11; // x1
size_t v12; // x2
__int64 v14[2]; // [xsp+78h] [xbp+78h] BYREF
void *v15; // [xsp+88h] [xbp+88h]
_QWORD v16[2]; // [xsp+90h] [xbp+90h] BYREF
char v17; // [xsp+A0h] [xbp+A0h]
void *v18; // [xsp+B0h] [xbp+B0h]
char v19; // [xsp+B8h] [xbp+B8h]
void *v20; // [xsp+C8h] [xbp+C8h]
char v21[1000]; // [xsp+D0h] [xbp+D0h] BYREF
v3 = (char *)this + 40;
v5 = (char *)this + 16;
std::string::append((__int64)this + 40, &byte_11AAA48);
if ( (*((_BYTE *)this + 16) & 1) != 0 )
{
v6 = *((char **)this + 4);
v7 = *((_QWORD *)this + 3);
}
else
{
v6 = (char *)this + 17;
v7 = *((_BYTE *)this + 16) >> 1;
}
std::string::append((__int64)v3, v6, v7);
std::string::append((__int64)v3, "\n");
cocos2d::CCPrettyPrinter::setIndentLevel(this, *((_DWORD *)this + 2) + 1);
memset(v21, 0, sizeof(v21));
if ( a2 )
{
v8 = *((_QWORD *)a2 + 7);
if ( v8 )
{
v9 = *(_QWORD *)(v8 + 288);
while ( 1 )
{
v10 = (char *)this + 17;
if ( (*v5 & 1) != 0 )
v10 = *((const char **)this + 4);
sprintf(v21, "%s%s: ", v10, (const char *)v8);
std::string::append((__int64)v3, v21);
cocos2d::CCPrettyPrinter::CCPrettyPrinter((cocos2d::CCPrettyPrinter *)v16, *((_DWORD *)this + 2));
(*(void (__fastcall **)(_QWORD, _QWORD *))(**(_QWORD **)(v8 + 264) + 32LL))(*(_QWORD *)(v8 + 264), v16);
cocos2d::CCPrettyPrinter::getResult((cocos2d::CCPrettyPrinter *)v16, v14);
if ( (v14[0] & 1) != 0 )
{
std::string::append((__int64)v3, v15, v14[1]);
if ( (v14[0] & 1) != 0 )
goto LABEL_19;
}
else
{
std::string::append((__int64)v3, (char *)v14 + 1, LOBYTE(v14[0]) >> 1);
if ( (v14[0] & 1) != 0 )
{
LABEL_19:
operator delete(v15);
v16[0] = off_1516630;
if ( (v19 & 1) == 0 )
goto LABEL_11;
goto LABEL_20;
}
}
v16[0] = off_1516630;
if ( (v19 & 1) == 0 )
goto LABEL_11;
LABEL_20:
operator delete(v20);
LABEL_11:
if ( (v17 & 1) != 0 )
{
operator delete(v18);
if ( !v9 )
break;
}
else if ( !v9 )
{
break;
}
v8 = v9;
v9 = *(_QWORD *)(v9 + 288);
std::string::append((__int64)v3, &byte_11AAA48);
}
}
}
cocos2d::CCPrettyPrinter::setIndentLevel(this, *((_DWORD *)this + 2) - 1);
std::string::append((__int64)v3, &byte_11AAA48);
if ( (*((_BYTE *)this + 16) & 1) != 0 )
{
v11 = *((char **)this + 4);
v12 = *((_QWORD *)this + 3);
}
else
{
v11 = (char *)this + 17;
v12 = *((_BYTE *)this + 16) >> 1;
}
std::string::append((__int64)v3, v11, v12);
std::string::append((__int64)v3, "");
return _stack_chk_guard;
}