#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 test_crypto_aead(unsigned char const *, int, unsigned char const *, int,
                     unsigned char const *, int, unsigned char const *, int,
                     unsigned char const *, int);
int main() {
  const unsigned char *key =
      (const unsigned char
           *)"\x14\x5e\xa8\xf2\x3d\x87\xd1\x1c\x66\xb0\xfa\x45\x8f\xd9\x24\x6e";
  const unsigned char *nonce =
      (const unsigned char
           *)"\x15\x70\xcb\x27\x82\xdd\x39\x94\xef\x4b\xa6\x02\x5d\xb8\x14\x6f";
  const unsigned char *AD = (const unsigned char *)"\x0c\x78\xe4\x51\xbd\x2a";
  const unsigned char *plaintext =
      (const unsigned char *)"\x0e\x8b\x09\x86\x04\x81\xfe";
  const unsigned char *ciphertext =
      (const unsigned char *)"\xdc\xb4\xf2\x62\x3b\xf1\x57\x5e\x6a\x94\xde\xbf"
                             "\x7a\x8d\x90\xe3\xda\x3e\x07\x03\x18\x7b\x63";
  return test_crypto_aead(key, 16, nonce, 16, AD, 6, plaintext, 7, ciphertext,
                          16);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xee0(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xee6(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xee2(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xedf(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r10
mov    -0x30(%rbp),%rax
mov    $0x10,%ecx
mov    $0x6,%r9d
mov    %ecx,%esi
mov    %r10,(%rsp)
movl   $0x7,0x8(%rsp)
mov    %rax,0x10(%rsp)
movl   $0x10,0x18(%rsp)
call   1030 <test_crypto_aead@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf19(%rip),%rax
lea    0xf0a(%rip),%r10
lea    0xeda(%rip),%rdi
lea    0xee4(%rip),%rdx
lea    0xeee(%rip),%r8
mov    $0x10,%esi
mov    $0x10,%ecx
mov    $0x6,%r9d
push   $0x10
push   %rax
push   $0x7
push   %r10
call   1030 <test_crypto_aead@plt>
add    $0x20,%rsp
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"\14^\A8\F2=\87\D1\1Cf\B0\FAE\8F\D9$n\00"
@.str.1 = [17 x i8] c"\15p\CB'\82\DD9\94\EFK\A6\02]\B8\14o\00"
@.str.2 = [7 x i8] c"\0Cx\E4Q\BD*\00"
@.str.3 = [8 x i8] c"\0E\8B\09\86\04\81\FE\00"
@.str.4 = [24 x i8] c"\DC\B4\F2b;\F1W^j\94\DE\BFz\8D\90\E3\DA>\07\03\18{c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8** %3
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8** %4
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %5
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i8** %6
%7 = load i8*, i8** %2
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = load i8*, i8** %6
%12 = call i32 @test_crypto_aead(i8* %7, i32 16, i8* %8, i32 16, i8* %9, i32 6, i8* %10, i32 7, i8* %11, i32 16)
ret i32 %12
}

LLVM IR (-O2):
@.str = [17 x i8] c"\14^\A8\F2=\87\D1\1Cf\B0\FAE\8F\D9$n\00"
@.str.1 = [17 x i8] c"\15p\CB'\82\DD9\94\EFK\A6\02]\B8\14o\00"
@.str.2 = [7 x i8] c"\0Cx\E4Q\BD*\00"
@.str.3 = [8 x i8] c"\0E\8B\09\86\04\81\FE\00"
@.str.4 = [24 x i8] c"\DC\B4\F2b;\F1W^j\94\DE\BFz\8D\90\E3\DA>\07\03\18{c\00"
define i32 @main() {
%1 = tail call i32 @test_crypto_aead(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 16, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 7, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 16)
ret i32 %1
}