//
// ShaderLayer::visit from 0x100311014 to 0x100311210 (508 bytes)
//
// 1 xrefs:
// > ??> @ 0x10092c5b8
//
// 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 11:03:13 +0000
//
__int64 __fastcall ShaderLayer::visit(__int64 result)
{
float32x2_t v1; // x29
float32x2_t v2; // x30
float32x2_t v3; // d8
float32x2_t v4; // d9
__int64 v5; // x19
__int64 v6; // x0
float v7; // s8
__int64 v8; // x0
__int64 v9; // x0
__int64 v10; // x0
__int64 v11; // x0
unsigned int *v12; // x20
unsigned __int64 v13; // x8
unsigned __int64 i; // x21
__int64 v15; // x0
__int64 v16; // x20
double v17; // d0
__int64 v18; // x1
__int64 v19; // x0
__int64 v20; // x0
float32x2_t v21; // [xsp+0h] [xbp-70h] BYREF
float32x2_t v22; // [xsp+8h] [xbp-68h] BYREF
float32x2_t v23; // [xsp+10h] [xbp-60h] BYREF
float32x2_t v24; // [xsp+20h] [xbp-50h] BYREF
float32x2_t v25[9]; // [xsp+28h] [xbp-48h] BYREF
if ( *(_BYTE *)(result + 286) == 1 )
{
v25[1] = v4;
v25[2] = v3;
v25[7] = v1;
v25[8] = v2;
v5 = result;
v6 = cocos2d::CCDirector::sharedDirector();
v7 = sub_100207B64(v6);
v8 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::setContentScaleFactor(v8, *(float *)(v5 + 1152));
sub_10030F750(v5, v25);
sub_1000262BC((float *)&v23, *(float *)(v5 + 1184) * 0.5, *(float *)(v5 + 1188) * 0.5);
sub_100026318(v25, &v23, &v24);
kmGLPushMatrix();
v9 = *(_QWORD *)(v5 + 200);
if ( v9 && *(_BYTE *)(v9 + 56) == 1 )
cocos2d::CCGridBase::beforeDraw();
cocos2d::CCNode::transform(v5);
v10 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v5 + 1104) + 656LL))(*(_QWORD *)(v5 + 1104));
cocos2d::CCGLProgram::use(v10);
v11 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v5 + 1104) + 656LL))(*(_QWORD *)(v5 + 1104));
cocos2d::CCGLProgram::setUniformsForBuiltins(v11);
sub_1000262F4(&v23, (double *)&v24);
sub_10030D038(v5, (__int64)&v23);
sub_100310CE4(v5);
cocos2d::CCRenderTexture::beginWithClear_1(*(_QWORD *)(v5 + 1096), 0.0, 0.0, 0.0, 0.0);
v12 = *(unsigned int **)(*(_QWORD *)(v5 + 208) + 56LL);
v13 = *v12;
if ( (_DWORD)v13 )
{
for ( i = 0; i < v13; ++i )
{
v15 = *(_QWORD *)(*((_QWORD *)v12 + 2) + 8 * i);
if ( v15 != *(_QWORD *)(v5 + 1104) )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v15 + 752LL))(v15);
v13 = *v12;
}
}
}
cocos2d::CCRenderTexture::end(*(_QWORD *)(v5 + 1096));
sub_1000264D4(&v23, *(_QWORD *)(v5 + 1104) + 424LL);
v16 = *(_QWORD *)(v5 + 1104);
sub_1000262BC((float *)&v21, v23.f32[0] / *(float *)(v5 + 512), v23.f32[1] / *(float *)(v5 + 516));
*(float32x2_t *)&v17 = sub_100026318(v25, &v21, &v22);
(*(void (__fastcall **)(__int64, float32x2_t *, double))(*(_QWORD *)v16 + 184LL))(v16, &v22, v17);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(v5 + 1104) + 752LL))(*(_QWORD *)(v5 + 1104));
*(_DWORD *)(v5 + 48) = 0;
v19 = *(_QWORD *)(v5 + 200);
if ( v19 )
{
if ( *(_BYTE *)(v19 + 56) == 1 )
v19 = cocos2d::CCGridBase::afterDraw();
}
kmGLPopMatrix(v19, v18);
sub_10030F9E4(v5);
v20 = cocos2d::CCDirector::sharedDirector();
return cocos2d::CCDirector::setContentScaleFactor(v20, v7);
}
return result;
}