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

```asm
<parse_apropos_line>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8,-0x48(%rbp)
  mov    -0x28(%rbp),%rax
  mov    $0x28,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L61
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  call   <status_bar_error@plt>
  mov    $0x1,%eax
  jmp    L36
L61:
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  lea    D5(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcspn@plt>
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  cmp    %rax,-0x10(%rbp)
  je     L78
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x29,%al
  je     L88
L78:
  lea    D30(%rip),%rax
  mov    %rax,%rdi
  call   <status_bar_error@plt>
  mov    $0x1,%eax
  jmp    L36
L88:
  mov    -0x28(%rbp),%rax
  lea    D7(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strpbrk@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x38(%rbp)
  je     L87
  mov    -0x38(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    -0x10(%rbp),%rax
  sub    %rcx,%rax
  cmp    %rax,%rdx
  jb     L87
  cmpq   $0x0,-0x48(%rbp)
  je     L87
  mov    -0x48(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x8(%rbp),%rax
  sub    -0x28(%rbp),%rax
  cmp    %rax,%rdx
  jae    L14
L87:
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <status_bar_error@plt>
  mov    $0x1,%eax
  jmp    L36
L14:
  mov    -0x8(%rbp),%rax
  sub    -0x28(%rbp),%rax
  add    $0x1,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rdx
  mov    -0x40(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <copy_str@plt>
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    -0x10(%rbp),%rax
  sub    %rcx,%rax
  add    $0x1,%eax
  mov    %eax,%ecx
  mov    -0x30(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <copy_str@plt>
  mov    $0x0,%eax
L36:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D20
type_infered: string
name: retrieve_data
arguments: label: D5
type_infered: string
name: retrieve_data
arguments: label: D30
type_infered: string
name: retrieve_data
arguments: label: D7
type_infered: string
name: retrieve_data
arguments: label: D4
type_infered: string

tool: D20: Failed to find section number.

tool: D5:  	()

tool: D30: Wrong section number format.

tool: D7:  (

tool: D4: Internal buffer is too small.

assistant: ```c
int parse_apropos_line(const char line[], char section[], size_t section_len, char topic[], size_t topic_len) {
  const char *sec_l, *sec_r;
  const char *sep;
  sec_l = strchr(line, '(');
  if (sec_l == NULL) {
    status_bar_error("Failed to find section number.");
    return 1;
  }
  sec_r = sec_l + 1 + strcspn(sec_l + 1, " \t()");
  if (sec_r == sec_l + 1 || *sec_r != ')') {
    status_bar_error("Wrong section number format.");
    return 1;
  }
  sep = strpbrk(line, " (");
  if (section_len == 0 || section_len - 1 < (size_t)(sec_r - (sec_l + 1)) || topic_len == 0 || topic_len - 1 < (size_t)(sep - line)) {
    status_bar_error("Internal buffer is too small.");
    return 1;
  }
  copy_str(topic, sep - line + 1, line);
  copy_str(section, sec_r - (sec_l + 1) + 1, sec_l + 1);
  return 0;
}
```