//
// sub_373778 from 0x373778 to 0x3737cc (84 bytes)
//
// 2 xrefs:
// > drawTrace @ 0x3783f2
// > drawTrace @ 0x3784ec
//
// 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_373778(int a1, int *a2, _QWORD *a3)
{
unsigned int v4; // r7
int v7; // r8
_QWORD **v8; // r0
char v9; // r3
int v10; // r0
_DWORD *inserted; // r0
v4 = *(_DWORD *)a3;
v7 = *(_DWORD *)a3 % (unsigned int)a2[1];
v8 = sub_3653B2(a2, v7, a3);
if ( v8 && *v8 )
{
*(_DWORD *)a1 = *v8;
v9 = 0;
}
else
{
v10 = operator new(0x10u);
*(_DWORD *)v10 = 0;
*(_QWORD *)(v10 + 8) = *a3;
inserted = std::_Hashtable,std::__detail::_Identity,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits>::_M_insert_unique_node(
a2,
v7,
v4,
(_DWORD *)v10);
v9 = 1;
*(_DWORD *)a1 = inserted;
}
*(_BYTE *)(a1 + 4) = v9;
return a1;
}