//
// DynamicBitset::resize from 0x1403a4d00 to 0x1403a4d97 (151 bytes)
//
// 5 xrefs:
// > PlayLayer::PlayLayer @ 0x1403a509d
// > PlayLayer::createObjectsFromSetupFinished @ 0x1403add3a
// > ??> @ 0x140698c9c
// > ??> @ 0x140698cac
// > ??> @ 0x1406d6ab8
//
// 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
//
void DynamicBitset::resize(DynamicBitset *a1, size_t a2)
{
std::_Vector_val>::pointer Mylast; // rsi
std::_Vector_val>::pointer Myfirst; // r8
unsigned __int64 v5; // rcx
size_t v6; // rdx
size_t v7; // rdx
__int64 v8; // rbx
Mylast = a1->m_bits._Mypair._Myval2._Mylast;
Myfirst = a1->m_bits._Mypair._Myval2._Myfirst;
v5 = Mylast - a1->m_bits._Mypair._Myval2._Myfirst;
v6 = (a2 >> 5) + 1;
if ( v6 >= v5 )
{
if ( v6 > v5 )
{
if ( v6 <= a1->m_bits._Mypair._Myval2._Myend - Myfirst )
{
v7 = v6 - v5;
if ( v7 )
{
v8 = 4 * v7;
memset(Mylast, 0, 4 * v7);
Mylast = (std::_Vector_val>::pointer)((char *)Mylast + v8);
}
a1->m_bits._Mypair._Myval2._Mylast = Mylast;
}
else
{
sub_1403BDD90(a1);
}
}
}
else
{
a1->m_bits._Mypair._Myval2._Mylast = &Myfirst[v6];
}
}