//
// std::__ndk1::basic_filebuf>::seekoff from 0x80a680 to 0x80a718 (152 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 12:01:29 +0000
//
int __fastcall std::filebuf::seekoff(int a1, int a2, __int64 a3, int a4)
{
int v7; // r0
int v8; // r9
int v9; // r2
__off_t v10; // r1
__off_t v11; // r0
int v12; // r3
v7 = (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(a2 + 68) + 24))(*(_DWORD *)(a2 + 68));
v8 = v7;
if ( *(_DWORD *)(a2 + 64) && (v7 > 0 || !a3) && !(*(int (__fastcall **)(int))(*(_DWORD *)a2 + 24))(a2) )
{
if ( a4 != 1 )
{
if ( !a4 )
{
v9 = 0;
LABEL_9:
if ( v8 <= 0 )
v10 = 0;
else
v10 = a3 * v8;
if ( !fseeko(*(FILE **)(a2 + 64), v10, v9) )
{
v11 = ftello(*(FILE **)(a2 + 64));
v12 = *(_DWORD *)(a2 + 76);
*(_DWORD *)a1 = *(_DWORD *)(a2 + 72);
*(_DWORD *)(a1 + 4) = v12;
*(_QWORD *)(a1 + 8) = v11;
return a1;
}
goto LABEL_5;
}
if ( a4 != 2 )
{
*(_DWORD *)a1 = 0;
*(_DWORD *)(a1 + 4) = 0;
goto LABEL_6;
}
}
v9 = a4;
goto LABEL_9;
}
LABEL_5:
*(_DWORD *)a1 = 0;
*(_DWORD *)(a1 + 4) = 0;
LABEL_6:
*(_QWORD *)(a1 + 8) = -1;
return a1;
}