//
// sub_BF574C from 0xbf574c to 0xbf5814 (200 bytes)
//
// 3 xrefs:
// > jinit_color_converter @ 0xbf6724
// > jinit_color_converter @ 0xbf6754
// > jinit_color_converter @ 0xbf6780
//
// 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_BF574C(__int64 a1)
{
__int64 v1; // x19
__int64 result; // x0
__int64 v3; // x10
__int64 v4; // x9
__int64 v5; // x4
__int64 v6; // x8
__int64 v7; // x7
__int64 v8; // x6
__int64 v9; // x5
__int64 v10; // x3
__int64 v11; // x2
_QWORD *v12; // x1
v1 = *(_QWORD *)(a1 + 536);
result = (**(__int64 (***)(void))(a1 + 8))();
*(_QWORD *)(v1 + 16) = result;
v3 = 0;
v4 = 0;
v5 = 8421375;
v6 = 0;
v7 = 0;
v8 = 0x8000;
v9 = 0;
v10 = 0;
v11 = 0;
do
{
v12 = (_QWORD *)(result + 8 * v11);
*v12 = v10;
++v11;
v12[256] = v9;
v12[512] = v8;
v12[768] = v7;
v12[1024] = v6;
v12[1280] = v5;
v12[1536] = v4;
v10 += 19595;
v12[1792] = v3;
v9 += 38470;
v8 += 7471;
v7 -= 11058;
v6 -= 21710;
v5 += 0x8000;
v4 -= 27439;
v3 -= 5329;
}
while ( v11 != 256 );
return result;
}