//
// ERR_get_error_line from 0xda0d70 to 0xda0e54 (228 bytes)
//
// 1 xrefs:
// > ??> @ 0x5d9f0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall ERR_get_error_line(_QWORD *a1, _DWORD *a2)
{
__int64 state; // x0
int v4; // w2
int v5; // w2
__int64 v6; // x3
_QWORD *v7; // x21
__int64 v8; // x20
__int64 v9; // x2
__int64 v10; // x19
state = ERR_get_state();
v4 = *(_DWORD *)(state + 580);
if ( v4 == *(_DWORD *)(state + 576) )
return 0;
v5 = (v4 + 1) % 16;
v6 = v5;
v7 = (_QWORD *)(state + 8LL * v5);
v8 = v7[8];
*(_DWORD *)(state + 580) = v5;
v7[8] = 0;
if ( a1 && a2 )
{
v9 = v7[48];
if ( v9 )
{
*a1 = v9;
*a2 = *(_DWORD *)(state + 4 * (v6 + 128));
}
else
{
*a1 = "NA";
*a2 = 0;
}
}
v10 = state + 4 * v6;
if ( (*(_DWORD *)(v10 + 320) & 1) != 0 )
{
CRYPTO_free(v7[24], "crypto/err/err.c", 481);
v7[24] = 0;
}
*(_DWORD *)(v10 + 320) = 0;
return v8;
}