//
// SequenceTriggerGameObject::reorderTarget from 0x1001a6de0 to 0x1001a6e5f (127 bytes)
//
// 1 xrefs:
// > SetupSequenceTriggerPopup::onChangeOrder @ 0x1004d98ba
//
// 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 12:26:01 +0000
//
char __fastcall SequenceTriggerGameObject::reorderTarget(__int64 a1, int a2, unsigned __int8 a3)
{
__int64 v3; // rax
__int64 v4; // rcx
unsigned __int64 v5; // rdi
int v7; // ecx
__int64 v8; // rdx
__int64 v9; // rcx
__int64 v10; // [rsp-8h] [rbp-8h]
v3 = *(_QWORD *)(a1 + 1840);
v4 = *(_QWORD *)(a1 + 1848);
v5 = (unsigned __int64)(v4 - v3) >> 4;
if ( (int)v5 <= a2 || ((a3 ^ 1) & ((_DWORD)v5 - 1 == a2)) != 0 || a3 & (a2 == 0) | (v3 == v4) )
return 0;
v7 = a2 + (-a3 | 1);
v8 = 16LL * a2;
v9 = 16LL * v7;
*((_OWORD *)&v10 - 1) = *(_OWORD *)(v3 + v8);
*(_OWORD *)(v3 + v8) = *(_OWORD *)(v3 + v9);
*(_OWORD *)(v3 + v9) = *((_OWORD *)&v10 - 1);
return 1;
}