//
// CCTextInputNode::keyboardWillShow from 0x6b78f4 to 0x6b7a38 (324 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'CCTextInputNode::keyboardWillShow @ 0x6b7a3c
// > ??> @ 0x6fe50
// > ??> @ 0x141ff10
//
// 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 12:50:53 +0000
//
__int64 __fastcall CCTextInputNode::keyboardWillShow(__int64 a1, __int64 a2)
{
cocos2d::CCRect *v2; // x21
int v4; // w1
int v5; // s0
__int64 v6; // x0
const cocos2d::CCPoint *v8; // x0
float v9; // s0
float v10; // s8
float v11; // s0
float v12; // s8
__int64 v13; // x0
_BYTE v14[4]; // [xsp+48h] [xbp+48h] BYREF
float v15; // [xsp+4Ch] [xbp+4Ch]
float v16; // [xsp+58h] [xbp+58h] BYREF
float v17; // [xsp+5Ch] [xbp+5Ch]
v2 = (cocos2d::CCRect *)(a2 + 16);
cocos2d::CCRect::getMaxY((cocos2d::CCRect *)(a2 + 16));
v4 = *(unsigned __int8 *)(a1 + 610);
CCTextInputNode::s_keyboardTop = v5;
if ( !v4 )
{
v6 = *(_QWORD *)(a1 + 576);
if ( v6 )
{
if ( *(_BYTE *)(a1 + 460) )
{
v8 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 304LL))(v6);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v16, v8);
sub_6B76DC((cocos2d::CCNode *)a1, &v16, (cocos2d::CCRect *)v14);
v15 = v15 - 4.0;
cocos2d::CCRect::getMaxY(v2);
v10 = v9;
cocos2d::CCRect::getMinY((cocos2d::CCRect *)v14);
v12 = v10 - v11;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v16, (const cocos2d::CCRect *)v14);
if ( v12 < 0.0 )
v17 = v17 + v12;
if ( (unsigned __int8)cocos2d::CCRect::intersectsRect((cocos2d::CCRect *)&v16, v2) )
{
v13 = *(_QWORD *)(a1 + 584);
*(_BYTE *)(a1 + 461) = 1;
if ( v13 )
(*(void (__fastcall **)(__int64, __int64, float))(*(_QWORD *)v13 + 24LL))(v13, a1, v12);
}
}
}
}
return _stack_chk_guard;
}