#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
           *)"\x5a\x4b\x3c\x2d\x1e\x0f\x00\xf1\xe2\xd3\xc4\xb5\xa6\x97\x88\x79";
  const unsigned char *nonce =
      (const unsigned char
           *)"\x6b\x4c\x2d\x0e\xef\xd0\xb1\x92\x72\x53\x34\x15\xf6\xd7\xb8\x99";
  const unsigned char *AD = (const unsigned char *)"\x32\xf3\xb4\x75\x35\xf6";
  const unsigned char *plaintext =
      (const unsigned char *)"\xe4\x65\xe5\x66\xe6\x67\xe7";
  const unsigned char *ciphertext =
      (const unsigned char *)"\x74\xfa\x8c\x03\x7e\x28\x8f\x3a\x94\xab\xcb\x3b"
                             "\xb5\x48\x97\xba\x5c\x4a\x1c\x3a\x0b\x8b\xcb";
  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"ZK<-\1E\0F\00\F1\E2\D3\C4\B5\A6\97\88y\00"
@.str.1 = [17 x i8] c"kL-\0E\EF\D0\B1\92rS4\15\F6\D7\B8\99\00"
@.str.2 = [7 x i8] c"2\F3\B4u5\F6\00"
@.str.3 = [8 x i8] c"\E4e\E5f\E6g\E7\00"
@.str.4 = [24 x i8] c"t\FA\8C\03~(\8F:\94\AB\CB;\B5H\97\BA\\J\1C:\0B\8B\CB\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"ZK<-\1E\0F\00\F1\E2\D3\C4\B5\A6\97\88y\00"
@.str.1 = [17 x i8] c"kL-\0E\EF\D0\B1\92rS4\15\F6\D7\B8\99\00"
@.str.2 = [7 x i8] c"2\F3\B4u5\F6\00"
@.str.3 = [8 x i8] c"\E4e\E5f\E6g\E7\00"
@.str.4 = [24 x i8] c"t\FA\8C\03~(\8F:\94\AB\CB;\B5H\97\BA\\J\1C:\0B\8B\CB\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
}