//
// jpeg_destroy from 0xc0107c to 0xc010b0 (52 bytes)
//
// 4 xrefs:
// > jpeg_destroy_compress @ 0xbf1b6c
// > jpeg_destroy_decompress @ 0xc043a0
// > sub_C16018 @ 0xc16038
// > ??> @ 0x611d0
//
// 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 jpeg_destroy(__int64 result)
{
__int64 v1; // x1
__int64 v2; // x19
v1 = *(_QWORD *)(result + 8);
v2 = result;
if ( v1 )
result = (*(__int64 (**)(void))(v1 + 80))();
*(_QWORD *)(v2 + 8) = 0;
*(_DWORD *)(v2 + 36) = 0;
return result;
}