//
// sub_636148 from 0x636148 to 0x636178 (48 bytes)
//
// 9 xrefs:
// > sub_6194C0 @ 0x61953a
// > sub_62CC48 @ 0x62cde2
// > sub_634F80 @ 0x634fbc
// > sub_634F80 @ 0x6352f8
// > sub_6353AC @ 0x63540c
// > sub_6353AC @ 0x63545a
// > sub_6353AC @ 0x635534
// > sub_6353AC @ 0x63558c
// > sub_6353AC @ 0x6359e8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall sub_636148(int a1, int a2, int a3, int a4)
{
int v6; // r2
unsigned int v7; // r2
v6 = fcntl(a1, 3, 0);
if ( a2 )
v7 = v6 | 0x800;
else
v7 = v6 & 0xFFFFF7FF;
return j_fcntl(a1, 4, v7, a4);
}