//
// sub_91D0C4 from 0x91d0c4 to 0x91d114 (80 bytes)
//
// 0 xrefs:
//
// 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 12:04:39 +0000
//
unsigned int __fastcall sub_91D0C4(unsigned int a1, int *a2)
{
unsigned int v2; // r7
unsigned int v4; // r5
int v5; // r6
int v6; // r6
int v7; // r6
int v8; // r0
char v9; // cc
unsigned int result; // r0
v2 = *(a2 - 1);
v4 = *a2;
v5 = sub_91CFE4(HIBYTE(*a2), HIBYTE(a1), HIBYTE(v2));
v6 = v5 + sub_91CFE4(BYTE2(v4), BYTE2(a1), BYTE2(v2));
v7 = v6 + sub_91CFE4(BYTE1(v4), BYTE1(a1), BYTE1(v2));
v8 = sub_91CFE4((unsigned __int8)v4, (unsigned __int8)a1, (unsigned __int8)v2);
v9 = (v7 + v8 < 0) ^ __OFADD__(v7, v8) | (v7 + v8 == 0);
result = v4;
if ( !v9 )
return a1;
return result;
}