//
// ERR_peek_last_error_line_data from 0x101f440 to 0x101f52c (236 bytes)
//
// 1 xrefs:
// > ??> @ 0xa8238
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:16:10 +0000
//
__int64 __fastcall ERR_peek_last_error_line_data(_QWORD *a1, _DWORD *a2, _QWORD *a3, _DWORD *a4)
{
__int64 state; // x0
int v6; // w4
__int64 v7; // x5
_QWORD *v8; // x0
__int64 v9; // x6
__int64 v10; // x8
__int64 v11; // x0
__int64 result; // x0
state = ERR_get_state();
v6 = *(_DWORD *)(state + 576);
v7 = state;
if ( *(_DWORD *)(state + 580) == v6 )
return 0;
v8 = (_QWORD *)(state + 8LL * v6);
v9 = v8[8];
if ( a1 && a2 )
{
v10 = v8[48];
if ( v10 )
{
*a1 = v10;
*a2 = *(_DWORD *)(v7 + 4 * (v6 + 128LL));
}
else
{
*a1 = "NA";
*a2 = 0;
}
}
if ( !a3 )
return v9;
v11 = v8[24];
if ( !v11 )
{
*a3 = &byte_11B8890;
if ( a4 )
{
*a4 = 0;
return v9;
}
return v9;
}
*a3 = v11;
if ( !a4 )
return v9;
result = v9;
*a4 = *(_DWORD *)(v7 + 4 * (v6 + 80LL));
return result;
}