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

```asm
<nodelist_common_string_appends_and_extends>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  mov    %r8,-0x68(%rbp)
  movl   $0xffffffff,-0x3c(%rbp)
  lea    D15(%rip),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L28
  cmpq   $0x0,-0x60(%rbp)
  je     L28
  cmpq   $0x0,-0x68(%rbp)
  je     L105
  mov    -0x68(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  jmp    L55
L105:
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x30(%rbp)
L55:
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L106
  lea    D16(%rip),%rax
  mov    %rax,-0x30(%rbp)
L106:
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x20(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x60(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rax
  cmp    %rax,-0x8(%rbp)
  jbe    L7
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x38(%rbp)
  jmp    L53
L95:
  mov    -0x58(%rbp),%rax
  add    %rax,-0x38(%rbp)
L53:
  mov    -0x8(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  ja     L95
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L34
  mov    -0x50(%rbp),%rax
  mov    -0x38(%rbp),%rdx
  mov    %rdx,(%rax)
  jmp    L7
L34:
  mov    -0x50(%rbp),%rax
  movq   $0x0,(%rax)
L7:
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L28
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x20(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x18(%rbp),%rdx
  mov    -0x30(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <strncpy@plt>
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rax
  mov    -0x20(%rbp),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  lea    (%rax,%rdx,1),%rcx
  mov    -0x10(%rbp),%rdx
  mov    -0x60(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <strncpy@plt>
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rax
  mov    -0x20(%rbp),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rdx,%rcx
  mov    -0x10(%rbp),%rdx
  add    %rcx,%rdx
  add    %rdx,%rax
  movb   $0x0,(%rax)
  movl   $0x0,-0x3c(%rbp)
L28:
  mov    -0x3c(%rbp),%eax
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D15
type_guessed: string
name: retrieve_data
arguments: data_label: D16
type_guessed: string

tool: D15:  

tool: 

assistant: ```c
int nodelist_common_string_appends_and_extends(char **p_io_string, size_t *p_current_length, size_t inc_length, char *string2append, char *separator) {
  int fstatus = -1;
  size_t new_output_length;
  size_t new_string_length;
  size_t output_string_length;
  size_t separator_length;
  size_t append_length;
  char *default_separator = " ";
  char *local_separator;
  if (*p_io_string != NULL && string2append != NULL) {
    if (separator != NULL)
      local_separator = separator;
    else
      local_separator = default_separator;
    if (strlen(*p_io_string) == 0)
      local_separator = "";
    output_string_length = strlen(*p_io_string);
    separator_length = strlen(local_separator);
    append_length = strlen(string2append);
    new_string_length = output_string_length + separator_length + append_length;
    if (new_string_length > *p_current_length) {
      new_output_length = *p_current_length;
      while (new_string_length > new_output_length)
        new_output_length += inc_length;
      *p_io_string = (char *)realloc(*p_io_string, (new_output_length + 1) * sizeof(char));
      if (*p_io_string != NULL)
        *p_current_length = new_output_length;
      else
        *p_current_length = 0;
    }
    if (*p_io_string != NULL) {
      strncpy(*p_io_string + output_string_length, local_separator, separator_length);
      strncpy(*p_io_string + output_string_length + separator_length, string2append, append_length);
      *(*p_io_string + output_string_length + separator_length + append_length) = '\0';
      fstatus = 0;
    }
  }
  return fstatus;
}
```