#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*/ crypto_aead_encrypt(unsigned char *, unsigned long long *,
                                       unsigned char *, unsigned long long,
                                       unsigned char *, unsigned long long,
                                       int /*<<< orphan*/ *, unsigned char *,
                                       unsigned char *);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, unsigned int);
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
void genkat(void) {
  unsigned char w[256];
  unsigned char h[256];
  unsigned char k[32];
  unsigned char n[32];
  unsigned int i, j;
  for (i = 0; i < sizeof w; ++i)
    w[i] = 255 & (i * 197 + 123);
  for (i = 0; i < sizeof h; ++i)
    h[i] = 255 & (i * 193 + 123);
  for (i = 0; i < sizeof k; ++i)
    k[i] = 255 & (i * 191 + 123);
  for (i = 0; i < sizeof n; ++i)
    n[i] = 255 & (i * 181 + 123);
  printf("#ifndef NORX_KAT_H\n");
  printf("#define NORX_KAT_H\n");
  printf("static const unsigned char kat[] = \n{\n");
  for (i = 0; i < sizeof w; ++i) {
    unsigned char m[256];
    unsigned char c[256 + 32];
    unsigned long long mlen;
    unsigned long long clen;
    unsigned long long hlen;
    memset(m, 0, sizeof m);
    memcpy(m, w, i);
    clen = 0;
    mlen = hlen = i;
    crypto_aead_encrypt(c, &clen, m, mlen, h, hlen, NULL, n, k);
    for (j = 0; j < clen; ++j)
      printf("0x%02X%s", c[j],
             (j + 1 == clen) ? ""
             : (7 == j % 8)  ? ",\n"
                             : ", ");
    printf("%s", (i + 1 == sizeof w) ? "\n" : ",\n\n");
  }
  printf("};\n\n");
  printf("#endif\n\n");
}


x86 assembly (clang, -O0):
<genkat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4b0,%rsp
movl   $0x0,-0x244(%rbp)
mov    -0x244(%rbp),%eax
cmp    $0x100,%rax
jae    119c <genkat+0x5c>
imul   $0xc5,-0x244(%rbp),%eax
add    $0x7b,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x244(%rbp),%eax
mov    %cl,-0x100(%rbp,%rax,1)
mov    -0x244(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x244(%rbp)
jmp    1155 <genkat+0x15>
movl   $0x0,-0x244(%rbp)
mov    -0x244(%rbp),%eax
cmp    $0x100,%rax
jae    11ed <genkat+0xad>
imul   $0xc1,-0x244(%rbp),%eax
add    $0x7b,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x244(%rbp),%eax
mov    %cl,-0x200(%rbp,%rax,1)
mov    -0x244(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x244(%rbp)
jmp    11a6 <genkat+0x66>
movl   $0x0,-0x244(%rbp)
mov    -0x244(%rbp),%eax
cmp    $0x20,%rax
jae    123c <genkat+0xfc>
imul   $0xbf,-0x244(%rbp),%eax
add    $0x7b,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x244(%rbp),%eax
mov    %cl,-0x220(%rbp,%rax,1)
mov    -0x244(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x244(%rbp)
jmp    11f7 <genkat+0xb7>
movl   $0x0,-0x244(%rbp)
mov    -0x244(%rbp),%eax
cmp    $0x20,%rax
jae    128b <genkat+0x14b>
imul   $0xb5,-0x244(%rbp),%eax
add    $0x7b,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x244(%rbp),%eax
mov    %cl,-0x240(%rbp,%rax,1)
mov    -0x244(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x244(%rbp)
jmp    1246 <genkat+0x106>
lea    0xd6e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x244(%rbp)
mov    -0x244(%rbp),%eax
cmp    $0x100,%rax
jae    146a <genkat+0x32a>
lea    -0x350(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1040 <memset@plt>
lea    -0x350(%rbp),%rdi
lea    -0x100(%rbp),%rsi
mov    -0x244(%rbp),%edx
call   1050 <memcpy@plt>
movq   $0x0,-0x480(%rbp)
mov    -0x244(%rbp),%eax
mov    %rax,-0x488(%rbp)
mov    %rax,-0x478(%rbp)
lea    -0x470(%rbp),%rdi
lea    -0x350(%rbp),%rdx
mov    -0x478(%rbp),%rcx
lea    -0x200(%rbp),%r8
mov    -0x488(%rbp),%r9
lea    -0x240(%rbp),%r10
lea    -0x220(%rbp),%rax
lea    -0x480(%rbp),%rsi
xor    %r11d,%r11d
movq   $0x0,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1060 <crypto_aead_encrypt@plt>
movl   $0x0,-0x248(%rbp)
mov    -0x248(%rbp),%eax
cmp    -0x480(%rbp),%rax
jae    1422 <genkat+0x2e2>
mov    -0x248(%rbp),%eax
movzbl -0x470(%rbp,%rax,1),%eax
ff
mov    %eax,-0x48c(%rbp)
mov    -0x248(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
cmp    -0x480(%rbp),%rax
jne    13ca <genkat+0x28a>
lea    0xca3(%rip),%rax
mov    %rax,-0x498(%rbp)
jmp    13f3 <genkat+0x2b3>
mov    -0x248(%rbp),%esi
and    $0x7,%esi
mov    $0x7,%edx
lea    0xc7c(%rip),%rax
lea    0xc72(%rip),%rcx
cmp    %esi,%edx
cmove  %rcx,%rax
mov    %rax,-0x498(%rbp)
mov    -0x48c(%rbp),%esi
mov    -0x498(%rbp),%rdx
lea    0xc48(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x248(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x248(%rbp)
jmp    1378 <genkat+0x238>
mov    -0x244(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
mov    %eax,%ecx
lea    0xc28(%rip),%rsi
lea    0xc23(%rip),%rax
cmp    $0x100,%rcx
cmove  %rax,%rsi
lea    0xc06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x244(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x244(%rbp)
jmp    12bf <genkat+0x17f>
lea    0xbf1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xbe8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x4b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genkat>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x478,%rsp
movaps 0xe98(%rip),%xmm0
movaps %xmm0,0x150(%rsp)
movaps 0xe99(%rip),%xmm0
movaps %xmm0,0x160(%rsp)
movaps 0xe9a(%rip),%xmm0
movaps %xmm0,0x170(%rsp)
movaps 0xe9b(%rip),%xmm0
movaps %xmm0,0x180(%rsp)
movaps 0xe9c(%rip),%xmm0
movaps %xmm0,0x190(%rsp)
movaps 0xe9d(%rip),%xmm0
movaps %xmm0,0x1a0(%rsp)
movaps 0xe9e(%rip),%xmm0
movaps %xmm0,0x1b0(%rsp)
movaps 0xe9f(%rip),%xmm0
movaps %xmm0,0x1c0(%rsp)
movaps 0xea0(%rip),%xmm0
movaps %xmm0,0x1d0(%rsp)
movaps 0xea1(%rip),%xmm0
movaps %xmm0,0x1e0(%rsp)
movaps 0xea2(%rip),%xmm0
movaps %xmm0,0x1f0(%rsp)
movaps 0xea3(%rip),%xmm0
movaps %xmm0,0x200(%rsp)
movaps 0xea4(%rip),%xmm0
movaps %xmm0,0x210(%rsp)
movaps 0xea5(%rip),%xmm0
movaps %xmm0,0x220(%rsp)
movaps 0xea6(%rip),%xmm0
movaps %xmm0,0x230(%rsp)
movaps 0xea7(%rip),%xmm0
movaps %xmm0,0x240(%rsp)
movaps 0xea8(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xeac(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xeb0(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xeb4(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xeb5(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xeb6(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xeb7(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xeb8(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xeb9(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xeba(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xebb(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,0x110(%rsp)
movaps 0xebe(%rip),%xmm0
movaps %xmm0,0x120(%rsp)
movaps 0xebf(%rip),%xmm0
movaps %xmm0,0x130(%rsp)
movaps 0xec0(%rip),%xmm0
movaps %xmm0,0x140(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xec5(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
lea    0xee4(%rip),%rdi
call   1030 <puts@plt>
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb6(%rip),%r13
lea    0xeb2(%rip),%r12
lea    0xeb1(%rip),%rbp
lea    0xe98(%rip),%r14
xor    %r15d,%r15d
jmp    13e8 <genkat+0x298>
nopl   (%rax)
add    $0x1,%r15
cmp    $0x100,%r15
lea    0xe8d(%rip),%rsi
lea    0xe88(%rip),%rax
cmove  %rax,%rsi
lea    0xe72(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x100,%r15
je     14aa <genkat+0x35a>
lea    0x370(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1050 <memset@plt>
mov    %rbx,%rdi
lea    0x150(%rsp),%rsi
mov    %r15d,%edx
call   1060 <memcpy@plt>
movq   $0x0,0x8(%rsp)
sub    $0x8,%rsp
lea    0x258(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    %rbx,%rdx
mov    %r15,%rcx
lea    0x58(%rsp),%r8
mov    %r15,%r9
lea    0x38(%rsp),%rax
push   %rax
lea    0x20(%rsp),%rax
push   %rax
push   $0x0
call   1070 <crypto_aead_encrypt@plt>
add    $0x20,%rsp
mov    0x8(%rsp),%rax
test   %rax,%rax
je     13b0 <genkat+0x260>
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl 0x250(%rsp,%rcx,1),%esi
lea    0x1(%rcx),%ebx
not    %ecx
test   $0x7,%cl
mov    %r12,%rdx
cmove  %r13,%rdx
cmp    %rbx,%rax
cmove  %rbp,%rdx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%rax
mov    %rbx,%rcx
cmp    %rbx,%rax
ja     1470 <genkat+0x320>
jmp    13b0 <genkat+0x260>
lea    0xdee(%rip),%rdi
call   1030 <puts@plt>
lea    0xde6(%rip),%rdi
call   1030 <puts@plt>
add    $0x478,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"#ifndef NORX_KAT_H\0A\00"
@.str.1 = [20 x i8] c"#define NORX_KAT_H\0A\00"
@.str.2 = [39 x i8] c"static const unsigned char kat[] = \0A{\0A\00"
@.str.3 = [9 x i8] c"0x%02X%s\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [3 x i8] c",\0A\00"
@.str.6 = [3 x i8] c", \00"
@.str.7 = [3 x i8] c"%s\00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [4 x i8] c",\0A\0A\00"
@.str.10 = [5 x i8] c"};\0A\0A\00"
@.str.11 = [9 x i8] c"#endif\0A\0A\00"
define void @genkat() {
%1 = alloca [256 x i8]
%2 = alloca [256 x i8]
%3 = alloca [32 x i8]
%4 = alloca [32 x i8]
%5 = alloca i32
%6 = alloca i32
%7 = alloca [256 x i8]
%8 = alloca [288 x i8]
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
store i32 0, i32* %5
br label %12
12: ; preds = %25, %0
%13 = load i32, i32* %5
%14 = zext i32 %13 to i64
%15 = icmp ult i64 %14, 256
br i1 %15, label %16, label %28
16: ; preds = %12
%17 = load i32, i32* %5
%18 = mul i32 %17, 197
%19 = add i32 %18, 123
%20 = and i32 255, %19
%21 = trunc i32 %20 to i8
%22 = load i32, i32* %5
%23 = zext i32 %22 to i64
%24 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 %23
store i8 %21, i8* %24
br label %25
25: ; preds = %16
%26 = load i32, i32* %5
%27 = add i32 %26, 1
store i32 %27, i32* %5
br label %12
28: ; preds = %12
store i32 0, i32* %5
br label %29
29: ; preds = %42, %28
%30 = load i32, i32* %5
%31 = zext i32 %30 to i64
%32 = icmp ult i64 %31, 256
br i1 %32, label %33, label %45
33: ; preds = %29
%34 = load i32, i32* %5
%35 = mul i32 %34, 193
%36 = add i32 %35, 123
%37 = and i32 255, %36
%38 = trunc i32 %37 to i8
%39 = load i32, i32* %5
%40 = zext i32 %39 to i64
%41 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 %40
store i8 %38, i8* %41
br label %42
42: ; preds = %33
%43 = load i32, i32* %5
%44 = add i32 %43, 1
store i32 %44, i32* %5
br label %29
45: ; preds = %29
store i32 0, i32* %5
br label %46
46: ; preds = %59, %45
%47 = load i32, i32* %5
%48 = zext i32 %47 to i64
%49 = icmp ult i64 %48, 32
br i1 %49, label %50, label %62
50: ; preds = %46
%51 = load i32, i32* %5
%52 = mul i32 %51, 191
%53 = add i32 %52, 123
%54 = and i32 255, %53
%55 = trunc i32 %54 to i8
%56 = load i32, i32* %5
%57 = zext i32 %56 to i64
%58 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 %57
store i8 %55, i8* %58
br label %59
59: ; preds = %50
%60 = load i32, i32* %5
%61 = add i32 %60, 1
store i32 %61, i32* %5
br label %46
62: ; preds = %46
store i32 0, i32* %5
br label %63
63: ; preds = %76, %62
%64 = load i32, i32* %5
%65 = zext i32 %64 to i64
%66 = icmp ult i64 %65, 32
br i1 %66, label %67, label %79
67: ; preds = %63
%68 = load i32, i32* %5
%69 = mul i32 %68, 181
%70 = add i32 %69, 123
%71 = and i32 255, %70
%72 = trunc i32 %71 to i8
%73 = load i32, i32* %5
%74 = zext i32 %73 to i64
%75 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 %74
store i8 %72, i8* %75
br label %76
76: ; preds = %67
%77 = load i32, i32* %5
%78 = add i32 %77, 1
store i32 %78, i32* %5
br label %63
79: ; preds = %63
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %5
br label %83
83: ; preds = %141, %79
%84 = load i32, i32* %5
%85 = zext i32 %84 to i64
%86 = icmp ult i64 %85, 256
br i1 %86, label %87, label %144
87: ; preds = %83
%88 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%89 = call i32 @memset(i8* %88, i32 0, i32 256)
%90 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%91 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%92 = load i32, i32* %5
%93 = call i32 @memcpy(i8* %90, i8* %91, i32 %92)
store i64 0, i64* %10
%94 = load i32, i32* %5
%95 = zext i32 %94 to i64
store i64 %95, i64* %11
store i64 %95, i64* %9
%96 = getelementptr inbounds [288 x i8], [288 x i8]* %8, i64 0, i64 0
%97 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%98 = load i64, i64* %9
%99 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%100 = load i64, i64* %11
%101 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%102 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%103 = call i32 @crypto_aead_encrypt(i8* %96, i64* %10, i8* %97, i64 %98, i8* %99, i64 %100, i32* null, i8* %101, i8* %102)
store i32 0, i32* %6
br label %104
104: ; preds = %130, %87
%105 = load i32, i32* %6
%106 = zext i32 %105 to i64
%107 = load i64, i64* %10
%108 = icmp ult i64 %106, %107
br i1 %108, label %109, label %133
109: ; preds = %104
%110 = load i32, i32* %6
%111 = zext i32 %110 to i64
%112 = getelementptr inbounds [288 x i8], [288 x i8]* %8, i64 0, i64 %111
%113 = load i8, i8* %112
%114 = zext i8 %113 to i32
%115 = load i32, i32* %6
%116 = add i32 %115, 1
%117 = zext i32 %116 to i64
%118 = load i64, i64* %10
%119 = icmp eq i64 %117, %118
br i1 %119, label %120, label %121
120: ; preds = %109
br label %127
121: ; preds = %109
%122 = load i32, i32* %6
%123 = urem i32 %122, 8
%124 = icmp eq i32 7, %123
%125 = zext i1 %124 to i64
%126 = select i1 %124, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0)
br label %127
127: ; preds = %121, %120
%128 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0), %120 ], [ %126, %121 ]
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %114, i8* %128)
br label %130
130: ; preds = %127
%131 = load i32, i32* %6
%132 = add i32 %131, 1
store i32 %132, i32* %6
br label %104
133: ; preds = %104
%134 = load i32, i32* %5
%135 = add i32 %134, 1
%136 = zext i32 %135 to i64
%137 = icmp eq i64 %136, 256
%138 = zext i1 %137 to i64
%139 = select i1 %137, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0)
%140 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* %139)
br label %141
141: ; preds = %133
%142 = load i32, i32* %5
%143 = add i32 %142, 1
store i32 %143, i32* %5
br label %83
144: ; preds = %83
%145 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%146 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.3 = [9 x i8] c"0x%02X%s\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [3 x i8] c",\0A\00"
@.str.6 = [3 x i8] c", \00"
@.str.7 = [3 x i8] c"%s\00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [4 x i8] c",\0A\0A\00"
@str = [19 x i8] c"#ifndef NORX_KAT_H\00"
@str.12 = [19 x i8] c"#define NORX_KAT_H\00"
@str.13 = [38 x i8] c"static const unsigned char kat[] = \0A{\00"
@str.14 = [4 x i8] c"};\0A\00"
@str.15 = [8 x i8] c"#endif\0A\00"
define void @genkat() {
%1 = alloca [256 x i8]
%2 = alloca [256 x i8]
%3 = alloca [32 x i8]
%4 = alloca [32 x i8]
%5 = alloca [256 x i8]
%6 = alloca [288 x i8]
%7 = alloca i64
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%10 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%11 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%12 = bitcast [256 x i8]* %1 to <16 x i8>*
store <16 x i8> <i8 123, i8 64, i8 5, i8 -54, i8 -113, i8 84, i8 25, i8 -34, i8 -93, i8 104, i8 45, i8 -14, i8 -73, i8 124, i8 65, i8 6>, <16 x i8>* %12
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 16
%14 = bitcast i8* %13 to <16 x i8>*
store <16 x i8> <i8 -53, i8 -112, i8 85, i8 26, i8 -33, i8 -92, i8 105, i8 46, i8 -13, i8 -72, i8 125, i8 66, i8 7, i8 -52, i8 -111, i8 86>, <16 x i8>* %14
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 32
%16 = bitcast i8* %15 to <16 x i8>*
store <16 x i8> <i8 27, i8 -32, i8 -91, i8 106, i8 47, i8 -12, i8 -71, i8 126, i8 67, i8 8, i8 -51, i8 -110, i8 87, i8 28, i8 -31, i8 -90>, <16 x i8>* %16
%17 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 48
%18 = bitcast i8* %17 to <16 x i8>*
store <16 x i8> <i8 107, i8 48, i8 -11, i8 -70, i8 127, i8 68, i8 9, i8 -50, i8 -109, i8 88, i8 29, i8 -30, i8 -89, i8 108, i8 49, i8 -10>, <16 x i8>* %18
%19 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 64
%20 = bitcast i8* %19 to <16 x i8>*
store <16 x i8> <i8 -69, i8 -128, i8 69, i8 10, i8 -49, i8 -108, i8 89, i8 30, i8 -29, i8 -88, i8 109, i8 50, i8 -9, i8 -68, i8 -127, i8 70>, <16 x i8>* %20
%21 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 80
%22 = bitcast i8* %21 to <16 x i8>*
store <16 x i8> <i8 11, i8 -48, i8 -107, i8 90, i8 31, i8 -28, i8 -87, i8 110, i8 51, i8 -8, i8 -67, i8 -126, i8 71, i8 12, i8 -47, i8 -106>, <16 x i8>* %22
%23 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 96
%24 = bitcast i8* %23 to <16 x i8>*
store <16 x i8> <i8 91, i8 32, i8 -27, i8 -86, i8 111, i8 52, i8 -7, i8 -66, i8 -125, i8 72, i8 13, i8 -46, i8 -105, i8 92, i8 33, i8 -26>, <16 x i8>* %24
%25 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 112
%26 = bitcast i8* %25 to <16 x i8>*
store <16 x i8> <i8 -85, i8 112, i8 53, i8 -6, i8 -65, i8 -124, i8 73, i8 14, i8 -45, i8 -104, i8 93, i8 34, i8 -25, i8 -84, i8 113, i8 54>, <16 x i8>* %26
%27 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 128
%28 = bitcast i8* %27 to <16 x i8>*
store <16 x i8> <i8 -5, i8 -64, i8 -123, i8 74, i8 15, i8 -44, i8 -103, i8 94, i8 35, i8 -24, i8 -83, i8 114, i8 55, i8 -4, i8 -63, i8 -122>, <16 x i8>* %28
%29 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 144
%30 = bitcast i8* %29 to <16 x i8>*
store <16 x i8> <i8 75, i8 16, i8 -43, i8 -102, i8 95, i8 36, i8 -23, i8 -82, i8 115, i8 56, i8 -3, i8 -62, i8 -121, i8 76, i8 17, i8 -42>, <16 x i8>* %30
%31 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 160
%32 = bitcast i8* %31 to <16 x i8>*
store <16 x i8> <i8 -101, i8 96, i8 37, i8 -22, i8 -81, i8 116, i8 57, i8 -2, i8 -61, i8 -120, i8 77, i8 18, i8 -41, i8 -100, i8 97, i8 38>, <16 x i8>* %32
%33 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 176
%34 = bitcast i8* %33 to <16 x i8>*
store <16 x i8> <i8 -21, i8 -80, i8 117, i8 58, i8 -1, i8 -60, i8 -119, i8 78, i8 19, i8 -40, i8 -99, i8 98, i8 39, i8 -20, i8 -79, i8 118>, <16 x i8>* %34
%35 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 192
%36 = bitcast i8* %35 to <16 x i8>*
store <16 x i8> <i8 59, i8 0, i8 -59, i8 -118, i8 79, i8 20, i8 -39, i8 -98, i8 99, i8 40, i8 -19, i8 -78, i8 119, i8 60, i8 1, i8 -58>, <16 x i8>* %36
%37 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 208
%38 = bitcast i8* %37 to <16 x i8>*
store <16 x i8> <i8 -117, i8 80, i8 21, i8 -38, i8 -97, i8 100, i8 41, i8 -18, i8 -77, i8 120, i8 61, i8 2, i8 -57, i8 -116, i8 81, i8 22>, <16 x i8>* %38
%39 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 224
%40 = bitcast i8* %39 to <16 x i8>*
store <16 x i8> <i8 -37, i8 -96, i8 101, i8 42, i8 -17, i8 -76, i8 121, i8 62, i8 3, i8 -56, i8 -115, i8 82, i8 23, i8 -36, i8 -95, i8 102>, <16 x i8>* %40
%41 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 240
%42 = bitcast i8* %41 to <16 x i8>*
store <16 x i8> <i8 43, i8 -16, i8 -75, i8 122, i8 63, i8 4, i8 -55, i8 -114, i8 83, i8 24, i8 -35, i8 -94, i8 103, i8 44, i8 -15, i8 -74>, <16 x i8>* %42
%43 = bitcast [256 x i8]* %2 to <16 x i8>*
store <16 x i8> <i8 123, i8 60, i8 -3, i8 -66, i8 127, i8 64, i8 1, i8 -62, i8 -125, i8 68, i8 5, i8 -58, i8 -121, i8 72, i8 9, i8 -54>, <16 x i8>* %43
%44 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 16
%45 = bitcast i8* %44 to <16 x i8>*
store <16 x i8> <i8 -117, i8 76, i8 13, i8 -50, i8 -113, i8 80, i8 17, i8 -46, i8 -109, i8 84, i8 21, i8 -42, i8 -105, i8 88, i8 25, i8 -38>, <16 x i8>* %45
%46 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 32
%47 = bitcast i8* %46 to <16 x i8>*
store <16 x i8> <i8 -101, i8 92, i8 29, i8 -34, i8 -97, i8 96, i8 33, i8 -30, i8 -93, i8 100, i8 37, i8 -26, i8 -89, i8 104, i8 41, i8 -22>, <16 x i8>* %47
%48 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 48
%49 = bitcast i8* %48 to <16 x i8>*
store <16 x i8> <i8 -85, i8 108, i8 45, i8 -18, i8 -81, i8 112, i8 49, i8 -14, i8 -77, i8 116, i8 53, i8 -10, i8 -73, i8 120, i8 57, i8 -6>, <16 x i8>* %49
%50 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 64
%51 = bitcast i8* %50 to <16 x i8>*
store <16 x i8> <i8 -69, i8 124, i8 61, i8 -2, i8 -65, i8 -128, i8 65, i8 2, i8 -61, i8 -124, i8 69, i8 6, i8 -57, i8 -120, i8 73, i8 10>, <16 x i8>* %51
%52 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 80
%53 = bitcast i8* %52 to <16 x i8>*
store <16 x i8> <i8 -53, i8 -116, i8 77, i8 14, i8 -49, i8 -112, i8 81, i8 18, i8 -45, i8 -108, i8 85, i8 22, i8 -41, i8 -104, i8 89, i8 26>, <16 x i8>* %53
%54 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 96
%55 = bitcast i8* %54 to <16 x i8>*
store <16 x i8> <i8 -37, i8 -100, i8 93, i8 30, i8 -33, i8 -96, i8 97, i8 34, i8 -29, i8 -92, i8 101, i8 38, i8 -25, i8 -88, i8 105, i8 42>, <16 x i8>* %55
%56 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 112
%57 = bitcast i8* %56 to <16 x i8>*
store <16 x i8> <i8 -21, i8 -84, i8 109, i8 46, i8 -17, i8 -80, i8 113, i8 50, i8 -13, i8 -76, i8 117, i8 54, i8 -9, i8 -72, i8 121, i8 58>, <16 x i8>* %57
%58 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 128
%59 = bitcast i8* %58 to <16 x i8>*
store <16 x i8> <i8 -5, i8 -68, i8 125, i8 62, i8 -1, i8 -64, i8 -127, i8 66, i8 3, i8 -60, i8 -123, i8 70, i8 7, i8 -56, i8 -119, i8 74>, <16 x i8>* %59
%60 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 144
%61 = bitcast i8* %60 to <16 x i8>*
store <16 x i8> <i8 11, i8 -52, i8 -115, i8 78, i8 15, i8 -48, i8 -111, i8 82, i8 19, i8 -44, i8 -107, i8 86, i8 23, i8 -40, i8 -103, i8 90>, <16 x i8>* %61
%62 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 160
%63 = bitcast i8* %62 to <16 x i8>*
store <16 x i8> <i8 27, i8 -36, i8 -99, i8 94, i8 31, i8 -32, i8 -95, i8 98, i8 35, i8 -28, i8 -91, i8 102, i8 39, i8 -24, i8 -87, i8 106>, <16 x i8>* %63
%64 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 176
%65 = bitcast i8* %64 to <16 x i8>*
store <16 x i8> <i8 43, i8 -20, i8 -83, i8 110, i8 47, i8 -16, i8 -79, i8 114, i8 51, i8 -12, i8 -75, i8 118, i8 55, i8 -8, i8 -71, i8 122>, <16 x i8>* %65
%66 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 192
%67 = bitcast i8* %66 to <16 x i8>*
store <16 x i8> <i8 59, i8 -4, i8 -67, i8 126, i8 63, i8 0, i8 -63, i8 -126, i8 67, i8 4, i8 -59, i8 -122, i8 71, i8 8, i8 -55, i8 -118>, <16 x i8>* %67
%68 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 208
%69 = bitcast i8* %68 to <16 x i8>*
store <16 x i8> <i8 75, i8 12, i8 -51, i8 -114, i8 79, i8 16, i8 -47, i8 -110, i8 83, i8 20, i8 -43, i8 -106, i8 87, i8 24, i8 -39, i8 -102>, <16 x i8>* %69
%70 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 224
%71 = bitcast i8* %70 to <16 x i8>*
store <16 x i8> <i8 91, i8 28, i8 -35, i8 -98, i8 95, i8 32, i8 -31, i8 -94, i8 99, i8 36, i8 -27, i8 -90, i8 103, i8 40, i8 -23, i8 -86>, <16 x i8>* %71
%72 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 240
%73 = bitcast i8* %72 to <16 x i8>*
store <16 x i8> <i8 107, i8 44, i8 -19, i8 -82, i8 111, i8 48, i8 -15, i8 -78, i8 115, i8 52, i8 -11, i8 -74, i8 119, i8 56, i8 -7, i8 -70>, <16 x i8>* %73
%74 = bitcast [32 x i8]* %3 to <16 x i8>*
store <16 x i8> <i8 123, i8 58, i8 -7, i8 -72, i8 119, i8 54, i8 -11, i8 -76, i8 115, i8 50, i8 -15, i8 -80, i8 111, i8 46, i8 -19, i8 -84>, <16 x i8>* %74
%75 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 16
%76 = bitcast i8* %75 to <16 x i8>*
store <16 x i8> <i8 107, i8 42, i8 -23, i8 -88, i8 103, i8 38, i8 -27, i8 -92, i8 99, i8 34, i8 -31, i8 -96, i8 95, i8 30, i8 -35, i8 -100>, <16 x i8>* %76
%77 = bitcast [32 x i8]* %4 to <16 x i8>*
store <16 x i8> <i8 123, i8 48, i8 -27, i8 -102, i8 79, i8 4, i8 -71, i8 110, i8 35, i8 -40, i8 -115, i8 66, i8 -9, i8 -84, i8 97, i8 22>, <16 x i8>* %77
%78 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 16
%79 = bitcast i8* %78 to <16 x i8>*
store <16 x i8> <i8 -53, i8 -128, i8 53, i8 -22, i8 -97, i8 84, i8 9, i8 -66, i8 115, i8 40, i8 -35, i8 -110, i8 71, i8 -4, i8 -79, i8 102>, <16 x i8>* %79
%80 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%81 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.12, i64 0, i64 0))
%82 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.13, i64 0, i64 0))
%83 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%84 = getelementptr inbounds [288 x i8], [288 x i8]* %6, i64 0, i64 0
%85 = bitcast i64* %7 to i8*
br label %86
86: ; preds = %0, %110
%87 = phi i64 [ 0, %0 ], [ %111, %110 ]
%88 = call i32 @memset(i8* %83, i32 0, i32 256)
%89 = trunc i64 %87 to i32
%90 = call i32 @memcpy(i8* %83, i8* %8, i32 %89)
store i64 0, i64* %7
%91 = call i32 @crypto_aead_encrypt(i8* %84, i64* %7, i8* %83, i64 %87, i8* %9, i64 %87, i32* null, i8* %11, i8* %10)
%92 = load i64, i64* %7
%93 = icmp eq i64 %92, 0
br i1 %93, label %110, label %94
94: ; preds = %86, %94
%95 = phi i64 [ %108, %94 ], [ %92, %86 ]
%96 = phi i64 [ %101, %94 ], [ 0, %86 ]
%97 = getelementptr inbounds [288 x i8], [288 x i8]* %6, i64 0, i64 %96
%98 = load i8, i8* %97
%99 = zext i8 %98 to i32
%100 = add nuw nsw i64 %96, 1
%101 = and i64 %100, 4294967295
%102 = icmp eq i64 %95, %101
%103 = and i64 %96, 7
%104 = icmp eq i64 %103, 7
%105 = select i1 %104, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0)
%106 = select i1 %102, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0), i8* %105
%107 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %99, i8* %106)
%108 = load i64, i64* %7
%109 = icmp ugt i64 %108, %101
br i1 %109, label %94, label %110
110: ; preds = %94, %86
%111 = add nuw nsw i64 %87, 1
%112 = icmp eq i64 %111, 256
%113 = select i1 %112, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0)
%114 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* %113)
%115 = icmp eq i64 %111, 256
br i1 %115, label %116, label %86
116: ; preds = %110
%117 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.14, i64 0, i64 0))
%118 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.15, i64 0, i64 0))
ret void
}