//
// sub_CBADC0 from 0xcbadc0 to 0xcbade0 (32 bytes)
//
// 3 xrefs:
// > sub_C6839C @ 0xc68490
// > sub_C6C730 @ 0xc6ca28
// > sub_C6C730 @ 0xc6cbe8
//
// 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
//
__int64 __fastcall sub_CBADC0(__int64 result, int a2)
{
LODWORD(result) = (*(_DWORD *)(result + 32) + *(_DWORD *)(result + 24) - 1) / *(_DWORD *)(result + 32);
if ( (int)result > a2 )
return (unsigned int)a2;
else
return (unsigned int)result;
}