#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*/ cbc_decipher(unsigned char *, unsigned char *,
                                unsigned char *, int);
int /*<<< orphan*/ cbc_encipher(unsigned char *, unsigned char *,
                                unsigned char *, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  unsigned char destmp[1000], desptx[1000], desctx[1000], deskey[8];
  int i, error = 0;
  fprintf(stdout, "Enciphering with DES in CBC mode\n");
  deskey[0] = 0x01;
  deskey[1] = 0xf1;
  deskey[2] = 0x23;
  deskey[3] = 0x4a;
  deskey[4] = 0x1f;
  deskey[5] = 0x22;
  deskey[6] = 0x00;
  deskey[7] = 0xee;
  for (i = 0; i < 1000; i++) {
    destmp[i] = (i * 23) % 256;
  }
  cbc_encipher(destmp, desctx, deskey, 1000);
  cbc_decipher(desctx, desptx, deskey, 1000);
  fprintf(stdout, "deskey: %02x %02x %02x %02x %02x %02x %02x %02x\n",
          deskey[0], deskey[1], deskey[2], deskey[3], deskey[4], deskey[5],
          deskey[6], deskey[7]);
  for (i = 0; i < 1000; i++) {
    if (destmp[i] == desptx[i]) {
      fprintf(
          stdout,
          "-> destmp[%03d]=%02x, desctx[%03d]=%02x, desptx[%03d]=%02x (OK)\n",
          i, destmp[i], i, desctx[i], i, desptx[i]);
    } else {
      error++;
      fprintf(stdout,
              "-> destmp[%03d]=%02x, desctx[%03d]=%02x, desptx[%03d]=%02x "
              "(ERROR)\n",
              i, destmp[i], i, desctx[i], i, desptx[i]);
    }
  }
  if (error == 0) {
    fprintf(stdout, "Enciphering OK\n");
  } else {
    fprintf(stdout, "Enciphering Error: %d\n", error);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0xc08,%rsp
movl   $0x0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0xbf0(%rbp)
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movb   $0x1,-0xbe8(%rbp)
movb   $0xf1,-0xbe7(%rbp)
movb   $0x23,-0xbe6(%rbp)
movb   $0x4a,-0xbe5(%rbp)
movb   $0x1f,-0xbe4(%rbp)
movb   $0x22,-0xbe3(%rbp)
movb   $0x0,-0xbe2(%rbp)
movb   $0xee,-0xbe1(%rbp)
movl   $0x0,-0xbec(%rbp)
cmpl   $0x3e8,-0xbec(%rbp)
jge    11f0 <main+0xc0>
imul   $0x17,-0xbec(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %dl,%cl
movslq -0xbec(%rbp),%rax
mov    %cl,-0x400(%rbp,%rax,1)
mov    -0xbec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbec(%rbp)
jmp    11ad <main+0x7d>
lea    -0x400(%rbp),%rdi
lea    -0xbe0(%rbp),%rsi
lea    -0xbe8(%rbp),%rdx
mov    $0x3e8,%ecx
call   1030 <cbc_encipher@plt>
lea    -0xbe0(%rbp),%rdi
lea    -0x7f0(%rbp),%rsi
lea    -0xbe8(%rbp),%rdx
mov    $0x3e8,%ecx
call   1040 <cbc_decipher@plt>
mov    0x2dab(%rip),%rax
mov    (%rax),%edi
movzbl -0xbe8(%rbp),%edx
movzbl -0xbe7(%rbp),%ecx
movzbl -0xbe6(%rbp),%r8d
ff
movzbl -0xbe5(%rbp),%r9d
ff
movzbl -0xbe4(%rbp),%ebx
movzbl -0xbe3(%rbp),%r11d
ff
movzbl -0xbe2(%rbp),%r10d
ff
movzbl -0xbe1(%rbp),%eax
lea    0xda8(%rip),%rsi
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0xbec(%rbp)
cmpl   $0x3e8,-0xbec(%rbp)
jge    13c1 <main+0x291>
movslq -0xbec(%rbp),%rax
movzbl -0x400(%rbp,%rax,1),%eax
ff
movslq -0xbec(%rbp),%rcx
movzbl -0x7f0(%rbp,%rcx,1),%ecx
ff
cmp    %ecx,%eax
jne    1338 <main+0x208>
mov    0x2d07(%rip),%rax
mov    (%rax),%edi
mov    -0xbec(%rbp),%edx
movslq -0xbec(%rbp),%rax
movzbl -0x400(%rbp,%rax,1),%ecx
ff
mov    -0xbec(%rbp),%r8d
movslq -0xbec(%rbp),%rax
movzbl -0xbe0(%rbp,%rax,1),%r9d
ff ff
mov    -0xbec(%rbp),%r10d
movslq -0xbec(%rbp),%rax
movzbl -0x7f0(%rbp,%rax,1),%eax
ff
lea    0xd2f(%rip),%rsi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    13a8 <main+0x278>
mov    -0xbf0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbf0(%rbp)
mov    0x2c92(%rip),%rax
mov    (%rax),%edi
mov    -0xbec(%rbp),%edx
movslq -0xbec(%rbp),%rax
movzbl -0x400(%rbp,%rax,1),%ecx
ff
mov    -0xbec(%rbp),%r8d
movslq -0xbec(%rbp),%rax
movzbl -0xbe0(%rbp,%rax,1),%r9d
ff ff
mov    -0xbec(%rbp),%r10d
movslq -0xbec(%rbp),%rax
movzbl -0x7f0(%rbp,%rax,1),%eax
ff
lea    0xcfb(%rip),%rsi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    13ad <main+0x27d>
mov    -0xbec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbec(%rbp)
jmp    129c <main+0x16c>
cmpl   $0x0,-0xbf0(%rbp)
jne    13ea <main+0x2ba>
mov    0x2c0b(%rip),%rax
mov    (%rax),%edi
lea    0xcfa(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1407 <main+0x2d7>
mov    0x2bef(%rip),%rax
mov    (%rax),%edi
mov    -0xbf0(%rbp),%edx
lea    0xce8(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0xc08,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xbd8,%rsp
mov    0x2e98(%rip),%r12
mov    (%r12),%edi
lea    0xefd(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
movabs $0xee00221f4a23f101,%rax
mov    %rax,0x8(%rsp)
movdqa 0xe8f(%rip),%xmm0
mov    $0x10,%eax
movdqa 0xe92(%rip),%xmm1
movdqa 0xe9a(%rip),%xmm2
movdqa 0xea2(%rip),%xmm3
movdqa 0xeaa(%rip),%xmm4
cs nopw 0x0(%rax,%rax,1)
movdqa %xmm0,%xmm5
punpckhbw %xmm5,%xmm5
pmullw %xmm1,%xmm5
pand   %xmm2,%xmm5
movdqa %xmm0,%xmm6
punpcklbw %xmm6,%xmm6
pmullw %xmm1,%xmm6
pand   %xmm2,%xmm6
packuswb %xmm5,%xmm6
movdqa %xmm6,(%rsp,%rax,1)
paddb  %xmm3,%xmm6
movdqa %xmm6,0x10(%rsp,%rax,1)
paddb  %xmm4,%xmm0
add    $0x20,%rax
cmp    $0x3f0,%rax
jne    11a0 <main+0x70>
movabs $0xc1aa937c654e3720,%rax
93 aa c1
mov    %rax,0x3f0(%rsp)
lea    0x10(%rsp),%rdi
lea    0x400(%rsp),%rbx
lea    0x8(%rsp),%rbp
mov    %rbx,%rsi
mov    %rbp,%rdx
mov    $0x3e8,%ecx
call   1030 <cbc_encipher@plt>
lea    0x7f0(%rsp),%rsi
mov    %rbx,%rdi
mov    %rbp,%rdx
mov    $0x3e8,%ecx
call   1040 <cbc_decipher@plt>
mov    (%r12),%edi
movzbl 0x8(%rsp),%edx
movzbl 0x9(%rsp),%ecx
movzbl 0xa(%rsp),%r8d
movzbl 0xb(%rsp),%r9d
movzbl 0xc(%rsp),%r10d
movzbl 0xd(%rsp),%r11d
movzbl 0xe(%rsp),%ebp
movzbl 0xf(%rsp),%ebx
lea    0xe0c(%rip),%rsi
xor    %eax,%eax
push   %rbx
push   %rbp
push   %r11
push   %r10
call   1050 <fprintf@plt>
add    $0x20,%rsp
lea    0xe25(%rip),%r14
lea    0xe5f(%rip),%r15
xor    %ebx,%ebx
xor    %r13d,%r13d
jmp    12c3 <main+0x193>
nopl   0x0(%rax)
add    $0x1,%r13d
mov    (%r12),%edi
movzbl 0x400(%rsp,%rbx,1),%r9d
mov    %r15,%rsi
mov    %ebx,%edx
mov    %ebx,%r8d
xor    %eax,%eax
push   %rbp
push   %rbx
call   1050 <fprintf@plt>
add    $0x10,%rsp
add    $0x1,%rbx
cmp    $0x3e8,%rbx
je     12e7 <main+0x1b7>
movzbl 0x10(%rsp,%rbx,1),%ecx
movzbl 0x7f0(%rsp,%rbx,1),%ebp
cmp    %bpl,%cl
jne    1290 <main+0x160>
mov    (%r12),%edi
movzbl 0x400(%rsp,%rbx,1),%r9d
mov    %r14,%rsi
jmp    12a4 <main+0x174>
mov    (%r12),%edi
test   %r13d,%r13d
je     1303 <main+0x1d3>
lea    0xe41(%rip),%rsi
mov    %r13d,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    1311 <main+0x1e1>
lea    0xe1e(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0xbd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [34 x i8] c"Enciphering with DES in CBC mode\0A\00"
@.str.1 = [49 x i8] c"deskey: %02x %02x %02x %02x %02x %02x %02x %02x\0A\00"
@.str.2 = [65 x i8] c"-> destmp[%03d]=%02x, desctx[%03d]=%02x, desptx[%03d]=%02x (OK)\0A\00"
@.str.3 = [68 x i8] c"-> destmp[%03d]=%02x, desctx[%03d]=%02x, desptx[%03d]=%02x (ERROR)\0A\00"
@.str.4 = [16 x i8] c"Enciphering OK\0A\00"
@.str.5 = [23 x i8] c"Enciphering Error: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [1000 x i8]
%7 = alloca [1000 x i8]
%8 = alloca [1000 x i8]
%9 = alloca [8 x i8]
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %11
%12 = load i32, i32* @stdout
%13 = call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%14 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 0
store i8 1, i8* %14
%15 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 1
store i8 -15, i8* %15
%16 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 2
store i8 35, i8* %16
%17 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 3
store i8 74, i8* %17
%18 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 4
store i8 31, i8* %18
%19 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 5
store i8 34, i8* %19
%20 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 6
store i8 0, i8* %20
%21 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 7
store i8 -18, i8* %21
store i32 0, i32* %10
br label %22
22: ; preds = %33, %2
%23 = load i32, i32* %10
%24 = icmp slt i32 %23, 1000
br i1 %24, label %25, label %36
25: ; preds = %22
%26 = load i32, i32* %10
%27 = mul nsw i32 %26, 23
%28 = srem i32 %27, 256
%29 = trunc i32 %28 to i8
%30 = load i32, i32* %10
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 %31
store i8 %29, i8* %32
br label %33
33: ; preds = %25
%34 = load i32, i32* %10
%35 = add nsw i32 %34, 1
store i32 %35, i32* %10
br label %22
36: ; preds = %22
%37 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%38 = getelementptr inbounds [1000 x i8], [1000 x i8]* %8, i64 0, i64 0
%39 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 0
%40 = call i32 @cbc_encipher(i8* %37, i8* %38, i8* %39, i32 1000)
%41 = getelementptr inbounds [1000 x i8], [1000 x i8]* %8, i64 0, i64 0
%42 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%43 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 0
%44 = call i32 @cbc_decipher(i8* %41, i8* %42, i8* %43, i32 1000)
%45 = load i32, i32* @stdout
%46 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 0
%47 = load i8, i8* %46
%48 = zext i8 %47 to i32
%49 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 1
%50 = load i8, i8* %49
%51 = zext i8 %50 to i32
%52 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 2
%53 = load i8, i8* %52
%54 = zext i8 %53 to i32
%55 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 3
%56 = load i8, i8* %55
%57 = zext i8 %56 to i32
%58 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 4
%59 = load i8, i8* %58
%60 = zext i8 %59 to i32
%61 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 5
%62 = load i8, i8* %61
%63 = zext i8 %62 to i32
%64 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 6
%65 = load i8, i8* %64
%66 = zext i8 %65 to i32
%67 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 7
%68 = load i8, i8* %67
%69 = zext i8 %68 to i32
%70 = call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i32 %48, i32 %51, i32 %54, i32 %57, i32 %60, i32 %63, i32 %66, i32 %69)
store i32 0, i32* %10
br label %71
71: ; preds = %131, %36
%72 = load i32, i32* %10
%73 = icmp slt i32 %72, 1000
br i1 %73, label %74, label %134
74: ; preds = %71
%75 = load i32, i32* %10
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 %76
%78 = load i8, i8* %77
%79 = zext i8 %78 to i32
%80 = load i32, i32* %10
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 %81
%83 = load i8, i8* %82
%84 = zext i8 %83 to i32
%85 = icmp eq i32 %79, %84
br i1 %85, label %86, label %107
86: ; preds = %74
%87 = load i32, i32* @stdout
%88 = load i32, i32* %10
%89 = load i32, i32* %10
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 %90
%92 = load i8, i8* %91
%93 = zext i8 %92 to i32
%94 = load i32, i32* %10
%95 = load i32, i32* %10
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [1000 x i8], [1000 x i8]* %8, i64 0, i64 %96
%98 = load i8, i8* %97
%99 = zext i8 %98 to i32
%100 = load i32, i32* %10
%101 = load i32, i32* %10
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 %102
%104 = load i8, i8* %103
%105 = zext i8 %104 to i32
%106 = call i32 (i32, i8*, ...) @fprintf(i32 %87, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0), i32 %88, i32 %93, i32 %94, i32 %99, i32 %100, i32 %105)
br label %130
107: ; preds = %74
%108 = load i32, i32* %11
%109 = add nsw i32 %108, 1
store i32 %109, i32* %11
%110 = load i32, i32* @stdout
%111 = load i32, i32* %10
%112 = load i32, i32* %10
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 %113
%115 = load i8, i8* %114
%116 = zext i8 %115 to i32
%117 = load i32, i32* %10
%118 = load i32, i32* %10
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds [1000 x i8], [1000 x i8]* %8, i64 0, i64 %119
%121 = load i8, i8* %120
%122 = zext i8 %121 to i32
%123 = load i32, i32* %10
%124 = load i32, i32* %10
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 %125
%127 = load i8, i8* %126
%128 = zext i8 %127 to i32
%129 = call i32 (i32, i8*, ...) @fprintf(i32 %110, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.3, i64 0, i64 0), i32 %111, i32 %116, i32 %117, i32 %122, i32 %123, i32 %128)
br label %130
130: ; preds = %107, %86
br label %131
131: ; preds = %130
%132 = load i32, i32* %10
%133 = add nsw i32 %132, 1
store i32 %133, i32* %10
br label %71
134: ; preds = %71
%135 = load i32, i32* %11
%136 = icmp eq i32 %135, 0
br i1 %136, label %137, label %140
137: ; preds = %134
%138 = load i32, i32* @stdout
%139 = call i32 (i32, i8*, ...) @fprintf(i32 %138, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
br label %144
140: ; preds = %134
%141 = load i32, i32* @stdout
%142 = load i32, i32* %11
%143 = call i32 (i32, i8*, ...) @fprintf(i32 %141, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %142)
br label %144
144: ; preds = %140, %137
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [34 x i8] c"Enciphering with DES in CBC mode\0A\00"
@.str.1 = [49 x i8] c"deskey: %02x %02x %02x %02x %02x %02x %02x %02x\0A\00"
@.str.2 = [65 x i8] c"-> destmp[%03d]=%02x, desctx[%03d]=%02x, desptx[%03d]=%02x (OK)\0A\00"
@.str.3 = [68 x i8] c"-> destmp[%03d]=%02x, desctx[%03d]=%02x, desptx[%03d]=%02x (ERROR)\0A\00"
@.str.4 = [16 x i8] c"Enciphering OK\0A\00"
@.str.5 = [23 x i8] c"Enciphering Error: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1000 x i8]
%4 = alloca [1000 x i8]
%5 = alloca [1000 x i8]
%6 = alloca [8 x i8]
%7 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 0
%10 = getelementptr inbounds [8 x i8], [8 x i8]* %6, i64 0, i64 0
%11 = load i32, i32* @stdout
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
store i8 1, i8* %10
%13 = getelementptr inbounds [8 x i8], [8 x i8]* %6, i64 0, i64 1
store i8 -15, i8* %13
%14 = getelementptr inbounds [8 x i8], [8 x i8]* %6, i64 0, i64 2
store i8 35, i8* %14
%15 = getelementptr inbounds [8 x i8], [8 x i8]* %6, i64 0, i64 3
store i8 74, i8* %15
%16 = getelementptr inbounds [8 x i8], [8 x i8]* %6, i64 0, i64 4
store i8 31, i8* %16
%17 = getelementptr inbounds [8 x i8], [8 x i8]* %6, i64 0, i64 5
store i8 34, i8* %17
%18 = getelementptr inbounds [8 x i8], [8 x i8]* %6, i64 0, i64 6
store i8 0, i8* %18
%19 = getelementptr inbounds [8 x i8], [8 x i8]* %6, i64 0, i64 7
store i8 -18, i8* %19
br label %20
20: ; preds = %20, %2
%21 = phi i64 [ 0, %2 ], [ %31, %20 ]
%22 = phi <16 x i8> [ <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>, %2 ], [ %32, %20 ]
%23 = mul <16 x i8> %22, <i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23>
%24 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 %21
%25 = bitcast i8* %24 to <16 x i8>*
store <16 x i8> %23, <16 x i8>* %25
%26 = or i64 %21, 16
%27 = mul <16 x i8> %22, <i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23, i8 23>
%28 = add <16 x i8> %27, <i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112>
%29 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 %26
%30 = bitcast i8* %29 to <16 x i8>*
store <16 x i8> %28, <16 x i8>* %30
%31 = add nuw nsw i64 %21, 32
%32 = add <16 x i8> %22, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
%33 = icmp eq i64 %31, 992
br i1 %33, label %34, label %20
34: ; preds = %20
%35 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 992
store i8 32, i8* %35
%36 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 993
store i8 55, i8* %36
%37 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 994
store i8 78, i8* %37
%38 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 995
store i8 101, i8* %38
%39 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 996
store i8 124, i8* %39
%40 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 997
store i8 -109, i8* %40
%41 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 998
store i8 -86, i8* %41
%42 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 999
store i8 -63, i8* %42
%43 = call i32 @cbc_encipher(i8* %7, i8* %9, i8* %10, i32 1000)
%44 = call i32 @cbc_decipher(i8* %9, i8* %8, i8* %10, i32 1000)
%45 = load i32, i32* @stdout
%46 = load i8, i8* %10
%47 = zext i8 %46 to i32
%48 = load i8, i8* %13
%49 = zext i8 %48 to i32
%50 = load i8, i8* %14
%51 = zext i8 %50 to i32
%52 = load i8, i8* %15
%53 = zext i8 %52 to i32
%54 = load i8, i8* %16
%55 = zext i8 %54 to i32
%56 = load i8, i8* %17
%57 = zext i8 %56 to i32
%58 = load i8, i8* %18
%59 = zext i8 %58 to i32
%60 = load i8, i8* %19
%61 = zext i8 %60 to i32
%62 = call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i32 %47, i32 %49, i32 %51, i32 %53, i32 %55, i32 %57, i32 %59, i32 %61)
br label %63
63: ; preds = %34, %88
%64 = phi i64 [ 0, %34 ], [ %90, %88 ]
%65 = phi i32 [ 0, %34 ], [ %89, %88 ]
%66 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 %64
%67 = load i8, i8* %66
%68 = zext i8 %67 to i32
%69 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 %64
%70 = load i8, i8* %69
%71 = zext i8 %70 to i32
%72 = icmp eq i8 %67, %70
br i1 %72, label %73, label %80
73: ; preds = %63
%74 = load i32, i32* @stdout
%75 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 %64
%76 = load i8, i8* %75
%77 = zext i8 %76 to i32
%78 = trunc i64 %64 to i32
%79 = call i32 (i32, i8*, ...) @fprintf(i32 %74, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0), i32 %78, i32 %68, i32 %78, i32 %77, i32 %78, i32 %71)
br label %88
80: ; preds = %63
%81 = add nsw i32 %65, 1
%82 = load i32, i32* @stdout
%83 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 %64
%84 = load i8, i8* %83
%85 = zext i8 %84 to i32
%86 = trunc i64 %64 to i32
%87 = call i32 (i32, i8*, ...) @fprintf(i32 %82, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.3, i64 0, i64 0), i32 %86, i32 %68, i32 %86, i32 %85, i32 %86, i32 %71)
br label %88
88: ; preds = %73, %80
%89 = phi i32 [ %65, %73 ], [ %81, %80 ]
%90 = add nuw nsw i64 %64, 1
%91 = icmp eq i64 %90, 1000
br i1 %91, label %92, label %63
92: ; preds = %88
%93 = icmp eq i32 %89, 0
%94 = load i32, i32* @stdout
br i1 %93, label %95, label %97
95: ; preds = %92
%96 = call i32 (i32, i8*, ...) @fprintf(i32 %94, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
br label %99
97: ; preds = %92
%98 = call i32 (i32, i8*, ...) @fprintf(i32 %94, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %89)
br label %99
99: ; preds = %97, %95
ret i32 0
}