//
// __divsi3 from 0xdb830 to 0xdb838 (8 bytes)
//
// 5 xrefs:
// > j___divsi3 @ 0xe12c8
// > ??> @ 0x10bc
// > ??> @ 0x25fc
// > j___divsi3 @ 0xe12c8
// > ??> @ 0xe6a1c
//
// 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
//
// Alternative name is '__aeabi_idiv'
int __fastcall _divsi3(int a1, int a2)
{
bool v2; // nf
if ( a2 )
return sub_DB838();
v2 = a1 < 0;
if ( a1 > 0 )
a1 = 0x7FFFFFFF;
if ( v2 )
a1 = 0x80000000;
return j___aeabi_idiv0(a1);
}