//
// sub_18005E490 from 0x18005e490 to 0x18005e56e (222 bytes)
//
// 5 xrefs:
// > sub_18005E490 @ 0x18005e54b
// > cocos2d::CCClippingNode::visit @ 0x18005e85e
// > ??> @ 0x180142404
// > ??> @ 0x180142414
// > ??> @ 0x1801bd318
//
// 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:21:50 +0000
//
__int64 __fastcall sub_18005E490(__int64 a1, __int64 a2)
{
__int64 result; // rax
_QWORD *v5; // rbx
__int64 v6; // rdi
unsigned __int64 i; // rdi
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1);
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 480LL))(a1);
if ( result )
{
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 480LL))(a1);
if ( result )
{
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 480LL))(a1);
if ( **(_DWORD **)(result + 56) )
{
v5 = *(_QWORD **)(*(_QWORD *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 480LL))(a1) + 56) + 16LL);
v6 = *(_QWORD *)(*(_QWORD *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 480LL))(a1) + 56) + 16LL);
result = **(unsigned int **)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 480LL))(a1) + 56);
for ( i = v6 + 8 * result - 8; (unsigned __int64)v5 <= i; ++v5 )
{
if ( !*v5 )
break;
result = sub_18005E490(*v5, a2);
}
}
}
}
return result;
}