//
// CheckpointGameObject::resetCheckpoint from 0x14065c0b0 to 0x14065c265 (437 bytes)
//
// 3 xrefs:
// > CheckpointGameObject::resetObject @ 0x14065c09d
// > CheckpointGameObject::restoreObject @ 0x14065c282
// > ??> @ 0x14093197c
//
// 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 11:35:47 +0000
//
__int64 __fastcall CheckpointGameObject::resetCheckpoint(__int64 *a1)
{
__int64 v1; // rax
__int64 v3; // rax
__int64 v4; // rdx
char v5; // bl
__int64 v6; // rax
__int64 v7; // rdx
char v8; // bl
__int64 v9; // rax
__int64 v10; // rdx
__int64 v11; // rax
char v12; // bl
__int64 v13; // rax
__int64 v14; // rdx
char v15; // bl
__int64 v16; // rax
__int64 v17; // rdx
char v18; // bl
__int64 v19; // rax
__int64 v20; // rdx
__int64 v21; // rax
__int64 result; // rax
v1 = *a1;
*((_BYTE *)a1 + 1856) = 0;
v3 = (*(__int64 (__fastcall **)(__int64 *, __int64))(v1 + 472))(a1, 1125);
v4 = *(_QWORD *)v3;
LOBYTE(v4) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 336LL))(v3, v4);
v5 = *((_BYTE *)a1 + 1856);
v6 = (*(__int64 (__fastcall **)(__int64 *, __int64))(*a1 + 472))(a1, 1126);
LOBYTE(v7) = v5 == 0;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v6 + 336LL))(v6, v7);
v8 = *((_BYTE *)a1 + 1856);
v9 = (*(__int64 (__fastcall **)(__int64 *, __int64))(*a1 + 472))(a1, 1127);
LOBYTE(v10) = v8 == 0;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v9 + 336LL))(v9, v10);
v11 = (*(__int64 (__fastcall **)(__int64 *, __int64))(*a1 + 472))(a1, 1128);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v11 + 336LL))(v11, *((unsigned __int8 *)a1 + 1856));
v12 = *((_BYTE *)a1 + 1856);
v13 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1[112] + 472LL))(a1[112], 1125);
LOBYTE(v14) = v12 == 0;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v13 + 336LL))(v13, v14);
v15 = *((_BYTE *)a1 + 1856);
v16 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1[112] + 472LL))(a1[112], 1126);
LOBYTE(v17) = v15 == 0;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v16 + 336LL))(v16, v17);
v18 = *((_BYTE *)a1 + 1856);
v19 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1[112] + 472LL))(a1[112], 1127);
LOBYTE(v20) = v18 == 0;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v19 + 336LL))(v19, v20);
v21 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1[112] + 472LL))(a1[112], 1128);
result = (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v21 + 336LL))(v21, *((unsigned __int8 *)a1 + 1856));
if ( *((_BYTE *)a1 + 1856) )
{
result = (*(__int64 (__fastcall **)(__int64 *, __int16 *))(*a1 + 1344))(a1, &word_1407046D4);
*((_BYTE *)a1 + 644) = 1;
}
else
{
*((_BYTE *)a1 + 644) = 0;
}
return result;
}