//
// CustomSongLayer::textInputOpened from 0x1400c3d80 to 0x1400c3e29 (169 bytes)
//
// 4 xrefs:
// > ??> @ 0x14054da38
// > ??> @ 0x14054da40
// > ??> @ 0x14056ad50
// > ??> @ 0x1406c804c
//
// 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
//
// Merged with: CustomSongLayer::textInputOpened, GJGarageLayer::textChanged
void __fastcall CustomSongLayer::textInputOpened(__int64 a1, __int64 a2)
{
_BYTE *v2; // rax
size_t v3; // r8
void *v4; // rcx
void *Block[2]; // [rsp+28h] [rbp-30h] BYREF
__int128 v6; // [rsp+38h] [rbp-20h]
v2 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(*(_QWORD *)(a2 + 552) + 600LL) + 8LL))(*(_QWORD *)(a2 + 552) + 600LL);
*(_OWORD *)Block = 0;
v3 = -1;
v6 = 0;
do
++v3;
while ( v2[v3] );
sub_14003A930(Block, v2, v3);
if ( *((_QWORD *)&v6 + 1) > 0xFu )
{
v4 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v6 + 1) + 1LL) >= 0x1000 )
{
v4 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v4 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v4);
}
}