user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    D15(%rip),%rdi
  call   <puts@plt>
  mov    %rsp,%rsi
  lea    D93(%rip),%rdi
  call   <stat@plt>
  cmp    $0xffffffff,%eax
  je     L69
L99:
  mov    0x8(%rsp),%esi
  lea    D185(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    (%rsp),%esi
  lea    D65(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rsp,%rsi
  lea    D89(%rip),%rdi
  call   <lstat@plt>
  cmp    $0xffffffff,%eax
  je     L32
L84:
  mov    0x8(%rsp),%esi
  lea    D0(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    (%rsp),%esi
  lea    D171(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%edx
  mov    $0x0,%esi
  lea    D89(%rip),%rdi
  call   <lchown@plt>
  cmp    $0xffffffff,%eax
  je     L50
L89:
  lea    D98(%rip),%rdi
  call   <puts@plt>
  mov    %rsp,%rsi
  lea    D93(%rip),%rdi
  call   <stat@plt>
  cmp    $0xffffffff,%eax
  je     L20
L27:
  mov    0x8(%rsp),%esi
  lea    D185(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    (%rsp),%esi
  lea    D65(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rsp,%rsi
  lea    D89(%rip),%rdi
  call   <lstat@plt>
  cmp    $0xffffffff,%eax
  je     L51
L39:
  mov    0x8(%rsp),%esi
  lea    D0(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    (%rsp),%esi
  lea    D171(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L48
  mov    $0x0,%eax
  add    $0x28,%rsp
  ret
L69:
  lea    D163(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L99
L32:
  lea    D163(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L84
L50:
  lea    D175(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L89
L20:
  lea    D163(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L27
L51:
  lea    D163(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L39
L48:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D15
datatype: string
name: extract_symbolic_data
arguments: data_label: D93
datatype: string
name: extract_symbolic_data
arguments: data_label: D185
datatype: string
name: extract_symbolic_data
arguments: data_label: D65
datatype: string
name: extract_symbolic_data
arguments: data_label: D89
datatype: string
name: extract_symbolic_data
arguments: data_label: D0
datatype: string
name: extract_symbolic_data
arguments: data_label: D171
datatype: string
name: extract_symbolic_data
arguments: data_label: D98
datatype: string
name: extract_symbolic_data
arguments: data_label: D163
datatype: string
name: extract_symbolic_data
arguments: data_label: D175
datatype: string

tool: D15: before changing

tool: D93: test.txt

tool: D185: the owner of test.txt is : %u


tool: D65: the group of test.txt is : %u


tool: D89: sl

tool: D0: the owner of sl is : %u


tool: D171: the group of sl is : %u


tool: D98: after changing

tool: D163: fail to get status

tool: D175: fail to change owner

assistant: ```c
int main(void) {
  struct stat statbuf;
  printf("before changing\n");
  if (stat("test.txt", &statbuf) == -1) {
    perror("fail to get status");
    exit(1);
  }
  printf("the owner of test.txt is : %u\n", (unsigned int)statbuf.st_uid);
  printf("the group of test.txt is : %u\n", (unsigned int)statbuf.st_gid);
  if (lstat("sl", &statbuf) == -1) {
    perror("fail to get status");
    exit(1);
  }
  printf("the owner of sl is : %u\n", (unsigned int)statbuf.st_uid);
  printf("the group of sl is : %u\n", (unsigned int)statbuf.st_gid);
  if (lchown("sl", 0, -1) == -1) {
    perror("fail to change owner");
    exit(1);
  }
  printf("after changing\n");
  if (stat("test.txt", &statbuf) == -1) {
    perror("fail to get status");
    exit(1);
  }
  printf("the owner of test.txt is : %u\n", (unsigned int)statbuf.st_uid);
  printf("the group of test.txt is : %u\n", (unsigned int)statbuf.st_gid);
  if (lstat("sl", &statbuf) == -1) {
    perror("fail to get status");
    exit(1);
  }
  printf("the owner of sl is : %u\n", (unsigned int)statbuf.st_uid);
  printf("the group of sl is : %u\n", (unsigned int)statbuf.st_gid);
  return 0;
}
```