void mbia_decrypt(unsigned char *block, unsigned char *key,
                  unsigned char *wpcn) {
  short int round, loopcounter;
  unsigned char **keysched;
  unsigned char buffer1[16], buffer2[4];
  keysched = malloc(sizeof(unsigned char *) * 10);
  mlock(keysched, sizeof(unsigned char *) * 10);
  for (loopcounter = 0; loopcounter < 10; ++loopcounter) {
    keysched[loopcounter] = malloc(sizeof(unsigned char) * 32);
    mlock(keysched[loopcounter], sizeof(unsigned char) * 32);
  }
  memcpy(buffer1, block, 16);
  mbia_keysched((unsigned char **)keysched, key, wpcn);
  for (round = 9; round >= 0; --round) {
    for (loopcounter = 0; loopcounter < 16; ++loopcounter) {
      switch (keysched[round][15] % 4) {
      case 0:
        buffer1[loopcounter] -= keysched[round][loopcounter + 16];
        buffer1[loopcounter] ^= keysched[round][loopcounter];
        break;
      case 1:
        buffer1[loopcounter] ^= keysched[round][loopcounter];
        buffer1[loopcounter] -= keysched[round][loopcounter + 16];
        break;
      case 2:
        buffer1[loopcounter] ^= keysched[round][loopcounter + 16];
        buffer1[loopcounter] -= keysched[round][loopcounter];
        break;
      case 3:
        buffer1[loopcounter] -= keysched[round][loopcounter];
        buffer1[loopcounter] ^= keysched[round][loopcounter + 16];
        break;
      }
    }
    memcpy(buffer2, buffer1 + 8, 4);
    memcpy(buffer1 + 8, buffer1 + 4, 4);
    memcpy(buffer1 + 4, buffer2, 4);
    for (loopcounter = 4; loopcounter < 8; ++loopcounter) {
      invsboxb(buffer1 + loopcounter);
      invsboxa(buffer1 + loopcounter + 4);
    }
    for (loopcounter = 0; loopcounter < 3; ++loopcounter) {
      buffer1[loopcounter] ^= wpcn[loopcounter];
      buffer1[loopcounter + 3] += wpcn[loopcounter];
      buffer1[loopcounter + 6] -= wpcn[loopcounter];
      buffer1[loopcounter + 9] =
          ~(buffer1[loopcounter + 9] ^ wpcn[loopcounter]);
      buffer1[loopcounter + 12] -= wpcn[loopcounter];
    }
    buffer1[15] ^= wpcn[1];
    for (loopcounter = 0; loopcounter < keysched[round][21] % 24 + 1;
         ++loopcounter) {
      invsboxa(buffer1 + 0);
      invsboxb(buffer1 + 1);
      invsboxb(buffer1 + 2);
      invsboxa(buffer1 + 3);
      invpbox(buffer1 + 4);
      invsboxb(buffer1 + 12);
      invsboxa(buffer1 + 13);
      invsboxa(buffer1 + 14);
      invsboxb(buffer1 + 15);
    }
    for (loopcounter = 0; loopcounter < keysched[round][4] % 16 + 1;
         ++loopcounter) {
      invpbox(buffer1);
      invpbox(buffer1 + 8);
    }
  }
  for (loopcounter = 0; loopcounter < 10; ++loopcounter) {
    memcpy(keysched[loopcounter],
           "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
           32);
    munlock(keysched[loopcounter], sizeof(unsigned char) * 32);
    free(keysched[loopcounter]);
  }
  munlock(keysched, sizeof(unsigned char *) * 10);
  free(keysched);
  sboxb(&wpcn[0]);
  sboxa(&wpcn[1]);
  sboxa(&wpcn[2]);
  memcpy(block, buffer1, 16);
}


x86 assembly (clang, -O0):
<mbia_decrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x50,%edi
call   1080 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0x50,%esi
mov    $0x0,%al
call   1050 <mlock@plt>
movw   $0x0,-0x1c(%rbp)
movswl -0x1c(%rbp),%eax
cmp    $0xa,%eax
jge    1229 <mbia_decrypt+0x89>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,%rdx
mov    -0x28(%rbp),%rax
movswq -0x1c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movswq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x20,%esi
mov    $0x0,%al
call   1050 <mlock@plt>
mov    -0x1c(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x1c(%rbp)
jmp    11d8 <mbia_decrypt+0x38>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
mov    %rcx,-0x40(%rbp)
mov    0x8(%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x0,%al
call   10b0 <mbia_keysched@plt>
movw   $0x9,-0x1a(%rbp)
movswl -0x1a(%rbp),%eax
cmp    $0x0,%eax
jl     1698 <mbia_decrypt+0x4f8>
movw   $0x0,-0x1c(%rbp)
movswl -0x1c(%rbp),%eax
cmp    $0x10,%eax
jge    1415 <mbia_decrypt+0x275>
mov    -0x28(%rbp),%rax
movswq -0x1a(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movzbl 0xf(%rax),%eax
and    $0x3,%eax
mov    %eax,%ecx
mov    %rcx,-0x50(%rbp)
sub    $0x3,%eax
ja     13ff <mbia_decrypt+0x25f>
mov    -0x50(%rbp),%rax
lea    0xd5d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x28(%rbp),%rax
movswq -0x1a(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movswl -0x1c(%rbp),%ecx
add    $0x10,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%edx
movswq -0x1c(%rbp),%rax
movzbl -0x40(%rbp,%rax,1),%ecx
sub    %edx,%ecx
mov    %cl,-0x40(%rbp,%rax,1)
mov    -0x28(%rbp),%rax
movswq -0x1a(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movswq -0x1c(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
movswq -0x1c(%rbp),%rax
movzbl -0x40(%rbp,%rax,1),%ecx
xor    %edx,%ecx
mov    %cl,-0x40(%rbp,%rax,1)
jmp    13ff <mbia_decrypt+0x25f>
mov    -0x28(%rbp),%rax
movswq -0x1a(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movswq -0x1c(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
movswq -0x1c(%rbp),%rax
movzbl -0x40(%rbp,%rax,1),%ecx
xor    %edx,%ecx
mov    %cl,-0x40(%rbp,%rax,1)
mov    -0x28(%rbp),%rax
movswq -0x1a(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movswl -0x1c(%rbp),%ecx
add    $0x10,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%edx
movswq -0x1c(%rbp),%rax
movzbl -0x40(%rbp,%rax,1),%ecx
sub    %edx,%ecx
mov    %cl,-0x40(%rbp,%rax,1)
jmp    13ff <mbia_decrypt+0x25f>
mov    -0x28(%rbp),%rax
movswq -0x1a(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movswl -0x1c(%rbp),%ecx
add    $0x10,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%edx
movswq -0x1c(%rbp),%rax
movzbl -0x40(%rbp,%rax,1),%ecx
xor    %edx,%ecx
mov    %cl,-0x40(%rbp,%rax,1)
mov    -0x28(%rbp),%rax
movswq -0x1a(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movswq -0x1c(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
movswq -0x1c(%rbp),%rax
movzbl -0x40(%rbp,%rax,1),%ecx
sub    %edx,%ecx
mov    %cl,-0x40(%rbp,%rax,1)
jmp    13ff <mbia_decrypt+0x25f>
mov    -0x28(%rbp),%rax
movswq -0x1a(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movswq -0x1c(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
movswq -0x1c(%rbp),%rax
movzbl -0x40(%rbp,%rax,1),%ecx
sub    %edx,%ecx
mov    %cl,-0x40(%rbp,%rax,1)
mov    -0x28(%rbp),%rax
movswq -0x1a(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movswl -0x1c(%rbp),%ecx
add    $0x10,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%edx
movswq -0x1c(%rbp),%rax
movzbl -0x40(%rbp,%rax,1),%ecx
xor    %edx,%ecx
mov    %cl,-0x40(%rbp,%rax,1)
jmp    1404 <mbia_decrypt+0x264>
mov    -0x1c(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x1c(%rbp)
jmp    1268 <mbia_decrypt+0xc8>
mov    -0x38(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x3c(%rbp)
movw   $0x4,-0x1c(%rbp)
movswl -0x1c(%rbp),%eax
cmp    $0x8,%eax
jge    1477 <mbia_decrypt+0x2d7>
lea    -0x40(%rbp),%rdi
movswl -0x1c(%rbp),%eax
cltq
add    %rax,%rdi
mov    $0x0,%al
call   1060 <invsboxb@plt>
lea    -0x40(%rbp),%rdi
movswl -0x1c(%rbp),%eax
cltq
add    %rax,%rdi
add    $0x4,%rdi
mov    $0x0,%al
call   1090 <invsboxa@plt>
mov    -0x1c(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x1c(%rbp)
jmp    142d <mbia_decrypt+0x28d>
movw   $0x0,-0x1c(%rbp)
movswl -0x1c(%rbp),%eax
cmp    $0x3,%eax
jge    154a <mbia_decrypt+0x3aa>
mov    -0x18(%rbp),%rax
movswq -0x1c(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
movswq -0x1c(%rbp),%rax
movzbl -0x40(%rbp,%rax,1),%ecx
xor    %edx,%ecx
mov    %cl,-0x40(%rbp,%rax,1)
mov    -0x18(%rbp),%rax
movswq -0x1c(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
movswl -0x1c(%rbp),%eax
add    $0x3,%eax
cltq
movzbl -0x40(%rbp,%rax,1),%ecx
add    %edx,%ecx
mov    %cl,-0x40(%rbp,%rax,1)
mov    -0x18(%rbp),%rax
movswq -0x1c(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
movswl -0x1c(%rbp),%eax
add    $0x6,%eax
cltq
movzbl -0x40(%rbp,%rax,1),%ecx
sub    %edx,%ecx
mov    %cl,-0x40(%rbp,%rax,1)
movswl -0x1c(%rbp),%eax
add    $0x9,%eax
cltq
movzbl -0x40(%rbp,%rax,1),%eax
mov    -0x18(%rbp),%rcx
movswq -0x1c(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
xor    %ecx,%eax
xor    $0xffffffff,%eax
mov    %al,%cl
movswl -0x1c(%rbp),%eax
add    $0x9,%eax
cltq
mov    %cl,-0x40(%rbp,%rax,1)
mov    -0x18(%rbp),%rax
movswq -0x1c(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
movswl -0x1c(%rbp),%eax
add    $0xc,%eax
cltq
movzbl -0x40(%rbp,%rax,1),%ecx
sub    %edx,%ecx
mov    %cl,-0x40(%rbp,%rax,1)
mov    -0x1c(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x1c(%rbp)
jmp    147d <mbia_decrypt+0x2dd>
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%ecx
movzbl -0x31(%rbp),%eax
xor    %ecx,%eax
mov    %al,-0x31(%rbp)
movw   $0x0,-0x1c(%rbp)
movswl -0x1c(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x28(%rbp),%rax
movswq -0x1a(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movzbl 0x15(%rax),%eax
mov    $0x18,%ecx
cltd
idiv   %ecx
mov    -0x54(%rbp),%eax
add    $0x1,%edx
cmp    %edx,%eax
jge    1623 <mbia_decrypt+0x483>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1090 <invsboxa@plt>
lea    -0x40(%rbp),%rdi
add    $0x1,%rdi
mov    $0x0,%al
call   1060 <invsboxb@plt>
lea    -0x40(%rbp),%rdi
add    $0x2,%rdi
mov    $0x0,%al
call   1060 <invsboxb@plt>
lea    -0x40(%rbp),%rdi
add    $0x3,%rdi
mov    $0x0,%al
call   1090 <invsboxa@plt>
lea    -0x40(%rbp),%rdi
add    $0x4,%rdi
mov    $0x0,%al
call   10c0 <invpbox@plt>
lea    -0x40(%rbp),%rdi
add    $0xc,%rdi
mov    $0x0,%al
call   1060 <invsboxb@plt>
lea    -0x40(%rbp),%rdi
add    $0xd,%rdi
mov    $0x0,%al
call   1090 <invsboxa@plt>
lea    -0x40(%rbp),%rdi
add    $0xe,%rdi
mov    $0x0,%al
call   1090 <invsboxa@plt>
lea    -0x40(%rbp),%rdi
add    $0xf,%rdi
mov    $0x0,%al
call   1060 <invsboxb@plt>
mov    -0x1c(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x1c(%rbp)
jmp    1561 <mbia_decrypt+0x3c1>
movw   $0x0,-0x1c(%rbp)
movswl -0x1c(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x28(%rbp),%rax
movswq -0x1a(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movzbl 0x4(%rax),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    -0x58(%rbp),%eax
add    $0x1,%edx
cmp    %edx,%eax
jge    1682 <mbia_decrypt+0x4e2>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   10c0 <invpbox@plt>
lea    -0x40(%rbp),%rdi
add    $0x8,%rdi
mov    $0x0,%al
call   10c0 <invpbox@plt>
mov    -0x1c(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x1c(%rbp)
jmp    1629 <mbia_decrypt+0x489>
jmp    1687 <mbia_decrypt+0x4e7>
mov    -0x1a(%rbp),%ax
add    $0xffff,%ax
mov    %ax,-0x1a(%rbp)
jmp    1255 <mbia_decrypt+0xb5>
movw   $0x0,-0x1c(%rbp)
movswl -0x1c(%rbp),%eax
cmp    $0xa,%eax
jge    171f <mbia_decrypt+0x57f>
mov    -0x28(%rbp),%rax
movswq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x951(%rip),%rcx
mov    %rcx,(%rax)
mov    0x94f(%rip),%rcx
mov    %rcx,0x8(%rax)
mov    0x94c(%rip),%rcx
mov    %rcx,0x10(%rax)
mov    0x949(%rip),%rcx
mov    %rcx,0x18(%rax)
mov    -0x28(%rbp),%rax
movswq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x20,%esi
mov    $0x0,%al
call   1030 <munlock@plt>
mov    -0x28(%rbp),%rax
movswq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <free@plt>
mov    -0x1c(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x1c(%rbp)
jmp    169e <mbia_decrypt+0x4fe>
mov    -0x28(%rbp),%rdi
mov    $0x50,%esi
mov    $0x0,%al
call   1030 <munlock@plt>
mov    -0x28(%rbp),%rdi
call   1040 <free@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   10a0 <sboxb@plt>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
mov    $0x0,%al
call   1070 <sboxa@plt>
mov    -0x18(%rbp),%rdi
add    $0x2,%rdi
mov    $0x0,%al
call   1070 <sboxa@plt>
mov    -0x8(%rbp),%rax
mov    -0x40(%rbp),%rcx
mov    %rcx,(%rax)
mov    -0x38(%rbp),%rcx
mov    %rcx,0x8(%rax)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mbia_decrypt>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%rbp
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0x50,%edi
call   1080 <malloc@plt>
mov    %rax,%r12
mov    $0x50,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,(%r12)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,0x8(%r12)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,0x10(%r12)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,0x18(%r12)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,0x20(%r12)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,0x28(%r12)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,0x30(%r12)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,0x38(%r12)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,0x40(%r12)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,0x48(%r12)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    %r15,0x20(%rsp)
movups (%r15),%xmm0
movaps %xmm0,(%rsp)
mov    %r12,%rdi
mov    %r14,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   10b0 <mbia_keysched@plt>
lea    0x8(%rsp),%rbx
mov    %rbp,0x10(%rsp)
lea    0x1(%rbp),%rax
mov    %rax,0x18(%rsp)
lea    0xe(%rsp),%rsi
mov    $0x9,%r14d
lea    0xcc0(%rip),%rdi
mov    %rsp,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r12,%r14,8),%rax
xor    %ecx,%ecx
lea    0x4(%rsp),%rbp
jmp    137b <mbia_decrypt+0x1db>
nopl   (%rax)
movzbl (%rsp,%rcx,1),%edx
xor    0x10(%rax,%rcx,1),%dl
mov    %dl,(%rsp,%rcx,1)
sub    (%rax,%rcx,1),%dl
mov    %dl,(%rsp,%rcx,1)
add    $0x1,%rcx
cmp    $0x10,%rcx
je     13c0 <mbia_decrypt+0x220>
movzbl 0xf(%rax),%edx
and    $0x3,%edx
movslq (%rdi,%rdx,4),%rdx
add    %rdi,%rdx
jmp    *%rdx
movzbl (%rsp,%rcx,1),%edx
sub    0x10(%rax,%rcx,1),%dl
mov    %dl,(%rsp,%rcx,1)
xor    (%rax,%rcx,1),%dl
jmp    136e <mbia_decrypt+0x1ce>
nopl   0x0(%rax,%rax,1)
movzbl (%rsp,%rcx,1),%edx
xor    (%rax,%rcx,1),%dl
sub    0x10(%rax,%rcx,1),%dl
jmp    136e <mbia_decrypt+0x1ce>
nopl   (%rax)
movzbl (%rsp,%rcx,1),%edx
sub    (%rax,%rcx,1),%dl
xor    0x10(%rax,%rcx,1),%dl
jmp    136e <mbia_decrypt+0x1ce>
nopl   (%rax)
rolq   $0x20,0x4(%rsp)
mov    %rbp,%rdi
xor    %eax,%eax
mov    %rsi,%rbp
call   1060 <invsboxb@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <invsboxa@plt>
lea    0x5(%rsp),%rdi
xor    %eax,%eax
call   1060 <invsboxb@plt>
lea    0x9(%rsp),%rdi
xor    %eax,%eax
call   1090 <invsboxa@plt>
lea    0x6(%rsp),%rdi
xor    %eax,%eax
call   1060 <invsboxb@plt>
lea    0xa(%rsp),%rdi
xor    %eax,%eax
call   1090 <invsboxa@plt>
lea    0x7(%rsp),%rdi
xor    %eax,%eax
call   1060 <invsboxb@plt>
lea    0xb(%rsp),%rdi
xor    %eax,%eax
call   1090 <invsboxa@plt>
mov    0x10(%rsp),%rdx
mov    (%rdx),%al
xor    %al,(%rsp)
add    %al,0x3(%rsp)
sub    %al,0x6(%rsp)
mov    0x9(%rsp),%cl
xor    %al,%cl
not    %cl
mov    %cl,0x9(%rsp)
sub    %al,0xc(%rsp)
mov    0x1(%rdx),%al
xor    %al,0x1(%rsp)
add    %al,0x4(%rsp)
sub    %al,0x7(%rsp)
mov    0xa(%rsp),%cl
xor    %al,%cl
not    %cl
mov    %cl,0xa(%rsp)
sub    %al,0xd(%rsp)
mov    0x2(%rdx),%cl
xor    %cl,0x2(%rsp)
add    %cl,0x5(%rsp)
sub    %cl,0x8(%rsp)
mov    0xb(%rsp),%dl
xor    %cl,%dl
not    %dl
mov    %dl,0xb(%rsp)
sub    %cl,0xe(%rsp)
xor    %al,0xf(%rsp)
mov    %r12,%r13
mov    $0x1,%r12w
lea    0xf(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %r15,%rdi
xor    %eax,%eax
call   1090 <invsboxa@plt>
lea    0x1(%rsp),%rdi
xor    %eax,%eax
call   1060 <invsboxb@plt>
lea    0x2(%rsp),%rdi
xor    %eax,%eax
call   1060 <invsboxb@plt>
lea    0x3(%rsp),%rdi
xor    %eax,%eax
call   1090 <invsboxa@plt>
lea    0x4(%rsp),%rdi
xor    %eax,%eax
call   10c0 <invpbox@plt>
lea    0xc(%rsp),%rdi
xor    %eax,%eax
call   1060 <invsboxb@plt>
lea    0xd(%rsp),%rdi
xor    %eax,%eax
call   1090 <invsboxa@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   1090 <invsboxa@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <invsboxb@plt>
movswl %r12w,%eax
mov    0x0(%r13,%r14,8),%rcx
movzbl 0x15(%rcx),%ecx
imul   $0xab,%ecx,%edx
shr    $0x9,%edx
and    $0xfffffff8,%edx
lea    (%rdx,%rdx,2),%edx
sub    %dl,%cl
add    $0x1,%cl
movzbl %cl,%ecx
add    $0x1,%r12d
cmp    %ecx,%eax
jl     14a0 <mbia_decrypt+0x300>
mov    $0x1,%bp
lea    0x8(%rsp),%rbx
mov    %r13,%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15,%rdi
xor    %eax,%eax
call   10c0 <invpbox@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   10c0 <invpbox@plt>
movswl %bp,%eax
mov    (%r12,%r14,8),%rcx
movzbl 0x4(%rcx),%ecx
and    $0xf,%ecx
add    $0x1,%ecx
add    $0x1,%ebp
cmp    %ecx,%eax
jl     1550 <mbia_decrypt+0x3b0>
lea    -0x1(%r14),%rax
test   %r14,%r14
mov    %rax,%r14
lea    0xe(%rsp),%rsi
lea    0xa6e(%rip),%rdi
jg     1350 <mbia_decrypt+0x1b0>
mov    0x10(%rsp),%rbp
lea    0x2(%rbp),%r14
mov    (%r12),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    (%r12),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    (%r12),%rdi
call   1040 <free@plt>
mov    0x8(%r12),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    0x8(%r12),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    0x8(%r12),%rdi
call   1040 <free@plt>
mov    0x10(%r12),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    0x10(%r12),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    0x10(%r12),%rdi
call   1040 <free@plt>
mov    0x18(%r12),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    0x18(%r12),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    0x18(%r12),%rdi
call   1040 <free@plt>
mov    0x20(%r12),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    0x20(%r12),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    0x20(%r12),%rdi
call   1040 <free@plt>
mov    0x28(%r12),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    0x28(%r12),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    0x28(%r12),%rdi
call   1040 <free@plt>
mov    0x30(%r12),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    0x30(%r12),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    0x30(%r12),%rdi
call   1040 <free@plt>
mov    0x38(%r12),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    0x38(%r12),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    0x38(%r12),%rdi
call   1040 <free@plt>
mov    0x40(%r12),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    0x40(%r12),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    0x40(%r12),%rdi
call   1040 <free@plt>
mov    0x48(%r12),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    0x48(%r12),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    0x48(%r12),%rdi
call   1040 <free@plt>
mov    $0x50,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    %r12,%rdi
call   1040 <free@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   10a0 <sboxb@plt>
mov    0x18(%rsp),%rdi
xor    %eax,%eax
call   1070 <sboxa@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <sboxa@plt>
movaps (%rsp),%xmm0
mov    0x20(%rsp),%rax
movups %xmm0,(%rax)
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @mbia_decrypt(i8* nocapture %0, i8* %1, i8* %2) {
%4 = alloca [16 x i8]
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%6 = tail call dereferenceable_or_null(80) i8* @malloc(i64 80)
%7 = bitcast i8* %6 to i8**
%8 = tail call i32 (i8**, i64, ...) bitcast (i32 (...)* @mlock to i32 (i8**, i64, ...)*)(i8** %7, i64 80)
%9 = tail call dereferenceable_or_null(32) i8* @malloc(i64 32)
store i8* %9, i8** %7
%10 = tail call i32 (i8*, i64, ...) bitcast (i32 (...)* @mlock to i32 (i8*, i64, ...)*)(i8* %9, i64 32)
%11 = tail call dereferenceable_or_null(32) i8* @malloc(i64 32)
%12 = getelementptr inbounds i8*, i8** %7, i64 1
store i8* %11, i8** %12
%13 = tail call i32 (i8*, i64, ...) bitcast (i32 (...)* @mlock to i32 (i8*, i64, ...)*)(i8* %11, i64 32)
%14 = tail call dereferenceable_or_null(32) i8* @malloc(i64 32)
%15 = getelementptr inbounds i8*, i8** %7, i64 2
store i8* %14, i8** %15
%16 = tail call i32 (i8*, i64, ...) bitcast (i32 (...)* @mlock to i32 (i8*, i64, ...)*)(i8* %14, i64 32)
%17 = tail call dereferenceable_or_null(32) i8* @malloc(i64 32)
%18 = getelementptr inbounds i8*, i8** %7, i64 3
store i8* %17, i8** %18
%19 = tail call i32 (i8*, i64, ...) bitcast (i32 (...)* @mlock to i32 (i8*, i64, ...)*)(i8* %17, i64 32)
%20 = tail call dereferenceable_or_null(32) i8* @malloc(i64 32)
%21 = getelementptr inbounds i8*, i8** %7, i64 4
store i8* %20, i8** %21
%22 = tail call i32 (i8*, i64, ...) bitcast (i32 (...)* @mlock to i32 (i8*, i64, ...)*)(i8* %20, i64 32)
%23 = tail call dereferenceable_or_null(32) i8* @malloc(i64 32)
%24 = getelementptr inbounds i8*, i8** %7, i64 5
store i8* %23, i8** %24
%25 = tail call i32 (i8*, i64, ...) bitcast (i32 (...)* @mlock to i32 (i8*, i64, ...)*)(i8* %23, i64 32)
%26 = tail call dereferenceable_or_null(32) i8* @malloc(i64 32)
%27 = getelementptr inbounds i8*, i8** %7, i64 6
store i8* %26, i8** %27
%28 = tail call i32 (i8*, i64, ...) bitcast (i32 (...)* @mlock to i32 (i8*, i64, ...)*)(i8* %26, i64 32)
%29 = tail call dereferenceable_or_null(32) i8* @malloc(i64 32)
%30 = getelementptr inbounds i8*, i8** %7, i64 7
store i8* %29, i8** %30
%31 = tail call i32 (i8*, i64, ...) bitcast (i32 (...)* @mlock to i32 (i8*, i64, ...)*)(i8* %29, i64 32)
%32 = tail call dereferenceable_or_null(32) i8* @malloc(i64 32)
%33 = getelementptr inbounds i8*, i8** %7, i64 8
store i8* %32, i8** %33
%34 = tail call i32 (i8*, i64, ...) bitcast (i32 (...)* @mlock to i32 (i8*, i64, ...)*)(i8* %32, i64 32)
%35 = tail call dereferenceable_or_null(32) i8* @malloc(i64 32)
%36 = getelementptr inbounds i8*, i8** %7, i64 9
store i8* %35, i8** %36
%37 = tail call i32 (i8*, i64, ...) bitcast (i32 (...)* @mlock to i32 (i8*, i64, ...)*)(i8* %35, i64 32)
%38 = tail call i32 (i8**, i8*, i8*, ...) bitcast (i32 (...)* @mbia_keysched to i32 (i8**, i8*, i8*, ...)*)(i8** %7, i8* %1, i8* %2)
%39 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 8
%40 = bitcast i8* %39 to i32*
%41 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 4
%42 = bitcast i8* %41 to i32*
%43 = getelementptr inbounds i8, i8* %2, i64 1
%44 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 15
%45 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 1
%46 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 2
%47 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 3
%48 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 12
%49 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 13
%50 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 14
%51 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 8
%52 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 5
%53 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 9
%54 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 6
%55 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 10
%56 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 7
%57 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 11
%58 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 9
%59 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 10
%60 = getelementptr inbounds i8, i8* %2, i64 2
%61 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 11
br label %62
62: ; preds = %3, %198
%63 = phi i64 [ 9, %3 ], [ %199, %198 ]
%64 = getelementptr inbounds i8*, i8** %7, i64 %63
%65 = load i8*, i8** %64
%66 = getelementptr inbounds i8, i8* %65, i64 15
br label %67
67: ; preds = %62, %113
%68 = phi i64 [ 0, %62 ], [ %114, %113 ]
%69 = load i8, i8* %66
%70 = and i8 %69, 3
%71 = zext i8 %70 to i32
switch i32 %71, label %112 [
i32 0, label %72
i32 1, label %82
i32 2, label %92
i32 3, label %102
]
72: ; preds = %67
%73 = add nuw nsw i64 %68, 16
%74 = getelementptr inbounds i8, i8* %65, i64 %73
%75 = load i8, i8* %74
%76 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 %68
%77 = load i8, i8* %76
%78 = sub i8 %77, %75
store i8 %78, i8* %76
%79 = getelementptr inbounds i8, i8* %65, i64 %68
%80 = load i8, i8* %79
%81 = xor i8 %80, %78
store i8 %81, i8* %76
br label %113
82: ; preds = %67
%83 = getelementptr inbounds i8, i8* %65, i64 %68
%84 = load i8, i8* %83
%85 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 %68
%86 = load i8, i8* %85
%87 = xor i8 %86, %84
%88 = add nuw nsw i64 %68, 16
%89 = getelementptr inbounds i8, i8* %65, i64 %88
%90 = load i8, i8* %89
%91 = sub i8 %87, %90
store i8 %91, i8* %85
br label %113
92: ; preds = %67
%93 = add nuw nsw i64 %68, 16
%94 = getelementptr inbounds i8, i8* %65, i64 %93
%95 = load i8, i8* %94
%96 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 %68
%97 = load i8, i8* %96
%98 = xor i8 %97, %95
store i8 %98, i8* %96
%99 = getelementptr inbounds i8, i8* %65, i64 %68
%100 = load i8, i8* %99
%101 = sub i8 %98, %100
store i8 %101, i8* %96
br label %113
102: ; preds = %67
%103 = getelementptr inbounds i8, i8* %65, i64 %68
%104 = load i8, i8* %103
%105 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 %68
%106 = load i8, i8* %105
%107 = sub i8 %106, %104
%108 = add nuw nsw i64 %68, 16
%109 = getelementptr inbounds i8, i8* %65, i64 %108
%110 = load i8, i8* %109
%111 = xor i8 %110, %107
store i8 %111, i8* %105
br label %113
112: ; preds = %67
unreachable
113: ; preds = %72, %82, %92, %102
%114 = add nuw nsw i64 %68, 1
%115 = icmp eq i64 %114, 16
br i1 %115, label %116, label %67
116: ; preds = %113
%117 = load i32, i32* %40
%118 = load i32, i32* %42
store i32 %118, i32* %40
store i32 %117, i32* %42
%119 = call i32 (i8*, ...) bitcast (i32 (...)* @invsboxb to i32 (i8*, ...)*)(i8* %41)
%120 = call i32 (i8*, ...) bitcast (i32 (...)* @invsboxa to i32 (i8*, ...)*)(i8* %51)
%121 = call i32 (i8*, ...) bitcast (i32 (...)* @invsboxb to i32 (i8*, ...)*)(i8* %52)
%122 = call i32 (i8*, ...) bitcast (i32 (...)* @invsboxa to i32 (i8*, ...)*)(i8* %53)
%123 = call i32 (i8*, ...) bitcast (i32 (...)* @invsboxb to i32 (i8*, ...)*)(i8* %54)
%124 = call i32 (i8*, ...) bitcast (i32 (...)* @invsboxa to i32 (i8*, ...)*)(i8* %55)
%125 = call i32 (i8*, ...) bitcast (i32 (...)* @invsboxb to i32 (i8*, ...)*)(i8* %56)
%126 = call i32 (i8*, ...) bitcast (i32 (...)* @invsboxa to i32 (i8*, ...)*)(i8* %57)
%127 = load i8, i8* %2
%128 = load i8, i8* %5
%129 = xor i8 %128, %127
store i8 %129, i8* %5
%130 = load i8, i8* %47
%131 = add i8 %130, %127
store i8 %131, i8* %47
%132 = load i8, i8* %54
%133 = sub i8 %132, %127
store i8 %133, i8* %54
%134 = load i8, i8* %58
%135 = xor i8 %127, %134
%136 = xor i8 %135, -1
store i8 %136, i8* %58
%137 = load i8, i8* %48
%138 = sub i8 %137, %127
store i8 %138, i8* %48
%139 = load i8, i8* %43
%140 = load i8, i8* %45
%141 = xor i8 %140, %139
store i8 %141, i8* %45
%142 = load i8, i8* %41
%143 = add i8 %142, %139
store i8 %143, i8* %41
%144 = load i8, i8* %56
%145 = sub i8 %144, %139
store i8 %145, i8* %56
%146 = load i8, i8* %59
%147 = xor i8 %139, %146
%148 = xor i8 %147, -1
store i8 %148, i8* %59
%149 = load i8, i8* %49
%150 = sub i8 %149, %139
store i8 %150, i8* %49
%151 = load i8, i8* %60
%152 = load i8, i8* %46
%153 = xor i8 %152, %151
store i8 %153, i8* %46
%154 = load i8, i8* %52
%155 = add i8 %154, %151
store i8 %155, i8* %52
%156 = load i8, i8* %39
%157 = sub i8 %156, %151
store i8 %157, i8* %39
%158 = load i8, i8* %61
%159 = xor i8 %151, %158
%160 = xor i8 %159, -1
store i8 %160, i8* %61
%161 = load i8, i8* %50
%162 = sub i8 %161, %151
store i8 %162, i8* %50
%163 = load i8, i8* %44
%164 = xor i8 %163, %139
store i8 %164, i8* %44
br label %165
165: ; preds = %116, %165
%166 = phi i16 [ 0, %116 ], [ %176, %165 ]
%167 = call i32 (i8*, ...) bitcast (i32 (...)* @invsboxa to i32 (i8*, ...)*)(i8* %5)
%168 = call i32 (i8*, ...) bitcast (i32 (...)* @invsboxb to i32 (i8*, ...)*)(i8* %45)
%169 = call i32 (i8*, ...) bitcast (i32 (...)* @invsboxb to i32 (i8*, ...)*)(i8* %46)
%170 = call i32 (i8*, ...) bitcast (i32 (...)* @invsboxa to i32 (i8*, ...)*)(i8* %47)
%171 = call i32 (i8*, ...) bitcast (i32 (...)* @invpbox to i32 (i8*, ...)*)(i8* %41)
%172 = call i32 (i8*, ...) bitcast (i32 (...)* @invsboxb to i32 (i8*, ...)*)(i8* %48)
%173 = call i32 (i8*, ...) bitcast (i32 (...)* @invsboxa to i32 (i8*, ...)*)(i8* %49)
%174 = call i32 (i8*, ...) bitcast (i32 (...)* @invsboxa to i32 (i8*, ...)*)(i8* %50)
%175 = call i32 (i8*, ...) bitcast (i32 (...)* @invsboxb to i32 (i8*, ...)*)(i8* %44)
%176 = add i16 %166, 1
%177 = sext i16 %176 to i32
%178 = load i8*, i8** %64
%179 = getelementptr inbounds i8, i8* %178, i64 21
%180 = load i8, i8* %179
%181 = urem i8 %180, 24
%182 = add nuw nsw i8 %181, 1
%183 = zext i8 %182 to i32
%184 = icmp slt i32 %177, %183
br i1 %184, label %165, label %185
185: ; preds = %165, %185
%186 = phi i16 [ %189, %185 ], [ 0, %165 ]
%187 = call i32 (i8*, ...) bitcast (i32 (...)* @invpbox to i32 (i8*, ...)*)(i8* %5)
%188 = call i32 (i8*, ...) bitcast (i32 (...)* @invpbox to i32 (i8*, ...)*)(i8* %39)
%189 = add i16 %186, 1
%190 = sext i16 %189 to i32
%191 = load i8*, i8** %64
%192 = getelementptr inbounds i8, i8* %191, i64 4
%193 = load i8, i8* %192
%194 = and i8 %193, 15
%195 = add nuw nsw i8 %194, 1
%196 = zext i8 %195 to i32
%197 = icmp slt i32 %190, %196
br i1 %197, label %185, label %198
198: ; preds = %185
%199 = add nsw i64 %63, -1
%200 = icmp sgt i64 %63, 0
br i1 %200, label %62, label %201
201: ; preds = %198
%202 = getelementptr inbounds i8, i8* %2, i64 2
%203 = load i8*, i8** %7
%204 = load i8*, i8** %7
%205 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @munlock to i32 (i8*, i64, ...)*)(i8* %204, i64 32)
%206 = load i8*, i8** %7
%207 = load i8*, i8** %12
%208 = load i8*, i8** %12
%209 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @munlock to i32 (i8*, i64, ...)*)(i8* %208, i64 32)
%210 = load i8*, i8** %12
%211 = load i8*, i8** %15
%212 = load i8*, i8** %15
%213 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @munlock to i32 (i8*, i64, ...)*)(i8* %212, i64 32)
%214 = load i8*, i8** %15
%215 = load i8*, i8** %18
%216 = load i8*, i8** %18
%217 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @munlock to i32 (i8*, i64, ...)*)(i8* %216, i64 32)
%218 = load i8*, i8** %18
%219 = load i8*, i8** %21
%220 = load i8*, i8** %21
%221 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @munlock to i32 (i8*, i64, ...)*)(i8* %220, i64 32)
%222 = load i8*, i8** %21
%223 = load i8*, i8** %24
%224 = load i8*, i8** %24
%225 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @munlock to i32 (i8*, i64, ...)*)(i8* %224, i64 32)
%226 = load i8*, i8** %24
%227 = load i8*, i8** %27
%228 = load i8*, i8** %27
%229 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @munlock to i32 (i8*, i64, ...)*)(i8* %228, i64 32)
%230 = load i8*, i8** %27
%231 = load i8*, i8** %30
%232 = load i8*, i8** %30
%233 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @munlock to i32 (i8*, i64, ...)*)(i8* %232, i64 32)
%234 = load i8*, i8** %30
%235 = load i8*, i8** %33
%236 = load i8*, i8** %33
%237 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @munlock to i32 (i8*, i64, ...)*)(i8* %236, i64 32)
%238 = load i8*, i8** %33
%239 = load i8*, i8** %36
%240 = load i8*, i8** %36
%241 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @munlock to i32 (i8*, i64, ...)*)(i8* %240, i64 32)
%242 = load i8*, i8** %36
%243 = call i32 (i8**, i64, ...) bitcast (i32 (...)* @munlock to i32 (i8**, i64, ...)*)(i8** %7, i64 80)
%244 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxb to i32 (i8*, ...)*)(i8* %2)
%245 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxa to i32 (i8*, ...)*)(i8* %43)
%246 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxa to i32 (i8*, ...)*)(i8* %202)
ret void
}