//
// sub_980BF4 from 0x980bf4 to 0x980c34 (64 bytes)
//
// 3 xrefs:
// > sub_9804C0 @ 0x9806aa
// > sub_9804C0 @ 0x980794
// > sub_980AC4 @ 0x980b32
//
// 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:06:07 +0000
//
int __fastcall sub_980BF4(char **a1)
{
char *v1; // r3
unsigned int v2; // r1
int v3; // r12
char v4; // lr
char v5; // t1
int result; // r0
v1 = *a1;
v2 = 0;
v3 = 0;
do
{
v5 = *v1++;
v4 = v5;
v3 |= (v5 & 0x7F) << v2;
v2 += 7;
}
while ( v5 < 0 );
*a1 = v1;
result = v3;
if ( (v4 & 0x40) != 0 )
result = v3 | (-1 << v2);
if ( v2 >= 0x20 )
return v3;
return result;
}