//
// sub_7840B2 from 0x7840b2 to 0x7840dc (42 bytes)
//
// 2 xrefs:
// > sub_78408C @ 0x7840ae
// > sub_78343E @ 0x783454
//
// 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 sub_7840B2(int a1, int a2, int a3)
{
int v3; // r4
char v4; // r7
__int64 v5; // r0
*(_BYTE *)(v3 + a3) = 0;
v5 = ((__int64 (__fastcall *)(int, int, _DWORD))*(_DWORD *)(v3 + 264))(v3, 255, *(_DWORD *)(v3 + 268));
++*(_DWORD *)(v3 + 288);
*(_BYTE *)v3 = v4;
sub_78346E(v5, SHIDWORD(v5), 288, 1);
}