user: 下面的汇编指令对应的C源代码是什么:

```asm
<smack_accesses_add_from_file>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %esi,%edi
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x20(%rsp)
  movq   $0x0,0x28(%rsp)
  call   <dup@plt>
  mov    %eax,%r12d
  cmp    $0xffffffff,%eax
  je     L31
  lea    D17(%rip),%rsi
  mov    %eax,%edi
  call   <fdopen@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L45
  lea    0x20(%rsp),%rax
  lea    0x28(%rsp),%r15
  mov    %rax,(%rsp)
  lea    0x30(%rsp),%rbp
  lea    D1(%rip),%rbx
L119:
  mov    (%rsp),%rdi
  mov    %r14,%rdx
  mov    %r15,%rsi
  call   <getline@plt>
  test   %rax,%rax
  js     L105
  mov    0x20(%rsp),%rdi
  lea    D10(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L119
  mov    0x20(%rsp),%rdi
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  call   <strtok_r@plt>
  xor    %edi,%edi
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %rax,%r12
  call   <strtok_r@plt>
  xor    %edi,%edi
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %rax,%r13
  call   <strtok_r@plt>
  mov    %rbp,%rdx
  xor    %edi,%edi
  mov    %rbx,%rsi
  mov    %rax,0x8(%rsp)
  call   <strtok_r@plt>
  test   %r12,%r12
  mov    %rax,0x10(%rsp)
  sete   %al
  test   %r13,%r13
  sete   %dl
  or     %dl,%al
  jne    L35
  mov    0x8(%rsp),%rcx
  test   %rcx,%rcx
  je     L35
  xor    %edi,%edi
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  call   <strtok_r@plt>
  test   %rax,%rax
  jne    L35
  mov    0x10(%rsp),%r8
  mov    0x18(%rsp),%rdi
  mov    %r13,%rdx
  mov    %r12,%rsi
  mov    0x8(%rsp),%rcx
  test   %r8,%r8
  je     L90
  call   <smack_accesses_add_modify@plt>
L126:
  test   %eax,%eax
  je     L119
L35:
  mov    0x20(%rsp),%rdi
  mov    $0xffffffff,%r12d
  call   <free@plt>
  mov    %r14,%rdi
  call   <fclose@plt>
L31:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L14
  add    $0x48,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L90:
  call   <smack_accesses_add@plt>
  jmp    L126
  nop
L105:
  mov    %r14,%rdi
  call   <ferror@plt>
  test   %rax,%rax
  jne    L35
  mov    0x20(%rsp),%rdi
  xor    %r12d,%r12d
  call   <free@plt>
  mov    %r14,%rdi
  call   <fclose@plt>
  jmp    L31
L45:
  mov    %r12d,%edi
  mov    $0xffffffff,%r12d
  call   <close@plt>
  jmp    L31
L14:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D17
data_type: string
name: unpack_data
arguments: data_tag: D1
data_type: string
name: unpack_data
arguments: data_tag: D10
data_type: string

tool: D17: r

tool: D1:  	


tool: D10: 


assistant: ```c
int smack_accesses_add_from_file(struct smack_accesses *accesses, int fd) {
  FILE *file = NULL;
  char *buf = NULL;
  size_t buf_len = 0;
  char *ptr;
  const char *subject, *object, *access, *access2;
  int newfd;
  int ret;
  newfd = dup(fd);
  if (newfd == -1)
    return -1;
  file = fdopen(newfd, "r");
  if (file == NULL) {
    close(newfd);
    return -1;
  }
  while (getline(&buf, &buf_len, file) >= 0) {
    if (strcmp(buf, "\n") == 0)
      continue;
    subject = strtok_r(buf, " \t\n", &ptr);
    object = strtok_r(NULL, " \t\n", &ptr);
    access = strtok_r(NULL, " \t\n", &ptr);
    access2 = strtok_r(NULL, " \t\n", &ptr);
    if (subject == NULL || object == NULL || access == NULL || strtok_r(NULL, " \t\n", &ptr) != NULL)
      goto err_out;
    if (access2 == NULL)
      ret = smack_accesses_add(accesses, subject, object, access);
    else
      ret = smack_accesses_add_modify(accesses, subject, object, access, access2);
    if (ret)
      goto err_out;
  }
  if (ferror(file))
    goto err_out;
  free(buf);
  fclose(file);
  return 0;
err_out:
  free(buf);
  fclose(file);
  return -1;
}
```