#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 */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_load_si128(int /*<<< orphan*/ *);
int /*<<< orphan*/ _mm_xor_si128(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ aegis128L_dec_aut_step(unsigned char *,
                                          unsigned char const *,
                                          int /*<<< orphan*/ *);
int /*<<< orphan*/ aegis128L_enc_aut_step(unsigned char const *,
                                          unsigned char *,
                                          int /*<<< orphan*/ *);
int /*<<< orphan*/ aegis128L_initialization(unsigned char const *,
                                            unsigned char const *,
                                            int /*<<< orphan*/ *);
int /*<<< orphan*/ aegis128L_tag_generation(unsigned long long,
                                            unsigned long long, int,
                                            unsigned char *,
                                            int /*<<< orphan*/ *);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char const *,
                          unsigned long long);
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/,
                          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) {
  unsigned long i;
  unsigned char plaintextblock[32], ciphertextblock[32];
  unsigned char tag[16];
  unsigned char check = 0;
  __m128i aegis128L_state[8];
  if (clen < 16)
    return 1;
  aegis128L_initialization(k, npub, aegis128L_state);
  for (i = 0; i + 32 <= adlen; i += 32) {
    aegis128L_enc_aut_step(ad + i, ciphertextblock, aegis128L_state);
  }
  if ((adlen & 0x1f) != 0) {
    memset(plaintextblock, 0, 32);
    memcpy(plaintextblock, ad + i, adlen & 0x1f);
    aegis128L_enc_aut_step(plaintextblock, ciphertextblock, aegis128L_state);
  }
  *mlen = clen - 16;
  for (i = 0; (i + 32) <= *mlen; i += 32) {
    aegis128L_dec_aut_step(m + i, c + i, aegis128L_state);
  }
  if ((*mlen & 0x1f) != 0) {
    memset(ciphertextblock, 0, 32);
    memcpy(ciphertextblock, c + i, *mlen & 0x1f);
    aegis128L_dec_aut_step(plaintextblock, ciphertextblock, aegis128L_state);
    memcpy(m + i, plaintextblock, *mlen & 0x1f);
    memset(plaintextblock, 0, *mlen & 0x1f);
    aegis128L_state[0] = _mm_xor_si128(
        aegis128L_state[0], _mm_load_si128((__m128i *)plaintextblock));
    aegis128L_state[4] = _mm_xor_si128(
        aegis128L_state[4], _mm_load_si128((__m128i *)(plaintextblock + 16)));
  }
  aegis128L_tag_generation(*mlen, adlen, 16, tag, aegis128L_state);
  for (i = 0; i < 16; i++)
    check |= (tag[i] ^ c[i + *mlen]);
  if (check == 0)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<crypto_aead_decrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
movb   $0x0,-0x91(%rbp)
cmpq   $0x10,-0x30(%rbp)
jae    11cd <crypto_aead_decrypt+0x4d>
movl   $0x1,-0x4(%rbp)
jmp    1441 <crypto_aead_decrypt+0x2c1>
mov    0x20(%rbp),%rdi
mov    0x18(%rbp),%rsi
lea    -0xc0(%rbp),%rdx
call   1090 <aegis128L_initialization@plt>
movq   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%rax
add    $0x20,%rax
cmp    0x10(%rbp),%rax
ja     1224 <crypto_aead_decrypt+0xa4>
mov    -0x38(%rbp),%rdi
add    -0x40(%rbp),%rdi
lea    -0x80(%rbp),%rsi
lea    -0xc0(%rbp),%rdx
call   10a0 <aegis128L_enc_aut_step@plt>
mov    -0x40(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x40(%rbp)
jmp    11e9 <crypto_aead_decrypt+0x69>
mov    0x10(%rbp),%rax
and    $0x1f,%rax
cmp    $0x0,%rax
je     1273 <crypto_aead_decrypt+0xf3>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x60(%rbp),%rdi
mov    -0x38(%rbp),%rsi
add    -0x40(%rbp),%rsi
mov    0x10(%rbp),%rdx
and    $0x1f,%rdx
call   1060 <memcpy@plt>
lea    -0x60(%rbp),%rdi
lea    -0x80(%rbp),%rsi
lea    -0xc0(%rbp),%rdx
call   10a0 <aegis128L_enc_aut_step@plt>
mov    -0x30(%rbp),%rcx
sub    $0x10,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
movq   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%rax
add    $0x20,%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
ja     12cc <crypto_aead_decrypt+0x14c>
mov    -0x10(%rbp),%rdi
add    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%rsi
add    -0x40(%rbp),%rsi
lea    -0xc0(%rbp),%rdx
call   1050 <aegis128L_dec_aut_step@plt>
mov    -0x40(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x40(%rbp)
jmp    128a <crypto_aead_decrypt+0x10a>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
and    $0x1f,%rax
cmp    $0x0,%rax
je     13a7 <crypto_aead_decrypt+0x227>
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x80(%rbp),%rdi
mov    -0x28(%rbp),%rsi
add    -0x40(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
and    $0x1f,%rdx
call   1060 <memcpy@plt>
lea    -0x60(%rbp),%rdi
lea    -0x80(%rbp),%rsi
lea    -0xc0(%rbp),%rdx
call   1050 <aegis128L_dec_aut_step@plt>
mov    -0x10(%rbp),%rdi
add    -0x40(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
and    $0x1f,%rdx
call   1060 <memcpy@plt>
lea    -0x60(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
and    $0x1f,%rdx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0xc0(%rbp),%eax
mov    %eax,-0xc8(%rbp)
lea    -0x60(%rbp),%rdi
call   1030 <_mm_load_si128@plt>
mov    -0xc8(%rbp),%edi
mov    %eax,%esi
call   1080 <_mm_xor_si128@plt>
mov    %eax,-0xc0(%rbp)
mov    -0xb0(%rbp),%eax
mov    %eax,-0xc4(%rbp)
lea    -0x60(%rbp),%rdi
add    $0x10,%rdi
call   1030 <_mm_load_si128@plt>
mov    -0xc4(%rbp),%edi
mov    %eax,%esi
call   1080 <_mm_xor_si128@plt>
mov    %eax,-0xb0(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    0x10(%rbp),%rsi
lea    -0x90(%rbp),%rcx
lea    -0xc0(%rbp),%r8
mov    $0x10,%edx
call   1070 <aegis128L_tag_generation@plt>
movq   $0x0,-0x40(%rbp)
cmpq   $0x10,-0x40(%rbp)
jae    141e <crypto_aead_decrypt+0x29e>
mov    -0x40(%rbp),%rax
movzbl -0x90(%rbp,%rax,1),%ecx
ff
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%rdx
mov    -0x18(%rbp),%rsi
add    (%rsi),%rdx
movzbl (%rax,%rdx,1),%eax
xor    %eax,%ecx
movzbl -0x91(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x91(%rbp)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    13d2 <crypto_aead_decrypt+0x252>
movzbl -0x91(%rbp),%eax
cmp    $0x0,%eax
jne    143a <crypto_aead_decrypt+0x2ba>
movl   $0x0,-0x4(%rbp)
jmp    1441 <crypto_aead_decrypt+0x2c1>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypto_aead_decrypt>:
mov    $0x1,%eax
cmp    $0x10,%r8
jb     13c2 <crypto_aead_decrypt+0x242>
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %r9,%rbp
mov    %r8,%r13
mov    %rdi,0x18(%rsp)
mov    %rsi,0x8(%rsp)
mov    %rcx,0x10(%rsp)
mov    0xe0(%rsp),%rdi
mov    0xd8(%rsp),%rsi
mov    0xd0(%rsp),%rbx
lea    0x20(%rsp),%rdx
call   1090 <aegis128L_initialization@plt>
cmp    $0x20,%rbx
jae    11e5 <crypto_aead_decrypt+0x65>
mov    %rbx,%rax
xor    %r12d,%r12d
jmp    1227 <crypto_aead_decrypt+0xa7>
xor    %ebx,%ebx
lea    0x50(%rsp),%r15
lea    0x20(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    (%rbx,%rbp,1),%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   10a0 <aegis128L_enc_aut_step@plt>
mov    0xd0(%rsp),%rax
lea    0x20(%rbx),%r12
add    $0x40,%rbx
cmp    %rax,%rbx
mov    %r12,%rbx
jbe    1200 <crypto_aead_decrypt+0x80>
mov    %rax,%r15
and    $0x1f,%r15
je     1267 <crypto_aead_decrypt+0xe7>
lea    0x70(%rsp),%r14
mov    $0x20,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
add    %r12,%rbp
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
call   1060 <memcpy@plt>
lea    0x50(%rsp),%rsi
lea    0x20(%rsp),%rdx
mov    %r14,%rdi
call   10a0 <aegis128L_enc_aut_step@plt>
add    $0xfffffffffffffff0,%r13
mov    0x8(%rsp),%r15
mov    %r13,(%r15)
cmp    $0x20,%r13
jae    1282 <crypto_aead_decrypt+0x102>
xor    %ebx,%ebx
mov    0x10(%rsp),%r14
jmp    12b5 <crypto_aead_decrypt+0x135>
xor    %ebp,%ebp
mov    0x10(%rsp),%r14
mov    0x18(%rsp),%r12
xchg   %ax,%ax
lea    (%r12,%rbp,1),%rdi
lea    (%r14,%rbp,1),%rsi
lea    0x20(%rsp),%rdx
call   1050 <aegis128L_dec_aut_step@plt>
mov    (%r15),%r13
lea    0x20(%rbp),%rbx
add    $0x40,%rbp
cmp    %r13,%rbp
mov    %rbx,%rbp
jbe    1290 <crypto_aead_decrypt+0x110>
test   $0x1f,%r13b
mov    %r14,%r12
je     136c <crypto_aead_decrypt+0x1ec>
lea    0x50(%rsp),%r14
mov    $0x20,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
lea    (%r12,%rbx,1),%rsi
mov    (%r15),%rdx
and    $0x1f,%edx
mov    %r14,%rdi
call   1060 <memcpy@plt>
lea    0x70(%rsp),%r15
lea    0x20(%rsp),%rdx
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <aegis128L_dec_aut_step@plt>
mov    0x18(%rsp),%rdi
add    %rbx,%rdi
mov    0x8(%rsp),%rax
mov    (%rax),%rdx
and    $0x1f,%edx
mov    %r15,%rsi
call   1060 <memcpy@plt>
mov    0x8(%rsp),%rax
mov    (%rax),%rdx
and    $0x1f,%edx
mov    %r15,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    0x20(%rsp),%ebp
mov    %r15,%rdi
mov    0x8(%rsp),%r15
call   1030 <_mm_load_si128@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1080 <_mm_xor_si128@plt>
mov    %eax,0x20(%rsp)
mov    0x30(%rsp),%ebx
lea    0x80(%rsp),%rdi
call   1030 <_mm_load_si128@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1080 <_mm_xor_si128@plt>
mov    %eax,0x30(%rsp)
mov    (%r15),%r13
lea    0x40(%rsp),%rcx
lea    0x20(%rsp),%r8
mov    %r13,%rdi
mov    0xd0(%rsp),%rsi
mov    $0x10,%edx
call   1070 <aegis128L_tag_generation@plt>
mov    (%r15),%rax
movdqu (%r12,%rax,1),%xmm0
pxor   0x40(%rsp),%xmm0
pxor   %xmm1,%xmm1
pcmpeqb %xmm0,%xmm1
pmovmskb %xmm1,%ecx
xor    %eax,%eax
cmp    $0xffff,%ecx
setne  %al
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
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 i32
%11 = alloca i8*
%12 = alloca i64*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i8*
%17 = alloca i64
%18 = alloca i8*
%19 = alloca i8*
%20 = alloca i64
%21 = alloca [32 x i8]
%22 = alloca [32 x i8]
%23 = alloca [16 x i8]
%24 = alloca i8
%25 = alloca [8 x i32]
store i8* %0, i8** %11
store i64* %1, i64** %12
store i8* %2, i8** %13
store i8* %3, i8** %14
store i64 %4, i64* %15
store i8* %5, i8** %16
store i64 %6, i64* %17
store i8* %7, i8** %18
store i8* %8, i8** %19
store i8 0, i8* %24
%26 = load i64, i64* %15
%27 = icmp ult i64 %26, 16
br i1 %27, label %28, label %29
28: ; preds = %9
store i32 1, i32* %10
br label %174
29: ; preds = %9
%30 = load i8*, i8** %19
%31 = load i8*, i8** %18
%32 = getelementptr inbounds [8 x i32], [8 x i32]* %25, i64 0, i64 0
%33 = call i32 @aegis128L_initialization(i8* %30, i8* %31, i32* %32)
store i64 0, i64* %20
br label %34
34: ; preds = %46, %29
%35 = load i64, i64* %20
%36 = add i64 %35, 32
%37 = load i64, i64* %17
%38 = icmp ule i64 %36, %37
br i1 %38, label %39, label %49
39: ; preds = %34
%40 = load i8*, i8** %16
%41 = load i64, i64* %20
%42 = getelementptr inbounds i8, i8* %40, i64 %41
%43 = getelementptr inbounds [32 x i8], [32 x i8]* %22, i64 0, i64 0
%44 = getelementptr inbounds [8 x i32], [8 x i32]* %25, i64 0, i64 0
%45 = call i32 @aegis128L_enc_aut_step(i8* %42, i8* %43, i32* %44)
br label %46
46: ; preds = %39
%47 = load i64, i64* %20
%48 = add i64 %47, 32
store i64 %48, i64* %20
br label %34
49: ; preds = %34
%50 = load i64, i64* %17
%51 = and i64 %50, 31
%52 = icmp ne i64 %51, 0
br i1 %52, label %53, label %67
53: ; preds = %49
%54 = getelementptr inbounds [32 x i8], [32 x i8]* %21, i64 0, i64 0
%55 = call i32 @memset(i8* %54, i32 0, i64 32)
%56 = getelementptr inbounds [32 x i8], [32 x i8]* %21, i64 0, i64 0
%57 = load i8*, i8** %16
%58 = load i64, i64* %20
%59 = getelementptr inbounds i8, i8* %57, i64 %58
%60 = load i64, i64* %17
%61 = and i64 %60, 31
%62 = call i32 @memcpy(i8* %56, i8* %59, i64 %61)
%63 = getelementptr inbounds [32 x i8], [32 x i8]* %21, i64 0, i64 0
%64 = getelementptr inbounds [32 x i8], [32 x i8]* %22, i64 0, i64 0
%65 = getelementptr inbounds [8 x i32], [8 x i32]* %25, i64 0, i64 0
%66 = call i32 @aegis128L_enc_aut_step(i8* %63, i8* %64, i32* %65)
br label %67
67: ; preds = %53, %49
%68 = load i64, i64* %15
%69 = sub i64 %68, 16
%70 = load i64*, i64** %12
store i64 %69, i64* %70
store i64 0, i64* %20
br label %71
71: ; preds = %86, %67
%72 = load i64, i64* %20
%73 = add i64 %72, 32
%74 = load i64*, i64** %12
%75 = load i64, i64* %74
%76 = icmp ule i64 %73, %75
br i1 %76, label %77, label %89
77: ; preds = %71
%78 = load i8*, i8** %11
%79 = load i64, i64* %20
%80 = getelementptr inbounds i8, i8* %78, i64 %79
%81 = load i8*, i8** %14
%82 = load i64, i64* %20
%83 = getelementptr inbounds i8, i8* %81, i64 %82
%84 = getelementptr inbounds [8 x i32], [8 x i32]* %25, i64 0, i64 0
%85 = call i32 @aegis128L_dec_aut_step(i8* %80, i8* %83, i32* %84)
br label %86
86: ; preds = %77
%87 = load i64, i64* %20
%88 = add i64 %87, 32
store i64 %88, i64* %20
br label %71
89: ; preds = %71
%90 = load i64*, i64** %12
%91 = load i64, i64* %90
%92 = and i64 %91, 31
%93 = icmp ne i64 %92, 0
br i1 %93, label %94, label %137
94: ; preds = %89
%95 = getelementptr inbounds [32 x i8], [32 x i8]* %22, i64 0, i64 0
%96 = call i32 @memset(i8* %95, i32 0, i64 32)
%97 = getelementptr inbounds [32 x i8], [32 x i8]* %22, i64 0, i64 0
%98 = load i8*, i8** %14
%99 = load i64, i64* %20
%100 = getelementptr inbounds i8, i8* %98, i64 %99
%101 = load i64*, i64** %12
%102 = load i64, i64* %101
%103 = and i64 %102, 31
%104 = call i32 @memcpy(i8* %97, i8* %100, i64 %103)
%105 = getelementptr inbounds [32 x i8], [32 x i8]* %21, i64 0, i64 0
%106 = getelementptr inbounds [32 x i8], [32 x i8]* %22, i64 0, i64 0
%107 = getelementptr inbounds [8 x i32], [8 x i32]* %25, i64 0, i64 0
%108 = call i32 @aegis128L_dec_aut_step(i8* %105, i8* %106, i32* %107)
%109 = load i8*, i8** %11
%110 = load i64, i64* %20
%111 = getelementptr inbounds i8, i8* %109, i64 %110
%112 = getelementptr inbounds [32 x i8], [32 x i8]* %21, i64 0, i64 0
%113 = load i64*, i64** %12
%114 = load i64, i64* %113
%115 = and i64 %114, 31
%116 = call i32 @memcpy(i8* %111, i8* %112, i64 %115)
%117 = getelementptr inbounds [32 x i8], [32 x i8]* %21, i64 0, i64 0
%118 = load i64*, i64** %12
%119 = load i64, i64* %118
%120 = and i64 %119, 31
%121 = call i32 @memset(i8* %117, i32 0, i64 %120)
%122 = getelementptr inbounds [8 x i32], [8 x i32]* %25, i64 0, i64 0
%123 = load i32, i32* %122
%124 = getelementptr inbounds [32 x i8], [32 x i8]* %21, i64 0, i64 0
%125 = bitcast i8* %124 to i32*
%126 = call i32 @_mm_load_si128(i32* %125)
%127 = call i32 @_mm_xor_si128(i32 %123, i32 %126)
%128 = getelementptr inbounds [8 x i32], [8 x i32]* %25, i64 0, i64 0
store i32 %127, i32* %128
%129 = getelementptr inbounds [8 x i32], [8 x i32]* %25, i64 0, i64 4
%130 = load i32, i32* %129
%131 = getelementptr inbounds [32 x i8], [32 x i8]* %21, i64 0, i64 0
%132 = getelementptr inbounds i8, i8* %131, i64 16
%133 = bitcast i8* %132 to i32*
%134 = call i32 @_mm_load_si128(i32* %133)
%135 = call i32 @_mm_xor_si128(i32 %130, i32 %134)
%136 = getelementptr inbounds [8 x i32], [8 x i32]* %25, i64 0, i64 4
store i32 %135, i32* %136
br label %137
137: ; preds = %94, %89
%138 = load i64*, i64** %12
%139 = load i64, i64* %138
%140 = load i64, i64* %17
%141 = getelementptr inbounds [16 x i8], [16 x i8]* %23, i64 0, i64 0
%142 = getelementptr inbounds [8 x i32], [8 x i32]* %25, i64 0, i64 0
%143 = call i32 @aegis128L_tag_generation(i64 %139, i64 %140, i32 16, i8* %141, i32* %142)
store i64 0, i64* %20
br label %144
144: ; preds = %165, %137
%145 = load i64, i64* %20
%146 = icmp ult i64 %145, 16
br i1 %146, label %147, label %168
147: ; preds = %144
%148 = load i64, i64* %20
%149 = getelementptr inbounds [16 x i8], [16 x i8]* %23, i64 0, i64 %148
%150 = load i8, i8* %149
%151 = zext i8 %150 to i32
%152 = load i8*, i8** %14
%153 = load i64, i64* %20
%154 = load i64*, i64** %12
%155 = load i64, i64* %154
%156 = add i64 %153, %155
%157 = getelementptr inbounds i8, i8* %152, i64 %156
%158 = load i8, i8* %157
%159 = zext i8 %158 to i32
%160 = xor i32 %151, %159
%161 = load i8, i8* %24
%162 = zext i8 %161 to i32
%163 = or i32 %162, %160
%164 = trunc i32 %163 to i8
store i8 %164, i8* %24
br label %165
165: ; preds = %147
%166 = load i64, i64* %20
%167 = add i64 %166, 1
store i64 %167, i64* %20
br label %144
168: ; preds = %144
%169 = load i8, i8* %24
%170 = zext i8 %169 to i32
%171 = icmp eq i32 %170, 0
br i1 %171, label %172, label %173
172: ; preds = %168
store i32 0, i32* %10
br label %174
173: ; preds = %168
store i32 1, i32* %10
br label %174
174: ; preds = %173, %172, %28
%175 = load i32, i32* %10
ret i32 %175
}

LLVM IR (-O2):
define i32 @crypto_aead_decrypt(i8* %0, i64* nocapture %1, i8* nocapture readnone %2, i8* %3, i64 %4, i8* %5, i64 %6, i8* %7, i8* %8) {
%10 = alloca [32 x i8]
%11 = alloca [32 x i8]
%12 = alloca <16 x i8>
%13 = alloca [8 x i32]
%14 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%15 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%16 = getelementptr inbounds <16 x i8>, <16 x i8>* %12, i64 0, i64 0
%17 = bitcast [8 x i32]* %13 to i8*
%18 = icmp ult i64 %4, 16
br i1 %18, label %93, label %19
19: ; preds = %9
%20 = getelementptr inbounds [8 x i32], [8 x i32]* %13, i64 0, i64 0
%21 = call i32 @aegis128L_initialization(i8* %8, i8* %7, i32* %20)
%22 = icmp ult i64 %6, 32
br i1 %22, label %30, label %23
23: ; preds = %19, %23
%24 = phi i64 [ %28, %23 ], [ 32, %19 ]
%25 = phi i64 [ %24, %23 ], [ 0, %19 ]
%26 = getelementptr inbounds i8, i8* %5, i64 %25
%27 = call i32 @aegis128L_enc_aut_step(i8* %26, i8* %15, i32* %20)
%28 = add i64 %24, 32
%29 = icmp ugt i64 %28, %6
br i1 %29, label %30, label %23
30: ; preds = %23, %19
%31 = phi i64 [ 0, %19 ], [ %24, %23 ]
%32 = and i64 %6, 31
%33 = icmp eq i64 %32, 0
br i1 %33, label %39, label %34
34: ; preds = %30
%35 = call i32 @memset(i8* %14, i32 0, i64 32)
%36 = getelementptr inbounds i8, i8* %5, i64 %31
%37 = call i32 @memcpy(i8* %14, i8* %36, i64 %32)
%38 = call i32 @aegis128L_enc_aut_step(i8* %14, i8* %15, i32* %20)
br label %39
39: ; preds = %34, %30
%40 = add i64 %4, -16
store i64 %40, i64* %1
%41 = icmp ult i64 %40, 32
br i1 %41, label %51, label %42
42: ; preds = %39, %42
%43 = phi i64 [ %48, %42 ], [ 32, %39 ]
%44 = phi i64 [ %43, %42 ], [ 0, %39 ]
%45 = getelementptr inbounds i8, i8* %0, i64 %44
%46 = getelementptr inbounds i8, i8* %3, i64 %44
%47 = call i32 @aegis128L_dec_aut_step(i8* %45, i8* %46, i32* %20)
%48 = add i64 %43, 32
%49 = load i64, i64* %1
%50 = icmp ugt i64 %48, %49
br i1 %50, label %51, label %42
51: ; preds = %42, %39
%52 = phi i64 [ 0, %39 ], [ %43, %42 ]
%53 = phi i64 [ %40, %39 ], [ %49, %42 ]
%54 = and i64 %53, 31
%55 = icmp eq i64 %54, 0
br i1 %55, label %81, label %56
56: ; preds = %51
%57 = call i32 @memset(i8* %15, i32 0, i64 32)
%58 = getelementptr inbounds i8, i8* %3, i64 %52
%59 = load i64, i64* %1
%60 = and i64 %59, 31
%61 = call i32 @memcpy(i8* %15, i8* %58, i64 %60)
%62 = call i32 @aegis128L_dec_aut_step(i8* %14, i8* %15, i32* %20)
%63 = getelementptr inbounds i8, i8* %0, i64 %52
%64 = load i64, i64* %1
%65 = and i64 %64, 31
%66 = call i32 @memcpy(i8* %63, i8* %14, i64 %65)
%67 = load i64, i64* %1
%68 = and i64 %67, 31
%69 = call i32 @memset(i8* %14, i32 0, i64 %68)
%70 = load i32, i32* %20
%71 = bitcast [32 x i8]* %10 to i32*
%72 = call i32 @_mm_load_si128(i32* %71)
%73 = call i32 @_mm_xor_si128(i32 %70, i32 %72)
store i32 %73, i32* %20
%74 = getelementptr inbounds [8 x i32], [8 x i32]* %13, i64 0, i64 4
%75 = load i32, i32* %74
%76 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 16
%77 = bitcast i8* %76 to i32*
%78 = call i32 @_mm_load_si128(i32* %77)
%79 = call i32 @_mm_xor_si128(i32 %75, i32 %78)
store i32 %79, i32* %74
%80 = load i64, i64* %1
br label %81
81: ; preds = %56, %51
%82 = phi i64 [ %80, %56 ], [ %53, %51 ]
%83 = call i32 @aegis128L_tag_generation(i64 %82, i64 %6, i32 16, i8* %16, i32* %20)
%84 = load i64, i64* %1
%85 = getelementptr inbounds i8, i8* %3, i64 %84
%86 = load <16 x i8>, <16 x i8>* %12
%87 = bitcast i8* %85 to <16 x i8>*
%88 = load <16 x i8>, <16 x i8>* %87
%89 = xor <16 x i8> %88, %86
%90 = call i8 @llvm.vector.reduce.or.v16i8(<16 x i8> %89)
%91 = icmp ne i8 %90, 0
%92 = zext i1 %91 to i32
br label %93
93: ; preds = %81, %9
%94 = phi i32 [ 1, %9 ], [ %92, %81 ]
ret i32 %94
}