//
// EditLevelLayer::uploadActionFailed from 0x6de08c to 0x6de1b8 (300 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'EditLevelLayer::uploadActionFailed @ 0x6de1bc
// > ??> @ 0xafd40
// > ??> @ 0x115be30
//
// 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 EditLevelLayer::uploadActionFailed(EditLevelLayer *a1, int a2, int a3)
{
GJGameLevel *m_level; // x0
UploadActionPopup *m_descriptionPopup; // x21
void *v6; // x0
unsigned int *v7; // x2
int v8; // w1
__int64 v9; // [xsp+40h] [xbp+40h] BYREF
m_level = a1->m_level;
if ( m_level )
{
if ( a2 == m_level->m_levelID.random - m_level->m_levelID.seed )
{
m_descriptionPopup = a1->m_descriptionPopup;
if ( m_descriptionPopup )
{
sub_D153B8((int)&v9, "Failed. Please try again later.");
UploadActionPopup::showFailMessage(m_descriptionPopup, (std::string)&v9);
v6 = (void *)(v9 - 24);
if ( (__int64 *)(v9 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v7 = (unsigned int *)(v9 - 8);
do
v8 = __ldaxr(v7);
while ( __stlxr(v8 - 1, v7) );
}
else
{
v8 = *(_DWORD *)(v9 - 8);
*(_DWORD *)(v9 - 8) = v8 - 1;
}
if ( v8 <= 0 )
operator delete(v6);
}
a1->m_descriptionPopup->m_delegate = nullptr;
a1->m_descriptionPopup = nullptr;
}
}
}
}