#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 kiasu_aead_decrypt(unsigned char const *, unsigned long long,
                       unsigned char *, unsigned long long *,
                       unsigned char const *, unsigned char const *,
                       unsigned char const *, unsigned long long);
int crypto_aead_decrypt(unsigned char *m, unsigned long long *mlen,
                        unsigned char *nsec, const unsigned char *c,
                        unsigned long long clen, const unsigned char *ad,
                        unsigned long long adlen, const unsigned char *npub,
                        const unsigned char *k) {
  size_t outlen = 0;
  int result = kiasu_aead_decrypt(ad, adlen, m, mlen, k, npub, c, clen);
  (void)nsec;
  return result;
}


x86 assembly (clang, -O0):
<crypto_aead_decrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%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)
movq   $0x0,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
mov    0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    0x20(%rbp),%r8
mov    0x18(%rbp),%r9
mov    -0x20(%rbp),%r10
mov    -0x28(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <kiasu_aead_decrypt@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypto_aead_decrypt>:
push   %rax
mov    %r9,%rax
mov    %r8,%r11
mov    %rcx,%r10
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x10(%rsp),%rsi
mov    0x20(%rsp),%r8
mov    0x18(%rsp),%r9
mov    %rax,%rdi
push   %r11
push   %r10
call   1030 <kiasu_aead_decrypt@plt>
add    $0x10,%rsp
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @crypto_aead_decrypt(i8* %0, i64* %1, i8* nocapture readnone %2, i8* %3, i64 %4, i8* %5, i64 %6, i8* %7, i8* %8) {
%10 = tail call i32 @kiasu_aead_decrypt(i8* %5, i64 %6, i8* %0, i64* %1, i8* %8, i8* %7, i8* %3, i64 %4)
ret i32 %10
}