//
// HSVWidgetPopup::create from 0x100123538 to 0x100123654 (284 bytes)
//
// 4 xrefs:
// > sub_10003BBEC @ 0x10003bc30
// > sub_100057EE8 @ 0x100057fec
// > sub_100057EE8 @ 0x100058028
// > sub_1004818EC @ 0x100481930
//
// 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 10:59:16 +0000
//
_QWORD *__fastcall HSVWidgetPopup::create(__int64 a1, __int64 a2, int a3, __int64 a4, __int64 a5)
{
_QWORD *v10; // x19
int v11; // w0
int v12; // w20
void *__p[2]; // [xsp+0h] [xbp-50h] BYREF
__int64 v15; // [xsp+10h] [xbp-40h]
v10 = operator new(0x2A8u);
FLAlertLayer::FLAlertLayer((__int64)v10);
*v10 = &off_1008D5F70;
v10[40] = off_1008D64C0;
v10[41] = &off_1008D6530;
v10[42] = off_1008D6548;
v10[43] = off_1008D6568;
v10[44] = off_1008D6590;
v10[51] = off_1008D65C0;
v10[54] = off_1008D6640;
v10[68] = off_1008D6660;
if ( *(char *)(a5 + 23) < 0 )
{
sub_1000097D0(__p, *(void **)a5, *(_QWORD *)(a5 + 8));
}
else
{
*(_OWORD *)__p = *(_OWORD *)a5;
v15 = *(_QWORD *)(a5 + 16);
}
v11 = HSVWidgetPopup::init(v10, a1, a2, *(_QWORD *)&a3 & 0xFFFFFFLL, a4, __p);
v12 = v11;
if ( SHIBYTE(v15) < 0 )
{
operator delete(__p[0]);
if ( v12 )
goto LABEL_6;
LABEL_8:
(*(void (__fastcall **)(_QWORD *))(*v10 + 16LL))(v10);
return nullptr;
}
if ( !v11 )
goto LABEL_8;
LABEL_6:
cocos2d::CCObject::autorelease((__int64)v10);
return v10;
}