//
// std::__ndk1::ios_base::imbue from 0x954fa0 to 0x954ff0 (80 bytes)
//
// 2 xrefs:
// > sub_954F10 @ 0x954f36
// > sub_9554EC @ 0x955512
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:05:27 +0000
//
int __fastcall std::ios_base::imbue(std::ios_base *this, const std::locale *a2, int a3)
{
char *v4; // r4
int result; // r0
int v7; // r4
v4 = (char *)a2 + 28;
std::locale::locale(this, (const std::locale *)((char *)a2 + 28));
std::locale::operator=(v4, a3);
result = *((_DWORD *)a2 + 10);
if ( result )
{
v7 = result - 1;
do
{
result = (*(int (__fastcall **)(int, const std::locale *, _DWORD))(*((_DWORD *)a2 + 8) + 4 * v7))(
1,
a2,
*(_DWORD *)(*((_DWORD *)a2 + 9) + 4 * v7));
--v7;
}
while ( v7 != -1 );
}
return result;
}