#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*/ memcpy(unsigned char *, unsigned char *, int);
int /*<<< orphan*/ memset(unsigned int *, int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ r3d_encrypt_block(unsigned char *, unsigned char *,
                                     unsigned char *);
void r3d_decrypt_ctr(unsigned char *ciphertext, unsigned char *key,
                     unsigned char *iv, unsigned char *plaintext, int size) {
  int block_num = (size / 512);
  unsigned char plaintext_block[512];
  unsigned char ciphertext_block[512];
  unsigned char key_block[512];
  unsigned char iv_block[512];
  unsigned int i_block[512];
  unsigned char temp_block[512];
  unsigned char keystream[512];
  memcpy(key_block, key, 512);
  memcpy(iv_block, iv, 512);
  int i;
  int j;
  for (i = 0; i < block_num; i++) {
    memset(i_block, i, 512);
    memcpy(ciphertext_block, ciphertext + (i * 512), 512);
    for (j = 0; j < 512; j++) {
      temp_block[j] = iv_block[j] ^ i_block[j];
    }
    r3d_encrypt_block(temp_block, key, keystream);
    for (j = 0; j < 512; j++) {
      plaintext_block[j] = ciphertext_block[j] ^ keystream[j];
    }
    memcpy(plaintext + (i * 512), plaintext_block, 512);
    printf("%d\n", i);
  }
}


x86 assembly (clang, -O0):
<r3d_decrypt_ctr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1440,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    $0x200,%ecx
cltd
idiv   %ecx
mov    %eax,-0x28(%rbp)
lea    -0x630(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x200,%edx
call   1060 <memcpy@plt>
lea    -0x830(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x200,%edx
call   1060 <memcpy@plt>
movl   $0x0,-0x1434(%rbp)
mov    -0x1434(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    1303 <r3d_decrypt_ctr+0x1c3>
lea    -0x1030(%rbp),%rdi
mov    -0x1434(%rbp),%esi
mov    $0x200,%edx
call   1050 <memset@plt>
lea    -0x430(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x1434(%rbp),%eax
shl    $0x9,%eax
cltq
add    %rax,%rsi
mov    $0x200,%edx
call   1060 <memcpy@plt>
movl   $0x0,-0x1438(%rbp)
cmpl   $0x200,-0x1438(%rbp)
jge    1245 <r3d_decrypt_ctr+0x105>
movslq -0x1438(%rbp),%rax
movzbl -0x830(%rbp,%rax,1),%eax
ff
movslq -0x1438(%rbp),%rcx
xor    -0x1030(%rbp,%rcx,4),%eax
mov    %al,%cl
movslq -0x1438(%rbp),%rax
mov    %cl,-0x1230(%rbp,%rax,1)
mov    -0x1438(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1438(%rbp)
jmp    11f4 <r3d_decrypt_ctr+0xb4>
lea    -0x1230(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x1430(%rbp),%rdx
call   1030 <r3d_encrypt_block@plt>
movl   $0x0,-0x1438(%rbp)
cmpl   $0x200,-0x1438(%rbp)
jge    12ba <r3d_decrypt_ctr+0x17a>
movslq -0x1438(%rbp),%rax
movzbl -0x430(%rbp,%rax,1),%eax
ff
movslq -0x1438(%rbp),%rcx
movzbl -0x1430(%rbp,%rcx,1),%ecx
ff
xor    %ecx,%eax
mov    %al,%cl
movslq -0x1438(%rbp),%rax
mov    %cl,-0x230(%rbp,%rax,1)
mov    -0x1438(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1438(%rbp)
jmp    1266 <r3d_decrypt_ctr+0x126>
mov    -0x20(%rbp),%rdi
mov    -0x1434(%rbp),%eax
shl    $0x9,%eax
cltq
add    %rax,%rdi
lea    -0x230(%rbp),%rsi
mov    $0x200,%edx
call   1060 <memcpy@plt>
mov    -0x1434(%rbp),%esi
lea    0xd16(%rip),%rdi
call   1040 <printf@plt>
mov    -0x1434(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1434(%rbp)
jmp    11a1 <r3d_decrypt_ctr+0x61>
add    $0x1440,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r3d_decrypt_ctr>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1408,%rsp
mov    %r8d,%r13d
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %rdi,%r12
lea    0x1200(%rsp),%rdi
mov    $0x200,%edx
call   1060 <memcpy@plt>
lea    0x600(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x200,%edx
call   1060 <memcpy@plt>
cmp    $0x200,%r13d
jl     15c2 <r3d_decrypt_ctr+0x482>
shr    $0x9,%r13d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
lea    0xa00(%rsp),%rdi
mov    %ebx,%esi
mov    $0x200,%edx
call   1050 <memset@plt>
mov    %rbx,%rbp
shl    $0x9,%rbp
lea    (%r12,%rbp,1),%rsi
lea    0x200(%rsp),%rdi
mov    $0x200,%edx
call   1060 <memcpy@plt>
xor    %eax,%eax
movdqa 0xe25(%rip),%xmm4
nopl   0x0(%rax,%rax,1)
movd   0x604(%rsp,%rax,1),%xmm1
movdqa 0xa00(%rsp,%rax,4),%xmm0
pand   %xmm4,%xmm0
packuswb %xmm0,%xmm0
packuswb %xmm0,%xmm0
movdqa 0xa10(%rsp,%rax,4),%xmm2
pand   %xmm4,%xmm2
packuswb %xmm2,%xmm2
packuswb %xmm2,%xmm2
pxor   %xmm1,%xmm2
pxor   0x600(%rsp,%rax,1),%xmm0
punpckldq %xmm2,%xmm0
movq   0x608(%rsp,%rax,1),%xmm1
movd   0x60c(%rsp,%rax,1),%xmm2
movdqa 0xa20(%rsp,%rax,4),%xmm3
pand   %xmm4,%xmm3
packuswb %xmm3,%xmm3
packuswb %xmm3,%xmm3
pxor   %xmm1,%xmm3
movdqa 0xa30(%rsp,%rax,4),%xmm1
pand   %xmm4,%xmm1
packuswb %xmm1,%xmm1
packuswb %xmm1,%xmm1
pxor   %xmm2,%xmm1
punpckldq %xmm1,%xmm3
punpcklqdq %xmm3,%xmm0
movdqa %xmm0,0x800(%rsp,%rax,1)
add    $0x10,%rax
cmp    $0x200,%rax
jne    11e0 <r3d_decrypt_ctr+0xa0>
lea    0x800(%rsp),%rdi
mov    %r15,%rsi
mov    %rsp,%rdx
call   1030 <r3d_encrypt_block@plt>
movaps (%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
movaps 0x20(%rsp),%xmm2
xorps  0x200(%rsp),%xmm0
movaps 0x30(%rsp),%xmm3
xorps  0x210(%rsp),%xmm1
movaps %xmm0,0x400(%rsp)
xorps  0x220(%rsp),%xmm2
xorps  0x230(%rsp),%xmm3
movaps %xmm1,0x410(%rsp)
movaps %xmm2,0x420(%rsp)
movaps 0x40(%rsp),%xmm0
movaps 0x50(%rsp),%xmm1
xorps  0x240(%rsp),%xmm0
xorps  0x250(%rsp),%xmm1
movaps %xmm3,0x430(%rsp)
movaps %xmm0,0x440(%rsp)
movaps %xmm1,0x450(%rsp)
movaps 0x60(%rsp),%xmm0
movaps 0x70(%rsp),%xmm1
movaps 0x80(%rsp),%xmm2
xorps  0x260(%rsp),%xmm0
movaps 0x90(%rsp),%xmm3
xorps  0x270(%rsp),%xmm1
movaps %xmm0,0x460(%rsp)
xorps  0x280(%rsp),%xmm2
xorps  0x290(%rsp),%xmm3
movaps %xmm1,0x470(%rsp)
movaps %xmm2,0x480(%rsp)
movaps 0xa0(%rsp),%xmm0
movaps 0xb0(%rsp),%xmm1
xorps  0x2a0(%rsp),%xmm0
xorps  0x2b0(%rsp),%xmm1
movaps %xmm3,0x490(%rsp)
movaps %xmm0,0x4a0(%rsp)
movaps %xmm1,0x4b0(%rsp)
movaps 0xc0(%rsp),%xmm0
movaps 0xd0(%rsp),%xmm1
movaps 0xe0(%rsp),%xmm2
xorps  0x2c0(%rsp),%xmm0
movdqa 0xf0(%rsp),%xmm3
xorps  0x2d0(%rsp),%xmm1
movaps %xmm0,0x4c0(%rsp)
xorps  0x2e0(%rsp),%xmm2
pxor   0x2f0(%rsp),%xmm3
movaps %xmm1,0x4d0(%rsp)
movaps %xmm2,0x4e0(%rsp)
movaps 0x100(%rsp),%xmm0
movaps 0x110(%rsp),%xmm1
xorps  0x300(%rsp),%xmm0
xorps  0x310(%rsp),%xmm1
movdqa %xmm3,0x4f0(%rsp)
movaps %xmm0,0x500(%rsp)
movaps 0x120(%rsp),%xmm0
movaps 0x130(%rsp),%xmm2
xorps  0x320(%rsp),%xmm0
xorps  0x330(%rsp),%xmm2
movaps %xmm1,0x510(%rsp)
movaps %xmm0,0x520(%rsp)
movaps 0x140(%rsp),%xmm0
movaps 0x150(%rsp),%xmm1
xorps  0x340(%rsp),%xmm0
xorps  0x350(%rsp),%xmm1
movaps %xmm2,0x530(%rsp)
movaps %xmm0,0x540(%rsp)
movaps 0x160(%rsp),%xmm0
movaps 0x170(%rsp),%xmm2
xorps  0x360(%rsp),%xmm0
xorps  0x370(%rsp),%xmm2
movaps %xmm1,0x550(%rsp)
movaps %xmm0,0x560(%rsp)
movaps 0x180(%rsp),%xmm0
movaps 0x190(%rsp),%xmm1
xorps  0x380(%rsp),%xmm0
xorps  0x390(%rsp),%xmm1
movaps %xmm2,0x570(%rsp)
movaps %xmm0,0x580(%rsp)
movaps 0x1a0(%rsp),%xmm0
movaps 0x1b0(%rsp),%xmm2
xorps  0x3a0(%rsp),%xmm0
xorps  0x3b0(%rsp),%xmm2
movaps %xmm1,0x590(%rsp)
movaps %xmm0,0x5a0(%rsp)
movaps 0x1c0(%rsp),%xmm0
movdqa 0x1d0(%rsp),%xmm1
xorps  0x3c0(%rsp),%xmm0
pxor   0x3d0(%rsp),%xmm1
movaps %xmm2,0x5b0(%rsp)
movaps %xmm0,0x5c0(%rsp)
movdqa 0x1e0(%rsp),%xmm0
movdqa 0x1f0(%rsp),%xmm2
pxor   0x3e0(%rsp),%xmm0
pxor   0x3f0(%rsp),%xmm2
movdqa %xmm1,0x5d0(%rsp)
movdqa %xmm0,0x5e0(%rsp)
movdqa %xmm2,0x5f0(%rsp)
add    %r14,%rbp
mov    %rbp,%rdi
lea    0x400(%rsp),%rsi
mov    $0x200,%edx
call   1060 <memcpy@plt>
lea    0xa62(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %r13,%rbx
jne    11a0 <r3d_decrypt_ctr+0x60>
add    $0x1408,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @r3d_decrypt_ctr(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca [512 x i8]
%13 = alloca [512 x i8]
%14 = alloca [512 x i8]
%15 = alloca [512 x i8]
%16 = alloca [512 x i32]
%17 = alloca [512 x i8]
%18 = alloca [512 x i8]
%19 = alloca i32
%20 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%21 = load i32, i32* %10
%22 = sdiv i32 %21, 512
store i32 %22, i32* %11
%23 = getelementptr inbounds [512 x i8], [512 x i8]* %14, i64 0, i64 0
%24 = load i8*, i8** %7
%25 = call i32 @memcpy(i8* %23, i8* %24, i32 512)
%26 = getelementptr inbounds [512 x i8], [512 x i8]* %15, i64 0, i64 0
%27 = load i8*, i8** %8
%28 = call i32 @memcpy(i8* %26, i8* %27, i32 512)
store i32 0, i32* %19
br label %29
29: ; preds = %102, %5
%30 = load i32, i32* %19
%31 = load i32, i32* %11
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %105
33: ; preds = %29
%34 = getelementptr inbounds [512 x i32], [512 x i32]* %16, i64 0, i64 0
%35 = load i32, i32* %19
%36 = call i32 @memset(i32* %34, i32 %35, i32 512)
%37 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%38 = load i8*, i8** %6
%39 = load i32, i32* %19
%40 = mul nsw i32 %39, 512
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i8, i8* %38, i64 %41
%43 = call i32 @memcpy(i8* %37, i8* %42, i32 512)
store i32 0, i32* %20
br label %44
44: ; preds = %62, %33
%45 = load i32, i32* %20
%46 = icmp slt i32 %45, 512
br i1 %46, label %47, label %65
47: ; preds = %44
%48 = load i32, i32* %20
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [512 x i8], [512 x i8]* %15, i64 0, i64 %49
%51 = load i8, i8* %50
%52 = zext i8 %51 to i32
%53 = load i32, i32* %20
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [512 x i32], [512 x i32]* %16, i64 0, i64 %54
%56 = load i32, i32* %55
%57 = xor i32 %52, %56
%58 = trunc i32 %57 to i8
%59 = load i32, i32* %20
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [512 x i8], [512 x i8]* %17, i64 0, i64 %60
store i8 %58, i8* %61
br label %62
62: ; preds = %47
%63 = load i32, i32* %20
%64 = add nsw i32 %63, 1
store i32 %64, i32* %20
br label %44
65: ; preds = %44
%66 = getelementptr inbounds [512 x i8], [512 x i8]* %17, i64 0, i64 0
%67 = load i8*, i8** %7
%68 = getelementptr inbounds [512 x i8], [512 x i8]* %18, i64 0, i64 0
%69 = call i32 @r3d_encrypt_block(i8* %66, i8* %67, i8* %68)
store i32 0, i32* %20
br label %70
70: ; preds = %89, %65
%71 = load i32, i32* %20
%72 = icmp slt i32 %71, 512
br i1 %72, label %73, label %92
73: ; preds = %70
%74 = load i32, i32* %20
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 %75
%77 = load i8, i8* %76
%78 = zext i8 %77 to i32
%79 = load i32, i32* %20
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [512 x i8], [512 x i8]* %18, i64 0, i64 %80
%82 = load i8, i8* %81
%83 = zext i8 %82 to i32
%84 = xor i32 %78, %83
%85 = trunc i32 %84 to i8
%86 = load i32, i32* %20
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 %87
store i8 %85, i8* %88
br label %89
89: ; preds = %73
%90 = load i32, i32* %20
%91 = add nsw i32 %90, 1
store i32 %91, i32* %20
br label %70
92: ; preds = %70
%93 = load i8*, i8** %9
%94 = load i32, i32* %19
%95 = mul nsw i32 %94, 512
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds i8, i8* %93, i64 %96
%98 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%99 = call i32 @memcpy(i8* %97, i8* %98, i32 512)
%100 = load i32, i32* %19
%101 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %100)
br label %102
102: ; preds = %92
%103 = load i32, i32* %19
%104 = add nsw i32 %103, 1
store i32 %104, i32* %19
br label %29
105: ; preds = %29
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @r3d_decrypt_ctr(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca [512 x i8]
%7 = alloca [512 x i8]
%8 = alloca [512 x i8]
%9 = alloca [512 x i8]
%10 = alloca [512 x i32]
%11 = alloca [512 x i8]
%12 = alloca [512 x i8]
%13 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%14 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%15 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%16 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%17 = bitcast [512 x i32]* %10 to i8*
%18 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%19 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%20 = call i32 @memcpy(i8* %15, i8* %1, i32 512)
%21 = call i32 @memcpy(i8* %16, i8* %2, i32 512)
%22 = icmp sgt i32 %4, 511
br i1 %22, label %23, label %371
23: ; preds = %5
%24 = lshr i32 %4, 9
%25 = getelementptr inbounds [512 x i32], [512 x i32]* %10, i64 0, i64 0
%26 = zext i32 %24 to i64
%27 = bitcast [512 x i8]* %7 to <16 x i8>*
%28 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 16
%29 = bitcast i8* %28 to <16 x i8>*
%30 = bitcast [512 x i8]* %12 to <16 x i8>*
%31 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 16
%32 = bitcast i8* %31 to <16 x i8>*
%33 = bitcast [512 x i8]* %6 to <16 x i8>*
%34 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 16
%35 = bitcast i8* %34 to <16 x i8>*
%36 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 32
%37 = bitcast i8* %36 to <16 x i8>*
%38 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 48
%39 = bitcast i8* %38 to <16 x i8>*
%40 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 32
%41 = bitcast i8* %40 to <16 x i8>*
%42 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 48
%43 = bitcast i8* %42 to <16 x i8>*
%44 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 32
%45 = bitcast i8* %44 to <16 x i8>*
%46 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 48
%47 = bitcast i8* %46 to <16 x i8>*
%48 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 64
%49 = bitcast i8* %48 to <16 x i8>*
%50 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 80
%51 = bitcast i8* %50 to <16 x i8>*
%52 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 64
%53 = bitcast i8* %52 to <16 x i8>*
%54 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 80
%55 = bitcast i8* %54 to <16 x i8>*
%56 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 64
%57 = bitcast i8* %56 to <16 x i8>*
%58 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 80
%59 = bitcast i8* %58 to <16 x i8>*
%60 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 96
%61 = bitcast i8* %60 to <16 x i8>*
%62 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 112
%63 = bitcast i8* %62 to <16 x i8>*
%64 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 96
%65 = bitcast i8* %64 to <16 x i8>*
%66 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 112
%67 = bitcast i8* %66 to <16 x i8>*
%68 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 96
%69 = bitcast i8* %68 to <16 x i8>*
%70 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 112
%71 = bitcast i8* %70 to <16 x i8>*
%72 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 128
%73 = bitcast i8* %72 to <16 x i8>*
%74 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 144
%75 = bitcast i8* %74 to <16 x i8>*
%76 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 128
%77 = bitcast i8* %76 to <16 x i8>*
%78 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 144
%79 = bitcast i8* %78 to <16 x i8>*
%80 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 128
%81 = bitcast i8* %80 to <16 x i8>*
%82 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 144
%83 = bitcast i8* %82 to <16 x i8>*
%84 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 160
%85 = bitcast i8* %84 to <16 x i8>*
%86 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 176
%87 = bitcast i8* %86 to <16 x i8>*
%88 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 160
%89 = bitcast i8* %88 to <16 x i8>*
%90 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 176
%91 = bitcast i8* %90 to <16 x i8>*
%92 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 160
%93 = bitcast i8* %92 to <16 x i8>*
%94 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 176
%95 = bitcast i8* %94 to <16 x i8>*
%96 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 192
%97 = bitcast i8* %96 to <16 x i8>*
%98 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 208
%99 = bitcast i8* %98 to <16 x i8>*
%100 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 192
%101 = bitcast i8* %100 to <16 x i8>*
%102 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 208
%103 = bitcast i8* %102 to <16 x i8>*
%104 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 192
%105 = bitcast i8* %104 to <16 x i8>*
%106 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 208
%107 = bitcast i8* %106 to <16 x i8>*
%108 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 224
%109 = bitcast i8* %108 to <16 x i8>*
%110 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 240
%111 = bitcast i8* %110 to <16 x i8>*
%112 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 224
%113 = bitcast i8* %112 to <16 x i8>*
%114 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 240
%115 = bitcast i8* %114 to <16 x i8>*
%116 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 224
%117 = bitcast i8* %116 to <16 x i8>*
%118 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 240
%119 = bitcast i8* %118 to <16 x i8>*
%120 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 256
%121 = bitcast i8* %120 to <16 x i8>*
%122 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 272
%123 = bitcast i8* %122 to <16 x i8>*
%124 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 256
%125 = bitcast i8* %124 to <16 x i8>*
%126 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 272
%127 = bitcast i8* %126 to <16 x i8>*
%128 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 256
%129 = bitcast i8* %128 to <16 x i8>*
%130 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 272
%131 = bitcast i8* %130 to <16 x i8>*
%132 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 288
%133 = bitcast i8* %132 to <16 x i8>*
%134 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 304
%135 = bitcast i8* %134 to <16 x i8>*
%136 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 288
%137 = bitcast i8* %136 to <16 x i8>*
%138 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 304
%139 = bitcast i8* %138 to <16 x i8>*
%140 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 288
%141 = bitcast i8* %140 to <16 x i8>*
%142 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 304
%143 = bitcast i8* %142 to <16 x i8>*
%144 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 320
%145 = bitcast i8* %144 to <16 x i8>*
%146 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 336
%147 = bitcast i8* %146 to <16 x i8>*
%148 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 320
%149 = bitcast i8* %148 to <16 x i8>*
%150 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 336
%151 = bitcast i8* %150 to <16 x i8>*
%152 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 320
%153 = bitcast i8* %152 to <16 x i8>*
%154 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 336
%155 = bitcast i8* %154 to <16 x i8>*
%156 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 352
%157 = bitcast i8* %156 to <16 x i8>*
%158 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 368
%159 = bitcast i8* %158 to <16 x i8>*
%160 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 352
%161 = bitcast i8* %160 to <16 x i8>*
%162 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 368
%163 = bitcast i8* %162 to <16 x i8>*
%164 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 352
%165 = bitcast i8* %164 to <16 x i8>*
%166 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 368
%167 = bitcast i8* %166 to <16 x i8>*
%168 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 384
%169 = bitcast i8* %168 to <16 x i8>*
%170 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 400
%171 = bitcast i8* %170 to <16 x i8>*
%172 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 384
%173 = bitcast i8* %172 to <16 x i8>*
%174 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 400
%175 = bitcast i8* %174 to <16 x i8>*
%176 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 384
%177 = bitcast i8* %176 to <16 x i8>*
%178 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 400
%179 = bitcast i8* %178 to <16 x i8>*
%180 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 416
%181 = bitcast i8* %180 to <16 x i8>*
%182 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 432
%183 = bitcast i8* %182 to <16 x i8>*
%184 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 416
%185 = bitcast i8* %184 to <16 x i8>*
%186 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 432
%187 = bitcast i8* %186 to <16 x i8>*
%188 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 416
%189 = bitcast i8* %188 to <16 x i8>*
%190 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 432
%191 = bitcast i8* %190 to <16 x i8>*
%192 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 448
%193 = bitcast i8* %192 to <16 x i8>*
%194 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 464
%195 = bitcast i8* %194 to <16 x i8>*
%196 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 448
%197 = bitcast i8* %196 to <16 x i8>*
%198 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 464
%199 = bitcast i8* %198 to <16 x i8>*
%200 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 448
%201 = bitcast i8* %200 to <16 x i8>*
%202 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 464
%203 = bitcast i8* %202 to <16 x i8>*
%204 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 480
%205 = bitcast i8* %204 to <16 x i8>*
%206 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 496
%207 = bitcast i8* %206 to <16 x i8>*
%208 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 480
%209 = bitcast i8* %208 to <16 x i8>*
%210 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 496
%211 = bitcast i8* %210 to <16 x i8>*
%212 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 480
%213 = bitcast i8* %212 to <16 x i8>*
%214 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 496
%215 = bitcast i8* %214 to <16 x i8>*
br label %216
216: ; preds = %23, %268
%217 = phi i64 [ 0, %23 ], [ %369, %268 ]
%218 = trunc i64 %217 to i32
%219 = call i32 @memset(i32* %25, i32 %218, i32 512)
%220 = shl nsw i64 %217, 9
%221 = getelementptr inbounds i8, i8* %0, i64 %220
%222 = call i32 @memcpy(i8* %14, i8* %221, i32 512)
br label %223
223: ; preds = %223, %216
%224 = phi i64 [ 0, %216 ], [ %266, %223 ]
%225 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 %224
%226 = bitcast i8* %225 to <4 x i8>*
%227 = load <4 x i8>, <4 x i8>* %226
%228 = getelementptr inbounds i8, i8* %225, i64 4
%229 = bitcast i8* %228 to <4 x i8>*
%230 = load <4 x i8>, <4 x i8>* %229
%231 = getelementptr inbounds [512 x i32], [512 x i32]* %10, i64 0, i64 %224
%232 = bitcast i32* %231 to <4 x i32>*
%233 = load <4 x i32>, <4 x i32>* %232
%234 = getelementptr inbounds i32, i32* %231, i64 4
%235 = bitcast i32* %234 to <4 x i32>*
%236 = load <4 x i32>, <4 x i32>* %235
%237 = trunc <4 x i32> %233 to <4 x i8>
%238 = trunc <4 x i32> %236 to <4 x i8>
%239 = xor <4 x i8> %227, %237
%240 = xor <4 x i8> %230, %238
%241 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 %224
%242 = bitcast i8* %241 to <4 x i8>*
store <4 x i8> %239, <4 x i8>* %242
%243 = getelementptr inbounds i8, i8* %241, i64 4
%244 = bitcast i8* %243 to <4 x i8>*
store <4 x i8> %240, <4 x i8>* %244
%245 = or i64 %224, 8
%246 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 %245
%247 = bitcast i8* %246 to <4 x i8>*
%248 = load <4 x i8>, <4 x i8>* %247
%249 = getelementptr inbounds i8, i8* %246, i64 4
%250 = bitcast i8* %249 to <4 x i8>*
%251 = load <4 x i8>, <4 x i8>* %250
%252 = getelementptr inbounds [512 x i32], [512 x i32]* %10, i64 0, i64 %245
%253 = bitcast i32* %252 to <4 x i32>*
%254 = load <4 x i32>, <4 x i32>* %253
%255 = getelementptr inbounds i32, i32* %252, i64 4
%256 = bitcast i32* %255 to <4 x i32>*
%257 = load <4 x i32>, <4 x i32>* %256
%258 = trunc <4 x i32> %254 to <4 x i8>
%259 = trunc <4 x i32> %257 to <4 x i8>
%260 = xor <4 x i8> %248, %258
%261 = xor <4 x i8> %251, %259
%262 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 %245
%263 = bitcast i8* %262 to <4 x i8>*
store <4 x i8> %260, <4 x i8>* %263
%264 = getelementptr inbounds i8, i8* %262, i64 4
%265 = bitcast i8* %264 to <4 x i8>*
store <4 x i8> %261, <4 x i8>* %265
%266 = add nuw nsw i64 %224, 16
%267 = icmp eq i64 %266, 512
br i1 %267, label %268, label %223
268: ; preds = %223
%269 = call i32 @r3d_encrypt_block(i8* %18, i8* %1, i8* %19)
%270 = load <16 x i8>, <16 x i8>* %27
%271 = load <16 x i8>, <16 x i8>* %29
%272 = load <16 x i8>, <16 x i8>* %30
%273 = load <16 x i8>, <16 x i8>* %32
%274 = xor <16 x i8> %272, %270
%275 = xor <16 x i8> %273, %271
store <16 x i8> %274, <16 x i8>* %33
store <16 x i8> %275, <16 x i8>* %35
%276 = load <16 x i8>, <16 x i8>* %37
%277 = load <16 x i8>, <16 x i8>* %39
%278 = load <16 x i8>, <16 x i8>* %41
%279 = load <16 x i8>, <16 x i8>* %43
%280 = xor <16 x i8> %278, %276
%281 = xor <16 x i8> %279, %277
store <16 x i8> %280, <16 x i8>* %45
store <16 x i8> %281, <16 x i8>* %47
%282 = load <16 x i8>, <16 x i8>* %49
%283 = load <16 x i8>, <16 x i8>* %51
%284 = load <16 x i8>, <16 x i8>* %53
%285 = load <16 x i8>, <16 x i8>* %55
%286 = xor <16 x i8> %284, %282
%287 = xor <16 x i8> %285, %283
store <16 x i8> %286, <16 x i8>* %57
store <16 x i8> %287, <16 x i8>* %59
%288 = load <16 x i8>, <16 x i8>* %61
%289 = load <16 x i8>, <16 x i8>* %63
%290 = load <16 x i8>, <16 x i8>* %65
%291 = load <16 x i8>, <16 x i8>* %67
%292 = xor <16 x i8> %290, %288
%293 = xor <16 x i8> %291, %289
store <16 x i8> %292, <16 x i8>* %69
store <16 x i8> %293, <16 x i8>* %71
%294 = load <16 x i8>, <16 x i8>* %73
%295 = load <16 x i8>, <16 x i8>* %75
%296 = load <16 x i8>, <16 x i8>* %77
%297 = load <16 x i8>, <16 x i8>* %79
%298 = xor <16 x i8> %296, %294
%299 = xor <16 x i8> %297, %295
store <16 x i8> %298, <16 x i8>* %81
store <16 x i8> %299, <16 x i8>* %83
%300 = load <16 x i8>, <16 x i8>* %85
%301 = load <16 x i8>, <16 x i8>* %87
%302 = load <16 x i8>, <16 x i8>* %89
%303 = load <16 x i8>, <16 x i8>* %91
%304 = xor <16 x i8> %302, %300
%305 = xor <16 x i8> %303, %301
store <16 x i8> %304, <16 x i8>* %93
store <16 x i8> %305, <16 x i8>* %95
%306 = load <16 x i8>, <16 x i8>* %97
%307 = load <16 x i8>, <16 x i8>* %99
%308 = load <16 x i8>, <16 x i8>* %101
%309 = load <16 x i8>, <16 x i8>* %103
%310 = xor <16 x i8> %308, %306
%311 = xor <16 x i8> %309, %307
store <16 x i8> %310, <16 x i8>* %105
store <16 x i8> %311, <16 x i8>* %107
%312 = load <16 x i8>, <16 x i8>* %109
%313 = load <16 x i8>, <16 x i8>* %111
%314 = load <16 x i8>, <16 x i8>* %113
%315 = load <16 x i8>, <16 x i8>* %115
%316 = xor <16 x i8> %314, %312
%317 = xor <16 x i8> %315, %313
store <16 x i8> %316, <16 x i8>* %117
store <16 x i8> %317, <16 x i8>* %119
%318 = load <16 x i8>, <16 x i8>* %121
%319 = load <16 x i8>, <16 x i8>* %123
%320 = load <16 x i8>, <16 x i8>* %125
%321 = load <16 x i8>, <16 x i8>* %127
%322 = xor <16 x i8> %320, %318
%323 = xor <16 x i8> %321, %319
store <16 x i8> %322, <16 x i8>* %129
store <16 x i8> %323, <16 x i8>* %131
%324 = load <16 x i8>, <16 x i8>* %133
%325 = load <16 x i8>, <16 x i8>* %135
%326 = load <16 x i8>, <16 x i8>* %137
%327 = load <16 x i8>, <16 x i8>* %139
%328 = xor <16 x i8> %326, %324
%329 = xor <16 x i8> %327, %325
store <16 x i8> %328, <16 x i8>* %141
store <16 x i8> %329, <16 x i8>* %143
%330 = load <16 x i8>, <16 x i8>* %145
%331 = load <16 x i8>, <16 x i8>* %147
%332 = load <16 x i8>, <16 x i8>* %149
%333 = load <16 x i8>, <16 x i8>* %151
%334 = xor <16 x i8> %332, %330
%335 = xor <16 x i8> %333, %331
store <16 x i8> %334, <16 x i8>* %153
store <16 x i8> %335, <16 x i8>* %155
%336 = load <16 x i8>, <16 x i8>* %157
%337 = load <16 x i8>, <16 x i8>* %159
%338 = load <16 x i8>, <16 x i8>* %161
%339 = load <16 x i8>, <16 x i8>* %163
%340 = xor <16 x i8> %338, %336
%341 = xor <16 x i8> %339, %337
store <16 x i8> %340, <16 x i8>* %165
store <16 x i8> %341, <16 x i8>* %167
%342 = load <16 x i8>, <16 x i8>* %169
%343 = load <16 x i8>, <16 x i8>* %171
%344 = load <16 x i8>, <16 x i8>* %173
%345 = load <16 x i8>, <16 x i8>* %175
%346 = xor <16 x i8> %344, %342
%347 = xor <16 x i8> %345, %343
store <16 x i8> %346, <16 x i8>* %177
store <16 x i8> %347, <16 x i8>* %179
%348 = load <16 x i8>, <16 x i8>* %181
%349 = load <16 x i8>, <16 x i8>* %183
%350 = load <16 x i8>, <16 x i8>* %185
%351 = load <16 x i8>, <16 x i8>* %187
%352 = xor <16 x i8> %350, %348
%353 = xor <16 x i8> %351, %349
store <16 x i8> %352, <16 x i8>* %189
store <16 x i8> %353, <16 x i8>* %191
%354 = load <16 x i8>, <16 x i8>* %193
%355 = load <16 x i8>, <16 x i8>* %195
%356 = load <16 x i8>, <16 x i8>* %197
%357 = load <16 x i8>, <16 x i8>* %199
%358 = xor <16 x i8> %356, %354
%359 = xor <16 x i8> %357, %355
store <16 x i8> %358, <16 x i8>* %201
store <16 x i8> %359, <16 x i8>* %203
%360 = load <16 x i8>, <16 x i8>* %205
%361 = load <16 x i8>, <16 x i8>* %207
%362 = load <16 x i8>, <16 x i8>* %209
%363 = load <16 x i8>, <16 x i8>* %211
%364 = xor <16 x i8> %362, %360
%365 = xor <16 x i8> %363, %361
store <16 x i8> %364, <16 x i8>* %213
store <16 x i8> %365, <16 x i8>* %215
%366 = getelementptr inbounds i8, i8* %3, i64 %220
%367 = call i32 @memcpy(i8* %366, i8* %13, i32 512)
%368 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %218)
%369 = add nuw nsw i64 %217, 1
%370 = icmp eq i64 %369, %26
br i1 %370, label %371, label %216
371: ; preds = %268, %5
ret void
}