//
// PlayerObject::spawnPortalCircle from 0x1002c4458 to 0x1002c4574 (284 bytes)
//
// 14 xrefs:
// > GJBaseGameLayer::teleportPlayer @ 0x10027e608
// > GJBaseGameLayer::teleportPlayer @ 0x10027e718
// > GJBaseGameLayer::toggleDualMode @ 0x100281bf4
// > GJBaseGameLayer::toggleFlipped @ 0x100281f94
// > GJBaseGameLayer::toggleFlipped @ 0x100281fc4
// > PlayerObject::flipGravity @ 0x1002bad1c
// > PlayerObject::togglePlayerScale @ 0x1002c4148
// > PlayerObject::toggleFlyMode @ 0x1002c6564
// > PlayerObject::toggleBirdMode @ 0x1002c6cf4
// > PlayerObject::toggleSwingMode @ 0x1002c7068
// > PlayerObject::toggleDartMode @ 0x1002c7758
// > PlayerObject::toggleRollMode @ 0x1002c7bf8
// > PlayerObject::toggleRobotMode @ 0x1002c8000
// > PlayerObject::toggleSpiderMode @ 0x1002c82d0
//
// 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:02:32 +0000
//
__int64 __fastcall PlayerObject::spawnPortalCircle(__int64 result, int a2)
{
__int64 v2; // x19
_QWORD *v4; // x21
__n128 v5; // q0
__int64 v6; // x1
__int64 v7; // x0
__int64 v8; // x0
__int64 v9; // x8
__int64 v10; // x8
__int64 v11; // x0
if ( *(_BYTE *)(result + 1972) == 1 )
{
v2 = result;
if ( (*(_BYTE *)(result + 1969) & 1) == 0 )
{
result = GameManager::sharedState(result);
if ( (*(_BYTE *)(*(_QWORD *)(result + 544) + 12605LL) & 1) == 0 )
{
result = GameManager::sharedState(result);
if ( (*(_BYTE *)(result + 925) & 1) == 0 )
{
result = sub_100026398((float *)(v2 + 2488), (float *)&dbl_1009F5AA0);
if ( (result & 1) == 0 )
{
v4 = (_QWORD *)CCCircleWave::create_1(1);
*((_BYTE *)v4 + 342) = BYTE2(a2);
*((_WORD *)v4 + 170) = a2;
(*(void (__fastcall **)(_QWORD *, __int64))(*v4 + 184LL))(v4, v2 + 2488);
v6 = *(_QWORD *)(v2 + 2592);
if ( v6 )
{
v7 = CCCircleWave::followObject(v4, v6, 1);
v8 = GameManager::sharedState(v7);
v9 = *(_QWORD *)(v8 + 544);
if ( v9 )
v10 = v9 + 13992;
else
v10 = 0;
v4[46] = v10;
v11 = GameManager::sharedState(v8);
v5.n128_f64[0] = PlayLayer::addCircle(*(_QWORD *)(v11 + 544), (__int64)v4);
}
return (*(__int64 (__fastcall **)(_QWORD, _QWORD *, _QWORD, __n128))(**(_QWORD **)(v2 + 3024) + 464LL))(
*(_QWORD *)(v2 + 3024),
v4,
0,
v5);
}
}
}
}
}
return result;
}