//
// png_safe_error from 0xbcd44c to 0xbcd4d4 (136 bytes)
//
// 4 xrefs:
// > ??> @ 0x66e70
// > sub_BD5DF0 @ 0xbd5e38
// > png_image_write_to_stdio @ 0xbe909c
// > ??> @ 0x122b540
//
// 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
//
void __fastcall __noreturn png_safe_error(__int64 a1, char *a2)
{
__int64 *v2; // x19
__int64 v4; // x1
struct __jmp_buf_tag *v5; // x0
unsigned __int64 v6; // x0
v2 = *(__int64 **)(a1 + 296);
if ( v2 )
{
png_safecat((__int64)v2 + 36, 0x40u, 0, a2);
v4 = *v2;
*((_DWORD *)v2 + 8) |= 2u;
if ( v4 )
{
v5 = *(struct __jmp_buf_tag **)(v4 + 16);
if ( v5 )
longjmp(v5, 1);
}
v6 = png_safecat((__int64)v2 + 36, 0x40u, 0, "bad longjmp: ");
png_safecat((__int64)v2 + 36, 0x40u, v6, a2);
}
abort();
}