//
// std::__ndk1::basic_ostream>::sentry::~sentry from 0x4b1e68 to 0x4b1ec4 (92 bytes)
//
// 41 xrefs:
// > std::__ndk1::basic_ostream>::flush @ 0x4c6f58
// > std::__ndk1::basic_ostream>::flush @ 0x4c6f8a
// > std::__ndk1::basic_ostream>::operator<< @ 0x509c50
// > std::__ndk1::basic_ostream>::operator<< @ 0x509cf2
// > std::__ndk1::__put_character_sequence> @ 0x509e60
// > std::__ndk1::__put_character_sequence> @ 0x509ef0
// > std::__ndk1::basic_ostream>::operator<< @ 0x80bb9c
// > pugi::xml_writer_stream::write @ 0x81abee
// > fmt::print @ 0x81d9d8
// > std::__ndk1::basic_ostream>::operator<< @ 0x9596c4
// > std::__ndk1::basic_ostream>::operator<< @ 0x9596f6
// > std::__ndk1::basic_ostream>::operator<< @ 0x959822
// > std::__ndk1::basic_ostream>::operator<< @ 0x959854
// > std::__ndk1::basic_ostream>::operator<< @ 0x959968
// > std::__ndk1::basic_ostream>::operator<< @ 0x95999a
// > std::__ndk1::basic_ostream>::operator<< @ 0x959ab0
// > std::__ndk1::basic_ostream>::operator<< @ 0x959ae2
// > std::__ndk1::basic_ostream>::operator<< @ 0x959bf8
// > std::__ndk1::basic_ostream>::operator<< @ 0x959c2a
// > std::__ndk1::basic_ostream>::operator<< @ 0x959d40
// > std::__ndk1::basic_ostream>::operator<< @ 0x959d72
// > std::__ndk1::basic_ostream>::operator<< @ 0x959e8c
// > std::__ndk1::basic_ostream>::operator<< @ 0x959ebe
// > std::__ndk1::basic_ostream>::operator<< @ 0x959fd8
// > std::__ndk1::basic_ostream>::operator<< @ 0x95a00a
// > std::__ndk1::basic_ostream>::operator<< @ 0x95a128
// > std::__ndk1::basic_ostream>::operator<< @ 0x95a15a
// > std::__ndk1::basic_ostream>::operator<< @ 0x95a278
// > std::__ndk1::basic_ostream>::operator<< @ 0x95a2aa
// > std::__ndk1::basic_ostream>::operator<< @ 0x95a3c0
// > std::__ndk1::basic_ostream>::operator<< @ 0x95a3f2
// > std::__ndk1::basic_ostream>::operator<< @ 0x95a54a
// > std::__ndk1::basic_ostream>::operator<< @ 0x95a578
// > std::__ndk1::basic_ostream>::put @ 0x95a634
// > std::__ndk1::basic_ostream>::put @ 0x95a658
// > std::__ndk1::basic_ostream>::write @ 0x95a704
// > std::__ndk1::basic_ostream>::write @ 0x95a728
// > std::__ndk1::basic_ostream>::seekp @ 0x95a836
// > std::__ndk1::basic_ostream>::seekp @ 0x95a85a
// > std::__ndk1::basic_ostream>::seekp @ 0x95a8ee
// > std::__ndk1::basic_ostream>::seekp @ 0x95a912
//
// 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 11:50:03 +0000
//
// Alternative name is '_ZNSt6__ndk113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev'
int __fastcall std::ostream::sentry::~sentry(int a1)
{
_DWORD *v2; // r3
int v3; // r0
std::ios_base *v4; // r0
v2 = (_DWORD *)(*(_DWORD *)(**(_DWORD **)(a1 + 4) - 12) + *(_DWORD *)(a1 + 4));
if ( v2[6] )
{
if ( !v2[4] && (v2[1] & 0x2000) != 0 && !std::uncaught_exception() )
{
v3 = *(_DWORD *)(*(_DWORD *)(**(_DWORD **)(a1 + 4) - 12) + *(_DWORD *)(a1 + 4) + 24);
if ( (*(int (__fastcall **)(int))(*(_DWORD *)v3 + 24))(v3) == -1 )
{
v4 = (std::ios_base *)(*(_DWORD *)(a1 + 4) + *(_DWORD *)(**(_DWORD **)(a1 + 4) - 12));
std::ios_base::clear(v4, *((_DWORD *)v4 + 4) | 1);
}
}
}
return a1;
}