//
// std::__ndk1::system_error::__init from 0xf85ca4 to 0xf85db4 (272 bytes)
//
// 7 xrefs:
// > std::__ndk1::system_error::system_error @ 0xf85e74
// > std::__ndk1::system_error::system_error @ 0xf85fd4
// > std::__ndk1::system_error::system_error @ 0xf860c0
// > std::__ndk1::system_error::system_error @ 0xf86234
// > std::__ndk1::system_error::system_error @ 0xf863a8
// > std::__ndk1::system_error::system_error @ 0xf864a8
// > ??> @ 0x54928
//
// 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 13:13:53 +0000
//
void __usercall std::system_error::__init(__int64 a1@, unsigned __int8 *a2@, __int64 a3@)
{
unsigned __int64 v6; // x8
unsigned __int64 v7; // x8
char *v8; // x1
void *v9; // x2
void *v10[2]; // [xsp+0h] [xbp-40h] BYREF
void *v11; // [xsp+10h] [xbp-30h]
__int64 v12; // [xsp+18h] [xbp-28h]
v12 = *(_QWORD *)(_ReadStatusReg(TPIDR_EL0) + 40);
if ( *(_DWORD *)a1 )
{
v6 = *a2;
if ( (v6 & 1) != 0 )
v7 = *((_QWORD *)a2 + 1);
else
v7 = v6 >> 1;
if ( v7 )
std::string::append((__int64)a2, ": ", 2u);
(*(void (__fastcall **)(void **__return_ptr))(**(_QWORD **)(a1 + 8) + 48LL))(v10);
if ( ((__int64)v10[0] & 1) != 0 )
v8 = (char *)v11;
else
v8 = (char *)v10 + 1;
if ( ((__int64)v10[0] & 1) != 0 )
v9 = v10[1];
else
v9 = (void *)((unsigned __int64)LOBYTE(v10[0]) >> 1);
std::string::append((__int64)a2, v8, (size_t)v9);
if ( ((__int64)v10[0] & 1) != 0 )
operator delete(v11);
}
*(_QWORD *)(a3 + 16) = *((_QWORD *)a2 + 2);
*(_OWORD *)a3 = *(_OWORD *)a2;
*((_QWORD *)a2 + 1) = 0;
*((_QWORD *)a2 + 2) = 0;
*(_QWORD *)a2 = 0;
_ReadStatusReg(TPIDR_EL0);
}