//
// cocos2d::extension::WsThreadHelper::update from 0xaad694 to 0xaad734 (160 bytes)
//
// 2 xrefs:
// > ??> @ 0x52b90
// > ??> @ 0x11faf58
//
// 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 __fastcall cocos2d::extension::WsThreadHelper::update(cocos2d::extension::WsThreadHelper *this, float a2)
{
pthread_mutex_t *v2; // x21
_QWORD *v4; // x0
_QWORD *v5; // x19
void *v6; // x22
__int64 v7; // x0
v2 = (pthread_mutex_t *)((char *)this + 72);
pthread_mutex_lock((pthread_mutex_t *)((char *)this + 72));
v4 = *((_QWORD **)this + 7);
v5 = (_QWORD *)*v4;
if ( (_QWORD *)*v4 == v4 )
{
pthread_mutex_unlock(v2);
}
else
{
v6 = (void *)v5[2];
sub_CD8DA4(*v4);
operator delete(v5);
pthread_mutex_unlock(v2);
v7 = *((_QWORD *)this + 20);
if ( v7 )
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v7 + 40LL))(v7, v6);
if ( v6 )
operator delete(v6);
}
}