//
// jpeg_destroy from 0x88182c to 0x881840 (20 bytes)
//
// 3 xrefs:
// > jpeg_destroy_compress @ 0x876eac
// > jpeg_destroy_decompress @ 0x8844e8
// > sub_890CB8 @ 0x890cc4
//
// 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:03:10 +0000
//
int __fastcall jpeg_destroy(int result)
{
int v1; // r3
int v2; // r4
v1 = *(_DWORD *)(result + 4);
v2 = result;
if ( v1 )
result = (*(int (**)(void))(v1 + 40))();
*(_DWORD *)(v2 + 4) = 0;
*(_DWORD *)(v2 + 20) = 0;
return result;
}