#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*/ AEAD_CGEN(unsigned char const *, unsigned char const *,
                             unsigned char const *, unsigned long long const,
                             unsigned char *, unsigned long long *);
int /*<<< orphan*/ AEAD_TGEN(unsigned char const *, unsigned char const *,
                             unsigned char const *, unsigned long long const,
                             unsigned char *, unsigned long long,
                             unsigned char *);
int AEAD_ENC(const unsigned char *_K, const unsigned char *_N,
             const unsigned char *_AD, const unsigned long long _adlen,
             const unsigned char *_M, const unsigned long long _mlen,
             unsigned char *C_, unsigned long long *clen_,
             unsigned char *tag_) {
  AEAD_CGEN(_K, _N, _M, _mlen, C_, clen_);
  AEAD_TGEN(_K, _N, _AD, _adlen, C_, *clen_, tag_);
  return 0;
}


x86 assembly (clang, -O0):
<AEAD_ENC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    0x10(%rbp),%r8
mov    0x18(%rbp),%r9
call   1030 <AEAD_CGEN@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    0x10(%rbp),%r8
mov    0x18(%rbp),%rax
mov    (%rax),%r9
mov    0x20(%rbp),%rax
mov    %rax,(%rsp)
call   1040 <AEAD_TGEN@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AEAD_ENC>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
mov    0x40(%rsp),%r13
mov    0x48(%rsp),%rbp
mov    %r8,%rdx
mov    %r9,%rcx
mov    %r13,%r8
mov    %rbp,%r9
call   1030 <AEAD_CGEN@plt>
mov    0x0(%rbp),%r9
mov    0x50(%rsp),%rax
mov    %rax,(%rsp)
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
mov    %r13,%r8
call   1040 <AEAD_TGEN@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @AEAD_ENC(i8* %0, i8* %1, i8* %2, i64 %3, i8* %4, i64 %5, i8* %6, i64* %7, i8* %8) {
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i8*
%17 = alloca i64*
%18 = alloca i8*
store i8* %0, i8** %10
store i8* %1, i8** %11
store i8* %2, i8** %12
store i64 %3, i64* %13
store i8* %4, i8** %14
store i64 %5, i64* %15
store i8* %6, i8** %16
store i64* %7, i64** %17
store i8* %8, i8** %18
%19 = load i8*, i8** %10
%20 = load i8*, i8** %11
%21 = load i8*, i8** %14
%22 = load i64, i64* %15
%23 = load i8*, i8** %16
%24 = load i64*, i64** %17
%25 = call i32 @AEAD_CGEN(i8* %19, i8* %20, i8* %21, i64 %22, i8* %23, i64* %24)
%26 = load i8*, i8** %10
%27 = load i8*, i8** %11
%28 = load i8*, i8** %12
%29 = load i64, i64* %13
%30 = load i8*, i8** %16
%31 = load i64*, i64** %17
%32 = load i64, i64* %31
%33 = load i8*, i8** %18
%34 = call i32 @AEAD_TGEN(i8* %26, i8* %27, i8* %28, i64 %29, i8* %30, i64 %32, i8* %33)
ret i32 0
}

LLVM IR (-O2):
define i32 @AEAD_ENC(i8* %0, i8* %1, i8* %2, i64 %3, i8* %4, i64 %5, i8* %6, i64* %7, i8* %8) {
%10 = tail call i32 @AEAD_CGEN(i8* %0, i8* %1, i8* %4, i64 %5, i8* %6, i64* %7)
%11 = load i64, i64* %7
%12 = tail call i32 @AEAD_TGEN(i8* %0, i8* %1, i8* %2, i64 %3, i8* %6, i64 %11, i8* %8)
ret i32 0
}