//
// sub_85BE58 from 0x85be58 to 0x85be78 (32 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:02:40 +0000
//
ssize_t __fastcall sub_85BE58(int a1, int fd, ssize_t *a3, void *buf, size_t nbytes)
{
ssize_t result; // r0
bool v7; // zf
ssize_t v8; // r3
result = read(fd, buf, nbytes);
v7 = result == -1;
if ( result == -1 )
{
v8 = 0;
result = -1;
}
else
{
v8 = result;
}
if ( !v7 )
result = 0;
*a3 = v8;
return result;
}