user: What would the C source look like for the assembly code provided here:

```asm
<beta_RSA_padding_check_PKCS1_OAEP_mgf1>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  mov    %ecx,%r13d
  push   %r12
  push   %rbx
  sub    $0x68,%rsp
  mov    0x18(%rbp),%rax
  mov    %rdx,-0x70(%rbp)
  mov    %esi,-0x84(%rbp)
  mov    %rsp,%rcx
  mov    %rax,-0x60(%rbp)
  mov    0x20(%rbp),%rax
  mov    %rdi,-0x90(%rbp)
  mov    %r8d,-0x4c(%rbp)
  mov    %r9,-0x80(%rbp)
  mov    %rax,-0x48(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  mov    D4(%rip),%rax
  movslq (%rax),%rax
  add    $0xf,%rax
  mov    %rax,%rsi
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rsi
  and    $0xfffffffffffffff0,%rdx
  sub    %rsi,%rcx
  cmp    %rcx,%rsp
  je     L174
L129:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L129
L174:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L13
L306:
  mov    %rax,%rdx
  mov    %rsp,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%r14
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L516
L91:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L91
L516:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L120
L158:
  cmpq   $0x0,-0x60(%rbp)
  mov    %rsp,-0x68(%rbp)
  jne    L403
  xor    %eax,%eax
  call   <EVP_sha1@plt>
  mov    %rax,-0x60(%rbp)
L403:
  mov    -0x48(%rbp),%rax
  mov    -0x60(%rbp),%rdi
  test   %rax,%rax
  cmove  %rdi,%rax
  mov    %rax,-0x48(%rbp)
  call   <EVP_MD_size@plt>
  mov    %eax,%ebx
  mov    -0x4c(%rbp),%eax
  lea    -0x1(%rax),%edi
  lea    (%rbx,%rbx,1),%eax
  cmp    %edi,%eax
  jge    L335
  mov    %edi,%eax
  movb   $0x0,-0x4d(%rbp)
  sub    %r13d,%eax
  mov    %eax,-0x58(%rbp)
  jns    L618
  movb   $0x1,-0x4d(%rbp)
  mov    %edi,%r13d
  movl   $0x0,-0x58(%rbp)
L618:
  mov    %edi,%r15d
  sub    %ebx,%r15d
  add    %r15d,%edi
  call   <OPENSSL_malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L335
  movslq %r15d,%r11
  mov    -0x58(%rbp),%edx
  xor    %esi,%esi
  add    %rax,%r11
  mov    %r11,%rdi
  mov    %r11,-0x78(%rbp)
  call   <memset@plt>
  mov    -0x78(%rbp),%r11
  movslq -0x58(%rbp),%rdi
  mov    %r13d,%edx
  mov    -0x70(%rbp),%rsi
  add    %r11,%rdi
  call   <memcpy@plt>
  mov    -0x78(%rbp),%r11
  movslq %ebx,%rax
  mov    -0x48(%rbp),%r8
  mov    %r15d,%ecx
  mov    %ebx,%esi
  mov    %r14,%rdi
  mov    %rax,-0x58(%rbp)
  lea    (%r11,%rax,1),%r13
  mov    %r11,-0x70(%rbp)
  mov    %r13,%rdx
  call   <beta_PKCS1_MGF1@plt>
  test   %rax,%rax
  jne    L335
  test   %ebx,%ebx
  mov    -0x70(%rbp),%r11
  jle    L302
  movslq -0x4c(%rbp),%rax
  sub    -0x58(%rbp),%rax
  mov    %r14,%rdi
  mov    %ebx,%esi
  lea    (%r12,%rax,1),%rcx
  lea    -0x1(%rbx),%edx
  sub    %rcx,%rdi
  cmp    $0xe,%rdi
  jbe    L549
  cmp    $0x6,%edx
  jbe    L549
  cmp    $0xe,%edx
  jbe    L441
  mov    %ebx,%edx
  lea    -0x1(%r12,%rax,1),%rsi
  xor    %eax,%eax
  shr    $0x4,%edx
  shl    $0x4,%rdx
  nopl   (%rax)
L291:
  movdqu (%r14,%rax,1),%xmm0
  movdqu (%rsi,%rax,1),%xmm2
  pxor   %xmm2,%xmm0
  movups %xmm0,(%r14,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L291
  mov    %ebx,%edx
  and    $0xfffffff0,%edx
  mov    %edx,%eax
  cmp    %edx,%ebx
  je     L302
  mov    %ebx,%esi
  sub    %edx,%esi
  lea    -0x1(%rsi),%edi
  cmp    $0x6,%edi
  jbe    L368
L29:
  lea    (%r14,%rdx,1),%rdi
  movq   -0x1(%rdx,%rcx,1),%xmm0
  mov    %esi,%edx
  movq   (%rdi),%xmm1
  and    $0xfffffff8,%edx
  add    %edx,%eax
  pxor   %xmm1,%xmm0
  movq   %xmm0,(%rdi)
  cmp    %edx,%esi
  je     L302
L368:
  movslq %eax,%rdx
  movzbl (%r11,%rdx,1),%ecx
  xor    %cl,(%r14,%rdx,1)
  lea    0x1(%rax),%edx
  cmp    %edx,%ebx
  jle    L302
  movslq %edx,%rdx
  movzbl (%r11,%rdx,1),%ecx
  xor    %cl,(%r14,%rdx,1)
  lea    0x2(%rax),%edx
  cmp    %edx,%ebx
  jle    L302
  movslq %edx,%rdx
  movzbl (%r11,%rdx,1),%ecx
  xor    %cl,(%r14,%rdx,1)
  lea    0x3(%rax),%edx
  cmp    %edx,%ebx
  jle    L302
  movslq %edx,%rdx
  movzbl (%r11,%rdx,1),%ecx
  xor    %cl,(%r14,%rdx,1)
  lea    0x4(%rax),%edx
  cmp    %edx,%ebx
  jle    L302
  movslq %edx,%rdx
  movzbl (%r11,%rdx,1),%ecx
  xor    %cl,(%r14,%rdx,1)
  lea    0x5(%rax),%edx
  cmp    %edx,%ebx
  jle    L302
  movslq %edx,%rdx
  add    $0x6,%eax
  movzbl (%r11,%rdx,1),%ecx
  xor    %cl,(%r14,%rdx,1)
  cmp    %eax,%ebx
  jle    L302
  cltq
  movzbl (%r11,%rax,1),%edx
  xor    %dl,(%r14,%rax,1)
L302:
  mov    -0x48(%rbp),%r8
  mov    %ebx,%ecx
  mov    %r14,%rdx
  mov    %r15d,%esi
  mov    %r12,%rdi
  call   <beta_PKCS1_MGF1@plt>
  test   %rax,%rax
  jne    L335
  test   %r15d,%r15d
  jle    L143
  movslq -0x4c(%rbp),%rcx
  mov    %r15d,%esi
  lea    -0x1(%r15),%eax
  mov    %rcx,%rdx
  neg    %rdx
  cmp    $0xe,%rdx
  jbe    L600
  cmp    $0x6,%eax
  jbe    L600
  cmp    $0xe,%eax
  jbe    L515
  mov    %r15d,%edx
  lea    -0x1(%r12,%rcx,1),%rsi
  xor    %eax,%eax
  shr    $0x4,%edx
  shl    $0x4,%rdx
  nopw   0x0(%rax,%rax,1)
L8:
  movdqu (%r12,%rax,1),%xmm0
  movdqu (%rsi,%rax,1),%xmm3
  pxor   %xmm3,%xmm0
  movups %xmm0,(%r12,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L8
  mov    %r15d,%eax
  and    $0xfffffff0,%eax
  mov    %eax,%edx
  cmp    %eax,%r15d
  je     L143
  mov    %r15d,%esi
  sub    %eax,%esi
  lea    -0x1(%rsi),%edi
  cmp    $0x6,%edi
  jbe    L436
L105:
  add    %r12,%rax
  movq   -0x1(%rax,%rcx,1),%xmm0
  movq   (%rax),%xmm1
  pxor   %xmm1,%xmm0
  movq   %xmm0,(%rax)
  mov    %esi,%eax
  and    $0xfffffff8,%eax
  add    %eax,%edx
  cmp    %eax,%esi
  je     L143
L436:
  movslq %edx,%rax
  movzbl 0x0(%r13,%rax,1),%ecx
  xor    %cl,(%r12,%rax,1)
  lea    0x1(%rdx),%eax
  cmp    %eax,%r15d
  jle    L143
  cltq
  movzbl 0x0(%r13,%rax,1),%ecx
  xor    %cl,(%r12,%rax,1)
  lea    0x2(%rdx),%eax
  cmp    %r15d,%eax
  jge    L143
  cltq
  movzbl 0x0(%r13,%rax,1),%ecx
  xor    %cl,(%r12,%rax,1)
  lea    0x3(%rdx),%eax
  cmp    %r15d,%eax
  jge    L143
  cltq
  movzbl 0x0(%r13,%rax,1),%ecx
  xor    %cl,(%r12,%rax,1)
  lea    0x4(%rdx),%eax
  cmp    %eax,%r15d
  jle    L143
  cltq
  movzbl 0x0(%r13,%rax,1),%ecx
  xor    %cl,(%r12,%rax,1)
  lea    0x5(%rdx),%eax
  cmp    %eax,%r15d
  jle    L143
  cltq
  add    $0x6,%edx
  movzbl 0x0(%r13,%rax,1),%ecx
  xor    %cl,(%r12,%rax,1)
  cmp    %edx,%r15d
  jle    L143
  movslq %edx,%rdx
  movzbl 0x0(%r13,%rdx,1),%eax
  xor    %al,(%r12,%rdx,1)
L143:
  mov    -0x60(%rbp),%r8
  mov    -0x68(%rbp),%rdx
  xor    %r9d,%r9d
  xor    %ecx,%ecx
  mov    0x10(%rbp),%esi
  mov    -0x80(%rbp),%rdi
  call   <EVP_Digest@plt>
  test   %eax,%eax
  je     L335
  mov    -0x68(%rbp),%rsi
  mov    %ebx,%edx
  mov    %r12,%rdi
  call   <CRYPTO_memcmp@plt>
  test   %rax,%rax
  jne    L81
  cmpb   $0x0,-0x4d(%rbp)
  jne    L81
  cmp    %r15d,%ebx
  jge    L321
  mov    -0x58(%rbp),%rax
  add    %r12,%rax
  jmp    L576
  nopl   (%rax)
L63:
  add    $0x1,%ebx
  add    $0x1,%rax
  cmp    %ebx,%r15d
  je     L81
L576:
  movzbl (%rax),%edx
  test   %dl,%dl
  je     L63
L179:
  cmp    $0x1,%dl
  jne    L81
  add    $0x1,%ebx
  sub    %ebx,%r15d
  mov    %r15d,%r13d
  cmp    -0x84(%rbp),%r15d
  jle    L531
  mov    $0xffffffff,%r13d
L598:
  mov    %r12,%rdi
  call   <OPENSSL_free@plt>
L181:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L351
  lea    -0x28(%rbp),%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopl   (%rax)
L13:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L306
L321:
  je     L81
  mov    -0x58(%rbp),%rax
  movzbl (%r12,%rax,1),%edx
  jmp    L179
L531:
  movslq %ebx,%rbx
  mov    -0x90(%rbp),%rdi
  mov    %r15d,%edx
  lea    (%r12,%rbx,1),%rsi
  call   <memcpy@plt>
  jmp    L598
  nopl   0x0(%rax,%rax,1)
L549:
  mov    %ebx,%ecx
  xor    %eax,%eax
  nopl   0x0(%rax)
L9:
  movzbl (%r11,%rax,1),%edx
  xor    %dl,(%r14,%rax,1)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L9
  jmp    L302
  nop
L600:
  mov    %r15d,%ecx
  xor    %eax,%eax
  nopl   (%rax)
L6:
  movzbl 0x0(%r13,%rax,1),%edx
  xor    %dl,(%r12,%rax,1)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L6
  jmp    L143
L81:
  mov    %r12,%rdi
  call   <OPENSSL_free@plt>
L335:
  mov    $0xffffffff,%r13d
  jmp    L181
L515:
  xor    %eax,%eax
  xor    %edx,%edx
  jmp    L105
L441:
  xor    %edx,%edx
  xor    %eax,%eax
  jmp    L29
L120:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L158
L351:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
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;
}
```