//
// sub_779F6C from 0x779f6c to 0x779f9a (46 bytes)
//
// 2 xrefs:
// > sub_77A10C @ 0x77a112
// > sub_77A118 @ 0x77a168
//
// 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_779F6C(int fd, char *buf, size_t n)
{
size_t v6; // r4
ssize_t v7; // r0
v6 = n;
do
{
while ( 1 )
{
v7 = write(fd, buf, v6);
if ( v7 == -1 )
break;
v6 -= v7;
buf += v7;
if ( !v6 )
return n - v6;
}
}
while ( *(_DWORD *)_errno() == 4 );
return n - v6;
}