#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct crypt_hmac {
  int dummy;
};
typedef int /*<<< orphan*/ U;
typedef int /*<<< orphan*/ T;
typedef int /*<<< orphan*/ P_hash;

/* Variables and functions */
int EINVAL;
int ENOMEM;
char *alloca(size_t);
int /*<<< orphan*/ crypt_backend_memzero(char *, size_t);
int /*<<< orphan*/ crypt_hmac_destroy(struct crypt_hmac *);
scalar_t__ crypt_hmac_final(struct crypt_hmac *, char *, unsigned int);
scalar_t__ crypt_hmac_init(struct crypt_hmac **, char const *, char const *,
                           size_t);
unsigned int crypt_hmac_size(char const *);
scalar_t__ crypt_hmac_write(struct crypt_hmac *, char *, unsigned int);
scalar_t__ hash_buf(char const *, size_t, char *, unsigned int, char const *);
int /*<<< orphan*/ memcpy(char *, char const *, unsigned int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, unsigned int);
int pkcs5_pbkdf2(const char *hash, const char *P, size_t Plen, const char *S,
                 size_t Slen, unsigned int c, unsigned int dkLen, char *DK,
                 unsigned int hash_block_size) {
  struct crypt_hmac *hmac;
  char U[80];
  char T[80];
  char P_hash[80];
  int i, k, rc = -EINVAL;
  unsigned int u, hLen, l, r;
  size_t tmplen = Slen + 4;
  char *tmp;
  tmp = alloca(tmplen);
  if (tmp == NULL)
    return -ENOMEM;
  hLen = crypt_hmac_size(hash);
  if (hLen == 0 || hLen > 80)
    return -EINVAL;
  if (c == 0)
    return -EINVAL;
  if (dkLen == 0)
    return -EINVAL;
  if (dkLen > 4294967295U)
    return -EINVAL;
  l = dkLen / hLen;
  if (dkLen % hLen)
    l++;
  r = dkLen - (l - 1) * hLen;
  if (hash_block_size > 0 && Plen > hash_block_size) {
    if (hash_buf(P, Plen, P_hash, hLen, hash))
      return -EINVAL;
    if (crypt_hmac_init(&hmac, hash, P_hash, hLen))
      return -EINVAL;
    crypt_backend_memzero(P_hash, sizeof(P_hash));
  } else {
    if (crypt_hmac_init(&hmac, hash, P, Plen))
      return -EINVAL;
  }
  for (i = 1; (unsigned int)i <= l; i++) {
    memset(T, 0, hLen);
    for (u = 1; u <= c; u++) {
      if (u == 1) {
        memcpy(tmp, S, Slen);
        tmp[Slen + 0] = (i & 0xff000000) >> 24;
        tmp[Slen + 1] = (i & 0x00ff0000) >> 16;
        tmp[Slen + 2] = (i & 0x0000ff00) >> 8;
        tmp[Slen + 3] = (i & 0x000000ff) >> 0;
        if (crypt_hmac_write(hmac, tmp, tmplen))
          goto out;
      } else {
        if (crypt_hmac_write(hmac, U, hLen))
          goto out;
      }
      if (crypt_hmac_final(hmac, U, hLen))
        goto out;
      for (k = 0; (unsigned int)k < hLen; k++)
        T[k] ^= U[k];
    }
    memcpy(DK + (i - 1) * hLen, T, (unsigned int)i == l ? r : hLen);
  }
  rc = 0;
out:
  crypt_hmac_destroy(hmac);
  crypt_backend_memzero(U, sizeof(U));
  crypt_backend_memzero(T, sizeof(T));
  crypt_backend_memzero(tmp, tmplen);
  return rc;
}


x86 assembly (clang, -O0):
<pkcs5_pbkdf2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9d,-0x34(%rbp)
xor    %eax,%eax
mov    0x2e02(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x13c(%rbp)
mov    -0x30(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x158(%rbp)
mov    -0x158(%rbp),%rdi
call   1090 <alloca@plt>
mov    %rax,-0x160(%rbp)
cmpq   $0x0,-0x160(%rbp)
jne    1221 <pkcs5_pbkdf2+0x81>
xor    %eax,%eax
mov    0x2dc9(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    168c <pkcs5_pbkdf2+0x4ec>
mov    -0x10(%rbp),%rdi
call   1030 <crypt_hmac_size@plt>
mov    %eax,-0x144(%rbp)
cmpl   $0x0,-0x144(%rbp)
je     124a <pkcs5_pbkdf2+0xaa>
cmpl   $0x50,-0x144(%rbp)
jbe    125d <pkcs5_pbkdf2+0xbd>
xor    %eax,%eax
mov    0x2d85(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    168c <pkcs5_pbkdf2+0x4ec>
cmpl   $0x0,-0x34(%rbp)
jne    127a <pkcs5_pbkdf2+0xda>
xor    %eax,%eax
mov    0x2d68(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    168c <pkcs5_pbkdf2+0x4ec>
cmpl   $0x0,0x10(%rbp)
jne    1297 <pkcs5_pbkdf2+0xf7>
xor    %eax,%eax
mov    0x2d4b(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    168c <pkcs5_pbkdf2+0x4ec>
cmpl   $0xffffffff,0x10(%rbp)
jbe    12b4 <pkcs5_pbkdf2+0x114>
xor    %eax,%eax
mov    0x2d2e(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    168c <pkcs5_pbkdf2+0x4ec>
mov    0x10(%rbp),%eax
xor    %edx,%edx
divl   -0x144(%rbp)
mov    %eax,-0x148(%rbp)
mov    0x10(%rbp),%eax
xor    %edx,%edx
divl   -0x144(%rbp)
cmp    $0x0,%edx
je     12e8 <pkcs5_pbkdf2+0x148>
mov    -0x148(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x148(%rbp)
mov    0x10(%rbp),%eax
mov    -0x148(%rbp),%ecx
sub    $0x1,%ecx
imul   -0x144(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x14c(%rbp)
cmpl   $0x0,0x20(%rbp)
jbe    13a7 <pkcs5_pbkdf2+0x207>
mov    -0x20(%rbp),%rax
mov    0x20(%rbp),%ecx
cmp    %rcx,%rax
jbe    13a7 <pkcs5_pbkdf2+0x207>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    -0x130(%rbp),%rdx
mov    -0x144(%rbp),%ecx
mov    -0x10(%rbp),%r8
call   1040 <hash_buf@plt>
cmp    $0x0,%rax
je     1358 <pkcs5_pbkdf2+0x1b8>
xor    %eax,%eax
mov    0x2c8a(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    168c <pkcs5_pbkdf2+0x4ec>
mov    -0x10(%rbp),%rsi
lea    -0x130(%rbp),%rdx
mov    -0x144(%rbp),%eax
mov    %eax,%ecx
lea    -0x40(%rbp),%rdi
call   1050 <crypt_hmac_init@plt>
cmp    $0x0,%rax
je     1391 <pkcs5_pbkdf2+0x1f1>
xor    %eax,%eax
mov    0x2c51(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    168c <pkcs5_pbkdf2+0x4ec>
lea    -0x130(%rbp),%rdi
mov    $0x50,%esi
call   1060 <crypt_backend_memzero@plt>
jmp    13de <pkcs5_pbkdf2+0x23e>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    -0x40(%rbp),%rdi
call   1050 <crypt_hmac_init@plt>
cmp    $0x0,%rax
je     13d9 <pkcs5_pbkdf2+0x239>
xor    %eax,%eax
mov    0x2c09(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    168c <pkcs5_pbkdf2+0x4ec>
jmp    13de <pkcs5_pbkdf2+0x23e>
movl   $0x1,-0x134(%rbp)
mov    -0x134(%rbp),%eax
cmp    -0x148(%rbp),%eax
ja     163b <pkcs5_pbkdf2+0x49b>
lea    -0xe0(%rbp),%rdi
mov    -0x144(%rbp),%edx
xor    %esi,%esi
call   1070 <memset@plt>
movl   $0x1,-0x140(%rbp)
mov    -0x140(%rbp),%eax
cmp    -0x34(%rbp),%eax
ja     15b1 <pkcs5_pbkdf2+0x411>
cmpl   $0x1,-0x140(%rbp)
jne    14f2 <pkcs5_pbkdf2+0x352>
mov    -0x160(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rax
mov    %eax,%edx
call   10a0 <memcpy@plt>
mov    -0x134(%rbp),%eax
and    $0xff000000,%eax
shr    $0x18,%eax
mov    %al,%dl
mov    -0x160(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x134(%rbp),%eax
and    $0xff0000,%eax
sar    $0x10,%eax
mov    %al,%dl
mov    -0x160(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    %dl,0x1(%rax,%rcx,1)
mov    -0x134(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
mov    %al,%dl
mov    -0x160(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    %dl,0x2(%rax,%rcx,1)
mov    -0x134(%rbp),%eax
and    $0xff,%eax
sar    $0x0,%eax
mov    %al,%dl
mov    -0x160(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    %dl,0x3(%rax,%rcx,1)
mov    -0x40(%rbp),%rdi
mov    -0x160(%rbp),%rsi
mov    -0x158(%rbp),%rax
mov    %eax,%edx
call   10b0 <crypt_hmac_write@plt>
cmp    $0x0,%rax
je     14ed <pkcs5_pbkdf2+0x34d>
jmp    1645 <pkcs5_pbkdf2+0x4a5>
jmp    151c <pkcs5_pbkdf2+0x37c>
mov    -0x40(%rbp),%rdi
lea    -0x90(%rbp),%rsi
mov    -0x144(%rbp),%edx
call   10b0 <crypt_hmac_write@plt>
cmp    $0x0,%rax
je     1517 <pkcs5_pbkdf2+0x377>
jmp    1645 <pkcs5_pbkdf2+0x4a5>
jmp    151c <pkcs5_pbkdf2+0x37c>
mov    -0x40(%rbp),%rdi
lea    -0x90(%rbp),%rsi
mov    -0x144(%rbp),%edx
call   10c0 <crypt_hmac_final@plt>
cmp    $0x0,%rax
je     1541 <pkcs5_pbkdf2+0x3a1>
jmp    1645 <pkcs5_pbkdf2+0x4a5>
movl   $0x0,-0x138(%rbp)
mov    -0x138(%rbp),%eax
cmp    -0x144(%rbp),%eax
jae    1598 <pkcs5_pbkdf2+0x3f8>
movslq -0x138(%rbp),%rax
movsbl -0x90(%rbp,%rax,1),%edx
ff
movslq -0x138(%rbp),%rax
movsbl -0xe0(%rbp,%rax,1),%ecx
ff
xor    %edx,%ecx
mov    %cl,-0xe0(%rbp,%rax,1)
mov    -0x138(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x138(%rbp)
jmp    154b <pkcs5_pbkdf2+0x3ab>
jmp    159d <pkcs5_pbkdf2+0x3fd>
mov    -0x140(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x140(%rbp)
jmp    1418 <pkcs5_pbkdf2+0x278>
mov    0x18(%rbp),%rax
mov    -0x134(%rbp),%ecx
sub    $0x1,%ecx
imul   -0x144(%rbp),%ecx
mov    %ecx,%ecx
add    %rcx,%rax
mov    %rax,-0x170(%rbp)
lea    -0xe0(%rbp),%rax
mov    %rax,-0x168(%rbp)
mov    -0x134(%rbp),%eax
cmp    -0x148(%rbp),%eax
jne    1602 <pkcs5_pbkdf2+0x462>
mov    -0x14c(%rbp),%eax
mov    %eax,-0x174(%rbp)
jmp    160e <pkcs5_pbkdf2+0x46e>
mov    -0x144(%rbp),%eax
mov    %eax,-0x174(%rbp)
mov    -0x168(%rbp),%rsi
mov    -0x170(%rbp),%rdi
mov    -0x174(%rbp),%edx
call   10a0 <memcpy@plt>
mov    -0x134(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x134(%rbp)
jmp    13e8 <pkcs5_pbkdf2+0x248>
movl   $0x0,-0x13c(%rbp)
mov    -0x40(%rbp),%rdi
call   1080 <crypt_hmac_destroy@plt>
lea    -0x90(%rbp),%rdi
mov    $0x50,%esi
call   1060 <crypt_backend_memzero@plt>
lea    -0xe0(%rbp),%rdi
mov    $0x50,%esi
call   1060 <crypt_backend_memzero@plt>
mov    -0x160(%rbp),%rdi
mov    -0x158(%rbp),%rsi
call   1060 <crypt_backend_memzero@plt>
mov    -0x13c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pkcs5_pbkdf2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x188,%rsp
mov    %r9d,0x1c(%rsp)
mov    %rcx,0x80(%rsp)
mov    %rdx,%r14
mov    %rsi,%r13
mov    %rdi,%r15
mov    0x2e0a(%rip),%rbx
xor    %r12d,%r12d
xor    %ebp,%ebp
sub    (%rbx),%ebp
mov    %r8,0x88(%rsp)
lea    0x4(%r8),%rdi
mov    %rdi,0x30(%rsp)
call   1090 <alloca@plt>
test   %rax,%rax
je     129e <pkcs5_pbkdf2+0xfe>
mov    %ebp,0xc(%rsp)
mov    %rax,0x28(%rsp)
mov    %r15,%rdi
call   1030 <crypt_hmac_size@plt>
mov    %eax,%ebp
lea    -0x51(%rbp),%eax
cmp    $0xffffffaf,%eax
jbe    12c2 <pkcs5_pbkdf2+0x122>
cmpl   $0x0,0x1c(%rsp)
je     12c2 <pkcs5_pbkdf2+0x122>
mov    0x1c0(%rsp),%eax
test   %eax,%eax
je     12c2 <pkcs5_pbkdf2+0x122>
mov    %eax,0x18(%rsp)
xor    %edx,%edx
div    %ebp
mov    %eax,%r12d
mov    0x1d0(%rsp),%eax
cmp    $0x1,%edx
sbb    $0xffffffff,%r12d
test   %eax,%eax
je     12aa <pkcs5_pbkdf2+0x10a>
mov    %eax,%eax
cmp    %r14,%rax
jae    12aa <pkcs5_pbkdf2+0x10a>
lea    0x130(%rsp),%rdx
mov    %r13,%rdi
mov    %r14,%rsi
mov    %ebp,%ecx
mov    %r15,%r8
call   1040 <hash_buf@plt>
test   %rax,%rax
jne    12c2 <pkcs5_pbkdf2+0x122>
mov    %ebp,%ecx
lea    0x10(%rsp),%rdi
lea    0x130(%rsp),%rdx
mov    %r15,%rsi
call   1050 <crypt_hmac_init@plt>
test   %rax,%rax
jne    12c2 <pkcs5_pbkdf2+0x122>
lea    0x130(%rsp),%rdi
mov    $0x50,%esi
call   1060 <crypt_backend_memzero@plt>
jmp    12dd <pkcs5_pbkdf2+0x13d>
mov    0x2d3b(%rip),%rax
sub    (%rax),%r12d
jmp    12c8 <pkcs5_pbkdf2+0x128>
lea    0x10(%rsp),%rdi
mov    %r15,%rsi
mov    %r13,%rdx
mov    %r14,%rcx
call   1050 <crypt_hmac_init@plt>
test   %rax,%rax
je     12dd <pkcs5_pbkdf2+0x13d>
xor    %r12d,%r12d
sub    (%rbx),%r12d
mov    %r12d,%eax
add    $0x188,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
test   %r12d,%r12d
je     15ea <pkcs5_pbkdf2+0x44a>
lea    -0x1(%r12),%eax
imul   %ebp,%eax
sub    %eax,0x18(%rsp)
mov    %r12d,%eax
mov    %rax,0x38(%rsp)
add    $0x1,%r12d
mov    %r12,0x40(%rsp)
mov    %ebp,%ebx
mov    %ebx,%eax
and    $0xffffffe0,%eax
mov    %rax,0x20(%rsp)
add    $0xffffffffffffffe0,%rax
mov    %rax,0x58(%rsp)
mov    %rax,%rcx
shr    $0x5,%rcx
add    $0x1,%rcx
mov    %rcx,%rax
mov    %rcx,0x50(%rsp)
and    $0xfffffffffffffffe,%rcx
mov    %rcx,0x48(%rsp)
mov    %ebx,%r15d
and    $0xfffffff8,%r15d
mov    $0x1,%r14d
lea    0x90(%rsp),%rdi
mov    %rbp,%r13
mov    %rbp,0x60(%rsp)
xor    %esi,%esi
mov    %r13d,%edx
call   1070 <memset@plt>
mov    %r14,%rax
shr    $0x18,%rax
mov    %rax,0x78(%rsp)
mov    %r14,%rax
shr    $0x10,%rax
mov    %rax,0x70(%rsp)
mov    %r14,%rax
shr    $0x8,%rax
mov    %rax,0x68(%rsp)
mov    $0x1,%ebp
mov    %r13,%r12
lea    0xe0(%rsp),%r13
jmp    13ad <pkcs5_pbkdf2+0x20d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebp
cmp    0x1c(%rsp),%ebp
ja     159c <pkcs5_pbkdf2+0x3fc>
cmp    $0x1,%ebp
jne    1416 <pkcs5_pbkdf2+0x276>
mov    0x28(%rsp),%r12
mov    %r12,%rdi
mov    0x80(%rsp),%rsi
mov    %r14,%r13
mov    0x88(%rsp),%r14
mov    %r14d,%edx
call   10a0 <memcpy@plt>
mov    0x78(%rsp),%rax
mov    %al,(%r12,%r14,1)
mov    0x70(%rsp),%rax
mov    %al,0x1(%r12,%r14,1)
mov    0x68(%rsp),%rax
mov    %al,0x2(%r12,%r14,1)
mov    %r13b,0x3(%r12,%r14,1)
mov    %r13,%r14
lea    0xe0(%rsp),%r13
mov    0x10(%rsp),%rdi
mov    %r12,%rsi
mov    0x60(%rsp),%r12
mov    0x30(%rsp),%rdx
jmp    1421 <pkcs5_pbkdf2+0x281>
mov    0x10(%rsp),%rdi
mov    %r13,%rsi
mov    %r12d,%edx
call   10b0 <crypt_hmac_write@plt>
test   %rax,%rax
jne    15e3 <pkcs5_pbkdf2+0x443>
mov    0x10(%rsp),%rdi
mov    %r13,%rsi
mov    %r12d,%edx
call   10c0 <crypt_hmac_final@plt>
test   %rax,%rax
jne    15e3 <pkcs5_pbkdf2+0x443>
cmp    $0x8,%r12d
jae    1455 <pkcs5_pbkdf2+0x2b5>
xor    %eax,%eax
jmp    1570 <pkcs5_pbkdf2+0x3d0>
cmp    $0x20,%r12d
jae    1462 <pkcs5_pbkdf2+0x2c2>
xor    %ecx,%ecx
jmp    1540 <pkcs5_pbkdf2+0x3a0>
cmpq   $0x0,0x58(%rsp)
je     158d <pkcs5_pbkdf2+0x3ed>
mov    0x48(%rsp),%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movaps 0x90(%rsp,%rax,1),%xmm0
movaps 0xa0(%rsp,%rax,1),%xmm1
movaps 0xb0(%rsp,%rax,1),%xmm2
movaps 0xc0(%rsp,%rax,1),%xmm3
xorps  0xe0(%rsp,%rax,1),%xmm0
xorps  0xf0(%rsp,%rax,1),%xmm1
movaps %xmm0,0x90(%rsp,%rax,1)
movaps %xmm1,0xa0(%rsp,%rax,1)
xorps  0x100(%rsp,%rax,1),%xmm2
xorps  0x110(%rsp,%rax,1),%xmm3
movaps %xmm2,0xb0(%rsp,%rax,1)
movaps %xmm3,0xc0(%rsp,%rax,1)
add    $0x40,%rax
add    $0xfffffffffffffffe,%rcx
jne    1480 <pkcs5_pbkdf2+0x2e0>
testb  $0x1,0x50(%rsp)
je     1521 <pkcs5_pbkdf2+0x381>
movaps 0x90(%rsp,%rax,1),%xmm0
movaps 0xa0(%rsp,%rax,1),%xmm1
xorps  0xe0(%rsp,%rax,1),%xmm0
xorps  0xf0(%rsp,%rax,1),%xmm1
movaps %xmm0,0x90(%rsp,%rax,1)
movaps %xmm1,0xa0(%rsp,%rax,1)
cmp    %rbx,0x20(%rsp)
je     13a0 <pkcs5_pbkdf2+0x200>
mov    0x20(%rsp),%rax
mov    %rax,%rcx
test   $0x18,%bl
je     1570 <pkcs5_pbkdf2+0x3d0>
nopl   0x0(%rax)
mov    0xe0(%rsp,%rcx,1),%rax
xor    %rax,0x90(%rsp,%rcx,1)
add    $0x8,%rcx
cmp    %rcx,%r15
jne    1540 <pkcs5_pbkdf2+0x3a0>
mov    %r15,%rax
cmp    %rbx,%r15
je     13a0 <pkcs5_pbkdf2+0x200>
cs nopw 0x0(%rax,%rax,1)
nop
movzbl 0xe0(%rsp,%rax,1),%ecx
xor    %cl,0x90(%rsp,%rax,1)
add    $0x1,%rax
cmp    %rax,%rbx
jne    1570 <pkcs5_pbkdf2+0x3d0>
jmp    13a0 <pkcs5_pbkdf2+0x200>
xor    %eax,%eax
testb  $0x1,0x50(%rsp)
jne    14f1 <pkcs5_pbkdf2+0x351>
jmp    1521 <pkcs5_pbkdf2+0x381>
lea    -0x1(%r14),%edi
imul   %r12d,%edi
add    0x1c8(%rsp),%rdi
cmp    0x38(%rsp),%r14
mov    %r12d,%edx
cmove  0x18(%rsp),%edx
lea    0x90(%rsp),%rbp
mov    %rbp,%rsi
call   10a0 <memcpy@plt>
mov    %rbp,%rdi
add    $0x1,%r14
mov    %r12,%r13
xor    %r12d,%r12d
cmp    0x40(%rsp),%r14
jne    1351 <pkcs5_pbkdf2+0x1b1>
jmp    15ed <pkcs5_pbkdf2+0x44d>
mov    0xc(%rsp),%r12d
jmp    15ed <pkcs5_pbkdf2+0x44d>
xor    %r12d,%r12d
mov    0x10(%rsp),%rdi
call   1080 <crypt_hmac_destroy@plt>
lea    0xe0(%rsp),%rdi
mov    $0x50,%esi
call   1060 <crypt_backend_memzero@plt>
lea    0x90(%rsp),%rdi
mov    $0x50,%esi
call   1060 <crypt_backend_memzero@plt>
mov    0x28(%rsp),%rdi
mov    0x30(%rsp),%rsi
call   1060 <crypt_backend_memzero@plt>
jmp    12c8 <pkcs5_pbkdf2+0x128>

LLVM IR (-O0):
%struct.crypt_hmac = type { i32 }
@EINVAL = global i32 0
@ENOMEM = global i32 0
define i32 @pkcs5_pbkdf2(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4, i32 %5, i32 %6, i8* %7, i32 %8) {
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i32
%17 = alloca i32
%18 = alloca i8*
%19 = alloca i32
%20 = alloca %struct.crypt_hmac*
%21 = alloca [80 x i8]
%22 = alloca [80 x i8]
%23 = alloca [80 x i8]
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i64
%32 = alloca i8*
store i8* %0, i8** %11
store i8* %1, i8** %12
store i64 %2, i64* %13
store i8* %3, i8** %14
store i64 %4, i64* %15
store i32 %5, i32* %16
store i32 %6, i32* %17
store i8* %7, i8** %18
store i32 %8, i32* %19
%33 = load i32, i32* @EINVAL
%34 = sub nsw i32 0, %33
store i32 %34, i32* %26
%35 = load i64, i64* %15
%36 = add i64 %35, 4
store i64 %36, i64* %31
%37 = load i64, i64* %31
%38 = call i8* @alloca(i64 %37)
store i8* %38, i8** %32
%39 = load i8*, i8** %32
%40 = icmp eq i8* %39, null
br i1 %40, label %41, label %44
41: ; preds = %9
%42 = load i32, i32* @ENOMEM
%43 = sub nsw i32 0, %42
store i32 %43, i32* %10
br label %268
44: ; preds = %9
%45 = load i8*, i8** %11
%46 = call i32 @crypt_hmac_size(i8* %45)
store i32 %46, i32* %28
%47 = load i32, i32* %28
%48 = icmp eq i32 %47, 0
br i1 %48, label %52, label %49
49: ; preds = %44
%50 = load i32, i32* %28
%51 = icmp ugt i32 %50, 80
br i1 %51, label %52, label %55
52: ; preds = %49, %44
%53 = load i32, i32* @EINVAL
%54 = sub nsw i32 0, %53
store i32 %54, i32* %10
br label %268
55: ; preds = %49
%56 = load i32, i32* %16
%57 = icmp eq i32 %56, 0
br i1 %57, label %58, label %61
58: ; preds = %55
%59 = load i32, i32* @EINVAL
%60 = sub nsw i32 0, %59
store i32 %60, i32* %10
br label %268
61: ; preds = %55
%62 = load i32, i32* %17
%63 = icmp eq i32 %62, 0
br i1 %63, label %64, label %67
64: ; preds = %61
%65 = load i32, i32* @EINVAL
%66 = sub nsw i32 0, %65
store i32 %66, i32* %10
br label %268
67: ; preds = %61
%68 = load i32, i32* %17
%69 = icmp ugt i32 %68, -1
br i1 %69, label %70, label %73
70: ; preds = %67
%71 = load i32, i32* @EINVAL
%72 = sub nsw i32 0, %71
store i32 %72, i32* %10
br label %268
73: ; preds = %67
%74 = load i32, i32* %17
%75 = load i32, i32* %28
%76 = udiv i32 %74, %75
store i32 %76, i32* %29
%77 = load i32, i32* %17
%78 = load i32, i32* %28
%79 = urem i32 %77, %78
%80 = icmp ne i32 %79, 0
br i1 %80, label %81, label %84
81: ; preds = %73
%82 = load i32, i32* %29
%83 = add i32 %82, 1
store i32 %83, i32* %29
br label %84
84: ; preds = %81, %73
%85 = load i32, i32* %17
%86 = load i32, i32* %29
%87 = sub i32 %86, 1
%88 = load i32, i32* %28
%89 = mul i32 %87, %88
%90 = sub i32 %85, %89
store i32 %90, i32* %30
%91 = load i32, i32* %19
%92 = icmp ugt i32 %91, 0
br i1 %92, label %93, label %122
93: ; preds = %84
%94 = load i64, i64* %13
%95 = load i32, i32* %19
%96 = zext i32 %95 to i64
%97 = icmp ugt i64 %94, %96
br i1 %97, label %98, label %122
98: ; preds = %93
%99 = load i8*, i8** %12
%100 = load i64, i64* %13
%101 = getelementptr inbounds [80 x i8], [80 x i8]* %23, i64 0, i64 0
%102 = load i32, i32* %28
%103 = load i8*, i8** %11
%104 = call i64 @hash_buf(i8* %99, i64 %100, i8* %101, i32 %102, i8* %103)
%105 = icmp ne i64 %104, 0
br i1 %105, label %106, label %109
106: ; preds = %98
%107 = load i32, i32* @EINVAL
%108 = sub nsw i32 0, %107
store i32 %108, i32* %10
br label %268
109: ; preds = %98
%110 = load i8*, i8** %11
%111 = getelementptr inbounds [80 x i8], [80 x i8]* %23, i64 0, i64 0
%112 = load i32, i32* %28
%113 = zext i32 %112 to i64
%114 = call i64 @crypt_hmac_init(%struct.crypt_hmac** %20, i8* %110, i8* %111, i64 %113)
%115 = icmp ne i64 %114, 0
br i1 %115, label %116, label %119
116: ; preds = %109
%117 = load i32, i32* @EINVAL
%118 = sub nsw i32 0, %117
store i32 %118, i32* %10
br label %268
119: ; preds = %109
%120 = getelementptr inbounds [80 x i8], [80 x i8]* %23, i64 0, i64 0
%121 = call i32 @crypt_backend_memzero(i8* %120, i64 80)
br label %132
122: ; preds = %93, %84
%123 = load i8*, i8** %11
%124 = load i8*, i8** %12
%125 = load i64, i64* %13
%126 = call i64 @crypt_hmac_init(%struct.crypt_hmac** %20, i8* %123, i8* %124, i64 %125)
%127 = icmp ne i64 %126, 0
br i1 %127, label %128, label %131
128: ; preds = %122
%129 = load i32, i32* @EINVAL
%130 = sub nsw i32 0, %129
store i32 %130, i32* %10
br label %268
131: ; preds = %122
br label %132
132: ; preds = %131, %119
store i32 1, i32* %24
br label %133
133: ; preds = %253, %132
%134 = load i32, i32* %24
%135 = load i32, i32* %29
%136 = icmp ule i32 %134, %135
br i1 %136, label %137, label %256
137: ; preds = %133
%138 = getelementptr inbounds [80 x i8], [80 x i8]* %22, i64 0, i64 0
%139 = load i32, i32* %28
%140 = call i32 @memset(i8* %138, i32 0, i32 %139)
store i32 1, i32* %27
br label %141
141: ; preds = %231, %137
%142 = load i32, i32* %27
%143 = load i32, i32* %16
%144 = icmp ule i32 %142, %143
br i1 %144, label %145, label %234
145: ; preds = %141
%146 = load i32, i32* %27
%147 = icmp eq i32 %146, 1
br i1 %147, label %148, label %194
148: ; preds = %145
%149 = load i8*, i8** %32
%150 = load i8*, i8** %14
%151 = load i64, i64* %15
%152 = trunc i64 %151 to i32
%153 = call i32 @memcpy(i8* %149, i8* %150, i32 %152)
%154 = load i32, i32* %24
%155 = and i32 %154, -16777216
%156 = lshr i32 %155, 24
%157 = trunc i32 %156 to i8
%158 = load i8*, i8** %32
%159 = load i64, i64* %15
%160 = add i64 %159, 0
%161 = getelementptr inbounds i8, i8* %158, i64 %160
store i8 %157, i8* %161
%162 = load i32, i32* %24
%163 = and i32 %162, 16711680
%164 = ashr i32 %163, 16
%165 = trunc i32 %164 to i8
%166 = load i8*, i8** %32
%167 = load i64, i64* %15
%168 = add i64 %167, 1
%169 = getelementptr inbounds i8, i8* %166, i64 %168
store i8 %165, i8* %169
%170 = load i32, i32* %24
%171 = and i32 %170, 65280
%172 = ashr i32 %171, 8
%173 = trunc i32 %172 to i8
%174 = load i8*, i8** %32
%175 = load i64, i64* %15
%176 = add i64 %175, 2
%177 = getelementptr inbounds i8, i8* %174, i64 %176
store i8 %173, i8* %177
%178 = load i32, i32* %24
%179 = and i32 %178, 255
%180 = ashr i32 %179, 0
%181 = trunc i32 %180 to i8
%182 = load i8*, i8** %32
%183 = load i64, i64* %15
%184 = add i64 %183, 3
%185 = getelementptr inbounds i8, i8* %182, i64 %184
store i8 %181, i8* %185
%186 = load %struct.crypt_hmac*, %struct.crypt_hmac** %20
%187 = load i8*, i8** %32
%188 = load i64, i64* %31
%189 = trunc i64 %188 to i32
%190 = call i64 @crypt_hmac_write(%struct.crypt_hmac* %186, i8* %187, i32 %189)
%191 = icmp ne i64 %190, 0
br i1 %191, label %192, label %193
192: ; preds = %148
br label %257
193: ; preds = %148
br label %202
194: ; preds = %145
%195 = load %struct.crypt_hmac*, %struct.crypt_hmac** %20
%196 = getelementptr inbounds [80 x i8], [80 x i8]* %21, i64 0, i64 0
%197 = load i32, i32* %28
%198 = call i64 @crypt_hmac_write(%struct.crypt_hmac* %195, i8* %196, i32 %197)
%199 = icmp ne i64 %198, 0
br i1 %199, label %200, label %201
200: ; preds = %194
br label %257
201: ; preds = %194
br label %202
202: ; preds = %201, %193
%203 = load %struct.crypt_hmac*, %struct.crypt_hmac** %20
%204 = getelementptr inbounds [80 x i8], [80 x i8]* %21, i64 0, i64 0
%205 = load i32, i32* %28
%206 = call i64 @crypt_hmac_final(%struct.crypt_hmac* %203, i8* %204, i32 %205)
%207 = icmp ne i64 %206, 0
br i1 %207, label %208, label %209
208: ; preds = %202
br label %257
209: ; preds = %202
store i32 0, i32* %25
br label %210
210: ; preds = %227, %209
%211 = load i32, i32* %25
%212 = load i32, i32* %28
%213 = icmp ult i32 %211, %212
br i1 %213, label %214, label %230
214: ; preds = %210
%215 = load i32, i32* %25
%216 = sext i32 %215 to i64
%217 = getelementptr inbounds [80 x i8], [80 x i8]* %21, i64 0, i64 %216
%218 = load i8, i8* %217
%219 = sext i8 %218 to i32
%220 = load i32, i32* %25
%221 = sext i32 %220 to i64
%222 = getelementptr inbounds [80 x i8], [80 x i8]* %22, i64 0, i64 %221
%223 = load i8, i8* %222
%224 = sext i8 %223 to i32
%225 = xor i32 %224, %219
%226 = trunc i32 %225 to i8
store i8 %226, i8* %222
br label %227
227: ; preds = %214
%228 = load i32, i32* %25
%229 = add nsw i32 %228, 1
store i32 %229, i32* %25
br label %210
230: ; preds = %210
br label %231
231: ; preds = %230
%232 = load i32, i32* %27
%233 = add i32 %232, 1
store i32 %233, i32* %27
br label %141
234: ; preds = %141
%235 = load i8*, i8** %18
%236 = load i32, i32* %24
%237 = sub nsw i32 %236, 1
%238 = load i32, i32* %28
%239 = mul i32 %237, %238
%240 = zext i32 %239 to i64
%241 = getelementptr inbounds i8, i8* %235, i64 %240
%242 = getelementptr inbounds [80 x i8], [80 x i8]* %22, i64 0, i64 0
%243 = load i32, i32* %24
%244 = load i32, i32* %29
%245 = icmp eq i32 %243, %244
br i1 %245, label %246, label %248
246: ; preds = %234
%247 = load i32, i32* %30
br label %250
248: ; preds = %234
%249 = load i32, i32* %28
br label %250
250: ; preds = %248, %246
%251 = phi i32 [ %247, %246 ], [ %249, %248 ]
%252 = call i32 @memcpy(i8* %241, i8* %242, i32 %251)
br label %253
253: ; preds = %250
%254 = load i32, i32* %24
%255 = add nsw i32 %254, 1
store i32 %255, i32* %24
br label %133
256: ; preds = %133
store i32 0, i32* %26
br label %257
257: ; preds = %256, %208, %200, %192
%258 = load %struct.crypt_hmac*, %struct.crypt_hmac** %20
%259 = call i32 @crypt_hmac_destroy(%struct.crypt_hmac* %258)
%260 = getelementptr inbounds [80 x i8], [80 x i8]* %21, i64 0, i64 0
%261 = call i32 @crypt_backend_memzero(i8* %260, i64 80)
%262 = getelementptr inbounds [80 x i8], [80 x i8]* %22, i64 0, i64 0
%263 = call i32 @crypt_backend_memzero(i8* %262, i64 80)
%264 = load i8*, i8** %32
%265 = load i64, i64* %31
%266 = call i32 @crypt_backend_memzero(i8* %264, i64 %265)
%267 = load i32, i32* %26
store i32 %267, i32* %10
br label %268
268: ; preds = %257, %128, %116, %106, %70, %64, %58, %52, %41
%269 = load i32, i32* %10
ret i32 %269
}

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