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

```asm
<set_eattr>:
  endbr64
  push   %r15
  xor    %r8d,%r8d
  mov    %esi,%r15d
  xor    %ecx,%ecx
  push   %r14
  mov    $0x1,%r9d
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edx,%ebx
  xor    %edx,%edx
  sub    $0x98,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  lea    0x1c(%rsp),%rsi
  call   <open_master_conn@plt>
  test   %eax,%eax
  js     L98
  lea    0x20(%rsp),%rbp
  mov    %eax,%r14d
  lea    0x30(%rsp),%r12
  xor    %eax,%eax
  call   <getuid@plt>
  mov    $0x1da,%esi
  mov    %rbp,%rdi
  mov    %r12,0x20(%rsp)
  mov    %eax,0xc(%rsp)
  call   <put32bit@plt>
  mov    $0xe,%esi
  mov    %rbp,%rdi
  call   <put32bit@plt>
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <put32bit@plt>
  mov    0x1c(%rsp),%esi
  mov    %rbp,%rdi
  call   <put32bit@plt>
  mov    0xc(%rsp),%esi
  mov    %rbp,%rdi
  call   <put32bit@plt>
  mov    %r15d,%esi
  mov    %rbp,%rdi
  call   <put8bit@plt>
  mov    %ebx,%esi
  mov    %rbp,%rdi
  call   <put8bit@plt>
  mov    $0x2710,%ecx
  mov    %r12,%rsi
  mov    %r14d,%edi
  mov    $0x16,%edx
  call   <tcptowrite@plt>
  cmp    $0x16,%eax
  jne    L205
  mov    $0x2710,%ecx
  mov    $0x8,%edx
  mov    %r12,%rsi
  mov    %r14d,%edi
  call   <tcptoread@plt>
  cmp    $0x8,%eax
  jne    L163
  lea    0x28(%rsp),%rbp
  mov    %r12,0x28(%rsp)
  mov    %rbp,%rdi
  call   <get32bit@plt>
  mov    %rbp,%rdi
  mov    %eax,%r12d
  call   <get32bit@plt>
  mov    %eax,%r15d
  cmp    $0x1db,%r12d
  jne    L158
  mov    %eax,%edi
  call   <malloc@plt>
  mov    $0x2710,%ecx
  mov    %r15d,%edx
  mov    %r14d,%edi
  mov    %rax,%rsi
  mov    %rax,%r12
  call   <tcptoread@plt>
  cmp    %r15d,%eax
  jne    L177
  xor    %edi,%edi
  mov    %eax,0xc(%rsp)
  call   <close_master_conn@plt>
  mov    %rbp,%rdi
  mov    %r12,0x28(%rsp)
  call   <get32bit@plt>
  mov    0xc(%rsp),%edx
  test   %eax,%eax
  mov    %eax,%r14d
  jne    L88
  lea    -0x4(%rdx),%eax
  cmp    $0x5,%edx
  je     L18
  cmp    $0xc,%eax
  jne    L194
  mov    %rbp,%rdi
  call   <get32bit@plt>
  mov    %rbp,%rdi
  mov    %eax,%r15d
  call   <get32bit@plt>
  mov    %rbp,%rdi
  mov    %eax,0xc(%rsp)
  call   <get32bit@plt>
  and    $0x4,%ebx
  mov    %r13,%rsi
  mov    %eax,%ebp
  jne    L157
  test   %r15d,%r15d
  jne    L104
  lea    D50(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L16:
  mov    %r12,%rdi
  call   <free@plt>
L141:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L11
  add    $0x98,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L104:
  lea    D113(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L16
L157:
  lea    D35(%rip),%r13
  lea    D26(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %r8d,%r8d
  mov    %r15d,%edx
  mov    %r13,%rsi
  mov    $0x1,%r9d
  mov    $0x1,%ecx
  lea    D67(%rip),%rdi
  call   <print_number@plt>
  mov    0xc(%rsp),%edx
  xor    %r8d,%r8d
  mov    %r13,%rsi
  mov    $0x1,%r9d
  mov    $0x1,%ecx
  lea    D118(%rip),%rdi
  call   <print_number@plt>
  mov    $0x1,%r9d
  xor    %r8d,%r8d
  mov    %ebp,%edx
  mov    $0x1,%ecx
  mov    %r13,%rsi
  lea    D32(%rip),%rdi
  call   <print_number@plt>
  jmp    L16
  nopw   0x0(%rax,%rax,1)
L205:
  mov    %r13,%rsi
  lea    D81(%rip),%rdi
L164:
  xor    %eax,%eax
  mov    $0xffffffff,%r14d
  call   <printf@plt>
  mov    $0x1,%edi
  call   <close_master_conn@plt>
  jmp    L141
  cs nopw 0x0(%rax,%rax,1)
L163:
  mov    %r13,%rsi
  lea    D90(%rip),%rdi
  jmp    L164
  nopl   0x0(%rax)
L158:
  mov    %r13,%rsi
  lea    D75(%rip),%rdi
  jmp    L164
  nopl   0x0(%rax)
L177:
  mov    %r13,%rsi
  lea    D90(%rip),%rdi
  xor    %eax,%eax
  mov    $0xffffffff,%r14d
  call   <printf@plt>
  mov    %r12,%rdi
  call   <free@plt>
  mov    $0x1,%edi
  call   <close_master_conn@plt>
  jmp    L141
  xchg   %ax,%ax
L194:
  mov    %r13,%rsi
  lea    D95(%rip),%rdi
L182:
  xor    %eax,%eax
  mov    $0xffffffff,%r14d
  call   <printf@plt>
  mov    %r12,%rdi
  call   <free@plt>
  jmp    L141
  nopl   0x0(%rax)
L98:
  mov    $0xffffffff,%r14d
  jmp    L141
L88:
  mov    %r13,%rsi
  lea    D55(%rip),%rdi
  jmp    L182
L18:
  mov    0x28(%rsp),%rax
  mov    $0xffffffff,%r14d
  mov    (%rax),%edi
  call   <mfsstrerr@plt>
  mov    %r13,%rsi
  lea    D3(%rip),%rdi
  mov    %rax,%rdx
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r12,%rdi
  call   <free@plt>
  jmp    L141
L11:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D50
type_infered: string
name: unpack_data
arguments: data_tag: D113
type_infered: string
name: unpack_data
arguments: data_tag: D35
type_infered: string
name: unpack_data
arguments: data_tag: D26
type_infered: string
name: unpack_data
arguments: data_tag: D67
type_infered: string
name: unpack_data
arguments: data_tag: D118
type_infered: string
name: unpack_data
arguments: data_tag: D32
type_infered: string
name: unpack_data
arguments: data_tag: D81
type_infered: string
name: unpack_data
arguments: data_tag: D90
type_infered: string
name: unpack_data
arguments: data_tag: D75
type_infered: string
name: unpack_data
arguments: data_tag: D95
type_infered: string
name: unpack_data
arguments: data_tag: D55
type_infered: string
name: unpack_data
arguments: data_tag: D3
type_infered: string

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


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


tool: D35: 


tool: D26: %s:


tool: D67:  inodes with attributes changed:     

tool: D118:  inodes with attributes not changed: 

tool: D32:  inodes with permission denied:      

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


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


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


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


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


tool: D3: %s: %s


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;
}
```