//
// std::__ndk1::basic_istream>::get from 0x956c40 to 0x956cfc (188 bytes)
//
// 1 xrefs:
// > std::__ndk1::basic_istream>::get @ 0x956d0c
//
// 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:29 +0000
//
int __fastcall std::istream::get(_DWORD *a1)
{
int v2; // r0
__int64 v3; // kr00_8
int v4; // r2
bool v6; // [sp+0h] [bp-10h] BYREF
a1[1] = 0;
std::istream::sentry::sentry(&v6, a1, 1);
if ( !v6 )
return -1;
v2 = *(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 24);
v3 = *(_QWORD *)(v2 + 12);
if ( (_DWORD)v3 == HIDWORD(v3) )
{
v4 = (*(int (__fastcall **)(int))(*(_DWORD *)v2 + 40))(v2);
if ( v4 != -1 )
goto LABEL_5;
std::ios_base::clear(
(std::ios_base *)((char *)a1 + *(_DWORD *)(*a1 - 12)),
*(_DWORD *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 16) | 6);
return -1;
}
*(_DWORD *)(v2 + 12) = v3 + 1;
v4 = *(unsigned __int8 *)v3;
LABEL_5:
a1[1] = 1;
return v4;
}