//
// AudioEffectsLayer::create from 0x78f2b4 to 0x78f460 (428 bytes)
//
// 2 xrefs:
// > PlayLayer::setupHasCompleted @ 0x5dc594
// > ??> @ 0x31770
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 AudioEffectsLayer::create()
{
__int64 v0; // x19
int v1; // w21
char *v2; // x0
unsigned int *v4; // x2
int v5; // w1
char *v6; // [xsp+40h] [xbp+40h] BYREF
v0 = operator new(0x250u);
cocos2d::CCLayerColor::CCLayerColor((cocos2d::CCLayerColor *)v0);
*(_QWORD *)(v0 + 544) = 0;
*(_QWORD *)v0 = &off_1177DC0;
*(_QWORD *)(v0 + 320) = off_11782D8;
*(_QWORD *)(v0 + 328) = &off_1178348;
*(_QWORD *)(v0 + 336) = off_1178360;
*(_QWORD *)(v0 + 344) = &off_1178380;
*(_QWORD *)(v0 + 352) = off_11783A0;
*(_QWORD *)(v0 + 408) = &off_11783C8;
*(_QWORD *)(v0 + 432) = &off_1178448;
*(_QWORD *)(v0 + 552) = 0;
*(_QWORD *)(v0 + 560) = 0;
*(_BYTE *)(v0 + 576) = 0;
*(_BYTE *)(v0 + 584) = 0;
*(_DWORD *)(v0 + 568) = 0;
*(_DWORD *)(v0 + 572) = 0;
*(_DWORD *)(v0 + 580) = 0;
sub_D18D28(&v6);
v1 = (unsigned __int8)AudioEffectsLayer::init((AudioEffectsLayer *)v0, &v6);
v2 = v6 - 24;
if ( v6 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v4 = (unsigned int *)(v6 - 8);
do
v5 = __ldaxr(v4);
while ( __stlxr(v5 - 1, v4) );
}
else
{
v5 = *((_DWORD *)v6 - 2);
*((_DWORD *)v6 - 2) = v5 - 1;
}
if ( v5 <= 0 )
operator delete(v2);
}
if ( v1 )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v0);
return v0;
}
else
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v0 + 16LL))(v0);
return 0;
}
}