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

```asm
<ContentDispositionParse>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  mov    $0x1,%edi
  push   %r14
  push   %r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %r8,%rbx
  sub    $0x838,%rsp
  mov    %rdx,(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x828(%rsp)
  xor    %eax,%eax
  test   %rsi,%rsi
  je     L143
  xor    %edi,%edi
  cmpq   $0x0,(%rsi)
  sete   %dil
L143:
  call   <assert@plt>
  xor    %r14d,%r14d
  test   %rbx,%rbx
  je     L30
  nopl   0x0(%rax)
L124:
  mov    (%rsp),%rax
  xor    %edi,%edi
  cmpq   $0x0,(%rax,%r14,8)
  sete   %dil
  add    $0x1,%r14
  call   <assert@plt>
  cmp    %r14,%rbx
  jne    L124
L30:
  mov    %r15,%rdi
  call   <strlen@plt>
  cmp    $0x3ff,%eax
  jg     L166
  lea    0x10(%rsp),%rdi
  lea    0x18(%rsp),%rsi
  mov    %r15,0x10(%rsp)
  lea    0x420(%rsp),%r14
  mov    %rdi,0x8(%rsp)
  mov    %r14,0x18(%rsp)
  call   <read_token@plt>
  test   %eax,%eax
  je     L166
  test   %rbp,%rbp
  je     L25
  mov    0x18(%rsp),%esi
  mov    %r14,%rdi
  sub    %r14d,%esi
  call   <strndup@plt>
  mov    %rax,0x0(%rbp)
  test   %rax,%rax
  je     L166
L25:
  mov    0x10(%rsp),%rdx
  lea    0x1(%rdx),%rax
  mov    %rax,0x10(%rsp)
  cmpb   $0x3b,(%rdx)
  jne    L108
  lea    0x20(%rsp),%rbp
  jmp    L164
  nopl   (%rax)
L91:
  mov    0x10(%rsp),%rax
  add    $0x1,%rax
  mov    %rax,0x10(%rsp)
L164:
  movsbl (%rax),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L91
  mov    0x8(%rsp),%rdi
  mov    %r14,%rdx
  mov    %rbp,%rsi
  call   <read_parm@plt>
  test   %eax,%eax
  je     L108
  mov    (%rsp),%r13
  xor    %r15d,%r15d
  test   %rbx,%rbx
  je     L12
L168:
  mov    (%r12,%r15,8),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  jne    L106
  cmpq   $0x0,0x0(%r13)
  je     L72
L106:
  add    $0x1,%r15
  add    $0x8,%r13
  cmp    %r15,%rbx
  jne    L168
L12:
  mov    0x10(%rsp),%rdx
  lea    0x1(%rdx),%rax
  mov    %rax,0x10(%rsp)
  cmpb   $0x3b,(%rdx)
  je     L164
L108:
  xor    %eax,%eax
L144:
  mov    0x828(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L176
  add    $0x838,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L72:
  mov    %r14,%rdi
  call   <strdup@plt>
  mov    %rax,0x0(%r13)
  jmp    L12
L166:
  mov    $0xffffffff,%eax
  jmp    L144
L176:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int ContentDispositionParse(char const *const str, char **const type, char *values[], char const *const fields[], size_t const count) {
  assert(!type || !*type);
  for (size_t i = 0; i < count; i++)
    assert(!values[i]);
  if (strlen(str) >= 1024)
    return -1;
  char const *s = str;
  {
    char buf[1024];
    char *d = buf;
    if (!read_token(&s, &d))
      return -1;
    if (type)
      *type = strndup(buf, d - buf);
    if (type && !*type)
      return -1;
  }
  for (;;) {
    if (';' != *s++)
      break;
    while (isspace(*s))
      s++;
    char field[1024];
    char value[1024];
    if (!read_parm(&s, field, value))
      break;
    for (size_t i = 0; i < count; i++) {
      if (0 != strcasecmp(field, fields[i]))
        continue;
      if (values[i])
        continue;
      values[i] = strdup(value);
      break;
    }
  }
  return 0;
}
```