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

```asm
<iTlvCheckTlvObject>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <_iTlvCheckTlvObj@plt>
  test   %eax,%eax
  js     L130
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <_uiTlvGetValueLen@plt>
  mov    %eax,%ebx
  cmp    $0xffff,%eax
  je     L130
  movswl %ax,%r12d
  lea    0xc(%rsp),%rdx
  xor    %eax,%eax
  mov    %rbp,%rdi
  lea    0x8(%rsp),%rsi
  call   <uiTagAttrGetRange@plt>
  cmp    $0x1,%eax
  je     L34
  cmp    $0xff,%eax
  je     L203
  test   %eax,%eax
  je     L191
  cmp    %r12d,0x8(%rsp)
  jg     L40
  cmp    %r12d,0xc(%rsp)
  jl     L40
L203:
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <_uiTlvGetObjLen@plt>
L114:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L53
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L191:
  mov    0x8(%rsp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  cmp    %r12d,%eax
  jg     L40
  mov    0xc(%rsp),%ecx
  lea    0x1(%rcx),%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  cmp    %r12d,%eax
  jl     L40
  jne    L203
  and    $0x1,%ecx
  je     L203
  lea    0x10(%rsp),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <iTlvValue@plt>
  mov    0x10(%rsp),%rax
  testb  $0xf0,(%rax)
  je     L203
  nopw   0x0(%rax,%rax,1)
L40:
  mov    $0xffffd8e8,%eax
  jmp    L114
  nopw   0x0(%rax,%rax,1)
L34:
  mov    0x8(%rsp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  cmp    %r12d,%eax
  jg     L40
  mov    0xc(%rsp),%ecx
  lea    0x1(%rcx),%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  cmp    %r12d,%eax
  jl     L40
  jne    L203
  and    $0x1,%ecx
  je     L203
  lea    0x10(%rsp),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  movswq %bx,%rbx
  call   <iTlvValue@plt>
  mov    0x10(%rsp),%rax
  movzbl -0x1(%rax,%rbx,1),%eax
  and    $0xf,%eax
  cmp    $0xf,%al
  je     L203
  jmp    L40
  nopl   0x0(%rax,%rax,1)
L130:
  mov    $0xffffd8eb,%eax
  jmp    L114
L53:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int iTlvCheckTlvObject(unsigned char *psTlvObj) {
  int iRet, iValueLen;
  unsigned char *psTlvObjValue;
  unsigned int uiRet;
  unsigned int uiTagType;
  int iLeast, iMost;
  iRet = _iTlvCheckTlvObj(psTlvObj);
  if (iRet < 0)
    return (-10005);
  uiRet = _uiTlvGetValueLen(psTlvObj);
  if (uiRet == 0xffff)
    return (-10005);
  iValueLen = (short)uiRet;
  uiTagType = uiTagAttrGetRange(psTlvObj, &iLeast, &iMost);
  switch (uiTagType) {
  case 0:
    if (iValueLen < (iLeast + 1) / 2 || iValueLen > (iMost + 1) / 2)
      return (-10008);
    if (iValueLen == (iMost + 1) / 2 && iMost % 2) {
      iTlvValue(psTlvObj, &psTlvObjValue);
      if ((psTlvObjValue[0] & 0xF0) != 0x00)
        return (-10008);
    }
    break;
  case 1:
    if (iValueLen < (iLeast + 1) / 2 || iValueLen > (iMost + 1) / 2)
      return (-10008);
    if (iValueLen == (iMost + 1) / 2 && iMost % 2) {
      iTlvValue(psTlvObj, &psTlvObjValue);
      if ((psTlvObjValue[iValueLen - 1] & 0x0F) != 0x0F)
        return (-10008);
    }
    break;
  case 0xff:
    return (_uiTlvGetObjLen(psTlvObj));
  default:
    if (iValueLen < iLeast || iValueLen > iMost)
      return (-10008);
    break;
  }
  return (_uiTlvGetObjLen(psTlvObj));
}
```