user: What is the c source code of the assembly code below:

```asm
<cbor_write_type_size>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    %esi,-0xc(%rbp)
  mov    %edx,-0x10(%rbp)
  mov    %ecx,-0x14(%rbp)
  shll   $0x5,-0x10(%rbp)
  cmpl   $0x17,-0x14(%rbp)
  ja     L96
  cmpl   $0x0,-0xc(%rbp)
  jne    L57
  mov    -0x8(%rbp),%rax
  jmp    L123
L57:
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  mov    -0x14(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     %ecx,%esi
  mov    %esi,%edx
  mov    %dl,(%rax)
  mov    -0x8(%rbp),%rax
  jmp    L123
L96:
  cmpl   $0xff,-0x14(%rbp)
  ja     L76
  cmpl   $0x1,-0xc(%rbp)
  ja     L120
  mov    -0x8(%rbp),%rax
  jmp    L123
L120:
  mov    -0x10(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0x18,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    -0x14(%rbp),%edx
  mov    %dl,(%rax)
  mov    -0x8(%rbp),%rax
  jmp    L123
L76:
  cmpl   $0xffff,-0x14(%rbp)
  ja     L79
  cmpl   $0x2,-0xc(%rbp)
  ja     L132
  mov    -0x8(%rbp),%rax
  jmp    L123
L132:
  mov    -0x10(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0x19,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x14(%rbp),%eax
  shr    $0x8,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    -0x14(%rbp),%edx
  mov    %dl,(%rax)
  mov    -0x8(%rbp),%rax
  jmp    L123
L79:
  cmpl   $0x4,-0xc(%rbp)
  ja     L129
  mov    -0x8(%rbp),%rax
  jmp    L123
L129:
  mov    -0x10(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0x1a,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x14(%rbp),%eax
  shr    $0x18,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x14(%rbp),%eax
  shr    $0x10,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x14(%rbp),%eax
  shr    $0x8,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    -0x14(%rbp),%edx
  mov    %dl,(%rax)
  mov    -0x8(%rbp),%rax
L123:
  pop    %rbp
  ret
```

assistant: ```c
unsigned char *cbor_write_type_size(unsigned char *data, unsigned int size, unsigned int type, unsigned int type_size) {
  type <<= 5;
  if (type_size < 24) {
    if (size < 1) {
      return data;
    }
    *data++ = (unsigned char)(type | type_size);
    return data;
  } else if (type_size < 256) {
    if (size < 2) {
      return data;
    }
    *data++ = (unsigned char)(type | 24);
    *data++ = (unsigned char)type_size;
    return data;
  } else if (type_size < 65536) {
    if (size < 3) {
      return data;
    }
    *data++ = (unsigned char)(type | 25);
    *data++ = (unsigned char)(type_size >> 8);
    *data++ = (unsigned char)type_size;
    return data;
  } else {
    if (size < 5) {
      return data;
    }
    *data++ = (unsigned char)(type | 26);
    *data++ = (unsigned char)(type_size >> 24);
    *data++ = (unsigned char)(type_size >> 16);
    *data++ = (unsigned char)(type_size >> 8);
    *data++ = (unsigned char)type_size;
    return data;
  }
}
```