//
// sub_D17014 from 0xd17014 to 0xd1707c (104 bytes)
//
// 61 xrefs:
// > GameManager::getUnlockForAchievement @ 0x5e9924
// > GameManager::getUnlockForAchievement @ 0x5e9ae4
// > GameManager::getUnlockForAchievement @ 0x5e9b68
// > GameManager::getUnlockForAchievement @ 0x5e9bdc
// > GameManager::getUnlockForAchievement @ 0x5e9c58
// > GameManager::getUnlockForAchievement @ 0x5e9d20
// > GameManager::getUnlockForAchievement @ 0x5e9d78
// > GameManager::getUnlockForAchievement @ 0x5e9dd0
// > GameManager::getUnlockForAchievement @ 0x5e9e28
// > GameManager::getUnlockForAchievement @ 0x5e9e80
// > GameManager::getUnlockForAchievement @ 0x5e9ed8
// > AchievementCell::loadFromDict @ 0x60e9a0
// > AchievementCell::loadFromDict @ 0x60ea44
// > AchievementCell::loadFromDict @ 0x60eac4
// > AchievementCell::loadFromDict @ 0x60eb44
// > AchievementCell::loadFromDict @ 0x60ebc4
// > AchievementCell::loadFromDict @ 0x60ec44
// > AchievementCell::loadFromDict @ 0x60ecc4
// > AchievementCell::loadFromDict @ 0x60ed44
// > StatsCell::getTitleFromKey @ 0x614448
// > StatsCell::getTitleFromKey @ 0x6144f0
// > StatsCell::getTitleFromKey @ 0x61457c
// > StatsCell::getTitleFromKey @ 0x614600
// > StatsCell::getTitleFromKey @ 0x614678
// > StatsCell::getTitleFromKey @ 0x61471c
// > StatsCell::getTitleFromKey @ 0x61479c
// > StatsCell::getTitleFromKey @ 0x61481c
// > StatsCell::getTitleFromKey @ 0x61489c
// > StatsCell::getTitleFromKey @ 0x61491c
// > StatsCell::getTitleFromKey @ 0x61499c
// > StatsCell::getTitleFromKey @ 0x614a1c
// > GameLevelManager::onGetGJRewardsCompleted @ 0x6fd898
// > GameLevelManager::onGetGJChallengesCompleted @ 0x6fe450
// > AnimatedGameObject::animationFinished @ 0x752480
// > AnimatedGameObject::animationFinished @ 0x7527cc
// > AnimatedGameObject::animationFinished @ 0x752860
// > AnimatedGameObject::animationFinished @ 0x752960
// > AnimatedGameObject::animationFinished @ 0x752aa8
// > AchievementBar::init @ 0x7d8758
// > AchievementBar::init @ 0x7d87ec
// > AchievementBar::init @ 0x7d889c
// > AchievementBar::init @ 0x7d8944
// > AchievementBar::init @ 0x7d89ec
// > AchievementBar::init @ 0x7d8a94
// > AchievementBar::init @ 0x7d8b3c
// > AchievementBar::init @ 0x7d8be4
// > AchievementBar::init @ 0x7d8c8c
// > SecretLayer::onSubmit @ 0x9053a4
// > SecretLayer::onSubmit @ 0x9057e8
// > SecretLayer::onSubmit @ 0x9058cc
// > SecretLayer::onSubmit @ 0x905994
// > SecretLayer::onSubmit @ 0x905a1c
// > SecretLayer::onSubmit @ 0x905ae8
// > SecretLayer::onSubmit @ 0x905b84
// > SecretLayer2::onSubmit @ 0x944248
// > SecretLayer2::onSubmit @ 0x9444f8
// > SecretLayer2::onSubmit @ 0x94454c
// > SecretLayer2::onSubmit @ 0x944700
// > SecretLayer2::onSubmit @ 0x9447ac
// > SecretLayer2::onSubmit @ 0x944964
// > SecretLayer2::onSubmit @ 0x944a24
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_D17014(const void **a1, const void **a2)
{
size_t v2; // x20
const void *v3; // x1
size_t v4; // x19
const void *v5; // x0
size_t v6; // x2
__int64 result; // x0
__int64 v8; // x19
v2 = *((_QWORD *)*a2 - 3);
v3 = *a2;
v4 = *((_QWORD *)*a1 - 3);
v5 = *a1;
if ( v2 > v4 )
v6 = v4;
else
v6 = v2;
result = memcmp(v5, v3, v6);
if ( !(_DWORD)result )
{
result = 0x7FFFFFFF;
v8 = v4 - v2;
if ( v8 <= 0x7FFFFFFF )
{
if ( v8 >= (__int64)0xFFFFFFFF80000000LL )
return (unsigned int)v8;
else
return 0x80000000LL;
}
}
return result;
}