//
// sub_6BCE20 from 0x6bce20 to 0x6bcfc0 (416 bytes)
//
// 1 xrefs:
// > sub_6BB840 @ 0x6bb89c
//
// 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_6BCE20(int a1, int a2, int a3, unsigned __int16 a4, double a5)
{
unsigned int v10; // [sp+20h] [bp-Ch] BYREF
unsigned int v11; // [sp+24h] [bp-8h] BYREF
if ( a5 < 0.0 )
_assert2();
if ( a5 > 0.0 )
{
if ( (double)(unsigned int)a5 == a5 )
{
v10 = (unsigned int)a5;
v11 = 1;
}
else if ( a5 >= 1.0 )
{
v10 = -1;
v11 = (unsigned int)(4294967300.0 / a5);
}
else
{
v10 = (unsigned int)(a5 * 4294967300.0);
v11 = -1;
}
}
else
{
v10 = 0;
v11 = 1;
}
if ( (*(_DWORD *)(a1 + 12) & 0x80) != 0 )
{
TIFFSwabLong(&v10);
TIFFSwabLong(&v11);
}
return sub_6BD8C0(a1, a2, a3, a4, 5, 1, 8, &v10);
}