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

```asm
<asn1_check_tlen>:
  endbr64
  push   %r15
  mov    %r8,%r10
  mov    %rcx,%r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %r9,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    (%r9),%r9
  mov    0xa0(%rsp),%rbx
  mov    0x98(%rsp),%r11d
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  mov    %r9,0x30(%rsp)
  test   %rbx,%rbx
  je     L146
  mov    (%rbx),%ecx
  test   %ecx,%ecx
  je     L93
  mov    0x8(%rbx),%rdx
  mov    0x4(%rbx),%eax
  mov    %rdx,0x28(%rsp)
  mov    0x10(%rbx),%edx
  mov    %edx,0x24(%rsp)
  mov    0x14(%rbx),%edx
  mov    %edx,0x20(%rsp)
  movslq 0x18(%rbx),%rdx
  add    %r9,%rdx
  mov    %rdx,0x30(%rsp)
L223:
  test   $0x80,%al
  jne    L117
L107:
  mov    0x88(%rsp),%edx
  test   %edx,%edx
  js     L30
  mov    0x88(%rsp),%edi
  cmp    %edi,0x20(%rsp)
  je     L220
L123:
  mov    $0xffffffff,%r8d
  test   %r11b,%r11b
  jne    L138
  test   %rbx,%rbx
  je     L167
  movl   $0x0,(%rbx)
L167:
  mov    D24(%rip),%rax
L195:
  mov    (%rax),%esi
  mov    D74(%rip),%rax
  mov    (%rax),%edi
  call   <ASN1err@plt>
  xor    %r8d,%r8d
L138:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L113
  add    $0x48,%rsp
  mov    %r8d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L93:
  mov    %r8,0x10(%rsp)
  lea    0x24(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  mov    0x80(%rsp),%r8
  lea    0x28(%rsp),%rsi
  lea    0x30(%rsp),%rdi
  mov    %r11d,0x1c(%rsp)
  mov    %r9,0x8(%rsp)
  call   <ASN1_get_object@plt>
  mov    0x24(%rsp),%edx
  mov    0x8(%rsp),%r9
  movl   $0x1,(%rbx)
  mov    0x28(%rsp),%rcx
  mov    %eax,%r8d
  mov    0x10(%rsp),%r10
  mov    %eax,0x4(%rbx)
  mov    %edx,0x10(%rbx)
  mov    0x20(%rsp),%edx
  mov    %rcx,0x8(%rbx)
  mov    0x1c(%rsp),%r11d
  mov    %edx,0x14(%rbx)
  mov    0x30(%rsp),%rdx
  sub    %r9,%rdx
  and    $0x81,%r8d
  mov    %edx,0x18(%rbx)
  jne    L223
  movslq %edx,%rdx
  add    %rcx,%rdx
  cmp    0x80(%rsp),%rdx
  jle    L223
  mov    D45(%rip),%rax
  mov    %r8d,0x8(%rsp)
  mov    (%rax),%esi
  mov    D74(%rip),%rax
  mov    (%rax),%edi
  call   <ASN1err@plt>
  movl   $0x0,(%rbx)
  mov    0x8(%rsp),%r8d
  jmp    L138
  nopw   0x0(%rax,%rax,1)
L220:
  mov    0x90(%rsp),%edi
  cmp    %edi,0x24(%rsp)
  jne    L123
  test   %rbx,%rbx
  je     L30
  movl   $0x0,(%rbx)
  nopl   0x0(%rax)
L30:
  mov    0x30(%rsp),%rdx
  test   $0x1,%al
  jne    L175
L173:
  test   %r15,%r15
  je     L25
  mov    %eax,%ecx
  and    $0x1,%ecx
  mov    %cl,(%r15)
L25:
  test   %r10,%r10
  je     L235
  mov    D7(%rip),%rcx
  and    (%rcx),%al
  mov    %al,(%r10)
L235:
  test   %r12,%r12
  je     L125
  mov    0x28(%rsp),%rax
  mov    %rax,(%r12)
L125:
  test   %r14,%r14
  je     L224
  mov    0x24(%rsp),%eax
  mov    %al,(%r14)
L224:
  test   %r13,%r13
  je     L142
  mov    0x20(%rsp),%eax
  mov    %eax,0x0(%r13)
L142:
  mov    %rdx,0x0(%rbp)
  mov    $0x1,%r8d
  jmp    L138
  nopl   (%rax)
L175:
  mov    0x80(%rsp),%rcx
  mov    %rdx,%rsi
  sub    %r9,%rsi
  sub    %rsi,%rcx
  mov    %rcx,0x28(%rsp)
  jmp    L173
L146:
  mov    %r8,0x10(%rsp)
  lea    0x24(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  mov    0x80(%rsp),%r8
  lea    0x28(%rsp),%rsi
  lea    0x30(%rsp),%rdi
  mov    %r11d,0x1c(%rsp)
  mov    %r9,0x8(%rsp)
  call   <ASN1_get_object@plt>
  mov    0x8(%rsp),%r9
  mov    0x10(%rsp),%r10
  test   $0x80,%al
  mov    0x1c(%rsp),%r11d
  je     L107
  mov    D76(%rip),%rax
  jmp    L195
  nopl   0x0(%rax,%rax,1)
L117:
  mov    D76(%rip),%rax
  mov    (%rax),%esi
  mov    D74(%rip),%rax
  mov    (%rax),%edi
  call   <ASN1err@plt>
  movl   $0x0,(%rbx)
  xor    %r8d,%r8d
  jmp    L138
L113:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int asn1_check_tlen(long *olen, int *otag, unsigned char *oclass, char *inf, char *cst, const unsigned char **in, long len, int exptag, int expclass, char opt, ASN1_TLC *ctx) {
  int i;
  int ptag, pclass;
  long plen;
  const unsigned char *p, *q;
  p = *in;
  q = p;
  if (ctx && ctx->valid) {
    i = ctx->ret;
    plen = ctx->plen;
    pclass = ctx->pclass;
    ptag = ctx->ptag;
    p += ctx->hdrlen;
  } else {
    i = ASN1_get_object(&p, &plen, &ptag, &pclass, len);
    if (ctx) {
      ctx->ret = i;
      ctx->plen = plen;
      ctx->pclass = pclass;
      ctx->ptag = ptag;
      ctx->hdrlen = p - q;
      ctx->valid = 1;
      if (!(i & 0x81) && ((plen + ctx->hdrlen) > len)) {
        ASN1err(ASN1_F_ASN1_CHECK_TLEN, ASN1_R_TOO_LONG);
        if (ctx)
          (ctx)->valid = 0;
        return 0;
      }
    }
  }
  if (i & 0x80) {
    ASN1err(ASN1_F_ASN1_CHECK_TLEN, ASN1_R_BAD_OBJECT_HEADER);
    if (ctx)
      (ctx)->valid = 0;
    return 0;
  }
  if (exptag >= 0) {
    if ((exptag != ptag) || (expclass != pclass)) {
      if (opt)
        return -1;
      if (ctx)
        (ctx)->valid = 0;
      ASN1err(ASN1_F_ASN1_CHECK_TLEN, ASN1_R_WRONG_TAG);
      return 0;
    }
    if (ctx)
      (ctx)->valid = 0;
  }
  if (i & 1)
    plen = len - (p - q);
  if (inf)
    *inf = i & 1;
  if (cst)
    *cst = i & V_ASN1_CONSTRUCTED;
  if (olen)
    *olen = plen;
  if (oclass)
    *oclass = pclass;
  if (otag)
    *otag = ptag;
  *in = p;
  return 1;
}
```