#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();
void poly1305aes_sparc_authenticate(unsigned char out[16],
                                    const unsigned char kr[32],
                                    const unsigned char n[16],
                                    const unsigned char m[], unsigned int l) {
  unsigned char aeskn[16];
  poly1305aes_sparc_fsr();
  aes_sparc(aeskn, (kr + 0), n);
  poly1305_sparc(out, (kr + 16), aeskn, m, l);
}


x86 assembly (clang, -O0):
<poly1305aes_sparc_authenticate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%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   1030 <poly1305aes_sparc_fsr@plt>
lea    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1050 <aes_sparc@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x10,%rsi
lea    -0x40(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1040 <poly1305_sparc@plt>
add    $0x40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @poly1305aes_sparc_authenticate(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]
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
%12 = call i32 (...) @poly1305aes_sparc_fsr()
%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_sparc(i8* %13, i8* %15, i8* %16)
%18 = load i8*, i8** %6
%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_sparc(i8* %18, i8* %20, i8* %21, i8* %22, i32 %23)
ret void
}

LLVM IR (-O2):
define void @poly1305aes_sparc_authenticate(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca [16 x i8]
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%8 = tail call i32 (...) @poly1305aes_sparc_fsr()
%9 = call i32 @aes_sparc(i8* %7, i8* %1, i8* %2)
%10 = getelementptr inbounds i8, i8* %1, i64 16
%11 = call i32 @poly1305_sparc(i8* %0, i8* %10, i8* %7, i8* %3, i32 %4)
ret void
}