//
// ensureEmotesAreLoaded from 0x1004dc188 to 0x1004dc2e4 (348 bytes)
//
// 9 xrefs:
// > sub_1004DC170 @ 0x1004dc178
// > sub_1004DC300 @ 0x1004dc308
// > sub_1004DC318 @ 0x1004dc320
// > sub_1004DC334 @ 0x1004dc33c
// > EmoteSprite::maxEmotesComment @ 0x1004dc358
// > EmoteSprite::maxEmotesMessage @ 0x1004dc370
// > EmoteSprite::defForName @ 0x1004dc394
// > EmoteSprite::defAtIndex @ 0x1004dc4a8
// > EmoteSprite::attachToLabel @ 0x1004dd010
//
// 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:06:34 +0000
//
void ensureEmotesAreLoaded()
{
__int64 v0; // x8
__int64 v1; // x9
unsigned __int64 v2; // x22
unsigned __int64 v3; // x10
__int64 v4; // x26
char *v5; // x1
__int64 v6; // x9
void *__p[2]; // [xsp+8h] [xbp-68h] BYREF
char v8; // [xsp+1Fh] [xbp-51h]
char v9; // [xsp+27h] [xbp-49h] BYREF
void **v10; // [xsp+28h] [xbp-48h] BYREF
if ( qword_1009F81A0 == qword_1009F81A8 )
{
sub_1004DD228((int)&qword_1009F81A0, &unk_10098CC40);
v0 = qword_1009F81A0;
v1 = qword_1009F81A8;
if ( qword_1009F81A8 != qword_1009F81A0 )
{
v2 = 0;
v3 = 0xAAAAAAAAAAAAAAABLL * ((qword_1009F81A8 - qword_1009F81A0) >> 4);
do
{
v4 = v0 + 48 * v2;
v5 = *(char **)v4;
if ( *(_QWORD *)v4 )
{
if ( *(_BYTE *)(v4 + 27) == 1 )
{
if ( v3 <= 1 )
v6 = 1;
else
v6 = v3;
while ( !*(_QWORD *)v0
|| (*(_BYTE *)(v0 + 27) & 1) != 0
|| *(_DWORD *)(v0 + 8) != *(_DWORD *)(v4 + 8)
|| *(unsigned __int8 *)(v0 + 40) != *(unsigned __int8 *)(v4 + 40) )
{
v0 += 48;
if ( !--v6 )
goto LABEL_15;
}
v4 = v0;
}
LABEL_15:
sub_100009900(__p, v5);
v10 = __p;
*(_QWORD *)(sub_1004DD3A0(&qword_1009F81B8, __p, &unk_10076FF6D, &v10, &v9) + 56) = v4;
if ( v8 < 0 )
operator delete(__p[0]);
v0 = qword_1009F81A0;
v1 = qword_1009F81A8;
}
++v2;
v3 = 0xAAAAAAAAAAAAAAABLL * ((v1 - v0) >> 4);
}
while ( v2 < v3 );
}
}
}