#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 ocb_crypt(unsigned char *, unsigned char *, unsigned char *,
              unsigned char *, unsigned long long, unsigned char *,
              unsigned long long, int /*<<< orphan*/);
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) {
  *mlen = clen - 16;
  return ocb_crypt(m, (unsigned char *)k, (unsigned char *)npub,
                   (unsigned char *)ad, adlen, (unsigned char *)c, clen, 0);
}


x86 assembly (clang, -O0):
<crypto_aead_decrypt>:
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    -0x28(%rbp),%rcx
sub    $0x10,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rdi
mov    0x20(%rbp),%rsi
mov    0x18(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    0x10(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    -0x28(%rbp),%rax
xor    %r10d,%r10d
mov    %rax,(%rsp)
movl   $0x0,0x8(%rsp)
call   1030 <ocb_crypt@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypto_aead_decrypt>:
push   %rax
mov    %r8,%rax
mov    %rcx,%r10
mov    0x20(%rsp),%r11
mov    0x18(%rsp),%rdx
mov    0x10(%rsp),%r8
lea    -0x10(%rax),%rcx
mov    %rcx,(%rsi)
mov    %r11,%rsi
mov    %r9,%rcx
mov    %r10,%r9
push   $0x0
push   %rax
call   1030 <ocb_crypt@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*
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
%19 = load i64, i64* %14
%20 = sub i64 %19, 16
%21 = load i64*, i64** %11
store i64 %20, i64* %21
%22 = load i8*, i8** %10
%23 = load i8*, i8** %18
%24 = load i8*, i8** %17
%25 = load i8*, i8** %15
%26 = load i64, i64* %16
%27 = load i8*, i8** %13
%28 = load i64, i64* %14
%29 = call i32 @ocb_crypt(i8* %22, i8* %23, i8* %24, i8* %25, i64 %26, i8* %27, i64 %28, i32 0)
ret i32 %29
}

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