//
// aes_v8_decrypt from 0xe064a0 to 0xe064f0 (80 bytes)
//
// 5 xrefs:
// > ??> @ 0x2e5c0
// > sub_DA200C @ 0xda21e4
// > sub_DA2740 @ 0xda27cc
// > sub_DA42CC @ 0xda4494
// > ??> @ 0x12295c8
//
// 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
//
long double __fastcall aes_v8_decrypt(uint8x16_t *a1, int8x16_t *a2, uint8x16_t *a3)
{
__int32 v3; // w3
uint8x16_t *v4; // x2
uint8x16_t v5; // q0
uint8x16_t v6; // q2
int v7; // w3
int8x16_t *v8; // x2
uint8x16_t v9; // q1
uint8x16_t v10; // q2
int8x16_t *v11; // x2
bool v12; // vf
uint8x16_t v13; // q2
long double result; // q0
v3 = a3[15].n128_i32[0];
v5 = *a3;
v4 = a3 + 1;
v6 = *a1;
v7 = v3 - 2;
v9 = *v4;
v8 = v4 + 1;
do
{
v10 = vaesimcq_u8(vaesdq_u8(v6, v5));
v5 = *v8;
v11 = v8 + 1;
v12 = __OFSUB__(v7, 2);
v7 -= 2;
v6 = vaesimcq_u8(vaesdq_u8(v10, v9));
v9 = *v11;
v8 = v11 + 1;
}
while ( !((v7 < 0) ^ v12 | (v7 == 0)) );
v13 = vaesimcq_u8(vaesdq_u8(v6, v5));
result = *(long double *)v8;
*a2 = veorq_s8(vaesdq_u8(v13, v9), *v8);
return result;
}