//
// sub_774EC0 from 0x774ec0 to 0x774f0c (76 bytes)
//
// 1 xrefs:
// > GameStatsManager::isSecretCoin @ 0x40d0c4
//
// 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
//
int __fastcall sub_774EC0(int *a1, unsigned int a2, unsigned int a3, char *a4)
{
int v5; // r6
unsigned int v7; // r3
unsigned int v8; // r4
size_t v9; // r8
size_t v10; // r2
int result; // r0
v5 = *a1;
v7 = *(_DWORD *)(*a1 - 12);
if ( a2 > v7 )
sub_7732C4("%s: __pos (which is %zu) > this->size() (which is %zu)", "basic_string::compare", a2, v7);
v8 = v7 - a2;
if ( v7 - a2 >= a3 )
v8 = a3;
v9 = strlen(a4);
v10 = v9;
if ( v9 >= v8 )
v10 = v8;
result = memcmp((const void *)(v5 + a2), a4, v10);
if ( !result )
return v8 - v9;
return result;
}