//
// GameToolbox::preVisitWithClippingRect from 0x14006db10 to 0x14006dc0d (253 bytes)
//
// 7 xrefs:
// > BoomScrollLayer::visit @ 0x1400414ba
// > CCScrollLayerExt::visit @ 0x14004bb12
// > ScrollingLayer::visit @ 0x140083ca9
// > ParticlePreviewLayer::visit @ 0x1405cb1d3
// > ??> @ 0x1408897ec
// > ??> @ 0x1408897fc
// > ??> @ 0x14091169c
//
// 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:25:48 +0000
//
__int64 __fastcall GameToolbox::preVisitWithClippingRect(__int64 a1, const struct cocos2d::CCRect *a2)
{
__int64 result; // rax
const struct cocos2d::CCRect *v5; // rsi
__int64 v6; // rax
__int64 v7; // rax
__int64 v8; // rax
__int64 v9; // rax
_BYTE v10[16]; // [rsp+30h] [rbp-38h] BYREF
_BYTE v11[16]; // [rsp+40h] [rbp-28h] BYREF
char v12; // [rsp+70h] [rbp+8h] BYREF
char v13; // [rsp+80h] [rbp+18h] BYREF
char v14; // [rsp+88h] [rbp+20h] BYREF
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 344LL))(a1);
if ( (_BYTE)result )
{
glEnable(0xC11u);
v5 = (const struct cocos2d::CCRect *)cocos2d::CCRect::CCRect((cocos2d::CCRect *)v11, a2);
v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 200LL))(a1);
cocos2d::CCPoint::operator+(v6, &v12, v5);
v7 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 504LL))(a1);
if ( v7 )
cocos2d::CCNode::convertToWorldSpace(v7, &v13, &v12);
else
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v14, (const struct cocos2d::CCPoint *)&v12);
cocos2d::CCPoint::operator=(v5, v8);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v10, v5);
cocos2d::CCRect::operator=(a2, v10);
v9 = cocos2d::CCEGLView::sharedOpenGLView();
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 104LL))(v9);
}
return result;
}