user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<joinfiles>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x238,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
L6:
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x120(%rbp),%rax
  mov    %rax,%rsi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    -0x120(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <atoi@plt>
  mov    %eax,-0x230(%rbp)
  cmpl   $0x1,-0x230(%rbp)
  jle    L6
  mov    -0x230(%rbp),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x228(%rbp)
  mov    -0x230(%rbp),%eax
  mov    %eax,%esi
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x234(%rbp)
  jmp    L17
L44:
  mov    -0x234(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x228(%rbp),%rax
  lea    (%rdx,%rax,1),%rbx
  mov    $0x100,%edi
  call   <malloc@plt>
  mov    %rax,(%rbx)
  mov    -0x234(%rbp),%eax
  add    $0x1,%eax
  mov    $0xff,%edx
  mov    %eax,%esi
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x234(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x228(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  addl   $0x1,-0x234(%rbp)
L17:
  mov    -0x234(%rbp),%eax
  cmp    -0x230(%rbp),%eax
  jl     L44
  mov    $0xff,%esi
  lea    D53(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x220(%rbp),%rax
  mov    %rax,%rsi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    -0x220(%rbp),%rdx
  mov    -0x228(%rbp),%rcx
  mov    -0x230(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <joindata@plt>
  mov    %eax,-0x22c(%rbp)
  movl   $0x0,-0x234(%rbp)
  jmp    L31
L39:
  mov    -0x234(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x228(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <free@plt>
  addl   $0x1,-0x234(%rbp)
L31:
  mov    -0x234(%rbp),%eax
  cmp    -0x230(%rbp),%eax
  jl     L39
  mov    -0x228(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x22c(%rbp),%eax
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L23
  call   <__stack_chk_fail@plt>
L23:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D28
data_type: string
name: unpack_data
arguments: data_tag: D24
data_type: string
name: unpack_data
arguments: data_tag: D0
data_type: string
name: unpack_data
arguments: data_tag: D20
data_type: string
name: unpack_data
arguments: data_tag: D53
data_type: string

tool: D28:   choose the number of files to join (>1): 

tool: D24: %s

tool: D0: 
  choose %d files to be joint (.dat)


tool: D20:     file %d (max %d character): 

tool: D53: 
  insert name for created file (.dat) (max %d character): 

assistant: ```c
int joinfiles() {
  int i, error, ninp;
  char outp[256], str[256], **linp;
  do {
    printf("  choose the number of files to join (>1): ");
    scanf("%s", &str);
    ninp = atoi(str);
  } while (ninp <= 1);
  linp = (char **)malloc(ninp * sizeof(char *));
  printf("\n  choose %d files to be joint (.dat)\n", ninp);
  for (i = 0; i < ninp; i++) {
    linp[i] = (char *)malloc(256 * sizeof(char));
    printf("    file %d (max %d character): ", i + 1, 256 - 1);
    scanf("%s", linp[i]);
  }
  printf("\n  insert name for created file (.dat) (max %d character): ", 256 - 1);
  scanf("%s", outp);
  error = joindata(ninp, linp, outp);
  for (i = 0; i < ninp; i++) {
    free(linp[i]);
  }
  free(linp);
  return error;
}
```