//
// CustomSongLayer::textInputOpened from 0x140164e40 to 0x140164efc (188 bytes)
//
// 4 xrefs:
// > ??> @ 0x140744078
// > ??> @ 0x140744080
// > ??> @ 0x140770200
// > ??> @ 0x140917e58
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:27:26 +0000
//
// 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+38h] [rbp-30h] BYREF
__int128 v6; // [rsp+48h] [rbp-20h]
v2 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(*(_QWORD *)(a2 + 592) + 600LL) + 8LL))(*(_QWORD *)(a2 + 592) + 600LL);
*(_OWORD *)Block = 0;
v3 = -1;
v6 = 0;
do
++v3;
while ( v2[v3] );
sub_14003D230(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 )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v4);
}
}