#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 */
typedef unsigned long BF_LONG;
typedef int /*<<< orphan*/ BF_KEY;

/* Variables and functions */
int /*<<< orphan*/ BF_decrypt(unsigned long *, int /*<<< orphan*/ const *);
int /*<<< orphan*/ BF_encrypt(unsigned long *, int /*<<< orphan*/ const *);
void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
                    const BF_KEY *schedule, unsigned char *ivec, int encrypt) {
  register BF_LONG tin0, tin1;
  register BF_LONG tout0, tout1, xor0, xor1;
  register long l = length;
  BF_LONG tin[2];
  if (encrypt) {
    (tout0 = ((unsigned long)(*((ivec)++))) << 24L,
     tout0 |= ((unsigned long)(*((ivec)++))) << 16L,
     tout0 |= ((unsigned long)(*((ivec)++))) << 8L,
     tout0 |= ((unsigned long)(*((ivec)++))));
    (tout1 = ((unsigned long)(*((ivec)++))) << 24L,
     tout1 |= ((unsigned long)(*((ivec)++))) << 16L,
     tout1 |= ((unsigned long)(*((ivec)++))) << 8L,
     tout1 |= ((unsigned long)(*((ivec)++))));
    ivec -= 8;
    for (l -= 8; l >= 0; l -= 8) {
      (tin0 = ((unsigned long)(*((in)++))) << 24L,
       tin0 |= ((unsigned long)(*((in)++))) << 16L,
       tin0 |= ((unsigned long)(*((in)++))) << 8L,
       tin0 |= ((unsigned long)(*((in)++))));
      (tin1 = ((unsigned long)(*((in)++))) << 24L,
       tin1 |= ((unsigned long)(*((in)++))) << 16L,
       tin1 |= ((unsigned long)(*((in)++))) << 8L,
       tin1 |= ((unsigned long)(*((in)++))));
      tin0 ^= tout0;
      tin1 ^= tout1;
      tin[0] = tin0;
      tin[1] = tin1;
      BF_encrypt(tin, schedule);
      tout0 = tin[0];
      tout1 = tin[1];
      (*((out)++) = (unsigned char)(((tout0) >> 24L) & 0xff),
       *((out)++) = (unsigned char)(((tout0) >> 16L) & 0xff),
       *((out)++) = (unsigned char)(((tout0) >> 8L) & 0xff),
       *((out)++) = (unsigned char)(((tout0)) & 0xff));
      (*((out)++) = (unsigned char)(((tout1) >> 24L) & 0xff),
       *((out)++) = (unsigned char)(((tout1) >> 16L) & 0xff),
       *((out)++) = (unsigned char)(((tout1) >> 8L) & 0xff),
       *((out)++) = (unsigned char)(((tout1)) & 0xff));
    }
    if (l != -8) {
      {
        in += l + 8;
        tin0 = tin1 = 0;
        switch (l + 8) {
        case 8:
          tin1 = ((unsigned long)(*(--(in))));
        case 7:
          tin1 |= ((unsigned long)(*(--(in)))) << 8;
        case 6:
          tin1 |= ((unsigned long)(*(--(in)))) << 16;
        case 5:
          tin1 |= ((unsigned long)(*(--(in)))) << 24;
        case 4:
          tin0 = ((unsigned long)(*(--(in))));
        case 3:
          tin0 |= ((unsigned long)(*(--(in)))) << 8;
        case 2:
          tin0 |= ((unsigned long)(*(--(in)))) << 16;
        case 1:
          tin0 |= ((unsigned long)(*(--(in)))) << 24;
        }
      };
      tin0 ^= tout0;
      tin1 ^= tout1;
      tin[0] = tin0;
      tin[1] = tin1;
      BF_encrypt(tin, schedule);
      tout0 = tin[0];
      tout1 = tin[1];
      (*((out)++) = (unsigned char)(((tout0) >> 24L) & 0xff),
       *((out)++) = (unsigned char)(((tout0) >> 16L) & 0xff),
       *((out)++) = (unsigned char)(((tout0) >> 8L) & 0xff),
       *((out)++) = (unsigned char)(((tout0)) & 0xff));
      (*((out)++) = (unsigned char)(((tout1) >> 24L) & 0xff),
       *((out)++) = (unsigned char)(((tout1) >> 16L) & 0xff),
       *((out)++) = (unsigned char)(((tout1) >> 8L) & 0xff),
       *((out)++) = (unsigned char)(((tout1)) & 0xff));
    }
    (*((ivec)++) = (unsigned char)(((tout0) >> 24L) & 0xff),
     *((ivec)++) = (unsigned char)(((tout0) >> 16L) & 0xff),
     *((ivec)++) = (unsigned char)(((tout0) >> 8L) & 0xff),
     *((ivec)++) = (unsigned char)(((tout0)) & 0xff));
    (*((ivec)++) = (unsigned char)(((tout1) >> 24L) & 0xff),
     *((ivec)++) = (unsigned char)(((tout1) >> 16L) & 0xff),
     *((ivec)++) = (unsigned char)(((tout1) >> 8L) & 0xff),
     *((ivec)++) = (unsigned char)(((tout1)) & 0xff));
  } else {
    (xor0 = ((unsigned long)(*((ivec)++))) << 24L,
     xor0 |= ((unsigned long)(*((ivec)++))) << 16L,
     xor0 |= ((unsigned long)(*((ivec)++))) << 8L,
     xor0 |= ((unsigned long)(*((ivec)++))));
    (xor1 = ((unsigned long)(*((ivec)++))) << 24L,
     xor1 |= ((unsigned long)(*((ivec)++))) << 16L,
     xor1 |= ((unsigned long)(*((ivec)++))) << 8L,
     xor1 |= ((unsigned long)(*((ivec)++))));
    ivec -= 8;
    for (l -= 8; l >= 0; l -= 8) {
      (tin0 = ((unsigned long)(*((in)++))) << 24L,
       tin0 |= ((unsigned long)(*((in)++))) << 16L,
       tin0 |= ((unsigned long)(*((in)++))) << 8L,
       tin0 |= ((unsigned long)(*((in)++))));
      (tin1 = ((unsigned long)(*((in)++))) << 24L,
       tin1 |= ((unsigned long)(*((in)++))) << 16L,
       tin1 |= ((unsigned long)(*((in)++))) << 8L,
       tin1 |= ((unsigned long)(*((in)++))));
      tin[0] = tin0;
      tin[1] = tin1;
      BF_decrypt(tin, schedule);
      tout0 = tin[0] ^ xor0;
      tout1 = tin[1] ^ xor1;
      (*((out)++) = (unsigned char)(((tout0) >> 24L) & 0xff),
       *((out)++) = (unsigned char)(((tout0) >> 16L) & 0xff),
       *((out)++) = (unsigned char)(((tout0) >> 8L) & 0xff),
       *((out)++) = (unsigned char)(((tout0)) & 0xff));
      (*((out)++) = (unsigned char)(((tout1) >> 24L) & 0xff),
       *((out)++) = (unsigned char)(((tout1) >> 16L) & 0xff),
       *((out)++) = (unsigned char)(((tout1) >> 8L) & 0xff),
       *((out)++) = (unsigned char)(((tout1)) & 0xff));
      xor0 = tin0;
      xor1 = tin1;
    }
    if (l != -8) {
      (tin0 = ((unsigned long)(*((in)++))) << 24L,
       tin0 |= ((unsigned long)(*((in)++))) << 16L,
       tin0 |= ((unsigned long)(*((in)++))) << 8L,
       tin0 |= ((unsigned long)(*((in)++))));
      (tin1 = ((unsigned long)(*((in)++))) << 24L,
       tin1 |= ((unsigned long)(*((in)++))) << 16L,
       tin1 |= ((unsigned long)(*((in)++))) << 8L,
       tin1 |= ((unsigned long)(*((in)++))));
      tin[0] = tin0;
      tin[1] = tin1;
      BF_decrypt(tin, schedule);
      tout0 = tin[0] ^ xor0;
      tout1 = tin[1] ^ xor1;
      {
        out += l + 8;
        switch (l + 8) {
        case 8:
          *(--(out)) = (unsigned char)(((tout1)) & 0xff);
        case 7:
          *(--(out)) = (unsigned char)(((tout1) >> 8) & 0xff);
        case 6:
          *(--(out)) = (unsigned char)(((tout1) >> 16) & 0xff);
        case 5:
          *(--(out)) = (unsigned char)(((tout1) >> 24) & 0xff);
        case 4:
          *(--(out)) = (unsigned char)(((tout0)) & 0xff);
        case 3:
          *(--(out)) = (unsigned char)(((tout0) >> 8) & 0xff);
        case 2:
          *(--(out)) = (unsigned char)(((tout0) >> 16) & 0xff);
        case 1:
          *(--(out)) = (unsigned char)(((tout0) >> 24) & 0xff);
        }
      };
      xor0 = tin0;
      xor1 = tin1;
    }
    (*((ivec)++) = (unsigned char)(((xor0) >> 24L) & 0xff),
     *((ivec)++) = (unsigned char)(((xor0) >> 16L) & 0xff),
     *((ivec)++) = (unsigned char)(((xor0) >> 8L) & 0xff),
     *((ivec)++) = (unsigned char)(((xor0)) & 0xff));
    (*((ivec)++) = (unsigned char)(((xor1) >> 24L) & 0xff),
     *((ivec)++) = (unsigned char)(((xor1) >> 16L) & 0xff),
     *((ivec)++) = (unsigned char)(((xor1) >> 8L) & 0xff),
     *((ivec)++) = (unsigned char)(((xor1)) & 0xff));
  }
  tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0;
  tin[0] = tin[1] = 0;
}


x86 assembly (clang, -O0):
<BF_cbc_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x68(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     181c <BF_cbc_encrypt+0x6fc>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movzbl (%rax),%eax
shl    $0x18,%rax
mov    %rax,-0x48(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movzbl (%rax),%eax
shl    $0x10,%rax
or     -0x48(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movzbl (%rax),%eax
shl    $0x8,%rax
or     -0x48(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movzbl (%rax),%eax
or     -0x48(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movzbl (%rax),%eax
shl    $0x18,%rax
mov    %rax,-0x50(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movzbl (%rax),%eax
shl    $0x10,%rax
or     -0x50(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movzbl (%rax),%eax
shl    $0x8,%rax
or     -0x50(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movzbl (%rax),%eax
or     -0x50(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x28(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x28(%rbp)
mov    -0x68(%rbp),%rax
sub    $0x8,%rax
mov    %rax,-0x68(%rbp)
cmpq   $0x0,-0x68(%rbp)
jl     148e <BF_cbc_encrypt+0x36e>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
shl    $0x18,%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
shl    $0x10,%rax
or     -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
shl    $0x8,%rax
or     -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
or     -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
shl    $0x18,%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
shl    $0x10,%rax
or     -0x40(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
shl    $0x8,%rax
or     -0x40(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
or     -0x40(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x48(%rbp),%rax
xor    -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x50(%rbp),%rax
xor    -0x40(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x78(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <BF_encrypt@plt>
mov    -0x80(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x78(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x48(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x48(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x48(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x48(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x50(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x50(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x50(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x50(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x68(%rbp),%rax
sub    $0x8,%rax
mov    %rax,-0x68(%rbp)
jmp    124d <BF_cbc_encrypt+0x12d>
cmpq   $0xfffffffffffffff8,-0x68(%rbp)
je     1717 <BF_cbc_encrypt+0x5f7>
mov    -0x68(%rbp),%rax
mov    -0x8(%rbp),%rcx
lea    0x8(%rax,%rcx,1),%rax
mov    %rax,-0x8(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x38(%rbp)
mov    -0x68(%rbp),%rax
add    $0x7,%rax
mov    %rax,-0x88(%rbp)
sub    $0x7,%rax
ja     15d2 <BF_cbc_encrypt+0x4b2>
mov    -0x88(%rbp),%rax
lea    0xb3f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x8(%rbp)
movzbl -0x1(%rax),%eax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x8(%rbp)
movzbl -0x1(%rax),%eax
shl    $0x8,%rax
or     -0x40(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x8(%rbp)
movzbl -0x1(%rax),%eax
shl    $0x10,%rax
or     -0x40(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x8(%rbp)
movzbl -0x1(%rax),%eax
shl    $0x18,%rax
or     -0x40(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x8(%rbp)
movzbl -0x1(%rax),%eax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x8(%rbp)
movzbl -0x1(%rax),%eax
shl    $0x8,%rax
or     -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x8(%rbp)
movzbl -0x1(%rax),%eax
shl    $0x10,%rax
or     -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x8(%rbp)
movzbl -0x1(%rax),%eax
shl    $0x18,%rax
or     -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x48(%rbp),%rax
xor    -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x50(%rbp),%rax
xor    -0x40(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x78(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <BF_encrypt@plt>
mov    -0x80(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x78(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x48(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x48(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x48(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x48(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x50(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x50(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x50(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x50(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x48(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x48(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x48(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x48(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x50(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x50(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x50(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x50(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
jmp    1ef2 <BF_cbc_encrypt+0xdd2>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movzbl (%rax),%eax
shl    $0x18,%rax
mov    %rax,-0x58(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movzbl (%rax),%eax
shl    $0x10,%rax
or     -0x58(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movzbl (%rax),%eax
shl    $0x8,%rax
or     -0x58(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movzbl (%rax),%eax
or     -0x58(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movzbl (%rax),%eax
shl    $0x18,%rax
mov    %rax,-0x60(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movzbl (%rax),%eax
shl    $0x10,%rax
or     -0x60(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movzbl (%rax),%eax
shl    $0x8,%rax
or     -0x60(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movzbl (%rax),%eax
or     -0x60(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x28(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x28(%rbp)
mov    -0x68(%rbp),%rax
sub    $0x8,%rax
mov    %rax,-0x68(%rbp)
cmpq   $0x0,-0x68(%rbp)
jl     1b55 <BF_cbc_encrypt+0xa35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
shl    $0x18,%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
shl    $0x10,%rax
or     -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
shl    $0x8,%rax
or     -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
or     -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
shl    $0x18,%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
shl    $0x10,%rax
or     -0x40(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
shl    $0x8,%rax
or     -0x40(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
or     -0x40(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x78(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <BF_decrypt@plt>
mov    -0x80(%rbp),%rax
xor    -0x58(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x78(%rbp),%rax
xor    -0x60(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x48(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x48(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x48(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x48(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x50(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x50(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x50(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x50(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x38(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x68(%rbp),%rax
sub    $0x8,%rax
mov    %rax,-0x68(%rbp)
jmp    1914 <BF_cbc_encrypt+0x7f4>
cmpq   $0xfffffffffffffff8,-0x68(%rbp)
je     1df2 <BF_cbc_encrypt+0xcd2>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
shl    $0x18,%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %eax,%ecx
shl    $0x10,%rcx
mov    -0x38(%rbp),%rax
or     %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %eax,%ecx
shl    $0x8,%rcx
mov    -0x38(%rbp),%rax
or     %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %eax,%ecx
mov    -0x38(%rbp),%rax
or     %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
shl    $0x18,%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %eax,%ecx
shl    $0x10,%rcx
mov    -0x40(%rbp),%rax
or     %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %eax,%ecx
shl    $0x8,%rcx
mov    -0x40(%rbp),%rax
or     %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %eax,%ecx
mov    -0x40(%rbp),%rax
or     %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x20(%rbp),%rsi
lea    -0x80(%rbp),%rdi
call   1040 <BF_decrypt@plt>
mov    -0x80(%rbp),%rax
mov    -0x58(%rbp),%rcx
xor    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x78(%rbp),%rax
mov    -0x60(%rbp),%rcx
xor    %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x68(%rbp),%rax
mov    -0x10(%rbp),%rcx
lea    0x8(%rax,%rcx,1),%rax
mov    %rax,-0x10(%rbp)
mov    -0x68(%rbp),%rax
add    $0x7,%rax
mov    %rax,-0x90(%rbp)
sub    $0x7,%rax
ja     1de2 <BF_cbc_encrypt+0xcc2>
mov    -0x90(%rbp),%rax
lea    0x32f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x50(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,-0x1(%rax)
mov    -0x50(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,-0x1(%rax)
mov    -0x50(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,-0x1(%rax)
mov    -0x50(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,-0x1(%rax)
mov    -0x48(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,-0x1(%rax)
mov    -0x48(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,-0x1(%rax)
mov    -0x48(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,-0x1(%rax)
mov    -0x48(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,-0x1(%rax)
mov    -0x38(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x58(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x58(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x58(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x58(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x60(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x60(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x60(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x60(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
movq   $0x0,-0x60(%rbp)
movq   $0x0,-0x58(%rbp)
movq   $0x0,-0x50(%rbp)
movq   $0x0,-0x48(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x78(%rbp)
movq   $0x0,-0x80(%rbp)
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BF_cbc_encrypt>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rcx,%r10
mov    %rdx,%r14
mov    %rsi,%rbp
mov    %rdi,%r15
mov    (%r8),%ebx
mov    %r8,0x18(%rsp)
mov    0x4(%r8),%edx
shl    $0x20,%rbx
bswap  %rbx
shl    $0x20,%rdx
bswap  %rdx
test   %r9d,%r9d
mov    %rcx,0x20(%rsp)
je     1304 <BF_cbc_encrypt+0x1e4>
cmp    $0x8,%r14
jl     11fa <BF_cbc_encrypt+0xda>
mov    %rsp,%r13
nop
mov    %r14,%r12
add    $0xfffffffffffffff8,%r14
mov    (%r15),%eax
mov    0x4(%r15),%ecx
shl    $0x20,%rax
bswap  %rax
xor    %rbx,%rax
shl    $0x20,%rcx
bswap  %rcx
add    $0x8,%r15
xor    %rdx,%rcx
mov    %rax,(%rsp)
mov    %rcx,0x8(%rsp)
mov    %r13,%rdi
mov    %r10,%rsi
call   1030 <BF_encrypt@plt>
mov    0x20(%rsp),%r10
mov    (%rsp),%rbx
mov    0x8(%rsp),%rdx
mov    %rbx,%rax
shr    $0x18,%rax
mov    %al,0x0(%rbp)
mov    %rbx,%rax
shr    $0x10,%rax
mov    %al,0x1(%rbp)
mov    %bh,0x2(%rbp)
mov    %bl,0x3(%rbp)
mov    %rdx,%rax
shr    $0x18,%rax
mov    %al,0x4(%rbp)
mov    %rdx,%rax
shr    $0x10,%rax
mov    %al,0x5(%rbp)
mov    %dh,0x6(%rbp)
mov    %dl,0x7(%rbp)
add    $0x8,%rbp
cmp    $0xf,%r12
ja     1170 <BF_cbc_encrypt+0x50>
test   %r14,%r14
je     1490 <BF_cbc_encrypt+0x370>
xor    %eax,%eax
lea    -0x1(%r14),%rcx
cmp    $0x6,%rcx
ja     14f5 <BF_cbc_encrypt+0x3d5>
mov    %rdx,%rdi
add    %r14,%r15
lea    0xde0(%rip),%rdx
movslq (%rdx,%rcx,4),%rsi
add    %rdx,%rsi
xor    %ecx,%ecx
jmp    *%rsi
movzbl -0x1(%r15),%eax
add    $0xffffffffffffffff,%r15
shl    $0x8,%rax
movzbl -0x1(%r15),%ecx
add    $0xffffffffffffffff,%r15
shl    $0x10,%rcx
or     %rcx,%rax
movzbl -0x1(%r15),%ecx
add    $0xffffffffffffffff,%r15
shl    $0x18,%rcx
or     %rcx,%rax
mov    %rax,%rcx
movzbl -0x1(%r15),%eax
add    $0xffffffffffffffff,%r15
movzbl -0x1(%r15),%edx
add    $0xffffffffffffffff,%r15
shl    $0x8,%rdx
or     %rdx,%rax
movzbl -0x1(%r15),%edx
add    $0xffffffffffffffff,%r15
shl    $0x10,%rdx
or     %rdx,%rax
movzbl -0x1(%r15),%edx
shl    $0x18,%rdx
or     %rdx,%rax
mov    %rdi,%rdx
xor    %rbx,%rax
xor    %rdx,%rcx
mov    %rax,(%rsp)
mov    %rcx,0x8(%rsp)
mov    %rsp,%rdi
mov    %r10,%rsi
call   1030 <BF_encrypt@plt>
mov    (%rsp),%rax
mov    0x8(%rsp),%rsi
mov    %rax,%r8
shr    $0x18,%r8
mov    %r8b,0x0(%rbp)
mov    %rax,%r9
shr    $0x10,%r9
mov    %r9b,0x1(%rbp)
mov    %rax,%rdx
shr    $0x8,%rdx
mov    %dl,0x2(%rbp)
mov    %al,0x3(%rbp)
mov    %rsi,%rcx
shr    $0x18,%rcx
mov    %cl,0x4(%rbp)
mov    %rsi,%rdi
shr    $0x10,%rdi
mov    %dil,0x5(%rbp)
mov    %rsi,%rbx
shr    $0x8,%rbx
mov    %bl,0x6(%rbp)
mov    %rsi,%r10
mov    %sil,0x7(%rbp)
jmp    14c3 <BF_cbc_encrypt+0x3a3>
cmp    $0x8,%r14
jl     13ab <BF_cbc_encrypt+0x28b>
xchg   %ax,%ax
mov    %rbx,%r12
mov    %rdx,0x28(%rsp)
mov    %r14,0x30(%rsp)
mov    (%r15),%ebx
shl    $0x20,%rbx
bswap  %rbx
add    $0xfffffffffffffff8,%r14
mov    0x4(%r15),%r13d
add    $0x8,%r15
shl    $0x20,%r13
bswap  %r13
mov    %rbx,(%rsp)
mov    %r13,0x8(%rsp)
mov    %rsp,%rdi
mov    %r10,%rsi
call   1040 <BF_decrypt@plt>
mov    0x20(%rsp),%r10
mov    %r13,%rdx
xor    (%rsp),%r12
mov    0x28(%rsp),%rcx
xor    0x8(%rsp),%rcx
mov    %r12,%rax
shr    $0x18,%rax
mov    %al,0x0(%rbp)
mov    %r12,%rax
shr    $0x10,%rax
mov    %al,0x1(%rbp)
mov    %r12,%rax
mov    %ah,0x2(%rbp)
mov    %al,0x3(%rbp)
mov    %rcx,%rax
shr    $0x18,%rax
mov    %al,0x4(%rbp)
mov    %rcx,%rax
shr    $0x10,%rax
mov    %al,0x5(%rbp)
mov    %ch,0x6(%rbp)
mov    %cl,0x7(%rbp)
add    $0x8,%rbp
cmpq   $0xf,0x30(%rsp)
ja     1310 <BF_cbc_encrypt+0x1f0>
test   %r14,%r14
je     1458 <BF_cbc_encrypt+0x338>
mov    %rdx,%r12
mov    (%r15),%ecx
mov    0x4(%r15),%eax
shl    $0x20,%rcx
bswap  %rcx
shl    $0x20,%rax
bswap  %rax
mov    %rcx,%r13
mov    %rcx,(%rsp)
mov    %rax,%r15
mov    %rax,0x8(%rsp)
mov    %rsp,%rdi
mov    %r10,%rsi
call   1040 <BF_decrypt@plt>
lea    -0x1(%r14),%rax
cmp    $0x6,%rax
ja     1452 <BF_cbc_encrypt+0x332>
xor    (%rsp),%rbx
mov    %r12,%rdx
xor    0x8(%rsp),%rdx
add    %r14,%rbp
lea    0xc16(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    %dh,-0x1(%rbp)
add    $0xffffffffffffffff,%rbp
mov    %rdx,%rax
shr    $0x10,%rax
mov    %al,-0x1(%rbp)
add    $0xffffffffffffffff,%rbp
shr    $0x18,%rdx
mov    %dl,-0x1(%rbp)
add    $0xffffffffffffffff,%rbp
mov    %bl,-0x1(%rbp)
add    $0xffffffffffffffff,%rbp
mov    %bh,-0x1(%rbp)
add    $0xffffffffffffffff,%rbp
mov    %rbx,%rax
shr    $0x10,%rax
mov    %al,-0x1(%rbp)
add    $0xffffffffffffffff,%rbp
shr    $0x18,%rbx
mov    %bl,-0x1(%rbp)
mov    %r15,%rdx
mov    %r13,%rbx
mov    %rbx,%rax
shr    $0x18,%rax
mov    0x18(%rsp),%rbp
mov    %al,0x0(%rbp)
mov    %rbx,%rax
shr    $0x10,%rax
mov    %al,0x1(%rbp)
mov    %bh,0x2(%rbp)
mov    %bl,0x3(%rbp)
mov    %rdx,%rax
shr    $0x18,%rax
mov    %al,0x4(%rbp)
mov    %rdx,%rax
shr    $0x10,%rax
mov    %al,0x5(%rbp)
mov    %dh,0x6(%rbp)
jmp    14e3 <BF_cbc_encrypt+0x3c3>
mov    %rbx,%r8
shr    $0x18,%r8
mov    %rbx,%r9
shr    $0x10,%r9
mov    %rdx,%rbp
mov    %rbx,%rdx
shr    $0x8,%rdx
mov    %rbp,%rcx
shr    $0x18,%rcx
mov    %rbp,%rdi
shr    $0x10,%rdi
mov    %rbx,%rax
mov    %rbp,%rbx
shr    $0x8,%rbx
mov    %ebp,%r10d
mov    0x18(%rsp),%rbp
mov    %r8b,0x0(%rbp)
mov    %r9b,0x1(%rbp)
mov    %dl,0x2(%rbp)
mov    %al,0x3(%rbp)
mov    %cl,0x4(%rbp)
mov    %dil,0x5(%rbp)
mov    %bl,0x6(%rbp)
mov    %r10,%rdx
mov    %dl,0x7(%rbp)
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ecx,%ecx
jmp    1293 <BF_cbc_encrypt+0x173>

LLVM IR (-O0):
define void @BF_cbc_encrypt(i8* %0, i8* %1, i64 %2, i32* %3, i8* %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
%20 = alloca [2 x i64]
store i8* %0, i8** %7
store i8* %1, i8** %8
store i64 %2, i64* %9
store i32* %3, i32** %10
store i8* %4, i8** %11
store i32 %5, i32* %12
%21 = load i64, i64* %9
store i64 %21, i64* %19
%22 = load i32, i32* %12
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %378
24: ; preds = %6
%25 = load i8*, i8** %11
%26 = getelementptr inbounds i8, i8* %25, i32 1
store i8* %26, i8** %11
%27 = load i8, i8* %25
%28 = zext i8 %27 to i64
%29 = shl i64 %28, 24
store i64 %29, i64* %15
%30 = load i8*, i8** %11
%31 = getelementptr inbounds i8, i8* %30, i32 1
store i8* %31, i8** %11
%32 = load i8, i8* %30
%33 = zext i8 %32 to i64
%34 = shl i64 %33, 16
%35 = load i64, i64* %15
%36 = or i64 %35, %34
store i64 %36, i64* %15
%37 = load i8*, i8** %11
%38 = getelementptr inbounds i8, i8* %37, i32 1
store i8* %38, i8** %11
%39 = load i8, i8* %37
%40 = zext i8 %39 to i64
%41 = shl i64 %40, 8
%42 = load i64, i64* %15
%43 = or i64 %42, %41
store i64 %43, i64* %15
%44 = load i8*, i8** %11
%45 = getelementptr inbounds i8, i8* %44, i32 1
store i8* %45, i8** %11
%46 = load i8, i8* %44
%47 = zext i8 %46 to i64
%48 = load i64, i64* %15
%49 = or i64 %48, %47
store i64 %49, i64* %15
%50 = load i8*, i8** %11
%51 = getelementptr inbounds i8, i8* %50, i32 1
store i8* %51, i8** %11
%52 = load i8, i8* %50
%53 = zext i8 %52 to i64
%54 = shl i64 %53, 24
store i64 %54, i64* %16
%55 = load i8*, i8** %11
%56 = getelementptr inbounds i8, i8* %55, i32 1
store i8* %56, i8** %11
%57 = load i8, i8* %55
%58 = zext i8 %57 to i64
%59 = shl i64 %58, 16
%60 = load i64, i64* %16
%61 = or i64 %60, %59
store i64 %61, i64* %16
%62 = load i8*, i8** %11
%63 = getelementptr inbounds i8, i8* %62, i32 1
store i8* %63, i8** %11
%64 = load i8, i8* %62
%65 = zext i8 %64 to i64
%66 = shl i64 %65, 8
%67 = load i64, i64* %16
%68 = or i64 %67, %66
store i64 %68, i64* %16
%69 = load i8*, i8** %11
%70 = getelementptr inbounds i8, i8* %69, i32 1
store i8* %70, i8** %11
%71 = load i8, i8* %69
%72 = zext i8 %71 to i64
%73 = load i64, i64* %16
%74 = or i64 %73, %72
store i64 %74, i64* %16
%75 = load i8*, i8** %11
%76 = getelementptr inbounds i8, i8* %75, i64 -8
store i8* %76, i8** %11
%77 = load i64, i64* %19
%78 = sub nsw i64 %77, 8
store i64 %78, i64* %19
br label %79
79: ; preds = %196, %24
%80 = load i64, i64* %19
%81 = icmp sge i64 %80, 0
br i1 %81, label %82, label %199
82: ; preds = %79
%83 = load i8*, i8** %7
%84 = getelementptr inbounds i8, i8* %83, i32 1
store i8* %84, i8** %7
%85 = load i8, i8* %83
%86 = zext i8 %85 to i64
%87 = shl i64 %86, 24
store i64 %87, i64* %13
%88 = load i8*, i8** %7
%89 = getelementptr inbounds i8, i8* %88, i32 1
store i8* %89, i8** %7
%90 = load i8, i8* %88
%91 = zext i8 %90 to i64
%92 = shl i64 %91, 16
%93 = load i64, i64* %13
%94 = or i64 %93, %92
store i64 %94, i64* %13
%95 = load i8*, i8** %7
%96 = getelementptr inbounds i8, i8* %95, i32 1
store i8* %96, i8** %7
%97 = load i8, i8* %95
%98 = zext i8 %97 to i64
%99 = shl i64 %98, 8
%100 = load i64, i64* %13
%101 = or i64 %100, %99
store i64 %101, i64* %13
%102 = load i8*, i8** %7
%103 = getelementptr inbounds i8, i8* %102, i32 1
store i8* %103, i8** %7
%104 = load i8, i8* %102
%105 = zext i8 %104 to i64
%106 = load i64, i64* %13
%107 = or i64 %106, %105
store i64 %107, i64* %13
%108 = load i8*, i8** %7
%109 = getelementptr inbounds i8, i8* %108, i32 1
store i8* %109, i8** %7
%110 = load i8, i8* %108
%111 = zext i8 %110 to i64
%112 = shl i64 %111, 24
store i64 %112, i64* %14
%113 = load i8*, i8** %7
%114 = getelementptr inbounds i8, i8* %113, i32 1
store i8* %114, i8** %7
%115 = load i8, i8* %113
%116 = zext i8 %115 to i64
%117 = shl i64 %116, 16
%118 = load i64, i64* %14
%119 = or i64 %118, %117
store i64 %119, i64* %14
%120 = load i8*, i8** %7
%121 = getelementptr inbounds i8, i8* %120, i32 1
store i8* %121, i8** %7
%122 = load i8, i8* %120
%123 = zext i8 %122 to i64
%124 = shl i64 %123, 8
%125 = load i64, i64* %14
%126 = or i64 %125, %124
store i64 %126, i64* %14
%127 = load i8*, i8** %7
%128 = getelementptr inbounds i8, i8* %127, i32 1
store i8* %128, i8** %7
%129 = load i8, i8* %127
%130 = zext i8 %129 to i64
%131 = load i64, i64* %14
%132 = or i64 %131, %130
store i64 %132, i64* %14
%133 = load i64, i64* %15
%134 = load i64, i64* %13
%135 = xor i64 %134, %133
store i64 %135, i64* %13
%136 = load i64, i64* %16
%137 = load i64, i64* %14
%138 = xor i64 %137, %136
store i64 %138, i64* %14
%139 = load i64, i64* %13
%140 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 0
store i64 %139, i64* %140
%141 = load i64, i64* %14
%142 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 1
store i64 %141, i64* %142
%143 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 0
%144 = load i32*, i32** %10
%145 = call i32 @BF_encrypt(i64* %143, i32* %144)
%146 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 0
%147 = load i64, i64* %146
store i64 %147, i64* %15
%148 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 1
%149 = load i64, i64* %148
store i64 %149, i64* %16
%150 = load i64, i64* %15
%151 = lshr i64 %150, 24
%152 = and i64 %151, 255
%153 = trunc i64 %152 to i8
%154 = load i8*, i8** %8
%155 = getelementptr inbounds i8, i8* %154, i32 1
store i8* %155, i8** %8
store i8 %153, i8* %154
%156 = load i64, i64* %15
%157 = lshr i64 %156, 16
%158 = and i64 %157, 255
%159 = trunc i64 %158 to i8
%160 = load i8*, i8** %8
%161 = getelementptr inbounds i8, i8* %160, i32 1
store i8* %161, i8** %8
store i8 %159, i8* %160
%162 = load i64, i64* %15
%163 = lshr i64 %162, 8
%164 = and i64 %163, 255
%165 = trunc i64 %164 to i8
%166 = load i8*, i8** %8
%167 = getelementptr inbounds i8, i8* %166, i32 1
store i8* %167, i8** %8
store i8 %165, i8* %166
%168 = load i64, i64* %15
%169 = and i64 %168, 255
%170 = trunc i64 %169 to i8
%171 = load i8*, i8** %8
%172 = getelementptr inbounds i8, i8* %171, i32 1
store i8* %172, i8** %8
store i8 %170, i8* %171
%173 = load i64, i64* %16
%174 = lshr i64 %173, 24
%175 = and i64 %174, 255
%176 = trunc i64 %175 to i8
%177 = load i8*, i8** %8
%178 = getelementptr inbounds i8, i8* %177, i32 1
store i8* %178, i8** %8
store i8 %176, i8* %177
%179 = load i64, i64* %16
%180 = lshr i64 %179, 16
%181 = and i64 %180, 255
%182 = trunc i64 %181 to i8
%183 = load i8*, i8** %8
%184 = getelementptr inbounds i8, i8* %183, i32 1
store i8* %184, i8** %8
store i8 %182, i8* %183
%185 = load i64, i64* %16
%186 = lshr i64 %185, 8
%187 = and i64 %186, 255
%188 = trunc i64 %187 to i8
%189 = load i8*, i8** %8
%190 = getelementptr inbounds i8, i8* %189, i32 1
store i8* %190, i8** %8
store i8 %188, i8* %189
%191 = load i64, i64* %16
%192 = and i64 %191, 255
%193 = trunc i64 %192 to i8
%194 = load i8*, i8** %8
%195 = getelementptr inbounds i8, i8* %194, i32 1
store i8* %195, i8** %8
store i8 %193, i8* %194
br label %196
196: ; preds = %82
%197 = load i64, i64* %19
%198 = sub nsw i64 %197, 8
store i64 %198, i64* %19
br label %79
199: ; preds = %79
%200 = load i64, i64* %19
%201 = icmp ne i64 %200, -8
br i1 %201, label %202, label %331
202: ; preds = %199
%203 = load i64, i64* %19
%204 = add nsw i64 %203, 8
%205 = load i8*, i8** %7
%206 = getelementptr inbounds i8, i8* %205, i64 %204
store i8* %206, i8** %7
store i64 0, i64* %14
store i64 0, i64* %13
%207 = load i64, i64* %19
%208 = add nsw i64 %207, 8
switch i64 %208, label %267 [
i64 8, label %209
i64 7, label %214
i64 6, label %222
i64 5, label %230
i64 4, label %238
i64 3, label %243
i64 2, label %251
i64 1, label %259
]
209: ; preds = %202
%210 = load i8*, i8** %7
%211 = getelementptr inbounds i8, i8* %210, i32 -1
store i8* %211, i8** %7
%212 = load i8, i8* %211
%213 = zext i8 %212 to i64
store i64 %213, i64* %14
br label %214
214: ; preds = %202, %209
%215 = load i8*, i8** %7
%216 = getelementptr inbounds i8, i8* %215, i32 -1
store i8* %216, i8** %7
%217 = load i8, i8* %216
%218 = zext i8 %217 to i64
%219 = shl i64 %218, 8
%220 = load i64, i64* %14
%221 = or i64 %220, %219
store i64 %221, i64* %14
br label %222
222: ; preds = %202, %214
%223 = load i8*, i8** %7
%224 = getelementptr inbounds i8, i8* %223, i32 -1
store i8* %224, i8** %7
%225 = load i8, i8* %224
%226 = zext i8 %225 to i64
%227 = shl i64 %226, 16
%228 = load i64, i64* %14
%229 = or i64 %228, %227
store i64 %229, i64* %14
br label %230
230: ; preds = %202, %222
%231 = load i8*, i8** %7
%232 = getelementptr inbounds i8, i8* %231, i32 -1
store i8* %232, i8** %7
%233 = load i8, i8* %232
%234 = zext i8 %233 to i64
%235 = shl i64 %234, 24
%236 = load i64, i64* %14
%237 = or i64 %236, %235
store i64 %237, i64* %14
br label %238
238: ; preds = %202, %230
%239 = load i8*, i8** %7
%240 = getelementptr inbounds i8, i8* %239, i32 -1
store i8* %240, i8** %7
%241 = load i8, i8* %240
%242 = zext i8 %241 to i64
store i64 %242, i64* %13
br label %243
243: ; preds = %202, %238
%244 = load i8*, i8** %7
%245 = getelementptr inbounds i8, i8* %244, i32 -1
store i8* %245, i8** %7
%246 = load i8, i8* %245
%247 = zext i8 %246 to i64
%248 = shl i64 %247, 8
%249 = load i64, i64* %13
%250 = or i64 %249, %248
store i64 %250, i64* %13
br label %251
251: ; preds = %202, %243
%252 = load i8*, i8** %7
%253 = getelementptr inbounds i8, i8* %252, i32 -1
store i8* %253, i8** %7
%254 = load i8, i8* %253
%255 = zext i8 %254 to i64
%256 = shl i64 %255, 16
%257 = load i64, i64* %13
%258 = or i64 %257, %256
store i64 %258, i64* %13
br label %259
259: ; preds = %202, %251
%260 = load i8*, i8** %7
%261 = getelementptr inbounds i8, i8* %260, i32 -1
store i8* %261, i8** %7
%262 = load i8, i8* %261
%263 = zext i8 %262 to i64
%264 = shl i64 %263, 24
%265 = load i64, i64* %13
%266 = or i64 %265, %264
store i64 %266, i64* %13
br label %267
267: ; preds = %259, %202
%268 = load i64, i64* %15
%269 = load i64, i64* %13
%270 = xor i64 %269, %268
store i64 %270, i64* %13
%271 = load i64, i64* %16
%272 = load i64, i64* %14
%273 = xor i64 %272, %271
store i64 %273, i64* %14
%274 = load i64, i64* %13
%275 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 0
store i64 %274, i64* %275
%276 = load i64, i64* %14
%277 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 1
store i64 %276, i64* %277
%278 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 0
%279 = load i32*, i32** %10
%280 = call i32 @BF_encrypt(i64* %278, i32* %279)
%281 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 0
%282 = load i64, i64* %281
store i64 %282, i64* %15
%283 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 1
%284 = load i64, i64* %283
store i64 %284, i64* %16
%285 = load i64, i64* %15
%286 = lshr i64 %285, 24
%287 = and i64 %286, 255
%288 = trunc i64 %287 to i8
%289 = load i8*, i8** %8
%290 = getelementptr inbounds i8, i8* %289, i32 1
store i8* %290, i8** %8
store i8 %288, i8* %289
%291 = load i64, i64* %15
%292 = lshr i64 %291, 16
%293 = and i64 %292, 255
%294 = trunc i64 %293 to i8
%295 = load i8*, i8** %8
%296 = getelementptr inbounds i8, i8* %295, i32 1
store i8* %296, i8** %8
store i8 %294, i8* %295
%297 = load i64, i64* %15
%298 = lshr i64 %297, 8
%299 = and i64 %298, 255
%300 = trunc i64 %299 to i8
%301 = load i8*, i8** %8
%302 = getelementptr inbounds i8, i8* %301, i32 1
store i8* %302, i8** %8
store i8 %300, i8* %301
%303 = load i64, i64* %15
%304 = and i64 %303, 255
%305 = trunc i64 %304 to i8
%306 = load i8*, i8** %8
%307 = getelementptr inbounds i8, i8* %306, i32 1
store i8* %307, i8** %8
store i8 %305, i8* %306
%308 = load i64, i64* %16
%309 = lshr i64 %308, 24
%310 = and i64 %309, 255
%311 = trunc i64 %310 to i8
%312 = load i8*, i8** %8
%313 = getelementptr inbounds i8, i8* %312, i32 1
store i8* %313, i8** %8
store i8 %311, i8* %312
%314 = load i64, i64* %16
%315 = lshr i64 %314, 16
%316 = and i64 %315, 255
%317 = trunc i64 %316 to i8
%318 = load i8*, i8** %8
%319 = getelementptr inbounds i8, i8* %318, i32 1
store i8* %319, i8** %8
store i8 %317, i8* %318
%320 = load i64, i64* %16
%321 = lshr i64 %320, 8
%322 = and i64 %321, 255
%323 = trunc i64 %322 to i8
%324 = load i8*, i8** %8
%325 = getelementptr inbounds i8, i8* %324, i32 1
store i8* %325, i8** %8
store i8 %323, i8* %324
%326 = load i64, i64* %16
%327 = and i64 %326, 255
%328 = trunc i64 %327 to i8
%329 = load i8*, i8** %8
%330 = getelementptr inbounds i8, i8* %329, i32 1
store i8* %330, i8** %8
store i8 %328, i8* %329
br label %331
331: ; preds = %267, %199
%332 = load i64, i64* %15
%333 = lshr i64 %332, 24
%334 = and i64 %333, 255
%335 = trunc i64 %334 to i8
%336 = load i8*, i8** %11
%337 = getelementptr inbounds i8, i8* %336, i32 1
store i8* %337, i8** %11
store i8 %335, i8* %336
%338 = load i64, i64* %15
%339 = lshr i64 %338, 16
%340 = and i64 %339, 255
%341 = trunc i64 %340 to i8
%342 = load i8*, i8** %11
%343 = getelementptr inbounds i8, i8* %342, i32 1
store i8* %343, i8** %11
store i8 %341, i8* %342
%344 = load i64, i64* %15
%345 = lshr i64 %344, 8
%346 = and i64 %345, 255
%347 = trunc i64 %346 to i8
%348 = load i8*, i8** %11
%349 = getelementptr inbounds i8, i8* %348, i32 1
store i8* %349, i8** %11
store i8 %347, i8* %348
%350 = load i64, i64* %15
%351 = and i64 %350, 255
%352 = trunc i64 %351 to i8
%353 = load i8*, i8** %11
%354 = getelementptr inbounds i8, i8* %353, i32 1
store i8* %354, i8** %11
store i8 %352, i8* %353
%355 = load i64, i64* %16
%356 = lshr i64 %355, 24
%357 = and i64 %356, 255
%358 = trunc i64 %357 to i8
%359 = load i8*, i8** %11
%360 = getelementptr inbounds i8, i8* %359, i32 1
store i8* %360, i8** %11
store i8 %358, i8* %359
%361 = load i64, i64* %16
%362 = lshr i64 %361, 16
%363 = and i64 %362, 255
%364 = trunc i64 %363 to i8
%365 = load i8*, i8** %11
%366 = getelementptr inbounds i8, i8* %365, i32 1
store i8* %366, i8** %11
store i8 %364, i8* %365
%367 = load i64, i64* %16
%368 = lshr i64 %367, 8
%369 = and i64 %368, 255
%370 = trunc i64 %369 to i8
%371 = load i8*, i8** %11
%372 = getelementptr inbounds i8, i8* %371, i32 1
store i8* %372, i8** %11
store i8 %370, i8* %371
%373 = load i64, i64* %16
%374 = and i64 %373, 255
%375 = trunc i64 %374 to i8
%376 = load i8*, i8** %11
%377 = getelementptr inbounds i8, i8* %376, i32 1
store i8* %377, i8** %11
store i8 %375, i8* %376
br label %732
378: ; preds = %6
%379 = load i8*, i8** %11
%380 = getelementptr inbounds i8, i8* %379, i32 1
store i8* %380, i8** %11
%381 = load i8, i8* %379
%382 = zext i8 %381 to i64
%383 = shl i64 %382, 24
store i64 %383, i64* %17
%384 = load i8*, i8** %11
%385 = getelementptr inbounds i8, i8* %384, i32 1
store i8* %385, i8** %11
%386 = load i8, i8* %384
%387 = zext i8 %386 to i64
%388 = shl i64 %387, 16
%389 = load i64, i64* %17
%390 = or i64 %389, %388
store i64 %390, i64* %17
%391 = load i8*, i8** %11
%392 = getelementptr inbounds i8, i8* %391, i32 1
store i8* %392, i8** %11
%393 = load i8, i8* %391
%394 = zext i8 %393 to i64
%395 = shl i64 %394, 8
%396 = load i64, i64* %17
%397 = or i64 %396, %395
store i64 %397, i64* %17
%398 = load i8*, i8** %11
%399 = getelementptr inbounds i8, i8* %398, i32 1
store i8* %399, i8** %11
%400 = load i8, i8* %398
%401 = zext i8 %400 to i64
%402 = load i64, i64* %17
%403 = or i64 %402, %401
store i64 %403, i64* %17
%404 = load i8*, i8** %11
%405 = getelementptr inbounds i8, i8* %404, i32 1
store i8* %405, i8** %11
%406 = load i8, i8* %404
%407 = zext i8 %406 to i64
%408 = shl i64 %407, 24
store i64 %408, i64* %18
%409 = load i8*, i8** %11
%410 = getelementptr inbounds i8, i8* %409, i32 1
store i8* %410, i8** %11
%411 = load i8, i8* %409
%412 = zext i8 %411 to i64
%413 = shl i64 %412, 16
%414 = load i64, i64* %18
%415 = or i64 %414, %413
store i64 %415, i64* %18
%416 = load i8*, i8** %11
%417 = getelementptr inbounds i8, i8* %416, i32 1
store i8* %417, i8** %11
%418 = load i8, i8* %416
%419 = zext i8 %418 to i64
%420 = shl i64 %419, 8
%421 = load i64, i64* %18
%422 = or i64 %421, %420
store i64 %422, i64* %18
%423 = load i8*, i8** %11
%424 = getelementptr inbounds i8, i8* %423, i32 1
store i8* %424, i8** %11
%425 = load i8, i8* %423
%426 = zext i8 %425 to i64
%427 = load i64, i64* %18
%428 = or i64 %427, %426
store i64 %428, i64* %18
%429 = load i8*, i8** %11
%430 = getelementptr inbounds i8, i8* %429, i64 -8
store i8* %430, i8** %11
%431 = load i64, i64* %19
%432 = sub nsw i64 %431, 8
store i64 %432, i64* %19
br label %433
433: ; preds = %550, %378
%434 = load i64, i64* %19
%435 = icmp sge i64 %434, 0
br i1 %435, label %436, label %553
436: ; preds = %433
%437 = load i8*, i8** %7
%438 = getelementptr inbounds i8, i8* %437, i32 1
store i8* %438, i8** %7
%439 = load i8, i8* %437
%440 = zext i8 %439 to i64
%441 = shl i64 %440, 24
store i64 %441, i64* %13
%442 = load i8*, i8** %7
%443 = getelementptr inbounds i8, i8* %442, i32 1
store i8* %443, i8** %7
%444 = load i8, i8* %442
%445 = zext i8 %444 to i64
%446 = shl i64 %445, 16
%447 = load i64, i64* %13
%448 = or i64 %447, %446
store i64 %448, i64* %13
%449 = load i8*, i8** %7
%450 = getelementptr inbounds i8, i8* %449, i32 1
store i8* %450, i8** %7
%451 = load i8, i8* %449
%452 = zext i8 %451 to i64
%453 = shl i64 %452, 8
%454 = load i64, i64* %13
%455 = or i64 %454, %453
store i64 %455, i64* %13
%456 = load i8*, i8** %7
%457 = getelementptr inbounds i8, i8* %456, i32 1
store i8* %457, i8** %7
%458 = load i8, i8* %456
%459 = zext i8 %458 to i64
%460 = load i64, i64* %13
%461 = or i64 %460, %459
store i64 %461, i64* %13
%462 = load i8*, i8** %7
%463 = getelementptr inbounds i8, i8* %462, i32 1
store i8* %463, i8** %7
%464 = load i8, i8* %462
%465 = zext i8 %464 to i64
%466 = shl i64 %465, 24
store i64 %466, i64* %14
%467 = load i8*, i8** %7
%468 = getelementptr inbounds i8, i8* %467, i32 1
store i8* %468, i8** %7
%469 = load i8, i8* %467
%470 = zext i8 %469 to i64
%471 = shl i64 %470, 16
%472 = load i64, i64* %14
%473 = or i64 %472, %471
store i64 %473, i64* %14
%474 = load i8*, i8** %7
%475 = getelementptr inbounds i8, i8* %474, i32 1
store i8* %475, i8** %7
%476 = load i8, i8* %474
%477 = zext i8 %476 to i64
%478 = shl i64 %477, 8
%479 = load i64, i64* %14
%480 = or i64 %479, %478
store i64 %480, i64* %14
%481 = load i8*, i8** %7
%482 = getelementptr inbounds i8, i8* %481, i32 1
store i8* %482, i8** %7
%483 = load i8, i8* %481
%484 = zext i8 %483 to i64
%485 = load i64, i64* %14
%486 = or i64 %485, %484
store i64 %486, i64* %14
%487 = load i64, i64* %13
%488 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 0
store i64 %487, i64* %488
%489 = load i64, i64* %14
%490 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 1
store i64 %489, i64* %490
%491 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 0
%492 = load i32*, i32** %10
%493 = call i32 @BF_decrypt(i64* %491, i32* %492)
%494 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 0
%495 = load i64, i64* %494
%496 = load i64, i64* %17
%497 = xor i64 %495, %496
store i64 %497, i64* %15
%498 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 1
%499 = load i64, i64* %498
%500 = load i64, i64* %18
%501 = xor i64 %499, %500
store i64 %501, i64* %16
%502 = load i64, i64* %15
%503 = lshr i64 %502, 24
%504 = and i64 %503, 255
%505 = trunc i64 %504 to i8
%506 = load i8*, i8** %8
%507 = getelementptr inbounds i8, i8* %506, i32 1
store i8* %507, i8** %8
store i8 %505, i8* %506
%508 = load i64, i64* %15
%509 = lshr i64 %508, 16
%510 = and i64 %509, 255
%511 = trunc i64 %510 to i8
%512 = load i8*, i8** %8
%513 = getelementptr inbounds i8, i8* %512, i32 1
store i8* %513, i8** %8
store i8 %511, i8* %512
%514 = load i64, i64* %15
%515 = lshr i64 %514, 8
%516 = and i64 %515, 255
%517 = trunc i64 %516 to i8
%518 = load i8*, i8** %8
%519 = getelementptr inbounds i8, i8* %518, i32 1
store i8* %519, i8** %8
store i8 %517, i8* %518
%520 = load i64, i64* %15
%521 = and i64 %520, 255
%522 = trunc i64 %521 to i8
%523 = load i8*, i8** %8
%524 = getelementptr inbounds i8, i8* %523, i32 1
store i8* %524, i8** %8
store i8 %522, i8* %523
%525 = load i64, i64* %16
%526 = lshr i64 %525, 24
%527 = and i64 %526, 255
%528 = trunc i64 %527 to i8
%529 = load i8*, i8** %8
%530 = getelementptr inbounds i8, i8* %529, i32 1
store i8* %530, i8** %8
store i8 %528, i8* %529
%531 = load i64, i64* %16
%532 = lshr i64 %531, 16
%533 = and i64 %532, 255
%534 = trunc i64 %533 to i8
%535 = load i8*, i8** %8
%536 = getelementptr inbounds i8, i8* %535, i32 1
store i8* %536, i8** %8
store i8 %534, i8* %535
%537 = load i64, i64* %16
%538 = lshr i64 %537, 8
%539 = and i64 %538, 255
%540 = trunc i64 %539 to i8
%541 = load i8*, i8** %8
%542 = getelementptr inbounds i8, i8* %541, i32 1
store i8* %542, i8** %8
store i8 %540, i8* %541
%543 = load i64, i64* %16
%544 = and i64 %543, 255
%545 = trunc i64 %544 to i8
%546 = load i8*, i8** %8
%547 = getelementptr inbounds i8, i8* %546, i32 1
store i8* %547, i8** %8
store i8 %545, i8* %546
%548 = load i64, i64* %13
store i64 %548, i64* %17
%549 = load i64, i64* %14
store i64 %549, i64* %18
br label %550
550: ; preds = %436
%551 = load i64, i64* %19
%552 = sub nsw i64 %551, 8
store i64 %552, i64* %19
br label %433
553: ; preds = %433
%554 = load i64, i64* %19
%555 = icmp ne i64 %554, -8
br i1 %555, label %556, label %685
556: ; preds = %553
%557 = load i8*, i8** %7
%558 = getelementptr inbounds i8, i8* %557, i32 1
store i8* %558, i8** %7
%559 = load i8, i8* %557
%560 = zext i8 %559 to i64
%561 = shl i64 %560, 24
store i64 %561, i64* %13
%562 = load i8*, i8** %7
%563 = getelementptr inbounds i8, i8* %562, i32 1
store i8* %563, i8** %7
%564 = load i8, i8* %562
%565 = zext i8 %564 to i64
%566 = shl i64 %565, 16
%567 = load i64, i64* %13
%568 = or i64 %567, %566
store i64 %568, i64* %13
%569 = load i8*, i8** %7
%570 = getelementptr inbounds i8, i8* %569, i32 1
store i8* %570, i8** %7
%571 = load i8, i8* %569
%572 = zext i8 %571 to i64
%573 = shl i64 %572, 8
%574 = load i64, i64* %13
%575 = or i64 %574, %573
store i64 %575, i64* %13
%576 = load i8*, i8** %7
%577 = getelementptr inbounds i8, i8* %576, i32 1
store i8* %577, i8** %7
%578 = load i8, i8* %576
%579 = zext i8 %578 to i64
%580 = load i64, i64* %13
%581 = or i64 %580, %579
store i64 %581, i64* %13
%582 = load i8*, i8** %7
%583 = getelementptr inbounds i8, i8* %582, i32 1
store i8* %583, i8** %7
%584 = load i8, i8* %582
%585 = zext i8 %584 to i64
%586 = shl i64 %585, 24
store i64 %586, i64* %14
%587 = load i8*, i8** %7
%588 = getelementptr inbounds i8, i8* %587, i32 1
store i8* %588, i8** %7
%589 = load i8, i8* %587
%590 = zext i8 %589 to i64
%591 = shl i64 %590, 16
%592 = load i64, i64* %14
%593 = or i64 %592, %591
store i64 %593, i64* %14
%594 = load i8*, i8** %7
%595 = getelementptr inbounds i8, i8* %594, i32 1
store i8* %595, i8** %7
%596 = load i8, i8* %594
%597 = zext i8 %596 to i64
%598 = shl i64 %597, 8
%599 = load i64, i64* %14
%600 = or i64 %599, %598
store i64 %600, i64* %14
%601 = load i8*, i8** %7
%602 = getelementptr inbounds i8, i8* %601, i32 1
store i8* %602, i8** %7
%603 = load i8, i8* %601
%604 = zext i8 %603 to i64
%605 = load i64, i64* %14
%606 = or i64 %605, %604
store i64 %606, i64* %14
%607 = load i64, i64* %13
%608 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 0
store i64 %607, i64* %608
%609 = load i64, i64* %14
%610 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 1
store i64 %609, i64* %610
%611 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 0
%612 = load i32*, i32** %10
%613 = call i32 @BF_decrypt(i64* %611, i32* %612)
%614 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 0
%615 = load i64, i64* %614
%616 = load i64, i64* %17
%617 = xor i64 %615, %616
store i64 %617, i64* %15
%618 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 1
%619 = load i64, i64* %618
%620 = load i64, i64* %18
%621 = xor i64 %619, %620
store i64 %621, i64* %16
%622 = load i64, i64* %19
%623 = add nsw i64 %622, 8
%624 = load i8*, i8** %8
%625 = getelementptr inbounds i8, i8* %624, i64 %623
store i8* %625, i8** %8
%626 = load i64, i64* %19
%627 = add nsw i64 %626, 8
switch i64 %627, label %682 [
i64 8, label %628
i64 7, label %634
i64 6, label %641
i64 5, label %648
i64 4, label %655
i64 3, label %661
i64 2, label %668
i64 1, label %675
]
628: ; preds = %556
%629 = load i64, i64* %16
%630 = and i64 %629, 255
%631 = trunc i64 %630 to i8
%632 = load i8*, i8** %8
%633 = getelementptr inbounds i8, i8* %632, i32 -1
store i8* %633, i8** %8
store i8 %631, i8* %633
br label %634
634: ; preds = %556, %628
%635 = load i64, i64* %16
%636 = lshr i64 %635, 8
%637 = and i64 %636, 255
%638 = trunc i64 %637 to i8
%639 = load i8*, i8** %8
%640 = getelementptr inbounds i8, i8* %639, i32 -1
store i8* %640, i8** %8
store i8 %638, i8* %640
br label %641
641: ; preds = %556, %634
%642 = load i64, i64* %16
%643 = lshr i64 %642, 16
%644 = and i64 %643, 255
%645 = trunc i64 %644 to i8
%646 = load i8*, i8** %8
%647 = getelementptr inbounds i8, i8* %646, i32 -1
store i8* %647, i8** %8
store i8 %645, i8* %647
br label %648
648: ; preds = %556, %641
%649 = load i64, i64* %16
%650 = lshr i64 %649, 24
%651 = and i64 %650, 255
%652 = trunc i64 %651 to i8
%653 = load i8*, i8** %8
%654 = getelementptr inbounds i8, i8* %653, i32 -1
store i8* %654, i8** %8
store i8 %652, i8* %654
br label %655
655: ; preds = %556, %648
%656 = load i64, i64* %15
%657 = and i64 %656, 255
%658 = trunc i64 %657 to i8
%659 = load i8*, i8** %8
%660 = getelementptr inbounds i8, i8* %659, i32 -1
store i8* %660, i8** %8
store i8 %658, i8* %660
br label %661
661: ; preds = %556, %655
%662 = load i64, i64* %15
%663 = lshr i64 %662, 8
%664 = and i64 %663, 255
%665 = trunc i64 %664 to i8
%666 = load i8*, i8** %8
%667 = getelementptr inbounds i8, i8* %666, i32 -1
store i8* %667, i8** %8
store i8 %665, i8* %667
br label %668
668: ; preds = %556, %661
%669 = load i64, i64* %15
%670 = lshr i64 %669, 16
%671 = and i64 %670, 255
%672 = trunc i64 %671 to i8
%673 = load i8*, i8** %8
%674 = getelementptr inbounds i8, i8* %673, i32 -1
store i8* %674, i8** %8
store i8 %672, i8* %674
br label %675
675: ; preds = %556, %668
%676 = load i64, i64* %15
%677 = lshr i64 %676, 24
%678 = and i64 %677, 255
%679 = trunc i64 %678 to i8
%680 = load i8*, i8** %8
%681 = getelementptr inbounds i8, i8* %680, i32 -1
store i8* %681, i8** %8
store i8 %679, i8* %681
br label %682
682: ; preds = %675, %556
%683 = load i64, i64* %13
store i64 %683, i64* %17
%684 = load i64, i64* %14
store i64 %684, i64* %18
br label %685
685: ; preds = %682, %553
%686 = load i64, i64* %17
%687 = lshr i64 %686, 24
%688 = and i64 %687, 255
%689 = trunc i64 %688 to i8
%690 = load i8*, i8** %11
%691 = getelementptr inbounds i8, i8* %690, i32 1
store i8* %691, i8** %11
store i8 %689, i8* %690
%692 = load i64, i64* %17
%693 = lshr i64 %692, 16
%694 = and i64 %693, 255
%695 = trunc i64 %694 to i8
%696 = load i8*, i8** %11
%697 = getelementptr inbounds i8, i8* %696, i32 1
store i8* %697, i8** %11
store i8 %695, i8* %696
%698 = load i64, i64* %17
%699 = lshr i64 %698, 8
%700 = and i64 %699, 255
%701 = trunc i64 %700 to i8
%702 = load i8*, i8** %11
%703 = getelementptr inbounds i8, i8* %702, i32 1
store i8* %703, i8** %11
store i8 %701, i8* %702
%704 = load i64, i64* %17
%705 = and i64 %704, 255
%706 = trunc i64 %705 to i8
%707 = load i8*, i8** %11
%708 = getelementptr inbounds i8, i8* %707, i32 1
store i8* %708, i8** %11
store i8 %706, i8* %707
%709 = load i64, i64* %18
%710 = lshr i64 %709, 24
%711 = and i64 %710, 255
%712 = trunc i64 %711 to i8
%713 = load i8*, i8** %11
%714 = getelementptr inbounds i8, i8* %713, i32 1
store i8* %714, i8** %11
store i8 %712, i8* %713
%715 = load i64, i64* %18
%716 = lshr i64 %715, 16
%717 = and i64 %716, 255
%718 = trunc i64 %717 to i8
%719 = load i8*, i8** %11
%720 = getelementptr inbounds i8, i8* %719, i32 1
store i8* %720, i8** %11
store i8 %718, i8* %719
%721 = load i64, i64* %18
%722 = lshr i64 %721, 8
%723 = and i64 %722, 255
%724 = trunc i64 %723 to i8
%725 = load i8*, i8** %11
%726 = getelementptr inbounds i8, i8* %725, i32 1
store i8* %726, i8** %11
store i8 %724, i8* %725
%727 = load i64, i64* %18
%728 = and i64 %727, 255
%729 = trunc i64 %728 to i8
%730 = load i8*, i8** %11
%731 = getelementptr inbounds i8, i8* %730, i32 1
store i8* %731, i8** %11
store i8 %729, i8* %730
br label %732
732: ; preds = %685, %331
store i64 0, i64* %18
store i64 0, i64* %17
store i64 0, i64* %16
store i64 0, i64* %15
store i64 0, i64* %14
store i64 0, i64* %13
%733 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 1
store i64 0, i64* %733
%734 = getelementptr inbounds [2 x i64], [2 x i64]* %20, i64 0, i64 0
store i64 0, i64* %734
ret void
}

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