#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_sparc(unsigned char *, unsigned char const *,
                             unsigned char const *);
int /*<<< orphan*/ poly1305_sparc(unsigned char *, unsigned char const *,
                                  unsigned char *, unsigned char const *,
                                  unsigned int);
int /*<<< orphan*/ poly1305aes_sparc_fsr();
int poly1305aes_sparc_isequal(unsigned char const *, unsigned char *);
int poly1305aes_sparc_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];
  poly1305aes_sparc_fsr();
  aes_sparc(aeskn, (kr + 0), n);
  poly1305_sparc(valid, (kr + 16), aeskn, m, l);
  return poly1305aes_sparc_isequal(a, valid);
}


x86 assembly (clang, -O0):
<poly1305aes_sparc_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)
mov    $0x0,%al
call   1040 <poly1305aes_sparc_fsr@plt>
lea    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1060 <aes_sparc@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   1050 <poly1305_sparc@plt>
mov    -0x8(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1030 <poly1305aes_sparc_isequal@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<poly1305aes_sparc_verify>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r8d,%r14d
mov    %rcx,%r15
mov    %rdx,%rbp
mov    %rsi,%rbx
mov    %rdi,%r12
xor    %eax,%eax
call   1040 <poly1305aes_sparc_fsr@plt>
lea    0x10(%rsp),%r13
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
call   1060 <aes_sparc@plt>
add    $0x10,%rbx
mov    %rsp,%rbp
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %r15,%rcx
mov    %r14d,%r8d
call   1050 <poly1305_sparc@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
call   1030 <poly1305aes_sparc_isequal@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @poly1305aes_sparc_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 = call i32 (...) @poly1305aes_sparc_fsr()
%14 = getelementptr inbounds [16 x i8], [16 x i8]* %11, i64 0, i64 0
%15 = load i8*, i8** %7
%16 = getelementptr inbounds i8, i8* %15, i64 0
%17 = load i8*, i8** %8
%18 = call i32 @aes_sparc(i8* %14, i8* %16, i8* %17)
%19 = getelementptr inbounds [16 x i8], [16 x i8]* %12, i64 0, i64 0
%20 = load i8*, i8** %7
%21 = getelementptr inbounds i8, i8* %20, i64 16
%22 = getelementptr inbounds [16 x i8], [16 x i8]* %11, i64 0, i64 0
%23 = load i8*, i8** %9
%24 = load i32, i32* %10
%25 = call i32 @poly1305_sparc(i8* %19, i8* %21, i8* %22, i8* %23, i32 %24)
%26 = load i8*, i8** %6
%27 = getelementptr inbounds [16 x i8], [16 x i8]* %12, i64 0, i64 0
%28 = call i32 @poly1305aes_sparc_isequal(i8* %26, i8* %27)
ret i32 %28
}

LLVM IR (-O2):
define i32 @poly1305aes_sparc_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 = tail call i32 (...) @poly1305aes_sparc_fsr()
%11 = call i32 @aes_sparc(i8* %8, i8* %1, i8* %2)
%12 = getelementptr inbounds i8, i8* %1, i64 16
%13 = call i32 @poly1305_sparc(i8* %9, i8* %12, i8* %8, i8* %3, i32 %4)
%14 = call i32 @poly1305aes_sparc_isequal(i8* %0, i8* %9)
ret i32 %14
}