//
// std::__ndk1::vector>::__swap_out_circular_buffer from 0x5a2c04 to 0x5a2c3e (58 bytes)
//
// 2 xrefs:
// > std::__ndk1::vector>::__push_back_slow_path @ 0x5a2c9e
// > std::__ndk1::vector>::__push_back_slow_path @ 0x5a2e4e
//
// 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:53:18 +0000
//
void *__fastcall std::vector::__swap_out_circular_buffer(int a1, _DWORD *a2)
{
const void *v3; // r1
signed int v5; // r2
void *result; // r0
const void *v7; // r3
int v8; // r3
int v9; // r3
v3 = *(const void **)a1;
v5 = *(_DWORD *)(a1 + 4) - *(_DWORD *)a1;
result = (void *)(a2[1] - v5);
a2[1] = result;
if ( v5 > 3 )
result = memcpy(result, v3, v5);
v7 = *(const void **)a1;
*(_DWORD *)a1 = a2[1];
a2[1] = v7;
v8 = *(_DWORD *)(a1 + 4);
*(_DWORD *)(a1 + 4) = a2[2];
a2[2] = v8;
v9 = *(_DWORD *)(a1 + 8);
*(_DWORD *)(a1 + 8) = a2[3];
a2[3] = v9;
*a2 = a2[1];
return result;
}