user: Translate the below assembly code into C programming language:

```asm
<ContentDispositionParse>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x868,%rsp
  mov    %rdi,-0x848(%rbp)
  mov    %rsi,-0x850(%rbp)
  mov    %rdx,-0x858(%rbp)
  mov    %rcx,-0x860(%rbp)
  mov    %r8,-0x868(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  cmpq   $0x0,-0x850(%rbp)
  je     L16
  mov    -0x850(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L218
L16:
  mov    $0x1,%eax
  jmp    L81
L218:
  mov    $0x0,%eax
L81:
  mov    %eax,%edi
  call   <assert@plt>
  movq   $0x0,-0x830(%rbp)
  jmp    L217
L37:
  mov    -0x830(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x858(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  addq   $0x1,-0x830(%rbp)
L217:
  mov    -0x830(%rbp),%rax
  cmp    -0x868(%rbp),%rax
  jb     L37
  mov    -0x848(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    $0x3ff,%eax
  jle    L198
  mov    $0xffffffff,%eax
  jmp    L44
L198:
  mov    -0x848(%rbp),%rax
  mov    %rax,-0x840(%rbp)
  lea    -0x420(%rbp),%rax
  mov    %rax,-0x838(%rbp)
  lea    -0x838(%rbp),%rdx
  lea    -0x840(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <read_token@plt>
  test   %eax,%eax
  jne    L43
  mov    $0xffffffff,%eax
  jmp    L44
L43:
  cmpq   $0x0,-0x850(%rbp)
  je     L191
  mov    -0x838(%rbp),%rax
  lea    -0x420(%rbp),%rdx
  sub    %rdx,%rax
  mov    %eax,%edx
  lea    -0x420(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <strndup@plt>
  mov    -0x850(%rbp),%rdx
  mov    %rax,(%rdx)
L191:
  cmpq   $0x0,-0x850(%rbp)
  je     L216
  mov    -0x850(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L216
  mov    $0xffffffff,%eax
  jmp    L44
L216:
  mov    -0x840(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x840(%rbp)
  movzbl (%rax),%eax
  cmp    $0x3b,%al
  jne    L151
  jmp    L93
L159:
  mov    -0x840(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x840(%rbp)
L93:
  mov    -0x840(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L159
  lea    -0x420(%rbp),%rdx
  lea    -0x820(%rbp),%rcx
  lea    -0x840(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <read_parm@plt>
  test   %eax,%eax
  je     L35
  movq   $0x0,-0x828(%rbp)
  jmp    L249
L96:
  mov    -0x828(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x860(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  lea    -0x820(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  jne    L22
  mov    -0x828(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x858(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L97
  mov    -0x828(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x858(%rbp),%rax
  lea    (%rdx,%rax,1),%rbx
  lea    -0x420(%rbp),%rax
  mov    %rax,%rdi
  call   <strdup@plt>
  mov    %rax,(%rbx)
  jmp    L21
L22:
  nop
  jmp    L25
L97:
  nop
L25:
  addq   $0x1,-0x828(%rbp)
L249:
  mov    -0x828(%rbp),%rax
  cmp    -0x868(%rbp),%rax
  jb     L96
L21:
  jmp    L216
L151:
  nop
  jmp    L17
L35:
  nop
L17:
  mov    $0x0,%eax
L44:
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L221
  call   <__stack_chk_fail@plt>
L221:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

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;
}
```