//
// GJSearchObject::getNextPageKey from 0x7169ac to 0x716c68 (700 bytes)
//
// 2 xrefs:
// > LevelBrowserLayer::loadPage @ 0x6e9bc4
// > ??> @ 0x3b6d0
//
// 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
//
const char *GJSearchObject::getNextPageKey(GJSearchObject *a1)
{
SearchType m_searchType; // w24
const char *SearchKey; // x22
void *v4; // x0
void *v5; // x0
void *v6; // x0
unsigned int *v8; // x1
int v9; // w2
unsigned int *v10; // x1
int v11; // w2
unsigned int *v12; // x1
int v13; // w2
__int64 v14; // [xsp+C0h] [xbp+50h] BYREF
__int64 v15; // [xsp+C8h] [xbp+58h] BYREF
__int64 v16; // [xsp+D0h] [xbp+60h] BYREF
m_searchType = a1->m_searchType;
sub_D18D28(&v14);
sub_D18D28(&v15);
sub_D18D28(&v16);
SearchKey = GJSearchObject::getSearchKey(
m_searchType,
&v14,
&v15,
&v16,
a1->m_page + 1,
a1->m_starFilter,
a1->m_uncompletedFilter,
a1->m_featuredFilter,
a1->m_songID,
a1->m_originalFilter,
a1->m_twoPlayerFilter,
a1->m_customSongFilter,
a1->m_songFilter,
a1->m_noStarFilter,
a1->m_coinsFilter,
a1->m_epicFilter,
a1->m_legendaryFilter,
a1->m_mythicFilter,
a1->m_completedFilter,
a1->m_demonFilter,
a1->m_folder,
a1->m_searchMode);
v4 = (void *)(v16 - 24);
if ( (__int64 *)(v16 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v8 = (unsigned int *)(v16 - 8);
do
v9 = __ldaxr(v8);
while ( __stlxr(v9 - 1, v8) );
}
else
{
v9 = *(_DWORD *)(v16 - 8);
*(_DWORD *)(v16 - 8) = v9 - 1;
}
if ( v9 <= 0 )
operator delete(v4);
}
v5 = (void *)(v15 - 24);
if ( (__int64 *)(v15 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v10 = (unsigned int *)(v15 - 8);
do
v11 = __ldaxr(v10);
while ( __stlxr(v11 - 1, v10) );
}
else
{
v11 = *(_DWORD *)(v15 - 8);
*(_DWORD *)(v15 - 8) = v11 - 1;
}
if ( v11 <= 0 )
operator delete(v5);
}
v6 = (void *)(v14 - 24);
if ( (__int64 *)(v14 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v12 = (unsigned int *)(v14 - 8);
do
v13 = __ldaxr(v12);
while ( __stlxr(v13 - 1, v12) );
}
else
{
v13 = *(_DWORD *)(v14 - 8);
*(_DWORD *)(v14 - 8) = v13 - 1;
}
if ( v13 <= 0 )
operator delete(v6);
}
return SearchKey;
}