//
// GJGameLevel::setLastBuildPageForTab from 0x701eb0 to 0x701fdc (300 bytes)
//
// 2 xrefs:
// > EditorUI::onPause @ 0x6963cc
// > ??> @ 0x31bd8
//
// 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
//
// local variable allocation has failed, the output may be wrong!
void GJGameLevel::setLastBuildPageForTab(GJGameLevel *a1, int a2, int a3)
{
cocos2d::CCDictionary *m_lastBuildSave; // x23
cocos2d::CCObject *v4; // x22
cocos2d::CCString *v5; // x0
char *CString; // x0
void *v7; // x0
unsigned int *v8; // x2
int v9; // w1
__int64 v11; // [xsp+60h] [xbp+60h] BYREF
m_lastBuildSave = a1->m_lastBuildSave;
v4 = (cocos2d::CCObject *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", *(const char **)&a2);
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)(unsigned int)a3);
CString = (char *)cocos2d::CCString::getCString(v5);
sub_D153B8((int)&v11, CString);
cocos2d::CCDictionary::setObject((int)m_lastBuildSave, v4);
v7 = (void *)(v11 - 24);
if ( (__int64 *)(v11 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v8 = (unsigned int *)(v11 - 8);
do
v9 = __ldaxr(v8);
while ( __stlxr(v9 - 1, v8) );
}
else
{
v9 = *(_DWORD *)(v11 - 8);
*(_DWORD *)(v11 - 8) = v9 - 1;
}
if ( v9 <= 0 )
operator delete(v7);
}
}