//
// SetupTeleportPopup::updateTeleportGravityState from 0x1405f7ca0 to 0x1405f7d1c (124 bytes)
//
// 5 xrefs:
// > SetupTeleportPopup::updateDefaultTriggerValues @ 0x1405f7afb
// > SetupTeleportPopup::onTeleportGravity @ 0x1405f7c8e
// > ??> @ 0x1408e3b04
// > ??> @ 0x1408e3b5c
// > ??> @ 0x14092f51c
//
// 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:35:08 +0000
//
__int64 __fastcall SetupTeleportPopup::updateTeleportGravityState(__int64 a1, int a2)
{
__int64 result; // rax
unsigned int *v4; // rdi
__int64 *v5; // rdi
__int64 *i; // rsi
__int64 v7; // rbx
__int64 v8; // rdx
result = *(_QWORD *)(a1 + 1000);
if ( result )
{
v4 = *(unsigned int **)(result + 56);
result = *v4;
if ( (_DWORD)result )
{
v5 = *((__int64 **)v4 + 2);
for ( i = &v5[result - 1]; v5 <= i; ++v5 )
{
v7 = *v5;
if ( !*v5 )
break;
LOBYTE(v8) = (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v7 + 56LL))(*v5) == a2;
result = CCMenuItemToggler::toggle(v7, v8);
}
}
}
return result;
}