//
// sub_8208A0 from 0x8208a0 to 0x8209da (314 bytes)
//
// 3 xrefs:
// > sub_820F7C @ 0x8213ea
// > sub_820F7C @ 0x8213f4
// > sub_820F7C @ 0x8213fe
//
// 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 12:01:50 +0000
//
int __fastcall sub_8208A0(char *a1, __int64 a2)
{
__int64 v4; // r0
__int64 v5; // r8
__int64 v6; // r0
int v8; // lr
__int64 v9; // r0
__int64 v10; // d16
__int64 v11; // d8
__int64 v12; // r0
__int64 v13; // r2
if ( a2 < 1 )
{
strcpy(a1, "--:--:--");
return *(_DWORD *)"--:--:--";
}
else
{
v4 = a2 / 3600;
v5 = a2 / 3600;
if ( a2 / 3600 < 100 )
{
LODWORD(v10) = a2 / -3600;
HIDWORD(v10) = HIDWORD(v4) - (2 * HIDWORD(v4) + ((_DWORD)v4 != 0));
v11 = vshld_n_s64(vshld_n_s64(vshld_n_s64(v10, 3u) + v4, 5u) - v4, 4u) + a2;
v12 = v11 / 60;
LODWORD(v13) = v11 / -60;
HIDWORD(v13) = HIDWORD(v12) - (2 * HIDWORD(v12) + ((_DWORD)v12 != 0));
return sub_8346C0(a1, 9, "%2lld:%02lld:%02lld", v5, v12, v11 + vshld_n_s64(vshld_n_s64(v13, 4u) + v12, 2u));
}
else
{
v6 = a2 / (unsigned int)&stru_1517C.st_value;
if ( v6 < 1000 )
{
v8 = -(int)v6 - 86400 * HIDWORD(v6);
v9 = 4294880896LL * (unsigned int)v6;
HIDWORD(v9) += v8;
return sub_8346C0(a1, 9, "%3lldd %02lldh", a2 / (unsigned int)&stru_1517C.st_value, (v9 + a2) / 3600);
}
else
{
return sub_8346C0(a1, 9, "%7lldd", v6);
}
}
}
}