//
// pem_check_suffix from 0xa37a18 to 0xa37a78 (96 bytes)
//
// 5 xrefs:
// > PEM_bytes_read_bio @ 0xa37d4c
// > PEM_bytes_read_bio @ 0xa37dd0
// > PEM_read_bio_PrivateKey @ 0xa38174
// > PEM_read_bio_Parameters @ 0xa383a4
// > ??> @ 0x7ee7c
//
// 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:08:08 +0000
//
int __fastcall pem_check_suffix(const char *a1, const char *a2)
{
signed int v4; // r4
size_t v5; // r0
const char *v6; // r4
int result; // r0
v4 = strlen(a1);
v5 = strlen(a2);
if ( v4 <= (int)(v5 + 1) )
return 0;
v6 = &a1[v4 - v5];
result = strcmp(v6, a2);
if ( result )
return 0;
if ( *(v6 - 1) == 32 )
return v6 - 1 - a1;
return result;
}