user: 请将以下的汇编代码转换成C语言代码：

```asm
<gui_nicklist_add_to_infolist>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L85
  mov    %rsi,%rbp
  test   %rsi,%rsi
  je     L85
  mov    %rdi,%r12
  mov    %rdx,%rbx
  test   %rdx,%rdx
  je     L49
  mov    $0x5,%edx
  lea    D10(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L2
  mov    $0x6,%edx
  lea    D19(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L67
L49:
  lea    0x10(%rsp),%r13
  lea    0x8(%rsp),%rbx
  mov    %rbp,%rdi
  movq   $0x0,0x8(%rsp)
  movq   $0x0,0x10(%rsp)
  mov    %r13,%rdx
  mov    %rbx,%rsi
  call   <gui_nicklist_get_next_item@plt>
  jmp    L123
  nopl   0x0(%rax)
L58:
  test   %rsi,%rsi
  je     L46
L143:
  mov    %r12,%rdi
  call   <gui_nicklist_add_nick_to_infolist@plt>
L95:
  mov    %r13,%rdx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <gui_nicklist_get_next_item@plt>
L123:
  mov    0x8(%rsp),%r8
  mov    0x10(%rsp),%rsi
  test   %r8,%r8
  jne    L58
  test   %rsi,%rsi
  jne    L143
  mov    $0x1,%eax
L64:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L17
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L46:
  mov    %r8,%rsi
  mov    %r12,%rdi
  call   <gui_nicklist_add_group_to_infolist@plt>
  jmp    L95
  nopl   (%rax)
L85:
  xor    %eax,%eax
  jmp    L64
L67:
  xor    %esi,%esi
  lea    0x6(%rbx),%rdx
  mov    %rbp,%rdi
  call   <gui_nicklist_search_group@plt>
  mov    %rax,0x8(%rsp)
  mov    %rax,%rsi
  test   %rax,%rax
  je     L85
  mov    %r12,%rdi
  call   <gui_nicklist_add_group_to_infolist@plt>
  jmp    L64
L2:
  xor    %esi,%esi
  lea    0x5(%rbx),%rdx
  mov    %rbp,%rdi
  call   <gui_nicklist_search_nick@plt>
  mov    %rax,0x10(%rsp)
  mov    %rax,%rsi
  test   %rax,%rax
  je     L85
  mov    %r12,%rdi
  call   <gui_nicklist_add_nick_to_infolist@plt>
  jmp    L64
L17:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D10
datatype: string
name: extract_symbolic_data
arguments: tag: D19
datatype: string

tool: D10: nick_

tool: D19: group_

assistant: ```c
int gui_nicklist_add_to_infolist(struct t_infolist *infolist, struct t_gui_buffer *buffer, const char *name) {
  struct t_gui_nick_group *ptr_group;
  struct t_gui_nick *ptr_nick;
  if (!infolist || !buffer)
    return 0;
  if (name && (strncmp(name, "nick_", 5) == 0)) {
    ptr_nick = gui_nicklist_search_nick(buffer, NULL, name + 5);
    if (!ptr_nick)
      return 0;
    return gui_nicklist_add_nick_to_infolist(infolist, ptr_nick);
  }
  if (name && (strncmp(name, "group_", 6) == 0)) {
    ptr_group = gui_nicklist_search_group(buffer, NULL, name + 6);
    if (!ptr_group)
      return 0;
    return gui_nicklist_add_group_to_infolist(infolist, ptr_group);
  }
  ptr_group = NULL;
  ptr_nick = NULL;
  gui_nicklist_get_next_item(buffer, &ptr_group, &ptr_nick);
  while (ptr_group || ptr_nick) {
    if (ptr_nick)
      gui_nicklist_add_nick_to_infolist(infolist, ptr_nick);
    else
      gui_nicklist_add_group_to_infolist(infolist, ptr_group);
    gui_nicklist_get_next_item(buffer, &ptr_group, &ptr_nick);
  }
  return 1;
}
```