user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<udev_node_remove>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x420,%rsp
  mov    %rdi,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x418(%rsp)
  xor    %eax,%eax
  call   <udev_device_get_udev@plt>
  mov    %rax,%r12
  mov    %rbp,%rdi
  call   <udev_device_get_devlinks_list_entry@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L118
L78:
  mov    %rbx,%rdi
  call   <udev_list_entry_get_name@plt>
  mov    %eax,%esi
  mov    $0x0,%edx
  mov    %rbp,%rdi
  call   <link_update@plt>
  mov    %rbx,%rdi
  call   <udev_list_entry_get_next@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  jne    L78
L118:
  mov    %rbp,%rdi
  call   <udev_device_get_devnode@plt>
  mov    %rax,%rbx
  mov    $0x0,%r13d
  test   %rax,%rax
  je     L32
  lea    0x8(%rsp),%rsi
  mov    %rax,%rdi
  call   <stat@plt>
  test   %rax,%rax
  jne    L77
  mov    0x8(%rsp),%r13
  mov    %rbp,%rdi
  call   <udev_device_get_devnum@plt>
  cmp    %rax,%r13
  jne    L34
  mov    %rbp,%rdi
  call   <udev_device_get_syspath@plt>
  mov    %eax,%esi
  mov    %r12,%rdi
  call   <udev_device_new_from_syspath@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L6
  mov    %rbx,%rdx
  lea    D2(%rip),%rsi
  mov    %r12,%rdi
  call   <udev_log_null@plt>
  mov    %r13,%rdi
  call   <udev_device_unref@plt>
  mov    $0x0,%r13d
L32:
  mov    0x418(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L92
  mov    %r13d,%eax
  add    $0x420,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L77:
  mov    %rbx,%rdx
  lea    D26(%rip),%rsi
  mov    %r12,%rdi
  call   <udev_log_null@plt>
  jmp    L32
L34:
  mov    %rbx,%rdx
  lea    D61(%rip),%rsi
  mov    %r12,%rdi
  call   <udev_log_null@plt>
  mov    $0xffffffff,%r13d
  jmp    L32
L6:
  mov    %rbx,%rdx
  lea    D65(%rip),%rsi
  mov    %r12,%rdi
  call   <udev_log_null@plt>
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <util_unlink_secure@plt>
  mov    %eax,%r13d
  test   %eax,%eax
  je     L5
L21:
  mov    %rbp,%rdi
  call   <udev_device_get_devnum@plt>
  mov    %rax,%rdi
  call   <minor@plt>
  mov    %eax,%r14d
  mov    %rbp,%rdi
  call   <udev_device_get_devnum@plt>
  mov    %rax,%rdi
  call   <major@plt>
  mov    %eax,%ebx
  mov    %rbp,%rdi
  call   <udev_device_get_subsystem@plt>
  mov    %eax,%edi
  lea    D40(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  lea    D40(%rip),%rbp
  lea    D48(%rip),%rax
  cmovne %rax,%rbp
  mov    %r12,%rdi
  call   <udev_get_dev_path@plt>
  mov    %rax,%rcx
  lea    0x10(%rsp),%r12
  sub    $0x8,%rsp
  push   %r14
  mov    %ebx,%r9d
  mov    %rbp,%r8
  lea    D3(%rip),%rdx
  mov    $0x400,%esi
  mov    %r12,%rdi
  call   <snprintf@plt>
  mov    %r12,%rdi
  call   <unlink@plt>
  add    $0x10,%rsp
  jmp    L32
L5:
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <util_delete_path@plt>
  jmp    L21
L92:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D2
datatype: string
name: retrieve_data
arguments: label: D26
datatype: string
name: retrieve_data
arguments: label: D61
datatype: string
name: retrieve_data
arguments: label: D65
datatype: string
name: retrieve_data
arguments: label: D40
datatype: string
name: retrieve_data
arguments: label: D48
datatype: string
name: retrieve_data
arguments: label: D3
datatype: string

tool: D2: keeping device node of existing device'%s'


tool: D26: device node '%s' not found


tool: D61: device node '%s' points to a different device, skip removal


tool: D65: removing device node '%s'


tool: D40: block

tool: D48: char

tool: D3: %s/%s/%u:%u

assistant: ```c
int udev_node_remove(struct udev_device *dev) {
  struct udev *udev = udev_device_get_udev(dev);
  struct udev_list_entry *list_entry;
  const char *devnode;
  struct stat stats;
  struct udev_device *dev_check;
  char filename[1024];
  int err = 0;
  for (list_entry = udev_device_get_devlinks_list_entry(dev); list_entry != NULL; list_entry = udev_list_entry_get_next(list_entry))
    link_update(dev, udev_list_entry_get_name(list_entry), 0);
  devnode = udev_device_get_devnode(dev);
  if (devnode == NULL)
    goto out;
  if (stat(devnode, &stats) != 0) {
    udev_log_null(udev, "device node '%s' not found\n", devnode);
    goto out;
  }
  if (stats.st_rdev != udev_device_get_devnum(dev)) {
    udev_log_null(udev, "device node '%s' points to a different device, skip removal\n", devnode);
    err = -1;
    goto out;
  }
  dev_check = udev_device_new_from_syspath(udev, udev_device_get_syspath(dev));
  if (dev_check != NULL) {
    udev_log_null(udev, "keeping device node of existing device'%s'\n", devnode);
    udev_device_unref(dev_check);
    goto out;
  }
  udev_log_null(udev, "removing device node '%s'\n", devnode);
  err = util_unlink_secure(udev, devnode);
  if (err == 0)
    util_delete_path(udev, devnode);
  snprintf(filename, sizeof(filename), "%s/%s/%u:%u", udev_get_dev_path(udev), strcmp(udev_device_get_subsystem(dev), "block") == 0 ? "block" : "char", major(udev_device_get_devnum(dev)), minor(udev_device_get_devnum(dev)));
  unlink(filename);
out:
  return err;
}
```