//
// sub_7058AC from 0x7058ac to 0x705994 (232 bytes)
//
// 0 xrefs:
//
// 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
//
unsigned __int32 *__fastcall sub_7058AC(int a1, unsigned __int32 *a2)
{
int v2; // r4
int v3; // r5
int16x4_t v4; // d17
uint8x8_t v5; // d16
int v6; // r3
uint8x8_t v7; // d18
unsigned int v9; // r4
int16x4_t v10; // d22
int16x4_t v11; // d19
int16x4_t v12; // d20
int16x4_t v13; // d17
unsigned __int64 v14; // d23
unsigned __int64 v15; // d24
int16x8_t v16; // q10
int16x8_t v17; // q11
unsigned __int64 v18; // d16
unsigned __int64 v19; // d18
v2 = *(__int16 *)(a1 + 2);
v3 = *(__int16 *)(a1 + 8);
v4.n64_u64[0] = vld1_dup_s16((const __int16 *)a1).n64_u64[0];
v5.n64_u32[0] = a2[16];
v6 = (((int)&stru_14E6C.st_shndx + 1) * v2) >> 16;
v7.n64_u32[0] = *a2;
v9 = (35468 * v2) >> 16;
v7.n64_u32[1] = a2[8];
v10.n64_u64[0] = vdup_n_s16((35468 * v3) >> 16).n64_u64[0];
v11.n64_u32[0] = vshld_n_s64(vshrd_n_u64(vdup_n_s32(v9).n64_u64[0], 0x20u), 0x10u) | (unsigned __int16)v6;
v11.n64_u32[1] = (-65536 * v6) | (unsigned __int16)-(__int16)v9;
v12.n64_u64[0] = vqadd_s16(v4, v11).n64_u64[0];
v13.n64_u64[0] = vdup_n_s16((((int)&stru_14E6C.st_shndx + 1) * v3) >> 16).n64_u64[0];
v5.n64_u32[1] = a2[24];
v14 = vqadd_s16(v12, v13).n64_u64[0];
v15 = vqadd_s16(v12, v10).n64_u64[0];
*(int16x4_t *)&v16.n128_i8[8] = vqsub_s16(v12, v13);
v16.n128_u64[0] = vqsub_s16(v12, v10).n64_u64[0];
v17.n128_u64[0] = v14;
v17.n128_u64[1] = v15;
v18 = vqmovun_s16(vrsraq_n_s16(vmovl_u8(v5), v16, 3u)).n64_u64[0];
v19 = vqmovun_s16(vrsraq_n_s16(vmovl_u8(v7), v17, 3u)).n64_u64[0];
*a2 = v19;
a2[8] = HIDWORD(v19);
a2[16] = v18;
a2[24] = HIDWORD(v18);
return a2 + 8;
}