//
// std::__ndk1::vector>::__swap_out_circular_buffer from 0x403868 to 0x4038ae (70 bytes)
//
// 5 xrefs:
// > PlayLayer::saveActiveSaveObjects @ 0x40750c
// > PlayLayer::saveActiveSaveObjects @ 0x4075b8
// > PlayLayer::saveActiveSaveObjects @ 0x4075ea
// > deserializeActiveSaveObjects @ 0x719156
// > deserializeActiveSaveObjects @ 0x71922e
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:47:26 +0000
//
int __fastcall std::vector::__swap_out_circular_buffer(_DWORD *a1, _DWORD *a2)
{
_DWORD *v3; // r6
_DWORD *v5; // r4
int v6; // r1
_DWORD *v7; // r5
int v8; // r1
_DWORD *v9; // r0
int v10; // r1
int result; // r0
int v12; // r1
int v13; // r2
v3 = (_DWORD *)*a1;
v5 = (_DWORD *)a1[1];
while ( 1 )
{
v6 = a2[1];
if ( v5 == v3 )
break;
v7 = (_DWORD *)(v6 - 8);
v5 -= 2;
if ( v6 != 8 )
{
v8 = v5[1];
*v7 = *v5;
v7[1] = v8;
}
a2[1] -= 8;
}
v9 = (_DWORD *)*a1;
*a1 = v6;
a2[1] = v9;
v10 = a1[1];
a1[1] = a2[2];
result = a2[3];
a2[2] = v10;
v12 = a1[2];
a1[2] = result;
v13 = a2[1];
a2[3] = v12;
*a2 = v13;
return result;
}