//
// fmt::internal::Array::grow from 0xb68338 to 0xb683b8 (128 bytes)
//
// 31 xrefs:
// > fmt::BasicWriter::write_str @ 0xb68580
// > fmt::BasicWriter::write_str @ 0xb68630
// > fmt::internal::Array::append @ 0xb68784
// > fmt::BasicWriter::write_str @ 0xb68bb4
// > fmt::BasicWriter::write_str @ 0xb68bcc
// > fmt::BasicWriter::FormatDouble @ 0xb69060
// > fmt::BasicWriter::FormatDouble @ 0xb691e4
// > fmt::BasicWriter::FormatDouble @ 0xb691f8
// > fmt::BasicWriter::FormatDouble @ 0xb6920c
// > fmt::BasicWriter::FormatDouble @ 0xb69220
// > fmt::BasicWriter::FormatDouble @ 0xb69564
// > fmt::BasicWriter::FormatDouble @ 0xb69704
// > fmt::BasicWriter::FormatDouble @ 0xb69718
// > fmt::BasicWriter::FormatDouble @ 0xb6972c
// > fmt::BasicWriter::FormatDouble @ 0xb69740
// > fmt::BasicWriter::PrepareBufferForInt @ 0xb6cc2c
// > fmt::BasicWriter::PrepareBufferForInt @ 0xb6cc48
// > fmt::BasicWriter::PrepareBufferForInt @ 0xb6cddc
// > fmt::BasicWriter::PrepareBufferForInt @ 0xb6d19c
// > fmt::BasicWriter::PrepareBufferForInt @ 0xb6d1b4
// > fmt::BasicWriter::PrepareBufferForInt @ 0xb6d75c
// > fmt::BasicWriter::PrepareBufferForInt @ 0xb6d77c
// > fmt::BasicWriter::PrepareBufferForInt @ 0xb6d798
// > fmt::BasicWriter::PrepareBufferForInt @ 0xb6d8dc
// > fmt::BasicWriter::PrepareBufferForInt @ 0xb6e030
// > fmt::BasicFormatter::format @ 0xb6f1ac
// > fmt::BasicFormatter::format @ 0xb6f4e0
// > fmt::BasicFormatter::Format @ 0xb6f72c
// > fmt::internal::PrintfParser::Format @ 0xb6fe6c
// > fmt::internal::PrintfParser::Format @ 0xb70000
// > ??> @ 0x92ef8
//
// 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 __fastcall fmt::internal::Array::grow(_QWORD *a1, unsigned __int64 a2)
{
unsigned __int64 v3; // x0
unsigned __int64 v4; // x0
void *v5; // x0
void *v6; // x20
_QWORD *v7; // x1
size_t v8; // x2
v3 = a1[1] + (a1[1] >> 1);
if ( a2 < v3 )
a2 = v3;
a1[1] = a2;
v4 = 4 * a2;
if ( a2 > 0x1FC0000000000000LL )
v4 = -1;
v5 = (void *)operator new[](v4);
v6 = v5;
v7 = (_QWORD *)a1[2];
v8 = 4LL * *a1;
if ( v8 )
{
memmove(v5, v7, v8);
v7 = (_QWORD *)a1[2];
}
if ( v7 != a1 + 3 && v7 )
operator delete[](v7);
a1[2] = v6;
}