//
// std::__ndk1::basic_streambuf>::xsgetn from 0x4a9704 to 0x4a973a (54 bytes)
//
// 0 xrefs:
//
// 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:49:57 +0000
//
int __fastcall std::streambuf::xsgetn(_DWORD *a1, int a2, int a3)
{
int i; // r4
_BYTE *v7; // r3
int v8; // r0
for ( i = 0; i < a3; ++i )
{
v7 = (_BYTE *)a1[3];
if ( (unsigned int)v7 >= a1[4] )
{
v8 = (*(int (__fastcall **)(_DWORD *))(*a1 + 40))(a1);
if ( v8 == -1 )
return i;
*(_BYTE *)(a2 + i) = v8;
}
else
{
a1[3] = v7 + 1;
*(_BYTE *)(a2 + i) = *v7;
}
}
return i;
}