//
// sub_CFE894 from 0xcfe894 to 0xcfe8fc (104 bytes)
//
// 3 xrefs:
// > sub_CCF30C @ 0xccf38c
// > sub_CCF5E4 @ 0xccf634
// > sub_CCF6B8 @ 0xccf6fc
//
// 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 *__fastcall sub_CFE894(__int64 a1)
{
unsigned __int64 v2; // x0
unsigned __int64 v3; // x2
__int64 v4; // x1
void *result; // x0
v2 = sub_CEA974(&qword_124B668);
v3 = *(_QWORD *)(*(_QWORD *)a1 + 16LL);
v4 = *(_QWORD *)(*(_QWORD *)a1 + 8LL);
if ( v2 >= v3 || (v2 = *(_QWORD *)(v4 + 8 * v2)) == 0 )
sub_D13870(v2, v4, v3);
result = _dynamic_cast(
(const void *)v2,
(const struct __class_type_info *)&`typeinfo for'std::locale::facet,
(const struct __class_type_info *)&`typeinfo for'std::num_put>,
0);
if ( !result )
_cxa_bad_cast();
return result;
}