//
// sub_10051AFD0 from 0x10051afd0 to 0x10051b070 (160 bytes)
//
// 21 xrefs:
// > sub_1005048D8 @ 0x100505104
// > sub_100505178 @ 0x1005052d4
// > sub_100505304 @ 0x10050535c
// > sub_10051AD08 @ 0x10051ad10
// > sub_10051AD14 @ 0x10051ad1c
// > sub_10051B164 @ 0x10051b184
// > ReportQueuePopup::init @ 0x100523574
// > sub_100523640 @ 0x10052368c
// > sub_100523690 @ 0x100523694
// > ReportQueuePopup::rebuildContent @ 0x100524664
// > ReportQueuePopup::dropdownSelectionChanged @ 0x10052467c
// > sub_100524680 @ 0x10052469c
// > sub_100541E6C @ 0x100541eb8
// > sub_1005428CC @ 0x100542940
// > AccountReviewPopup::rebuildContent @ 0x100545144
// > AccountReviewPopup::dropdownSelectionChanged @ 0x10054515c
// > sub_100545160 @ 0x10054517c
// > AccountReviewPopup::adminClearReportsFinished @ 0x10054a9a4
// > sub_10054B218 @ 0x10054b264
// > AccountReviewPopup::adminDeleteCommentsFinished @ 0x10054b50c
// > AccountReviewPopup::onClosePopup @ 0x10054b68c
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:07:08 +0000
//
__int64 __fastcall sub_10051AFD0(__int64 result, int a2)
{
int v2; // w20
__int64 v3; // x19
__int64 v4; // x0
__int64 v5; // x0
__int64 v6; // x0
if ( (a2 & 0x80000000) == 0 )
{
v2 = a2;
v3 = result;
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)result + 1344LL))(result) )
{
*(_DWORD *)(v3 + 676) = v2;
v2 = -1;
}
*(_DWORD *)(v3 + 680) = v2;
(*(void (__fastcall **)(__int64))(*(_QWORD *)v3 + 1352LL))(v3);
v4 = *(_QWORD *)(v3 + 760);
if ( v4 )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v4 + 520LL))(v4);
*(_QWORD *)(v3 + 760) = 0;
}
v5 = *(_QWORD *)(v3 + 720);
if ( v5 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v5 + 344LL))(v5, 0);
v6 = *(_QWORD *)(v3 + 728);
if ( v6 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v6 + 344LL))(v6, 0);
return sub_10051B0F8(v3);
}
return result;
}