//
// sub_50A6C from 0x50a6c to 0x50aa2 (54 bytes)
//
// 4 xrefs:
// > sub_50AA4 @ 0x50b2a
// > sub_50AA4 @ 0x50bf0
// > sub_50C14 @ 0x50c38
// > sub_50CA4 @ 0x50cc2
//
// 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:40:43 +0000
//
int __fastcall sub_50A6C(int a1, int a2)
{
int v4; // r0
unsigned int v5; // r2
bool v6; // zf
int result; // r0
v4 = fcntl(a1, 3);
if ( v4 == -1 )
return 43;
v5 = v4 & 0xFFFFF7FF;
if ( a2 )
v5 = v4 | 0x800;
v6 = fcntl(a1, 4, v5) == -1;
result = 0;
if ( v6 )
return 43;
return result;
}