//
// sub_7A1D4 from 0x7a1d4 to 0x7a25a (134 bytes)
//
// 1 xrefs:
// > sub_7A76C @ 0x7a8d6
//
// 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 11:41:13 +0000
//
int __fastcall sub_7A1D4(int a1)
{
int v1; // r1
int v2; // r2
int v3; // r3
int v4; // r4
unsigned int v5; // r3
char v6; // r2
v1 = *(_DWORD *)(a1 + 4);
v2 = *(char *)(a1 + 234);
LOBYTE(v3) = -1;
switch ( (*(unsigned __int8 *)(a1 + 262) >> 4) & 3 )
{
case 0:
case 3:
LOBYTE(v3) = byte_E8004[v2 & 0x1F];
break;
case 1:
v3 = (8 * v2) ^ (v2 >> 7);
break;
case 2:
break;
}
v4 = *(_DWORD *)(v1 + 44);
v5 = (*(unsigned __int8 *)(a1 + 236) * (unsigned int)(unsigned __int8)v3) >> 6;
if ( (v2 & 0x80u) != 0 )
{
if ( ((v4 - v5) & 0x8000) != 0 )
v5 = *(_DWORD *)(v1 + 44);
}
else if ( (int)(v5 + v4) > 64 )
{
v5 = 64 - v4;
}
*(_DWORD *)(v1 + 52) = v5;
v6 = v2 + *(_BYTE *)(a1 + 235);
if ( v6 > 31 )
v6 -= 64;
*(_BYTE *)(a1 + 234) = v6;
*(_BYTE *)(v1 + 36) |= 2u;
return 0;
}