//
// sub_1005BF280 from 0x1005bf280 to 0x1005bf3c7 (327 bytes)
//
// 4 xrefs:
// > PlayerCheckpoint::processState @ 0x1005d7540
// > processGJGameStateFields @ 0x1005de682
// > sub_1005E29A0 @ 0x1005e4415
// > sub_1005E29A0 @ 0x1005e442f
//
// 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:32:45 +0000
//
__int64 __fastcall sub_1005BF280(__int64 a1, _QWORD *a2)
{
__int64 v2; // r13
__int64 v3; // r13
__int64 v4; // r12
void *v6[3]; // [rsp+8h] [rbp-278h] BYREF
_BYTE v7[12]; // [rsp+24h] [rbp-25Ch] BYREF
__int64 v8; // [rsp+30h] [rbp-250h]
void *v9; // [rsp+38h] [rbp-248h]
_BYTE v10[504]; // [rsp+40h] [rbp-240h] BYREF
__int16 v11; // [rsp+238h] [rbp-48h]
char v12; // [rsp+23Ah] [rbp-46h]
void *v13; // [rsp+248h] [rbp-38h]
*(_QWORD *)&v7[4] = 0;
v8 = 500;
v9 = v10;
v11 = 31746;
v12 = 0;
v2 = (a2[1] - *a2) >> 2;
*(_QWORD *)v7 = (unsigned int)v2;
sub_1005BE520((__int64)&v7[4], (int *)v7);
if ( (int)v2 > 0 )
{
v3 = v2 & 0x7FFFFFFF;
v4 = 0;
do
{
sub_1005BE140((__int64)&v7[4], (float *)(v4 + *a2));
v4 += 4;
--v3;
}
while ( v3 );
}
sub_1005BED90(v6, (__int64)&v7[4]);
sub_1005BEEA0(a1, (unsigned __int8 *)v6);
if ( ((__int64)v6[0] & 1) != 0 )
operator delete(v6[2]);
if ( (v11 & 1) != 0 )
operator delete(v13);
if ( v9 != v10 && v9 != nullptr )
operator delete[](v9);
return __stack_chk_guard;
}