#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*/ comDES(unsigned char *, unsigned char *, unsigned char **,
                          int);
int /*<<< orphan*/ genKey(unsigned char *, unsigned char **);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, int);
unsigned char en3DES(unsigned char *indata, unsigned int inlen,
                     unsigned char *key_1, unsigned char *key_2,
                     unsigned char *key_3, unsigned char *outdata,
                     unsigned int *outlen) {
  unsigned char *p, *p1, s_key_1[16][8], s_key_2[16][8], s_key_3[16][8], tt[8];
  int tlen = 0, i = 0, ttlen = 0;
  unsigned char padding[7] = {0x80, 0, 0, 0, 0, 0, 0};
  if ((indata == NULL) || (outdata == NULL) || (key_1 == NULL) ||
      (key_2 == NULL) || (key_3 == NULL) || (outlen == NULL) || (inlen <= 0))
    return 0;
  p = indata;
  tlen = inlen / 8;
  if (inlen % 8 != 0) {
    memcpy(indata + inlen, padding, 8 - (inlen % 8));
    tlen = tlen + 1;
  }
  tlen = tlen * 8;
  *outlen = tlen;
  genKey(key_1, s_key_1);
  genKey(key_2, s_key_2);
  genKey(key_3, s_key_3);
  p1 = outdata;
  tlen = inlen;
  while (tlen > 0) {
    for (i = 0; i < 8; i++)
      tt[i] = 0;
    ttlen = (tlen < 8) ? tlen : 8;
    for (i = 0; i < ttlen; i++)
      tt[i] = *(p + i);
    comDES(tt, p1, s_key_1, 1);
    for (i = 0; i < 8; i++)
      tt[i] = p1[i];
    comDES(tt, p1, s_key_2, 2);
    for (i = 0; i < 8; i++)
      tt[i] = p1[i];
    comDES(tt, p1, s_key_3, 1);
    p = p + 8;
    p1 = p1 + 8;
    tlen = tlen - 8;
  }
  return 1;
}


x86 assembly (clang, -O0):
<en3DES>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f0,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
movl   $0x0,-0x1dc(%rbp)
movl   $0x0,-0x1e0(%rbp)
movl   $0x0,-0x1e4(%rbp)
mov    0xe86(%rip),%eax
mov    %eax,-0x1eb(%rbp)
mov    0xe7d(%rip),%ax
mov    %ax,-0x1e7(%rbp)
mov    0xe72(%rip),%al
mov    %al,-0x1e5(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     11e6 <en3DES+0xb6>
cmpq   $0x0,-0x38(%rbp)
je     11e6 <en3DES+0xb6>
cmpq   $0x0,-0x20(%rbp)
je     11e6 <en3DES+0xb6>
cmpq   $0x0,-0x28(%rbp)
je     11e6 <en3DES+0xb6>
cmpq   $0x0,-0x30(%rbp)
je     11e6 <en3DES+0xb6>
cmpq   $0x0,0x10(%rbp)
je     11e6 <en3DES+0xb6>
cmpl   $0x0,-0x14(%rbp)
ja     11ef <en3DES+0xbf>
movb   $0x0,-0x1(%rbp)
jmp    147f <en3DES+0x34f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x14(%rbp),%eax
shr    $0x3,%eax
mov    %eax,-0x1dc(%rbp)
mov    -0x14(%rbp),%eax
and    $0x7,%eax
cmp    $0x0,%eax
je     1244 <en3DES+0x114>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%eax
add    %rax,%rdi
lea    -0x1eb(%rbp),%rsi
mov    -0x14(%rbp),%eax
and    $0x7,%eax
mov    $0x8,%edx
sub    %eax,%edx
call   1030 <memcpy@plt>
mov    -0x1dc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1dc(%rbp)
mov    -0x1dc(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0x1dc(%rbp)
mov    -0x1dc(%rbp),%ecx
mov    0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rdi
lea    -0xd0(%rbp),%rsi
call   1040 <genKey@plt>
mov    -0x28(%rbp),%rdi
lea    -0x150(%rbp),%rsi
call   1040 <genKey@plt>
mov    -0x30(%rbp),%rdi
lea    -0x1d0(%rbp),%rsi
call   1040 <genKey@plt>
mov    -0x38(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1dc(%rbp)
cmpl   $0x0,-0x1dc(%rbp)
jle    147b <en3DES+0x34b>
movl   $0x0,-0x1e0(%rbp)
cmpl   $0x8,-0x1e0(%rbp)
jge    12e7 <en3DES+0x1b7>
movslq -0x1e0(%rbp),%rax
movb   $0x0,-0x1d8(%rbp,%rax,1)
mov    -0x1e0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1e0(%rbp)
jmp    12b7 <en3DES+0x187>
cmpl   $0x8,-0x1dc(%rbp)
jge    1305 <en3DES+0x1d5>
mov    -0x1dc(%rbp),%eax
mov    %eax,-0x1f0(%rbp)
jmp    1315 <en3DES+0x1e5>
mov    $0x8,%eax
mov    %eax,-0x1f0(%rbp)
jmp    1315 <en3DES+0x1e5>
mov    -0x1f0(%rbp),%eax
mov    %eax,-0x1e4(%rbp)
movl   $0x0,-0x1e0(%rbp)
mov    -0x1e0(%rbp),%eax
cmp    -0x1e4(%rbp),%eax
jge    136d <en3DES+0x23d>
mov    -0x40(%rbp),%rax
movslq -0x1e0(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
movslq -0x1e0(%rbp),%rax
mov    %cl,-0x1d8(%rbp,%rax,1)
mov    -0x1e0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1e0(%rbp)
jmp    132b <en3DES+0x1fb>
lea    -0x1d8(%rbp),%rdi
mov    -0x48(%rbp),%rsi
lea    -0xd0(%rbp),%rdx
mov    $0x1,%ecx
call   1050 <comDES@plt>
movl   $0x0,-0x1e0(%rbp)
cmpl   $0x8,-0x1e0(%rbp)
jge    13d0 <en3DES+0x2a0>
mov    -0x48(%rbp),%rax
movslq -0x1e0(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
movslq -0x1e0(%rbp),%rax
mov    %cl,-0x1d8(%rbp,%rax,1)
mov    -0x1e0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1e0(%rbp)
jmp    1393 <en3DES+0x263>
lea    -0x1d8(%rbp),%rdi
mov    -0x48(%rbp),%rsi
lea    -0x150(%rbp),%rdx
mov    $0x2,%ecx
call   1050 <comDES@plt>
movl   $0x0,-0x1e0(%rbp)
cmpl   $0x8,-0x1e0(%rbp)
jge    1433 <en3DES+0x303>
mov    -0x48(%rbp),%rax
movslq -0x1e0(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
movslq -0x1e0(%rbp),%rax
mov    %cl,-0x1d8(%rbp,%rax,1)
mov    -0x1e0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1e0(%rbp)
jmp    13f6 <en3DES+0x2c6>
lea    -0x1d8(%rbp),%rdi
mov    -0x48(%rbp),%rsi
lea    -0x1d0(%rbp),%rdx
mov    $0x1,%ecx
call   1050 <comDES@plt>
mov    -0x40(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x40(%rbp)
mov    -0x48(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x48(%rbp)
mov    -0x1dc(%rbp),%eax
sub    $0x8,%eax
mov    %eax,-0x1dc(%rbp)
jmp    12a0 <en3DES+0x170>
movb   $0x1,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x1f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<en3DES>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1a8,%rsp
movl   $0x0,0x13(%rsp)
movl   $0x80,0x10(%rsp)
xor    %eax,%eax
test   %esi,%esi
je     12ca <en3DES+0x19a>
mov    %rcx,%rbp
mov    0x1e0(%rsp),%rcx
test   %rcx,%rcx
je     12ca <en3DES+0x19a>
test   %r8,%r8
je     12ca <en3DES+0x19a>
test   %rbp,%rbp
je     12ca <en3DES+0x19a>
mov    %rdx,%r12
test   %rdx,%rdx
je     12ca <en3DES+0x19a>
mov    %rdi,%r14
test   %rdi,%rdi
je     12ca <en3DES+0x19a>
mov    %r9,%rbx
test   %r9,%r9
je     12ca <en3DES+0x19a>
mov    %esi,%r15d
mov    %r8,0x18(%rsp)
mov    %esi,%r13d
shr    $0x3,%r13d
mov    %esi,%eax
and    $0x7,%eax
je     11de <en3DES+0xae>
mov    %r15d,%edi
add    %r14,%rdi
mov    $0x8,%edx
sub    %eax,%edx
lea    0x10(%rsp),%rsi
call   1030 <memcpy@plt>
mov    0x1e0(%rsp),%rcx
add    $0x1,%r13d
shl    $0x3,%r13d
mov    %r13d,(%rcx)
lea    0x120(%rsp),%rsi
mov    %r12,%rdi
call   1040 <genKey@plt>
lea    0xa0(%rsp),%rsi
mov    %rbp,%rdi
call   1040 <genKey@plt>
lea    0x20(%rsp),%rsi
mov    0x18(%rsp),%rdi
call   1040 <genKey@plt>
mov    $0x1,%al
test   %r15d,%r15d
jle    12ca <en3DES+0x19a>
lea    0x8(%rsp),%rbp
lea    0xa0(%rsp),%r13
lea    0x20(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movq   $0x0,0x8(%rsp)
cmp    $0x8,%r15d
mov    $0x8,%edx
cmovl  %r15d,%edx
mov    %rbp,%rdi
mov    %r14,%rsi
call   1030 <memcpy@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
lea    0x120(%rsp),%rdx
mov    $0x1,%ecx
call   1050 <comDES@plt>
mov    (%rbx),%rax
mov    %rax,0x8(%rsp)
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    $0x2,%ecx
call   1050 <comDES@plt>
mov    (%rbx),%rax
mov    %rax,0x8(%rsp)
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    $0x1,%ecx
call   1050 <comDES@plt>
add    $0x8,%r14
add    $0x8,%rbx
lea    -0x8(%r15),%eax
cmp    $0x8,%r15d
mov    %eax,%r15d
ja     1240 <en3DES+0x110>
mov    $0x1,%al
add    $0x1a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.en3DES.padding = [7 x i8] c"\80\00\00\00\00\00\00"
define zeroext i8 @en3DES(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4, i8* %5, i32* %6) {
%8 = alloca i8
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i32*
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca [16 x [8 x i8]]
%19 = alloca [16 x [8 x i8]]
%20 = alloca [16 x [8 x i8]]
%21 = alloca [8 x i8]
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca [7 x i8]
store i8* %0, i8** %9
store i32 %1, i32* %10
store i8* %2, i8** %11
store i8* %3, i8** %12
store i8* %4, i8** %13
store i8* %5, i8** %14
store i32* %6, i32** %15
store i32 0, i32* %22
store i32 0, i32* %23
store i32 0, i32* %24
%26 = bitcast [7 x i8]* %25 to i8*
%27 = load i8*, i8** %9
%28 = icmp eq i8* %27, null
br i1 %28, label %47, label %29
29: ; preds = %7
%30 = load i8*, i8** %14
%31 = icmp eq i8* %30, null
br i1 %31, label %47, label %32
32: ; preds = %29
%33 = load i8*, i8** %11
%34 = icmp eq i8* %33, null
br i1 %34, label %47, label %35
35: ; preds = %32
%36 = load i8*, i8** %12
%37 = icmp eq i8* %36, null
br i1 %37, label %47, label %38
38: ; preds = %35
%39 = load i8*, i8** %13
%40 = icmp eq i8* %39, null
br i1 %40, label %47, label %41
41: ; preds = %38
%42 = load i32*, i32** %15
%43 = icmp eq i32* %42, null
br i1 %43, label %47, label %44
44: ; preds = %41
%45 = load i32, i32* %10
%46 = icmp ule i32 %45, 0
br i1 %46, label %47, label %48
47: ; preds = %44, %41, %38, %35, %32, %29, %7
store i8 0, i8* %8
br label %179
48: ; preds = %44
%49 = load i8*, i8** %9
store i8* %49, i8** %16
%50 = load i32, i32* %10
%51 = udiv i32 %50, 8
store i32 %51, i32* %22
%52 = load i32, i32* %10
%53 = urem i32 %52, 8
%54 = icmp ne i32 %53, 0
br i1 %54, label %55, label %67
55: ; preds = %48
%56 = load i8*, i8** %9
%57 = load i32, i32* %10
%58 = zext i32 %57 to i64
%59 = getelementptr inbounds i8, i8* %56, i64 %58
%60 = getelementptr inbounds [7 x i8], [7 x i8]* %25, i64 0, i64 0
%61 = load i32, i32* %10
%62 = urem i32 %61, 8
%63 = sub i32 8, %62
%64 = call i32 @memcpy(i8* %59, i8* %60, i32 %63)
%65 = load i32, i32* %22
%66 = add nsw i32 %65, 1
store i32 %66, i32* %22
br label %67
67: ; preds = %55, %48
%68 = load i32, i32* %22
%69 = mul nsw i32 %68, 8
store i32 %69, i32* %22
%70 = load i32, i32* %22
%71 = load i32*, i32** %15
store i32 %70, i32* %71
%72 = load i8*, i8** %11
%73 = getelementptr inbounds [16 x [8 x i8]], [16 x [8 x i8]]* %18, i64 0, i64 0
%74 = bitcast [8 x i8]* %73 to i8**
%75 = call i32 @genKey(i8* %72, i8** %74)
%76 = load i8*, i8** %12
%77 = getelementptr inbounds [16 x [8 x i8]], [16 x [8 x i8]]* %19, i64 0, i64 0
%78 = bitcast [8 x i8]* %77 to i8**
%79 = call i32 @genKey(i8* %76, i8** %78)
%80 = load i8*, i8** %13
%81 = getelementptr inbounds [16 x [8 x i8]], [16 x [8 x i8]]* %20, i64 0, i64 0
%82 = bitcast [8 x i8]* %81 to i8**
%83 = call i32 @genKey(i8* %80, i8** %82)
%84 = load i8*, i8** %14
store i8* %84, i8** %17
%85 = load i32, i32* %10
store i32 %85, i32* %22
br label %86
86: ; preds = %166, %67
%87 = load i32, i32* %22
%88 = icmp sgt i32 %87, 0
br i1 %88, label %89, label %178
89: ; preds = %86
store i32 0, i32* %23
br label %90
90: ; preds = %97, %89
%91 = load i32, i32* %23
%92 = icmp slt i32 %91, 8
br i1 %92, label %93, label %100
93: ; preds = %90
%94 = load i32, i32* %23
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [8 x i8], [8 x i8]* %21, i64 0, i64 %95
store i8 0, i8* %96
br label %97
97: ; preds = %93
%98 = load i32, i32* %23
%99 = add nsw i32 %98, 1
store i32 %99, i32* %23
br label %90
100: ; preds = %90
%101 = load i32, i32* %22
%102 = icmp slt i32 %101, 8
br i1 %102, label %103, label %105
103: ; preds = %100
%104 = load i32, i32* %22
br label %106
105: ; preds = %100
br label %106
106: ; preds = %105, %103
%107 = phi i32 [ %104, %103 ], [ 8, %105 ]
store i32 %107, i32* %24
store i32 0, i32* %23
br label %108
108: ; preds = %121, %106
%109 = load i32, i32* %23
%110 = load i32, i32* %24
%111 = icmp slt i32 %109, %110
br i1 %111, label %112, label %124
112: ; preds = %108
%113 = load i8*, i8** %16
%114 = load i32, i32* %23
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds i8, i8* %113, i64 %115
%117 = load i8, i8* %116
%118 = load i32, i32* %23
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds [8 x i8], [8 x i8]* %21, i64 0, i64 %119
store i8 %117, i8* %120
br label %121
121: ; preds = %112
%122 = load i32, i32* %23
%123 = add nsw i32 %122, 1
store i32 %123, i32* %23
br label %108
124: ; preds = %108
%125 = getelementptr inbounds [8 x i8], [8 x i8]* %21, i64 0, i64 0
%126 = load i8*, i8** %17
%127 = getelementptr inbounds [16 x [8 x i8]], [16 x [8 x i8]]* %18, i64 0, i64 0
%128 = bitcast [8 x i8]* %127 to i8**
%129 = call i32 @comDES(i8* %125, i8* %126, i8** %128, i32 1)
store i32 0, i32* %23
br label %130
130: ; preds = %142, %124
%131 = load i32, i32* %23
%132 = icmp slt i32 %131, 8
br i1 %132, label %133, label %145
133: ; preds = %130
%134 = load i8*, i8** %17
%135 = load i32, i32* %23
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds i8, i8* %134, i64 %136
%138 = load i8, i8* %137
%139 = load i32, i32* %23
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds [8 x i8], [8 x i8]* %21, i64 0, i64 %140
store i8 %138, i8* %141
br label %142
142: ; preds = %133
%143 = load i32, i32* %23
%144 = add nsw i32 %143, 1
store i32 %144, i32* %23
br label %130
145: ; preds = %130
%146 = getelementptr inbounds [8 x i8], [8 x i8]* %21, i64 0, i64 0
%147 = load i8*, i8** %17
%148 = getelementptr inbounds [16 x [8 x i8]], [16 x [8 x i8]]* %19, i64 0, i64 0
%149 = bitcast [8 x i8]* %148 to i8**
%150 = call i32 @comDES(i8* %146, i8* %147, i8** %149, i32 2)
store i32 0, i32* %23
br label %151
151: ; preds = %163, %145
%152 = load i32, i32* %23
%153 = icmp slt i32 %152, 8
br i1 %153, label %154, label %166
154: ; preds = %151
%155 = load i8*, i8** %17
%156 = load i32, i32* %23
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds i8, i8* %155, i64 %157
%159 = load i8, i8* %158
%160 = load i32, i32* %23
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds [8 x i8], [8 x i8]* %21, i64 0, i64 %161
store i8 %159, i8* %162
br label %163
163: ; preds = %154
%164 = load i32, i32* %23
%165 = add nsw i32 %164, 1
store i32 %165, i32* %23
br label %151
166: ; preds = %151
%167 = getelementptr inbounds [8 x i8], [8 x i8]* %21, i64 0, i64 0
%168 = load i8*, i8** %17
%169 = getelementptr inbounds [16 x [8 x i8]], [16 x [8 x i8]]* %20, i64 0, i64 0
%170 = bitcast [8 x i8]* %169 to i8**
%171 = call i32 @comDES(i8* %167, i8* %168, i8** %170, i32 1)
%172 = load i8*, i8** %16
%173 = getelementptr inbounds i8, i8* %172, i64 8
store i8* %173, i8** %16
%174 = load i8*, i8** %17
%175 = getelementptr inbounds i8, i8* %174, i64 8
store i8* %175, i8** %17
%176 = load i32, i32* %22
%177 = sub nsw i32 %176, 8
store i32 %177, i32* %22
br label %86
178: ; preds = %86
store i8 1, i8* %8
br label %179
179: ; preds = %178, %47
%180 = load i8, i8* %8
ret i8 %180
}

LLVM IR (-O2):
@__const.en3DES.padding = [7 x i8] c"\80\00\00\00\00\00\00"
define zeroext i8 @en3DES(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4, i8* %5, i32* writeonly %6) {
%8 = alloca [16 x [8 x i8]]
%9 = alloca [16 x [8 x i8]]
%10 = alloca [16 x [8 x i8]]
%11 = alloca i64
%12 = bitcast i64* %11 to i8*
%13 = alloca [7 x i8]
%14 = getelementptr inbounds [16 x [8 x i8]], [16 x [8 x i8]]* %8, i64 0, i64 0, i64 0
%15 = getelementptr inbounds [16 x [8 x i8]], [16 x [8 x i8]]* %9, i64 0, i64 0, i64 0
%16 = getelementptr inbounds [16 x [8 x i8]], [16 x [8 x i8]]* %10, i64 0, i64 0, i64 0
%17 = bitcast i64* %11 to i8*
%18 = getelementptr inbounds [7 x i8], [7 x i8]* %13, i64 0, i64 0
%19 = icmp eq i8* %0, null
%20 = icmp eq i8* %5, null
%21 = or i1 %19, %20
%22 = icmp eq i8* %2, null
%23 = or i1 %22, %21
%24 = icmp eq i8* %3, null
%25 = or i1 %24, %23
%26 = icmp eq i8* %4, null
%27 = or i1 %26, %25
%28 = icmp eq i32* %6, null
%29 = or i1 %28, %27
%30 = icmp eq i32 %1, 0
%31 = or i1 %30, %29
br i1 %31, label %69, label %32
32: ; preds = %7
%33 = lshr i32 %1, 3
%34 = and i32 %1, 7
%35 = icmp eq i32 %34, 0
br i1 %35, label %42, label %36
36: ; preds = %32
%37 = zext i32 %1 to i64
%38 = getelementptr inbounds i8, i8* %0, i64 %37
%39 = sub nuw nsw i32 8, %34
%40 = call i32 @memcpy(i8* %38, i8* %18, i32 %39)
%41 = add nuw nsw i32 %33, 1
br label %42
42: ; preds = %36, %32
%43 = phi i32 [ %41, %36 ], [ %33, %32 ]
%44 = shl nsw i32 %43, 3
store i32 %44, i32* %6
%45 = bitcast [16 x [8 x i8]]* %8 to i8**
%46 = call i32 @genKey(i8* %2, i8** %45)
%47 = bitcast [16 x [8 x i8]]* %9 to i8**
%48 = call i32 @genKey(i8* %3, i8** %47)
%49 = bitcast [16 x [8 x i8]]* %10 to i8**
%50 = call i32 @genKey(i8* %4, i8** %49)
%51 = icmp sgt i32 %1, 0
br i1 %51, label %52, label %69
52: ; preds = %42, %52
%53 = phi i32 [ %67, %52 ], [ %1, %42 ]
%54 = phi i8* [ %66, %52 ], [ %5, %42 ]
%55 = phi i8* [ %65, %52 ], [ %0, %42 ]
store i64 0, i64* %11
%56 = call i32 @llvm.smin.i32(i32 %53, i32 8)
%57 = zext i32 %56 to i64
%58 = call i32 @comDES(i8* %17, i8* %54, i8** %45, i32 1)
%59 = bitcast i8* %54 to i64*
%60 = load i64, i64* %59
store i64 %60, i64* %11
%61 = call i32 @comDES(i8* %17, i8* %54, i8** %47, i32 2)
%62 = bitcast i8* %54 to i64*
%63 = load i64, i64* %62
store i64 %63, i64* %11
%64 = call i32 @comDES(i8* %17, i8* %54, i8** %49, i32 1)
%65 = getelementptr inbounds i8, i8* %55, i64 8
%66 = getelementptr inbounds i8, i8* %54, i64 8
%67 = add nsw i32 %53, -8
%68 = icmp ugt i32 %53, 8
br i1 %68, label %52, label %69
69: ; preds = %52, %42, %7
%70 = phi i8 [ 0, %7 ], [ 1, %42 ], [ 1, %52 ]
ret i8 %70
}