//
// sub_14011A8D0 from 0x14011a8d0 to 0x14011aa88 (440 bytes)
//
// 2 xrefs:
// > DeathMarkerLayer::init @ 0x140115396
// > ??> @ 0x140916208
//
// 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:26:54 +0000
//
// Hidden C++ exception states: #wind=1
_QWORD *__fastcall sub_14011A8D0(_QWORD *a1, __int64 a2, __int64 a3)
{
__int64 v5; // rbx
__int64 v6; // rdx
unsigned __int64 v7; // r12
unsigned __int64 v8; // rdx
unsigned __int64 v9; // rcx
unsigned __int64 v10; // rsi
_QWORD *v11; // r14
_QWORD *v12; // r13
__int64 v13; // rbp
__int64 v14; // rbx
_QWORD *i; // rdi
v5 = (a2 - *a1) / 80;
v6 = (a1[1] - *a1) / 80LL;
if ( v6 == 0x333333333333333LL )
sub_14005A170();
v7 = v6 + 1;
v8 = (a1[2] - *a1) / 80LL;
v9 = v8 >> 1;
if ( v8 <= 0x333333333333333LL - (v8 >> 1) )
{
v10 = v7;
if ( v9 + v8 >= v7 )
v10 = v9 + v8;
if ( v10 > 0x333333333333333LL )
sub_140009CF0(v9, v8, 0x333333333333333LL);
}
else
{
v10 = 0x333333333333333LL;
}
v11 = sub_14003D460(80 * v10);
v12 = &v11[10 * v5];
sub_14011B590(v12, a3);
v13 = a1[1];
v14 = *a1;
if ( a2 == v13 )
{
for ( i = v11; v14 != v13; v14 += 80 )
{
sub_14011B590(i, v14);
i += 10;
}
}
else
{
sub_14011B240(*a1, a2, v11);
sub_14011B240(a2, a1[1], v12 + 10);
}
sub_14011AB60(a1, v11, v7, v10);
return v12;
}