//
// sub_A74B4 from 0xa74b4 to 0xa7506 (82 bytes)
//
// 9 xrefs:
// > ??> @ 0xa74b2
// > sub_61B58 @ 0x61dc6
// > sub_753C4 @ 0x77276
// > sub_753C4 @ 0x772fa
// > sub_753C4 @ 0x773e4
// > sub_79454 @ 0x79a54
// > sub_7AB38 @ 0x7b3ca
// > sub_838A4 @ 0x84632
// > sub_87B50 @ 0x88880
//
// 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:35 +0000
//
int __fastcall sub_A74B4(int a1, int a2, int a3)
{
int v3; // r2
unsigned int *v4; // r0
unsigned int v5; // r1
unsigned int v6; // r1
if ( a3 )
{
v3 = *(_DWORD *)(a1 + 92);
__dmb(0xBu);
if ( (a2 ^ ((unsigned __int16)(v3 & 0x2000) >> 13)) == 1 )
*(_DWORD *)(*(_DWORD *)(*(_DWORD *)(a1 + 128) + 66892) + 32) = 1;
}
v4 = (unsigned int *)(a1 + 92);
__dmb(0xBu);
if ( a2 )
{
do
v5 = __ldrex(v4);
while ( __strex(v5 | 0x2000, v4) );
}
else
{
do
v6 = __ldrex(v4);
while ( __strex(v6 & 0xFFFFDFFF, v4) );
}
__dmb(0xBu);
return 0;
}