#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 /*<<< orphan*/ AESROUND(unsigned char *, unsigned char *, unsigned char *);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, unsigned char);
void aegis256_tag_generation(unsigned long long msglen,
                             unsigned long long adlen, unsigned char maclen,
                             unsigned char *mac, unsigned char *state) {
  int i;
  unsigned char tmp[16];
  unsigned char msgtmp[16];
  ((unsigned long long *)msgtmp)[0] = adlen << 3;
  ((unsigned long long *)msgtmp)[1] = msglen << 3;
  {
    ((unsigned long long *)(msgtmp))[0] =
        ((unsigned long long *)(msgtmp))[0] ^
        ((unsigned long long *)(state + 48))[0];
    ((unsigned long long *)(msgtmp))[1] =
        ((unsigned long long *)(msgtmp))[1] ^
        ((unsigned long long *)(state + 48))[1];
  };
  for (i = 0; i < 7; i++) {
    memcpy(tmp, state + 80, 16);
    AESROUND(state + 80, state + 64, state + 80);
    AESROUND(state + 64, state + 48, state + 64);
    AESROUND(state + 48, state + 32, state + 48);
    AESROUND(state + 32, state + 16, state + 32);
    AESROUND(state + 16, state + 0, state + 16);
    AESROUND(state + 0, tmp, state + 0);
    {
      ((unsigned long long *)(state))[0] = ((unsigned long long *)(state))[0] ^
                                           ((unsigned long long *)(msgtmp))[0];
      ((unsigned long long *)(state))[1] = ((unsigned long long *)(state))[1] ^
                                           ((unsigned long long *)(msgtmp))[1];
    };
  }
  {
    ((unsigned long long *)(state + 80))[0] =
        ((unsigned long long *)(state + 80))[0] ^
        ((unsigned long long *)(state + 64))[0];
    ((unsigned long long *)(state + 80))[1] =
        ((unsigned long long *)(state + 80))[1] ^
        ((unsigned long long *)(state + 64))[1];
  };
  {
    ((unsigned long long *)(state + 80))[0] =
        ((unsigned long long *)(state + 80))[0] ^
        ((unsigned long long *)(state + 48))[0];
    ((unsigned long long *)(state + 80))[1] =
        ((unsigned long long *)(state + 80))[1] ^
        ((unsigned long long *)(state + 48))[1];
  };
  {
    ((unsigned long long *)(state + 80))[0] =
        ((unsigned long long *)(state + 80))[0] ^
        ((unsigned long long *)(state + 32))[0];
    ((unsigned long long *)(state + 80))[1] =
        ((unsigned long long *)(state + 80))[1] ^
        ((unsigned long long *)(state + 32))[1];
  };
  {
    ((unsigned long long *)(state + 80))[0] =
        ((unsigned long long *)(state + 80))[0] ^
        ((unsigned long long *)(state + 16))[0];
    ((unsigned long long *)(state + 80))[1] =
        ((unsigned long long *)(state + 80))[1] ^
        ((unsigned long long *)(state + 16))[1];
  };
  {
    ((unsigned long long *)(state + 80))[0] =
        ((unsigned long long *)(state + 80))[0] ^
        ((unsigned long long *)(state + 0))[0];
    ((unsigned long long *)(state + 80))[1] =
        ((unsigned long long *)(state + 80))[1] ^
        ((unsigned long long *)(state + 0))[1];
  };
  memcpy(mac, state + 80, maclen);
}


x86 assembly (clang, -O0):
<aegis256_tag_generation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
mov    %rax,-0x50(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x3,%rax
mov    %rax,-0x48(%rbp)
mov    -0x50(%rbp),%rax
mov    -0x28(%rbp),%rcx
xor    0x30(%rcx),%rax
mov    %rax,-0x50(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x28(%rbp),%rcx
xor    0x38(%rcx),%rax
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x7,-0x2c(%rbp)
jge    126e <aegis256_tag_generation+0x14e>
lea    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%rsi
add    $0x50,%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    -0x28(%rbp),%rdi
add    $0x50,%rdi
mov    -0x28(%rbp),%rsi
add    $0x40,%rsi
mov    -0x28(%rbp),%rdx
add    $0x50,%rdx
call   1040 <AESROUND@plt>
mov    -0x28(%rbp),%rdi
add    $0x40,%rdi
mov    -0x28(%rbp),%rsi
add    $0x30,%rsi
mov    -0x28(%rbp),%rdx
add    $0x40,%rdx
call   1040 <AESROUND@plt>
mov    -0x28(%rbp),%rdi
add    $0x30,%rdi
mov    -0x28(%rbp),%rsi
add    $0x20,%rsi
mov    -0x28(%rbp),%rdx
add    $0x30,%rdx
call   1040 <AESROUND@plt>
mov    -0x28(%rbp),%rdi
add    $0x20,%rdi
mov    -0x28(%rbp),%rsi
add    $0x10,%rsi
mov    -0x28(%rbp),%rdx
add    $0x20,%rdx
call   1040 <AESROUND@plt>
mov    -0x28(%rbp),%rdi
add    $0x10,%rdi
mov    -0x28(%rbp),%rsi
mov    -0x28(%rbp),%rdx
add    $0x10,%rdx
call   1040 <AESROUND@plt>
mov    -0x28(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1040 <AESROUND@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%rcx
xor    -0x50(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%rcx
xor    -0x48(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    117c <aegis256_tag_generation+0x5c>
mov    -0x28(%rbp),%rax
mov    0x50(%rax),%rcx
mov    -0x28(%rbp),%rax
xor    0x40(%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x50(%rax)
mov    -0x28(%rbp),%rax
mov    0x58(%rax),%rcx
mov    -0x28(%rbp),%rax
xor    0x48(%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x58(%rax)
mov    -0x28(%rbp),%rax
mov    0x50(%rax),%rcx
mov    -0x28(%rbp),%rax
xor    0x30(%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x50(%rax)
mov    -0x28(%rbp),%rax
mov    0x58(%rax),%rcx
mov    -0x28(%rbp),%rax
xor    0x38(%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x58(%rax)
mov    -0x28(%rbp),%rax
mov    0x50(%rax),%rcx
mov    -0x28(%rbp),%rax
xor    0x20(%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x50(%rax)
mov    -0x28(%rbp),%rax
mov    0x58(%rax),%rcx
mov    -0x28(%rbp),%rax
xor    0x28(%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x58(%rax)
mov    -0x28(%rbp),%rax
mov    0x50(%rax),%rcx
mov    -0x28(%rbp),%rax
xor    0x10(%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x50(%rax)
mov    -0x28(%rbp),%rax
mov    0x58(%rax),%rcx
mov    -0x28(%rbp),%rax
xor    0x18(%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x58(%rax)
mov    -0x28(%rbp),%rax
mov    0x50(%rax),%rcx
mov    -0x28(%rbp),%rax
xor    (%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x50(%rax)
mov    -0x28(%rbp),%rax
mov    0x58(%rax),%rcx
mov    -0x28(%rbp),%rax
xor    0x8(%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x58(%rax)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
add    $0x50,%rsi
mov    -0x11(%rbp),%al
movzbl %al,%edx
call   1030 <memcpy@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aegis256_tag_generation>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r8,%rbp
mov    %rcx,0x28(%rsp)
mov    %edx,0xc(%rsp)
movq   %rdi,%xmm0
movq   %rsi,%xmm1
punpcklqdq %xmm0,%xmm1
psllq  $0x3,%xmm1
lea    0x30(%r8),%rax
mov    %rax,0x18(%rsp)
movdqu 0x30(%r8),%xmm0
pxor   %xmm1,%xmm0
movdqa %xmm0,0x30(%rsp)
lea    0x50(%r8),%rax
mov    %rax,0x20(%rsp)
lea    0x40(%r8),%r15
lea    0x20(%r8),%r14
lea    0x10(%r8),%rax
mov    %rax,0x10(%rsp)
mov    $0x7,%r12d
mov    0x20(%rsp),%r13
nopl   0x0(%rax,%rax,1)
lea    0x40(%rsp),%rdi
mov    %r13,%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    %r13,%rdi
mov    %r15,%rsi
mov    %r13,%rdx
call   1040 <AESROUND@plt>
mov    %r15,%rdi
mov    0x18(%rsp),%rbx
mov    %rbx,%rsi
mov    %r15,%rdx
call   1040 <AESROUND@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <AESROUND@plt>
mov    %r14,%rdi
mov    0x10(%rsp),%rbx
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <AESROUND@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
call   1040 <AESROUND@plt>
mov    %rbp,%rdi
lea    0x40(%rsp),%rsi
mov    %rbp,%rdx
call   1040 <AESROUND@plt>
movdqu 0x0(%rbp),%xmm0
pxor   0x30(%rsp),%xmm0
movdqu %xmm0,0x0(%rbp)
add    $0xffffffff,%r12d
jne    1190 <aegis256_tag_generation+0x70>
mov    0x20(%rsp),%rsi
movdqu (%rsi),%xmm1
movdqu (%r15),%xmm2
pxor   %xmm1,%xmm2
mov    0x18(%rsp),%rax
movdqu (%rax),%xmm1
movdqu (%r14),%xmm3
pxor   %xmm1,%xmm3
pxor   %xmm2,%xmm3
mov    0x10(%rsp),%rax
movdqu (%rax),%xmm1
pxor   %xmm3,%xmm1
pxor   %xmm1,%xmm0
movdqu %xmm0,(%rsi)
movzbl 0xc(%rsp),%edx
mov    0x28(%rsp),%rdi
call   1030 <memcpy@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @aegis256_tag_generation(i64 %0, i64 %1, i8 zeroext %2, i8* %3, i8* %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i8
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca [16 x i8]
%13 = alloca [16 x i8]
store i64 %0, i64* %6
store i64 %1, i64* %7
store i8 %2, i8* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%14 = load i64, i64* %7
%15 = shl i64 %14, 3
%16 = getelementptr inbounds [16 x i8], [16 x i8]* %13, i64 0, i64 0
%17 = bitcast i8* %16 to i64*
%18 = getelementptr inbounds i64, i64* %17, i64 0
store i64 %15, i64* %18
%19 = load i64, i64* %6
%20 = shl i64 %19, 3
%21 = getelementptr inbounds [16 x i8], [16 x i8]* %13, i64 0, i64 0
%22 = bitcast i8* %21 to i64*
%23 = getelementptr inbounds i64, i64* %22, i64 1
store i64 %20, i64* %23
%24 = getelementptr inbounds [16 x i8], [16 x i8]* %13, i64 0, i64 0
%25 = bitcast i8* %24 to i64*
%26 = getelementptr inbounds i64, i64* %25, i64 0
%27 = load i64, i64* %26
%28 = load i8*, i8** %10
%29 = getelementptr inbounds i8, i8* %28, i64 48
%30 = bitcast i8* %29 to i64*
%31 = getelementptr inbounds i64, i64* %30, i64 0
%32 = load i64, i64* %31
%33 = xor i64 %27, %32
%34 = getelementptr inbounds [16 x i8], [16 x i8]* %13, i64 0, i64 0
%35 = bitcast i8* %34 to i64*
%36 = getelementptr inbounds i64, i64* %35, i64 0
store i64 %33, i64* %36
%37 = getelementptr inbounds [16 x i8], [16 x i8]* %13, i64 0, i64 0
%38 = bitcast i8* %37 to i64*
%39 = getelementptr inbounds i64, i64* %38, i64 1
%40 = load i64, i64* %39
%41 = load i8*, i8** %10
%42 = getelementptr inbounds i8, i8* %41, i64 48
%43 = bitcast i8* %42 to i64*
%44 = getelementptr inbounds i64, i64* %43, i64 1
%45 = load i64, i64* %44
%46 = xor i64 %40, %45
%47 = getelementptr inbounds [16 x i8], [16 x i8]* %13, i64 0, i64 0
%48 = bitcast i8* %47 to i64*
%49 = getelementptr inbounds i64, i64* %48, i64 1
store i64 %46, i64* %49
store i32 0, i32* %11
br label %50
50: ; preds = %123, %5
%51 = load i32, i32* %11
%52 = icmp slt i32 %51, 7
br i1 %52, label %53, label %126
53: ; preds = %50
%54 = getelementptr inbounds [16 x i8], [16 x i8]* %12, i64 0, i64 0
%55 = load i8*, i8** %10
%56 = getelementptr inbounds i8, i8* %55, i64 80
%57 = call i32 @memcpy(i8* %54, i8* %56, i8 zeroext 16)
%58 = load i8*, i8** %10
%59 = getelementptr inbounds i8, i8* %58, i64 80
%60 = load i8*, i8** %10
%61 = getelementptr inbounds i8, i8* %60, i64 64
%62 = load i8*, i8** %10
%63 = getelementptr inbounds i8, i8* %62, i64 80
%64 = call i32 @AESROUND(i8* %59, i8* %61, i8* %63)
%65 = load i8*, i8** %10
%66 = getelementptr inbounds i8, i8* %65, i64 64
%67 = load i8*, i8** %10
%68 = getelementptr inbounds i8, i8* %67, i64 48
%69 = load i8*, i8** %10
%70 = getelementptr inbounds i8, i8* %69, i64 64
%71 = call i32 @AESROUND(i8* %66, i8* %68, i8* %70)
%72 = load i8*, i8** %10
%73 = getelementptr inbounds i8, i8* %72, i64 48
%74 = load i8*, i8** %10
%75 = getelementptr inbounds i8, i8* %74, i64 32
%76 = load i8*, i8** %10
%77 = getelementptr inbounds i8, i8* %76, i64 48
%78 = call i32 @AESROUND(i8* %73, i8* %75, i8* %77)
%79 = load i8*, i8** %10
%80 = getelementptr inbounds i8, i8* %79, i64 32
%81 = load i8*, i8** %10
%82 = getelementptr inbounds i8, i8* %81, i64 16
%83 = load i8*, i8** %10
%84 = getelementptr inbounds i8, i8* %83, i64 32
%85 = call i32 @AESROUND(i8* %80, i8* %82, i8* %84)
%86 = load i8*, i8** %10
%87 = getelementptr inbounds i8, i8* %86, i64 16
%88 = load i8*, i8** %10
%89 = getelementptr inbounds i8, i8* %88, i64 0
%90 = load i8*, i8** %10
%91 = getelementptr inbounds i8, i8* %90, i64 16
%92 = call i32 @AESROUND(i8* %87, i8* %89, i8* %91)
%93 = load i8*, i8** %10
%94 = getelementptr inbounds i8, i8* %93, i64 0
%95 = getelementptr inbounds [16 x i8], [16 x i8]* %12, i64 0, i64 0
%96 = load i8*, i8** %10
%97 = getelementptr inbounds i8, i8* %96, i64 0
%98 = call i32 @AESROUND(i8* %94, i8* %95, i8* %97)
%99 = load i8*, i8** %10
%100 = bitcast i8* %99 to i64*
%101 = getelementptr inbounds i64, i64* %100, i64 0
%102 = load i64, i64* %101
%103 = getelementptr inbounds [16 x i8], [16 x i8]* %13, i64 0, i64 0
%104 = bitcast i8* %103 to i64*
%105 = getelementptr inbounds i64, i64* %104, i64 0
%106 = load i64, i64* %105
%107 = xor i64 %102, %106
%108 = load i8*, i8** %10
%109 = bitcast i8* %108 to i64*
%110 = getelementptr inbounds i64, i64* %109, i64 0
store i64 %107, i64* %110
%111 = load i8*, i8** %10
%112 = bitcast i8* %111 to i64*
%113 = getelementptr inbounds i64, i64* %112, i64 1
%114 = load i64, i64* %113
%115 = getelementptr inbounds [16 x i8], [16 x i8]* %13, i64 0, i64 0
%116 = bitcast i8* %115 to i64*
%117 = getelementptr inbounds i64, i64* %116, i64 1
%118 = load i64, i64* %117
%119 = xor i64 %114, %118
%120 = load i8*, i8** %10
%121 = bitcast i8* %120 to i64*
%122 = getelementptr inbounds i64, i64* %121, i64 1
store i64 %119, i64* %122
br label %123
123: ; preds = %53
%124 = load i32, i32* %11
%125 = add nsw i32 %124, 1
store i32 %125, i32* %11
br label %50
126: ; preds = %50
%127 = load i8*, i8** %10
%128 = getelementptr inbounds i8, i8* %127, i64 80
%129 = bitcast i8* %128 to i64*
%130 = getelementptr inbounds i64, i64* %129, i64 0
%131 = load i64, i64* %130
%132 = load i8*, i8** %10
%133 = getelementptr inbounds i8, i8* %132, i64 64
%134 = bitcast i8* %133 to i64*
%135 = getelementptr inbounds i64, i64* %134, i64 0
%136 = load i64, i64* %135
%137 = xor i64 %131, %136
%138 = load i8*, i8** %10
%139 = getelementptr inbounds i8, i8* %138, i64 80
%140 = bitcast i8* %139 to i64*
%141 = getelementptr inbounds i64, i64* %140, i64 0
store i64 %137, i64* %141
%142 = load i8*, i8** %10
%143 = getelementptr inbounds i8, i8* %142, i64 80
%144 = bitcast i8* %143 to i64*
%145 = getelementptr inbounds i64, i64* %144, i64 1
%146 = load i64, i64* %145
%147 = load i8*, i8** %10
%148 = getelementptr inbounds i8, i8* %147, i64 64
%149 = bitcast i8* %148 to i64*
%150 = getelementptr inbounds i64, i64* %149, i64 1
%151 = load i64, i64* %150
%152 = xor i64 %146, %151
%153 = load i8*, i8** %10
%154 = getelementptr inbounds i8, i8* %153, i64 80
%155 = bitcast i8* %154 to i64*
%156 = getelementptr inbounds i64, i64* %155, i64 1
store i64 %152, i64* %156
%157 = load i8*, i8** %10
%158 = getelementptr inbounds i8, i8* %157, i64 80
%159 = bitcast i8* %158 to i64*
%160 = getelementptr inbounds i64, i64* %159, i64 0
%161 = load i64, i64* %160
%162 = load i8*, i8** %10
%163 = getelementptr inbounds i8, i8* %162, i64 48
%164 = bitcast i8* %163 to i64*
%165 = getelementptr inbounds i64, i64* %164, i64 0
%166 = load i64, i64* %165
%167 = xor i64 %161, %166
%168 = load i8*, i8** %10
%169 = getelementptr inbounds i8, i8* %168, i64 80
%170 = bitcast i8* %169 to i64*
%171 = getelementptr inbounds i64, i64* %170, i64 0
store i64 %167, i64* %171
%172 = load i8*, i8** %10
%173 = getelementptr inbounds i8, i8* %172, i64 80
%174 = bitcast i8* %173 to i64*
%175 = getelementptr inbounds i64, i64* %174, i64 1
%176 = load i64, i64* %175
%177 = load i8*, i8** %10
%178 = getelementptr inbounds i8, i8* %177, i64 48
%179 = bitcast i8* %178 to i64*
%180 = getelementptr inbounds i64, i64* %179, i64 1
%181 = load i64, i64* %180
%182 = xor i64 %176, %181
%183 = load i8*, i8** %10
%184 = getelementptr inbounds i8, i8* %183, i64 80
%185 = bitcast i8* %184 to i64*
%186 = getelementptr inbounds i64, i64* %185, i64 1
store i64 %182, i64* %186
%187 = load i8*, i8** %10
%188 = getelementptr inbounds i8, i8* %187, i64 80
%189 = bitcast i8* %188 to i64*
%190 = getelementptr inbounds i64, i64* %189, i64 0
%191 = load i64, i64* %190
%192 = load i8*, i8** %10
%193 = getelementptr inbounds i8, i8* %192, i64 32
%194 = bitcast i8* %193 to i64*
%195 = getelementptr inbounds i64, i64* %194, i64 0
%196 = load i64, i64* %195
%197 = xor i64 %191, %196
%198 = load i8*, i8** %10
%199 = getelementptr inbounds i8, i8* %198, i64 80
%200 = bitcast i8* %199 to i64*
%201 = getelementptr inbounds i64, i64* %200, i64 0
store i64 %197, i64* %201
%202 = load i8*, i8** %10
%203 = getelementptr inbounds i8, i8* %202, i64 80
%204 = bitcast i8* %203 to i64*
%205 = getelementptr inbounds i64, i64* %204, i64 1
%206 = load i64, i64* %205
%207 = load i8*, i8** %10
%208 = getelementptr inbounds i8, i8* %207, i64 32
%209 = bitcast i8* %208 to i64*
%210 = getelementptr inbounds i64, i64* %209, i64 1
%211 = load i64, i64* %210
%212 = xor i64 %206, %211
%213 = load i8*, i8** %10
%214 = getelementptr inbounds i8, i8* %213, i64 80
%215 = bitcast i8* %214 to i64*
%216 = getelementptr inbounds i64, i64* %215, i64 1
store i64 %212, i64* %216
%217 = load i8*, i8** %10
%218 = getelementptr inbounds i8, i8* %217, i64 80
%219 = bitcast i8* %218 to i64*
%220 = getelementptr inbounds i64, i64* %219, i64 0
%221 = load i64, i64* %220
%222 = load i8*, i8** %10
%223 = getelementptr inbounds i8, i8* %222, i64 16
%224 = bitcast i8* %223 to i64*
%225 = getelementptr inbounds i64, i64* %224, i64 0
%226 = load i64, i64* %225
%227 = xor i64 %221, %226
%228 = load i8*, i8** %10
%229 = getelementptr inbounds i8, i8* %228, i64 80
%230 = bitcast i8* %229 to i64*
%231 = getelementptr inbounds i64, i64* %230, i64 0
store i64 %227, i64* %231
%232 = load i8*, i8** %10
%233 = getelementptr inbounds i8, i8* %232, i64 80
%234 = bitcast i8* %233 to i64*
%235 = getelementptr inbounds i64, i64* %234, i64 1
%236 = load i64, i64* %235
%237 = load i8*, i8** %10
%238 = getelementptr inbounds i8, i8* %237, i64 16
%239 = bitcast i8* %238 to i64*
%240 = getelementptr inbounds i64, i64* %239, i64 1
%241 = load i64, i64* %240
%242 = xor i64 %236, %241
%243 = load i8*, i8** %10
%244 = getelementptr inbounds i8, i8* %243, i64 80
%245 = bitcast i8* %244 to i64*
%246 = getelementptr inbounds i64, i64* %245, i64 1
store i64 %242, i64* %246
%247 = load i8*, i8** %10
%248 = getelementptr inbounds i8, i8* %247, i64 80
%249 = bitcast i8* %248 to i64*
%250 = getelementptr inbounds i64, i64* %249, i64 0
%251 = load i64, i64* %250
%252 = load i8*, i8** %10
%253 = getelementptr inbounds i8, i8* %252, i64 0
%254 = bitcast i8* %253 to i64*
%255 = getelementptr inbounds i64, i64* %254, i64 0
%256 = load i64, i64* %255
%257 = xor i64 %251, %256
%258 = load i8*, i8** %10
%259 = getelementptr inbounds i8, i8* %258, i64 80
%260 = bitcast i8* %259 to i64*
%261 = getelementptr inbounds i64, i64* %260, i64 0
store i64 %257, i64* %261
%262 = load i8*, i8** %10
%263 = getelementptr inbounds i8, i8* %262, i64 80
%264 = bitcast i8* %263 to i64*
%265 = getelementptr inbounds i64, i64* %264, i64 1
%266 = load i64, i64* %265
%267 = load i8*, i8** %10
%268 = getelementptr inbounds i8, i8* %267, i64 0
%269 = bitcast i8* %268 to i64*
%270 = getelementptr inbounds i64, i64* %269, i64 1
%271 = load i64, i64* %270
%272 = xor i64 %266, %271
%273 = load i8*, i8** %10
%274 = getelementptr inbounds i8, i8* %273, i64 80
%275 = bitcast i8* %274 to i64*
%276 = getelementptr inbounds i64, i64* %275, i64 1
store i64 %272, i64* %276
%277 = load i8*, i8** %9
%278 = load i8*, i8** %10
%279 = getelementptr inbounds i8, i8* %278, i64 80
%280 = load i8, i8* %8
%281 = call i32 @memcpy(i8* %277, i8* %279, i8 zeroext %280)
ret void
}

LLVM IR (-O2):
define void @aegis256_tag_generation(i64 %0, i64 %1, i8 zeroext %2, i8* %3, i8* %4) {
%6 = alloca [16 x i8]
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%8 = insertelement <2 x i64> poison, i64 %1, i64 0
%9 = insertelement <2 x i64> %8, i64 %0, i64 1
%10 = shl <2 x i64> %9, <i64 3, i64 3>
%11 = getelementptr inbounds i8, i8* %4, i64 48
%12 = bitcast i8* %11 to <2 x i64>*
%13 = load <2 x i64>, <2 x i64>* %12
%14 = xor <2 x i64> %13, %10
%15 = getelementptr inbounds i8, i8* %4, i64 80
%16 = getelementptr inbounds i8, i8* %4, i64 64
%17 = getelementptr inbounds i8, i8* %4, i64 32
%18 = getelementptr inbounds i8, i8* %4, i64 16
%19 = bitcast i8* %4 to <2 x i64>*
%20 = bitcast i8* %4 to <2 x i64>*
br label %21
21: ; preds = %5, %21
%22 = phi i32 [ 0, %5 ], [ %32, %21 ]
%23 = call i32 @memcpy(i8* %7, i8* %15, i8 zeroext 16)
%24 = call i32 @AESROUND(i8* %15, i8* %16, i8* %15)
%25 = call i32 @AESROUND(i8* %16, i8* %11, i8* %16)
%26 = call i32 @AESROUND(i8* %11, i8* %17, i8* %11)
%27 = call i32 @AESROUND(i8* %17, i8* %18, i8* %17)
%28 = call i32 @AESROUND(i8* %18, i8* %4, i8* %18)
%29 = call i32 @AESROUND(i8* %4, i8* %7, i8* %4)
%30 = load <2 x i64>, <2 x i64>* %19
%31 = xor <2 x i64> %14, %30
store <2 x i64> %31, <2 x i64>* %20
%32 = add nuw nsw i32 %22, 1
%33 = icmp eq i32 %32, 7
br i1 %33, label %34, label %21
34: ; preds = %21
%35 = bitcast i8* %15 to <2 x i64>*
%36 = load <2 x i64>, <2 x i64>* %35
%37 = bitcast i8* %16 to <2 x i64>*
%38 = load <2 x i64>, <2 x i64>* %37
%39 = xor <2 x i64> %38, %36
%40 = bitcast i8* %11 to <2 x i64>*
%41 = load <2 x i64>, <2 x i64>* %40
%42 = xor <2 x i64> %41, %39
%43 = bitcast i8* %17 to <2 x i64>*
%44 = load <2 x i64>, <2 x i64>* %43
%45 = xor <2 x i64> %44, %42
%46 = bitcast i8* %18 to <2 x i64>*
%47 = load <2 x i64>, <2 x i64>* %46
%48 = xor <2 x i64> %47, %45
%49 = xor <2 x i64> %31, %48
%50 = bitcast i8* %15 to <2 x i64>*
store <2 x i64> %49, <2 x i64>* %50
%51 = call i32 @memcpy(i8* %3, i8* %15, i8 zeroext %2)
ret void
}