user: 请从给定的汇编指令推导出C源代码:

```asm
<set_eattr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xb0,%rsp
  mov    %rdi,-0xa8(%rbp)
  mov    %esi,-0xac(%rbp)
  mov    %edx,-0xb0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x98(%rbp),%rsi
  mov    -0xa8(%rbp),%rax
  mov    $0x1,%r9d
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  mov    $0x0,%edx
  mov    %rax,%rdi
  call   <open_master_conn@plt>
  mov    %eax,-0x94(%rbp)
  cmpl   $0x0,-0x94(%rbp)
  jns    L31
  mov    $0xffffffff,%eax
  jmp    L94
L31:
  mov    $0x0,%eax
  call   <getuid@plt>
  mov    %eax,-0x90(%rbp)
  lea    -0x60(%rbp),%rax
  mov    %rax,-0x78(%rbp)
  lea    -0x78(%rbp),%rax
  mov    $0x1da,%esi
  mov    %rax,%rdi
  call   <put32bit@plt>
  lea    -0x78(%rbp),%rax
  mov    $0xe,%esi
  mov    %rax,%rdi
  call   <put32bit@plt>
  lea    -0x78(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <put32bit@plt>
  mov    -0x98(%rbp),%edx
  lea    -0x78(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <put32bit@plt>
  mov    -0x90(%rbp),%edx
  lea    -0x78(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <put32bit@plt>
  mov    -0xac(%rbp),%edx
  lea    -0x78(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <put8bit@plt>
  mov    -0xb0(%rbp),%edx
  lea    -0x78(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <put8bit@plt>
  lea    -0x60(%rbp),%rsi
  mov    -0x94(%rbp),%eax
  mov    $0x2710,%ecx
  mov    $0x16,%edx
  mov    %eax,%edi
  call   <tcptowrite@plt>
  cmp    $0x16,%eax
  je     L118
  mov    -0xa8(%rbp),%rax
  mov    %rax,%rsi
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <close_master_conn@plt>
  mov    $0xffffffff,%eax
  jmp    L94
L118:
  lea    -0x60(%rbp),%rsi
  mov    -0x94(%rbp),%eax
  mov    $0x2710,%ecx
  mov    $0x8,%edx
  mov    %eax,%edi
  call   <tcptoread@plt>
  cmp    $0x8,%eax
  je     L139
  mov    -0xa8(%rbp),%rax
  mov    %rax,%rsi
  lea    D122(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <close_master_conn@plt>
  mov    $0xffffffff,%eax
  jmp    L94
L139:
  lea    -0x60(%rbp),%rax
  mov    %rax,-0x70(%rbp)
  lea    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <get32bit@plt>
  mov    %eax,-0x8c(%rbp)
  lea    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <get32bit@plt>
  mov    %eax,-0x88(%rbp)
  cmpl   $0x1db,-0x8c(%rbp)
  je     L100
  mov    -0xa8(%rbp),%rax
  mov    %rax,%rsi
  lea    D34(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <close_master_conn@plt>
  mov    $0xffffffff,%eax
  jmp    L94
L100:
  mov    -0x88(%rbp),%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x68(%rbp)
  mov    -0x88(%rbp),%edx
  mov    -0x68(%rbp),%rsi
  mov    -0x94(%rbp),%eax
  mov    $0x2710,%ecx
  mov    %eax,%edi
  call   <tcptoread@plt>
  cmp    %eax,-0x88(%rbp)
  je     L207
  mov    -0xa8(%rbp),%rax
  mov    %rax,%rsi
  lea    D122(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x1,%edi
  call   <close_master_conn@plt>
  mov    $0xffffffff,%eax
  jmp    L94
L207:
  mov    $0x0,%edi
  call   <close_master_conn@plt>
  mov    -0x68(%rbp),%rax
  mov    %rax,-0x70(%rbp)
  lea    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <get32bit@plt>
  mov    %eax,-0x8c(%rbp)
  cmpl   $0x0,-0x8c(%rbp)
  je     L73
  mov    -0xa8(%rbp),%rax
  mov    %rax,%rsi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0xffffffff,%eax
  jmp    L94
L73:
  subl   $0x4,-0x88(%rbp)
  cmpl   $0x1,-0x88(%rbp)
  jne    L5
  mov    -0x70(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <mfsstrerr@plt>
  mov    %rax,%rdx
  mov    -0xa8(%rbp),%rax
  mov    %rax,%rsi
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0xffffffff,%eax
  jmp    L94
L5:
  cmpl   $0xc,-0x88(%rbp)
  je     L130
  mov    -0xa8(%rbp),%rax
  mov    %rax,%rsi
  lea    D133(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0xffffffff,%eax
  jmp    L94
L130:
  lea    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <get32bit@plt>
  mov    %eax,-0x84(%rbp)
  lea    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <get32bit@plt>
  mov    %eax,-0x80(%rbp)
  lea    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <get32bit@plt>
  mov    %eax,-0x7c(%rbp)
  mov    -0xb0(%rbp),%eax
  and    $0x4,%eax
  test   %eax,%eax
  jne    L27
  cmpl   $0x0,-0x84(%rbp)
  je     L76
  mov    -0xa8(%rbp),%rax
  mov    %rax,%rsi
  lea    D156(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L26
L76:
  mov    -0xa8(%rbp),%rax
  mov    %rax,%rsi
  lea    D124(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L26
L27:
  mov    -0xa8(%rbp),%rax
  mov    %rax,%rsi
  lea    D112(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x84(%rbp),%eax
  mov    $0x1,%r9d
  mov    $0x0,%r8d
  mov    $0x1,%ecx
  mov    %eax,%edx
  lea    D141(%rip),%rax
  mov    %rax,%rsi
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  call   <print_number@plt>
  mov    -0x80(%rbp),%eax
  mov    $0x1,%r9d
  mov    $0x0,%r8d
  mov    $0x1,%ecx
  mov    %eax,%edx
  lea    D141(%rip),%rax
  mov    %rax,%rsi
  lea    D128(%rip),%rax
  mov    %rax,%rdi
  call   <print_number@plt>
  mov    -0x7c(%rbp),%eax
  mov    $0x1,%r9d
  mov    $0x0,%r8d
  mov    $0x1,%ecx
  mov    %eax,%edx
  lea    D141(%rip),%rax
  mov    %rax,%rsi
  lea    D99(%rip),%rax
  mov    %rax,%rdi
  call   <print_number@plt>
L26:
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
L94:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L113
  call   <__stack_chk_fail@plt>
L113:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D3
type: string
name: disassemble_data
arguments: data_tag: D122
type: string
name: disassemble_data
arguments: data_tag: D34
type: string
name: disassemble_data
arguments: data_tag: D18
type: string
name: disassemble_data
arguments: data_tag: D27
type: string
name: disassemble_data
arguments: data_tag: D133
type: string
name: disassemble_data
arguments: data_tag: D156
type: string
name: disassemble_data
arguments: data_tag: D124
type: string
name: disassemble_data
arguments: data_tag: D112
type: string
name: disassemble_data
arguments: data_tag: D141
type: string
name: disassemble_data
arguments: data_tag: D29
type: string
name: disassemble_data
arguments: data_tag: D128
type: string
name: disassemble_data
arguments: data_tag: D99
type: string

tool: D3: %s: master query: send error


tool: D122: %s: master query: receive error


tool: D34: %s: master query: wrong answer (type)


tool: D18: %s: master query: wrong answer (queryid)


tool: D27: %s: %s


tool: D133: %s: master query: wrong answer (leng)


tool: D156: %s: attribute(s) changed


tool: D124: %s: attribute(s) not changed


tool: D112: %s:


tool: D141: 


tool: D29:  inodes with attributes changed:     

tool: D128:  inodes with attributes not changed: 

tool: D99:  inodes with permission denied:      

assistant: ```c
int set_eattr(const char *fname, uint8_t eattr, uint8_t mode) {
  uint8_t reqbuff[22], *wptr, *buff;
  const uint8_t *rptr;
  uint32_t cmd, leng, inode, uid;
  uint32_t changed, notchanged, notpermitted;
  int fd;
  fd = open_master_conn(fname, &inode, NULL, NULL, 0, 1);
  if (fd < 0) {
    return -1;
  }
  uid = getuid();
  wptr = reqbuff;
  put32bit(&wptr, (0 + 474));
  put32bit(&wptr, 14);
  put32bit(&wptr, 0);
  put32bit(&wptr, inode);
  put32bit(&wptr, uid);
  put8bit(&wptr, eattr);
  put8bit(&wptr, mode);
  if (tcptowrite(fd, reqbuff, 22, 10000) != 22) {
    printf("%s: master query: send error\n", fname);
    close_master_conn(1);
    return -1;
  }
  if (tcptoread(fd, reqbuff, 8, 10000) != 8) {
    printf("%s: master query: receive error\n", fname);
    close_master_conn(1);
    return -1;
  }
  rptr = reqbuff;
  cmd = get32bit(&rptr);
  leng = get32bit(&rptr);
  if (cmd != (0 + 475)) {
    printf("%s: master query: wrong answer (type)\n", fname);
    close_master_conn(1);
    return -1;
  }
  buff = malloc(leng);
  if (tcptoread(fd, buff, leng, 10000) != (int32_t)leng) {
    printf("%s: master query: receive error\n", fname);
    free(buff);
    close_master_conn(1);
    return -1;
  }
  close_master_conn(0);
  rptr = buff;
  cmd = get32bit(&rptr);
  if (cmd != 0) {
    printf("%s: master query: wrong answer (queryid)\n", fname);
    free(buff);
    return -1;
  }
  leng -= 4;
  if (leng == 1) {
    printf("%s: %s\n", fname, mfsstrerr(*rptr));
    free(buff);
    return -1;
  } else if (leng != 12) {
    printf("%s: master query: wrong answer (leng)\n", fname);
    free(buff);
    return -1;
  }
  changed = get32bit(&rptr);
  notchanged = get32bit(&rptr);
  notpermitted = get32bit(&rptr);
  if ((mode & 4) == 0) {
    if (changed) {
      printf("%s: attribute(s) changed\n", fname);
    } else {
      printf("%s: attribute(s) not changed\n", fname);
    }
  } else {
    printf("%s:\n", fname);
    print_number(" inodes with attributes changed:     ", "\n", changed, 1, 0, 1);
    print_number(" inodes with attributes not changed: ", "\n", notchanged, 1, 0, 1);
    print_number(" inodes with permission denied:      ", "\n", notpermitted, 1, 0, 1);
  }
  free(buff);
  return 0;
}
```