#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ aes_macos(unsigned char *, unsigned char const *,
                             unsigned char const *);
int /*<<< orphan*/ poly1305_macos(unsigned char *, unsigned char const *,
                                  unsigned char *, unsigned char const *,
                                  unsigned int);
int poly1305aes_macos_isequal(unsigned char const *, unsigned char *);
int poly1305aes_macos_verify(const unsigned char a[16],
                             const unsigned char kr[32],
                             const unsigned char n[16], const unsigned char m[],
                             unsigned int l) {
  unsigned char aeskn[16];
  unsigned char valid[16];
  aes_macos(aeskn, (kr + 0), n);
  poly1305_macos(valid, (kr + 16), aeskn, m, l);
  return poly1305aes_macos_isequal(a, valid);
}


x86 assembly (clang, -O0):
<poly1305aes_macos_verify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <aes_macos@plt>
lea    -0x50(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x10,%rsi
lea    -0x40(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1040 <poly1305_macos@plt>
mov    -0x8(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1050 <poly1305aes_macos_isequal@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<poly1305aes_macos_verify>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r8d,%r14d
mov    %rcx,%rbx
mov    %rsi,%rbp
mov    %rdi,%r15
lea    0x10(%rsp),%r12
mov    %r12,%rdi
call   1030 <aes_macos@plt>
add    $0x10,%rbp
mov    %rsp,%r13
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
mov    %rbx,%rcx
mov    %r14d,%r8d
call   1040 <poly1305_macos@plt>
mov    %r15,%rdi
mov    %r13,%rsi
call   1050 <poly1305aes_macos_isequal@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @poly1305aes_macos_verify(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca [16 x i8]
%12 = alloca [16 x i8]
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%13 = getelementptr inbounds [16 x i8], [16 x i8]* %11, i64 0, i64 0
%14 = load i8*, i8** %7
%15 = getelementptr inbounds i8, i8* %14, i64 0
%16 = load i8*, i8** %8
%17 = call i32 @aes_macos(i8* %13, i8* %15, i8* %16)
%18 = getelementptr inbounds [16 x i8], [16 x i8]* %12, i64 0, i64 0
%19 = load i8*, i8** %7
%20 = getelementptr inbounds i8, i8* %19, i64 16
%21 = getelementptr inbounds [16 x i8], [16 x i8]* %11, i64 0, i64 0
%22 = load i8*, i8** %9
%23 = load i32, i32* %10
%24 = call i32 @poly1305_macos(i8* %18, i8* %20, i8* %21, i8* %22, i32 %23)
%25 = load i8*, i8** %6
%26 = getelementptr inbounds [16 x i8], [16 x i8]* %12, i64 0, i64 0
%27 = call i32 @poly1305aes_macos_isequal(i8* %25, i8* %26)
ret i32 %27
}

LLVM IR (-O2):
define i32 @poly1305aes_macos_verify(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca [16 x i8]
%7 = alloca [16 x i8]
%8 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%10 = call i32 @aes_macos(i8* %8, i8* %1, i8* %2)
%11 = getelementptr inbounds i8, i8* %1, i64 16
%12 = call i32 @poly1305_macos(i8* %9, i8* %11, i8* %8, i8* %3, i32 %4)
%13 = call i32 @poly1305aes_macos_isequal(i8* %0, i8* %9)
ret i32 %13
}