//
// sub_BBFD40 from 0xbbfd40 to 0xbbfde0 (160 bytes)
//
// 2 xrefs:
// > lws_read @ 0xbbb608
// > lws_read @ 0xbbb6a4
//
// 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_BBFD40(__int64 a1, _QWORD *a2, unsigned __int64 a3)
{
int v6; // w19
unsigned __int8 *v7; // x3
__int64 result; // x0
switch ( *(_BYTE *)(a1 + 72) )
{
case 4:
case 8:
case 9:
case 0xC:
case 0xD:
v6 = 0;
if ( !a3 )
goto LABEL_7;
while ( 1 )
{
v7 = (unsigned __int8 *)(*a2)++;
if ( (unsigned int)sub_BC128C(a1, *v7) )
break;
if ( a3 <= (unsigned int)++v6 )
goto LABEL_7;
}
result = 1;
break;
default:
LABEL_7:
result = 0;
break;
}
return result;
}