user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<multipart_parse_headers>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xc8,%rsp
  mov    %rdi,(%rsp)
  mov    %rdx,%rdi
  lea    0x30(%rsp),%rbx
  mov    %rsi,0x8(%rsp)
  mov    %rcx,0x10(%rsp)
  mov    %r8d,0x1c(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xb8(%rsp)
  xor    %eax,%eax
  call   <kore_buf_stringify@plt>
  mov    $0x5,%ecx
  mov    %rbx,%rdx
  lea    D15(%rip),%rsi
  mov    %rax,%rdi
  call   <kore_split_string@plt>
  test   %eax,%eax
  jle    L25
  sub    $0x1,%eax
  lea    0x60(%rsp),%r12
  lea    D44(%rip),%rbp
  lea    0x38(%rsp,%rax,8),%r13
  lea    D12(%rip),%r14
  jmp    L129
  nopl   0x0(%rax)
L75:
  add    $0x8,%rbx
  cmp    %r13,%rbx
  je     L25
L129:
  mov    (%rbx),%rdi
  mov    $0x5,%ecx
  mov    %r12,%rdx
  mov    %rbp,%rsi
  call   <kore_split_string@plt>
  cmp    $0x2,%eax
  jne    L75
  mov    0x60(%rsp),%rdi
  mov    %r14,%rsi
  call   <strcasecmp@plt>
  mov    0x68(%rsp),%r15
  test   %rax,%rax
  jne    L75
  jmp    L70
  cs nopw 0x0(%rax,%rax,1)
L10:
  add    $0x1,%r15
L70:
  movsbl (%r15),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L10
  lea    0x90(%rsp),%rdx
  mov    $0x5,%ecx
  lea    D35(%rip),%rsi
  mov    %r15,%rdi
  call   <kore_split_string@plt>
  cmp    $0x1,%eax
  jle    L75
  mov    0x90(%rsp),%rdi
  lea    D46(%rip),%rsi
  call   <strcasecmp@plt>
  test   %rax,%rax
  jne    L75
  mov    0x98(%rsp),%rdi
  mov    $0x3d,%esi
  call   <strchr@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L75
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    $0x2,%rax
  jle    L75
  lea    0x1(%r15),%rdi
  lea    0x20(%rsp),%rdx
  mov    $0x22,%esi
  call   <kore_strip_chars@plt>
  mov    0xa0(%rsp),%r15
  test   %r15,%r15
  jne    L122
  jmp    L130
  nopl   (%rax)
L187:
  add    $0x1,%r15
L122:
  movsbl (%r15),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L187
  mov    $0x9,%edx
  lea    D26(%rip),%rsi
  mov    %r15,%rdi
  call   <strncasecmp@plt>
  test   %eax,%eax
  jne    L179
  mov    $0x3d,%esi
  mov    %r15,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L179
  lea    0x1(%rax),%rdi
  lea    0x28(%rsp),%rdx
  mov    $0x22,%esi
  call   <kore_strip_chars@plt>
  mov    0x28(%rsp),%r15
  mov    %r15,%rdi
  call   <strlen@plt>
  test   %rax,%rax
  jne    L39
L34:
  mov    %r15,%rdi
  call   <kore_mem_free@plt>
L179:
  mov    0x20(%rsp),%rdi
  call   <kore_mem_free@plt>
  jmp    L75
L25:
  mov    0xb8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L110
  add    $0xc8,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L130:
  mov    (%rsp),%rdi
  mov    0x1c(%rsp),%r8d
  mov    0x10(%rsp),%rcx
  mov    0x20(%rsp),%rdx
  mov    0x8(%rsp),%rsi
  call   <multipart_add_field@plt>
  mov    0x20(%rsp),%rdi
  call   <kore_mem_free@plt>
  jmp    L75
L39:
  mov    0x1c(%rsp),%r9d
  mov    0x10(%rsp),%r8
  mov    %r15,%rcx
  mov    0x20(%rsp),%rdx
  mov    0x8(%rsp),%rsi
  mov    (%rsp),%rdi
  call   <multipart_file_add@plt>
  mov    0x28(%rsp),%r15
  jmp    L34
L110:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D15
datatype: string
name: read_data
arguments: tag: D44
datatype: string
name: read_data
arguments: tag: D12
datatype: string
name: read_data
arguments: tag: D35
datatype: string
name: read_data
arguments: tag: D46
datatype: string
name: read_data
arguments: tag: D26
datatype: string

tool: D15: 


tool: D44: :

tool: D12: content-disposition

tool: D35: ;

tool: D46: form-data

tool: D26: filename=

assistant: ```c
int multipart_parse_headers(struct http_request *req, struct kore_buf *in, struct kore_buf *hbuf, const char *boundary, const int blen) {
  int h, c, i;
  char *headers[5], *args[5], *opt[5];
  char *d, *val, *name, *fname, *string;
  string = kore_buf_stringify(hbuf);
  h = kore_split_string(string, "\r\n", headers, 5);
  for (i = 0; i < h; i++) {
    c = kore_split_string(headers[i], ":", args, 5);
    if (c != 2)
      continue;
    if (strcasecmp(args[0], "content-disposition"))
      continue;
    for (d = args[1]; isspace(*d); d++)
      ;
    c = kore_split_string(d, ";", opt, 5);
    if (c < 2)
      continue;
    if (strcasecmp(opt[0], "form-data"))
      continue;
    if ((val = strchr(opt[1], '=')) == NULL)
      continue;
    if (strlen(val) < 3)
      continue;
    val++;
    kore_strip_chars(val, '"', &name);
    if (opt[2] == NULL) {
      multipart_add_field(req, in, name, boundary, blen);
      kore_mem_free(name);
      continue;
    }
    for (d = opt[2]; isspace(*d); d++)
      ;
    if (!strncasecmp(d, "filename=", 9)) {
      if ((val = strchr(d, '=')) == NULL) {
        kore_mem_free(name);
        continue;
      }
      val++;
      kore_strip_chars(val, '"', &fname);
      if (strlen(fname) > 0) {
        multipart_file_add(req, in, name, fname, boundary, blen);
      }
      kore_mem_free(fname);
    } else {
      ;
    }
    kore_mem_free(name);
  }
  return (1);
}
```