//
// sub_E6B9D4 from 0xe6b9d4 to 0xe6baa0 (204 bytes)
//
// 1 xrefs:
// > jinit_color_converter @ 0xe6c8f0
//
// This function is hookable on this platform (idp: arm, 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 13:10:34 +0000
//
__int64 __fastcall sub_E6B9D4(__int64 result, __int64 *a2, _QWORD *a3, unsigned int a4, int a5)
{
unsigned int v5; // w10
__int64 v6; // x5
__int64 v7; // x13
__int64 v8; // x12
__int64 v9; // x11
__int64 v10; // x8
__int64 v11; // t1
__int64 v12; // x9
__int64 v13; // x16
_DWORD *v14; // x15
__int64 v15; // x14
v5 = *(_DWORD *)(result + 48);
v6 = *(_QWORD *)(*(_QWORD *)(result + 536) + 16LL);
while ( --a5 >= 0 )
{
while ( 1 )
{
result = 0;
v7 = *(_QWORD *)(*a3 + 8LL * a4);
v8 = *(_QWORD *)(a3[1] + 8LL * a4);
v9 = *(_QWORD *)(a3[2] + 8LL * a4++);
v11 = *a2++;
v10 = v11;
if ( !v5 )
break;
do
{
v12 = *(unsigned __int8 *)(v10 + 1);
v10 += 3;
v13 = v6 + 8LL * *(unsigned __int8 *)(v10 - 3);
v14 = (_DWORD *)(v6 + 8 * (v12 + 256));
v15 = v6 + 8 * (*(unsigned __int8 *)(v10 - 1) + 512LL);
*(_BYTE *)(v7 + result) = ((unsigned int)*(_QWORD *)v13 + *v14 + *(_DWORD *)v15) >> 16;
*(_BYTE *)(v8 + result) = (unsigned int)(*(_DWORD *)(v13 + 6144) + v14[1536] + *(_DWORD *)(v15 + 6144)) >> 16;
*(_BYTE *)(v9 + result++) = ((unsigned int)*(_QWORD *)(v13 + 10240)
+ v14[2560]
+ (unsigned int)*(_QWORD *)(v15 + 10240)) >> 16;
}
while ( v5 > (unsigned int)result );
if ( --a5 < 0 )
return result;
}
}
return result;
}