//
// GameLevelManager::uploadLevelComment from 0x724e7c to 0x724f84 (264 bytes)
//
// 2 xrefs:
// > ShareCommentLayer::onShare @ 0x7e663c
// > ??> @ 0xb4198
//
// 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
//
__int64 __fastcall GameLevelManager::uploadLevelComment(GameLevelManager *a1, unsigned int a2, __int64 a3, int a4)
{
void *v6; // x0
unsigned int *v8; // x2
int v9; // w1
__int64 v11; // [xsp+50h] [xbp+50h] BYREF
sub_D18D28(&v11);
GameLevelManager::uploadComment(a1, &v11, 0, a2, a4);
v6 = (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(v6);
}
return _stack_chk_guard;
}