//
// sub_1001FC790 from 0x1001fc790 to 0x1001fc7e8 (88 bytes)
//
// 2 xrefs:
// > CCTextInputNode::updateLabel @ 0x1001fb3f0
// > CCTextInputNode::onTextFieldInsertText @ 0x1001fd708
//
// 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 11:00:43 +0000
//
__int64 __fastcall sub_1001FC790(__int64 a1, int a2)
{
__int64 v2; // x8
__int64 result; // x0
__int64 v4; // x8
unsigned __int64 v5; // x8
v2 = *(_QWORD *)(a1 + 520);
result = *(_QWORD *)(a1 + 512);
v4 = v2 - result;
if ( !v4 )
return 0;
v5 = 0xAAAAAAAAAAAAAAABLL * (v4 >> 3);
if ( v5 <= 1 )
v5 = 1;
while ( (int)*(_QWORD *)result >= a2 || (int)(*(_DWORD *)(result + 8) + *(_QWORD *)result) <= a2 )
{
result += 24;
if ( !--v5 )
return 0;
}
return result;
}