#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 */
char *CopyStr(char *, char *);
int /*<<< orphan*/ DestroyString(char *);
char *GetNameValuePair(char const *, char *, char *, char **, char **);
int HashBytes(char **, char *, char *, int, int /*<<< orphan*/);
int HexStrToBytes(char **, char *);
char *SetStrLen(char *, int);
int /*<<< orphan*/ memcpy(char *, char *, int);
scalar_t__ strcasecmp(char *, char *);
int strlen(char *);
void InitialiseEncryptionComponents(const char *Args, char **Cipher,
                                    char **InputVector, int *IVLen, char **Key,
                                    int *KeyLen, int *Flags) {
  char *TmpKey = NULL, *Tempstr = NULL;
  int klen = 0, slen = 0;
  char *Name = NULL, *Value = NULL, *ptr;
  char *Salt = NULL;
  *IVLen = 0;
  ptr = GetNameValuePair(Args, "\\S", "=", &Name, &Value);
  while (ptr) {
    if ((Name ? strlen(Name) : 0)) {
      if (strcasecmp(Name, "Cipher") == 0) {
        *Cipher = CopyStr(*Cipher, Value);
      }
      if (strcasecmp(Name, "Key") == 0) {
        TmpKey = CopyStr(TmpKey, Value);
        klen = (TmpKey ? strlen(TmpKey) : 0);
      }
      if (strcasecmp(Name, "Salt") == 0) {
        Salt = CopyStr(Salt, Value);
        slen = (Salt ? strlen(Salt) : 0);
      }
      if ((strcasecmp(Name, "iv") == 0) ||
          (strcasecmp(Name, "InputVector") == 0)) {
        *InputVector = CopyStr(*InputVector, Value);
        *IVLen = (*InputVector ? strlen(*InputVector) : 0);
      }
      if (strcasecmp(Name, "HexKey") == 0) {
        klen = HexStrToBytes(&TmpKey, Value);
      }
      if ((strcasecmp(Name, "HexIV") == 0) ||
          (strcasecmp(Name, "HexInputVector") == 0)) {
        *IVLen = HexStrToBytes(InputVector, Value);
      }
      if (strcasecmp(Name, "PadBlock") == 0) {
        if (strcasecmp(Value, "N") == 0)
          *Flags |= 4;
      }
    }
    ptr = GetNameValuePair(ptr, "\\S", "=", &Name, &Value);
  }
  Tempstr = SetStrLen(Tempstr, klen + slen);
  memcpy(Tempstr, Salt, slen);
  memcpy(Tempstr + slen, TmpKey, klen);
  *KeyLen = HashBytes(Key, "md5", Tempstr, slen + klen, 0);
  DestroyString(Name);
  DestroyString(Value);
  DestroyString(Tempstr);
  DestroyString(TmpKey);
  DestroyString(Salt);
}


x86 assembly (clang, -O0):
<InitialiseEncryptionComponents>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
movq   $0x0,-0x50(%rbp)
movq   $0x0,-0x58(%rbp)
movq   $0x0,-0x68(%rbp)
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
lea    0xdfe(%rip),%rsi
lea    0xdfa(%rip),%rdx
lea    -0x50(%rbp),%rcx
lea    -0x58(%rbp),%r8
call   1060 <GetNameValuePair@plt>
mov    %rax,-0x60(%rbp)
cmpq   $0x0,-0x60(%rbp)
je     149f <InitialiseEncryptionComponents+0x30f>
cmpq   $0x0,-0x50(%rbp)
je     1247 <InitialiseEncryptionComponents+0xb7>
mov    -0x50(%rbp),%rdi
call   1070 <strlen@plt>
cmp    $0x0,%eax
jne    1256 <InitialiseEncryptionComponents+0xc6>
jmp    1477 <InitialiseEncryptionComponents+0x2e7>
xor    %eax,%eax
test   $0x1,%al
jne    1256 <InitialiseEncryptionComponents+0xc6>
jmp    1477 <InitialiseEncryptionComponents+0x2e7>
mov    -0x50(%rbp),%rdi
lea    0xda4(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    128a <InitialiseEncryptionComponents+0xfa>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x58(%rbp),%rsi
call   1090 <CopyStr@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x50(%rbp),%rdi
lea    0xd82(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    12e1 <InitialiseEncryptionComponents+0x151>
mov    -0x38(%rbp),%rdi
mov    -0x58(%rbp),%rsi
call   1090 <CopyStr@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     12d1 <InitialiseEncryptionComponents+0x141>
mov    -0x38(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,-0x6c(%rbp)
jmp    12db <InitialiseEncryptionComponents+0x14b>
xor    %eax,%eax
mov    %eax,-0x6c(%rbp)
jmp    12db <InitialiseEncryptionComponents+0x14b>
mov    -0x6c(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x50(%rbp),%rdi
lea    0xd20(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    1338 <InitialiseEncryptionComponents+0x1a8>
mov    -0x68(%rbp),%rdi
mov    -0x58(%rbp),%rsi
call   1090 <CopyStr@plt>
mov    %rax,-0x68(%rbp)
cmpq   $0x0,-0x68(%rbp)
je     1328 <InitialiseEncryptionComponents+0x198>
mov    -0x68(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,-0x70(%rbp)
jmp    1332 <InitialiseEncryptionComponents+0x1a2>
xor    %eax,%eax
mov    %eax,-0x70(%rbp)
jmp    1332 <InitialiseEncryptionComponents+0x1a2>
mov    -0x70(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x50(%rbp),%rdi
lea    0xcce(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
je     136c <InitialiseEncryptionComponents+0x1dc>
mov    -0x50(%rbp),%rdi
lea    0xcc7(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    13bb <InitialiseEncryptionComponents+0x22b>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    -0x58(%rbp),%rsi
call   1090 <CopyStr@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     13a8 <InitialiseEncryptionComponents+0x218>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1070 <strlen@plt>
mov    %eax,-0x74(%rbp)
jmp    13b2 <InitialiseEncryptionComponents+0x222>
xor    %eax,%eax
mov    %eax,-0x74(%rbp)
jmp    13b2 <InitialiseEncryptionComponents+0x222>
mov    -0x74(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x50(%rbp),%rdi
lea    0xc4e(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    13e5 <InitialiseEncryptionComponents+0x255>
mov    -0x58(%rbp),%rsi
lea    -0x38(%rbp),%rdi
call   10b0 <HexStrToBytes@plt>
mov    %eax,-0x44(%rbp)
mov    -0x50(%rbp),%rdi
lea    0xc2b(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
je     1419 <InitialiseEncryptionComponents+0x289>
mov    -0x50(%rbp),%rdi
lea    0xc17(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    142e <InitialiseEncryptionComponents+0x29e>
mov    -0x18(%rbp),%rdi
mov    -0x58(%rbp),%rsi
call   10b0 <HexStrToBytes@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x50(%rbp),%rdi
lea    0xbf7(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    1472 <InitialiseEncryptionComponents+0x2e2>
mov    -0x58(%rbp),%rdi
lea    0xbe6(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    146d <InitialiseEncryptionComponents+0x2dd>
mov    0x10(%rbp),%rax
mov    (%rax),%ecx
or     $0x4,%ecx
mov    %ecx,(%rax)
jmp    1472 <InitialiseEncryptionComponents+0x2e2>
jmp    1477 <InitialiseEncryptionComponents+0x2e7>
mov    -0x60(%rbp),%rdi
lea    0xb7e(%rip),%rsi
lea    0xb7a(%rip),%rdx
lea    -0x50(%rbp),%rcx
lea    -0x58(%rbp),%r8
call   1060 <GetNameValuePair@plt>
mov    %rax,-0x60(%rbp)
jmp    121a <InitialiseEncryptionComponents+0x8a>
mov    -0x40(%rbp),%rdi
mov    -0x44(%rbp),%esi
add    -0x48(%rbp),%esi
call   1040 <SetStrLen@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    -0x48(%rbp),%edx
call   10a0 <memcpy@plt>
mov    -0x40(%rbp),%rdi
movslq -0x48(%rbp),%rax
add    %rax,%rdi
mov    -0x38(%rbp),%rsi
mov    -0x44(%rbp),%edx
call   10a0 <memcpy@plt>
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%ecx
add    -0x44(%rbp),%ecx
lea    0xb4d(%rip),%rsi
xor    %r8d,%r8d
call   1050 <HashBytes@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x50(%rbp),%rdi
call   1080 <DestroyString@plt>
mov    -0x58(%rbp),%rdi
call   1080 <DestroyString@plt>
mov    -0x40(%rbp),%rdi
call   1080 <DestroyString@plt>
mov    -0x38(%rbp),%rdi
call   1080 <DestroyString@plt>
mov    -0x68(%rbp),%rdi
call   1080 <DestroyString@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitialiseEncryptionComponents>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9,0x38(%rsp)
mov    %r8,0x30(%rsp)
mov    %rdx,%r12
mov    %rsi,0x40(%rsp)
movq   $0x0,0x18(%rsp)
movq   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
mov    %rcx,0x28(%rsp)
movl   $0x0,(%rcx)
lea    0xe24(%rip),%rsi
lea    0xe20(%rip),%rdx
mov    %rsp,%rcx
lea    0x8(%rsp),%r8
call   1060 <GetNameValuePair@plt>
test   %rax,%rax
je     1439 <InitialiseEncryptionComponents+0x2a9>
mov    %rax,%r14
xor    %r13d,%r13d
lea    0xdfa(%rip),%r15
lea    0xdf6(%rip),%rbx
mov    %rsp,%rbp
xor    %eax,%eax
mov    %rax,0x20(%rsp)
xor    %eax,%eax
mov    %rax,0x10(%rsp)
jmp    1253 <InitialiseEncryptionComponents+0xc3>
lea    0xdd9(%rip),%r15
lea    0xdd5(%rip),%rbx
mov    %rsp,%rbp
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
mov    %rbp,%rcx
lea    0x8(%rsp),%r8
call   1060 <GetNameValuePair@plt>
mov    %rax,%r14
test   %rax,%rax
je     144a <InitialiseEncryptionComponents+0x2ba>
mov    (%rsp),%rdi
test   %rdi,%rdi
je     1231 <InitialiseEncryptionComponents+0xa1>
call   1070 <strlen@plt>
test   %eax,%eax
je     1231 <InitialiseEncryptionComponents+0xa1>
mov    (%rsp),%rbp
mov    %rbp,%rdi
lea    0xd92(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %rax,%rax
jne    1298 <InitialiseEncryptionComponents+0x108>
mov    0x40(%rsp),%rbp
mov    0x0(%rbp),%rdi
mov    0x8(%rsp),%rsi
call   1090 <CopyStr@plt>
mov    %rax,0x0(%rbp)
mov    (%rsp),%rbp
mov    %rbp,%rdi
lea    0xd75(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %rax,%rax
jne    12d6 <InitialiseEncryptionComponents+0x146>
mov    0x18(%rsp),%rdi
mov    0x8(%rsp),%rsi
call   1090 <CopyStr@plt>
mov    %rax,0x18(%rsp)
test   %rax,%rax
je     12cf <InitialiseEncryptionComponents+0x13f>
mov    %rax,%rdi
call   1070 <strlen@plt>
jmp    12d1 <InitialiseEncryptionComponents+0x141>
xor    %eax,%eax
mov    %rax,0x10(%rsp)
mov    (%rsp),%rdi
lea    0xd2b(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %rax,%rax
jne    1320 <InitialiseEncryptionComponents+0x190>
mov    0x8(%rsp),%rsi
mov    %r13,%rdi
call   1090 <CopyStr@plt>
test   %rax,%rax
je     130f <InitialiseEncryptionComponents+0x17f>
mov    %rax,%r13
mov    %rax,%rdi
call   1070 <strlen@plt>
mov    %rax,0x20(%rsp)
jmp    1320 <InitialiseEncryptionComponents+0x190>
xor    %eax,%eax
mov    %rax,0x20(%rsp)
xor    %r13d,%r13d
nopl   0x0(%rax)
mov    (%rsp),%r15
mov    %r15,%rdi
lea    0xce3(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     134c <InitialiseEncryptionComponents+0x1bc>
mov    %r15,%rdi
lea    0xce2(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %rax,%rax
jne    137a <InitialiseEncryptionComponents+0x1ea>
mov    (%r12),%rdi
mov    0x8(%rsp),%rsi
call   1090 <CopyStr@plt>
mov    %rax,(%r12)
test   %rax,%rax
je     136d <InitialiseEncryptionComponents+0x1dd>
mov    %rax,%rdi
call   1070 <strlen@plt>
jmp    136f <InitialiseEncryptionComponents+0x1df>
xor    %eax,%eax
mov    0x28(%rsp),%rcx
mov    %eax,(%rcx)
mov    (%rsp),%r15
mov    %r15,%rdi
lea    0xc90(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %rax,%rax
jne    13a6 <InitialiseEncryptionComponents+0x216>
mov    0x8(%rsp),%rsi
lea    0x18(%rsp),%rdi
call   10b0 <HexStrToBytes@plt>
mov    %rax,0x10(%rsp)
mov    (%rsp),%r15
mov    %r15,%rdi
lea    0xc6b(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     13ce <InitialiseEncryptionComponents+0x23e>
mov    %r15,%rdi
lea    0xc5d(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %rax,%rax
jne    13e6 <InitialiseEncryptionComponents+0x256>
mov    0x8(%rsp),%rsi
mov    %r12,%rdi
call   10b0 <HexStrToBytes@plt>
mov    0x28(%rsp),%rcx
mov    %eax,(%rcx)
mov    (%rsp),%r15
mov    %r15,%rdi
lea    0xc40(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %rax,%rax
jne    1220 <InitialiseEncryptionComponents+0x90>
mov    0x8(%rsp),%rdi
lea    0xc2f(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %rax,%rax
lea    0xbe7(%rip),%r15
lea    0xbe3(%rip),%rbx
mov    %rsp,%rbp
jne    1231 <InitialiseEncryptionComponents+0xa1>
mov    0x80(%rsp),%rax
orb    $0x4,(%rax)
jmp    1231 <InitialiseEncryptionComponents+0xa1>
xor    %eax,%eax
mov    %rax,0x10(%rsp)
xor    %eax,%eax
mov    %rax,0x20(%rsp)
xor    %r13d,%r13d
mov    0x20(%rsp),%rbp
mov    0x10(%rsp),%r15
lea    (%r15,%rbp,1),%r14d
xor    %edi,%edi
mov    %r14d,%esi
call   1040 <SetStrLen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r13,%rsi
mov    %ebp,%edx
call   10a0 <memcpy@plt>
movslq %ebp,%rdi
add    %rbx,%rdi
mov    0x18(%rsp),%rsi
mov    %r15d,%edx
call   10a0 <memcpy@plt>
lea    0xbaf(%rip),%rsi
mov    0x30(%rsp),%rdi
mov    %rbx,%rdx
mov    %r14d,%ecx
xor    %r8d,%r8d
call   1050 <HashBytes@plt>
mov    0x38(%rsp),%rcx
mov    %eax,(%rcx)
mov    (%rsp),%rdi
call   1080 <DestroyString@plt>
mov    0x8(%rsp),%rdi
call   1080 <DestroyString@plt>
mov    %rbx,%rdi
call   1080 <DestroyString@plt>
mov    0x18(%rsp),%rdi
call   1080 <DestroyString@plt>
mov    %r13,%rdi
call   1080 <DestroyString@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"\\S\00"
@.str.1 = [2 x i8] c"=\00"
@.str.2 = [7 x i8] c"Cipher\00"
@.str.3 = [4 x i8] c"Key\00"
@.str.4 = [5 x i8] c"Salt\00"
@.str.5 = [3 x i8] c"iv\00"
@.str.6 = [12 x i8] c"InputVector\00"
@.str.7 = [7 x i8] c"HexKey\00"
@.str.8 = [6 x i8] c"HexIV\00"
@.str.9 = [15 x i8] c"HexInputVector\00"
@.str.10 = [9 x i8] c"PadBlock\00"
@.str.11 = [2 x i8] c"N\00"
@.str.12 = [4 x i8] c"md5\00"
define void @InitialiseEncryptionComponents(i8* %0, i8** nocapture %1, i8** %2, i32* nocapture writeonly %3, i8** %4, i32* nocapture writeonly %5, i32* nocapture %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = bitcast i8** %8 to i8*
store i8* null, i8** %8
%12 = bitcast i8** %9 to i8*
store i8* null, i8** %9
%13 = bitcast i8** %10 to i8*
store i8* null, i8** %10
store i32 0, i32* %3
%14 = call i8* @GetNameValuePair(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %9, i8** %10)
%15 = icmp eq i8* %14, null
br i1 %15, label %113, label %16
16: ; preds = %7, %107
%17 = phi i8* [ %110, %107 ], [ null, %7 ]
%18 = phi i8* [ %111, %107 ], [ %14, %7 ]
%19 = phi i32 [ %109, %107 ], [ 0, %7 ]
%20 = phi i32 [ %108, %107 ], [ 0, %7 ]
%21 = load i8*, i8** %9
%22 = icmp eq i8* %21, null
br i1 %22, label %107, label %23
23: ; preds = %16
%24 = call i32 @strlen(i8* %21)
%25 = icmp eq i32 %24, 0
br i1 %25, label %107, label %26
26: ; preds = %23
%27 = load i8*, i8** %9
%28 = call i64 @strcasecmp(i8* %27, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %35
30: ; preds = %26
%31 = load i8*, i8** %1
%32 = load i8*, i8** %10
%33 = call i8* @CopyStr(i8* %31, i8* %32)
store i8* %33, i8** %1
%34 = load i8*, i8** %9
br label %35
35: ; preds = %30, %26
%36 = phi i8* [ %34, %30 ], [ %27, %26 ]
%37 = call i64 @strcasecmp(i8* %36, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %46
39: ; preds = %35
%40 = load i8*, i8** %8
%41 = load i8*, i8** %10
%42 = call i8* @CopyStr(i8* %40, i8* %41)
store i8* %42, i8** %8
%43 = icmp eq i8* %42, null
br i1 %43, label %46, label %44
44: ; preds = %39
%45 = call i32 @strlen(i8* %42)
br label %46
46: ; preds = %44, %39, %35
%47 = phi i32 [ %20, %35 ], [ %45, %44 ], [ 0, %39 ]
%48 = load i8*, i8** %9
%49 = call i64 @strcasecmp(i8* %48, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %57
51: ; preds = %46
%52 = load i8*, i8** %10
%53 = call i8* @CopyStr(i8* %17, i8* %52)
%54 = icmp eq i8* %53, null
br i1 %54, label %57, label %55
55: ; preds = %51
%56 = call i32 @strlen(i8* %53)
br label %57
57: ; preds = %55, %51, %46
%58 = phi i32 [ %19, %46 ], [ %56, %55 ], [ 0, %51 ]
%59 = phi i8* [ %17, %46 ], [ %53, %55 ], [ null, %51 ]
%60 = load i8*, i8** %9
%61 = call i64 @strcasecmp(i8* %60, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%62 = icmp eq i64 %61, 0
br i1 %62, label %66, label %63
63: ; preds = %57
%64 = call i64 @strcasecmp(i8* %60, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
%65 = icmp eq i64 %64, 0
br i1 %65, label %66, label %76
66: ; preds = %63, %57
%67 = load i8*, i8** %2
%68 = load i8*, i8** %10
%69 = call i8* @CopyStr(i8* %67, i8* %68)
store i8* %69, i8** %2
%70 = icmp eq i8* %69, null
br i1 %70, label %73, label %71
71: ; preds = %66
%72 = call i32 @strlen(i8* %69)
br label %73
73: ; preds = %66, %71
%74 = phi i32 [ %72, %71 ], [ 0, %66 ]
store i32 %74, i32* %3
%75 = load i8*, i8** %9
br label %76
76: ; preds = %73, %63
%77 = phi i8* [ %75, %73 ], [ %60, %63 ]
%78 = call i64 @strcasecmp(i8* %77, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%79 = icmp eq i64 %78, 0
br i1 %79, label %80, label %84
80: ; preds = %76
%81 = load i8*, i8** %10
%82 = call i32 @HexStrToBytes(i8** %8, i8* %81)
%83 = load i8*, i8** %9
br label %84
84: ; preds = %80, %76
%85 = phi i8* [ %83, %80 ], [ %77, %76 ]
%86 = phi i32 [ %82, %80 ], [ %47, %76 ]
%87 = call i64 @strcasecmp(i8* %85, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%88 = icmp eq i64 %87, 0
br i1 %88, label %92, label %89
89: ; preds = %84
%90 = call i64 @strcasecmp(i8* %85, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0))
%91 = icmp eq i64 %90, 0
br i1 %91, label %92, label %96
92: ; preds = %89, %84
%93 = load i8*, i8** %10
%94 = call i32 @HexStrToBytes(i8** %2, i8* %93)
store i32 %94, i32* %3
%95 = load i8*, i8** %9
br label %96
96: ; preds = %92, %89
%97 = phi i8* [ %95, %92 ], [ %85, %89 ]
%98 = call i64 @strcasecmp(i8* %97, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
%99 = icmp eq i64 %98, 0
br i1 %99, label %100, label %107
100: ; preds = %96
%101 = load i8*, i8** %10
%102 = call i64 @strcasecmp(i8* %101, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%103 = icmp eq i64 %102, 0
br i1 %103, label %104, label %107
104: ; preds = %100
%105 = load i32, i32* %6
%106 = or i32 %105, 4
store i32 %106, i32* %6
br label %107
107: ; preds = %96, %104, %100, %16, %23
%108 = phi i32 [ %86, %104 ], [ %86, %100 ], [ %86, %96 ], [ %20, %23 ], [ %20, %16 ]
%109 = phi i32 [ %58, %104 ], [ %58, %100 ], [ %58, %96 ], [ %19, %23 ], [ %19, %16 ]
%110 = phi i8* [ %59, %104 ], [ %59, %100 ], [ %59, %96 ], [ %17, %23 ], [ %17, %16 ]
%111 = call i8* @GetNameValuePair(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %9, i8** %10)
%112 = icmp eq i8* %111, null
br i1 %112, label %113, label %16
113: ; preds = %107, %7
%114 = phi i32 [ 0, %7 ], [ %108, %107 ]
%115 = phi i32 [ 0, %7 ], [ %109, %107 ]
%116 = phi i8* [ null, %7 ], [ %110, %107 ]
%117 = add nsw i32 %115, %114
%118 = call i8* @SetStrLen(i8* null, i32 %117)
%119 = call i32 @memcpy(i8* %118, i8* %116, i32 %115)
%120 = sext i32 %115 to i64
%121 = getelementptr inbounds i8, i8* %118, i64 %120
%122 = load i8*, i8** %8
%123 = call i32 @memcpy(i8* %121, i8* %122, i32 %114)
%124 = call i32 @HashBytes(i8** %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8* %118, i32 %117, i32 0)
store i32 %124, i32* %5
%125 = load i8*, i8** %9
%126 = call i32 @DestroyString(i8* %125)
%127 = load i8*, i8** %10
%128 = call i32 @DestroyString(i8* %127)
%129 = call i32 @DestroyString(i8* %118)
%130 = load i8*, i8** %8
%131 = call i32 @DestroyString(i8* %130)
%132 = call i32 @DestroyString(i8* %116)
ret void
}