user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r15
  lea    D33(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    D37(%rip),%rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  call   <puts@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <stat@plt>
  cmp    $0xffffffff,%eax
  je     L98
L65:
  mov    0x8(%rsp),%esi
  lea    D31(%rip),%r15
  xor    %eax,%eax
  lea    D5(%rip),%r14
  mov    %r15,%rdi
  lea    D123(%rip),%r12
  call   <printf@plt>
  mov    (%rsp),%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <lstat@plt>
  cmp    $0xffffffff,%eax
  je     L85
L39:
  mov    0x8(%rsp),%esi
  lea    D72(%rip),%r13
  xor    %eax,%eax
  mov    %r13,%rdi
  call   <printf@plt>
  mov    (%rsp),%esi
  lea    D114(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %esi,%esi
  mov    $0xffffffff,%edx
  mov    %r12,%rdi
  call   <lchown@plt>
  cmp    $0xffffffff,%eax
  je     L95
L18:
  lea    D119(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <stat@plt>
  cmp    $0xffffffff,%eax
  je     L38
L14:
  mov    0x8(%rsp),%esi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    (%rsp),%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <lstat@plt>
  cmp    $0xffffffff,%eax
  je     L81
L29:
  mov    0x8(%rsp),%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    (%rsp),%esi
  xor    %eax,%eax
  lea    D114(%rip),%rdi
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L96
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L98:
  lea    D138(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L65
L81:
  lea    D138(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L29
L38:
  lea    D138(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L14
L95:
  lea    D39(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L18
L85:
  lea    D138(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L39
L96:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D33
type: string
name: extract_symbolic_data
arguments: data_label: D37
type: string
name: extract_symbolic_data
arguments: data_label: D31
type: string
name: extract_symbolic_data
arguments: data_label: D5
type: string
name: extract_symbolic_data
arguments: data_label: D123
type: string
name: extract_symbolic_data
arguments: data_label: D72
type: string
name: extract_symbolic_data
arguments: data_label: D114
type: string
name: extract_symbolic_data
arguments: data_label: D119
type: string
name: extract_symbolic_data
arguments: data_label: D138
type: string
name: extract_symbolic_data
arguments: data_label: D39
type: string

tool: D33: before changing

tool: D37: test.txt

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


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


tool: D123: sl

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


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


tool: D119: after changing

tool: D138: fail to get status

tool: D39: 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;
}
```