//
// MusicBrowser::textChanged from 0xb8732c to 0xb874d0 (420 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'MusicBrowser::textChanged @ 0xb874d4
// > ??> @ 0x800b0
// > ??> @ 0x14d4b88
//
// This function is hookable on this platform (idp: arm, 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 13:02:31 +0000
//
__int64 __fastcall MusicBrowser::textChanged(MusicBrowser *this, CCTextInputNode *a2)
{
CCTextInputNode *v3; // x0
__int64 v5; // x21
int v6; // w4
size_t v7; // x2
unsigned __int8 v8; // w0
__int64 *v9; // x23
int v10; // w5
__int64 v11; // x1
char *v12; // x1
size_t v13; // x2
unsigned __int8 *v14; // x0
unsigned __int8 *v15; // x1
unsigned __int8 *v16; // x4
unsigned __int8 *v17; // x2
int v18; // t1
__int64 v19; // [xsp+40h] [xbp+40h] BYREF
size_t v20; // [xsp+48h] [xbp+48h]
void *v21; // [xsp+50h] [xbp+50h]
if ( !*((_BYTE *)this + 800) )
return _stack_chk_guard;
v3 = *((CCTextInputNode **)this + 97);
if ( v3 != a2 || !*((_QWORD *)this + 89) )
return _stack_chk_guard;
CCTextInputNode::getString(v3, &v19);
v5 = *((_QWORD *)this + 89);
v6 = v19 & 1;
v7 = (unsigned __int8)v19 >> 1;
if ( v6 )
v7 = v20;
v8 = *(_BYTE *)(v5 + 104);
v9 = (__int64 *)(v5 + 104);
v10 = v8 & 1;
v11 = v8 >> 1;
if ( (v8 & 1) != 0 )
v11 = *(_QWORD *)(v5 + 112);
if ( v7 != v11 )
{
if ( v9 == &v19 )
goto LABEL_14;
if ( v6 )
goto LABEL_12;
goto LABEL_28;
}
v14 = (unsigned __int8 *)&v19 + 1;
if ( v6 )
v14 = (unsigned __int8 *)v21;
v15 = (unsigned __int8 *)(v5 + 105);
if ( v10 )
v15 = *(unsigned __int8 **)(v5 + 120);
if ( v6 )
{
if ( !v7 || !memcmp(v14, v15, v7) )
goto LABEL_15;
if ( v9 == &v19 )
goto LABEL_14;
LABEL_12:
v12 = (char *)v21;
v13 = v20;
LABEL_13:
std::string::assign((__int64 *)(v5 + 104), v12, v13);
v5 = *((_QWORD *)this + 89);
goto LABEL_14;
}
if ( !v7 )
return _stack_chk_guard;
if ( *v14 == *v15 )
{
v16 = v14 + 1;
v17 = &v14[v7];
do
{
++v15;
if ( v16 == v17 )
return _stack_chk_guard;
v18 = *v16++;
}
while ( *v15 == v18 );
}
if ( v9 != &v19 )
{
LABEL_28:
v13 = (unsigned __int8)v19 >> 1;
v12 = (char *)&v19 + 1;
goto LABEL_13;
}
LABEL_14:
*(_DWORD *)(v5 + 96) = 0;
MusicSearchResult::updateObjects(*((MusicSearchResult **)this + 89));
MusicBrowser::setupList(this, *((MusicSearchResult **)this + 89));
if ( (v19 & 1) != 0 )
LABEL_15:
operator delete(v21);
return _stack_chk_guard;
}