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

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ EVP_MD;

/* Variables and functions */
scalar_t__ CRYPTO_memcmp(unsigned char *, unsigned char *, int);
int /*<<< orphan*/ EVP_Digest(void *, int, unsigned char *,
                              int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                              int /*<<< orphan*/ *);
int EVP_MAX_MD_SIZE;
int EVP_MD_size(int /*<<< orphan*/ const *);
int /*<<< orphan*/ *EVP_sha1();
int /*<<< orphan*/ OPENSSL_free(unsigned char *);
unsigned char *OPENSSL_malloc(int);
scalar_t__ beta_PKCS1_MGF1(unsigned char *, int, unsigned char const *, int,
                           int /*<<< orphan*/ const *);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char const *, int);
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/, int);
int beta_RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
                                           const unsigned char *from, int flen,
                                           int num, const unsigned char *param,
                                           int plen, const EVP_MD *md,
                                           const EVP_MD *mgf1md) {
  int i, dblen, mlen = -1;
  const unsigned char *maskeddb;
  int lzero;
  unsigned char *db = NULL, seed[EVP_MAX_MD_SIZE], phash[EVP_MAX_MD_SIZE];
  unsigned char *padded_from;
  int bad = 0;
  int mdlen;
  if (md == NULL)
    md = EVP_sha1();
  if (mgf1md == NULL)
    mgf1md = md;
  mdlen = EVP_MD_size(md);
  if (--num < 2 * mdlen + 1)
    goto decoding_err;
  lzero = num - flen;
  if (lzero < 0) {
    bad = 1;
    lzero = 0;
    flen = num;
  }
  dblen = num - mdlen;
  db = OPENSSL_malloc(dblen + num);
  if (db == NULL) {
    return -1;
  }
  padded_from = db + dblen;
  memset(padded_from, 0, lzero);
  memcpy(padded_from + lzero, from, flen);
  maskeddb = padded_from + mdlen;
  if (beta_PKCS1_MGF1(seed, mdlen, maskeddb, dblen, mgf1md))
    return -1;
  for (i = 0; i < mdlen; i++)
    seed[i] ^= padded_from[i];
  if (beta_PKCS1_MGF1(db, dblen, seed, mdlen, mgf1md))
    return -1;
  for (i = 0; i < dblen; i++)
    db[i] ^= maskeddb[i];
  if (!EVP_Digest((void *)param, plen, phash, NULL, md, NULL))
    return -1;
  if (CRYPTO_memcmp(db, phash, mdlen) != 0 || bad)
    goto decoding_err;
  else {
    for (i = mdlen; i < dblen; i++)
      if (db[i] != 0x00)
        break;
    if (i == dblen || db[i] != 0x01)
      goto decoding_err;
    else {
      mlen = dblen - ++i;
      if (tlen < mlen) {
        mlen = -1;
      } else
        memcpy(to, db + i, mlen);
    }
  }
  OPENSSL_free(db);
  return mlen;
decoding_err:
  if (db != NULL)
    OPENSSL_free(db);
  return -1;
}


x86 assembly (clang, -O0):
<beta_RSA_padding_check_PKCS1_OAEP_mgf1>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8d,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0xffffffff,-0x3c(%rbp)
movq   $0x0,-0x58(%rbp)
mov    0x2e16(%rip),%rax
mov    (%rax),%ecx
mov    %rsp,%rdx
mov    %rdx,-0x60(%rbp)
mov    %rcx,%rsi
add    $0xf,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x98(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x68(%rbp)
mov    (%rax),%eax
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x90(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x70(%rbp)
movl   $0x0,-0x7c(%rbp)
cmpq   $0x0,0x18(%rbp)
jne    1238 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0xa8>
mov    $0x0,%al
call   1040 <EVP_sha1@plt>
mov    %rax,0x18(%rbp)
cmpq   $0x0,0x20(%rbp)
jne    124b <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0xbb>
mov    0x18(%rbp),%rax
mov    %rax,0x20(%rbp)
mov    0x18(%rbp),%rdi
call   1030 <EVP_MD_size@plt>
mov    %eax,-0x80(%rbp)
mov    -0x28(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x28(%rbp)
mov    -0x80(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1276 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0xe6>
jmp    1543 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x3b3>
mov    -0x28(%rbp),%eax
sub    -0x24(%rbp),%eax
mov    %eax,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
jge    129d <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x10d>
movl   $0x1,-0x7c(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x28(%rbp),%eax
sub    -0x80(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%edi
add    -0x28(%rbp),%edi
call   1080 <OPENSSL_malloc@plt>
mov    %rax,-0x58(%rbp)
cmpq   $0x0,-0x58(%rbp)
jne    12d6 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x146>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x84(%rbp)
jmp    1568 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x3d8>
mov    -0x58(%rbp),%rax
movslq -0x38(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rdi
mov    -0x4c(%rbp),%edx
xor    %esi,%esi
call   1050 <memset@plt>
mov    -0x78(%rbp),%rdi
movslq -0x4c(%rbp),%rax
add    %rax,%rdi
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
call   1060 <memcpy@plt>
mov    -0x98(%rbp),%rdi
mov    -0x78(%rbp),%rax
movslq -0x80(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x80(%rbp),%esi
mov    -0x48(%rbp),%rdx
mov    -0x38(%rbp),%ecx
mov    0x20(%rbp),%r8
call   1070 <beta_PKCS1_MGF1@plt>
cmp    $0x0,%rax
je     1353 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x1c3>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x84(%rbp)
jmp    1568 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x3d8>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x80(%rbp),%eax
jge    1394 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x204>
mov    -0x98(%rbp),%rax
mov    -0x78(%rbp),%rcx
movslq -0x34(%rbp),%rdx
movzbl (%rcx,%rdx,1),%esi
movslq -0x34(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
xor    %esi,%edx
mov    %dl,(%rax,%rcx,1)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    135a <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x1ca>
mov    -0x98(%rbp),%rdx
mov    -0x58(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    -0x80(%rbp),%ecx
mov    0x20(%rbp),%r8
call   1070 <beta_PKCS1_MGF1@plt>
cmp    $0x0,%rax
je     13ce <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x23e>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x84(%rbp)
jmp    1568 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x3d8>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    140c <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x27c>
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
movzbl (%rax,%rcx,1),%esi
mov    -0x58(%rbp),%rax
movslq -0x34(%rbp),%rcx
movzbl (%rax,%rcx,1),%edx
xor    %esi,%edx
mov    %dl,(%rax,%rcx,1)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13d5 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x245>
mov    -0x90(%rbp),%rdx
mov    -0x30(%rbp),%rdi
mov    0x10(%rbp),%esi
mov    0x18(%rbp),%r8
xor    %eax,%eax
mov    %eax,%r9d
mov    %r9,%rcx
call   1090 <EVP_Digest@plt>
cmp    $0x0,%eax
jne    144a <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x2ba>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x84(%rbp)
jmp    1568 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x3d8>
mov    -0x90(%rbp),%rsi
mov    -0x58(%rbp),%rdi
mov    -0x80(%rbp),%edx
call   10a0 <CRYPTO_memcmp@plt>
cmp    $0x0,%rax
jne    1471 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x2e1>
cmpl   $0x0,-0x7c(%rbp)
je     1476 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x2e6>
jmp    1543 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x3b3>
mov    -0x80(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    14b5 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x325>
mov    -0x58(%rbp),%rax
movslq -0x34(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     14a2 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x312>
jmp    14b5 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x325>
jmp    14a7 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x317>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    147c <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x2ec>
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
je     14d6 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x346>
mov    -0x58(%rbp),%rax
movslq -0x34(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x1,%eax
je     14db <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x34b>
jmp    1543 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x3b3>
mov    -0x38(%rbp),%eax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x34(%rbp)
sub    %ecx,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1504 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x374>
movl   $0xffffffff,-0x3c(%rbp)
jmp    151b <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x38b>
mov    -0x10(%rbp),%rdi
mov    -0x58(%rbp),%rsi
movslq -0x34(%rbp),%rax
add    %rax,%rsi
mov    -0x3c(%rbp),%edx
call   1060 <memcpy@plt>
jmp    1520 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x390>
jmp    1525 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x395>
mov    -0x58(%rbp),%rdi
call   10b0 <OPENSSL_free@plt>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x84(%rbp)
jmp    1568 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x3d8>
cmpq   $0x0,-0x58(%rbp)
je     1557 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x3c7>
mov    -0x58(%rbp),%rdi
call   10b0 <OPENSSL_free@plt>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x84(%rbp)
mov    -0x60(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<beta_RSA_padding_check_PKCS1_OAEP_mgf1>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r9,-0x88(%rbp)
mov    %r8d,%r13d
mov    %ecx,-0x38(%rbp)
mov    %rdx,-0x48(%rbp)
mov    %esi,-0x4c(%rbp)
mov    %rdi,-0x78(%rbp)
mov    0x20(%rbp),%rbx
mov    0x18(%rbp),%r15
mov    0x2e20(%rip),%rcx
mov    (%rcx),%edx
mov    %rsp,%r14
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
sub    %rdx,%r14
mov    %r14,%rsp
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x80(%rbp)
mov    %rcx,%rsp
test   %r15,%r15
jne    11f7 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x67>
xor    %eax,%eax
call   1040 <EVP_sha1@plt>
mov    %rax,%r15
test   %rbx,%rbx
cmove  %r15,%rbx
mov    %r15,%rdi
call   1030 <EVP_MD_size@plt>
mov    %eax,%r12d
lea    (%r12,%r12,1),%ecx
add    $0x1,%ecx
mov    $0xffffffff,%eax
cmp    %r13d,%ecx
jge    13ae <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x21e>
mov    %rbx,-0x60(%rbp)
mov    %r15,-0x70(%rbp)
add    $0xffffffff,%r13d
mov    %r13,-0x30(%rbp)
xor    %ebx,%ebx
mov    %r13d,%eax
mov    -0x38(%rbp),%r15d
sub    %r15d,%eax
mov    %eax,-0x3c(%rbp)
cmovns %eax,%ebx
mov    %r13d,%eax
sub    %r12d,%eax
mov    %rax,-0x58(%rbp)
lea    (%rax,%r13,1),%edi
mov    %r12,%r13
call   1080 <OPENSSL_malloc@plt>
test   %rax,%rax
je     13a9 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x219>
cmpl   $0x0,-0x3c(%rbp)
cmovs  -0x30(%rbp),%r15d
movslq -0x58(%rbp),%rcx
mov    %rcx,-0x38(%rbp)
lea    (%rax,%rcx,1),%r12
mov    %r12,%rdi
xor    %esi,%esi
mov    %ebx,%edx
mov    %rax,-0x68(%rbp)
call   1050 <memset@plt>
mov    %ebx,%edi
add    %r12,%rdi
mov    -0x48(%rbp),%rsi
mov    %r15d,%edx
call   1060 <memcpy@plt>
movslq %r13d,%rbx
mov    %r13,%rsi
lea    (%r12,%rbx,1),%r13
mov    %r14,%rdi
mov    %rsi,%r15
mov    %r13,%rdx
mov    -0x38(%rbp),%rcx
mov    -0x60(%rbp),%r8
call   1070 <beta_PKCS1_MGF1@plt>
test   %rax,%rax
jne    13a9 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x219>
mov    %r13,-0x48(%rbp)
mov    %rbx,-0x38(%rbp)
mov    %r15,%rcx
test   %ecx,%ecx
mov    -0x68(%rbp),%rdi
mov    -0x58(%rbp),%r13
mov    -0x88(%rbp),%r15
jle    138f <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x1ff>
mov    %ecx,%r9d
cmp    $0x8,%ecx
jb     1310 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x180>
movslq -0x30(%rbp),%rsi
lea    (%rsi,%r9,1),%rax
mov    -0x38(%rbp),%rbx
sub    %rbx,%rax
add    %rdi,%rax
cmp    %rax,%r14
jae    14f4 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x364>
lea    (%r14,%r9,1),%rax
cmp    %rax,%r12
jae    14f4 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x364>
xor    %eax,%eax
mov    %rax,%rdx
not    %rdx
add    %r9,%rdx
mov    %r9,%rsi
and    $0x3,%rsi
je     1343 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x1b3>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%r12,%rax,1),%ebx
xor    %bl,(%r14,%rax,1)
add    $0x1,%rax
add    $0xffffffffffffffff,%rsi
jne    1330 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x1a0>
cmp    $0x3,%rdx
jb     138f <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x1ff>
movslq -0x30(%rbp),%rdx
sub    -0x38(%rbp),%rdx
add    %rdi,%rdx
add    $0x3,%rdx
nopl   0x0(%rax,%rax,1)
movzbl -0x3(%rdx,%rax,1),%ebx
xor    %bl,(%r14,%rax,1)
movzbl -0x2(%rdx,%rax,1),%ebx
xor    %bl,0x1(%r14,%rax,1)
movzbl -0x1(%rdx,%rax,1),%ebx
xor    %bl,0x2(%r14,%rax,1)
movzbl (%rdx,%rax,1),%ebx
xor    %bl,0x3(%r14,%rax,1)
add    $0x4,%rax
cmp    %rax,%r9
jne    1360 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x1d0>
mov    %r13d,%esi
mov    %r14,%rdx
mov    -0x60(%rbp),%r8
mov    %rdi,%rbx
mov    %rcx,%r14
call   1070 <beta_PKCS1_MGF1@plt>
test   %rax,%rax
je     13bd <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x22d>
mov    $0xffffffff,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r15,%rdi
mov    0x10(%rbp),%esi
test   %r13d,%r13d
mov    %rbx,%r15
jle    1478 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x2e8>
mov    %r13d,%r10d
cmp    $0x8,%r13d
jb     13fd <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x26d>
movslq -0x30(%rbp),%rdx
lea    (%rdx,%r10,1),%rcx
add    %r15,%rcx
cmp    %rcx,%r15
mov    -0x48(%rbp),%r11
jae    1587 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x3f7>
lea    (%r15,%r10,1),%rcx
cmp    %rcx,%r11
jae    1587 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x3f7>
xor    %ecx,%ecx
mov    %rcx,%r8
not    %r8
add    %r10,%r8
mov    %r10,%rax
and    $0x3,%rax
je     1432 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x2a2>
movslq -0x30(%rbp),%rbx
add    %r15,%rbx
nopl   0x0(%rax,%rax,1)
movzbl (%rbx,%rcx,1),%edx
xor    %dl,(%r15,%rcx,1)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rax
jne    1420 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x290>
cmp    $0x3,%r8
jb     1478 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x2e8>
sub    %rcx,%r10
add    %r15,%rcx
add    $0x3,%rcx
movslq -0x30(%rbp),%rdx
cs nopw 0x0(%rax,%rax,1)
movzbl -0x3(%rcx,%rdx,1),%ebx
xor    %bl,-0x3(%rcx)
movzbl -0x2(%rcx,%rdx,1),%ebx
xor    %bl,-0x2(%rcx)
movzbl -0x1(%rcx,%rdx,1),%ebx
xor    %bl,-0x1(%rcx)
movzbl (%rcx,%rdx,1),%ebx
xor    %bl,(%rcx)
add    $0x4,%rcx
add    $0xfffffffffffffffc,%r10
jne    1450 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x2c0>
mov    -0x80(%rbp),%rbx
mov    %rbx,%rdx
xor    %ecx,%ecx
mov    -0x70(%rbp),%r8
xor    %r9d,%r9d
call   1090 <EVP_Digest@plt>
test   %eax,%eax
mov    $0xffffffff,%eax
je     13ae <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x21e>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   10a0 <CRYPTO_memcmp@plt>
mov    $0xffffffff,%esi
test   %rax,%rax
jne    1500 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x370>
cmpl   $0x0,-0x3c(%rbp)
js     1500 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x370>
cmp    %r13d,%r14d
mov    -0x4c(%rbp),%r8d
mov    %r15,%rdi
jge    159b <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x40b>
mov    -0x38(%rbp),%rdx
lea    (%rdi,%rdx,1),%rax
movslq -0x30(%rbp),%rcx
add    %rdx,%rdx
sub    %rdx,%rcx
xor    %edx,%edx
cmpb   $0x0,(%rax,%rdx,1)
jne    1598 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x408>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    14dc <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x34c>
jmp    15d0 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x440>
cmp    $0x20,%ecx
jae    1508 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x378>
xor    %eax,%eax
jmp    161a <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x48a>
mov    %r15,%rdi
jmp    15d0 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x440>
mov    %r9d,%eax
and    $0xffffffe0,%eax
lea    -0x20(%rax),%rdx
mov    %rdx,%r8
shr    $0x5,%r8
add    $0x1,%r8
test   %rdx,%rdx
je     15de <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x44e>
mov    %r8,%rdx
and    $0xfffffffffffffffe,%rdx
sub    %rbx,%rsi
lea    (%rsi,%rdi,1),%rbx
add    $0x30,%rbx
xor    %esi,%esi
movups -0x30(%rbx,%rsi,1),%xmm0
movups -0x20(%rbx,%rsi,1),%xmm1
xorps  (%r14,%rsi,1),%xmm0
xorps  0x10(%r14,%rsi,1),%xmm1
movaps %xmm0,(%r14,%rsi,1)
movaps %xmm1,0x10(%r14,%rsi,1)
movups -0x10(%rbx,%rsi,1),%xmm0
movups (%rbx,%rsi,1),%xmm1
xorps  0x20(%r14,%rsi,1),%xmm0
xorps  0x30(%r14,%rsi,1),%xmm1
movaps %xmm0,0x20(%r14,%rsi,1)
movaps %xmm1,0x30(%r14,%rsi,1)
add    $0x40,%rsi
add    $0xfffffffffffffffe,%rdx
jne    153a <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x3aa>
jmp    15e0 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x450>
cmp    $0x20,%r13d
jae    164f <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x4bf>
xor    %ecx,%ecx
jmp    1715 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x585>
add    %edx,%r14d
cmp    %r13d,%r14d
je     15d0 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x440>
movslq %r14d,%rax
cmpb   $0x1,(%rdi,%rax,1)
jne    15d0 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x440>
add    $0x1,%r14d
sub    %r14d,%r13d
cmp    %r8d,%r13d
jg     15d0 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x440>
movslq %r14d,%rax
mov    %rdi,%rsi
add    %rax,%rsi
mov    -0x78(%rbp),%rdi
mov    %r13d,%edx
call   1060 <memcpy@plt>
mov    %r15,%rdi
mov    %r13d,%esi
mov    %esi,%ebx
call   10b0 <OPENSSL_free@plt>
mov    %ebx,%eax
jmp    13ae <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x21e>
xor    %esi,%esi
test   $0x1,%r8b
je     1607 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x477>
movups (%r12,%rsi,1),%xmm0
movups 0x10(%r12,%rsi,1),%xmm1
xorps  (%r14,%rsi,1),%xmm0
xorps  0x10(%r14,%rsi,1),%xmm1
movaps %xmm0,(%r14,%rsi,1)
movaps %xmm1,0x10(%r14,%rsi,1)
cmp    %r9,%rax
je     138f <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x1ff>
test   $0x18,%r9b
je     1312 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x182>
mov    %rax,%rdx
mov    %r9d,%eax
and    $0xfffffff8,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r12,%rdx,1),%rsi
xor    %rsi,(%r14,%rdx,1)
add    $0x8,%rdx
cmp    %rdx,%rax
jne    1630 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x4a0>
cmp    %r9,%rax
je     138f <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x1ff>
jmp    1312 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x182>
mov    %r10d,%ecx
and    $0xffffffe0,%ecx
lea    -0x20(%rcx),%rax
mov    %rax,%r8
shr    $0x5,%r8
add    $0x1,%r8
test   %rax,%rax
je     16d3 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x543>
mov    %r8,%rbx
and    $0xfffffffffffffffe,%rbx
lea    (%rdx,%r15,1),%rax
add    $0x30,%rax
xor    %edx,%edx
movups -0x30(%rax,%rdx,1),%xmm0
movups -0x20(%rax,%rdx,1),%xmm1
movups (%r15,%rdx,1),%xmm2
xorps  %xmm0,%xmm2
movups 0x10(%r15,%rdx,1),%xmm0
xorps  %xmm1,%xmm0
movups 0x20(%r15,%rdx,1),%xmm1
movups 0x30(%r15,%rdx,1),%xmm3
movups %xmm2,(%r15,%rdx,1)
movups %xmm0,0x10(%r15,%rdx,1)
movups -0x10(%rax,%rdx,1),%xmm0
xorps  %xmm1,%xmm0
movups (%rax,%rdx,1),%xmm1
xorps  %xmm3,%xmm1
movups %xmm0,0x20(%r15,%rdx,1)
movups %xmm1,0x30(%r15,%rdx,1)
add    $0x40,%rdx
add    $0xfffffffffffffffe,%rbx
jne    167a <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x4ea>
jmp    16d5 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x545>
xor    %edx,%edx
test   $0x1,%r8b
je     1702 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x572>
movups (%r11,%rdx,1),%xmm0
movups 0x10(%r11,%rdx,1),%xmm1
movups (%r15,%rdx,1),%xmm2
xorps  %xmm0,%xmm2
movups 0x10(%r15,%rdx,1),%xmm0
xorps  %xmm1,%xmm0
movups %xmm2,(%r15,%rdx,1)
movups %xmm0,0x10(%r15,%rdx,1)
cmp    %r10,%rcx
je     1478 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x2e8>
test   $0x18,%r10b
je     13ff <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x26f>
mov    %rcx,%rdx
mov    %r10d,%ecx
and    $0xfffffff8,%ecx
mov    -0x48(%rbp),%rbx
mov    (%rbx,%rdx,1),%rax
xor    %rax,(%r15,%rdx,1)
add    $0x8,%rdx
cmp    %rdx,%rcx
jne    1722 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x592>
cmp    %r10,%rcx
je     1478 <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x2e8>
jmp    13ff <beta_RSA_padding_check_PKCS1_OAEP_mgf1+0x26f>

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

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