#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 aegis128_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 + 64, 16);
    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 + 64))[0] =
        ((unsigned long long *)(state + 64))[0] ^
        ((unsigned long long *)(state + 48))[0];
    ((unsigned long long *)(state + 64))[1] =
        ((unsigned long long *)(state + 64))[1] ^
        ((unsigned long long *)(state + 48))[1];
  };
  {
    ((unsigned long long *)(state + 64))[0] =
        ((unsigned long long *)(state + 64))[0] ^
        ((unsigned long long *)(state + 32))[0];
    ((unsigned long long *)(state + 64))[1] =
        ((unsigned long long *)(state + 64))[1] ^
        ((unsigned long long *)(state + 32))[1];
  };
  {
    ((unsigned long long *)(state + 64))[0] =
        ((unsigned long long *)(state + 64))[0] ^
        ((unsigned long long *)(state + 16))[0];
    ((unsigned long long *)(state + 64))[1] =
        ((unsigned long long *)(state + 64))[1] ^
        ((unsigned long long *)(state + 16))[1];
  };
  {
    ((unsigned long long *)(state + 64))[0] =
        ((unsigned long long *)(state + 64))[0] ^
        ((unsigned long long *)(state + 0))[0];
    ((unsigned long long *)(state + 64))[1] =
        ((unsigned long long *)(state + 64))[1] ^
        ((unsigned long long *)(state + 0))[1];
  };
  memcpy(mac, state + 64, maclen);
}


x86 assembly (clang, -O0):
<aegis128_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    1251 <aegis128_tag_generation+0x131>
lea    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%rsi
add    $0x40,%rsi
mov    $0x10,%edx
call   1030 <memcpy@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 <aegis128_tag_generation+0x5c>
mov    -0x28(%rbp),%rax
mov    0x40(%rax),%rcx
mov    -0x28(%rbp),%rax
xor    0x30(%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x40(%rax)
mov    -0x28(%rbp),%rax
mov    0x48(%rax),%rcx
mov    -0x28(%rbp),%rax
xor    0x38(%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x48(%rax)
mov    -0x28(%rbp),%rax
mov    0x40(%rax),%rcx
mov    -0x28(%rbp),%rax
xor    0x20(%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x40(%rax)
mov    -0x28(%rbp),%rax
mov    0x48(%rax),%rcx
mov    -0x28(%rbp),%rax
xor    0x28(%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x48(%rax)
mov    -0x28(%rbp),%rax
mov    0x40(%rax),%rcx
mov    -0x28(%rbp),%rax
xor    0x10(%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x40(%rax)
mov    -0x28(%rbp),%rax
mov    0x48(%rax),%rcx
mov    -0x28(%rbp),%rax
xor    0x18(%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x48(%rax)
mov    -0x28(%rbp),%rax
mov    0x40(%rax),%rcx
mov    -0x28(%rbp),%rax
xor    (%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x40(%rax)
mov    -0x28(%rbp),%rax
mov    0x48(%rax),%rcx
mov    -0x28(%rbp),%rax
xor    0x8(%rax),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x48(%rax)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
add    $0x40,%rsi
mov    -0x11(%rbp),%al
movzbl %al,%edx
call   1030 <memcpy@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aegis128_tag_generation>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r8,%rbp
mov    %rcx,0x8(%rsp)
mov    %edx,0x4(%rsp)
movq   %rdi,%xmm0
movq   %rsi,%xmm1
punpcklqdq %xmm0,%xmm1
psllq  $0x3,%xmm1
lea    0x30(%r8),%r13
movdqu 0x30(%r8),%xmm0
pxor   %xmm1,%xmm0
movdqa %xmm0,0x10(%rsp)
lea    0x40(%r8),%r12
lea    0x20(%r8),%rbx
lea    0x10(%r8),%r14
mov    $0x7,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x20(%rsp),%rdi
mov    %r12,%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    %r12,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
call   1040 <AESROUND@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
call   1040 <AESROUND@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <AESROUND@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1040 <AESROUND@plt>
mov    %rbp,%rdi
lea    0x20(%rsp),%rsi
mov    %rbp,%rdx
call   1040 <AESROUND@plt>
movdqu 0x0(%rbp),%xmm0
pxor   0x10(%rsp),%xmm0
movdqu %xmm0,0x0(%rbp)
add    $0xffffffff,%r15d
jne    1180 <aegis128_tag_generation+0x60>
movdqu (%r12),%xmm1
movdqu 0x0(%r13),%xmm2
pxor   %xmm1,%xmm2
movdqu (%rbx),%xmm1
movdqu (%r14),%xmm3
pxor   %xmm1,%xmm3
pxor   %xmm2,%xmm3
pxor   %xmm3,%xmm0
movdqu %xmm0,(%r12)
movzbl 0x4(%rsp),%edx
mov    0x8(%rsp),%rdi
mov    %r12,%rsi
call   1030 <memcpy@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @aegis128_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 = %116, %5
%51 = load i32, i32* %11
%52 = icmp slt i32 %51, 7
br i1 %52, label %53, label %119
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 64
%57 = call i32 @memcpy(i8* %54, i8* %56, i8 zeroext 16)
%58 = load i8*, i8** %10
%59 = getelementptr inbounds i8, i8* %58, i64 64
%60 = load i8*, i8** %10
%61 = getelementptr inbounds i8, i8* %60, i64 48
%62 = load i8*, i8** %10
%63 = getelementptr inbounds i8, i8* %62, i64 64
%64 = call i32 @AESROUND(i8* %59, i8* %61, i8* %63)
%65 = load i8*, i8** %10
%66 = getelementptr inbounds i8, i8* %65, i64 48
%67 = load i8*, i8** %10
%68 = getelementptr inbounds i8, i8* %67, i64 32
%69 = load i8*, i8** %10
%70 = getelementptr inbounds i8, i8* %69, i64 48
%71 = call i32 @AESROUND(i8* %66, i8* %68, i8* %70)
%72 = load i8*, i8** %10
%73 = getelementptr inbounds i8, i8* %72, i64 32
%74 = load i8*, i8** %10
%75 = getelementptr inbounds i8, i8* %74, i64 16
%76 = load i8*, i8** %10
%77 = getelementptr inbounds i8, i8* %76, i64 32
%78 = call i32 @AESROUND(i8* %73, i8* %75, i8* %77)
%79 = load i8*, i8** %10
%80 = getelementptr inbounds i8, i8* %79, i64 16
%81 = load i8*, i8** %10
%82 = getelementptr inbounds i8, i8* %81, i64 0
%83 = load i8*, i8** %10
%84 = getelementptr inbounds i8, i8* %83, i64 16
%85 = call i32 @AESROUND(i8* %80, i8* %82, i8* %84)
%86 = load i8*, i8** %10
%87 = getelementptr inbounds i8, i8* %86, i64 0
%88 = getelementptr inbounds [16 x i8], [16 x i8]* %12, i64 0, i64 0
%89 = load i8*, i8** %10
%90 = getelementptr inbounds i8, i8* %89, i64 0
%91 = call i32 @AESROUND(i8* %87, i8* %88, i8* %90)
%92 = load i8*, i8** %10
%93 = bitcast i8* %92 to i64*
%94 = getelementptr inbounds i64, i64* %93, i64 0
%95 = load i64, i64* %94
%96 = getelementptr inbounds [16 x i8], [16 x i8]* %13, i64 0, i64 0
%97 = bitcast i8* %96 to i64*
%98 = getelementptr inbounds i64, i64* %97, i64 0
%99 = load i64, i64* %98
%100 = xor i64 %95, %99
%101 = load i8*, i8** %10
%102 = bitcast i8* %101 to i64*
%103 = getelementptr inbounds i64, i64* %102, i64 0
store i64 %100, i64* %103
%104 = load i8*, i8** %10
%105 = bitcast i8* %104 to i64*
%106 = getelementptr inbounds i64, i64* %105, i64 1
%107 = load i64, i64* %106
%108 = getelementptr inbounds [16 x i8], [16 x i8]* %13, i64 0, i64 0
%109 = bitcast i8* %108 to i64*
%110 = getelementptr inbounds i64, i64* %109, i64 1
%111 = load i64, i64* %110
%112 = xor i64 %107, %111
%113 = load i8*, i8** %10
%114 = bitcast i8* %113 to i64*
%115 = getelementptr inbounds i64, i64* %114, i64 1
store i64 %112, i64* %115
br label %116
116: ; preds = %53
%117 = load i32, i32* %11
%118 = add nsw i32 %117, 1
store i32 %118, i32* %11
br label %50
119: ; preds = %50
%120 = load i8*, i8** %10
%121 = getelementptr inbounds i8, i8* %120, i64 64
%122 = bitcast i8* %121 to i64*
%123 = getelementptr inbounds i64, i64* %122, i64 0
%124 = load i64, i64* %123
%125 = load i8*, i8** %10
%126 = getelementptr inbounds i8, i8* %125, i64 48
%127 = bitcast i8* %126 to i64*
%128 = getelementptr inbounds i64, i64* %127, i64 0
%129 = load i64, i64* %128
%130 = xor i64 %124, %129
%131 = load i8*, i8** %10
%132 = getelementptr inbounds i8, i8* %131, i64 64
%133 = bitcast i8* %132 to i64*
%134 = getelementptr inbounds i64, i64* %133, i64 0
store i64 %130, i64* %134
%135 = load i8*, i8** %10
%136 = getelementptr inbounds i8, i8* %135, i64 64
%137 = bitcast i8* %136 to i64*
%138 = getelementptr inbounds i64, i64* %137, i64 1
%139 = load i64, i64* %138
%140 = load i8*, i8** %10
%141 = getelementptr inbounds i8, i8* %140, i64 48
%142 = bitcast i8* %141 to i64*
%143 = getelementptr inbounds i64, i64* %142, i64 1
%144 = load i64, i64* %143
%145 = xor i64 %139, %144
%146 = load i8*, i8** %10
%147 = getelementptr inbounds i8, i8* %146, i64 64
%148 = bitcast i8* %147 to i64*
%149 = getelementptr inbounds i64, i64* %148, i64 1
store i64 %145, i64* %149
%150 = load i8*, i8** %10
%151 = getelementptr inbounds i8, i8* %150, i64 64
%152 = bitcast i8* %151 to i64*
%153 = getelementptr inbounds i64, i64* %152, i64 0
%154 = load i64, i64* %153
%155 = load i8*, i8** %10
%156 = getelementptr inbounds i8, i8* %155, i64 32
%157 = bitcast i8* %156 to i64*
%158 = getelementptr inbounds i64, i64* %157, i64 0
%159 = load i64, i64* %158
%160 = xor i64 %154, %159
%161 = load i8*, i8** %10
%162 = getelementptr inbounds i8, i8* %161, i64 64
%163 = bitcast i8* %162 to i64*
%164 = getelementptr inbounds i64, i64* %163, i64 0
store i64 %160, i64* %164
%165 = load i8*, i8** %10
%166 = getelementptr inbounds i8, i8* %165, i64 64
%167 = bitcast i8* %166 to i64*
%168 = getelementptr inbounds i64, i64* %167, i64 1
%169 = load i64, i64* %168
%170 = load i8*, i8** %10
%171 = getelementptr inbounds i8, i8* %170, i64 32
%172 = bitcast i8* %171 to i64*
%173 = getelementptr inbounds i64, i64* %172, i64 1
%174 = load i64, i64* %173
%175 = xor i64 %169, %174
%176 = load i8*, i8** %10
%177 = getelementptr inbounds i8, i8* %176, i64 64
%178 = bitcast i8* %177 to i64*
%179 = getelementptr inbounds i64, i64* %178, i64 1
store i64 %175, i64* %179
%180 = load i8*, i8** %10
%181 = getelementptr inbounds i8, i8* %180, i64 64
%182 = bitcast i8* %181 to i64*
%183 = getelementptr inbounds i64, i64* %182, i64 0
%184 = load i64, i64* %183
%185 = load i8*, i8** %10
%186 = getelementptr inbounds i8, i8* %185, i64 16
%187 = bitcast i8* %186 to i64*
%188 = getelementptr inbounds i64, i64* %187, i64 0
%189 = load i64, i64* %188
%190 = xor i64 %184, %189
%191 = load i8*, i8** %10
%192 = getelementptr inbounds i8, i8* %191, i64 64
%193 = bitcast i8* %192 to i64*
%194 = getelementptr inbounds i64, i64* %193, i64 0
store i64 %190, i64* %194
%195 = load i8*, i8** %10
%196 = getelementptr inbounds i8, i8* %195, i64 64
%197 = bitcast i8* %196 to i64*
%198 = getelementptr inbounds i64, i64* %197, i64 1
%199 = load i64, i64* %198
%200 = load i8*, i8** %10
%201 = getelementptr inbounds i8, i8* %200, i64 16
%202 = bitcast i8* %201 to i64*
%203 = getelementptr inbounds i64, i64* %202, i64 1
%204 = load i64, i64* %203
%205 = xor i64 %199, %204
%206 = load i8*, i8** %10
%207 = getelementptr inbounds i8, i8* %206, i64 64
%208 = bitcast i8* %207 to i64*
%209 = getelementptr inbounds i64, i64* %208, i64 1
store i64 %205, i64* %209
%210 = load i8*, i8** %10
%211 = getelementptr inbounds i8, i8* %210, i64 64
%212 = bitcast i8* %211 to i64*
%213 = getelementptr inbounds i64, i64* %212, i64 0
%214 = load i64, i64* %213
%215 = load i8*, i8** %10
%216 = getelementptr inbounds i8, i8* %215, i64 0
%217 = bitcast i8* %216 to i64*
%218 = getelementptr inbounds i64, i64* %217, i64 0
%219 = load i64, i64* %218
%220 = xor i64 %214, %219
%221 = load i8*, i8** %10
%222 = getelementptr inbounds i8, i8* %221, i64 64
%223 = bitcast i8* %222 to i64*
%224 = getelementptr inbounds i64, i64* %223, i64 0
store i64 %220, i64* %224
%225 = load i8*, i8** %10
%226 = getelementptr inbounds i8, i8* %225, i64 64
%227 = bitcast i8* %226 to i64*
%228 = getelementptr inbounds i64, i64* %227, i64 1
%229 = load i64, i64* %228
%230 = load i8*, i8** %10
%231 = getelementptr inbounds i8, i8* %230, i64 0
%232 = bitcast i8* %231 to i64*
%233 = getelementptr inbounds i64, i64* %232, i64 1
%234 = load i64, i64* %233
%235 = xor i64 %229, %234
%236 = load i8*, i8** %10
%237 = getelementptr inbounds i8, i8* %236, i64 64
%238 = bitcast i8* %237 to i64*
%239 = getelementptr inbounds i64, i64* %238, i64 1
store i64 %235, i64* %239
%240 = load i8*, i8** %9
%241 = load i8*, i8** %10
%242 = getelementptr inbounds i8, i8* %241, i64 64
%243 = load i8, i8* %8
%244 = call i32 @memcpy(i8* %240, i8* %242, i8 zeroext %243)
ret void
}

LLVM IR (-O2):
define void @aegis128_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 64
%16 = getelementptr inbounds i8, i8* %4, i64 32
%17 = getelementptr inbounds i8, i8* %4, i64 16
%18 = bitcast i8* %4 to <2 x i64>*
%19 = bitcast i8* %4 to <2 x i64>*
br label %20
20: ; preds = %5, %20
%21 = phi i32 [ 0, %5 ], [ %30, %20 ]
%22 = call i32 @memcpy(i8* %7, i8* %15, i8 zeroext 16)
%23 = call i32 @AESROUND(i8* %15, i8* %11, i8* %15)
%24 = call i32 @AESROUND(i8* %11, i8* %16, i8* %11)
%25 = call i32 @AESROUND(i8* %16, i8* %17, i8* %16)
%26 = call i32 @AESROUND(i8* %17, i8* %4, i8* %17)
%27 = call i32 @AESROUND(i8* %4, i8* %7, i8* %4)
%28 = load <2 x i64>, <2 x i64>* %18
%29 = xor <2 x i64> %14, %28
store <2 x i64> %29, <2 x i64>* %19
%30 = add nuw nsw i32 %21, 1
%31 = icmp eq i32 %30, 7
br i1 %31, label %32, label %20
32: ; preds = %20
%33 = bitcast i8* %15 to <2 x i64>*
%34 = load <2 x i64>, <2 x i64>* %33
%35 = bitcast i8* %11 to <2 x i64>*
%36 = load <2 x i64>, <2 x i64>* %35
%37 = xor <2 x i64> %36, %34
%38 = bitcast i8* %16 to <2 x i64>*
%39 = load <2 x i64>, <2 x i64>* %38
%40 = xor <2 x i64> %39, %37
%41 = bitcast i8* %17 to <2 x i64>*
%42 = load <2 x i64>, <2 x i64>* %41
%43 = xor <2 x i64> %42, %40
%44 = xor <2 x i64> %29, %43
%45 = bitcast i8* %15 to <2 x i64>*
store <2 x i64> %44, <2 x i64>* %45
%46 = call i32 @memcpy(i8* %3, i8* %15, i8 zeroext %2)
ret void
}