//
// AutoBackupPopup::textChanged from 0xc58568 to 0xc58798 (560 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'AutoBackupPopup::textChanged @ 0xc5879c
// > ??> @ 0x79108
// > ??> @ 0x14e8d90
//
// 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:05:13 +0000
//
__int64 __fastcall AutoBackupPopup::textChanged(AutoBackupPopup *this, CCTextInputNode *a2)
{
CCTextInputNode *v3; // x0
__int64 v5; // x0
__int64 v6; // x2
int v7; // w0
int v8; // w3
size_t v9; // x2
int v10; // w4
unsigned __int8 v11; // w0
__int64 *v12; // x22
int v13; // w5
__int64 v14; // x1
char *v15; // x1
size_t v16; // x2
unsigned __int8 *v17; // x0
unsigned __int8 *v18; // x1
unsigned __int8 *v19; // x4
unsigned __int8 *v20; // x2
int v21; // t1
__int64 v22[3]; // [xsp+38h] [xbp+38h] BYREF
__int64 v23; // [xsp+50h] [xbp+50h] BYREF
size_t v24; // [xsp+58h] [xbp+58h]
void *v25; // [xsp+60h] [xbp+60h]
v3 = *((CCTextInputNode **)this + 115);
if ( v3 != a2 )
return _stack_chk_guard;
CCTextInputNode::getString(v3, v22);
v5 = *((_QWORD *)this + 116);
if ( v5 )
{
v6 = LOBYTE(v22[0]) >> 1;
if ( (v22[0] & 1) != 0 )
v6 = v22[1];
(*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v5 + 344LL))(v5, v6 != 0);
}
sub_C51FBC((__int64)v22, &v23);
v7 = (unsigned __int8)v23;
v8 = v23 & 1;
if ( v8 )
{
v9 = v24;
if ( (int)v24 > 1 )
{
LABEL_9:
v8 = v7;
v10 = 1;
goto LABEL_10;
}
*(_BYTE *)v25 = 0;
v24 = 0;
v7 = (unsigned __int8)v23;
if ( (v23 & 1) != 0 )
{
v9 = v24;
goto LABEL_9;
}
goto LABEL_21;
}
if ( (unsigned __int8)v23 > 3u )
{
LABEL_21:
v9 = (unsigned __int8)v7 >> 1;
v8 = v7;
v10 = 0;
goto LABEL_10;
}
v9 = 0;
LOWORD(v23) = 0;
v10 = 0;
LABEL_10:
v11 = *((_BYTE *)this + 872);
v12 = (__int64 *)((char *)this + 872);
v13 = v11 & 1;
v14 = v11 >> 1;
if ( (v11 & 1) != 0 )
v14 = *((_QWORD *)this + 110);
if ( v9 != v14 )
{
if ( v12 == &v23 )
goto LABEL_17;
if ( v10 )
goto LABEL_15;
LABEL_34:
v15 = (char *)&v23 + 1;
v16 = v8 >> 1;
goto LABEL_16;
}
v17 = (unsigned __int8 *)&v23 + 1;
if ( v10 )
v17 = (unsigned __int8 *)v25;
v18 = (unsigned __int8 *)this + 873;
if ( v13 )
v18 = *((unsigned __int8 **)this + 111);
if ( v10 )
{
if ( !v9 || !memcmp(v17, v18, v9) )
{
LABEL_22:
operator delete(v25);
goto LABEL_18;
}
if ( v12 != &v23 )
{
LABEL_15:
v15 = (char *)v25;
v16 = v24;
LABEL_16:
std::string::assign((__int64 *)this + 109, v15, v16);
goto LABEL_17;
}
goto LABEL_17;
}
if ( v9 )
{
if ( *v17 == *v18 )
{
v19 = v17 + 1;
v20 = &v17[v9];
do
{
++v18;
if ( v19 == v20 )
goto LABEL_18;
v21 = *v19++;
}
while ( *v18 == v21 );
}
if ( v12 != &v23 )
goto LABEL_34;
LABEL_17:
AutoBackupPopup::buildRows(this);
if ( (v23 & 1) == 0 )
goto LABEL_18;
goto LABEL_22;
}
LABEL_18:
if ( (v22[0] & 1) != 0 )
operator delete((void *)v22[2]);
return _stack_chk_guard;
}