void mbia_encrypt(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(keysched, key, wpcn);
  for (round = 0; round < 10; ++round) {
    for (loopcounter = 0; loopcounter < keysched[round][4] % 16 + 1;
         ++loopcounter) {
      pbox(buffer1);
      pbox(buffer1 + 8);
    }
    for (loopcounter = 0; loopcounter < keysched[round][21] % 24 + 1;
         ++loopcounter) {
      sboxa(buffer1 + 0);
      sboxb(buffer1 + 1);
      sboxb(buffer1 + 2);
      sboxa(buffer1 + 3);
      pbox(buffer1 + 4);
      sboxb(buffer1 + 12);
      sboxa(buffer1 + 13);
      sboxa(buffer1 + 14);
      sboxb(buffer1 + 15);
    }
    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 = 4; loopcounter < 8; ++loopcounter) {
      sboxb(buffer1 + loopcounter);
      sboxa(buffer1 + loopcounter + 4);
    }
    memcpy(buffer2, buffer1 + 8, 4);
    memcpy(buffer1 + 8, buffer1 + 4, 4);
    memcpy(buffer1 + 4, buffer2, 4);
    for (loopcounter = 0; loopcounter < 16; ++loopcounter) {
      switch (keysched[round][15] % 4) {
      case 0:
        buffer1[loopcounter] ^= keysched[round][loopcounter];
        buffer1[loopcounter] += keysched[round][loopcounter + 16];
        break;
      case 1:
        buffer1[loopcounter] += keysched[round][loopcounter + 16];
        buffer1[loopcounter] ^= keysched[round][loopcounter];
        break;
      case 2:
        buffer1[loopcounter] += keysched[round][loopcounter];
        buffer1[loopcounter] ^= keysched[round][loopcounter + 16];
        break;
      case 3:
        buffer1[loopcounter] ^= keysched[round][loopcounter + 16];
        buffer1[loopcounter] += keysched[round][loopcounter];
        break;
      }
    }
  }
  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_encrypt>:
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    1209 <mbia_encrypt+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    11b8 <mbia_encrypt+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   10a0 <mbia_keysched@plt>
movw   $0x0,-0x1a(%rbp)
movswl -0x1a(%rbp),%eax
cmp    $0xa,%eax
jge    1678 <mbia_encrypt+0x4f8>
movw   $0x0,-0x1c(%rbp)
movswl -0x1c(%rbp),%eax
mov    %eax,-0x48(%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    -0x48(%rbp),%eax
add    $0x1,%edx
cmp    %edx,%eax
jge    12a1 <mbia_encrypt+0x121>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1070 <pbox@plt>
lea    -0x40(%rbp),%rdi
add    $0x8,%rdi
mov    $0x0,%al
call   1070 <pbox@plt>
mov    -0x1c(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x1c(%rbp)
jmp    1248 <mbia_encrypt+0xc8>
movw   $0x0,-0x1c(%rbp)
movswl -0x1c(%rbp),%eax
mov    %eax,-0x4c(%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    -0x4c(%rbp),%eax
add    $0x1,%edx
cmp    %edx,%eax
jge    1369 <mbia_encrypt+0x1e9>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1060 <sboxa@plt>
lea    -0x40(%rbp),%rdi
add    $0x1,%rdi
mov    $0x0,%al
call   1090 <sboxb@plt>
lea    -0x40(%rbp),%rdi
add    $0x2,%rdi
mov    $0x0,%al
call   1090 <sboxb@plt>
lea    -0x40(%rbp),%rdi
add    $0x3,%rdi
mov    $0x0,%al
call   1060 <sboxa@plt>
lea    -0x40(%rbp),%rdi
add    $0x4,%rdi
mov    $0x0,%al
call   1070 <pbox@plt>
lea    -0x40(%rbp),%rdi
add    $0xc,%rdi
mov    $0x0,%al
call   1090 <sboxb@plt>
lea    -0x40(%rbp),%rdi
add    $0xd,%rdi
mov    $0x0,%al
call   1060 <sboxa@plt>
lea    -0x40(%rbp),%rdi
add    $0xe,%rdi
mov    $0x0,%al
call   1060 <sboxa@plt>
lea    -0x40(%rbp),%rdi
add    $0xf,%rdi
mov    $0x0,%al
call   1090 <sboxb@plt>
mov    -0x1c(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x1c(%rbp)
jmp    12a7 <mbia_encrypt+0x127>
movw   $0x0,-0x1c(%rbp)
movswl -0x1c(%rbp),%eax
cmp    $0x3,%eax
jge    143c <mbia_encrypt+0x2bc>
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
sub    %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
add    %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
add    %edx,%ecx
mov    %cl,-0x40(%rbp,%rax,1)
mov    -0x1c(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x1c(%rbp)
jmp    136f <mbia_encrypt+0x1ef>
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%ecx
movzbl -0x31(%rbp),%eax
xor    %ecx,%eax
mov    %al,-0x31(%rbp)
movw   $0x4,-0x1c(%rbp)
movswl -0x1c(%rbp),%eax
cmp    $0x8,%eax
jge    149d <mbia_encrypt+0x31d>
lea    -0x40(%rbp),%rdi
movswl -0x1c(%rbp),%eax
cltq
add    %rax,%rdi
mov    $0x0,%al
call   1090 <sboxb@plt>
lea    -0x40(%rbp),%rdi
movswl -0x1c(%rbp),%eax
cltq
add    %rax,%rdi
add    $0x4,%rdi
mov    $0x0,%al
call   1060 <sboxa@plt>
mov    -0x1c(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x1c(%rbp)
jmp    1453 <mbia_encrypt+0x2d3>
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   $0x0,-0x1c(%rbp)
movswl -0x1c(%rbp),%eax
cmp    $0x10,%eax
jge    1662 <mbia_encrypt+0x4e2>
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,-0x58(%rbp)
sub    $0x3,%eax
ja     164c <mbia_encrypt+0x4cc>
mov    -0x58(%rbp),%rax
lea    0xb10(%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
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
add    %edx,%ecx
mov    %cl,-0x40(%rbp,%rax,1)
jmp    164c <mbia_encrypt+0x4cc>
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
add    %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    164c <mbia_encrypt+0x4cc>
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
add    %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    164c <mbia_encrypt+0x4cc>
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
add    %edx,%ecx
mov    %cl,-0x40(%rbp,%rax,1)
jmp    1651 <mbia_encrypt+0x4d1>
mov    -0x1c(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x1c(%rbp)
jmp    14b5 <mbia_encrypt+0x335>
jmp    1667 <mbia_encrypt+0x4e7>
mov    -0x1a(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x1a(%rbp)
jmp    1235 <mbia_encrypt+0xb5>
movw   $0x0,-0x1c(%rbp)
movswl -0x1c(%rbp),%eax
cmp    $0xa,%eax
jge    16ff <mbia_encrypt+0x57f>
mov    -0x28(%rbp),%rax
movswq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x971(%rip),%rcx
mov    %rcx,(%rax)
mov    0x96f(%rip),%rcx
mov    %rcx,0x8(%rax)
mov    0x96c(%rip),%rcx
mov    %rcx,0x10(%rax)
mov    0x969(%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    167e <mbia_encrypt+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   1090 <sboxb@plt>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
mov    $0x0,%al
call   1060 <sboxa@plt>
mov    -0x18(%rbp),%rdi
add    $0x2,%rdi
mov    $0x0,%al
call   1060 <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_encrypt>:
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,%rbx
mov    $0x50,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,(%rbx)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,0x8(%rbx)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,0x10(%rbx)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,0x18(%rbx)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,0x20(%rbx)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,0x28(%rbx)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,0x30(%rbx)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,0x38(%rbx)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,0x40(%rbx)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,0x48(%rbx)
mov    $0x20,%esi
mov    %rax,%rdi
xor    %eax,%eax
call   1050 <mlock@plt>
mov    %r15,0x20(%rsp)
movups (%r15),%xmm0
movaps %xmm0,(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   10a0 <mbia_keysched@plt>
mov    %rbx,%rsi
lea    0x8(%rsp),%r13
mov    %rbp,0x10(%rsp)
lea    0x1(%rbp),%rax
mov    %rax,0x18(%rsp)
mov    %rsp,%r14
xor    %r12d,%r12d
jmp    131e <mbia_encrypt+0x19e>
nop
add    $0x1,%r12
cmp    $0xa,%r12
je     1560 <mbia_encrypt+0x3e0>
mov    $0x1,%bx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rsi,%rbp
mov    %r14,%rdi
xor    %eax,%eax
call   1070 <pbox@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1070 <pbox@plt>
mov    %rbp,%rsi
movswl %bx,%eax
mov    0x0(%rbp,%r12,8),%rcx
movzbl 0x4(%rcx),%ecx
and    $0xf,%ecx
add    $0x1,%ecx
add    $0x1,%ebx
cmp    %ecx,%eax
jl     1330 <mbia_encrypt+0x1b0>
mov    $0x1,%r13w
mov    %rsi,%r14
lea    0x4(%rsp),%rbp
lea    0xe(%rsp),%r15
lea    0xf(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
mov    %rsp,%rdi
xor    %eax,%eax
call   1060 <sboxa@plt>
lea    0x1(%rsp),%rdi
xor    %eax,%eax
call   1090 <sboxb@plt>
lea    0x2(%rsp),%rdi
xor    %eax,%eax
call   1090 <sboxb@plt>
lea    0x3(%rsp),%rdi
xor    %eax,%eax
call   1060 <sboxa@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   1070 <pbox@plt>
lea    0xc(%rsp),%rdi
xor    %eax,%eax
call   1090 <sboxb@plt>
lea    0xd(%rsp),%rdi
xor    %eax,%eax
call   1060 <sboxa@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <sboxa@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <sboxb@plt>
movswl %r13w,%eax
mov    (%r14,%r12,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,%r13d
cmp    %ecx,%eax
jl     1380 <mbia_encrypt+0x200>
mov    0x10(%rsp),%rdx
mov    (%rdx),%al
xor    %al,(%rsp)
sub    %al,0x3(%rsp)
add    %al,0x6(%rsp)
mov    0x9(%rsp),%cl
xor    %al,%cl
not    %cl
mov    %cl,0x9(%rsp)
add    %al,0xc(%rsp)
mov    0x1(%rdx),%al
xor    %al,0x1(%rsp)
sub    %al,0x4(%rsp)
add    %al,0x7(%rsp)
mov    0xa(%rsp),%cl
xor    %al,%cl
not    %cl
mov    %cl,0xa(%rsp)
add    %al,0xd(%rsp)
mov    0x2(%rdx),%cl
xor    %cl,0x2(%rsp)
sub    %cl,0x5(%rsp)
add    %cl,0x8(%rsp)
mov    0xb(%rsp),%dl
xor    %cl,%dl
not    %dl
mov    %dl,0xb(%rsp)
add    %cl,0xe(%rsp)
xor    %al,0xf(%rsp)
mov    %rbp,%rdi
xor    %eax,%eax
call   1090 <sboxb@plt>
lea    0x8(%rsp),%r13
mov    %r13,%rdi
xor    %eax,%eax
call   1060 <sboxa@plt>
lea    0x5(%rsp),%rdi
xor    %eax,%eax
call   1090 <sboxb@plt>
lea    0x9(%rsp),%rdi
xor    %eax,%eax
call   1060 <sboxa@plt>
lea    0x6(%rsp),%rdi
xor    %eax,%eax
call   1090 <sboxb@plt>
lea    0xa(%rsp),%rdi
xor    %eax,%eax
call   1060 <sboxa@plt>
lea    0x7(%rsp),%rdi
xor    %eax,%eax
call   1090 <sboxb@plt>
lea    0xb(%rsp),%rdi
xor    %eax,%eax
call   1060 <sboxa@plt>
rolq   $0x20,0x4(%rsp)
mov    (%r14,%r12,8),%rax
xor    %ecx,%ecx
mov    %r14,%rsi
mov    %rsp,%r14
lea    0xb0f(%rip),%rdi
jmp    151c <mbia_encrypt+0x39c>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rsp,%rcx,1),%edx
add    (%rax,%rcx,1),%dl
xor    0x10(%rax,%rcx,1),%dl
mov    %dl,(%rsp,%rcx,1)
add    $0x1,%rcx
cmp    $0x10,%rcx
je     1310 <mbia_encrypt+0x190>
movzbl 0xf(%rax),%edx
and    $0x3,%edx
movslq (%rdi,%rdx,4),%rdx
add    %rdi,%rdx
jmp    *%rdx
movzbl (%rsp,%rcx,1),%edx
xor    (%rax,%rcx,1),%dl
add    0x10(%rax,%rcx,1),%dl
jmp    150b <mbia_encrypt+0x38b>
nopl   0x0(%rax)
movzbl (%rsp,%rcx,1),%edx
add    0x10(%rax,%rcx,1),%dl
mov    %dl,(%rsp,%rcx,1)
xor    (%rax,%rcx,1),%dl
jmp    150b <mbia_encrypt+0x38b>
movzbl (%rsp,%rcx,1),%edx
xor    0x10(%rax,%rcx,1),%dl
mov    %dl,(%rsp,%rcx,1)
add    (%rax,%rcx,1),%dl
jmp    150b <mbia_encrypt+0x38b>
mov    0x10(%rsp),%rbx
lea    0x2(%rbx),%r14
mov    (%rsi),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    %rsi,%rbp
mov    (%rsi),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    0x0(%rbp),%rdi
call   1040 <free@plt>
mov    0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    0x8(%rbp),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    0x8(%rbp),%rdi
call   1040 <free@plt>
mov    0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    0x10(%rbp),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    0x10(%rbp),%rdi
call   1040 <free@plt>
mov    0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    0x18(%rbp),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    0x18(%rbp),%rdi
call   1040 <free@plt>
mov    0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    0x20(%rbp),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    0x20(%rbp),%rdi
call   1040 <free@plt>
mov    0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    0x28(%rbp),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    0x28(%rbp),%rdi
call   1040 <free@plt>
mov    0x30(%rbp),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    0x30(%rbp),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    0x30(%rbp),%rdi
call   1040 <free@plt>
mov    0x38(%rbp),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    0x38(%rbp),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    0x38(%rbp),%rdi
call   1040 <free@plt>
mov    0x40(%rbp),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    0x40(%rbp),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    0x40(%rbp),%rdi
call   1040 <free@plt>
mov    0x48(%rbp),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rax)
movups %xmm0,(%rax)
mov    0x48(%rbp),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    0x48(%rbp),%rdi
call   1040 <free@plt>
mov    $0x50,%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1030 <munlock@plt>
mov    %rbp,%rdi
call   1040 <free@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <sboxb@plt>
mov    0x18(%rsp),%rdi
xor    %eax,%eax
call   1060 <sboxa@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <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_encrypt(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 0, i16* %7
br label %42
42: ; preds = %413, %35
%43 = load i16, i16* %7
%44 = sext i16 %43 to i32
%45 = icmp slt i32 %44, 10
br i1 %45, label %46, label %416
46: ; preds = %42
store i16 0, i16* %8
br label %47
47: ; preds = %67, %46
%48 = load i16, i16* %8
%49 = sext i16 %48 to i32
%50 = load i8**, i8*** %9
%51 = load i16, i16* %7
%52 = sext i16 %51 to i64
%53 = getelementptr inbounds i8*, i8** %50, i64 %52
%54 = load i8*, i8** %53
%55 = getelementptr inbounds i8, i8* %54, i64 4
%56 = load i8, i8* %55
%57 = zext i8 %56 to i32
%58 = srem i32 %57, 16
%59 = add nsw i32 %58, 1
%60 = icmp slt i32 %49, %59
br i1 %60, label %61, label %70
61: ; preds = %47
%62 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%63 = call i32 (i8*, ...) bitcast (i32 (...)* @pbox to i32 (i8*, ...)*)(i8* %62)
%64 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%65 = getelementptr inbounds i8, i8* %64, i64 8
%66 = call i32 (i8*, ...) bitcast (i32 (...)* @pbox to i32 (i8*, ...)*)(i8* %65)
br label %67
67: ; preds = %61
%68 = load i16, i16* %8
%69 = add i16 %68, 1
store i16 %69, i16* %8
br label %47
70: ; preds = %47
store i16 0, i16* %8
br label %71
71: ; preds = %113, %70
%72 = load i16, i16* %8
%73 = sext i16 %72 to i32
%74 = load i8**, i8*** %9
%75 = load i16, i16* %7
%76 = sext i16 %75 to i64
%77 = getelementptr inbounds i8*, i8** %74, i64 %76
%78 = load i8*, i8** %77
%79 = getelementptr inbounds i8, i8* %78, i64 21
%80 = load i8, i8* %79
%81 = zext i8 %80 to i32
%82 = srem i32 %81, 24
%83 = add nsw i32 %82, 1
%84 = icmp slt i32 %73, %83
br i1 %84, label %85, label %116
85: ; preds = %71
%86 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%87 = getelementptr inbounds i8, i8* %86, i64 0
%88 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxa to i32 (i8*, ...)*)(i8* %87)
%89 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%90 = getelementptr inbounds i8, i8* %89, i64 1
%91 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxb to i32 (i8*, ...)*)(i8* %90)
%92 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%93 = getelementptr inbounds i8, i8* %92, i64 2
%94 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxb to i32 (i8*, ...)*)(i8* %93)
%95 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%96 = getelementptr inbounds i8, i8* %95, i64 3
%97 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxa to i32 (i8*, ...)*)(i8* %96)
%98 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%99 = getelementptr inbounds i8, i8* %98, i64 4
%100 = call i32 (i8*, ...) bitcast (i32 (...)* @pbox to i32 (i8*, ...)*)(i8* %99)
%101 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%102 = getelementptr inbounds i8, i8* %101, i64 12
%103 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxb to i32 (i8*, ...)*)(i8* %102)
%104 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%105 = getelementptr inbounds i8, i8* %104, i64 13
%106 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxa to i32 (i8*, ...)*)(i8* %105)
%107 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%108 = getelementptr inbounds i8, i8* %107, i64 14
%109 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxa to i32 (i8*, ...)*)(i8* %108)
%110 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%111 = getelementptr inbounds i8, i8* %110, i64 15
%112 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxb to i32 (i8*, ...)*)(i8* %111)
br label %113
113: ; preds = %85
%114 = load i16, i16* %8
%115 = add i16 %114, 1
store i16 %115, i16* %8
br label %71
116: ; preds = %71
store i16 0, i16* %8
br label %117
117: ; preds = %201, %116
%118 = load i16, i16* %8
%119 = sext i16 %118 to i32
%120 = icmp slt i32 %119, 3
br i1 %120, label %121, label %204
121: ; preds = %117
%122 = load i8*, i8** %6
%123 = load i16, i16* %8
%124 = sext i16 %123 to i64
%125 = getelementptr inbounds i8, i8* %122, 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 = xor i32 %132, %127
%134 = trunc i32 %133 to i8
store i8 %134, i8* %130
%135 = load i8*, i8** %6
%136 = load i16, i16* %8
%137 = sext i16 %136 to i64
%138 = getelementptr inbounds i8, i8* %135, i64 %137
%139 = load i8, i8* %138
%140 = zext i8 %139 to i32
%141 = load i16, i16* %8
%142 = sext i16 %141 to i32
%143 = add nsw i32 %142, 3
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 %144
%146 = load i8, i8* %145
%147 = zext i8 %146 to i32
%148 = sub nsw i32 %147, %140
%149 = trunc i32 %148 to i8
store i8 %149, i8* %145
%150 = load i8*, i8** %6
%151 = load i16, i16* %8
%152 = sext i16 %151 to i64
%153 = getelementptr inbounds i8, i8* %150, i64 %152
%154 = load i8, i8* %153
%155 = zext i8 %154 to i32
%156 = load i16, i16* %8
%157 = sext i16 %156 to i32
%158 = add nsw i32 %157, 6
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 %159
%161 = load i8, i8* %160
%162 = zext i8 %161 to i32
%163 = add nsw i32 %162, %155
%164 = trunc i32 %163 to i8
store i8 %164, i8* %160
%165 = load i16, i16* %8
%166 = sext i16 %165 to i32
%167 = add nsw i32 %166, 9
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 %168
%170 = load i8, i8* %169
%171 = zext i8 %170 to i32
%172 = load i8*, i8** %6
%173 = load i16, i16* %8
%174 = sext i16 %173 to i64
%175 = getelementptr inbounds i8, i8* %172, i64 %174
%176 = load i8, i8* %175
%177 = zext i8 %176 to i32
%178 = xor i32 %171, %177
%179 = xor i32 %178, -1
%180 = trunc i32 %179 to i8
%181 = load i16, i16* %8
%182 = sext i16 %181 to i32
%183 = add nsw i32 %182, 9
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 %184
store i8 %180, i8* %185
%186 = load i8*, i8** %6
%187 = load i16, i16* %8
%188 = sext i16 %187 to i64
%189 = getelementptr inbounds i8, i8* %186, i64 %188
%190 = load i8, i8* %189
%191 = zext i8 %190 to i32
%192 = load i16, i16* %8
%193 = sext i16 %192 to i32
%194 = add nsw i32 %193, 12
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 %195
%197 = load i8, i8* %196
%198 = zext i8 %197 to i32
%199 = add nsw i32 %198, %191
%200 = trunc i32 %199 to i8
store i8 %200, i8* %196
br label %201
201: ; preds = %121
%202 = load i16, i16* %8
%203 = add i16 %202, 1
store i16 %203, i16* %8
br label %117
204: ; preds = %117
%205 = load i8*, i8** %6
%206 = getelementptr inbounds i8, i8* %205, i64 1
%207 = load i8, i8* %206
%208 = zext i8 %207 to i32
%209 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 15
%210 = load i8, i8* %209
%211 = zext i8 %210 to i32
%212 = xor i32 %211, %208
%213 = trunc i32 %212 to i8
store i8 %213, i8* %209
store i16 4, i16* %8
br label %214
214: ; preds = %232, %204
%215 = load i16, i16* %8
%216 = sext i16 %215 to i32
%217 = icmp slt i32 %216, 8
br i1 %217, label %218, label %235
218: ; preds = %214
%219 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%220 = load i16, i16* %8
%221 = sext i16 %220 to i32
%222 = sext i32 %221 to i64
%223 = getelementptr inbounds i8, i8* %219, i64 %222
%224 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxb to i32 (i8*, ...)*)(i8* %223)
%225 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%226 = load i16, i16* %8
%227 = sext i16 %226 to i32
%228 = sext i32 %227 to i64
%229 = getelementptr inbounds i8, i8* %225, i64 %228
%230 = getelementptr inbounds i8, i8* %229, i64 4
%231 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxa to i32 (i8*, ...)*)(i8* %230)
br label %232
232: ; preds = %218
%233 = load i16, i16* %8
%234 = add i16 %233, 1
store i16 %234, i16* %8
br label %214
235: ; preds = %214
%236 = getelementptr inbounds [4 x i8], [4 x i8]* %11, i64 0, i64 0
%237 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%238 = getelementptr inbounds i8, i8* %237, i64 8
%239 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%240 = getelementptr inbounds i8, i8* %239, i64 8
%241 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%242 = getelementptr inbounds i8, i8* %241, i64 4
%243 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%244 = getelementptr inbounds i8, i8* %243, i64 4
%245 = getelementptr inbounds [4 x i8], [4 x i8]* %11, i64 0, i64 0
store i16 0, i16* %8
br label %246
246: ; preds = %409, %235
%247 = load i16, i16* %8
%248 = sext i16 %247 to i32
%249 = icmp slt i32 %248, 16
br i1 %249, label %250, label %412
250: ; preds = %246
%251 = load i8**, i8*** %9
%252 = load i16, i16* %7
%253 = sext i16 %252 to i64
%254 = getelementptr inbounds i8*, i8** %251, i64 %253
%255 = load i8*, i8** %254
%256 = getelementptr inbounds i8, i8* %255, i64 15
%257 = load i8, i8* %256
%258 = zext i8 %257 to i32
%259 = srem i32 %258, 4
switch i32 %259, label %408 [
i32 0, label %260
i32 1, label %297
i32 2, label %334
i32 3, label %371
]
260: ; preds = %250
%261 = load i8**, i8*** %9
%262 = load i16, i16* %7
%263 = sext i16 %262 to i64
%264 = getelementptr inbounds i8*, i8** %261, i64 %263
%265 = load i8*, i8** %264
%266 = load i16, i16* %8
%267 = sext i16 %266 to i64
%268 = getelementptr inbounds i8, i8* %265, i64 %267
%269 = load i8, i8* %268
%270 = zext i8 %269 to i32
%271 = load i16, i16* %8
%272 = sext i16 %271 to i64
%273 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 %272
%274 = load i8, i8* %273
%275 = zext i8 %274 to i32
%276 = xor i32 %275, %270
%277 = trunc i32 %276 to i8
store i8 %277, i8* %273
%278 = load i8**, i8*** %9
%279 = load i16, i16* %7
%280 = sext i16 %279 to i64
%281 = getelementptr inbounds i8*, i8** %278, i64 %280
%282 = load i8*, i8** %281
%283 = load i16, i16* %8
%284 = sext i16 %283 to i32
%285 = add nsw i32 %284, 16
%286 = sext i32 %285 to i64
%287 = getelementptr inbounds i8, i8* %282, i64 %286
%288 = load i8, i8* %287
%289 = zext i8 %288 to i32
%290 = load i16, i16* %8
%291 = sext i16 %290 to i64
%292 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 %291
%293 = load i8, i8* %292
%294 = zext i8 %293 to i32
%295 = add nsw i32 %294, %289
%296 = trunc i32 %295 to i8
store i8 %296, i8* %292
br label %408
297: ; preds = %250
%298 = load i8**, i8*** %9
%299 = load i16, i16* %7
%300 = sext i16 %299 to i64
%301 = getelementptr inbounds i8*, i8** %298, i64 %300
%302 = load i8*, i8** %301
%303 = load i16, i16* %8
%304 = sext i16 %303 to i32
%305 = add nsw i32 %304, 16
%306 = sext i32 %305 to i64
%307 = getelementptr inbounds i8, i8* %302, i64 %306
%308 = load i8, i8* %307
%309 = zext i8 %308 to i32
%310 = load i16, i16* %8
%311 = sext i16 %310 to i64
%312 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 %311
%313 = load i8, i8* %312
%314 = zext i8 %313 to i32
%315 = add nsw i32 %314, %309
%316 = trunc i32 %315 to i8
store i8 %316, i8* %312
%317 = load i8**, i8*** %9
%318 = load i16, i16* %7
%319 = sext i16 %318 to i64
%320 = getelementptr inbounds i8*, i8** %317, i64 %319
%321 = load i8*, i8** %320
%322 = load i16, i16* %8
%323 = sext i16 %322 to i64
%324 = getelementptr inbounds i8, i8* %321, i64 %323
%325 = load i8, i8* %324
%326 = zext i8 %325 to i32
%327 = load i16, i16* %8
%328 = sext i16 %327 to i64
%329 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 %328
%330 = load i8, i8* %329
%331 = zext i8 %330 to i32
%332 = xor i32 %331, %326
%333 = trunc i32 %332 to i8
store i8 %333, i8* %329
br label %408
334: ; preds = %250
%335 = load i8**, i8*** %9
%336 = load i16, i16* %7
%337 = sext i16 %336 to i64
%338 = getelementptr inbounds i8*, i8** %335, i64 %337
%339 = load i8*, i8** %338
%340 = load i16, i16* %8
%341 = sext i16 %340 to i64
%342 = getelementptr inbounds i8, i8* %339, i64 %341
%343 = load i8, i8* %342
%344 = zext i8 %343 to i32
%345 = load i16, i16* %8
%346 = sext i16 %345 to i64
%347 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 %346
%348 = load i8, i8* %347
%349 = zext i8 %348 to i32
%350 = add nsw i32 %349, %344
%351 = trunc i32 %350 to i8
store i8 %351, i8* %347
%352 = load i8**, i8*** %9
%353 = load i16, i16* %7
%354 = sext i16 %353 to i64
%355 = getelementptr inbounds i8*, i8** %352, i64 %354
%356 = load i8*, i8** %355
%357 = load i16, i16* %8
%358 = sext i16 %357 to i32
%359 = add nsw i32 %358, 16
%360 = sext i32 %359 to i64
%361 = getelementptr inbounds i8, i8* %356, i64 %360
%362 = load i8, i8* %361
%363 = zext i8 %362 to i32
%364 = load i16, i16* %8
%365 = sext i16 %364 to i64
%366 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 %365
%367 = load i8, i8* %366
%368 = zext i8 %367 to i32
%369 = xor i32 %368, %363
%370 = trunc i32 %369 to i8
store i8 %370, i8* %366
br label %408
371: ; preds = %250
%372 = load i8**, i8*** %9
%373 = load i16, i16* %7
%374 = sext i16 %373 to i64
%375 = getelementptr inbounds i8*, i8** %372, i64 %374
%376 = load i8*, i8** %375
%377 = load i16, i16* %8
%378 = sext i16 %377 to i32
%379 = add nsw i32 %378, 16
%380 = sext i32 %379 to i64
%381 = getelementptr inbounds i8, i8* %376, i64 %380
%382 = load i8, i8* %381
%383 = zext i8 %382 to i32
%384 = load i16, i16* %8
%385 = sext i16 %384 to i64
%386 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 %385
%387 = load i8, i8* %386
%388 = zext i8 %387 to i32
%389 = xor i32 %388, %383
%390 = trunc i32 %389 to i8
store i8 %390, i8* %386
%391 = load i8**, i8*** %9
%392 = load i16, i16* %7
%393 = sext i16 %392 to i64
%394 = getelementptr inbounds i8*, i8** %391, i64 %393
%395 = load i8*, i8** %394
%396 = load i16, i16* %8
%397 = sext i16 %396 to i64
%398 = getelementptr inbounds i8, i8* %395, i64 %397
%399 = load i8, i8* %398
%400 = zext i8 %399 to i32
%401 = load i16, i16* %8
%402 = sext i16 %401 to i64
%403 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 %402
%404 = load i8, i8* %403
%405 = zext i8 %404 to i32
%406 = add nsw i32 %405, %400
%407 = trunc i32 %406 to i8
store i8 %407, i8* %403
br label %408
408: ; preds = %250, %371, %334, %297, %260
br label %409
409: ; preds = %408
%410 = load i16, i16* %8
%411 = add i16 %410, 1
store i16 %411, i16* %8
br label %246
412: ; preds = %246
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_encrypt(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 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 1
%41 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 2
%42 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 3
%43 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 4
%44 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 12
%45 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 13
%46 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 14
%47 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 15
%48 = getelementptr inbounds i8, i8* %2, i64 1
%49 = bitcast i8* %39 to i32*
%50 = bitcast i8* %43 to i32*
%51 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 6
%52 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 9
%53 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 7
%54 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 10
%55 = getelementptr inbounds i8, i8* %2, i64 2
%56 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 5
%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 8
%59 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 9
%60 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 10
%61 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 11
br label %62
62: ; preds = %3, %198
%63 = phi i64 [ 0, %3 ], [ %199, %198 ]
%64 = getelementptr inbounds i8*, i8** %7, i64 %63
br label %65
65: ; preds = %62, %65
%66 = phi i16 [ 0, %62 ], [ %69, %65 ]
%67 = call i32 (i8*, ...) bitcast (i32 (...)* @pbox to i32 (i8*, ...)*)(i8* %5)
%68 = call i32 (i8*, ...) bitcast (i32 (...)* @pbox to i32 (i8*, ...)*)(i8* %39)
%69 = add i16 %66, 1
%70 = sext i16 %69 to i32
%71 = load i8*, i8** %64
%72 = getelementptr inbounds i8, i8* %71, i64 4
%73 = load i8, i8* %72
%74 = and i8 %73, 15
%75 = add nuw nsw i8 %74, 1
%76 = zext i8 %75 to i32
%77 = icmp slt i32 %70, %76
br i1 %77, label %65, label %78
78: ; preds = %65, %78
%79 = phi i16 [ %89, %78 ], [ 0, %65 ]
%80 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxa to i32 (i8*, ...)*)(i8* %5)
%81 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxb to i32 (i8*, ...)*)(i8* %40)
%82 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxb to i32 (i8*, ...)*)(i8* %41)
%83 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxa to i32 (i8*, ...)*)(i8* %42)
%84 = call i32 (i8*, ...) bitcast (i32 (...)* @pbox to i32 (i8*, ...)*)(i8* %43)
%85 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxb to i32 (i8*, ...)*)(i8* %44)
%86 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxa to i32 (i8*, ...)*)(i8* %45)
%87 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxa to i32 (i8*, ...)*)(i8* %46)
%88 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxb to i32 (i8*, ...)*)(i8* %47)
%89 = add i16 %79, 1
%90 = sext i16 %89 to i32
%91 = load i8*, i8** %64
%92 = getelementptr inbounds i8, i8* %91, i64 21
%93 = load i8, i8* %92
%94 = urem i8 %93, 24
%95 = add nuw nsw i8 %94, 1
%96 = zext i8 %95 to i32
%97 = icmp slt i32 %90, %96
br i1 %97, label %78, label %98
98: ; preds = %78
%99 = load i8, i8* %2
%100 = load i8, i8* %5
%101 = xor i8 %100, %99
store i8 %101, i8* %5
%102 = load i8, i8* %42
%103 = sub i8 %102, %99
store i8 %103, i8* %42
%104 = load i8, i8* %51
%105 = add i8 %104, %99
store i8 %105, i8* %51
%106 = load i8, i8* %52
%107 = xor i8 %99, %106
%108 = xor i8 %107, -1
store i8 %108, i8* %52
%109 = load i8, i8* %44
%110 = add i8 %109, %99
store i8 %110, i8* %44
%111 = load i8, i8* %48
%112 = load i8, i8* %40
%113 = xor i8 %112, %111
store i8 %113, i8* %40
%114 = load i8, i8* %43
%115 = sub i8 %114, %111
store i8 %115, i8* %43
%116 = load i8, i8* %53
%117 = add i8 %116, %111
store i8 %117, i8* %53
%118 = load i8, i8* %54
%119 = xor i8 %111, %118
%120 = xor i8 %119, -1
store i8 %120, i8* %54
%121 = load i8, i8* %45
%122 = add i8 %121, %111
store i8 %122, i8* %45
%123 = load i8, i8* %55
%124 = load i8, i8* %41
%125 = xor i8 %124, %123
store i8 %125, i8* %41
%126 = load i8, i8* %56
%127 = sub i8 %126, %123
store i8 %127, i8* %56
%128 = load i8, i8* %39
%129 = add i8 %128, %123
store i8 %129, i8* %39
%130 = load i8, i8* %57
%131 = xor i8 %123, %130
%132 = xor i8 %131, -1
store i8 %132, i8* %57
%133 = load i8, i8* %46
%134 = add i8 %133, %123
store i8 %134, i8* %46
%135 = load i8, i8* %47
%136 = xor i8 %135, %111
store i8 %136, i8* %47
%137 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxb to i32 (i8*, ...)*)(i8* %43)
%138 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxa to i32 (i8*, ...)*)(i8* %58)
%139 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxb to i32 (i8*, ...)*)(i8* %56)
%140 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxa to i32 (i8*, ...)*)(i8* %59)
%141 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxb to i32 (i8*, ...)*)(i8* %51)
%142 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxa to i32 (i8*, ...)*)(i8* %60)
%143 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxb to i32 (i8*, ...)*)(i8* %53)
%144 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxa to i32 (i8*, ...)*)(i8* %61)
%145 = load i32, i32* %49
%146 = load i32, i32* %50
store i32 %146, i32* %49
store i32 %145, i32* %50
%147 = load i8*, i8** %64
%148 = getelementptr inbounds i8, i8* %147, i64 15
br label %149
149: ; preds = %98, %195
%150 = phi i64 [ 0, %98 ], [ %196, %195 ]
%151 = load i8, i8* %148
%152 = and i8 %151, 3
%153 = zext i8 %152 to i32
switch i32 %153, label %194 [
i32 0, label %154
i32 1, label %164
i32 2, label %174
i32 3, label %184
]
154: ; preds = %149
%155 = getelementptr inbounds i8, i8* %147, i64 %150
%156 = load i8, i8* %155
%157 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 %150
%158 = load i8, i8* %157
%159 = xor i8 %158, %156
%160 = add nuw nsw i64 %150, 16
%161 = getelementptr inbounds i8, i8* %147, i64 %160
%162 = load i8, i8* %161
%163 = add i8 %162, %159
store i8 %163, i8* %157
br label %195
164: ; preds = %149
%165 = add nuw nsw i64 %150, 16
%166 = getelementptr inbounds i8, i8* %147, i64 %165
%167 = load i8, i8* %166
%168 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 %150
%169 = load i8, i8* %168
%170 = add i8 %169, %167
store i8 %170, i8* %168
%171 = getelementptr inbounds i8, i8* %147, i64 %150
%172 = load i8, i8* %171
%173 = xor i8 %172, %170
store i8 %173, i8* %168
br label %195
174: ; preds = %149
%175 = getelementptr inbounds i8, i8* %147, i64 %150
%176 = load i8, i8* %175
%177 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 %150
%178 = load i8, i8* %177
%179 = add i8 %178, %176
%180 = add nuw nsw i64 %150, 16
%181 = getelementptr inbounds i8, i8* %147, i64 %180
%182 = load i8, i8* %181
%183 = xor i8 %182, %179
store i8 %183, i8* %177
br label %195
184: ; preds = %149
%185 = add nuw nsw i64 %150, 16
%186 = getelementptr inbounds i8, i8* %147, i64 %185
%187 = load i8, i8* %186
%188 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 %150
%189 = load i8, i8* %188
%190 = xor i8 %189, %187
store i8 %190, i8* %188
%191 = getelementptr inbounds i8, i8* %147, i64 %150
%192 = load i8, i8* %191
%193 = add i8 %192, %190
store i8 %193, i8* %188
br label %195
194: ; preds = %149
unreachable
195: ; preds = %154, %164, %174, %184
%196 = add nuw nsw i64 %150, 1
%197 = icmp eq i64 %196, 16
br i1 %197, label %198, label %149
198: ; preds = %195
%199 = add nuw nsw i64 %63, 1
%200 = icmp eq i64 %199, 10
br i1 %200, label %201, label %62
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* %48)
%246 = call i32 (i8*, ...) bitcast (i32 (...)* @sboxa to i32 (i8*, ...)*)(i8* %202)
ret void
}