//
// sub_EF3674 from 0xef3674 to 0xef37f0 (380 bytes)
//
// 1 xrefs:
// > sub_EF5EA4 @ 0xef5f9c
//
// 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:12:09 +0000
//
__int64 __fastcall sub_EF3674(unsigned __int8 *a1, unsigned __int8 *a2)
{
int32x4_t v2; // q6
uint8x16_t *v3; // x2
uint8x16_t *v4; // x3
int32x4_t v5; // q7
int32x4_t v6; // q16
int32x4_t v7; // q5
uint8x16_t v8; // q0
uint8x16_t v9; // q2
uint16x8_t v10; // q1
uint16x8_t v11; // q3
uint16x8_t v12; // q0
uint16x8_t v13; // q2
int32x4_t v14; // q4
int32x4_t v15; // q1
int32x4_t v16; // q3
int32x4_t v17; // q0
int v18; // w9
int v19; // w8
int v20; // w5
int v21; // w4
int v22; // w7
int v23; // w6
int v24; // w12
int v25; // w13
int v26; // w14
int v27; // w11
int v28; // w10
int v29; // w2
int v30; // w5
int v31; // w2
int v32; // w4
int v33; // w3
v2 = 0u;
v3 = (uint8x16_t *)a2;
v4 = (uint8x16_t *)a1;
v5 = 0u;
v6 = 0u;
v7 = 0u;
do
{
v8 = *v4;
v4 += 2;
v9 = *v3;
v3 += 2;
v10 = vmovl_u8((uint8x8_t)v8.n128_u64[0]);
v11 = vmovl_u8((uint8x8_t)v9.n128_u64[0]);
v12 = vmovl_high_u8(v8);
v13 = vmovl_high_u8(v9);
v14 = vsubl_u16((uint16x4_t)v10.n128_u64[0], (uint16x4_t)v11.n128_u64[0]);
v15 = vsubl_high_u16(v10, v11);
v16 = vsubl_u16((uint16x4_t)v12.n128_u64[0], (uint16x4_t)v13.n128_u64[0]);
v17 = vsubl_high_u16(v12, v13);
v7 = vmlaq_s32(v7, v14, v14);
v6 = vmlaq_s32(v6, v15, v15);
v5 = vmlaq_s32(v5, v16, v16);
v2 = vmlaq_s32(v2, v17, v17);
}
while ( v3 != (uint8x16_t *)(a2 + 480) );
v18 = a1[480] - a2[480];
v19 = a1[481] - a2[481];
v20 = a1[482] - a2[482];
v21 = a1[483] - a2[483];
v22 = a1[484] - a2[484];
v23 = a1[485] - a2[485];
v24 = a1[486] - a2[486];
v25 = a1[488] - a2[488];
v26 = a1[487] - a2[487];
v27 = a1[489] - a2[489];
v28 = a1[490] - a2[490];
v29 = vaddvq_s32(vaddq_s32(vaddq_s32(vaddq_s32(v7, v6), v5), v2)) + v18 * v18 + v19 * v19 + v20 * v20;
v30 = a1[491] - a2[491];
v31 = v29 + v21 * v21;
v32 = a1[492] - a2[492];
v33 = a1[493] - a2[493];
return v31
+ v22 * v22
+ v23 * v23
+ v24 * v24
+ v26 * v26
+ v25 * v25
+ v27 * v27
+ v28 * v28
+ v30 * v30
+ v32 * v32
+ v33 * v33
+ (a1[494] - a2[494]) * (a1[494] - a2[494])
+ (a1[495] - a2[495]) * (a1[495] - (unsigned int)a2[495]);
}