//
// BLAKE2s_Update from 0xaf5364 to 0xaf5428 (196 bytes)
//
// 2 xrefs:
// > sub_ADE100 @ 0xade11c
// > ??> @ 0x8543c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:11:02 +0000
//
int __fastcall BLAKE2s_Update(char *a1, char *a2, size_t a3)
{
int v3; // r3
int v5; // r7
size_t v6; // r4
char *v7; // r6
int v8; // r3
size_t v9; // r7
unsigned int v10; // r2
v3 = *((_DWORD *)a1 + 28);
v5 = 64 - v3;
v6 = a3;
v7 = a2;
if ( 64 - v3 < a3 )
{
if ( v3 )
{
memcpy(&a1[v3 + 48], a2, 64 - v3);
v6 -= v5;
sub_AF3664((int *)a1, a1 + 48, 0x40u);
*((_DWORD *)a1 + 28) = 0;
v7 += v5;
if ( v6 <= 0x40 )
{
v3 = 0;
goto LABEL_8;
}
}
else if ( a3 <= 0x40 )
{
v3 = 0;
goto LABEL_8;
}
v8 = v6 & 0x3F;
if ( (v6 & 0x3F) == 0 )
v8 = 64;
v9 = v6 - v8;
v10 = v6 - v8;
v6 = v8;
sub_AF3664((int *)a1, v7, v10);
v3 = *((_DWORD *)a1 + 28);
v7 += v9;
}
LABEL_8:
memcpy(&a1[v3 + 48], v7, v6);
*((_DWORD *)a1 + 28) += v6;
return 1;
}