//
// SetupTriggerPopup::onCustomEaseRate from 0x9e3d2c to 0x9e3f50 (548 bytes)
//
// 3 xrefs:
// > ??> @ 0x968a0
// > SetupTriggerPopup::createCustomEasingControls @ 0x9eae50
// > ??> @ 0x122d228
//
// 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
//
void SetupTriggerPopup::onCustomEaseRate(SetupTriggerPopup *a1, cocos2d::CCObject *a2)
{
float (__fastcall *getValue)(SetupTriggerPopup *__hidden, int); // x25
unsigned int v5; // w0
float v6; // s8
__int64 v7; // x21
void *v8; // x0
void *v9; // x0
void (__fastcall *v10)(__int64, _QWORD); // x19
unsigned int v11; // w0
unsigned int *v12; // x1
int v13; // w2
unsigned int *v14; // x1
int v15; // w2
__int64 v16; // [xsp+68h] [xbp+68h] BYREF
__int64 v17; // [xsp+70h] [xbp+70h] BYREF
getValue = a1->getValue;
v5 = a2->getTag(a2);
v6 = getValue(a1, v5);
sub_D153B8((int)&v16, "Easing Rate");
sub_D153B8((int)&v17, &byte_F288A0);
v7 = ConfigureValuePopup::create(
(__int64)&a1->ConfigureValuePopupDelegate,
v6,
0.1,
4.0,
(__int64)&v16,
(__int64)&v17,
0);
v8 = (void *)(v17 - 24);
if ( (__int64 *)(v17 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v12 = (unsigned int *)(v17 - 8);
do
v13 = __ldaxr(v12);
while ( __stlxr(v13 - 1, v12) );
}
else
{
v13 = *(_DWORD *)(v17 - 8);
*(_DWORD *)(v17 - 8) = v13 - 1;
}
if ( v13 <= 0 )
operator delete(v8);
}
v9 = (void *)(v16 - 24);
if ( (__int64 *)(v16 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v14 = (unsigned int *)(v16 - 8);
do
v15 = __ldaxr(v14);
while ( __stlxr(v15 - 1, v14) );
}
else
{
v15 = *(_DWORD *)(v16 - 8);
*(_DWORD *)(v16 - 8) = v15 - 1;
}
if ( v15 <= 0 )
operator delete(v9);
}
v10 = *(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 72LL);
v11 = a2->getTag(a2);
v10(v7, v11);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 1288LL))(v7);
}