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

```asm
<bin_lc_parse_header_record>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    %r8,-0x38(%rbp)
  mov    -0x18(%rbp),%rax
  mov    $0x3d,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    -0x28(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L69
  mov    -0x30(%rbp),%rax
  movq   $0x0,(%rax)
  jmp    L98
L69:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  sub    -0x18(%rbp),%rax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  lea    0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,(%rax)
  jmp    L139
L60:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  lea    0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,(%rax)
L139:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L60
  jmp    L155
L54:
  subq   $0x1,-0x8(%rbp)
L155:
  mov    -0x8(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L54
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  mov    $0x2f,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    -0x30(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L34
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  movb   $0x0,(%rax)
  jmp    L98
L34:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L33
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L53
L50:
  subq   $0x1,-0x8(%rbp)
L53:
  mov    -0x8(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L50
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  lea    0x1(%rax),%rdx
  mov    -0x30(%rbp),%rax
  mov    %rdx,(%rax)
  jmp    L137
L143:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  lea    0x1(%rax),%rdx
  mov    -0x30(%rbp),%rax
  mov    %rdx,(%rax)
L137:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L143
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L98
  mov    -0x1c(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  jmp    L18
L105:
  subq   $0x1,-0x8(%rbp)
L18:
  mov    -0x8(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L105
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L98
L33:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  jmp    L91
L188:
  subq   $0x1,-0x8(%rbp)
L91:
  mov    -0x8(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L188
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x30(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  mov    %rdx,(%rax)
L98:
  leave
  ret
```

assistant: ```c
void bin_lc_parse_header_record(char *hdr_record, int record_len, char **value, char **comment, int *kwsize) {
  char *pos;
  *value = strchr(hdr_record, '=');
  if (*value == NULL) {
    *comment = NULL;
    return;
  }
  *kwsize = *value - hdr_record;
  pos = *value;
  (*value)++;
  while (**value == ' ')
    (*value)++;
  while (pos[-1] == ' ')
    pos--;
  *pos = '\0';
  *comment = strchr(*value, '/');
  if (**value == '/')
    **value = '\0';
  else if (*comment) {
    pos = *comment;
    while (pos[-1] == ' ')
      pos--;
    *pos = '\0';
    (*comment)++;
    while (**comment == ' ')
      (*comment)++;
    if (**comment) {
      pos = hdr_record + record_len - 1;
      while (pos[-1] == ' ')
        pos--;
      *pos = '\0';
    }
  } else {
    pos = hdr_record + record_len - 1;
    while (pos[-1] == ' ')
      pos--;
    *pos = '\0';
    *comment = pos;
  }
}
```