//
// deflateReset from 0xf3407c to 0xf34130 (180 bytes)
//
// 5 xrefs:
// > sub_E60CF0 @ 0xe60f68
// > deflateInit2_ @ 0xf35f4c
// > sub_F3FF48 @ 0xf40098
// > gzclose_w @ 0xf41204
// > ??> @ 0xcbcf8
//
// 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:12:55 +0000
//
__int64 __fastcall deflateReset(__int64 a1)
{
unsigned int v2; // w20
__int64 v3; // x19
char *v4; // x4
unsigned int v5; // w3
size_t v6; // x2
__int64 v7; // x0
int v8; // w4
int v9; // w5
int v10; // w1
v2 = deflateResetKeep(a1);
if ( !v2 )
{
v3 = *(_QWORD *)(a1 + 56);
v4 = *(char **)(v3 + 104);
v5 = *(_DWORD *)(v3 + 116) - 1;
v6 = 2LL * v5;
*(_QWORD *)(v3 + 88) = 2LL * *(unsigned int *)(v3 + 68);
*(_WORD *)&v4[v6] = 0;
memset(v4, 0, v6);
*(_DWORD *)(v3 + 156) = 0;
v7 = 16LL * *(int *)(v3 + 180);
*(_QWORD *)(v3 + 136) = 0;
*(_DWORD *)(v3 + 164) = 0;
*(_DWORD *)(v3 + 5916) = 0;
v8 = *(unsigned __int16 *)((char *)&unk_13FD400 + v7);
v9 = *(unsigned __int16 *)((char *)&unk_13FD400 + v7 + 2);
v10 = *(unsigned __int16 *)((char *)&unk_13FD400 + v7 + 4);
LODWORD(v7) = *(unsigned __int16 *)((char *)&unk_13FD400 + v7 + 6);
*(_DWORD *)(v3 + 176) = v9;
*(_DWORD *)(v3 + 188) = v8;
*(_DWORD *)(v3 + 192) = v10;
*(_DWORD *)(v3 + 172) = v7;
*(_DWORD *)(v3 + 168) = 2;
*(_DWORD *)(v3 + 144) = 2;
*(_DWORD *)(v3 + 152) = 0;
*(_DWORD *)(v3 + 112) = 0;
}
return v2;
}